今天突然用到需要动态改变tab页,
布局代码如下:
动态创建js代码如下:
function createTabs(tabs){
var html = '';
for(var i=0;i<tabs.length;i++){
html = html + createTab(tabs[i]....
分类:
Web程序 时间:
2014-06-05 09:13:35
阅读次数:
335
iOS—修改AFNetworking源文件可接收text/plain的方法
在使用AFNetworking的时候可能会碰到下面的错误:
{ status code: 200, headers {
"Content-Length" = 14;
"Content-Type" = "text/plain;charset=utf-8";
Date = "Thu, 2...
分类:
移动开发 时间:
2014-06-05 06:05:34
阅读次数:
265
C语言是一种比较底层的语言,有时在其他语言中很容易操作的事情,在C语言中就比较麻烦,例如获取一个文件的大小。Java中File类有个length函数,Python中os.path包中有个getsize函数,C语言中却没有直接对应的函数获取文件大小。
目前,网上有一种流传很广的方法,读取文件到内存,然后跳转到文件末尾,查看跳转的长度。代码如下:
int file_size(char...
分类:
编程语言 时间:
2014-06-05 03:47:45
阅读次数:
223
缺少libz.dylib库的时候引起的一个链接错误
Undefined symbols for architecture armv7s:
"_inflate", referenced from:
-[ASIDataDecompressor uncompressBytes:length:error:] in ASIDataDecompressor.o
"_deflate", refere...
分类:
其他好文 时间:
2014-06-05 00:09:02
阅读次数:
267
【题目】
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.
You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad ...
分类:
其他好文 时间:
2014-06-04 22:37:46
阅读次数:
389
int Largest(int list[], int length){ int i,max;
for(i = 0; i max) { max=list[i]; } } return max;}首先进行...
分类:
其他好文 时间:
2014-06-03 09:53:50
阅读次数:
267
【题目】
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5, and A is now [1,1,2,2,3].
【题意】
给定一个有序数组,给数组去重,和Remove Duplicates from...
分类:
其他好文 时间:
2014-06-03 05:36:24
阅读次数:
219
以下通过Simple Serial Interface进行设置,非扫描官方datasheet的设置条码....
分类:
其他好文 时间:
2014-06-03 05:03:16
阅读次数:
219
Given a string, find the length of the longest
substring without repeating characters. For example, the longest substring
without repeating letters fo...
分类:
其他好文 时间:
2014-05-30 23:46:09
阅读次数:
453
Given an unsorted array of integers, find the
length of the longest consecutive elements sequence.For example,Given[100, 4,
200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-05-30 16:20:32
阅读次数:
229