This file contains hidden or 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 React, { Component } from 'react' | |
import { StyleSheet, View, Animated } from 'react-native' | |
import { theme } from '../constants'; | |
export default class Block extends Component { | |
handleMargins() { | |
const { margin } = this.props; | |
if (typeof margin === 'number') { | |
return { |
This file contains hidden or 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
// console.log("Hello, World!"); | |
var calPoints = function(ops) { | |
result = null; | |
output = []; | |
checks = true; | |
// check constraints | |
// check if operations length constraints is met | |
if(!(ops.length >= 1 || ops.length <= 1000)) |
This file contains hidden or 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
// console.log("Hello, World!"); | |
var countElements = function(arr) { | |
var result = 0; | |
// output = 0; | |
// count elements | |
for (var i = 0; i < arr.length; i++) { | |
if(arr.includes(arr[i] + 1)) { | |
result+= 1 | |
} |
This file contains hidden or 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 extraLongFactorials(n) { | |
// check constraints | |
if(!(n >= 1 && n <= 100 )) return 0; | |
let fact = 1; | |
for (let i = 2; i <= n; i++){ | |
if(Number.isSafeInteger(fact*i)){ |
This file contains hidden or 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
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --> | |
<!-- * * * * * * * * * * * The content below * * * * * * * * * * * --> | |
<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * --> | |
<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * * --> | |
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --> | |
<!-- * * * * * * * * * Delete the template below * * * * * * * * * * --> | |
<!-- * * * * * * * to get started with your project! * * * * * * * * --> | |
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --> | |
<style> |
This file contains hidden or 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
// parent div | |
var checkboxDiv = document.querySelector('#must-haves'); | |
if(checkboxDiv.childElementCount > 0) { | |
let checkboxDivContents = checkboxDiv.innerHTML; | |
let str = checkboxDivContents + '<table><tbody><tr><td><ion-checkbox class="checkbox" checked="true" style="width: 50vw;--border-radius: .35rem;--background: #EEF0F2;--border-color: #EEF0F2;" color="dark"></ion-checkbox></td><td style="position: relative;top: -.19rem;"><span style="margin-left: calc(-50vw + 2.15rem)">'+ instructionData.instruction + '</span></td></tr></tbody></table>'; | |
checkboxDiv.innerHTML = str; | |
} else { | |
checkboxDiv.innerHTML = this.addCheckbox(instructionData.instruction); |
This file contains hidden or 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 { Directive, ElementRef, Output, EventEmitter, OnInit } from "@angular/core"; | |
@Directive({ | |
selector: "[nativeAutofill]", | |
}) | |
export class NativeAutofillDetector implements OnInit { | |
private elRef: HTMLInputElement; | |
@Output() | |
public nativeAutofill: EventEmitter<boolean> = new EventEmitter<boolean>(); |