摘要: /*************************************/var some = 5var i = 0while i < 10{ i++guard i < some else { break }print(i)}/****************************... 阅读全文
posted @ 2015-12-18 10:51 egai 阅读(101) 评论(0) 推荐(0) 编辑
摘要: /*************************************/var a = "obdoc111"if a.hasSuffix("112") { print("yes")}else{ print("no")}/***********************************... 阅读全文
posted @ 2015-12-17 22:55 egai 阅读(114) 评论(0) 推荐(0) 编辑
摘要: import Foundationclass Hi{ init() { print("aaaa") } func sayHi(){ print("hi!~") }}class Hello:Hi { override func sayHi() { print("hi!~... 阅读全文
posted @ 2015-12-17 11:26 egai 阅读(182) 评论(0) 推荐(0) 编辑
摘要: import Foundationlet lable="wo ai ni"var a = 1var b=3print(String(a+b)+lable);import Foundationlet lable="wo ai ni"var a = 1var b=3print("\(a+b)"+labl... 阅读全文
posted @ 2015-12-16 21:13 egai 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 原来IAR 可以不用加VIOD,而STVD是必须要加的,不然出错. 阅读全文
posted @ 2014-07-12 22:37 egai 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 开始我用java测试移动文件的时候,wins都可以,当放到centos上的时候就无法移动文件了;最后发现时由于安装英文版的系统不支持中文,出现中文文件名乱码,所以移动不了;下面操作时在centos上安装中文支持:1)先下载并安装两个语言包:fonts-chinese-3.02-12.el5.noar... 阅读全文
posted @ 2014-05-05 21:39 egai 阅读(214) 评论(0) 推荐(0) 编辑
摘要: import java.util.Random;class t1{public static void main(String[] args){ Random random1 = new Random(); char a; String b=""; for(int j=0;j='0' && a='A' && a='a' && a<='z')) { // System.out.println(a); b=b+a; } if(b.length()==32) { 阅读全文
posted @ 2014-04-09 20:19 egai 阅读(2600) 评论(0) 推荐(0) 编辑
摘要: 程序编译javac -encoding GBK -d . *.java程序运行java javatest.Main本地数据库导出C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -uroot -p root udp >2.sql;mysql -u r... 阅读全文
posted @ 2014-04-08 22:34 egai 阅读(216) 评论(0) 推荐(0) 编辑
摘要: import java.util.Timer;import java.text.SimpleDateFormat;import java.util.Date;import java.util.TimerTask;class MyTask extends TimerTask{ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public void run(){ System.out.println(sdf.format(new Date())); }}public class t1{ pu 阅读全文
posted @ 2014-04-03 15:09 egai 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 不要使用mysql的关键字,如key. 2014.4.131.获取最大值 String device_sql= "select max(id) id from user";2.创建一条数据String create_sql="insert into unit (user_id,device_id,i... 阅读全文
posted @ 2014-03-26 11:24 egai 阅读(208) 评论(0) 推荐(0) 编辑