使用最新的 (Okt 2014) Hadoop 启动时,start-dfs.sh我们看到:
连接到主机本地主机端口 22:运行时连接被拒绝
我希望子组件模板加载到父组件模板中.(由于缺乏更好的措辞,我称之为孩子和父母)
这是我的孩子:
import {Component,Directive, ElementRef, Input} from '@angular/core';
import {IONIC_DIRECTIVES} from 'ionic-angular';
@Component({
selector: '[parentselector]',
template: '<div>I AM A CHILD</div>',
directives: [IONIC_DIRECTIVES]
})
export class ChildPage {
constructor() {
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的父母:
@Component({
templateUrl: 'build/pages/parent/parent.html',
directives: [ChildPage]
})
Run Code Online (Sandbox Code Playgroud)
和父母的HTML:
<ion-content>
<ion-slides>
<ion-slide><parentselector>Parent To Be Overriden</parentselector>
</ion-slide>
</ion-slides>
</ion-content>
Run Code Online (Sandbox Code Playgroud)
有什么想法错了吗?
如何index==2在TypeScript中查找?
myObj = {
policy : {
index: 1,
page : "/summer"
},
purchase : {
index: 2,
page : "/sun"
}
}
Run Code Online (Sandbox Code Playgroud)
例如
for (var key in myObj) {
if (myObj.hasOwnProperty(key)) {
if (myObj[key].index === 2)
console.log("Found.");
}
}
Run Code Online (Sandbox Code Playgroud)
如何更有效地在JS或TS中执行此操作?
"Current Peak : 830 300"
Run Code Online (Sandbox Code Playgroud)
我怎样才能掌握这两个数字,但没有空格.(每个子字符串之间有5个或更多空格)
到目前为止,使用apache的StringUtils:
String workUnit =
StringUtils.substringAfter(thaString,
":");
Run Code Online (Sandbox Code Playgroud)
这回馈:
"830 300"
Run Code Online (Sandbox Code Playgroud)
但仍然有很多空间而且没有分开.
我怎样才能将mathjs注入Angular.js?
我不能让它工作 - 我曾经bower install mathjs --save安装它.
更新:JS min文件正确注入index.html
我需要将其注入主模块或控制器吗?我尝试了两个并在页面加载时出现了一个白色屏幕,其中包含有关模块不可用的错误消息.
想象一下这个主机组件代码:
@Component({
directives: [nestedComponentDirective]
})
export class ParentComponent {
save():void {
this.myService.myHTTPCall().subscribe((event) => {
// if callback successfull we need to let directive know
})
}
Run Code Online (Sandbox Code Playgroud)
现在嵌套组件:
@Component({
selector: 'someSelector',
template: `
<div>
<button [stuff]="stuff"</button>
</div>`
})
export class ContinuationCheckDirective {
@Input() waitingForHostedComp(value) {
console.log ("value", value)
}
Run Code Online (Sandbox Code Playgroud)
如何从Host-Component(Parent)调用waitingForHostedComp?
我有一个名为Oracle的Oracle DB myC.在这张表中,我有几行,其中两行被称为myCheight, myCwidth.
我需要读取这些值并比较它们 IF myCheight > myCwidth DO switch the values.
我试图从一行读取值,但没有让它工作.我使用Oracles Oracle SQL Developer.
这是我到目前为止提出的:
set serveroutput on;
DECLARE
cursor h is select * from MyC;
type htype is table of h%rowtype index by number;
stage_tab htype;
master_tab htype;
BEGIN
open h;
loop
fetch h bulk collect into stage_tab limit 500;
for i in 1 .. stage_tab.count loop
master_tab(stage_tab(i).id) := stage_tabe(i);
end loop;
exit when h%notfound;
end loop;
close h;
end;
Run Code Online (Sandbox Code Playgroud) python -c "print float(7/3)"
Run Code Online (Sandbox Code Playgroud)
在我的电脑上打印出2.0.我究竟做错了什么?
这就是我正在使用的:
Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Run Code Online (Sandbox Code Playgroud) Error at /Users/user/project/.tmp/shared/validation/validators/unicode-characters.validator.ts:12:52: Return type of public static method from exported class has or is using private name 'ValidationResult'.
Run Code Online (Sandbox Code Playgroud)
import {FormControl} from "@angular/forms";
interface ValidationResult {
[key:string]:boolean;
}
export class UnicodeCharactersValidator {
/* tslint:disable:max-line-length */
private static UNICODE_CHARS_PATTERN = /^[ \u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0]*$/;
public static check(formControl: FormControl): ValidationResult {
if ( !UnicodeCharactersValidator.UNICODE_CHARS_PATTERN.test(formControl.value) ) {
return { "invalidCharacters": true };
}
return null;
}
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
我有package.json(不是 BASH,不是 SH,不是 ZSHELL,不是鱼)。
因此,在确定这是我的package.json文件这一事实之后,让我向您展示它:
"scripts": {
"dev": "NODE_ENV=myValue myProgram"
}
Run Code Online (Sandbox Code Playgroud)
我想在MYVAR=myOtherValue上面的文件中添加更多变量(例如),这是我的package.json文件。我该怎么做(在我的 package.json 文件中添加更多变量)?
让我明确一点,我不想阅读 bash 或 zshell、fish 或 sh 的联机帮助页。这就是为什么我把问题放在这里但没有阅读联机帮助页 - 否则我不会把它放在这里并且会阅读联机帮助页。谢谢你的理解。
angular ×4
typescript ×3
angularjs ×1
cursor ×1
formatting ×1
hadoop ×1
if-statement ×1
ionic2 ×1
java ×1
javascript ×1
mathjs ×1
node.js ×1
npm ×1
npm-scripts ×1
oracle ×1
plsql ×1
python ×1
regex ×1
sql ×1
string ×1
string-utils ×1
substring ×1
types ×1