What do you want to save?
Add Code snippet
New code examples
-
C 2022-03-27 18:00:02
C example of if else
if (<condition>) { <code> } else if (<condition>) { <code> } else { <code> } /* example */ int money = 50; if (money < 15) { go_home(); } else if (money >= 600) { buy_all(); } else { buy_tickets(money / 15); } /... Add solution -
Javascript 2022-03-27 17:05:05
image popup js close button
$('.menu').mouseover(function(e) { console.log(e); var href = $(this).attr('href'); var popup = $('<div id="myPopup"></div>'); var image = $('<img id="image" src="' + href + '"/>'); popu... Add solution -
Javascript 2022-03-27 16:25:36
Working with BSON in JavaScript
/* This code comes from Vincent Lab And it has a video version linked here: https://www.youtube.com/watch?v=6pBWBNxzCUk */ // Import dependencies const fs = require("fs"); const BSON = require("bson"); // Serialize a document... Add solution -
Other 2022-03-27 09:40:24
idToken
eyJhbGciOiJSUzI1NiIsImtpZCI6IjMyMmE5YmVjOGUwMGFhM2M4MjlkNzk5ZjVjZTlmOGRmNjgxYjQ3M2QifQ.eyJpc3MiOiJodHRwczovL2RleC5mbGV4aWJsZWZseWVyLmV2b2ZvcmdlLm9yZy9kZXgiLCJzdWIiOiIxNzc0IiwiYXVkIjoiZGV4LWs4cy1hdXRoZW50aWNhdG9yIiwiZXhwIjoxNjI4ODYwODc1LCJpYXQiOjE2Mjg4NTcy... Add solution -
Other 2022-03-27 08:00:11
flutter get image file from assets
import 'dart:async'; import 'dart:io'; import 'package:flutter/services.dart' show rootBundle; import 'package:path_provider/path_provider.dart'; Future<File> getImageFileFromAssets(String path) async { final byteData = await rootBundle.load('as... Add solution -
Other 2022-03-27 06:20:45
90-Percentile effective diameter
import snap Graph = snap.GenRndGnm(snap.TNGraph, 100, 1000) NTestNodes = 10 IsDir = False EffDiam = Graph.GetBfsEffDiam(NTestNodes, IsDir) print(EffDiam) UGraph = snap.GenRndGnm(snap.TUNGraph, 100, 1000) NTestNodes = 10 IsDir = False EffDiam = UGraph.Ge... Add solution