首页 > 其他
viewpager实现无限循环滚动幻灯片
思路是:设置pageradapter的count为Integer.MAX_VALUE,但实际的item只有几个,用取余的方式取item,在设置adapter时同时设置currentItem为实际item数的N倍(足够大就好)。这样就可以左右无缝循环滑动!(毕竟你不可能滑上亿次),并且不用担心内存问题,就那几个玩意~~~...
分类:其他   时间:2015-01-08 22:50:45    收藏:0  评论:0  赞:0  阅读:1076
Service和Activity之间的通信
Service的启动方式有两种,一种是通过start方式,一种是通过bind方式,通过start方式启动服务后,启动服务的组件和服务便没有多大联系了。所以为了能和Service通信,只能通过bind的方式。下面分几步介绍下:(demo里面的Service提供一个下载的功能,然后在Activity中决定何时开始下载,以及随时查看下载进度) 第一步: 在Service类中创建一个内部类继承自Bin...
分类:其他   时间:2015-01-08 22:50:25    收藏:0  评论:0  赞:0  阅读:546
hdu1695--GCD(欧拉函数+容斥原理)
GCD Time Limit:3000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Appoint description:  System Crawler  (2015-01-07) Description Given 5 integers: a, b,...
分类:其他   时间:2015-01-08 22:50:15    收藏:0  评论:0  赞:0  阅读:589
hdu4135--Co-prime(欧拉函数+容斥原理)
Co-prime Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Appoint description:  System Crawler  (2015-01-07) Description Given a number N, y...
分类:其他   时间:2015-01-08 22:50:05    收藏:0  评论:0  赞:0  阅读:519
两个List去掉重复元素放在一个List中去【两个Listsize值非常大】
/* * 思路: * 1.取得两个list的相同元素:list.retainAll(E)方法 * 2.两个list分别去掉相同的元素:list.removeAll(E); * 3.将剩下的两个List分别加入到一个新的List去:addAll */ public class Test1 { public static void main(String[] args) { List ...
分类:其他   时间:2015-01-08 22:50:01    收藏:0  评论:0  赞:0  阅读:380
LeetCode--Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin...
分类:其他   时间:2015-01-08 22:50:00    收藏:0  评论:0  赞:0  阅读:474
codeforces--Spreadsheets(模拟)
Spreadsheets Time Limit:10000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Appoint description:  System Crawler  (2015-01-06) Description In the popular...
分类:其他   时间:2015-01-08 22:49:05    收藏:0  评论:0  赞:0  阅读:506
gcc源代码分析,在expand_call ()函数 和expand_expr_stmt ()函数的开始处加入debug_tree ()函数
对于expand_call函数来说最主要的参数就是exp这个tree树, 打印出来之后我们终于看到了printf和Hello,world! expand_call       type         size         align 32 size_unit 8 sep_unit 32 symtab 0         sep         max...
分类:其他   时间:2015-01-08 22:48:55    收藏:0  评论:0  赞:0  阅读:471
深入理解ThreadLocal
ThreadLocal是一个和线程安全相关的类。 一个非线程安全的例子 在我们讲述它之前,我们先看一个例子。 package thread; public class NotSafeThread implements Runnable{ private int a=10; public void run() { // TODO Auto-gen...
分类:其他   时间:2015-01-08 22:48:45    收藏:0  评论:0  赞:0  阅读:567
LeetCode-Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found i...
分类:其他   时间:2015-01-08 22:48:05    收藏:0  评论:0  赞:0  阅读:463
似水年华的校园暗恋----电影《情书》
??      日本电影《情书》在上大学时看过,只是当时只看了个结尾,没有多少印象了。 今天又翻出来看了一遍,那淡淡的,缓缓流淌的剧情,诉说着一段单相思的暗恋。      渡边博子的男朋友藤井树,在一次山难中去世了,博子通过男友的毕业纪念册, 给他原来的家里寄了封信,以为是寄给天国的信,没想到却受到了回信,信是一个 跟藤井树同名的女子写的。博子与藤井树(女)的书信往来,展现了一段...
分类:其他   时间:2015-01-08 22:47:55    收藏:0  评论:0  赞:0  阅读:342
hdu 1713 相遇周期 (GCD & LCM)
相遇周期 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1943    Accepted Submission(s): 1000 Problem Description 2007年3月26日,在中俄两国元首的...
分类:其他   时间:2015-01-08 22:47:45    收藏:0  评论:0  赞:0  阅读:392
[leetcode]Largest Rectangle in Histogram
问题描述: Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where wi...
分类:其他   时间:2015-01-08 22:47:15    收藏:0  评论:0  赞:0  阅读:419
输出四个数字字符
输入代码: /* *Copyright (c)2014,烟台大学计算机与控制工程学院 *All rights reserved. *文件名称:sum123.cpp *作 者:林海云 *完成日期:2015年1月8日 *版 本 号:v2.0 * *问题描述:写一函数,输入一个四位数字,要求输出这四个数字字符,但每两个数字间空格。如输入1990,应输出"1 9 9...
分类:其他   时间:2015-01-08 22:46:55    收藏:0  评论:0  赞:0  阅读:429
How to handle exception in managed code and unmanaged code
As we known, try...catch mechanism is a quite common feature for the high level languages like java or C#. Although C++ proclaimed  that it supports this mechanism, the memory management limitation of...
分类:其他   时间:2015-01-08 22:46:45    收藏:0  评论:0  赞:0  阅读:407
百度编辑器(Ueditor)
1、下载ue   utf-8版本 ueditor1_3_6-utf8-jsp  2、解压后的文件目录结构如下所示 3、目录和文件说明 dialogs:弹出对话框对应的资源和JS文件 lang:编辑器国际化显示的文件 php或jsp或net:涉及到服务器端操作的后台文件 themes:样式图片和样式文件 third-party:第三方插件(包括代码高亮,源码编辑等组件)...
分类:其他   时间:2015-01-08 22:46:35    收藏:0  评论:0  赞:0  阅读:527
最大连续子序列乘积
问题描述 给定一个整数序列(可能有正数,0和负数),求它的一个最大连续子序列乘积。比如给定数组a={3, -4, -5, 6, -2},则最大连续子序列乘积为360,即3*(-4)*(-5)*6=360。 分析 求最大连续子序列乘积与最大连续子序列和问题有所不同,因为其中有正有负还有可能有0。 假设数组为a[],直接利用动归来求解,考虑到可能存在负数的情况,我们用Max[i]来...
分类:其他   时间:2015-01-08 22:46:15    收藏:0  评论:0  赞:0  阅读:392
Demo on bar code printing using SAP Scripts/Smart forms
Demo on bar code printing using SAP Scripts/Smart forms...
分类:其他   时间:2015-01-08 22:46:05    收藏:0  评论:0  赞:0  阅读:537
OpenLayers 如何管理多控件的激活
在使用OpenLayers的时候,常常需要使用多个控件,来实现像:绘制矢量要素(DrawFeature),查询要素属性(WMSGetFeatureInfo),等等。这样就需要在不同的控件之间进行切换,也就是激活控件。...
分类:其他   时间:2015-01-08 22:45:55    收藏:0  评论:0  赞:0  阅读:353
最简单的基于libVLC的例子:最简单的基于libVLC的视频播放器
本文记录使用libVLC的开发的最简单的视频播放器示例。VLC Media Player是一款优秀的播放器,但是由于它的源代码编译的难度比较大,一直没有深入研究过它的开发方面的技术。此前触到了一些VLC开发方面的东西,因此总结了一下libVLC的开发示例程序。...
分类:其他   时间:2015-01-08 22:45:45    收藏:0  评论:0  赞:0  阅读:499
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!