0%

【说明】刚刚才发现有这么多的回复!没想到这篇文章会这么容易被吐槽!看了回复,我明白了有些人是想保持去重后的顺序。看来我当时写的时候真应该再多敲两个字,就不会被拍砖了!要保持顺序当然就不能这么写了,大家可以自己去 stackoverflow 搜下便知。现在特此说明下:我当时只是想把去重后的数据放到 SQL 的 in 里,所以顺序对我来说不重要。如果大家有更好的方法或心得,欢迎继续讨论啊!十分常见的问题,但是今天我找到一个很简单的方法(不同于在网站搜索到的大多数解决方法哟!): 12345678// ids is your String list.List<String> ids = ...
阅读全文 »

原文地址:5 Tips for More Efficient jQuery Selectorshttp://www.sitepoint.com/efficient-jquery-selectors/ As the name implies, jQuery focuses on queries. The core of the library allows you to find DOM elements using CSS selector syntax and run methods on that collection. jQuery uses native browser API met ...
阅读全文 »

原文地址:http://webdesignledger.com/resources/best-jquery-plugins-of-2012Arctext.jsArctext.js is a jQuery plugin that let’s you do exactly that. Based on Lettering.js, it calculates the right rotation of each letter and distributes the letters equally across the imaginary arc of the given radius.Jquery ...
阅读全文 »

原文地址:http://feilong.org/shortest-ie6-judge-means常用的JavaScript检测浏览器为IE是哪个版本的代码。包括是否是最人极端厌恶的ie6识别与检测。 12345678910111213var isIE=!!window.ActiveXObject;var isIE6=isIE&&!window.XMLHttpRequest;var isIE8=isIE&&!!document.documentMode;var isIE7=isIE&&!isIE6&&!isIE8;if (isIE) ...
阅读全文 »

PIE makes Internet Explorer 6-9 capable of rendering several of the most useful CSS3 decoration features.http://css3pie.com/**Supported CSS3 Features** border-radius box-shadow border-image CSS3 Backgrounds (-pie-background) Gradients RGBA Color Values PIE Custom Properties -pie-watch-ancestors PNG ...
阅读全文 »

用语详细说明及公式详见官方地址:http://jmeter.apache.org/usermanual/glossary.html#Throughput Throughput = (number of requests) / (total time)total time = 测试结束时间 - 测试开始时间测试结束时间 = MAX(请求开始时间 + Elapsed Time)测试开始时间 = MIN(请求开始时间)若没有选中 “Successes” 时,其 Throughput 是包含出错的请求的 Throughput。若选中 “Successe ...
阅读全文 »

大家可以参看原文:http://stackoverflow.com/questions/363681/generating-random-number-in-a-range-with-java里面有各种详细的讨论。 生成 [min, max] 之间的随机数(包含 min,也包含 max):Min + (int)(Math.random() * ((Max - Min) + 1))或者(new Random()).nextInt(max - min + 1) + min 生成 [min, max) 之间的随机数(包含 min,但不包含 max):(new Random()).nextInt(ma ...
阅读全文 »

原文地址:http://www.blogjava.net/lhulcn618/archive/2010/02/21/313522.html需求描述:从 0 到 n 之间选 k 个不重复的数组成一个序列。伪代码如下: 12345678910for(i = 0; i < n; i++){ x[i] = i;}for(i = 0; i < k; i++){t = rand(i,n-1); swap(x[i], x[t]); out(x[i]);} 其中,rand(a,b) 产生一个 a 到 b 之间的随机数,swap(a,b) 交换 a 和 b 的 ...
阅读全文 »

原文地址:http://www.eclipse.org/forums/index.php/m/660152/问题:使用 ResourceBundle.getBundle 时,提示“Can’t find bundle for base name …”?原因:调用 ResourceBundle.getBundle 方法时,没有指定 package。例如:如下代码无法访问到指定的文言: 12345678910package <package>;import java.util.Locale;import java.util.ResourceBundle;public class Simp ...
阅读全文 »

前两天我玩了一个数独,花了我好长时间才解开。玩数独也有一段时间了,不过这个是我遇到的有最多解法的数独,居然有 343 种不同的解法。感兴趣的同学也可以试一下啊! 7 . . | . . . | 5 . 1 2 . 3 |1 . 7| . . . . 6 1 | . . . | . . . ---+ ---+ --- 8 . . | . 6 .| . . . 4 . . |5 . . | . . 3 . . 5 |9 . 2| 8 . . ---+ ---+ --- 9 . . | .4 1| . 6 . . . . | . . . | 1 4 . . 4 . | 8. . | . . . FY ...
阅读全文 »