原创 C#_LINQ數據查詢

using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using Sys

原创 C#設計模式_單例模式

using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using Sys

原创 Node.js_同步/異步回調

/** * Created by cxm on 2016/1/11. */ var fs = require("fs"); // 回調函數 // 同步讀取 //var data = fs.readFileSync("input.

原创 Node.js_路由

/** * Created by cxm on 2016/1/11. */ var server = require("./server"); var router = require("./router"); server.st

原创 Node.js_函數

/** * Created by cxm on 2016/1/11. */ // 函數 function say(str) { console.log(str); }; function execute(func, va

原创 C#_FileStream讀取文本文件和二進制文件

using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using Sys

原创 Node.js_事件驅動

/** * Created by cxm on 2016/1/11. */ // 引入events事件模塊 var events = require("events"); // 創建EventEmitter對象 var event

原创 Node.js_Dns模塊

/** * Created by cxm on 2016/1/11. */ var dns = require("dns"); // 將域名(比如 'runoob.com')解析爲第一條找到的記錄 A (IPV4)或 AAAA(I

原创 C#_StreamReader讀取文本文件

using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using Sys

原创 Node.js_OS模塊

/** * Created by cxm on 2016/1/11. */ // OS模塊 var os = require("os"); // 定義了操作系統的行尾符的常量。 console.log(os.EOL); // 返

原创 C#_IEnumerable和IEnumerable

using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using Sys

原创 C#_List升序排序和降序排序

using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using Sys

原创 Node.js_基本類型

/** * Created by cxm on 2016/1/11. */ // number var count = 100; console.log(typeof(count)); // string var str = "c

原创 Node.js_Get和Post

/** * Created by cxm on 2016/1/11. */ var http = require("http"); var url = require("url"); var util = require("util

原创 C#_Dictionary的使用

class Person { private int age; private string name; public Person(int age, string nam