- 博客(11)
- 资源 (3)
- 收藏
- 关注
原创 算法 线性排序-计数排序
public class BaseSort { public static int[] sort(int a[]) { int max = Integer.MIN_VALUE; for (int i = 0; i < a.length; i++) if (a[i] > max) m...
2015-06-17 16:14:45 350
原创 算法 线性排序-区间法
public class Sort { public static int[] sort(int[] a) { int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; Map<Integer, Integer> counts = new HashMap<Int...
2015-06-17 15:19:40 451
原创 java udp 客户端
public class Client {public static void main(String[] args) {try {DatagramSocket ds = new DatagramSocket();byte[] buf = "login".getBytes();DatagramPacket data = new DatagramPacke...
2015-06-16 17:56:57 678
原创 java udp 服务端
public class Server {public static void main(String[] args) {try {DatagramSocket ds = new DatagramSocket(new InetSocketAddress(8888));while (true) {ByteArrayOutputStream baos ...
2015-06-16 17:55:21 561
原创 android 三星手机拍照各种奇葩问题
1.界面重启问题解决方法:重载onConfigurationChanged方法@Overridepublic void onConfigurationChanged(Configuration newConfig) {super.onConfigurationChanged(newConfig);}manifest配置activity时加上android:con...
2015-06-16 17:36:48 519
原创 html 垂直对齐
<div> <span style="vertical-align: middle;">A</span> <button style="vertical-align: middle;">B</button></div>
2015-06-16 17:16:13 562
原创 html css 水平 垂直 居中
<div style="display:table;width: 100%;height: 100%;"><divstyle="display: table-cell; vertical-align: middle;background: green;text-align: center;"><span style="bac...
2015-06-16 15:55:21 387
原创 android 圆角 圆形 图片 背景 selector 技巧
selector 配置圆形背景<shape xmlns:android="http://schemas.android.com/apk/res/android" > <stroke android:width="2dp" android:color="#817F80" /> <padding a...
2015-06-16 14:57:36 686
原创 android ellipsize marquee 滚动文本正确配置
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="ffdsfdisjfiodsjoifjdoisjoiewrioeuwiofjdksjfkldsjk...
2015-06-16 14:37:32 1610
原创 android 100行代码实现 仿苹果滑动选择器WheelView
效果源码public class WheelView extends ListView {private List<Integer> datas = new ArrayList<Integer>();private BaseAdapter adapter;public WheelView(Context context, Attribut...
2015-06-16 11:55:12 2613
原创 android 技术总结 图片优化 sqlite使用 Fragment使用
一.图片优化/*** 1.recycle-及时回收,防OOM* 2.RGB_565-节约内存* 3.cache-加载速度快* 4.png->jpg-节约内存* 5.点9图片-节约内存* 6.图片压缩-节约内存* 7.decodeStream-节约内存* 8.多套图片-支持分辨率屏幕* 9.ThreadPool加载-防卡*/二.sqlite使用/**...
2015-06-16 11:13:08 768
设置头像 头像设置 拍照 从相册获取
2013-09-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人