xxxxxxxxxx
// Enjoy TypeScript :)
var helloWorld: string = "Hello, world!";
var cardType: number[] = [];
function createData(): number[]{
let arr : number[];
let dem = 0;
let a = 0;
while(dem < 52){
arr.push(dem, a);
this.cardType.push(arr);
a++;
if(a == 3)
{
arr = [];
a = 0;
dem++;
}
}
return this.cardType;
}
this.cardType = this.createData();
console.log(this.cardType);
xxxxxxxxxx
Write in TypeScript, compile for both JVM and browser, try https://1c.wizawu.com
xxxxxxxxxx
public getValue(): string {
return this.inputNode.value;
}
public get inputNode(): HTMLSelectElement {
return this.node.getElementsByTagName("select")[1];
}
}
xxxxxxxxxx
$('.progress').each(function (_, progress) {
var steps = $('> div.right > div', progress);
steps.each(function (i, el) { return $(el).mouseenter(function (e) { return onHover(el); }); });
var onHover = function (el) {
steps.removeClass(['current', 'prev']);
el.classList.add('current');
$(el).prevAll().slice(1).addClass('prev');
};
});
xxxxxxxxxx
first.put("first.name", "Alan");
first.put("last.name", "Jones");
first.put("owner", true);
first.put("years.old", 30);
**JSONArray cars = new JSONArray();**
cars.add(0, "VW");
cars.add(1, "GM");
cars.add(2, "Lexus");
cars.add(3, true);
cars.add(4, 42);
cars.add(5, 2.71);
first.put("cars", cars);
finalJson.add(first);
xxxxxxxxxx
class Transaction {
public id: string;
public txIns: TxIn[];
public txOuts: TxOut[];
}
xxxxxxxxxx
// Enjoy TypeScript :)
var helloWorld: string = "Hello, world!";
var cardType: number[] = [];
function createData(): number[]{
let arr : number[];
let dem = 0;
let a = 0;
while(dem < 52){
arr.push(dem, a);
this.cardType.push(arr);
a++;
if(a == 3)
{
arr = [];
a = 0;
dem++;
}
}
return this.cardType;
}
this.cardType = this.createData();
console.log(this.cardType);
xxxxxxxxxx
After(async function(scenario) {
if (scenario.result.status === Status.FAILED) {
// screenShot is a base-64 encoded PNG
const screenShot = await browser.takeScreenshot();
xxxxxxxxxx
After(async function(scenario) {
if (scenario.result.status === Status.FAILED) {
// screenShot is a base-64 encoded PNG
const screenShot = await browser.takeScreenshot();
}
}