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
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 {...
程序可以读取同目录下的config.ini文件中的配置来实现开机自启动。
config.ini文件地格式实例如下:
[Main]
KeyName = test
ProcessPath = D:\bin\test.exe
其中KeyName字段为写入注册表的表项名称(可以设置为程序名)
ProcessPath为程序的完整路径
程序的完整源代码如下。
regedit...
import java.io.*;class Test{ public static void
main(String args[]){ FileInputStream fin =null; FileOutputStream fout = null;
...
分类:
编程语言 时间:
2014-05-26 02:13:16
阅读次数:
333
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
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
因为网页上还有其他内容,所以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