show dbs
use dbname
db.collection_name.insert(obj)
angular.module('app') | |
.factory('AppSvc', function ($http, $q) { | |
return { | |
ajaxRq: function (req, cb) { | |
var deferred = $q.defer(); | |
$http(req) | |
.success(function (data, status, headers, cfg) { | |
if (cb) { | |
deferred.resolve(cb({ | |
status: status, |
scope.sendFile = function (el) { | |
scope.uploading = true; | |
var f = $(el).val(), | |
fObj = el.files[0]; | |
if (f == '') { | |
return false; | |
} | |
var fPart = f.split('\\'), | |
origFilename = fPart[fPart.length - 1]; |
[HttpPost, Route("api/upload")] | |
public async Task<HttpResponseMessage> Upload() | |
{ | |
if (!Request.Content.IsMimeMultipartContent()) | |
return Request.CreateErrorResponse(HttpStatusCode.UnsupportedMediaType, "expected multi-part form content."); | |
var provider = new MultipartMemoryStreamProvider(); | |
await Request.Content.ReadAsMultipartAsync(provider); | |
foreach (var file in provider.Contents) | |
{ |
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) { | |
$httpProvider.responseInterceptors.push([ | |
'$q', '$templateCache', 'activeProfile', | |
function($q, $templateCache, activeProfile) { | |
// Keep track which HTML templates have already been modified. | |
var modifiedTemplates = {}; | |
// Tests if there are any keep/omit attributes. | |
var HAS_FLAGS_EXP = /data-(keep|omit)/; |
<div class="phoneFields"> | |
<input type="text" id="phone" ng-model="area" maxlength="3"> - | |
<input type="text" ng-model="prefix" maxlength="3"> - | |
<input type="text" ng-model="suffix" maxlength="4"> | |
</div> |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
/*! | |
* Grunt | |
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev | |
*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// Sass |