码迷,mamicode.com
首页 >  
搜索关键字:test unit    ( 37884个结果
js字母大小写转换
function a(){ document.getElementById("test").value = document.getElementById("test").value.toUpperCase();}function b(){ document.getElementById("test...
分类:Web程序   时间:2014-05-26 08:16:22    阅读次数:265
jQuery常用方法
Attribute:$(”p”).addClass(css中定义的样式类型); 给某个元素添加样式$(”img”).attr({src:”test.jpg”,alt:”test Image”}); 给某个元素添加属性/值,参数是map$(”img”).attr(”src”,”test.jpg”); ...
分类:Web程序   时间:2014-05-26 07:55:20    阅读次数:409
Java中 return 和finally
1. 最简单的情形 public void main(){ String s = test(); System.out.println("s=[" + s + "]"); } public String test(){ String...
分类:编程语言   时间:2014-05-26 06:43:27    阅读次数:194
hadoop学习;hdfs操作;运行抛出权限异常: Permission denied;api查看源码方法;源码不停的向里循环;抽象类通过debug查找源码
package com.kane.hdfs; import java.io.InputStream; import java.net.URL; import org.apache.hadoop.fs.FsUrlStreamHandlerFactory; import org.apache.hadoop.io.IOUtils; public class Test {...
分类:Windows程序   时间:2014-05-26 05:05:27    阅读次数:382
Windows下通过写注册表的方式实现程序开机自启动
程序可以读取同目录下的config.ini文件中的配置来实现开机自启动。 config.ini文件地格式实例如下: [Main] KeyName = test ProcessPath = D:\bin\test.exe 其中KeyName字段为写入注册表的表项名称(可以设置为程序名) ProcessPath为程序的完整路径 程序的完整源代码如下。 regedit...
分类:Windows程序   时间:2014-05-26 03:19:31    阅读次数:389
java:IO-读写大文件
import java.io.*;class Test{ public static void main(String args[]){ FileInputStream fin =null; FileOutputStream fout = null; ...
分类:编程语言   时间:2014-05-26 02:13:16    阅读次数:333
趣味编程:静夜思(Java8版)
import java.util.stream.*; class KV{ String ch; int id; } public class Test { private static void print(String text, int offset) { IntStream.range(0, text.length()) .mapToObj(i -> new KV(){{c...
分类:编程语言   时间:2014-05-24 22:09:03    阅读次数:363
poj 3031 Big Christmas Tree(水spfa)
http://poj.org/problem?id=3013 题意: Because of a technical difficulty, price of an edge will be (sum of weights of all descendant nodes) × (unit price of the edge).这句话一直没看懂。后面还以为是最小生成树。 正确...
分类:其他好文   时间:2014-05-24 20:27:13    阅读次数:266
PHP验证码常见问题及解决办法 (http://localhost/Test/code.php因其本身有错无法显示)
因为网页上还有其他内容,所以header("Content-type:image/jpeg"); 位置已经被占用,验证码不能出现了,就会出现图像“http://localhost/**.php”因其本身有错,无法显示”那么,解决这个问题的最简单的办法就是,直接删除header("Content-ty...
分类:Web程序   时间:2014-05-24 10:29:56    阅读次数:308
linux $* $@ 特定位置参数
举例说:脚本名称叫test.sh 入参三个: 1 2 3运行test.sh 1 2 3后$*为"1 2 3"(一起被引号包住)$@为"1" "2" "3"(分别被包住)$#为3(参数数量)如脚本:#!/bin/shfor loop in "$*" do echo $loop done输出循环一...
分类:系统相关   时间:2014-05-24 10:09:30    阅读次数:304
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!