原创 LeetCode OJ: 9. Palindrome Number (C++)

題目:Determine whether an integer is a palindrome. Do this without extra space. 解法1、需要額外空間:    存儲各位數字,逆轉,換回逆轉值,與原值比較 cla

原创 LeetCode 172. Factorial Trailing Zeroes(C++)

題目:Given an integer n, return the number of trailing zeroes in n!.   Note: Your solution should be in logarithmic tim

原创 sivelrlight 結合asp.net用於大文件下載

一、在web項目下添加一個“一般處理程序” using System; using System.Collections.Generic; using System.Linq; using System.Web; using Syste

原创 visual studio 2010 添加數據庫連接 測試連接通過 報錯:關鍵字不在數據字典中

一、現象 visual studio 2010 添加數據庫連接 時, 測試連接能通過,但是卻報錯:關鍵字不在數據字典中; 二、可能原因 做多個項目時,手動安裝數據庫provider,並使用該provider加入數據連接,而在移除prov

原创 C#字符串操作總結

1、C#判斷字符串爲空最通用的方法就是IsNullOrEmpty()無論是"", string.Empty還是null。      如果字符串初始化爲null,則不能使用test3.Length == 0進行判斷。對於"",和string

原创 leetcode : Counting Bits

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in t

原创 Silverlight DataGrid用法

Silverlight DataGrid用法 一、數據綁定 1、整個datagrid綁定數據源 PagedCollectionView drugListview = new PagedCollectionView(mClient.Stu