Time of Update: 2015-07-14
標籤:地址:http://www.cnblogs.com/sevenyuan/archive/2012/06/20/2556494.html 可新開一個socket服務端監聽843連接埠,專門用於處理as3發來的沙箱請求。處理後再把串連關閉即可。 // 額外的一個問題AS3讀取C++socket發送來的資料,提示 遇到檔案尾錯誤 。 //如出現Error: Error #2030:
Time of Update: 2015-07-14
標籤:strcpy strlen strcmp strcat 相信不少人面試的時候,會遇到面試官讓你寫出strcmp, strlen, strcpy,strcat等函數,下面給出比較完美的實現,自行把握裡面一些關鍵的點,例如參數的判斷,const參數,指標操作等等。//strcpy函數:char *strcpy(char *strDest, const
Time of Update: 2015-07-13
標籤:[源碼下載]不可或缺 Windows Native (22) - C++: 多重繼承, 虛基類webabcd介紹不可或缺 Windows Native 之 C++多重繼承虛基類樣本1、基類 1CppBase1.h#pragma once #include <string>#include "CppBaseVirtual.h"using namespace std;namespace NativeDll{ // virtual 代表 CppBaseVirtual
Time of Update: 2015-07-14
標籤:插入排序:(直接插入排序&希爾排序)using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace Sort{public class InsertSort{public static int k; /// <summary>/// 直接插入排序/// </summary>/// <param name="a"&
Time of Update: 2015-07-12
標籤: 1 template<typename Element> 2 class BinarySearchTree 3 { 4 public: 5 BinarySearchTree():root(NULL){} 6 BinarySearchTree(const BinarySearchTree& bst):root(NULL) 7 { 8 operator=(bst); 9
Time of Update: 2015-07-12
標籤:/* LList.cpp* Author: Qiang Xiao* Time: 2015-07-12*/#include<iostream>using namespace std;class Node{ public: int data; Node* ptr; Node(int elem= 0, Node* node= NULL){this->data= elem; this->ptr= node;}};class
Time of Update: 2015-07-12
標籤:map定義map:map<string,int> word_count;添加新元素:word_count[“hengshan”]=10; 這種方法會尋找,如果找不到直接插入新元素。也可以使用insert,如 word_count.insert(make_pair(“hengshan”,10)),這樣比較正統。尋找某個元素:使用subscript會有副作用,就是如果元素不存在,那麼會自動建立一個元素,所以用find 比較好。如 int
Time of Update: 2015-07-13
標籤:類 類是JAVA中一個重要的概念,可以把類理解成一個對象的抽象,這個抽象的對象包含了變數(用來描述這個對象的屬性)和方法(用來描述這個對象可以幹什麼),類中的各個成員之間可以相互調用(static修飾的成員不能訪問沒有static修飾的成員).
Time of Update: 2015-07-12
標籤:c語言 枚舉法 佩爾方程 //窮舉法!/*======================================================題目:求佩爾方程x*x-73*y*y=1的解。======================================================*/#include<stdio.h>#include<math.h&
Time of Update: 2015-07-12
標籤:scanf( )函數和gets( )函數都可用於輸入字串,但在功能上有區別。若想從鍵盤上輸入字串"hi hello",則應該使用__gets__函數。gets可以接收空格;而scanf遇到空格、斷行符號和Tab鍵都會認為輸入結束,所有它不能接收空格。char string[15]; gets(string); /*遇到斷行符號認為輸入結束*/scanf("%s",string);
Time of Update: 2015-07-12
標籤:hdu dp c++ the algorithm of three version below is essentially the same, namely, Kadane’s algorithm, which is of O(n) complexity. https://en.wikipedia.org/wiki/Maximum_subarray_problemthe
Time of Update: 2015-07-14
標籤:private void ModifyFilePermission(string path, string user, FileType filetype) { if (filetype == FileType.File) { FileInfo fileinfo = new FileInfo(path); FileSecurity fileSecurity =
Time of Update: 2015-07-14
標籤:老師給小學生門布置了一些作業,讓它們按照一個模版寫一些字串交上來,同學們把作業交上來了,問題來了,這麼多的作業老師批改不過來,現在請你幫老師寫一個程式,協助老師確定各個字串是否合格。首先老師有一個匹配模版,比如是“aa[123]bb”這一個字串,同學們交的各種作業字串如aa1bb、aa2bb、aa3bb都算是正確匹配看,而aacbb就是錯誤的字串。(即待查字串對應於模版方括弧內的部分,應該為方括弧內字串的一個子字元)。我們需要做的就是按照模版,找出正確的字串和所在的
Time of Update: 2015-07-13
標籤:1.建立Windows服務 2.切換到程式碼檢視,拷入如下代碼該服務以10S的間隔建立 d:/1.txt 檔案 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.IO;using System.Linq;using
Time of Update: 2015-07-12
標籤:在.net 中,調用 post 或者 get和後台通訊時,如果有時間返回資訊,後台返回的時間資訊一般是這樣格式:Thu Jul 9 23:14:53 UTC+0800 2015,那麼要在前台顯示就會有點點小困難。最近使用到,小小研究了下,參照網路中的寫法,解決方案如下:1.先將C#的格式轉換成js 的datetime形式。/**將C#返回的日期格式進行轉換 將 類似 Thu Jul 9 23:14:53 UTC+0800 2015 轉換成
Time of Update: 2015-07-13
標籤:今天發現一個很神奇的現象在cshtml頁面中,使用@Request.QueryString,在<script>標籤內和在<html>文字標籤內所顯示的內容不一樣如訪問http://localhost:60086/FakeLogin/?a=52&b=dfas<script>"@Request.QueryString"</script>頁面顯示的結果是"a=52&b=dfas"
Time of Update: 2015-07-13
標籤: .NET中的枚舉我們一般有兩種用法,一是表示唯一的元素序列;還有就是用來表示多種複合的狀態。這個時候一般需要為枚舉加上[Flags]特性標記為位域,這樣我們就可以用"或"運算子組合多個狀態.例如: [Flags] public enum Permission { create = 1, read = 2, update = 4, delete = 8, } Permission
Time of Update: 2015-07-10
標籤:簡介: Udp廣播訊息用在區域網路的訊息傳遞很方便。本文使用UdpClient類在WPF下實現Udp廣播收發發送: 1 void MainWindow_Loaded(object sender, RoutedEventArgs e) 2 { 3 Loaded -= MainWindow_Loaded; 4 UdpClient client = new UdpClient(new
Time of Update: 2015-07-14
標籤:連結:http://codeforces.com/problemset/problem/215/CC. Crossestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a board with a grid consisting of n rows and m columns,
Time of Update: 2015-07-12
標籤:object-c 開發 教程 ios iOS5.0以後就開始可以使用ARC( Automatic Reference Counting:自動引用計數)來代替之前的MRC(Manual Reference