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
//Copy the collection to prevent deleting data | |
db.nameCollection.copyTo('newNameCollection') | |
//See the collections in the database | |
db.getCollectionNames() | |
//See if exist duplicate data | |
db.orders.aggregate([ | |
{ | |
$group: { |
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 file = fileOrFileArray[i]; | |
if (file.indexOf("data:application") >= 0) { | |
var fileData = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(file.split(',')[1]); | |
var memoryStream = new Windows.Storage.Streams.InMemoryRandomAccessStream(); | |
var dataWriter = new Windows.Storage.Streams.DataWriter(memoryStream); | |
dataWriter.writeBuffer(fileData); | |
dataWriter.storeAsync().done(function () { |
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
controllers.controller('DocsController', ['$scope', '$ionicPlatform', 'Docs', 'Products' function ($scope, $ionicPlatform, Docs, Products) { | |
$scope.products = []; | |
$scope.allDocs = []; | |
$ionicPlatform.ready(function () { | |
//Insert a new product | |
Products.addProduct({ | |
name : 'Milk', |
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 game = new Phaser.Game(1024, 768, Phaser.AUTO, '', { | |
init: function () { | |
this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; | |
this.scale.pageAlignHorizontally = true; | |
this.scale.pageAlignVertically = true; | |
//Load the plugin | |
this.game.kineticScrolling = this.game.plugins.add(Phaser.Plugin.KineticScrolling); | |
}, | |
create: function () { |
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
1>------ Build started: Project: Blank, Configuration: Release Windows-x64 ------ | |
1> Your environment has been set up for using Node.js 0.12.7 (x64) and npm. | |
1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac | |
1> ------ Name from source package.json: vs-tac | |
1> ------ Version from source package.json: 1.0.13 | |
1> ------ Package already installed globally at correct version. | |
1> ------ Cordova tools 5.3.1 already installed. | |
1> ------ Build Settings: | |
1> ------ Build Settings: | |
1> ------ platformConfigurationBldDir: C:\Apps\Windows\Blank\Blank\bld\Windows-x64\Release |
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() { | |
'use strict'; | |
angular | |
.module('App') | |
.factory('Files', Files); | |
Files.$inject = ['$window', '$cordovaFileTransfer', '$ionicLoading', '$cordovaFileOpener2']; | |
function Files($window, $cordovaFileTransfer, $ionicLoading, $cordovaFileOpener2) { | |
return { |
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 foo = function(){ | |
//Clear cookies | |
var cookies = document.cookie.split(";"); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = cookies[i]; | |
var eqPos = cookie.indexOf("="); | |
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; | |
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; |
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 assignProperty = function (object, property, value) { | |
if (typeof property === "string") { | |
property = property.split("."); | |
} | |
if (property.length > 1) { | |
var e = property.shift(); | |
assignProperty(object[e] = Object.prototype.toString.call(object[e]) === "[object Object]" ? object[e] : {}, property, value); | |
} else { | |
object[property[0]] = value; | |
} |
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
Servicio para deployar y administrar aplicaciones y servicios web en Java, .NET, PHP, Node.js, Python, Ruby y Docker. | |
Infraestructura lista para lanzar la aplicació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
//pretty printing JSON => JSON.stringify(obj, null, 2); | |
var product = { | |
"productTypeCode": "productTypeEnergy", | |
"quantities": [ | |
{ | |
"period": { | |
"startDate": new Date("2017-01-13T05:00:00.000Z"), | |
"endDate": new Date("2017-01-31T05:00:00.000Z"), | |
"dayType": { | |
"normal": true, |
OlderNewer