This file contains hidden or 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
06-12 15:15:53.194 1909-1910/? E/ANDR-PERF-OPTSHANDLER: Warning: Resource [2, 0] not supported for core 1. Instead use resource for core 0 | |
06-12 15:15:53.197 1909-1910/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 2, 0] | |
06-12 15:15:53.353 660-15495/? E/audio_hw_primary: start_input_stream: pcm_prepare returned -1 | |
06-12 15:15:53.369 660-15495/? W/audio_hw_primary: start_input_stream: exit: status(-1) | |
06-12 15:15:53.392 1909-1910/? E/ANDR-PERF-OPTSHANDLER: Warning: Resource [2, 0] not supported for core 1. Instead use resource for core 0 | |
06-12 15:15:53.393 1909-1910/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 2, 0] | |
06-12 15:15:53.553 660-15495/? E/audio_hw_primary: start_input_stream: pcm_prepare returned -1 | |
06-12 15:15:53.569 660-15495/? W/audio_hw_primary: start_input_stream: exit: status(-1) | |
06-12 15:15:53.593 1909-1910/? E/ANDR-PERF-OPTSHANDLER: Warning: Resource [2, 0] not supported for core 1. Instead use resource for core 0 | |
06-12 15:15:53.593 1909-1910/? E/ANDR-PERF-RESOURCEQS |
This file contains hidden or 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 _FACT(num) { | |
var rval = 1; | |
for (var i = 2; i <= num; i++) { | |
rval = rval * i; | |
} | |
return rval; | |
}; | |
function _COMBIN(x, y) { | |
if (x < y) return 0; |
This file contains hidden or 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
const defaultIntents = [ | |
{ | |
intentName: 'AMAZON.HelpIntent', | |
handler: yourFunctionPointer | |
}, | |
// ... more Intents that are the same for each state. | |
] | |
const firstStateIntents = [ | |
{ |
This file contains hidden or 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
override func sizeThatFits(_ size: CGSize) -> CGSize { | |
return layout?.startMeasure(with: size) ?? .zero | |
} | |
override func layoutSubviews() { | |
layout?.startLayout(with: bounds) | |
} |
This file contains hidden or 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
let actionBar = [ | |
actionLabel, | |
optionsLabel.layoutGravitating(to: .right)] | |
.layoutAsFrame() | |
.layoutMatchingParentWidth() | |
let posterDetails = [ | |
posterNameLabel, | |
posterHeadlineLabel, | |
posterTimeLabel] |
This file contains hidden or 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
let actionBar = [ | |
actionLabel, | |
optionsLabel.layoutGravitating(to: .right)] | |
.layoutAsFrame() | |
.layoutMatchingParentWidth() |
This file contains hidden or 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
let aLayout = optionsLabel.layoutGravitating(to: .right) |
This file contains hidden or 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
switch (app.getSelectedOption()) { | |
case 'KEY_A': | |
return app.tell('Option A is a solid choice.') | |
default: | |
return app.tell('I would prefer Option A.') | |
} |
This file contains hidden or 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 buildOptionItem(app: DialogflowApp, aString: string): Responses.OptionItem { | |
// Provide a key which is unique to each option. | |
// And synonyms that the user can say alternativly to the title | |
return app.buildOptionItem(`KEY_${aString}`, aString) | |
.setTitle(`Option ${aString}`) | |
// Description and image are optional. | |
.setDescription(`Description for ${aString}`) | |
.setImage('https://example.com/image.jpg', 'An image') | |
} |
This file contains hidden or 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
app.askWithCarousel( | |
// The input prompt. | |
{ | |
speech: 'Here are option A, option B and option C. To which one shpuld I react?', | |
displayText: 'Here are some options. To which option should I react?' | |
}, | |
// The carousel. | |
app.buildCarousel() | |
.addItems(['A', 'B', 'C'] | |
// Creates the option items. |
NewerOlder