先看看导入的这些类,大部分都来自support.v4。 ? ? ?? 贴出了我的错误。这四个类分别都继承了Fragement,新建类的时候我选择导包导错了,所以才一直报错。 List?中的参数也就是Fragment是android.support.v...
分类:
其他好文 时间:
2015-08-17 17:34:49
阅读次数:
178
Sort List
Sort a
linked list in O(n log n)
time using constant space complexity.
解题思路:
题意为以常量存储空间和O(nlogn)时间复杂度来排序链表。
可以用合并排序法,并用双指针法来找到中间节点。
产生一个头结点方便编码。
/**
* Definition for singly-link...
分类:
其他好文 时间:
2015-08-17 17:30:45
阅读次数:
161
jdk1.8.0_45源码解读——ArrayList的实现
一、ArrayList概述
ArrayList是List接口的可变数组的实现。实现了所有可选列表操作,并允许包括 null 在内的所有元素。除了实现 List 接口外,此类还提供一些方法来操作内部用来存储列表的数组的大小。
每个ArrayList实例都有一个容量,该容量是指用来存储列表元素的数组的大小。它总是至少等于列表的大...
分类:
其他好文 时间:
2015-08-17 17:29:25
阅读次数:
108
列出 hive的 所有库
sqoop list-databases --connect jdbc:mysql://localhost --username hive --password hive
列出所有的表
sqoop list-tables --connect jdbc:mysql://localhost/hive_metadata --username hive --passwo...
分类:
其他好文 时间:
2015-08-17 15:33:44
阅读次数:
130
Question :Bubble sort using singly-linked listIdea :在linked list 交換node與node時, 我們會想用換*next的方式。但是這裡是singly-linked list.還會需要previouslynode。其實這裡單純直接換int ...
分类:
其他好文 时间:
2015-08-17 15:23:28
阅读次数:
108
CopyOnWriteArrayListget方法与ArrayList没有什么变化。但是凡是需要改动Array的方法都使用了ReentrantLock进行加锁,然后每次的修改操作都是产生一个新的list,然后setArray设置回去,包括add,set,remove等操作都是。例如add方法,并没有...
分类:
其他好文 时间:
2015-08-17 15:17:05
阅读次数:
280
#include #includeusing namespace std;struct node{int data;node *next;};class list{public:node *head;list(){head=null};list(int x){ node *p,*q; p=q=h.....
分类:
其他好文 时间:
2015-08-17 11:57:45
阅读次数:
135
使用JS Link可以向Sharepoint List注册脚本,重写Field模板,使得对于符合条件的字段改变格式和样式。但是有一个问题是,页面postback的话,JS不会被触发,不知道怎么解,有知道的留言下,谢谢。webpart中或者是列表中添加JS LinkJS Link地址的格式如下,不能写...
分类:
Web程序 时间:
2015-08-17 11:40:40
阅读次数:
145
再次熟悉java当中的comparator的写法Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9]...
分类:
其他好文 时间:
2015-08-17 11:39:49
阅读次数:
85
据笔者所知,Apex 4.x 是没有提供可编辑交互报告组件的。这就需要我们手动实现。其实这也并不是很复杂,只需要简单几步。
1. 根据向导建立一个interactive report。查询语句可以如下。
select apex_item.hidden(1,e.id) || e.name as staff, apex_item.select_list_from_lov(p_idx...
分类:
数据库 时间:
2015-08-17 10:11:45
阅读次数:
190