/// /// 图片验证码 /// /// public ActionResult ValidateCode() { byte[] data = null; string code = RandCode(5); TempData["cod... ...
分类:
其他好文 时间:
2017-06-29 17:29:31
阅读次数:
140
今天写了一下代码,本来是想得到当前文件的上面三层的目录的,结果返回的却是错误 然后在Stack Overflow中看到了以下说法 https://stackoverflow.com/questions/7783308/os-path-dirname-file-returns-empty 上面的大概意 ...
分类:
其他好文 时间:
2017-06-29 11:18:04
阅读次数:
134
第一种,利用math.round var original=28.4531) //round "original" to two decimalsvar result=Math.round(original*100)/100; //returns 28.452) // round "original ...
分类:
Web程序 时间:
2017-06-28 20:19:12
阅读次数:
346
---------------------------------------------------
-----解析字符串函数-----
---------------------------------------------------
CREATEFUNCTION[dbo].[fn_split](@p_strVARCHAR(8000),@p_splitVARCHAR(10))
RETURNS@tabTABLE(tidVARCHAR(2000))
AS
BEGIN
DECLARE@idxI..
分类:
数据库 时间:
2017-06-28 18:45:58
阅读次数:
193
最近工作中有需要一个需求,就是把一个服务地址生成二维码,可以用来扫码分享,网上找了下方法也比较多,我这里po一下调用ZXing.dll库生成二维码的方法吧。先简单介绍一下 ZXing库,ZXing库是一个开源Java类库,可用于生成和解析多种格式的1D/2D条形码;zxing遵循Apache Lic ...
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit ...
分类:
其他好文 时间:
2017-06-27 00:05:04
阅读次数:
196
量化交易风险指标 风险指标数据有利于对策略进行一个客观的评价,主要风险指标包括: 策略收益(Total Returns) 策略年化收益(Total Annualized Returns) 基准收益(Benchmark Returns) 基准年化收益(Benchmark Annualized Retu ...
分类:
其他好文 时间:
2017-06-25 10:04:36
阅读次数:
333
tf.Graph.as_default() as_default(self) Returns a context manager that makes this `Graph` the default graph. This method should be used if you want to ...
分类:
其他好文 时间:
2017-06-24 09:57:41
阅读次数:
122
在我的工作中,广泛使用了 List 类型的引用变量,而引用的是具体的类 ArrayList。我们通常会使用 for 循环遍历一个 List,每一次循环为 List 调用的 get 方法传入一个循环变量,这样就取到了具体位置的元素,并进行业务上的处理。那么,我们为什么需要 Iterator 接口? 通 ...
分类:
其他好文 时间:
2017-06-22 13:14:38
阅读次数:
230
Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack. 题意:判断一个字符是否在另一个中,若是,则返 ...
分类:
其他好文 时间:
2017-06-21 21:10:35
阅读次数:
162