using System;
using System.Threading; namespace ConsoleApplication1
{ class Program { private static AutoResetEvent[] events; static void Main(string[...
分类:
编程语言 时间:
2015-05-13 09:54:49
阅读次数:
257
Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity. 1 class Solution { 2 publ...
分类:
其他好文 时间:
2015-05-13 08:45:27
阅读次数:
134
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;namespace Reflection{ class Program { ...
Python中,队列是线程间最常用的交换数据的形式。Queue模块是提供队列操作的模块。三个构造函数: 1 FIFO队列先进先出:class Queue.Queue(maxsize) 2 LIFO类似于堆,即先进后出:class Queue.LifoQueue(maxsize) 3 优先级队列级.....
分类:
其他好文 时间:
2015-05-13 07:40:11
阅读次数:
121
应用中经常使用到分享组件,当然,很多第三方都提供了社交分享,像ShareSDK、友盟都有很好的集成。
今天记录一下集成的细节:
①无论分享到哪个平台,都需要到这个平台注册相应的应用。
②以分享到微信、朋友圈、微博为例:
/**
*
*/
public class Constant {
// 微信
public static final String AppID = "wx911...
分类:
其他好文 时间:
2015-05-13 06:28:49
阅读次数:
150
public class Solution { public String convert(String s, int numRows) { String res = ""; if (s.length() < numRows || numRows == 1) { ...
分类:
其他好文 时间:
2015-05-13 06:17:07
阅读次数:
108
注意Integer.MIN_VALUE的绝对值是比Integer.MAX_VALUE大1的public class Solution { public int reverse(int x) { int res = 0; int num = Math.abs(x); ...
分类:
其他好文 时间:
2015-05-13 06:16:03
阅读次数:
94
在java的动态代理机制中,有两个重要的类或接口,一个是 InvocationHandler(Interface)、另一个则是 Proxy(Class),这一个类和接口是实现我们动态代理所必须用到的.InvocationHandler每一个动态代理类都必须要实现InvocationHandler这个...
分类:
编程语言 时间:
2015-05-13 06:13:57
阅读次数:
209
<?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="stdout" ?class="ch.qos.logback.core.ConsoleAppender"> ?<layout class="ch.qos.logback.classic.PatternLayout"> ? <Pattern...
分类:
其他好文 时间:
2015-05-13 01:00:09
阅读次数:
367
Map如我们所知,存储的是键值对,它的基本单位是实现了Map.Entry的Node,Node 的属性如下:
static class Node implements Map.Entry {
final int hash;
final K key;
V value;
Node next;
}
看定义就能知道它的作用了,能够看到它存储...
分类:
编程语言 时间:
2015-05-13 00:57:20
阅读次数:
256