编写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
常用的几个 annotation
介绍@Before:初始化方法@After:释放资源@Test:测试方法,在这里可以测试期望异常和超时时间@Ignore:忽略的测试方法@BeforeClass:针对所有测试...
分类:
编程语言 时间:
2014-05-26 09:32:04
阅读次数:
302
//一般处理,无参数示例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
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
function a(){ document.getElementById("test").value
= document.getElementById("test").value.toUpperCase();}function b(){
document.getElementById("test...
分类:
Web程序 时间:
2014-05-26 08:16:22
阅读次数:
265
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
1. 最简单的情形 public void main(){ String s =
test(); System.out.println("s=[" + s + "]"); } public String test(){ String...
分类:
编程语言 时间:
2014-05-26 06:43:27
阅读次数:
194
程序可以读取同目录下的config.ini文件中的配置来实现开机自启动。
config.ini文件地格式实例如下:
[Main]
KeyName = test
ProcessPath = D:\bin\test.exe
其中KeyName字段为写入注册表的表项名称(可以设置为程序名)
ProcessPath为程序的完整路径
程序的完整源代码如下。
regedit...
因为网页上还有其他内容,所以header("Content-type:image/jpeg");
位置已经被占用,验证码不能出现了,就会出现图像“http://localhost/**.php”因其本身有错,无法显示”那么,解决这个问题的最简单的办法就是,直接删除header("Content-ty...
分类:
Web程序 时间:
2014-05-24 10:29:56
阅读次数:
308
举例说:脚本名称叫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