上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 46 下一页
摘要: Problem Description Giving two strings and you should judge if they are matched.The first string contains lowercase letters and uppercase letters.The 阅读全文
posted @ 2017-08-22 22:04 starry_sky 阅读(328) 评论(0) 推荐(0)
摘要: 多线程断点下载:顾名思义是用多线程实现的,断点是当第三方因素(断电、断网等)中断下载时,下次下载可以继续上次下载的地方下载。 1、通过getContentLength可以获取要下载文件的大小,这样可以在本机上创建一个相同大小的文件用来下载。 2、由于是多线程,所以要给每一个线程均分分配要下载的位置。 阅读全文
posted @ 2017-08-20 22:23 starry_sky 阅读(6745) 评论(13) 推荐(0)
摘要: A - Meal Delivery Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Snuke lives at position x on a number line. On this li 阅读全文
posted @ 2017-08-20 21:09 starry_sky 阅读(436) 评论(0) 推荐(0)
摘要: A Secret Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 256000/256000 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Problem De 阅读全文
posted @ 2017-08-19 18:35 starry_sky 阅读(328) 评论(0) 推荐(0)
摘要: CaoHaha's staff Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Probl 阅读全文
posted @ 2017-08-19 17:45 starry_sky 阅读(319) 评论(0) 推荐(0)
摘要: HttpClient的get方式: 由于是网络请求,一定要放在子线程里做。 首先创建一个HttpClient对象: 然后创建一个HttpGet,将url地址传进去: 然后获取状态码,200的话就是访问成功了: 接下来得到响应: 再判断内容是否登入成功就行了。 完整的方法: 1 public stat 阅读全文
posted @ 2017-08-19 12:00 starry_sky 阅读(3723) 评论(0) 推荐(0)
摘要: B. Godsend time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Leha somehow found an array c 阅读全文
posted @ 2017-08-19 01:12 starry_sky 阅读(632) 评论(0) 推荐(0)
摘要: 由于审核机制,所以一般在子线程里获取获取资源,然后在主线程里更新UI 网站源码是字符串,所以用创建一个类从输入流中获取字符串就行,图片是二进制的,就不能以获取字符串的形式,正好有BitmapFactory.decodeStream(inputStream); 可以从输入流中获取图片,返回Bitmap 阅读全文
posted @ 2017-08-18 16:14 starry_sky 阅读(937) 评论(0) 推荐(0)
摘要: ListView是一个可以在垂直滚动的列表中显示的一个控件,条目的内容来自一个ListAdapter。 由于ListAdapter是一个有很多参数的接口,所以直接去实现它就很麻烦,一般是直接去继承BaseAdapter类。 下面说正题。 在安卓应用中,一般的新闻展示可以用ListView控件来实现, 阅读全文
posted @ 2017-08-16 22:39 starry_sky 阅读(1352) 评论(0) 推荐(0)
摘要: A - Palindromic Number Problem Statement You are given a three-digit positive integer N. Determine whether N is a palindromic number. Here, a palindro 阅读全文
posted @ 2017-08-15 22:27 starry_sky 阅读(195) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 46 下一页