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 are /application/json | |
//Offering an item | |
// POST request to endpoint /api/postItem | |
{ | |
itemName: String, | |
itemPrice: Number, | |
Description: String, | |
lockerCode: String, | |
image: String, //BASE64 |
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
[ | |
{ | |
"code": "1001", | |
"category": "HOME", | |
"type": "SUBSCRIPTION", | |
"name": "Home emergency assistance and insurance", | |
"description": "We cover the typical mishaps you may encounter: If you lost your keys, a window or door gets broken and many more. Our assistance service is able to dispatch every type of craftsmen at no additional cost & at high quality and guaranteed low cost. 12 month subscription, coverage max. 1,500 per incident.", | |
"price": 119 | |
}, |
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
// private: create methods for each config to get/set | |
function createConfig(configObj, providerObj, platformPath) { | |
forEach(configObj, function(value, namespace) { | |
if (angular.isObject(configObj[namespace])) { | |
// recursively drill down the config object so we can create a method for each one | |
providerObj[namespace] = {}; | |
createConfig(configObj[namespace], providerObj[namespace], platformPath + '.' + namespace); |
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
<script type="text/javascript"> | |
$(document).ready(function () { | |
var sense; | |
var imageSize; | |
var faceConfiguration; | |
// check platform compatibility | |
RealSenseInfo(['face3d'], function (info) { | |
if (info.IsReady == true) { | |
$('#info').append('<b>Platform supports Intel(R) RealSense(TM) SDK feature</b>'); |
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
//Array of objects | |
{ | |
"languages": [{ | |
"id": "cmn", | |
"main_name": "Chinese", | |
"sub_name": "Mandarin", | |
"native_name": "普通话", | |
"speakers_native": 845000000, | |
"speakers_native_total": 875389400, | |
}, { |
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
'use strict'; | |
angular.module('something', [ | |
'deps' | |
]) | |
.config(function($locationProvider) { | |
$locationProvider.html5Mode(true); | |
}) | |
.config(function($provide) { | |
return $provide.decorator('$uiViewScroll', function($delegate, $window) { | |
return function(uiViewElement) { |
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
'use strict'; | |
//gulp plugins | |
var gulp = require('gulp'), | |
inject = require('gulp-inject'), | |
sourcemaps = require('gulp-sourcemaps'), | |
coffee = require('gulp-coffee'), | |
sass = require('gulp-sass'), | |
prefix = require('gulp-autoprefixer'), | |
wiredep = require('wiredep').stream, | |
argv = require('yargs').argv, |
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
//I've changed the typeahead to iterate over an array - this is the __only__ way it'll work with textangular, | |
// Textangular does string manipulation upon select, and cannot work with objects | |
//viewvalue is http://stackoverflow.com/questions/17837007/in-the-angularjs-bootstrapui-typeahead-whats-viewvalue | |
// ng-click should probably be typeahead-on-select() | |
<input data-text-angular data-ng-model="field.name" data-ng-click="itemClicked($index)" name="{{field.caption}}" data-ta-target-toolbars='toolbar' typeahead='option for option in getOptions(field.options) | filter:$viewValue'></input> | |
//this converts the object to an array, should be self explanatory. | |
// It's a really good idea to keep you logic _out of_ the html - this increases testability | |
$scope.getOptions = function(options) { | |
var arr = [] |
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
import urllib | |
import json | |
import datetime | |
now = datetime.datetime.now() | |
outputFilename = 'tescoproduct_' + now.strftime("%Y%m%d") + '.csv' | |
def LoginAndGetSessionKey(): |
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
removed added | |
// Generated on 2014-09-09 using generator-angular-fullstack 2.0.13 | |
'use strict'; | |
module.exports = function (grunt) { | |
var localConfig; | |
try { | |
localConfig = require('./server/config/local.env'); |