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
public static class Mapper | |
{ | |
public static T2 Map<T1, T2>(T1 t1) | |
{ | |
var json = JsonConvert.SerializeObject(t1); | |
return JsonConvert.DeserializeObject<T2>(json); | |
} | |
} |
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
var source = require('vinyl-source-stream'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var browserify = require('browserify'); | |
var reactify = require('reactify'); | |
var watchify = require('watchify'); | |
var notify = require("gulp-notify"); | |
var scriptsDir = './scripts'; | |
var buildDir = './build'; |
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
{ | |
"name": "my-app", | |
"version": "0.0.0", | |
"dependencies": { | |
"browserify": "~2.36.1", | |
"less": "~1.5.1" | |
}, | |
"devDependencies": { | |
"watchify": "~0.4.1", | |
"catw": "~0.2.0" |
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
@ECHO OFF | |
SETLOCAL | |
SET "NODE_EXE=%~dp0\node.exe" | |
IF NOT EXIST "%NODE_EXE%" ( | |
SET "NODE_EXE=node" | |
) | |
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" |
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
Marcador: Significado | |
TODO: Elementos ainda não implementados | |
FIXME: Código que sabidamente apresenta problemas | |
HACK: Solução admitante deselegante para um problema | |
XXX: Perigo! Há um grande problema aqui |
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
$.ajaxSettings.traditional = true; // <-- Important | |
$('#btn').click(function () { | |
var array = []; | |
var url = '/Controller/Action'; | |
$.post(url, { array : array }); | |
}); | |
}); |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |