redis简单调用jar包:jedis-2.1.0.jar commons-pool-1.5.4.jarpublic static void main(String[] args) {Jedis jedis = new Jedis("192.168.1.125");jedis.set("lsf...
分类:
其他好文 时间:
2015-04-03 00:15:00
阅读次数:
140
Ajax:可以无刷新状态更新页面,并且实现异步提交,提升了用户的体验。1.load()函数的使用,可以三个参数:url(必须的参数,请求html文件的url地址,参数类型string)、date(可选,发送的key/value数据,参数类型Object)、callback(可选,成功或失败的回调函数...
分类:
Web程序 时间:
2015-04-03 00:11:59
阅读次数:
226
public class Demo{ /* * 测试i++与++i在运算中的区别 */ public static void main(String[] args) { int i = 1; int j = 1; /*a的结果是1,证明i++是先不考虑++,在完成...
分类:
编程语言 时间:
2015-04-03 00:08:20
阅读次数:
203
基于方法:Object.hashCode();hashCode()的原理:hash值本身是一个散列码,简而言之就是每个Object都对应了一个hash值(int),所以hashcode的作用及时全局唯一标示;在同一运行环境下,hashcode值是唯一的,这样就可以区分在类实例在物理上不是一样的对象但...
分类:
移动开发 时间:
2015-04-03 00:07:20
阅读次数:
333
① 读出要修改的文件的内容② 进行修改③ 将修改后的内容写进文件index.php:{$content}"; //高亮显示PHP代码 //高亮显示字符串中的PHP代码 if(strlen($content)){ $newContent=highlight_string($co...
分类:
Web程序 时间:
2015-04-02 23:58:25
阅读次数:
311
我们以下面的类来说明一个基本的 Java 类的运行顺序: 1 public class Demo{ 2 private String name; 3 private int age; 4 public Demo(){ 5 name = "微学苑"; 6 ...
分类:
编程语言 时间:
2015-04-02 23:54:13
阅读次数:
223
今天先来编译一下ZeroMQ的示例程序。
首先要先安装zeromq,使用默认的选项./configure, make, make install。
然后是zeromq的server的示例代码
#include zmq.hpp>
#include string>
#include iostream>
#include unist...
分类:
其他好文 时间:
2015-04-02 22:40:04
阅读次数:
244
namespace index{ class Program { static void Main(string[] args) { while (true) { string s = "abcdefghijklmn"; int i = s.IndexOf("f"); // i是f在字符串s中的位置...
分类:
其他好文 时间:
2015-04-02 22:35:37
阅读次数:
119
public class GetStringSpell { /// /// 提取汉字首字母 /// /// 需要转换的字 /// 转换结果 public string GetChineseSpell(string strText) { ...
分类:
其他好文 时间:
2015-04-02 22:33:33
阅读次数:
210
第一、value是很多控件的值。比如说你把这个控件放到页面上,然后在浏览器中查看就是一个确定按钮。第二、如果你自定义一些字段的话,那么vs 2008开发工具默认的他的属性的值是value。比如,public static string Ziduan = “测试"; 然后你重构一下这个字段。publi...