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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <!-- Required meta tags --> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <!-- Bootstrap CSS --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> |
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 should = require('should'); | |
| describe('uncaught exception', function() { | |
| describe('with interception', function() { | |
| var listeners; | |
| beforeEach(function() { | |
| listeners = process.listeners('uncaughtException'); | |
| process.removeAllListeners('uncaughtException'); |
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 SmartBus = require('smart-bus'); | |
| var bus = new SmartBus({ | |
| subnet: 1, | |
| id: 50, // Device id for connector | |
| gateway: '192.168.10.152', // HDL SmartBus gateway IP | |
| port: 6000 // Listening port, default: 6000 | |
| }); | |
| bus.socket.on('listening', function() { |
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 lockingStatements = [ | |
| [ | |
| "INSERT `projects` (`projects`.`title`) VALUES ('Project 1')", | |
| function(ids) { | |
| return "INSERT `tasks` (`tasks`.`title`, `tasks`.`project_id`) VALUES ('Task 1.1', " + ids[0] + ")"; | |
| }, | |
| function(ids) { | |
| return "INSERT `tasks` (`tasks`.`title`, `tasks`.`project_id`) VALUES ('Task 1.2', " + ids[0] + ")"; | |
| }, |
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 seq = require('nd-seq'); | |
| var utils = require('nd-utils'); | |
| var mysql = require('mysql'); | |
| var map = utils.map; | |
| var identity = utils.identity; | |
| var ensureFunction = utils.ensureFunction; | |
| var config = { | |
| socketPath: '/tmp/mysql.sock', |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <name>log</name> | |
| <data> | |
| <row> | |
| <timestamp type="datetime">2014-07-01T09:30:10Z</timestamp> | |
| <message type="string">First message</message> | |
| </row> | |
| <row> | |
| <timestamp type="datetime">2014-07-01T09:35:15Z</timestamp> | |
| <message type="string">Second message</message> |
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
| createRecord: function(store, type, model) { | |
| var primaryKey = get(model, 'primaryKey'); | |
| var url = this.urlFor(type); | |
| var id = this.nextUUID(); | |
| var data = model.toJSON(); | |
| data[primaryKey] = id; | |
| return this.ajax(url + "/create", "POST", { data: JSON.stringify(data), contentType: 'application/json' }).pipe(function(json) { | |
| var filter = {}; |
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
| App.CarouselItem = Ember.View.extend({ something cool }); | |
| App.Carousel = Ember.View.extend({ | |
| template: Ember.Handlebars.compile( | |
| '{{#each content}}'+ | |
| '{{view view.Item contentBinding="this"}}' + | |
| '{{/each}}' | |
| ), | |
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
| App.SelectableCollectionView = Ember.CollectionView.extend({ | |
| selected: null, | |
| itemViewClass: Ember.View.extend({ | |
| attributeBindings: ['isSelected'], | |
| isSelected: Ember.computed(function() { | |
| return this.get('content') === this.getPath('parentView.selected'); | |
| }).property('parentView.selected').cacheable(), |
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
| describe('toJSON', function() { | |
| var Address = SC.Resource.define({ | |
| schema: { | |
| city: String, | |
| } | |
| }); | |
| var Person = SC.Resource.define({ | |
| schema: { | |
| id: Number, |