`
cyhcheng
  • 浏览: 57931 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表

ldap入门

String ldapHost = "ldap://ldapHostName:389"; // ldap host + port number String DN = "OU=Software,OU=China,DC=yinghua,DC=com,DC=cn";//OU组织树,DC域名         Properties props = new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory&quo ...
好长时间没做struts2项目了,最近在做的时候在带select的数据校验这块居然卡壳了,所以写了个小例子,收藏起来。 用到的jar: commons-fileupload-1.2.1.jar commons-io-1.3.2.jar freemarker-2.3.15.jar jstl.jar ognl-2.7.3.jar standard.jar struts2-core-2.1.8.1.jar xwork-core-2.1.6.jar jsp页面代码: <%@ page language="java" contentType=" ...

varnish

    博客分类:
  • web
varnish一个高性能的web加速器,是freebsd的内核开发人员的作品。  
今天在向模拟器部署运行项目时碰到下面的异常:   [2012-02-15 13:22:14 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host [2012-02-15 13:22:14 - Unexpected error while launching logcat. Try reselecting the device.] An existing connection was forcibly closed by the remote ho ...

Layout动画入门

针对Layout或者ViewGroup对象,可以方便的通过xml中的layoutAnimation属性定义动画效果,通过persistentDrawingCache定义动画的影响范围,来提高性能。 定义动画: <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator" > <scale android ...

国内优秀的AJax框架

    博客分类:
  • web
网址:http://www.edojs.com/ 学习站点: http://www.dev26.com/ http://www.cssrain.cn/

逐帧动画入门

简单来讲,逐帧动画就是将一幅一幅图连起来播放,指定每一帧的持续时间,一般动画图片不要太大,否则会发生内存溢出异常。 主要要点: 1、定义动画资源,范例如下:   <animation-list xmlns:android="http://schemas.android.com ...
drop user zhaojing@localhost; grant all privileges on zhaojingdb.* to zhaojing@localhost identified by 'doyouloveme';

杂项记录

    博客分类:
  • web
今天在使用firefox时,莫名其妙的不能使用firebug了,发现在firebug提示:隐私浏览模式下站点将不被记录。解决办法详见:http://support.mozilla.com/zh-CN/kb/隐私浏览。  
最近公司有个小项目,3个表,所以想拿spring mvc尝试下,为以后使用grails开发项目做个铺垫。在spring+hibernate+spring mvc这几块中,前两个都没啥问题,虽然好长时间没拿他们做东西了,但spring mvc还是初次接触。网上资料很多,不过本人第一喜欢官方文档、第二就是有能运行的范例了。下面的网址不错,收录下: http://www.springbyexample.org/examples/index.html
SimpleMenuActivity.java代码: package org.penguin.study.android.menu; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; impor ...

Sqlite入门

在Android下,对Sqlite3进行了封装,使用相对更简单了。下面的代码主要实现了数据库的安装、升级、添加、查询等功能,至于修改、删除也非常容易实现。并实现了对长时间按键的处理。 MainActivity.java的代码:   package org.penguin.study.android.sqlite3; import android.app.Activity; import android.app.AlertDialog; import android.content.ContentValues; import android.content.Context; i ...

Thymeleaf入门

    博客分类:
  • java
由于本人对HTML5比较有兴趣,看到资讯里Thymeleaf 1.1.1 发布,基于Java的XML/XHTML/HTML5模板引擎。牛人的东西,所以抽时间看了看,感觉不错,抛开性能的问题,本人感觉上手比较容易。模版userdetail.html保存在/WEB-INF/templates。采用javaee5。 下面将主要代码贴出来: 1、域类User.java非常简单:   package org.penguin.study.thymeleaf.domains; import java.io.Serializable; import java.util.Date; import ...
eclipse下使用正则表达式:^\s*\d+\.  :删除类似于1.这样的行首字符。 editplus下使用正则表达式:(^[0-9]+\.) :删除类似于1.这样的行首字符。
MongoDB可以说是最流行的分布式文件存储的数据库。今天看到发布2.0正式发布。所以看了看,先写个简单的例子。下次morphia,再完成一个较完整的范例。 1、用到的数据库:mongodb-win32-i386-2.0.0.zip、驱动:、mongo-2.6.5.jar,均可从官方站点下载下来。 2、享用首先得启动服务器: mongod.exe --dbpath D:/mongodb 制定数据文件存放在D:/mongodb目录下 3、通过浏览器浏览数据: http://127.0.0.1:28017/ 4、范例代码: package org.penguin.study.mon ...
Global site tag (gtag.js) - Google Analytics