Time of Update: 2016-08-10
標籤: 1 public string PostData(string url, string data)//url:要發送到網站的地址 data:傳送需要的參數 2 { 3 HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url); 4 myRequest.Method = "POST"; 5 myRequest.ContentType =
Time of Update: 2016-08-12
標籤: 在用寫一個案頭軟體的過程中,用到webbrowser實現介面。這時有一個禁止webbrowser通過f5按鍵進行重新整理的要求。本著邊做邊學的原則,本菜查了一下百度,原來這麼簡單,代碼如下:this.webBrowser1.WebBrowserShortcutsEnabled = false;
Time of Update: 2016-08-14
標籤:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms; namespace GetDeskDirectory{ public partial class Form1 :
Time of Update: 2016-08-12
標籤:# 題目4. Median of Two Sorted ArraysThere are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1:nums1 = [1, 3
Time of Update: 2016-08-11
標籤: System.Data.DataTable GetDataFromExcelByCom(bool hasTitle, string fileName) { //OpenFileDialog openFile = new OpenFileDialog(); //openFile.Filter = "Excel(*.xlsx)|*.xlsx|Excel(*.xls)|*.xls";
Time of Update: 2016-08-13
標籤:System.IO.Path.GetFullPath(openFileDialog1.FileName); //絕對路徑System.IO.Path
Time of Update: 2016-08-11
標籤:現在實際的情況是這樣的: 客戶有一台打卡機,員工打卡的資訊全部儲存在打卡機的Access資料庫裡面,現在客戶引入了一種新的管理系統,需要將Access資料庫中的打卡資料同步到SQL Server資料庫中,由於時間比較久,資料積累了有40多萬條。軟體功能: 選擇Access資料庫檔案,填入目標SQL Server資料庫的IP地址,然後開始進行同步。實現方法:1、先把Access資料庫中要匯入的資料存入DataTable中設定檔中的資料庫連接字串1
Time of Update: 2016-08-11
標籤: 運算子就是完成操作的一系列符號,它主要包括算術運算子、賦值運算子、關係運算子、邏輯運算子、條件運算、位操作運算子和字串運算子。 運算式就是運算子和運算元的組合,如a*b+1-c。運算式主要包括算術運算式、賦值運算式、條件運算式以及布林運算式等。 算術運算子與運算式
Time of Update: 2016-08-03
標籤:
Time of Update: 2016-08-03
標籤:1.快速鍵Ctrl+K+D:快速對齊代碼Ctrl+Z:撤銷Ctrl+S:儲存Ctrl+J:快速彈出智能提示Shift+End、Shift+Home:快速選中Ctrl+K+C:注釋所選代碼Ctrl+K+U:取消對所選代碼的注釋F1:轉到協助文檔MSDN#Region和#EndRegion:摺疊冗餘代碼2.資料類型1)int2)double3)string4)decimal:金錢類型,用來儲存金錢,在其值後面需要加上一個m5)char:用來儲存單個字元,有且僅有一個字元,不可為空。註:char
Time of Update: 2016-08-01
標籤:建立類WebServiceHelper:public class WebServiceHelper { #region 動態調用WebService動態調用地址 /// < summary> /// 動態調用web服務 /// < /summary> /// < param name="url">WSDL服務地址<
Time of Update: 2016-08-01
標籤:using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Text;using System.Threading.Tasks;namespace 基於System.Type的反射{ class Program
Time of Update: 2016-07-31
標籤:C# 非同步Socket
Time of Update: 2016-08-01
標籤:一、string to intint intA = 0;1.intA =int.Parse(str);2.int.TryParse(str, out intA);3.intA = Convert.ToInt32(str);以上都可以,其中 1和3 需要try{}異常,2不需要。 例1 TryParse()int number;bool result = Int32.TryParse(value, out number); // return bool value hint
Time of Update: 2016-08-03
標籤:結構體 ~struct定義:結構體一般定義在Main函數上面,位於Class下面,作為一個類;一般情況Struct定義在Main函數前面,Main函數裡面的地方都可以使用,參數前面加上public代表公用變數。 格式:struct +結構體的名稱{public int+變數名;public double+變數名;public
Time of Update: 2016-08-11
標籤:#include <stdio.h>#include <stdlib.h>#include <string.h>#define MAX_COL20#define MAX_INPUT 1000int read_column_numbers(int columns[], int max);void rearrange(char *output, char *input, int n_columns, int const columns[]);int
Time of Update: 2016-08-01
標籤:2016-08-01 15:36:30OC中的記憶體管理:Objective--C增加了記憶體回收機制,作為初學者,需要清楚記憶體的管理,什麼時候該申請記憶體,什麼時候該釋放記憶體,養成良好的編程習慣,開發無記憶體流失的應用程式。對於自己開發的應用程式,自己管理記憶體,當程式需要空間,則手動分配空間,當空間或其他資源不再需要時,手動回收。OC中的alloc+init為開闢空間,OC中的release是釋放空間的一個標示。 2.自動釋放池自動釋放池是OC的一種記憶體自動回收機制,可以將一
Time of Update: 2016-08-01
標籤:abstract 修飾符用於表示所修飾的類是不完整的,並且它只能用作基類。抽象類別與非抽象類別在以下方面是不同的: 抽象類別不能直接執行個體化,並且對抽象類別使用
Time of Update: 2016-08-01
標籤:WA * 3 + TLE *1 啊啊啊!說好的考慮問題要仔細呢?! 題意:簡單說就是,有一串操作,丟失了一部分,只有 n 個操作了, 補全操作,使得每次 getMin 得到對應的值。輸出所有操作的個數和操作序列。 解題: 用優先隊列直接類比過來的,標記一下某些位置 表示它之前還要進行哪些操作 才能做到,最後直接輸出;對於每個情況,如果是 removeMin , 考慮隊列是否為空白,如果空,就要先插入一個;;如果是 getMin ,考慮
Time of Update: 2016-07-31
標籤:問題 C: Proxy時間限制: 2 Sec 記憶體限制: 128 MB提交: 17 解決: 5[提交][狀態][討論版]題目描述Because of the GFW (Great Firewall), we cannot directly visit many websites, such as Facebook, Twitter, YouTube, etc. But with the help of proxy and proxy