我刚刚在WIN 8机器上安装了WAMPSERVER(Apache/2.4.9(Win64)),当试图启动它时,它的图标总是红色/橙色(不是绿色).从尝试运行服务的服务我看到以下错误消息:

从偶数日志中,我看到以下多个错误
The wampapache64 service terminated with the following service-specific error:
Incorrect function.
The Apache service named reported the following error:
>>> (OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:80
The Apache service named reported the following error:
>>> (OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not …Run Code Online (Sandbox Code Playgroud) 使用typescript,我用moment.js格式化我的日期.
function getCreatedDate(objContainingDate: any): Date {
// Following line does not work since it is returning string,
// I need formatted date object to return
return moment(objContainingDate.createdDate).format("L")
}
Run Code Online (Sandbox Code Playgroud)
format方法返回一个字符串,如何将其转换回日期对象?
我使用以下类作为依赖项解析器.参考了http://www.asp.net/web-api/overview/advanced/dependency-injection
public class UnityWebAPIResolver : IDependencyResolver
{
protected IUnityContainer container;
public UnityWebAPIResolver(IUnityContainer container)
{
if (container == null)
{
throw new ArgumentNullException("container");
}
this.container = container;
}
public object GetService(Type serviceType)
{
try
{
return container.Resolve(serviceType); **// This line throws error**
}
catch (ResolutionFailedException)
{
return null;
}
}
public IEnumerable<object> GetServices(Type serviceType)
{
try
{
return container.ResolveAll(serviceType); **// This line throws error**
}
catch (ResolutionFailedException)
{
return new List<object>();
}
}
public IDependencyScope BeginScope()
{
var child = …Run Code Online (Sandbox Code Playgroud) 我在看代码示例http://codepen.io/ionic/pen/mypxez/
要实现过滤器,他们正在做的就是,在master.html中,他们有一个输入框,它与这样的'filter'绑定
<ion-header-bar class="bar-subheader item-input-inset">
<label class="item-input-wrapper">
<i class="icon ion-ios7-search placeholder-icon"></i>
<input type="search" placeholder="Search" ng-model="filter">
</label>
</ion-header-bar>
Run Code Online (Sandbox Code Playgroud)
在内容中,他们正在做这样的事情
<ion-content>
<div class="list">
<a class="item my-item item-thumbnail-left"
collection-repeat="pet in pets | filter:filter"
collection-item-height="90"
collection-item-width="'100%'"
ui-sref="tabs.detail({petsId: pet.id })">
<img ng-src="http://placekitten.com/60/{{55 + ($index % 10)}}">
<h2>{{pet.firstName}}</h2>
<p>{{pet.id}}</p>
</a>
</div>
</ion-content>
Run Code Online (Sandbox Code Playgroud)
问:这完美无缺.我的问题是,我没有看到javascript代码中任何地方定义的任何其他自定义过滤器函数,这个东西是如何工作的?
问:为什么我的下拉没有显示选择的价值?这是我的javascript代码
<div ng-app="myApp">
<div ng-controller="MyCtrl">
<select ng-model="myModel.Active" convert-to-number>
<option value="-1">Select</option>
<option value="1">Yes</option>
<option value="2">No</option>
<option value="3">Maybe</option>
</select>
<span>{{myModel.Active}}</span>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
javascript
var myApp = angular.module("myApp",[]);
myApp.controller("MyCtrl", function($scope){
$scope.myModel = {};
$scope.myModel.Active=2; //
});
Run Code Online (Sandbox Code Playgroud)
js-fiddle链接 - https://jsfiddle.net/shatherali/4mxwzL5y/19/
编辑:请注意我不想使用字符串值.活动必须是数字值.
最新版本的Angular cli是否支持内联模板和组件的css?我再也看不到--inline-template选项了吗?
我正在尝试使用WebStorm创建Express应用程序并获得以下错误,并且无法弄清楚为什么WebStorm找不到Express相关的东西:
Node.js Interpreter: C:\Program Files\nodejs\nodevars.bat
npm Executable: C:\Program Files\nodejs\npm.cmd
Express Version: Unavailable
Template Version: Unavailable
CSS Engine: Unavailable
Run Code Online (Sandbox Code Playgroud) 使用lodash我想找到一个id为3229的团队.我试过跟随,但它没有返回任何东西.
var team = _.chain(data.teams)
.flatten("divisionTeams")
.find({"id":3229})
.value();
Run Code Online (Sandbox Code Playgroud)
这是我的plunker代码.
http://plnkr.co/edit/UDwzRkX3zkYjyf8UwO7I
有关Json数据,请参阅Plunker中的文件data.js.
请注意我无法更改json数据,因为我正在调用测试API.
我在 ASP.NET 5 应用程序中使用带有类型脚本的 Angular 1.4 和 RXJS。我有extremly wiered 问题。在运行时,我所有的接口属性都从驼峰式外壳转换为 Pascal Casing。为什么会发生这种情况以及如何避免这种情况?
请注意,我正在使用承诺从 web api 中获取数据,进行这样的调用
public GetDataFromAPI(request: Messages.IRequest): Observable<Messages.IResponse> {
let result: IPromise<Messages.IResponse>;
result = this.$http.post("http://api.domain.com/GetData", request).then(
(response: ng.IHttpPromiseCallbackArg<Messages.IResponse>) => {
return response.data;
}
);
return Observable.fromPromise(result).retry(3);
}
Run Code Online (Sandbox Code Playgroud)
这是我定义接口的方式
export interface IResponse{
firstName : string;
lastName : string;
age : number
}
Run Code Online (Sandbox Code Playgroud)
当我取回数据时,它的属性具有像这样的 CamelCasing,使它们可以访问。
response.data.FirstName
response.data.LastName
response.data.Age
Run Code Online (Sandbox Code Playgroud) 我正在使用Vb.net,并且有三条线,只需要选择第三条,第一条和第二条.我试过了!(必需|估计)但它没有用.
My reg expression is !(REQUIRED|ESTIMATED) also tried but did
not work ^(REQUIRED|ESTIMATED)
09359109359REQUIRED 00000000103332014022841000099999999900000000063140000000018570
09359109359ESTIMATED00000000130452014030453000000001435000000000038560000000018570
09359109359999999999000000000058671
Run Code Online (Sandbox Code Playgroud) 嗨,我想写一个节点服务器代码从网址http://freegeoip.net/json/14.12.111.113检索经度和纬度信息,我总是得到这个错误.
Exception: Error: getaddrinfo ENOTFOUND
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)
Run Code Online (Sandbox Code Playgroud)
请有人帮忙吗.
这是我正在使用的代码..
var options = {
host: 'http://freegeoip.net/',
path: 'json/14.12.111.113',
method: 'GET'
};
var req = http.request(options, function(res) {
console.log('STATUS: ' + res.statusCode);
console.log('HEADERS: ' + JSON.stringify(res.headers));
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log('BODY: ' + chunk);
});
});
// write data to request body
req.write('data\n');
req.write('data\n');
req.end();
Run Code Online (Sandbox Code Playgroud) 我正在使用带有derby数据库的JPA.我想从同一个表中检索两个完全不同的屏幕上的两个不同的结果集.
屏幕1使用"ScannerReport"bean显示值.
屏幕2将显示ScannerSummaryReport bean的值.
两个bean都需要来自同一个实体"Scanner"的数据,如下面的代码所示.
如何为两个不同的结果集定义结果集映射到实体,其中包含不同的列
A ---> Query query = em.createNativeQuery(<query for scanner report goes here >,"ScannerReport");
query.getResultList();
Run Code Online (Sandbox Code Playgroud)
现在A将执行并实例化ScannerReport类的对象,并用数据填充它.
B ---> Query query = em.createNativeQuery(<query for scanner summary report goes here>,"ScannerSummaryReport");
query.getResultList();
Run Code Online (Sandbox Code Playgroud)
我想以某种方式让JPA知道当我执行B时,现在它需要实例化一个不同类的对象,让我们说ScannerSummaryReport用不同的QUERY(写入计算平均值和总数)中的数据填充它并返回结果.再次请不要两个查询都来自同一个实体Scanner ..
@SqlResultSetMapping(
name="ScannerReport",
classes={
@ConstructorResult(
targetClass=com.beans.ScannerReport.class,
columns={
@ColumnResult(name="scanYear", type=Integer.class),
@ColumnResult(name="julianDay", type=Integer.class),
@ColumnResult(name="scannerId", type=String.class),
@ColumnResult(name="startTime", type=Long.class),
@ColumnResult(name="endTime", type=Long.class),
@ColumnResult(name="scanTime", type=Long.class),
}
)
}
)
@Entity
public class Scanner {
// Class implementation goes here
}
Run Code Online (Sandbox Code Playgroud) 我创建了一个空的Web解决方案,添加了一个空的Web应用程序,使用NuGet命令下载HotTowel.Angular模板,
Install-Package HotTowel.Angular -pre
Run Code Online (Sandbox Code Playgroud)
执行该项目,一旦我运行我的Web应用程序,它显示启动画面然后,我得到以下错误: -
{{VM.BUSYMESSAGE}}
Run Code Online (Sandbox Code Playgroud)
知道为什么会这样吗?
angularjs ×4
node.js ×2
angular-cli ×1
c# ×1
express ×1
hottowel ×1
http ×1
ionic ×1
javascript ×1
jpa ×1
lodash ×1
momentjs ×1
regex ×1
rxjs ×1
typescript ×1
wampserver ×1
webstorm ×1