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
<?php | |
$mongoDB = new Mongo(); | |
$database = $mongoDB->selectDB("BVS"); | |
$collection = $database->createCollection('fs.files'); | |
$search = array("metadata.formdata.claimid" => "4"); | |
$replace = array('$set'=>array("metadata.formdata.mynewfield" => "wibble")); // note use of single quotes around $set. This is compulsory | |
$multiple = array("multiple" => true); // used to update all records that match default is false (update first record only) | |
$collection->update($search, $replace, $multiple); | |
?> |
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
/*global L */ | |
/*jslint nomen: true, sloppy : true, plusplus: true, vars: true, newcap: true*/ | |
/** | |
* Background Services. File and data uploads as well as claim status updates are all processed | |
* using the background services. They feed off items written to the dataqueue table by the UI | |
* during normal operation. The background service is sandboxed from the main app therefore there is | |
* a degree of code duplication here with copies of functions used elsewhere in the app duplicated here. | |
* @module bgService | |
*/ | |
//TODO refactor all these helper functions as commonJS so we can remove all the duplicated code. |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/html"> | |
<head> | |
<title>Dementia ScrapBook</title> | |
<link href="css/bootstrap.css" rel="stylesheet"> | |
<link href="css/bootstrap-responsive.css" rel="stylesheet"> | |
<link href="css/docs.css" rel="stylesheet"> | |
<link href='http://fonts.googleapis.com/css?family=Metrophobic' rel='stylesheet' type='text/css'> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> | |
<script> |
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
erfPicker = require('ui/common/fragments/erfPicker').create({ | |
data : erfData, | |
callBack : function(e) { | |
var selection = '' + (e.selectedValue[0] || 1); | |
erfButton.title = selection; | |
} | |
}); |
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
erfPicker = require('ui/common/fragments/erfPicker').create({ | |
data : erfData, | |
callBack : function(e) { | |
var selection = e.selectedValue[0] || 1; | |
erfButton.title = selection; | |
} | |
}); |
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
qxhr.create(conn).then(function(data) { | |
//do something here | |
}, function(error) { | |
//handle the error here | |
}); |
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
{ | |
"title": "External Link Example (Get)", | |
"alert": "Sample Alert", | |
"icon": "little_star", | |
"badge": "+1", | |
"sound": "circus.wav", | |
"vibrate": false, | |
"callToAction": { | |
"action": "B", | |
"uri": "http: //www.example.com", |
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
(function() { | |
var Tabletop = require('tabletop'); | |
var wrench = require('wrench'); | |
var public_url = "https://docs.google.com/spreadsheet/pub?key=0ArTqrFjFwISadGI4anRRZlM4UGZrcjNTMTJ0OWsydkE&output"; | |
var builder = require('xmlbuilder'); | |
var _ = require('underscore'); | |
var fs = require('fs'); | |
var path = require('path'); | |
var cwd; |
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
#!/bin/sh | |
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$") | |
if [ "$files" = "" ]; then | |
exit 0 | |
fi | |
pass=true | |
echo "\nValidating JavaScript:\n" |
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 images = { | |
"productBiscuits" : { | |
"boat" : "https://s3.amazonaws.com/razuna-server-tui/A3BCD0D5F6B7414BBDC94B5D505AC601/img/73B98337448B4A8B9F51888A7C7A8318/boat_73B98337448B4A8B9F51888A7C7A8318.png?AWSAccessKeyId=AKIAJKGCNZBGAX5FSCSQ&Expires=1725974249&Signature=%2Bew8AKJLxzIs8C6HgBCmp2jsHUQ%3D", | |
"camper" : "https://s3.amazonaws.com/razuna-server-tui/A3BCD0D5F6B7414BBDC94B5D505AC601/img/6B9CE162196A4455A77D128EAA9DF04D/camper_6B9CE162196A4455A77D128EAA9DF04D.png?AWSAccessKeyId=AKIAJKGCNZBGAX5FSCSQ&Expires=1725974407&Signature=r0CqD4bc%2BzBPZZmMfMT2IICL%2Fl0%3D", | |
"car" : "https://s3.amazonaws.com/razuna-server-tui/A3BCD0D5F6B7414BBDC94B5D505AC601/img/5031ADD80C014B16B7455B9132B6E998/car-hire_5031ADD80C014B16B7455B9132B6E998.png?AWSAccessKeyId=AKIAJKGCNZBGAX5FSCSQ&Expires=1725974445&Signature=2W8ix1a27Cit4rVvbvDGAzJsUcY%3D", | |
"extra" : "https://s3.amazonaws.com/razuna-server-tui/A3BCD0D5F6B7414BBDC94B5D505AC601/img/0906F231770D416EAAD822F8ADFB2821/extras_0906F231770D416EAAD822F8ADFB2821.pn |