What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-02 08:27:04
Dos hermanos llevan naranjas en la bolsa. Uno le dice al otro "si me das una naranja tendré el doble que tú" y el otro le responde, "si me la das tú tendremos la misma cantidad los dos."
Dos hermanos llevan naranjas en la bolsa. Uno le dice al otro "si me das una naranja tendré el doble que tú" y el otro le responde, "si me la das tú tendremos la misma cantidad los dos." Add solution -
C++ 2021-09-28 18:23:04
how to make rng in c++
#include <stdio.h> #include <stdlib.h> #include <ctime> int main() { srand((unsigned) time(0)); printf("Your dice has been rolled! You got: \n "); int result = 1 + (rand() % 6); printf("%d \n", result);... Add solution -
Java 2021-09-26 10:59:05
how to loop through an array
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
CSS 2021-09-26 02:50:02
candidate elimination algorithm python code
import numpy as np import pandas as pd data = pd.read_csv(path+'/enjoysport.csv') concepts = np.array(data.iloc[:,0:-1]) print("\nInstances are:\n",concepts) target = np.array(data.iloc[:,-1]) print("\nTarget Values are: ",target) d... Add solution -
C++ 2021-09-25 23:31:02
PCL RANSAC
#include <iostream> #include <thread> #include <pcl/console/parse.h> #include <pcl/filters/extract_indices.h> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #include <pcl/sample_consensus/ransac.h> #incl... Add solution -
Javascript 2021-09-25 09:29:03
loop through javascript array
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Kotlin 2021-09-25 03:18:06
get list of current open apps in kotlin
val am = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager val runningAppProcessInfo = am.runningAppProcesses // detect an app for (i in runningAppProcessInfo.indices) { if (runningAppProcessInfo[i].processName == "com.the.app.yo... Add solution -
Python 2021-09-24 18:54:02
access nested set with array params python
def nested_set(dic, keys, value): for key in keys[:-1]: dic = dic.setdefault(key, {}) dic[keys[-1]] = value >>> d = {} >>> nested_set(d, ['person', 'address', 'city'], 'New York') >>> d {'person': {'address'... Add solution
Best helpers
Michaelyus
+5
EBA2018
+5
Eric Lewis
+5
J. Tatum
+5
Erwaman
+5
Jp_
+5
Fauve
+5
Katy Forde
+5
Jcvamp
+5
Chris
+5
Xiaotian Pei
+5