码迷,mamicode.com
首页 >  
搜索关键字:public    ( 82854个结果
实现简洁版的string类
#include<iostream> usingnamespcestd; classString { public: String() :_str(newchar[1]) { _str=‘\0‘; } String(constchar*str)//一个字符串的拷贝 :_str(newchar[strlen(str)+1] { strcpy(_str,str); } String(constString&str)//一个对象的拷贝 :_str(NULL) { S..
分类:其他好文   时间:2016-05-10 15:24:25    阅读次数:170
位图的实现
#include<iostream> usingnamespacestd; #include<vector> classBitMap { public: BitMap() :_size(0) {} BitMap(size_tsize) :_size(0) { _array.resize((size>>5)+1); } voidSet(size_tnum) { size_tindex=num>>5;//这是求的第几个字节 size_tn=num%..
分类:其他好文   时间:2016-05-10 15:24:01    阅读次数:121
Android ——对HandlerThread的理解和注意事项
源码分析public class HandlerThread extends Thread { int mPriority;// 指定线程优先级 int mTid = -1; Looper mLooper; public HandlerThread(String name) { super(name); mPriority = Proce...
分类:移动开发   时间:2016-05-10 13:00:14    阅读次数:257
[剑指offer] 合并两个排序链表
题目描述 输入两个单调递增的链表,输出两个链表合成后的链表,当然我们需要合成后的链表满足单调不减规则。 输入描述 两个单调递增的链表 输出描述 一个单调不减的链表 题目分析节点申明:public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val...
分类:编程语言   时间:2016-05-10 12:56:49    阅读次数:247
java、C#配套版AES加密
java版加密:public static String aesEncrypt(String str, String key) throws Exception { if (str == null || key == null) return null; Cipher cipher = Cipher... ...
分类:编程语言   时间:2016-05-10 12:43:29    阅读次数:365
冒泡排序
package lianxi; import java.util.*; public class Maopaopaixu { public static void main(String[] args) { //输入数字 并把数字插入数组中 Scanner shu=new Scanner(Syste ...
分类:编程语言   时间:2016-05-10 12:32:56    阅读次数:146
java Timer 定时每天凌晨1点执行任务
转载别人的,用于以后学习。import java.util.TimerTask; /** * 执行内容 * @author admin_Hzw * */ public class Task extends TimerTask { public void run() { System.out.prin ...
分类:编程语言   时间:2016-05-10 12:27:51    阅读次数:290
Nginx 502gateway错误故障解决
默认WDCP是以端口号作为转发的修改成socket方式比较好。server{ listen80; server_nameadmin.yeshuai.com; root/www/web/admin_yeshuai_com/public_html; indexindex.htmlindex.phpindex.htm; error_page400/errpage/400.html; error_page403/errpage/403.html; error_page404/..
分类:其他好文   时间:2016-05-10 11:11:57    阅读次数:195
unity 背景 按钮 场景跳转
public Texture2D pic; private bool Cl = false; void OnGUI() { GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), pic); GUIStyle style = new ...
分类:编程语言   时间:2016-05-10 09:44:11    阅读次数:468
Android学习(48) -- 获取xml文件并解析.
1、根据xml的格式创建JavaBean public class News { private String title; private String detail; private String comment; private String imageUrl; @Override public String toString() { return "News [ti...
分类:移动开发   时间:2016-05-10 07:20:28    阅读次数:236
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!