% a script to determine how many perfect shuffles are required % before a given deck of cards returns to its original order clear all, close all % pro ...
分类:
其他好文 时间:
2017-06-11 10:05:44
阅读次数:
142
今天做爬虫时。发现结果中好多多余的空格。然后有强迫症的我当然不会放过 " xyz ".strip() # returns "xyz" " xyz ".lstrip() # returns "xyz " " xyz ".rstrip() # returns " xyz" " x y z ".repla ...
分类:
编程语言 时间:
2017-06-10 15:20:14
阅读次数:
177
C# wpf程序获取当前程序版本 /// <summary> /// 获取当前系统的版本 /// </summary> /// <returns></returns> public static string GetEdition() { return System.Reflection.Assem ...
单例模式:主要关注三点: 1. 私有化构造器。 2. 静态公有方法方法,返回唯一实例。 3. 防止多线程程序并发导致的多实例的问题。 还有一种写法: 不用考虑多线程的问题。代码更简单。 ...
分类:
其他好文 时间:
2017-06-09 12:31:54
阅读次数:
187
/// <summary>/// 获取某一列的所有值/// </summary>/// <typeparam name="T">列数据类型</typeparam>/// <param name="dtSource">数据表</param>/// <param name="filedName">列名< ...
分类:
其他好文 时间:
2017-06-08 12:07:15
阅读次数:
353
https://leetcode.com/problems/implement-strstr/#/description Implement strStr(). Returns the index of the first occurrence of needle in haystack, or - ...
分类:
其他好文 时间:
2017-06-07 18:45:08
阅读次数:
157
float和double类型的主要为了科学计算和工程计算而设计的,它们执行二进制浮点运算,这时为了在广泛的数值范围上提供较为精确的近似计算而精心设计的。然而,它们没有提供完全精确的结果,所以不应该被用于要求精确结果的场合。通常商业计算往往需要BigDecimal来计算精确要求比较高的数值。比如 无论 ...
分类:
其他好文 时间:
2017-06-07 17:06:56
阅读次数:
273
/// /// datatable转换xml /// /// /// public static string ConvertDataTableToXML(DataTable xmlDS) { StringBuilder strXml = new StringBui... ...
分类:
其他好文 时间:
2017-06-07 10:11:45
阅读次数:
145
Angular.js中处理页面闪烁的方法详解 Angular.js中处理页面闪烁的方法详解 前言 大家在使用{{}}绑定数据的时候,页面加载会出现满屏尽是{{xxx}}的情况。数据还没响应,但页面已经渲染了。这是因为浏览器和angularjs渲染页面都需要消耗一定的时间,这个间隔可能很小,甚至让人感 ...
分类:
Web程序 时间:
2017-06-07 00:56:14
阅读次数:
360
/// /// 百度翻译 /// public class BaiDuTransHelp { /// /// 密钥 /// private readonly static string TransKey = ConfigurationManager.AppSettings["TransKey"... ...
分类:
其他好文 时间:
2017-06-06 14:24:01
阅读次数:
1063