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
;ibem.decl({ block: 'w-access-manager', base: 'i-win' }, { | |
constructor: function(cfg) { | |
var store, toolbar, tree, grid; | |
store = ibem('i-store').initMod('permissions').getStore(); | |
toolbar = this.createElem('toolbar'); |
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($) { | |
$(function() { | |
var el = $("#carousel"); | |
var carousel = el.featureCarousel({}); | |
$("#but_prev").click(carousel.prev); | |
$("#but_pause").click(carousel.pause); | |
$("#but_start").click(carousel.start); | |
$("#but_next").click(carousel.next); | |
}); |
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 obj = { | |
index: 0, | |
words: ['blackberry', 'apple', 'orange'], | |
callCount: 0, | |
toString: function() { | |
this.callCount++; | |
this.index = this.index > this.words.length - 2 ? 0 : this.index + 1; | |
return ( this.callCount === 2 ? ' ' : '') + this.words[this.index] ; | |
} | |
}; |
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 exec = require('child_process').exec; //подключаем модули | |
// использование внешней библиотеки без указания где и как скачивать | |
// если уж используешь такой вариант решения, тогда оформи полностью пакт под npm | |
// где можно вызовом npm install установить все зависимости | |
var waterfall = require('async').waterfall; | |
// опять коментарий который не дает ничего. |
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 http = require('http'); | |
var url = require('url'); | |
// Configure our HTTP server to respond with Hello World to all requests. | |
var server = http.createServer(function (request, response) { | |
var res; | |
// распарсиваем url-строку в объект data | |
var data = url.parse(request.url, true); | |
// упрощаем жизнь и получаем данные которые идут после знака ? в url строке | |
// а так как мы ее распарсили то они уже представленны объектом - это удобно |
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 http = require('http'); | |
var url = require('url'); | |
var app = { | |
'/summ': function(q) { | |
return q.x * 1 + q.y * 1; | |
}, | |
'/multi': function(q) { | |
return q.x * q.y; | |
} |
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($) { | |
// hide if location === /200253326/ | |
$(function() { | |
if ( window.location.pathname.match('200253326') ) { | |
$('div.section_widget').hide(); | |
} else { | |
$('div.section_widget').show(); | |
} | |
}); |
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
WITH PCommentList ([ProductId] | |
,[ProductCommentId] | |
,[ProductCommentPId] | |
,[ProductCommentText] | |
,[ProductCommentAddDate] | |
,[ProductCommentAddUserId] | |
,[ProductCommentAddUserName] | |
,[IsApproved] | |
,[IsLocked]) | |
AS( |
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 sendMultiRequestFor(userIds, cfg, method) { | |
var i = 1, width = 300, len = userIds.length, step = width / len, | |
dataFn = cfg.dataFn || function(userId) { | |
return { | |
user_id: userId | |
} | |
}; | |
Ext.MessageBox.show({ |
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 ClassObserver = (function(){ | |
function constructor () {} | |
constructor.prototype = { | |
events: {}, | |
on: function(event, hendler, ctx) { | |
var array_handlers = this.events[event]; | |
array_handlers = array_handlers == null ? [] : array_handlers; |
OlderNewer