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
| // This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2). | |
| // Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management, | |
| // session persistence, api calls, and more. | |
| const Alexa = require('ask-sdk-core'); | |
| const https = require('http'); | |
| const SKILL_NAME = 'Funny Translations'; | |
| const HELP_MESSAGE = 'You can say translate followed by a sentence to translate, or, you can say exit... What can I help you with?'; | |
| const HELP_REPROMPT = 'What can I help you with?'; | |
| const STOP_MESSAGE = 'Enjoy the day...Goodbye!'; | |
| const PAUSE = '<break time="0.3s" />' |
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
| // This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2). | |
| // Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management, | |
| // session persistence, api calls, and more.var | |
| const Alexa = require('ask-sdk-core'); | |
| const SKILL_NAME = "Number"; | |
| const ANSWER_THIS_MESSAGE = "Answer this : "; | |
| const HELP_MESSAGE = 'What can I help you with?'; | |
| const HELP_REPROMPT = 'What can I help you with?'; | |
| const STOP_MESSAGE = 'Enjoy the day...Goodbye!'; |
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
| /* eslint-disable func-names */ | |
| /* eslint quote-props: ["error", "consistent"]*/ | |
| /** | |
| * This sample demonstrates a simple skill built with the Amazon Alexa Skills | |
| * nodejs skill development kit. | |
| * This sample supports multiple lauguages. (en-US, en-GB, de-DE). | |
| * The Intent Schema, Custom Slots and Sample Utterances for this skill, as well | |
| * as testing instructions are located at https://github.com/alexa/skill-sample-nodejs-fact | |
| **/ |
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
| import UIKit | |
| class CustomHeaderView: UIView { | |
| var label:UILabel! | |
| var currentSection:Int = 0 | |
| init (with section:Int,_ frame: CGRect){ |
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
| import Foundation | |
| import UIKit | |
| let json = """ | |
| [ | |
| { | |
| "title": "Taylor Swift", | |
| "artist": "Taylor Swift", | |
| "url": "https://www.amazon.com/Taylor-Swift/dp/B0014I4KH6", | |
| "image": "https://images-na.ssl-images-amazon.com/images/I/61McsadO1OL.jpg", |
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
| import paho.mqtt.client as mqtt | |
| import lcddriver | |
| import time | |
| lcd = lcddriver.lcd() | |
| MQTT_SERVER = "localhost" | |
| MQTT_PATH = "test_channel" | |
| # The callback for when the client receives a CONNACK response from the server. |
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
| import paho.mqtt.publish as publish | |
| MQTT_SERVER = "localhost" | |
| MQTT_PATH = "test_channel" | |
| publish.single(MQTT_PATH, "This is a response from Raspberry Pi", hostname=MQTT_SERVER) |
####Some Swift tips for reference
- Swift 4 - Variables declared
privateshare the same access control scope between atypeand anyextensionon said type.