自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(76)
  • 资源 (3)
  • 收藏
  • 关注

原创 LeetCode String to Integer(atoi)

public class Solution { public int atoi(String str) { if (str == null || str.length() < 1) return 0; str = str.trim(); char sign = '+'; int i = 0;

2014-04-29 19:36:14 538

原创 LeetCode Longest Palindromic Substring(最长回文子串)

public class Solution { public String longestPalindrome(String s) { int len = s.length(); if (len <= 1) return s; boolean[][] table = new boolean[len][len];

2014-04-29 19:20:02 631

原创 UVa229 - Scanner(枚举技巧)

Scanner A body scanner works by scanning a succession of horizontal slices through the body; the slices are imaged one at a time. The image slices can be reassembled to form a three dime

2014-04-28 21:47:16 861

原创 Bitmap的使用(三)

打开相册:Intent intent = new Intent(Intent.ACTION_PICK,

2014-04-22 21:52:09 970

原创 UVa219 - Department of Redundancy Department(DFS)

Department of Redundancy Department When designing tables for a relational database, a functional dependency (FD) is used to express the relationship between the different fields. A func

2014-04-22 17:17:59 683

原创 Bitmap的使用(二)

开启图片抓拍,同时设置存储文件名:imageFilePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "a.jpg";Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);i.putExtra(android.

2014-04-21 22:53:53 676

原创 Bitmap的使用(一)

BitmapFactory.decodeResource(Resources, int id)package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.graphics.BitmapFactory;import android.graphics

2014-04-21 21:32:50 638

原创 UVa11968 - In The Airport

R  — In The AirportTime Limit: 1 secMemory Limit: 32 MBIt’s a Wednesday night and Bob is sitting at the airport and waiting for an airplain to Lithuania. The challenge he is facing is to c

2014-04-19 22:17:38 690

原创 UVa11413 - Fill the Containers(最大值最小化问题)

Problem C : Fill the ContainersTime Limit: 1 secA conveyor belt has a number of vessels of different capacities each filled to brim with milk. The milk from conveyor belt is to be filled i

2014-04-19 20:49:38 1691

原创 UVa11549 - Calculator Conundrum (Floyd判圈法)

Problem CCALCULATOR CONUNDRUMAlice got a hold of an old calculator that can display n digits. She was bored enough to come up with the following time waster.She enters a number k then repe

2014-04-19 19:30:48 759

原创 Java中的线程和同步

1、怎样使一个方法是线程安全的?下面的方法是线程安全的吗?怎么使它线程安全?

2014-04-19 00:29:10 630

原创 画弧

画图主要是在View的onDraw(Canvas canvas)操作

2014-04-18 23:30:50 747

原创 ViewFlipper的使用

ViewFlipper显示文本,点击按钮,jof

2014-04-18 22:18:18 655

原创 TimePicker的使用

设置TimePicker的时间,会用到TimePickerDialog,设置时要重载on

2014-04-18 22:02:22 977

原创 TextWatcher的使用

实现接口的三个方法public void afterTextChanged(Editable s)public void beforeTextChanged(CharSequence s, int start, int count, int after) { }public void onTextChanged(CharSequence s, int start, int before

2014-04-17 21:45:44 1107

原创 TextSwitcher的使用(一)

创建文本变化的动画效果package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.view.Gravity;import android.view.View;import android.view.animation.Animation;impo

2014-04-17 21:31:48 1198

原创 TabHost的使用(三):动态添加Tab

package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.widget.TabHost;import android.widget.Button;import android.view.View;import android.widget.An

2014-04-17 21:20:52 1746

原创 TabHost的使用(二):实现TabHost.TabContentFactory接口

实现TabHost.TabContentFactory接口,要实现public View createTabContent(String text)

2014-04-17 21:01:45 1433

原创 TabHost的使用(一)

添加两个tab,一个放时钟,一个放按钮package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.widget.TabHost;public class MainActivity extends Activity { @Over

2014-04-17 20:52:10 654

原创 java中文件操作

java中创建文件、目录非常容易

2014-04-16 23:49:19 822

原创 SurfaceHolder的使用

package com.example.androidtest;import android.app.Activity;import android.graphics.Canvas;import android.graphics.Paint;import android.os.Bundle;import android.util.Log;import android.view.Key

2014-04-16 22:39:06 3387

原创 Spinner的使用(一):与ArrayAdapter的配合使用

在处理Spinner的OnItemSelectedListener时,要重写接口的两个方法:public void onItemSelected(AdapterV

2014-04-16 22:23:29 871

原创 SlidingDrawer的使用(一)

在资源文件中布局SlidingDrawer,而SlidingDrawer中放置一个ImageView和一个AnalogClo

2014-04-16 22:10:39 585

原创 SeekBar的使用(二):控制Button的缩放,移动及旋转

package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.widget.Button;import android.widget.SeekBar;import android.util.Log;public class MainActivit

2014-04-16 22:03:08 1207

原创 SeekBar的使用(一):实现OnSeekBarChangListener

实现OnSeekBarChangeListener,要实现该接口的三个方法public void on

2014-04-16 21:50:11 3217 1

原创 UVa941 - Permutations

A permutation of a string is the set of all possible ways to combine its characters. E.g., the permutation of "abc" is {"abc", "acb", "bac", "bca", "cab", "cba"}. The size of this set is the factorial

2014-04-16 21:01:51 703

原创 hdu1027 Ignatius and the Princess II(排列问题)

Problem DescriptionNow our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebub has to beat our hero first.

2014-04-15 23:41:24 1011

原创 Java中的异常

1、可检测和不可检测总体来说,可检测异常必须

2014-04-15 19:53:29 626

原创 ImageSwitcher的使用(一):与Gallery配合使用

package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.content.Context;import android.content.res.TypedArray;import android.view.View;import android

2014-04-15 19:10:17 663

原创 HashMap、TreeMap、Hashable和LinkedHashMap

Map是最重要的数据结构之一。开始会告诉怎么

2014-04-14 23:03:33 739

原创 ArrayList、LinkedList和Vector

1、List概述List,正如其名,是

2014-04-14 22:35:08 568

原创 GridView的使用(三):与SimpleCursorAdapter搭配使用

package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.database.Cursor;import android.provider.Contacts.People;import android.widget.GridView;import

2014-04-14 21:58:18 990

原创 GridView的使用(二):与BaseAdapter搭配使用

package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.content.Context;import android.view.View;import android.view.ViewGroup;import android.widget.

2014-04-14 21:40:08 1433

原创 GridView的使用(一):与ArrayAdapter搭配使用

package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.content.Context;import android.view.View;import android.view.ViewGroup;import android.widget.

2014-04-14 21:26:04 2191

原创 Gallery的使用(二):显示抓拍的图片

package com.example.androidtest;import android.os.Bundle;import android.app.Activity;import android.database.Cursor;import android.graphics.Bitmap;import android.graphics.BitmapFactory;import a

2014-04-13 11:33:59 627

原创 Gallery的使用(一)

Gallerty组件一般用于显示图像列表,Gallerty只能iig

2014-04-13 10:59:01 1005

原创 HashSet、TreeSet和LinkedHashSet

Set不能包含重复的元素。有三个通用的set接口的实现:HashSet、

2014-04-12 22:19:31 818

原创 java中Collections的接口及类层次图

1、Collection和CollectionsCollection和Collections是两个不两只的概念

2014-04-12 22:03:17 1228

原创 java中的内部接口

内部接口也叫嵌套接口,是在一个接口中声明另外一个接口,如

2014-04-12 21:49:10 847

原创 java中的实例初始化

实例初始化有:实例变量初始化、实例初始化和静态初始化1、

2014-04-12 21:39:11 723

flash精彩实例chm

介绍flash基本操作以及mtv制作和as

2009-11-20

Linux C编程一站式学习

添加了GFDL许可证,正式网络发布。第三部分还很粗糙,错误也有不少,有待改进。第一部分和第二部分已经比较成熟,第二部分还差三章没写。

2009-09-11

Ubuntu Linux实用学习教程.pdf

Ubuntu 完全基于 Linux 操作系统, 可以免费得到社区及专业机构的支持。庞大的社区是它成长的沃土,请向这片动人的热忱敞开心扉。

2009-09-11

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除