我已经看过相同的东西发布了很多次,但每当我尝试将我的项目导入我的新工作笔记本电脑时,我一直收到这个错误.
我从git(他的btw在我的旧笔记本电脑上正常运行)中取出了该项目.
然后我去了sdk经理,下载了所有工具,并且所有SDK都可用.在欢迎屏幕中,我进入了Configure - > project Defaults - > Project structure.Android SDK选项卡说没有local.properties的项目的路径是/ Applications/Android Studio.app/sdk这是正确的.在SDKs下,我可以看到所有可用的SDK.Project SDK设置为API 18
然而,在尝试构建我的项目时,我仍然遇到此错误.谁能告诉我在哪里我还没看过?
我在尝试构建时运行gradle 1.7,这是从services.gradle.org下载的
我正在编写测试来验证我可以在我们的API上发布通用表单.
我还添加了一些调试,但我注意到实际表单发布的数据; (邮差/ AngularJS或w/e)不同于做mockMVC测试,如:
MvcResult response = mockMvc
.perform(post("/some/super/secret/url") //
.param("someparam1", "somevalue") //
.param("someparam2", "somevalue") //
.contentType(MediaType.APPLICATION_FORM_URLENCODED) //
.accept(MediaType.APPLICATION_JSON)) //
.andExpect(status().isOk()) //
.andReturn();
Run Code Online (Sandbox Code Playgroud)
配置与生产中运行的配置完全相同,等等.但是当我的拦截器记录内容时,在实际测试(而不是mockMVC)中,内容的格式为"someparam1 = somevalue&etc = encore"
当我打印mockMVC内容时,我实际上似乎没有内容,但请求中有Params,我认为它们像GET参数一样被添加.
有谁知道如何正确测试这个?我遇到了这个问题,因为看起来我们的表单帖子似乎没有被Spring解析,即使我们已经将FormHttpMessageConverter添加到servlet上下文中.
我将如何引用在ngFor循环中创建的dom中的Element.
例如,我有一个迭代的元素列表:
var cookies: Cookie[] = [...];
<div *ngFor="#cookie of cookies" id="cookie-tab-button-{{cookie.id}}" (click)="showcookie(cookie);">Cookie tab</div>
<div *ngFor="#cookie of cookies" id="cookie-tab-content-{{cookie.id}}" ">Cookie Details</div>
Run Code Online (Sandbox Code Playgroud)
我如何引用这些div,所以我可以添加一个像"is-active"这样的css类.或者我的方法是错的.
我知道如何使用不同的名称来修复我的组件,以获取此组件的输出值.
让我分享我的代码
从'@ angular/core'导入{Component,Input,Output,EventEmitter}; 从"../pipes/translation.pipe"导入{TranslationPipe};
@Component({
selector: 'msisdn-confirm',
template: `
<div class="msisdn-confirm">
<div>
<input type="text" [(ngModel)]="m1">
</div>
<div>
<input type="text" [(ngModel)]="m2">
</div>
<p class="error">{{message}}</p>
</div>
`
})
export class MsisdnConfirm {
message:string;
@Output('mobile') emitter: EventEmitter<string> = new EventEmitter<string>();
@Input('mobile') set setMobileValue(value) {
this.msisdn_confirm = this.msisdn = value;
}
set m1(value) {
this.msisdn = value;
if (this.valid()) {
console.log('emit' + this.msisdn);
this.emitter.emit(this.msisdn);
}
}
set m2(value) {
this.msisdn_confirm = value;
if (this.valid()) {
console.log('emit' + this.msisdn);
this.emitter.emit(this.msisdn);
}
}
get m1():string …Run Code Online (Sandbox Code Playgroud) 我一直在寻找一种方法来以编程方式更改android中溢出菜单图标的颜色.
我找到的唯一选择是通过添加自定义样式永久更改图标.问题是,在不久的将来,我们需要在使用我们的应用程序时更改此设置.
我们的应用程序是一系列在线平台的扩展,因此用户可以进入其平台的web-url.它们有自己的样式,并将通过API调用来获取应用程序.
这些可能会让我改变图标的颜色......
目前我更改了Actionbar中的其他图标,如下所示:
if (ib != null){
Drawable resIcon = getResources().getDrawable(R.drawable.navigation_refresh);
resIcon.mutate().setColorFilter(StyleClass.getColor("color_navigation_icon_overlay"), PorterDuff.Mode.SRC_ATOP);
ib.setIcon(resIcon);
}
Run Code Online (Sandbox Code Playgroud)
现在我将不得不使用这些风格.
我正在开发angular 5应用程序,我需要在模板中的样式标记中应用动态css.我尝试了一些解决方案,但它们没有用.
app.component.ts
customCss : any;
constructor(){}
ngOnInit(){
this.customCss['color'] = "red";
}
Run Code Online (Sandbox Code Playgroud)
app.component.html
<div>
<span class="custom_css">This is angular 5 application</span>
</div>
<style>
.custom_css{
color: {{customCss.color}};
}
</style>
Run Code Online (Sandbox Code Playgroud)
当我在浏览器中检查custom_css类时,它显示的样式
.custom_css{
color: {{customCss.color}};
}
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏.
你好角的朋友,
我正在开发一个angular2应用程序(实际上是多个).我住在荷兰.
目前我正在使用以下内容格式化我的货币:
{{someIntegerWithCentsToBeDivided/100 | 货币: '欧元':真: '1.0-2'}}
这显示500欧元5和501的标志为欧洲标志5.01.
现在我们的dutchies真的像逗号一样,所以有人知道如何改变.到了,?
如果有人知道如何显示5,奖励积分, - 可选地,当没有美分时.我现在的想法是扩展CurrencyPipe
为什么在许多例子中有省略号,或Angular2 Import前面的三个点.
它似乎没有必要,我可以删除它们,我的应用程序仍然可以工作.我在angular2示例和我正在使用的种子中看到了这个"模式".
然而,我想知道为什么这样做,我不确定我是否在寻找错误的短语,因为我之前已经多次试过这个.
providers: [...FORM_PROVIDERS],
directives: [ ...ROUTER_DIRECTIVES]
Run Code Online (Sandbox Code Playgroud)
好像是一样的
providers: [FORM_PROVIDERS],
directives: [ROUTER_DIRECTIVES]
Run Code Online (Sandbox Code Playgroud)
是否只是为了澄清这些是多个提供者/组件?
如何从PHP/MySQL中的多个内容表中获取最流行的单词.
例如,我有一个论坛帖子的论坛_post; 这包含主题和内容.除了这些,我还有多个具有不同字段的其他表,这些表还可以包含要分析的内容.
我可能会自己去获取所有内容,条带(可能)html在空格上爆炸字符串.删除引号和逗号等,只需在运行所有单词时通过保存数组来计算不常见的单词.
我的主要问题是,如果有人知道一种可能更容易或更快的方法.
我似乎无法找到任何有用的答案,这可能是错误的搜索模式.
我目前正在写一个离子2(Angular 2)的简单形式.我想知道如何在验证中添加一个简单的正则表达式模式:
我基本上有这个:
<form>
<ion-input stacked-label>
<ion-label>{{label.msisdn}}</ion-label>
<input type="text"
[(ngModel)]="msisdn"
ngControl="msisdnForm"
required
maxlength="10"
minlength="10"
pattern="06([0-9]{8})"
#msisdnForm="ngForm"
>
</ion-input>
<button [disabled]="!msisdnForm.valid" block (click)="requestActivationCode()">
{{label.requestActivationCode}}
</button>
</form>
Run Code Online (Sandbox Code Playgroud)
拾取最大长度,最小长度和所需数量(如果不满足条件,则禁用该按钮).现在我想将输入限制为数字,并以06为前缀(荷兰电话号码,最小数量).
但是,在验证中未获取该模式.我可以这样做,还是需要代码方法?
angular ×6
android ×2
angular5 ×1
css ×1
currency ×1
data-binding ×1
form-data ×1
format ×1
gradle ×1
html ×1
html5 ×1
ionic2 ×1
javascript ×1
mysql ×1
php ×1
regex ×1
spring ×1
syntax ×1
typescript ×1
validation ×1