在使用WebView加载网页的时候,有一些固定的资源文件如js的jquery包,css,图片等资源会比较大,如果直接从网络加载会导致页面加载的比较慢,而且会消耗比较多的流量。所以这些文件应该放在assets里面同app打包。
要解决这个问题需要用到API 11(HONEYCOMB)提供的shouldInterceptRequest(WebView view, String url) 函数来加载本...
分类:
移动开发 时间:
2015-01-27 18:30:14
阅读次数:
476
题目:The string "PAYPALISHIRING" is written
in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A P L S...
分类:
其他好文 时间:
2015-01-27 18:26:07
阅读次数:
184
Write a function to find the longest common prefix string amongst an array of strings.
题目大意
写一个函数来找出所有字符串里最长的公共前缀。
难度系数:容易
实现
题目不难,基本思路大家都能想到,就是一些细节可能会遗漏。这个也没啥好算法,不管怎样,都需要一个个去比较。 所以没啥好说...
分类:
其他好文 时间:
2015-01-27 18:24:51
阅读次数:
103
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is not a p...
分类:
其他好文 时间:
2015-01-27 18:23:55
阅读次数:
182
首先,json转map方法一:Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();或Gson gson = new Gson();String strjson 例如:strjson ={ "ret...
分类:
Web程序 时间:
2015-01-27 18:13:36
阅读次数:
263
下面方法是让设置的关键字高亮显示,考虑到了注释与字符串的影响,所以备用,以便将来能够用到. private static void ColorizeCode(RichTextBox rtb) { string[] keywords = {"as"...
分类:
其他好文 时间:
2015-01-27 18:11:47
阅读次数:
173
hibernateannotation生成uuid主键(2012-02-07 15:18:43)转载▼标签:uuid主键注解杂谈分类: javaWeb JPA标准方式下,不可以生成uuid类型的主键,但是hibernate提供了一些方式生成uuid主键,具体方式,1,通过注解方式生成一个genera...
分类:
Web程序 时间:
2015-01-27 18:04:17
阅读次数:
2284
class student { private string name; public string Name { get { return name; } set { name = value; } ...
public class Welcome { public static void main(String[] args) {//args为arguments的缩写 System.out.println("你好,世界!"); }}
分类:
编程语言 时间:
2015-01-27 17:59:44
阅读次数:
193
生成HTML页面代码 public int Htmls(int id) { int result = 0; string strHtmlContent = ""; HttpWebRequest request; ...
分类:
Web程序 时间:
2015-01-27 17:57:40
阅读次数:
185