1 /*利用命令行参数输入一个整数,并判断该数字是否为奇数,如果是奇数,则用其作行数打印空心菱形 2 –PS:将字符串转换为数字的方法 3 ?int num=Integer.parseInt(String number);*/ 4 5 package com.gen; 6 public clas.....
分类:
其他好文 时间:
2014-08-01 19:22:22
阅读次数:
293
1 /*利用命令行参数输入三个整数,并对三个数字进行降序排列。 2 –PS:将字符串转换为数字的方法 3 ?int num=Integer.parseInt(String number);*/ 4 package com.gen; 5 6 public class ArgumentOrder {.....
分类:
其他好文 时间:
2014-08-01 19:21:22
阅读次数:
232
//
$(function () { // mousedown 鼠标按下
$("#btn1").mousedown(function () {
$("#btn1").val(parseInt($("#btn1").val()) + 1)
}) ...
分类:
其他好文 时间:
2014-07-31 20:59:53
阅读次数:
209
You are asked to calculate factorials of some small positive integers.InputAn integer t, 1 0){20 int num = Integer.parseInt(bf.readLine())...
分类:
其他好文 时间:
2014-07-31 20:05:57
阅读次数:
165
//
$(function () {
$("#div1").mouseover(function () {
$("#btn1").val(parseInt($("#btn1").val()) + 1)
})
//当鼠标进入div1的时候会触发mouseover事件,因为btn1...
分类:
其他好文 时间:
2014-07-31 17:11:49
阅读次数:
166
//yyyy-mm-ddfunction ChangeDateFormat(time) { if (time != null) { var date = new Date(parseInt(time.replace("/Date(", "").replace(")/", ""), 10)); var...
分类:
其他好文 时间:
2014-07-31 12:44:06
阅读次数:
219
字体闪烁function changeColor() { var color = "#336699|red"; color = color.split("|"); document.getElementById("blink").style.color = color[parseInt(Math.r...
分类:
其他好文 时间:
2014-07-31 12:14:26
阅读次数:
230
搜索网上的,数字格式化过余复杂,自己想了个简单方法,欢迎吐槽。简化说明:'123333' => 12.3万parseInt('123333') 字符串转整型parseInt('123333')/1000 先除以1000,预留小数位数Math.round(parseInt('123333')/1000...
分类:
Web程序 时间:
2014-07-29 13:42:58
阅读次数:
279
function formatMilliseconds(value) { var second = parseInt(value) / 1000; // second var minute = 0; // minute var ho...
分类:
编程语言 时间:
2014-07-23 20:40:55
阅读次数:
195
转型函数Number()可以用于任何数据类型,而另两个函数则专门用于把字符串转换成数值。这个3个函数对于同样的输入会有不同的结果。 Number()函数的转换规则如下: 如果是Boolean值,true和false将分别被转换为1和0 如果是是数字值,只是简单的传入和返回 如果是null...
分类:
其他好文 时间:
2014-07-23 16:22:31
阅读次数:
207