不归家的夜

导航

2013年8月2日 #

简单的记事本

摘要: 就一个自己做得简单的记事本,几年前的了form2.h//登陆界面 private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) { textBox2->PasswordChar=checkBox1->Checked ? 0 : '*’;} //显示密码checkBox按钮private: System::Void button1_Click(System::Object^ sender, Sys... 阅读全文

posted @ 2013-08-02 23:39 不归家的夜 阅读(273) 评论(0) 推荐(0)

Android 绿豆蛙版连连看(简陋版)

摘要: (里面有六张绿豆蛙的图片)1、选中会有红色框2、可以直线连(横竖相邻或是横竖间隔空格)3、可以拐一次弯连接4、可以拐两次弯连接5、连接时会有线显示6、绿色代表进度条,蓝色代表时间条import android.content.Context;import android.graphics.Bitmap;import android.graphics.BitmapFactory;public class Getpic { public static Bitmap createBitmap(Context context,int resId){ Bitmap map = BitmapFacto.. 阅读全文

posted @ 2013-08-02 22:28 不归家的夜 阅读(251) 评论(0) 推荐(0)

android贪吃蛇(超级简陋版)

摘要: public class body { public int ax;//代表X周变量 public int ay;//代表Y轴变量 public int getAx() { return ax; } public void setAx(int ax) { this.ax = ax; } public int getAy() { return ay; } public void setAy(int ay) { this.ay = ay; } public body(int a, int b){//构造函数 this.ax = a; this.ay = b; }}import andr... 阅读全文

posted @ 2013-08-02 22:13 不归家的夜 阅读(1134) 评论(0) 推荐(0)

面试算法题

摘要: A、B均为一个五位数且满足以下条件:1、 A+20085=B2、A里面的所有数字不重复3、B里面的所有数字不重复4、A与B之间的数字不能重复即A、B这两个五位数是由0~9十个数字组成的相互之间不重复的数且满足A+20085=B求打印满足条件的A、Bpublic class sum { public static void main(String[] args) { for (int i = 10234; i < 99999-20085; i++) { char [] charArray = String.valueOf(i).toCharArray(); boolean boo = .. 阅读全文

posted @ 2013-08-02 22:00 不归家的夜 阅读(211) 评论(0) 推荐(0)

排列组合的例子

摘要: 给出ABCD,求出所有排列组合的算法 4!=4*3*2*1=24分析算法:如果A在第一位,那么B不能在第一位,而C不能在A和B的位置,D不能在A、B、C的位置如果A在第二位,那么B不能。。。。。。用for循环即表示遇到位置相等则跳出当前循环import java.util.ArrayList;import java.util.List;public class order { public static void main(String[] args) { getorder("ABCD"); } public static void getorder(String tare 阅读全文

posted @ 2013-08-02 21:49 不归家的夜 阅读(576) 评论(0) 推荐(0)

关于递归效率问题

摘要: 有如下整数:初始数据:a=1,b=1c=a+b=2;c=2; d=c+b=3;c=2; d=3; e=c+d=5c=2; d=3; e=5; f=d+e=8;................................他们组成如下有规律的数列:2 3 5 8 13 21 34 55要求打印该规律数列50个来测试for循环和递归的效率:public class TestDG { public static void main(String[] args) { // 2 3 5 8 13 21 34 5... 阅读全文

posted @ 2013-08-02 21:24 不归家的夜 阅读(244) 评论(0) 推荐(0)

关于字符串连接

摘要: 对采用+、concat、StringBuffer、StringBuilder的连接效率问题,做了一个简单的测试public class TestTime { public static void main(String[] args) { String s = "0"; long startTime = System.currentTimeMillis(); for ( int i = 0; i < 50000; i++) { s+="0"; } long endTime = System.currentTimeMillis(); System.o 阅读全文

posted @ 2013-08-02 17:39 不归家的夜 阅读(138) 评论(0) 推荐(0)