What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-19 02:55:50
Check first character of string in array and compare to another array
a = ['ghis', 'rs', 'ea','eat' ,'nentence'] let word = '' function check(arr){ let color = ['green'] for(let i = 0; i < arr.length;i++){ word += arr[i][0] } for(let j = 0;j < color.length;j++){ if(word == color[j]){ return tru... Add solution -
Ruby 2022-03-18 08:10:03
ruby get the number of same element in array
names = ["Jason", "Jason", "Teresa", "Judah", "Michelle", "Judah", "Judah", "Allison"] counts = Hash.new(0) names.each { |name| counts[name] += 1 } # => {"Jason" ... Add solution -
Java 2022-03-17 15:10:39
usaco why did the cow cross the road iii silver java
//sample input 3 3 3 2 2 2 3 3 3 3 2 3 3 2 3 3 3 2 2 2 3 //CODE (2021/1/18) YY/MM/DD import java.util.*; import java.io.*; public class Main { static field[][] farm; public static void main(String[] args) throws Exception { Scanner sc = new S... Add solution -
C# 2022-03-17 02:15:15
how to use file watcher in c#
private void watch() { FileSystemWatcher watcher = new FileSystemWatcher(); watcher.Path = path; watcher.NotifyFilter = NotifyFilters.LastWrite; watcher.Filter = "*.*"; watcher.Changed += new FileSystemEventHandler(OnChanged); watche... Add solution -
Other 2022-03-17 00:45:13
how to make an object move towards another in unity
/// <summary> /// Move 2D sprite towards target /// </summary> /// <param name="target"></param> /// <param name="movementSpeed"></param> private void Move(Vector3 target, float movementSpeed) { ... Add solution -
TypeScript 2022-03-16 23:35:15
transform snake case in camel case typescript
const toCamelCase = (str: string): string =>{ let charsLowerCase = str.toLowerCase().split(''); let camelCaseKey = ''; for (let pos = 0; pos < charsLowerCase.length; pos++) { if (charsLowerCase[pos] === '_') { ... Add solution -
Python 2022-03-16 21:15:19
python lunarcrush script
import urllib.requestimport sslimport jsonimport timeimport tweepyssl._create_default_https_context = ssl._create_unverified_contextapi_key = "API_KEY_HERE"# Allows adding as many coins as desiredcoin_list = [ "LTC", "ETH&qu... Add solution