Given a collection of intervals, merge all
overlapping intervals.For
example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18].public class
S...
分类:
其他好文 时间:
2014-05-16 08:44:29
阅读次数:
276
题目: Given an input string, reverse the string word
by word. For example, Given s = "the sky is blue", return "blue is sky
the".解题思路: 1、先对字符串进行一次总...
分类:
其他好文 时间:
2014-05-16 05:44:30
阅读次数:
263
【题目】
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the len...
分类:
其他好文 时间:
2014-05-15 14:40:14
阅读次数:
320
setCharacterEncoding
void setCharacterEncoding(java.lang.String charset)
Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. If the character...
分类:
其他好文 时间:
2014-05-15 01:36:58
阅读次数:
233
Binary Tree Preorder Traversal
Total Accepted: 18022 Total
Submissions: 51784My Submissions
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given b...
分类:
其他好文 时间:
2014-05-14 20:43:22
阅读次数:
242
首先 将该代码挂在NGUI的UIroot上
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
Screen.SetResolution(1024, 768, true);//自己想要的分辨率,比如1024*768,true表示全...
分类:
其他好文 时间:
2014-05-14 19:24:25
阅读次数:
404
在UI线程中创建子线程——》在子线程中获取网络图片--》在线程中通过Message传递二进制图片给Handler,--》Handler在handleMessage()中处理消息packagecom.example.android_handler_message;
importjava.io.IOException;
importorg...
分类:
移动开发 时间:
2014-05-14 18:24:57
阅读次数:
410
题目一:
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab",
Return
[
...
分类:
其他好文 时间:
2014-05-14 15:10:01
阅读次数:
293
一、 创建表
在官方的wiki里,example是这样的:
Sql代码
CREATE [EXTERNAL] TABLE [IF NOT EXISTS] table_name [(col_name data_type [COMMENT col_comment], ...)] [COMMENT table_comment] [PARTITION...
分类:
数据库 时间:
2014-05-14 14:50:27
阅读次数:
463
定义接口packagecom.example.android_db.service;
importjava.util.List;
importjava.util.Map;
publicinterfacePersonService{
publicbooleanaddPerson(Object[]params);
publicbooleandeletePerson(Object[]params);
publicbooleanupdatePerson(Object[]params);
publicMa..
分类:
移动开发 时间:
2014-05-13 13:06:04
阅读次数:
454