Skip to content

Instantly share code, notes, and snippets.

View cachrisman's full-sized avatar

Charlie Chrisman cachrisman

View GitHub Profile
<?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.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Play>https://s3.amazonaws.com/plivocloud/Trumpet.mp3</Play>
</Response>
@cachrisman
cachrisman / WDI Week 2 problems.js
Created May 9, 2015 01:38
WDI Week 2 problems - Charlie's solutions
// 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
function isPrime(num) {
for ( var i = 2; i < num; i++ ) {
if ( num % i === 0 ) {
return false;
}
}
return true;
}
y = 2