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
| customSchema(function () { | |
| var mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/test'); | |
| var Schema = mongoose.Schema, ObjectId = Schema.ObjectId; | |
| var Products = new Schema({ | |
| cucumbers : ObjectId | |
| , tomatoes : ObjectId |
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
| set ai | |
| set ts =2 | |
| set cpoptions+=$ | |
| set expandtab | |
| set ls =2 | |
| set modeline | |
| set nocompatible | |
| set number | |
| set shiftwidth =2 | |
| set softtabstop =2 |
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
| /* jshint browser: true, | |
| * dojo: true, | |
| * es5: true, | |
| * jquery: true, | |
| * regexp: true, | |
| * smarttabs: true */ | |
| /* vim: set ft=javascript: */ |
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 usk = require('UnderscoreKit'), | |
| zipwith = require('zipwith').zipwith; | |
| function recursFib() { | |
| var fibs = [1,1]; | |
| fibs.concat( | |
| zipwith( function (a, b) {return a + b;}, fibs.slice(-2)) | |
| ); | |
| return fibs; | |
| }; |
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
| //all of this is within a pretty long method for handling key events | |
| var groupChoices = { | |
| 65 : 'a', 66 : 'b', 67 : 'c', | |
| 68 : 'd', 69 : 'e', 70 : 'f', | |
| 71 : 'g', 72 : 'h', 73 : 'i', | |
| 74 : 'j', 75 : 'k', 96 : '0', | |
| 97 : '1', 98 : '2', 99 : '3', | |
| 100 : '4', 101 : '5', 102 : '6', | |
| 103 : '7', 104 : '8', 105 : '9' |
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
| // alternative 1 | |
| $(function() { | |
| $('.viator_cancel_link').on('click', function() { | |
| $('.viator_cancel_info').toggle(); | |
| }) | |
| }) | |
| // alternative 2 | |
| var toggleInfo = function() { | |
| this.init: 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
| " <div data-dojo-attach-point='pNode' data-dojo-type='dojox.widget.Portlet' data-dojo-props='title:foobar'" + |
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
| this.tabContainer.domNode.appendChild(dojo.create('div', { | |
| attrs: { | |
| "onClick": function() { | |
| console.log('making it heeeeeeeeeeeeeeeeeeere'); | |
| // this.showTaggingControls; | |
| } | |
| }, | |
| className: 'taggingControls', | |
| innerHTML: "Tagging Controls" | |
| })); |
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
| <tbody> | |
| <tr> | |
| <td>a</td><!-- temporarily.. --> | |
| <td><input data-dojo-attach-point='editname' value='Group 1'></input></td> | |
| <td dojoAttachPoint='highlightColorPicker' class="default-color-of-groups" dojoAttachEvent='onClick:colorSelectClicked' baseClass='documentHighlightColorDropdown' dojoType='dijit.form.Button'></td> | |
| </tr> | |
| </tbody> |
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
| showTaggingControls: function() { | |
| var canvasSettings = new widget.CanvasSettings({ | |
| columnView : this.columnView, | |
| groupCollection : this.groupCollection, | |
| parent : this.controlsDialog, //an attempt to reach this.controlsDialog | |
| thumbnailsView : this.thumbnailsView | |
| }); | |
| this.controlsDialog = new dijit.Dialog({ |
OlderNewer