What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-02 19:35:22
how to make a deck of cards in javascript
class Deck{ constructor(){ this.deck = []; this.reset(); this.shuffle(); } reset(){ this.deck = []; const suits = ['Hearts', 'Spades', 'Clubs', 'Diamonds']; const values = ['Ace', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'Jack', 'Queen'... Add solution -
Javascript 2022-03-01 06:25:09
getting view height dynamically in react native
import React, { Component } from 'react'; import ReactNative, { AppRegistry, View, TouchableOpacity, findNodeHandle, Text, StyleSheet } from 'react-native'; export default class App extends Component { constructor() { super(); this.state = {... Add solution -
TypeScript 2022-02-22 21:20:03
mat input datetime-local now
@Component({ selector: 'app', template: `<input type="datetime-local" [value]="date" (change)="date=$event.target.value" /> {{date}}` }) export class AppComponent { date: string; constructor(... Add solution -
TypeScript 2022-02-19 10:40:07
create class angular
// to create a model class, we first need to create a new file //f.e person.ts export class Person { constructor( public name: string, public lastName: string, public age:number ) {} } //now that we have the model class we can create array... Add solution -
TypeScript 2022-02-17 02:45:01
typescript ge t current screen resolution
import { Component, OnInit, OnDestroy, Input } from "@angular/core"; // Import this, and write at the top of your .ts file import { HostListener } from "@angular/core"; @Component({ selector: "app-login", templateUrl: '.... Add solution -
Javascript 2022-02-16 23:25:09
react current date and time command
import React, { Component } from 'react';import { render } from 'react-dom'; class App extends Component { constructor() { this.state = { currentDateTime: Date().toLocaleString() } } render() { return ( <div> <p&g... Add solution -
Html 2022-02-16 02:45:02
ng bootstrap input
<!-- Html --> <label for="title">Title:</label> <input id="title" type="text" class="form-control" [(ngModel)]="title" /> <!-- Typescript --> voteItem: string; constructor... Add solution -
Other 2022-02-09 14:10:04
reload ionic page
<!-- Custom Refresher Properties --> <ion-content> <ion-refresher slot="fixed" pullFactor="0.5" pullMin="100" pullMax="200"> <ion-refresher-content></ion-refresher-content> <... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5