A Pen by Charlie Chrisman on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isPrime(num) { | |
for ( var i = 2; i < num; i++ ) { | |
if ( num % i === 0 ) { | |
return false; | |
} | |
} | |
return true; | |
} | |
y = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WDI Week 2 problems | |
// Problem 1: Factorial using recursion | |
function factorial(n) { | |
if (n < 0) return "error"; //can't do factorial with negative numbers | |
else if (n < 2) return 1; //terminal condition | |
else return factorial(n - 1) * n; | |
} | |
console.log("\nfactorial"); | |
console.log(factorial(5)); // => 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Play>https://s3.amazonaws.com/plivocloud/Trumpet.mp3</Play> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Speak language="en-US" voice="MAN"> | |
Congratulations! You have successfully made a call with Salesforce and Plivo. | |
</Speak> | |
<Speak language="fr-FR" voice="WOMAN> | |
Félicitations! Vous avez réussi à faire un appel en utilisant Salesforce et Plivo. | |
</Speak> | |
<Speak language="es-US" voice="MAN"> | |
¡Enhorabuena! Usted ha realizado con éxito una llamada con Salesforce y Plivo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
interval=5 # Sampling time in seconds | |
volumename="/Volumes/My Passport for Mac/" | |
total_size=$(diskutil cs info "$volumename" | grep -E "LV Size" | awk '{print $3}') | |
while [ true ]; do | |
first_size=$(diskutil cs info "$volumename" | grep -E "LV Bytes Converted" | awk '{print $4}') | |
sleep $interval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Response> | |
<Record callbackUrl="http://requestb.in/1b2uby11" callbackMethod="POST" redirect="false" recordSession="true" /> | |
<Speak language="ru-RU" voice="WOMAN"> | |
Здравствуйте, Это сообщение от Charlie. Машина за Nixon, приедет приблизительно в 10. Пожалуйста, будьте готовы к этому времени. Мы Вам позвоним еще раз когда 
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Response> | |
<Record action="http://requestb.in/1ck1j1y1" startOnDialAnswer="true" redirect="false" /> | |
<Dial> | |
<Number>13306807074</Number> | |
</Dial> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Response> | |
<Dial> | |
<User>sip:[email protected]</User> | |
</Dial> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<Response> | |
<GetDigits action='https://api.properati.com/AR/v3/mistery_shopper/extension' method='POST' numDigits='4' playBeep='true' timeout='10'> | |
<Speak language='es-ES'>Bienvenido a P.P.N. S.A. Marque el n&#250;mero de interno</Speak> | |
</GetDigits> | |
<Wait length='5'/> | |
</Response> |
OlderNewer