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 ResponseObject = ViewConfigurator(Router.getConfig(req.getPath())) // home.index | |
// Normal HTTP request | |
if(isNormal()){ | |
var layout = getLayoutHandlebarTemplate(ResponseObject.layout) | |
var output = Handlebars.compile(layout,{ | |
"title":ResponseObject["title"].render() | |
//and so on. In reality we simly iterate over ResponseObject to render each component. |
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 Home = App.Controller({ | |
"layout":"home", | |
"theme":"ocean" | |
}); | |
Home.index = { | |
"title":App.Components.TitleBar, | |
"footer": App.Components.Footer | |
"welcome": App.Components.Welcome | |
} |
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 com.infoaxe.logprocessor; | |
import java.awt.List; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import com.amazonaws.util.json.JSONException; |
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 adapter = { | |
flush : function(data, meta) { | |
}, | |
done : function(data1, meta) { | |
counter++; | |
queue.push(data1); | |
Y.mojito.util.metaMerge(parentMeta, meta); | |
//For Binders to work! |
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
/*jslint anon:true, sloppy:true, nomen:true*/ | |
YUI.add('home', function(Y, NAME) { | |
/** | |
* The home module. | |
* | |
* @module home | |
*/ | |
/** |
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
YUI.add('mojito-session-addon', function(Y, NAME) { | |
function MojitoSession(command, adapter, ac) { | |
// The "command" is the Mojito internal details | |
// for the dispatch of the mojit instance. | |
// The "adapter" is the output adapter, containing | |
// the "done()", "error()", etc, methods. | |
// The "ac" is the ActionContext object to which | |
// this addon is about to be attached. | |
var sessionCookie = ac.cookie.get("sid"); | |
if(!sessionCookie){ |
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
/https?:\/\/(?:[a-zA_Z]{2,3}.)?(?:youtube\.com\/watch\?)((?:[\w\d\-\_\=]+&(?:amp;)?)*v(?:<[A-Z]+>)?=([0-9a-zA-Z\-\_]+))/i |
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
/** | |
* Validations Facade. All the validation rules go here. | |
*/ | |
Y.ValidationFacade = Y.Base.create("ValidationFacade", Y.Base, [], { | |
validations: { | |
trim: function(key, val, attrs) { | |
if (!val) { | |
val = ""; | |
} |
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
('Andhra Pradesh','Andhra Pradesh'), | |
('Arunachal Pradesh','Arunachal Pradesh'), | |
('Assam','Assam'), | |
('Bihar','Bihar'), | |
('Chhattisgarh','Chhattisgarh'), | |
('Delhi','Delhi'), | |
('Goa','Goa'), | |
('Gujarat','Gujarat'), | |
('Haryana','Haryana'), | |
('Himachal Pradesh','Himachal Pradesh'), |
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 GenericModel = Y.Base.create('GenericModel', Y.Model, [], { | |
sync: genericModelSync | |
,idAttribute:'_id' | |
}); |
NewerOlder