如何临时让transition失效我们给一个element设置了transition效果,但某些特殊情况,我们希望让transition临时失效。我们第一反应就是先移除transition设置,等其他属性设置完成之后再还原transition设置。但浏览器有时候会让我们感觉事与愿违看下面这段代码,你...
分类:
Web程序 时间:
2014-06-11 08:26:24
阅读次数:
407
【题目】
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.
...
分类:
其他好文 时间:
2014-06-08 15:11:58
阅读次数:
298
题目
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
原题链接(点我)
解题思路
给一个数组和一个数字,移除该数字在数组中所有出现的地方。
这是一个非常简单的题目,应...
分类:
其他好文 时间:
2014-06-08 04:05:50
阅读次数:
284
sudo apt-get install mysql-server
装完后 是无法远程访问的.
要先修改
sudo vim /etc/mysql/my.cnf
找到 bind-address = 127.0.0.1
注释掉.就ok了
如果之前装乱了...
可以这样彻底删除
sudo apt-get remove --purge mysql-server
sudo a...
分类:
数据库 时间:
2014-06-08 03:56:15
阅读次数:
288
题目...For example,Given input array A = [1,1,2],Your function should return length = 2, and A is now [1,2].
解题思路,
移除数组中的重复元素,并返回新数组的长度。
这个题目应该算是简单的题目。使用两个变量就可以。具体的看代码
代码实现......
分类:
其他好文 时间:
2014-06-08 03:54:22
阅读次数:
279
ListIterator的父接口是Iterator,是List接口中特有的迭代器。
ListIterator在Iterator的基础上,又新添了很多方法:
Iterator中的方法:
1、判断是否有下一个元素:hasNext();
2、获取下一个元素: next();
3、删除迭代器指向的元素:remove();
ListIterator新添的方法:
4、判断...
分类:
其他好文 时间:
2014-06-08 03:15:53
阅读次数:
246
Single NumberGiven an array of integers, every
element appearstwiceexcept for one. Find that single one.Note:Your algorithm
should have a linear runti...
分类:
其他好文 时间:
2014-06-07 23:44:39
阅读次数:
302
Given a linked list, remove thenthnode from the
end of list and return its head.For example, Given linked list:
1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2014-06-07 16:54:26
阅读次数:
221
在控制台操作时,使用的格式化输入和输出为scanf和printf,那么对文件的IO操作也可以使用fscanf和fprintf,它们的使用如下:
#include
#include
#include
const int LENGTH=80;
int main(void){
long num1=234567L;
long num2=345123L;
long num3=78...
分类:
其他好文 时间:
2014-06-07 13:12:41
阅读次数:
248
Linux删除文件夹命令
linux删除目录很简单,很多人还是习惯用rmdir,不过一旦目录非空,就陷入深深的苦恼之中,现在使用rm
-rf命令即可。直接rm就可以了,不过要加两个参数-rf 即:rm -rf 目录名字删除目录、文件 rm(remove)功能说明:删除文件或目录。语
法:rm[-d....
分类:
系统相关 时间:
2014-06-05 21:32:46
阅读次数:
328