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 _ = require('underscore'); | |
| var when = require('promised-io/promise'); | |
| module.exports = { | |
| selectKeywordsAll: function() { | |
| return this.conn.query('select * from `search.keywords`'); | |
| }, | |
| getKeywordById: function(id) { | |
| return this.conn.query('select * from `search.keywords` where id = ?', [ id ]); |
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
| /** | |
| * Starts timer | |
| * @return {Number} Start timestamp | |
| */ | |
| context.prototype.timeStart = function() {} | |
| /** | |
| * Returns | |
| * @param {Number} tstmp Start timestamp | |
| * @return {Number} Time difference in ms |
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
| .list { | |
| height: 100px; | |
| overflow: hidden; | |
| height: 100px; | |
| } | |
| .h { | |
| height: 100%; | |
| width: 1px; | |
| border: 1px solid red; |
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
| timec.i18n('en-US', function(frame, value) { | |
| var plural = !(value[value.length - 1] == 1); | |
| switch frame { | |
| case this.DAY: { | |
| return plural | |
| ? 'days' | |
| : 'day' | |
| } break; |
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 jsonStorage = { | |
| get: function(key) { | |
| try { | |
| return JSON.parse(localStorage.getItem(key)) || null; | |
| } catch(e) { | |
| return null; | |
| } | |
| }, | |
| set: function(key, value) { | |
| if (key && undefined !== value) { |
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
| // data: { foo: { bar: { name: 'bar' } } } | |
| match / { | |
| apply .foo content | |
| } | |
| match .foo content { | |
| mustBeConst = { bar: { name: 'new bar' } } | |
| // клеим в foo новый bar | |
| // получается { foo: { bar: [ { name: 'bar' }, { name: 'new bar' }] } } |
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
| body, | |
| html { | |
| padding: 0; | |
| margin: 0; | |
| height: 100%; | |
| } | |
| .page { | |
| position: relative; | |
| height: 100%; |
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
| body, | |
| html { | |
| padding: 0; | |
| margin: 0; | |
| height: 100%; | |
| } | |
| .page { | |
| position: relative; | |
| height: 100%; |
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
| body, | |
| html { | |
| padding: 0; | |
| margin: 0; | |
| height: 100%; | |
| } | |
| .page { | |
| position: relative; | |
| height: 100%; |
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
| body, | |
| html { | |
| padding: 0; | |
| margin: 0; | |
| height: 100%; | |
| } | |
| .page { | |
| position: relative; | |
| height: 100%; |