View problems-zigzag-conversion.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convert(s: string, numRows: number): string { | |
const chars = Array.from(s); | |
const rows: string[][] = []; | |
const I = 2; | |
chars.forEach((char, index) => { | |
const factor = (numRows * 2 - I) || 1; | |
const cycle = Math.floor(index / factor); | |
const phase = index - factor * cycle; | |
const isDiagonal = phase > (numRows - 1); |
View Seamless Iframe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Coverage |
View raffa-bluet.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mtTheme> | |
<id>raffa-bluet</id> | |
<editorColorsScheme>Raffa bluet</editorColorsScheme> | |
<dark>true</dark> | |
<name>Raffa bluet</name> | |
<colors> | |
<color id="background" value="13232aff"/> | |
<color id="foreground" value="b0bec5ff"/> | |
<color id="text" value="607d8bff"/> | |
<color id="highlight" value="425b67ff"/> |
View MultipleCheckboxGroupsFilter.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react' | |
import * as Flex from '@twilio/flex-ui' | |
const Title = Flex.styled('h2')` | |
color: ${p => p.theme.calculated.textColor}; | |
padding: ${p => p.first ? '0' : '12px'} 16px 8px; | |
font-weight: bold; | |
` | |
const MultipleCheckboxGroups = ({ handleChange, currentValue, fieldName, options }) => { |
View angular4.domElementRef.3.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import ElementRef and ViewChild | |
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; | |
@Component({ | |
selector: 'app-my-component', | |
templateUrl: './my-component.component.html', | |
styleUrls: ['./my-component.component.css'] | |
}) | |
export class MyComponentComponent implements OnInit { | |
// Get the DOM element using the ref name from the template and define |
View angular4.domElementRef.2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'app-my-component', | |
templateUrl: './my-component.component.html', | |
styleUrls: ['./my-component.component.css'] | |
}) | |
export class MyComponentComponent implements OnInit { | |
constructor() { } |
View angular4.domElementRef.1.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<input | |
name="myInput" | |
id="myInput" | |
#myInput> | |
<button | |
type="button" | |
(onClick)="doSomething(myInput)"> | |
Label | |
</button> |
View angular4.eventEmitter.2.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<app-my-component | |
(myEvent)="myParentMethod($event)"> | |
</app-my-component> | |
</div> |
View angular4.eventEmitter.1.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import EventEmitter and Output | |
import {Component, EventEmitter, Output} from '@angular/core'; | |
@Component({ | |
selector: 'app-my-component', | |
templateUrl: './my-component.component.html', | |
}) | |
export class MyComponent { | |
// Define the new output as an EventEmitter. | |
// We are also defining some data to be pass to the event listeners (someData) |
NewerOlder