What do you want to save?
Add Code snippet
New code examples
-
C# 2021-08-27 14:52:01
c# linq select from object list
// this will return the first correct answer, // or throw an exception if there are no correct answers var correct = answers.First(a => a.Correct); // this will return the first correct answer, // or null if there are no correct answers var correct ... Add solution -
Javascript 2021-08-27 14:29:01
the api key provided is linked to datacenter 'us5\"
request.post({ url: 'https://usXX.api.mailchimp.com/3.0/lists/xxxxxxx/members', headers: { 'Content-Type': 'application/json', 'Authorization': 'Basic xxxxxxxxxxxxxxxxxxxxxxxxx-usXX' }, form: JSON.stringify({ email_address: req.body.em... Add solution -
Shell/Bash 2021-08-27 14:23:02
install jenkins on ubuntu
## Install java sudo apt update && sudo apt install openjdk-8-jdk -y ## Install Jenkins wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > ... Add solution -
Java 2021-08-27 13:55:01
android how to determine if the edit text focus changes
for (EditText view : editList){ view.setOnFocusChangeListener(focusListener); } .... private OnFocusChangeListener focusListener = new OnFocusChangeListener() { public void onFocusChange(View v, boolean hasFocus) { if (hasFocus){ ... Add solution -
Java 2021-08-27 13:45:01
Mergesort parallelization using Spark
import random import time from pyspark import SparkContext def execute_merge_sort(generated_list): start_time = time.time() sorted_list = merge_sort(generated_list) elapsed = time.time() - start_time print('Simple merge sort: %f sec' % el... Add solution -
Shell/Bash 2021-08-27 13:23:01
install helm ubuntu
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add - sudo apt-get install apt-transport-https --yes echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list sudo apt-get u... Add solution