项目需要把 long 转换成 Timestamp,而且需要是 UTC 时间格式。 网上 google了好久,总结了这个写法 Calendar?cal?=?Calendar.getInstance();
long?value?=?cal.getTimeInMillis();???????//your?l...
分类:
编程语言 时间:
2014-07-25 11:43:41
阅读次数:
278
Among other things, Bob is keen on photography. Especially he likes to take pictures of sportsmen. That was the reason why he placed himself in position x0 of
a long straight racetrack and got ready...
分类:
其他好文 时间:
2014-07-25 11:26:31
阅读次数:
447
1:基础数据与封装类型之间的转型
A:基础数据类型--->封装类型(对象类型)
Boolean boolean_1 = new Boolean(true);
byte ---->Byte
short---->Short
char---->Character
int--->Integer
long-->Long
float-->Float
double-->Double...
分类:
其他好文 时间:
2014-07-25 11:24:51
阅读次数:
210
树状数组+二分
就是找第几小的数,,找几次,再求和。。
#include
#include
#include
#include
#include
using namespace std;
const int N=277777;
int t,n,m,bit[N],num,i;
long long ans;
int low(int g)
{
return g&(-g);
}
void up...
分类:
其他好文 时间:
2014-07-24 23:29:33
阅读次数:
266
///
/// 将string格式转化为十六进制数据
///
///
///
///
///
public static string tenToSixteen(string msg)
{
long number = C...
分类:
其他好文 时间:
2014-07-24 23:23:23
阅读次数:
225
递归的边界条件写的多了……没必要写呢么多的。。
不明白可共同探讨~
#include
#include
#include
using namespace std;
long long dp(int kk,int pos)
{
int n=kk;int temp=(int)pow(2,n);
// printf("%d %d\n",kk,pos);
if(kk==0&&...
分类:
其他好文 时间:
2014-07-24 23:17:03
阅读次数:
368
#include
int q1,q2,q3;
void fun(long n)
{
q1=q2=q3=0;
while(n)
{
switch(n%10)
{
case 1:q1++;break;
case 2:q2++;break;
case 3:q3++;
}
n/=10;
}
}
main()
{
long n=123451123;
fun(n);
...
分类:
其他好文 时间:
2014-07-24 23:04:43
阅读次数:
271
java定时器的使用定时器类Timer在java.util包中。使用时,先实例化,然后使用实例的schedule(TimerTask task, long delay)方法,设定指定的任务task在指定的延迟delay后运行。定时器任务类TimerTask是抽象类,继承并重写其run()方法,可实....
分类:
编程语言 时间:
2014-07-24 22:55:43
阅读次数:
240
Java的基本数据类型4种整型:int(4字节)、short(2字节)、long(8字节)、byte(1字节)2种浮点数:float(4字节)、double(8字节)Java中,整型的范围与运行Java代码的机器无关,长整型加Lfloat类型数值有一个后缀F(例如,3.14F),没有后缀F的浮点数值...
分类:
编程语言 时间:
2014-07-24 22:45:43
阅读次数:
280
public class Demo1{ public static void main(String args[]) { //byte<short<int<long<float<double //低进度转高精度,自动转换 double a = 3; System.out.println(a)...
分类:
其他好文 时间:
2014-07-24 22:36:23
阅读次数:
173