- 博客(14)
- 收藏
- 关注
原创 使用ProcessBuilder创建process时,BufferedReader.readLine()超时
在Java中,用ProcessBuilder创建一个Process,向cmd输入命令,拿到正常输出和error,方法如下:String cmds = ...;ProcessBuilder builder = new ProcessBuilder("cmd"); builder.redirectErrorStream(true); //将error和正常输出都转换到输出,用getIn
2016-08-05 18:13:47
2926
原创 重置表单
有些时候用户点击reset或者cancle时,我们要重置这个表单(form),看看这个方法:function cancel(event){var inputs = document.getElementsByTagName("input");for (var i = 0; i if (inputs[i].getAttribute("type") === "checkbox
2016-08-02 12:17:42
405
原创 Svg Linear Gradient
使用 svg 里的 gradient 可以轻松为图形设置渐变色、逐渐变化的透明度。简单来说,在是先定义一个linear gradient,设置几个stop,就是起止点,定义他们相应的颜色、透明度等其他属性。其他图形应用这个lineargradient 就可以了。看个例子:如果x1和x2相同,y1和y2不同,就是垂直改变。如果x1和x2
2016-08-02 11:44:57
712
原创 对长字符串进行省略加...
wrap = function(id, maxLen) {var me = d3.select(id);var textLength = me.node().getComputedTextLength();var text = me.text();while (textLength > maxLen && text.length > 0) {text = text.slice(
2016-06-22 14:20:18
283
原创 Ext miscellany 整理
Initial a load mask.newExt.LoadMask( el, config ) :Parametersel : MixedThe element or DOM node, or its idconfig : ObjectThe config objectExt相关链接 http://docs.sen
2016-06-22 14:10:03
269
原创 event.y 与 event.clientY在不同浏览器下的异同
In Chrome, event.y = event.clientY They are mouse event y locationIn IE,event.y != event.clientY event.clinetY is mouse event y location. While event.y is not.In Firefox,There is no event.y
2016-06-22 14:00:56
605
原创 Js miscellany 整理
对选择的内容加tool tip,selection.qtip(function( parameters ) {...});
2016-06-21 15:50:41
204
原创 d3 miscellany 整理
在d3中对class的操作:添加class :selection.classed("class-name", true);删除class : selection.classed("class-name", false);相关链接 http://jaketrent.com/post/d3-class-operations/
2016-06-21 15:34:03
237
原创 Ext ComboBox displayField 与 valueField 的不同
Ext ComboBox 中有两个property,一个是valueField,另一个是displayField。这两个属性都绑定到store的值上,valueField上的值,就是ComboBox 里的value(比如ID);而displayField的值,则是你想在ComboBox里显示给用户看到的值(比如name),也可以与valueField上的值相同,具体与store中的data有关
2016-06-21 15:19:34
1245
原创 Display inline-block property
display 的 default value 是 inline,相当于,不分行。若是block,相当于,分行。inline-block,从外在来看相当于inline level,而里面是block level。W3Schools 相关链接 http://www.w3schools.com/cssref/pr_class_display.asp
2016-06-21 15:05:22
300
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人