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.httpClient.get("/theapi", { responseType: "arraybuffer" }).subscribe(data => { | |
const dec = new TextDecoder("windows-1252"); | |
this.data = dec.decode(data); | |
}); |
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 SkillDisabledEventHandler = { | |
canHandle(handlerInput) { | |
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'AlexaSkillEvent.SkillDisabled'; | |
}, | |
async handle(handlerInput) { | |
// remove database entry | |
}, | |
}; |
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
var r = new sn_ws.RESTMessageV2('outboundRESTName', 'POST'); | |
var json = {}; | |
var fields = new GlideRecordUtil().getFields(current); | |
for (var field in fields) | |
json[fields[field]] = current.getDisplayValue(fields[field]); | |
r.setRequestBody(JSON.stringify(json)); |
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
db.putItem({ | |
Item: { | |
userId: { | |
S: userId | |
}, | |
zone: { | |
S: zone | |
} | |
}, | |
TableName: TABLE |
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 json | |
items = [] | |
item = {} | |
for i in range(5): | |
item['Foo'] = 'Bar ' + str(i) | |
items.append(item) | |
print(json.dumps(items)) |
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
package main | |
import "fmt" | |
type item struct{ Foo string } | |
func main() { | |
items := make([]item, 0) | |
item := item{""} |
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
045e8fc4958b700cdeb1fbdca054b9354962416dca9c82237e61f27b10ed84b7017eddc7e630e02f12bc57fb08bd452e738997f4544e3e87cd16e435ebc3bfbeb6 |