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 App = Em.Application.create(); | |
App.MyView = Em.View.extend({ | |
mouseDown: function() { | |
window.alert("hello world!"); | |
} | |
}); |
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
// Now trying out the Barack Obama Example from emberjs.com | |
var MyApp = Ember.Application.create(); | |
MyApp.president = Ember.Object.create({ | |
firstName: "Barack", | |
lastName: "Obama", | |
fullName: function() { | |
return this.get('firstName') + ' ' + this.get('lastName'); |
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
// Namespace | |
Twitter = Em.Application.create({ | |
ready: function() { | |
// Polling | |
setInterval(function() { | |
Twitter.searchResults.refresh(); | |
}, 20000); | |
Twitter.searchResults.set("query", "Top Charts"); | |
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
App.Tax = Ember.Object.extend({}); | |
App.taxesController = Ember.ArrayController.create({ | |
content: [ | |
{name:"tax1",rate:"10",number_id:"TaxIDNum"}, | |
{name:"tax2",rate:"9",number_id:null} | |
], | |
newTax: function() { | |
this.pushObject(App.Tax.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 casper = require('casper').create({ | |
verbose: true, | |
logLevel: "debug", | |
clientScripts: ['includes/jquery-1.7.2.min.js','includes/moment.min.js'] | |
}); | |
var indices = [ | |
"S&P CNX NIFTY", | |
"S&P CNX 500", | |
"CNX 100", |
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
{{ streams:form stream="customer_interests" mode="new" return={ pages:url id="9" } }} | |
{{ form_open}} | |
<table> | |
{{ fields }} | |
<tr class="{{ odd_even }}"> | |
<td width="50%">{{ input_title }}{{ required }} <br/><small>{{ instructions }}</small></td> |
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
sudo chmod -R 777 system/cms/cache | |
sudo chmod -R 777 system/cms/config | |
sudo chmod -R 777 addons | |
sudo chmod -R 777 system/cms/cache | |
sudo chmod -R 777 uploads | |
sudo chmod -R 666 system/cms/config/config.php |
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
sudo chmod -R 777 system/cms/cache | |
sudo chmod -R 777 system/cms/config | |
sudo chmod -R 777 addons | |
sudo chmod -R 777 assets/cache | |
sudo chmod -R 777 uploads | |
sudo chmod -R 666 system/cms/config/config.php |
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
<p> | |
{{ streams:single stream="blog" entry_id= post:id }} | |
{{ featured_image:img }} | |
{{ /streams:single }} | |
</p> |
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
# Simple ggplot2 heatmap | |
# with colorBrewer "spectral" palette | |
doInstall <- FALSE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("ggplot2", "reshape2", "RColorBrewer") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Generate a random matrix | |
# This can be any type of numeric matrix, |
OlderNewer