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
#include "/Users/cipherhack/Documents/Adobe Scripts/json2.js" | |
// Suppress dialogs | |
app.displayDialogs = DialogModes.NO; | |
// Read cast data from json file | |
const jsonFile = File("/Users/cipherhack/Documents/Adobe Scripts/cast.json"); | |
jsonFile.open ('r'); | |
const data = jsonFile.read(); | |
jsonFile.close(); | |
// Close the file as we don't need it anymore | |
var castData= JSON.parse(data); |
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
let emailIds = ['a@gmail.com','b@gmail.com','c@gmail.com'] | |
console.log( emailIds[Symbol.iterator] ); // Property name is a symbol | |
// OUTPUT: function |
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
var getNum = () => 5; | |
// Translates to | |
var getNum = function(){ | |
return 5; | |
} |
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
(function (win, $) { | |
... | |
... | |
var NumberplateFactory = function () { | |
// To manage which number plate needs to be created. | |
this.types = {}; | |
this.create = function(type){ | |
return new this.types[type]().create(); | |
}; |
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
var prefixes = ['hello', 'hi', 'ola'], | |
quotes = [ | |
"Set a goal that makes you want to jump out of bed in the morning", | |
"When you start each day with a grateful heart…", | |
"I opened two gifts this morning. They were my eyes.", | |
"Some days you just have to create your own sunshine" | |
], | |
said = [], | |
print = function(msg){ | |
said.push('<div>' + msg + '</div>'); |
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
# import Flask | |
from flask import Flask | |
# import Ask Class and statement method from flask_ask | |
from flask_ask import Ask, statement | |
# create a flask app | |
app = Flask(__name__) | |
# define alexa endpoint | |
ask = Ask(app, '/alexa_end_point') |
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
options.cardTitle = "Hello World"; | |
options.cardContent = "Hello" + name + " from Helloworld"; |
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
<h1>Results</h1> | |
<searchResults></searchResults> | |
<searchResults></searchResults> | |
<searchResults></searchResults> |
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
myapp.directive("searchResult",function(){ | |
return { | |
restrict: "AECM", | |
temlateUrl: "directives/searchResult.tpl.html", | |
replace: true, | |
scope: { | |
studentName: "@", // Symbol for creating a text hole | |
studentObject: "=", // Symbol for object hole | |
studentFunction: "&", // Symbol for function hole | |
}, |
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
hoisting(); | |
console.log(a); | |
var a = "hello hoisting"; | |
function hoisting() { | |
console.log('hoisted function'); | |
} |