- 博客(22)
- 收藏
- 关注
原创 sql2
create table #tableNames(TableName varchar(255)) create table #aaa (num int ) declare @n int declare @dataTable varchar(255) insert into #tableNames(TableName) select...
2010-07-07 13:54:12 117
原创 sql
declare @tablename varchar(100) declare @sql nvarchar(4000) declare @Num int declare tb_cursor scroll cursor for select name from sysobjects where xty...
2010-07-07 13:53:32 87
原创 sql
create table A( stuName varchar(10), stuClass varchar(10), stuScroe float,)insert into A (stuName,stuClass,stuScroe)values('张三','数学',80)insert into A (stuName,stuClass,stuScro...
2010-07-07 13:52:55 91
原创 sybase查看表是否有数据
create table #tableNames(TableName varchar(255)) create table #aaa (num int ) declare @n int declare @dataTable varchar(255) insert into #tableNames(TableName) select...
2010-06-30 11:50:10 500
原创 sqlserver查看表是否有数据
declare @tablename varchar(100) declare @sql nvarchar(4000) declare @Num int declare tb_cursor scroll cursor for select name from sysobjects where xty...
2010-06-30 11:49:29 435
原创 n-m
取n到m行1. select top m * from tablename where id not in (select top n id from tablename order by id asc/*|desc*/) 2. select top m * into 临时表(或表变量) from tablename order by columnname -- 将top ...
2010-06-30 11:44:16 132
原创 drop
[code="java"]declare @n intdeclare @name varchar(255)declare @sql varchar(255)begincreate table #tablename(name varchar(255))insert into #tablenameselect name from tempdb..sysobjects...
2010-06-30 11:41:57 180
Ip截取
CREATE function getIp3 (@ip varchar(300),@count int ) RETURNS varchar(255) AS BEGIN declare @Index int declare @Part varchar(6) select @Inde...
2009-08-13 14:32:16 142
原创 同步和异步的区别
[quote]举个例子:普通B/S模式(同步)AJAX技术(异步)同步:提交请求->等待服务器处理->处理完毕返回 这个期间客户端浏览器不能干任何事异步: 请求通过事件触发->服务器处理(这是浏览器仍然可以作其他事情)->处理完毕-----------------------------------------------------------------------------...
2009-04-28 14:17:54 90
原创 创建线程的两种方式
[quote]一、什么是线程线程是一个程序内部的顺序控制流。线程和进程1. 进程:每个进程都有独立的代码和数据空间,进程切换开销大。2. 线程:轻量的进程,同一个线程共享代码和数据空间,每个线程有独立运行的栈和程序计数器(PC),线程切换的开销小。3. 在操作系统中能同时运行多个任务(程序)。4. ...
2009-04-27 17:33:31 98
项目打包为可执行文件.exe形式.自动设置环境变量
[quote]用Tiger Installer工具可以实现该功能.增加了环境参数的支持使用Env(变量名)可以取得环境变量。比如用户想要在Path环境变量中加入自己的变量"安装目录\Dll",用户可以在注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment项中加入名称为Path的字...
2009-04-17 17:32:25 478
图片批量下载zip包,中文乱码解决
用truezip-6.jar可以解决中文名称和中文路径等问题,因为用了 zipOut = new ZipOutputStream(out,"GBK");用ant.jar有时会出现问题.页面编码用:encodeURIComponent()后台解码用:URLDecoder.decode(files[i],"UTF-8")[b]Action[/b][quote]public...
2009-04-17 15:42:50 285
原创 xml解析技术
[b]Dom4jDemo[/b][quote]public class Dom4jDemo implements XmlDocument { public void createXml(String fileName) { Document document = DocumentHelper.createDocument(); ...
2009-04-17 14:48:59 80
原创 类的出始化顺序
public class InitialOrderTest { // 静态变量 public static String staticField = "静态变量"; // 变量 public String field = "变量"; ...
2009-04-17 14:44:05 84
单例模式
public class singl {private static singl s;private singl(){ }public static synchronized singl getsingl(){ if(s==null){ s=new singl(); } return s;} }
2009-04-17 14:42:19 81
递归和数组排序
public class testN { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub testN n=new testN(); double m = n.getall(5); S...
2009-04-17 14:39:09 112
简单的日期处理方法
public class WeekOfMonth { /** * @param args */ public static void main(String[] args) { String str = "2008-10-12"; SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); ...
2009-04-17 14:32:20 117
原创 输出二维数组
[quote]public class wwww { /* public static void main(String[] args) throws CloneNotSupportedException { Calendar cal = Calendar.getInstance(); //int year = cal.get(Calendar.YEAR); ...
2009-04-17 14:28:12 161
按照字节截取字符串,汉字不能截取半个.
public class substr { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub substr s= new substr(); String b = s.getString("我ABC汉DEF", 5...
2009-04-17 14:20:44 122
原创 字符串翻转
public class test { public static void main(String[] args) { String s="abcdefga"; /* char[] b=a.toCharArray(); System.out.println(b[0]); StringBuffer buf=new StringBuffer(); for (i...
2009-04-17 14:18:26 91
随机产生字符并且排序
[quote] public class random { public static void main(String argv[]) { StringBuffer oldstr=new StringBuffer(); StringBuffer newstr=new S...
2009-04-17 14:14:05 91
字符串中每个字符出现的次数
[quote]public class WordCounts { public static void main(String[] args){ String strTemp = "asdjfo8ifsdkfncnvfaklfdsa;"; Map tree = new HashMap(); char ch...
2009-04-17 14:07:56 121
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人