iOS的本地通知服务需要使用NSLocalNotification,处理基于时间行为的通知。比如定时通知用户该学习了。使用NSLocalNotification一般需要考虑三个方面:scheduled
time:时间周期,用来指定iOS系统发送通知的日期和时间;notification type:通...
分类:
移动开发 时间:
2014-06-06 22:47:59
阅读次数:
349
1.启用单向通讯的方法,不能有返回值(void可以),不能有out参数,只允许传入参数。
[ServiceContract(Namespace = "MyNamespace")] public interface IService {
[OperationContra...
分类:
其他好文 时间:
2014-06-06 22:24:17
阅读次数:
263
// 注册 jvm 关闭时操作
Runtime.getRuntime().addShutdownHook(new Thread(){ public void run() {
System.out.println("关闭"); } });
分类:
其他好文 时间:
2014-06-06 21:54:11
阅读次数:
241
原题地址:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/题意:Say
you have an array for which theithelement is the price of a given stoc...
分类:
编程语言 时间:
2014-06-06 20:04:46
阅读次数:
400
Sort a linked list inO(nlogn) time using
constant space complexity./** * Definition for singly-linked list. * struct
ListNode { * int val; * L...
分类:
其他好文 时间:
2014-06-06 20:01:30
阅读次数:
333
日期的默认输出格式为:Tue Jun 03 19:30:08 CST
2014。问题:如果调整输出的格式。 public static void fun1() { Date date = new Date();
System.out.println(date.toString());} 使用正则表达...
分类:
其他好文 时间:
2014-06-06 17:27:41
阅读次数:
278
就像是在Data in, data
out中解释过的,index中的每个document都有type。每个type都有自己的mapping或者schema
definition。在type中mapping定义filed,定义每个filed中的数据类型,定义ES怎么处理这个filed,mapping也...
分类:
移动开发 时间:
2014-06-06 16:32:38
阅读次数:
235
package com.saic.grape.controller;
public class Data {
private int j=0;
/**
* 加法
*/
public synchronized void inc() {
j++;
System.out.println("inc 加法运算>>"+j);
}
/**
* 减法
*/...
分类:
编程语言 时间:
2014-06-04 14:03:01
阅读次数:
356
longtime=System.currentTimeMillis(); System.out.println(time); SimpleDateFormatformat=newSimpleDateFormat("yyyy-MM-ddHH:mm:ss"); java.util.Dated1=newDate(time); Stringnow=format.format(d1); System.out.println(now); longt=0; try{ java.util.Dated2=format.pa..
分类:
移动开发 时间:
2014-06-04 12:51:10
阅读次数:
474
/*通过直接预分区的方式建表*/private static void
printTableRegion(String tableName)throws IOException{ System.out.println("Prtint
region of table:"+tableName);/...
分类:
其他好文 时间:
2014-06-03 14:51:05
阅读次数:
207