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
def create | |
@trail = Trail.new(trail_params) | |
@trail.user_id = current_user.id | |
if @trail.save | |
redirect_to trails_path, notice: "Trail #{@trail.name} was created" | |
else | |
render 'new' | |
end | |
end |
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
// Manifest.xml | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
// MainActivity.java | |
import android.location.LocationManager; |
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
[ | |
{ | |
"action": "talk", | |
"voiceName": "Russell", | |
"text": "Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is Russell. You are listening to a text-to-speech Call made with Nexmo's Voice API. Hi, this is |
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
conversation.sendText("Hello World!") | |
.then(() => console.log('text sent')) |
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
conversation.on("member:media", (member, event) => { | |
console.log(`*** Member changed media state`, member, event) | |
}) |
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
gem install sinatra | |
gem install sinatra-contrib |
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
gem install nexmo |
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
[ | |
{ | |
"action": "talk", | |
"text": "Thank you for calling Chris" | |
}, | |
{ | |
"action": "connect", | |
"from": "19177176397", | |
"endpoint": [ | |
{ |
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
[ | |
{ | |
"action": "talk", | |
"voiceName": "Russell", | |
"text": "You have done that you should be sorry for. There is no terror, Cassius, in your threats, For I am arm'd so strong in honesty That they pass by me as the idle wind, Which I respect not. I did send to you For certain sums of gold, which you denied me: For I can raise no money by vile means: By heaven, I had rather coin my heart, And drop my blood for drachmas, than to wring From the hard hands of peasants their vile trash By any indirection: I did send To you for gold to pay my legions, Which you denied me: was that done like Cassius? Should I have answer'd Caius Cassius so? When Marcus Brutus grows so covetous, To lock such rascal counters from his friends, Be ready, gods, with all your thunderbolts; Dash him to pieces!" | |
} | |
] |
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
fun main(args: Array<String>) { | |
println(isHappy(1111111)) | |
} | |
fun isHappy(n: Int): Boolean { | |
val mathed = doTheMath(n) | |
println(mathed) | |
return mathed == 1 | |
} |
OlderNewer