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
newOptions += search.map((search: String) => { | |
val splitString: Array[String] = search.trim.split(" ") | |
val conjunction = Restrictions.conjunction | |
for (term <- splitString; disjunction = Restrictions.disjunction; searchString = "%" + term + "%" if term.nonEmpty) { | |
Array("name", "description") foreach((field) => disjunction.add(Restrictions.like(field, searchString))) | |
conjunction.add(disjunction) | |
} | |
conjunction |
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
$small-phone-width: 321px; | |
.title, | |
.subhead, | |
.display1 { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} |
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
angular.module('app').directive('preloadBackground', function($document) { | |
return { | |
restrict: 'A', | |
priority: 90, | |
link: function($scope, $element, $attrs) { | |
var letter = (s) => s.charAt(0).toUpperCase(); | |
var color = 'rgb(57, 191, 122)'; | |
// uncomment to use please.js | |
// var color = Please.make_color({ | |
// saturation: 0.7 |
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
#!/usr/bin/env node | |
// This plugin replaces text in a file with the app version from config.xml. | |
var wwwFileToReplace = "js/build.js"; | |
var fs = require('fs'); | |
var path = require('path'); | |
var rootdir = process.argv[2]; |
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 x = "INIT"; | |
function test() { | |
var a = arguments[0] === undefined ? x : arguments[0]; | |
return (function () { | |
var x; | |
return a; | |
})(); | |
} | |
console.log(test()); |
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
class Turnip extends PouchDB { | |
constructor(name, opts, callback) { | |
super(name, opts, callback); | |
} | |
syncRemote(endpoint) { | |
console.log('syncing: ' + endpoint); | |
} | |
} |
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
const Popover = new WeakMap(); | |
class PackageAdvancedSearch { | |
constructor($ionicPopover) { | |
Popover.set(this, $ionicPopover); | |
this.restrict = 'EA'; | |
//this.templateUrl = 'package/advanced-search.html'; | |
} |
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
{ | |
"resource": "boxscore", | |
"parameters": { | |
"GameID": "0021400948", | |
"StartPeriod": 1, | |
"EndPeriod": 10, | |
"StartRange": 0, | |
"EndRange": 28800, | |
"RangeType": 2 | |
}, |
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
import Firebase = require('firebase'); | |
const modelRef = new Firebase('urlhere.firebaseio.com'); | |
export class Job { | |
id:string; | |
db:Firebase = modelRef.child('jobs'); | |
constructor(private user:string, private inputUri:string, private outputUri:string) {} |
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
Restangular.addFullRequestInterceptor(function authHeaderRequestInterceptor(element, operation, route, url, headers, params, httpConfig) { | |
if (route === 'secure') { | |
return { | |
headers: OAuth.setAccessHeaders(headers) | |
} | |
} | |
}); |