分享一个判断浏览器是否支持的函数,然后有牵扯到了一个懒性加载的概念。
var iscss3=(function(){
var _style=document.createElement("div").style;
return 'transition' in _style||'mozTransition' in _style||'webkitT...
分类:
Web程序 时间:
2015-07-27 19:14:32
阅读次数:
125
Android系统剪贴板复制字符串到系统剪切板/**
* 复制文本到剪切板
*
* @param text
* @return
*/
@SuppressWarnings("deprecation")
public boolean copyStringToSystem(String text) {
try {
if (android.os.Build.VERSION...
分类:
移动开发 时间:
2015-07-27 19:11:44
阅读次数:
135
有很多时候,UITableViewCell每行的高度是不固定的,需要动态设置。
UITableView有个代理方法,
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return ((CZWeiboFrame*)[self.weiboFrames...
分类:
其他好文 时间:
2015-07-27 19:10:14
阅读次数:
92
??
本题是一道细心题考虑各种情况
#include
int pan(int n)
{
if(n%400==0||(n%4==0&&n%100!=0))
return 1;
else return 0;
}
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int day,mon,year,sum...
分类:
其他好文 时间:
2015-07-27 19:08:09
阅读次数:
107
Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Return whether...
分类:
其他好文 时间:
2015-07-27 19:07:07
阅读次数:
87
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2015-07-27 18:35:11
阅读次数:
98
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th...
分类:
其他好文 时间:
2015-07-27 18:14:31
阅读次数:
116
#include #include int pre[100005];int num[100005],mov[100005];int a,b;int find(int x){ if(x==pre[x]) return x; int t=pre[x]; pre[x] = find(pr...
分类:
其他好文 时间:
2015-07-27 18:01:17
阅读次数:
135
可输入打印行数且美观的杨辉三角将整数转换为字符串(考虑正负数)/*#include<stdio.h>
intmain()
{
inti,j,line,data;
intarr[100][100]={0};
printf("请输入你要打印的杨辉三角行数\n");
scanf("%d",&line);
for(i=0;i<line;i++)
{
arr[i][0]=1;
arr[i][i]=1;
}..
分类:
其他好文 时间:
2015-07-27 16:49:39
阅读次数:
86
#include
#include
#include
int judge(int a)
{
int j;
for (j = 2; j
{
if (a%j == 0)
return 1;
}
return 0;
}
int main()
{
int i;
for (i = 1; i
{
if (judge(i) == 0)
printf("%...
分类:
其他好文 时间:
2015-07-27 16:22:09
阅读次数:
77