(最近水题刷的比较多,不过还是有些收获,所以还是做个记录比较好)
http://acm.hdu.edu.cn/showproblem.php?pid=1282
分析:
题目理解起来还是简单的,基本上有两种思路:1) 将int转为string来实现; 2)直接用int做(回文串判断,相加)
第二中思路比较直接,将一个数倒置得到新的数,然后判断是否是回文数...
分类:
其他好文 时间:
2014-05-05 13:26:07
阅读次数:
276
Problem Description
Given an positive integer A (1
For example, given A = 26, we can write A in binary form as 11010, so the lowest bit of A is 10, so the output should be 2.
Another example...
分类:
其他好文 时间:
2014-05-05 13:22:39
阅读次数:
394
先从中国天气网得到数据('http://www.weather.com.cn/data/cityinfo/'+城市编码),每个城市都有各自的编码,如何得到用户所在地的城市编码呢?用一个网页就是专门干这个的!http://61.4.185.48:81/g/...
分类:
编程语言 时间:
2014-05-04 00:27:18
阅读次数:
494
是不是有人相抓取网页上面的内容,放到别的网站上面。下面我给大家介绍一种最常用的方法:
用HtmlAgilityPack 组件。 public String GetHtml()
{
string url = "http://t.news.fx168.com/";
HttpWebRequest request = HttpWebRequ...
分类:
Web程序 时间:
2014-05-04 00:16:12
阅读次数:
368
Input
t – the number of numbers in list, then t lines follow [t
Each line contains one integer: N [0 N
Output
Output given numbers in non decreasing order.
Example
Input:
5
5
3
...
分类:
其他好文 时间:
2014-05-04 00:04:09
阅读次数:
376
//继承SQLiteOpenHelper类,
public class DictionaryOpenHelper extends SQLiteOpenHelper{
public static final String DABASENAME = "dictionary";
private static final int DATABASE_VERSION = 1;
pri...
分类:
移动开发 时间:
2014-05-03 23:49:30
阅读次数:
589
paip.操作符重载的缺失 Java 的一个大缺点
#----操作符重载的作用
1.提升用户体验 操作符重载..可以让代码更加自然....
2.轻松实现代码代码移植
例如 java代码会直接移植到c#代码里面..
#---为什么说操作符重载的缺失是个大的缺点??
因为中个,不能轻松实现代码代码移植
作者 老哇的爪子 Attilax 艾龙, EMAIL:14665...
分类:
编程语言 时间:
2014-05-03 23:49:03
阅读次数:
376
题目
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Have you thought about this?
Here are some good questions to ask before coding. Bonus points...
分类:
其他好文 时间:
2014-05-03 17:35:30
阅读次数:
345
typedef不常见但值得一提的用途:
1. 用typedef来定义与平台无关的类型。
比如定义一个叫 REAL 的浮点类型,在目标平台一上,让它表示最高精度的类型为:
typedef long double REAL;
在不支持 long double 的平台二上,改为:
typedef double REAL;
在连 double 都不支持的平台三上,改为:
typedef ...
分类:
其他好文 时间:
2014-05-03 16:12:35
阅读次数:
289
package com.recursion;
import java.io.File;
public class RecursionFile {
public static void main(String[] args) {
File file = new File("G:/A");
tree(file, 0);
}
private static vo...
分类:
编程语言 时间:
2014-05-03 16:07:04
阅读次数:
265