码迷,mamicode.com
首页 >  
搜索关键字:test    ( 33746个结果
Linux崩溃时启动脚本获取进程相关信息
编写test.cpp #include #include #include #include #include void terminate_handler(){ char cmdline[1024] = {0,}; sprintf(cmdline, "bash term.sh %d %d", ge...
分类:系统相关   时间:2014-05-26 09:34:23    阅读次数:392
JUnit 4 使用 Java 5 中的注解(annotation)
JUnit 4 使用 Java 5 中的注解(annotation),以下是JUnit 4 常用的几个 annotation 介绍@Before:初始化方法@After:释放资源@Test:测试方法,在这里可以测试期望异常和超时时间@Ignore:忽略的测试方法@BeforeClass:针对所有测试...
分类:编程语言   时间:2014-05-26 09:32:04    阅读次数:302
MVC里使用JSON方法集锦
//一般处理,无参数示例public JsonResult Test(){ Something... return Json{new{Success=true,Msg="Error!",...}}; //return Json(new{Success=fals,Msg="ok",...},Js...
分类:Web程序   时间:2014-05-26 08:44:39    阅读次数:326
MVC 返回ActionResult 类型
1. Content() 返回文本类型,比如"Hello World!".2.File() 返回文件类型,如PDF,JPG.3.HttpNotFound() 返回404 HTTP 状态码.4.JavaScript() 返回Javascipt 内容. 如 function test(){al...
分类:Web程序   时间:2014-05-26 08:27:06    阅读次数:400
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
Windows下通过写注册表的方式实现程序开机自启动
程序可以读取同目录下的config.ini文件中的配置来实现开机自启动。 config.ini文件地格式实例如下: [Main] KeyName = test ProcessPath = D:\bin\test.exe 其中KeyName字段为写入注册表的表项名称(可以设置为程序名) ProcessPath为程序的完整路径 程序的完整源代码如下。 regedit...
分类:Windows程序   时间:2014-05-26 03:19:31    阅读次数:389
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
迷上了代码!