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
public class Rootobject | |
{ | |
public string firstName { get; set; } | |
public string lastName { get; set; } | |
public int age { get; set; } | |
public Address address { get; set; } | |
public Phonenumber[] phoneNumbers { get; set; } | |
} | |
public class Address |
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
public class SampleModule : Nancy.NancyModule | |
{ | |
public SampleModule() | |
{ | |
Get["/"] = _ => "Hello World!"; | |
} | |
} |
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 net = require('net'); | |
var server = net.createServer(function(c) { | |
console.log('Serveur connecté'); | |
c.on('end', function() { | |
console.log('Serveur déconnecté'); | |
}); | |
c.write('Hello !\r\n'); | |
c.pipe(c); | |
}); | |
server.listen(8124, 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
var names = (KnownColor[])Enum.GetValues(typeof(KnownColor)); | |
var namesList = names.ToList(); | |
//Retirer ceux que vous considérez indésirables | |
namesList.Remove(KnownColor.White); | |
namesList.Remove(KnownColor.HighlightText); | |
namesList.Remove(KnownColor.ControlLight); | |
namesList.Remove(KnownColor.ControlLightLight); | |
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
public static IPAddress GetIp(this System.Web.HttpRequest request) | |
{ | |
string ipString; | |
if (string.IsNullOrEmpty(request.ServerVariables["HTTP_X_FORWARDED_FOR"])) | |
{ | |
ipString = request.ServerVariables["REMOTE_ADDR"]; | |
} | |
else | |
{ | |
ipString = request |
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
using (var fs = new FileStream(@"c:\frenchcoding\frenchencoding.csv", FileMode.OpenOrCreate, FileAccess.ReadWrite)) | |
{ | |
var preamble = new UTF8Encoding(true).GetPreamble(); | |
fs.Write(preamble,0,preamble.Count()); | |
var byteArrayLine1 = System.Text.Encoding.UTF8.GetBytes("courriel, nom, prénom"+Environment.NewLine); | |
fs.Write(byteArrayLine1, 0, byteArrayLine1.Count()); | |
var byteArrayLine2 = System.Text.Encoding.UTF8.GetBytes("pascal.paradis@gmail.com, Paradis, Pascal"); | |
fs.Write(byteArrayLine2, 0, byteArrayLine2.Count()); |
This file has been truncated, but you can view the full file.
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
'use strict'; | |
var COMPILED = !0, goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = !1; | |
goog.LOCALE = "en"; | |
goog.provide = function (a) { | |
if (!COMPILED) { | |
if (goog.isProvided_(a)) | |
throw Error('Namespace "' + a + '" already declared.'); | |
delete goog.implicitNamespaces_[a]; |
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 ng-app> | |
<head> | |
<script src="http://code.angularjs.org/1.0.5/angular.min.js"></script> | |
</head> | |
<body> | |
<button ng-click="count = count + 1" ng-init="count=0"> | |
Increment | |
</button> | |
count: {{count}} |
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
// Interface | |
interface IPoint { | |
getDist(): number; | |
} | |
// Module | |
module Shapes { | |
// Class | |
export class Point implements IPoint { |
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
require 'sinatra' | |
require 'base64' | |
require 'haml' | |
require 'securerandom' | |
set :static, true | |
set :public_folder, '/uploads' | |
get '/' do | |
haml :index |