What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-12 23:12:03
react-image-lightbox npm
import React, { Component } from 'react';import Lightbox from 'react-image-lightbox';import 'react-image-lightbox/style.css'; // This only needs to be imported once&... Add solution -
Java 2021-09-12 21:06:02
abstraction java
bstraction: Hiding the implementation details, concentrating on essentials things, without worrying about the details ■ In java, abstraction is achieved via abstract class or interface ■ Abstraction cannot exist without inheritance 3.1. Abstract cla... Add solution -
Other 2021-09-12 15:39:02
constructor vs static block
Constructor is used for creating object, initializing instance and Execution depends on the object I use it in pages classes in my framework Static Block: used for initializing statics members, it belongs to the class and only one copy and runs only o... Add solution -
Other 2021-09-12 11:05:01
Expected a state variable declaration. If you intended this as a fallback function or a function to handle plain ether transactions, use the "fallback" keyword or the "receive" keyword instead.
pragma solidity >=0.4.22 <0.6.0; contract OwnedToken { // `TokenCreator` is a contract type that is defined below. // It is fine to reference it as long as it is not used // to create a new contract. TokenCreator creator; addres... Add solution -
Java 2021-09-12 07:15:03
Calculate area of rectangle using default constructor in java
import java.util.*; class RectangleShape { int area, length, breadth; RectangleShape() { length = 50; breadth = 20; } void getArea() { area = length * breadth; System.out.println("Area of Rectangle ... Add solution -
Javascript 2021-09-11 09:26:02
change boolean value on click react
class Q1 extends Component { constructor(props) { super(props); this.state = { page1: false, page2:false, page3:false } this.handleClick1= this.handleClick1.bind(this); this.handleClick2= this.handleClick2.bind(this); this.hand... Add solution -
Javascript 2021-09-10 17:28:04
angular material open last visited tab
constructor(private route: ActivatedRoute, private router: Router) {} selectedTabIndex: number; ngOnInit(): void { this.selectedTabIndex = parseInt(this.route.snapshot.queryParamMap.get('tab'), 10); // TODO: check upper bound. Material will set th... Add solution -
Javascript 2021-09-10 15:18:03
angular 12 service for create update delete local storage items
import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class LocalStorageService { localStorage: Storage; changes$ = new Subject(); constructor() { this.localStorage = window.lo... Add solution
Best helpers
Ranking is empty