HA

C# 對一個類進行方法上的擴展 & 為方法添加註釋 static class StringExtension { /// <summary> /// 將字符串包裝成數據庫查詢時需要的樣式 /// 一定程度上防止SQL注入?(我覺得可以達到這個
C#獲取窗體寬度、獲取兩個日期的時間差 在窗體改變時改變控件的寬度 private void FormTemp_Resize(object sender, EventArgs e) { Program.log("Width of form is " + this.Width.ToString()); //this.Bounds.Width //下面這個不太清楚得到的是什麼寬度 //System.Windows.Forms.Screen.FromControl(this).Bounds.Width } 獲取兩
C#判斷DataColumn的字段類型 今天做的一個要把表格型數據導入一個 DataTable 中,讀取都是字符串,table 中有字段是數值類型,讀取時Int32
聽說Linq using System.Linq; ... public static void LinqTest() { int[] array = { 1, 5, 2, 10, 7 }; // Select squares of all odd numbers in the array sorted in descending order var results = from x in array where x % 2 == 1 orderby x descending select x * x; foreach (var result in results) { log(result.ToString()); } } //49 25 1
Visual Studio使用過程中的問題 格式化快捷鍵及樣式 快捷鍵為Ctrl+K->Ctrl+D 設置格式化樣式工具->選項->文本編輯
Chrome谷歌翻譯擴展沒有網絡連接的問題 提取翻译时出错,请检查网络连接。 在網頁中選中單詞單擊擴展圖標後,出現上述提示,將瀏覽器代理設置為全
JSONP跨域獲取JSON數據 客戶端請求數據 <!doctype html> <html> <head> <title>App Engine Demo</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> </head> <body> <div id="result">Loading...</div> <br /> <p>add p</p> <br /> <script> $(document).ready(function() { $.ajax({ async : false, url : "https://hanotfun.appspot.com/demo", type : "GET", dataType : 'jsonp', jsonp : 'callback', success : function(data) { $('#result').html("Hello, " + data.name); } });
Tomcat配置問題匯總 解壓後點擊startup運行閃退 原因可能是沒有配置環境變量,JAVA_HOME,JRE_HOME,CLASSPATH
使用Android Studio中遇到的錯誤 Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) <a href="syncProject">Re-download dependencies and sync project (requires network)</a> <a href="syncProject">Re-download dependencies and sync project (requires network)</a> solved: 1) Manually download Gradle 3.3 binary (direct link: https://services.gradle.org/distributions/gradle-3.3-bin.zip) 2) Open your android
文件Hash校驗Hash軟件 下了個eclipse的安裝包,看了下下載鏈接是http的,於是打算校驗一下hash值,沒想到官網上只給了一個SH