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
/*Exports | |
This next variation allows us to declare globals without consuming them and could similarly support the concept of global imports seen in the last example.*/ | |
// Global module | |
var myModule = (function () { | |
// Module object | |
var module = {}, | |
privateVariable = "Hello World"; | |
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 tag = document.createElement('script'); | |
tag.src = "https://www.youtube.com/iframe_api"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); |
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
<li data-start="6"> Don't sing love songs, you'll wake my mother</li> | |
<li data-start="14">She's sleeping here right by my side</li> | |
<li data-start="24">And in her right hand a silver dagger,</li> | |
<li data-start="32">She says that I can't be your bride.</li> | |
<li data-start="43">All men are false, says my mother,</li> | |
<li data-start="53">They'll tell you wicked, lovin' lies.</li> | |
<li data-start="61">The very next evening, they'll court another,</li> | |
<li data-start="71">Leave you alone to pine and sigh.</li> |
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
<li data-start="6"> Don't sing love songs, you'll wake my mother</li> | |
<li data-start="14">She's sleeping here right by my side</li> | |
<li data-start="24">And in her right hand a silver dagger,</li> | |
<li data-start="32">She says that I can't be your bride.</li> | |
<li data-start="43">All men are false, says my mother,</li> | |
<li data-start="53">They'll tell you wicked, lovin' lies.</li> | |
<li data-start="61">The very next evening, they'll court another,</li> | |
<li data-start="71">Leave you alone to pine and sigh.</li> |
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 Player = { | |
config : { | |
'container' : $('text'), | |
'addButton' : { | |
src : '/static/images/loading.gif', | |
class : 'add-button' | |
}, | |
'removeButton' : { | |
src : '/static/images/remove.png', |
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 Player = { | |
config : { | |
'container' : $('text'), | |
'addButton' : { | |
src : '/static/images/loading.gif', | |
class : 'add-button' | |
}, | |
'removeButton' : { | |
src : '/static/images/remove.png', |
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
<div id="text"><div><span id="sent0" class="active_sentence"><span id="0"><span class="bundle_word"><span>Once upon a sunny morning,</span></span><span> </span></span><span id="5"><span class="bundle_word"><span>a</span></span><span> </span></span><span id="6"><span class="bundle_word"><span>man</span></span><span> </span></span><span id="7"><span class="bundle_word"><span>who</span></span><span> </span></span><span id="8"><span class="bundle_word"><span>sat</span></span><span> </span></span><span id="9"><span class="bundle_word"><span>in</span></span><span> </span></span><span id="10"><span class="bundle_word"><span>a</span></span><span> </span></span><span id="11"><span class="bundle_word"><span>breakfast</span></span><span> </span></span><span id="12"><span class="bundle_word"><span>nook</span></span><span> </span></span><span id="13"><span class="bundle_word"><span>looked up</span></span><span> </span></span><span id="15"><span class="bundle_word"><span>from</span></span><span> </span></span><span id="16" |
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
$.getJSON( | |
Player.config.textSrc, | |
{ | |
'textId' : textId, | |
'firstSentence' : firstSentence, | |
'lastSentence' : lastSentence | |
}, | |
callback | |
); | |
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
" Tab setting | |
set ts=4 | |
set expandtab | |
set sts=4 | |
set sw=4 | |
" Setting auto indent | |
set ai | |
nmap <leader>l :set list!<CR> |
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
NSString *plistCatPath = [[NSBundle mainBundle] pathForResource:@"quotes" ofType:@"plist"]; | |
self.movieQuotes= [NSMutableArray arrayWithContentsOfFile:plistCatPath]; |