前面写的感觉有点不条理,这里简单整理一下,以备以后查阅和回顾一下使用到的命令都是在终端输入的一.查看ruby是否安装ruby -v修改ruby的源为淘宝的源gem sources -- remove http://rubygems.orggem sources -a http://ruby.taob...
分类:
其他好文 时间:
2014-06-25 23:08:11
阅读次数:
324
特定容器算法
lst.merge(lst2)
将来自lst2的元素并入到lst。这两个都必须是有序的。
lst.merge(lst2, comp)
元素将从lst2删除,第一个版本使用
lst.remove(lst2)调用erase删除掉与给定值相等(==)或令一元谓词为真的每个元素
lst.remove_if(pred)
lst.reverse() 反转...
分类:
编程语言 时间:
2014-06-25 19:32:39
阅读次数:
200
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplica...
分类:
其他好文 时间:
2014-06-24 20:58:32
阅读次数:
230
1. 这种方法可以使下拉框和平常没有区别,看起来没有任何不同。唯一不同的就是下拉并单并选择之后,它不会鸟你,选了和没有选一样一样的。就是无视客户的选择。2.设置disabled属性这个看起来更直接,直观就是有只读的感觉,也不可以点击和下拉了。里面的字也会变成灰色当属性设置为"disabled"时,提交表单时,select的值无法传递,提交前移除disabled属性$("#role").remove...
分类:
其他好文 时间:
2014-06-24 18:09:31
阅读次数:
233
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1-...
分类:
其他好文 时间:
2014-06-22 22:57:49
阅读次数:
347
remove()和直接使用system的一个区别...
分类:
其他好文 时间:
2014-06-22 20:36:12
阅读次数:
181
Fragment要点
Fragment作为Activity界面的一部分组成出现
可以在一个Activity中同时出现多个Fragment,并且,一个Fragment亦可在多个Activity中使用。
在Activity运行过程中,可以添加、移除或者替换Fragment(add()、remove()、replace())
Fragment可以响应自己的输入事件,并且有自己的生命周期,当然,它们的生命周期直接被其所属的宿主activity的生命周期影响。
而本文简单介绍主要通过点击不同按钮实现切换对应的frag...
分类:
移动开发 时间:
2014-06-22 20:33:24
阅读次数:
296
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the...
分类:
其他好文 时间:
2014-06-22 20:02:46
阅读次数:
182
/*API-38*/
Element.remove()
删除某个元素对象,无返回值
/*API-39*/
Element.removeData([key]);
删除某个key的value值,如果没有特殊说明则删除所有的元素数据
参数列表:
key
可选参数
字符串类型
key
返回值:元素对象
/*API-105*/
在画布上添加一个字符串,如果...
有时候当我们打开很多tabs选项卡时,要关闭它只能一个一个的进行关闭显然太麻烦,这时可以在选项卡的最右边添加一个按钮 实现关闭全部。代码如下:
//获取最后一个tabs 在新加的选项卡后面添加"关闭全部"
var li = $(".tabs-wrap ul li:last-child");
$("#close").remove();
li.after("<a class='tabs-inner' href='javascript:void()' onCl...
分类:
Web程序 时间:
2014-06-22 17:28:47
阅读次数:
268