码迷,mamicode.com
首页 >  
搜索关键字:head tail ‘tail -f’ ‘tail -f’    ( 36072个结果
linux下查看文件内容cat,more,less
1. 查看文件内容常用的命令 cat : 由第一行显示文件内容 tac: 从最后一行开始显示,与cat相反 nl : 文件内容和行号一起输出 more: 一页一页显示 less: 与more类似,可以往前翻页 head: 取头部几行 tail: 取尾部几行 od: 以二进制方式读取文件内容...
分类:系统相关   时间:2014-07-08 21:30:55    阅读次数:253
数据结构:链表的基本操作(创建,删除,插入,逆序,摧毁)
代码注释比较详细: #include #include using namespace std; struct Node{ int data; Node* next; }; Node* head = NULL; bool create() { head = (Node*)malloc(sizeof(Node)); if(NULL == head) return false;...
分类:其他好文   时间:2014-07-08 21:05:05    阅读次数:238
【剑指offer】Q17:合并两个排序的链表
def Merge(head1, head2): if head1 == None: return head2 if head2 == None: return head1 psuhead = ListNode(-1) tail = psuhead while head1 and head2: if head1.val < head2.val: cur = head1 ...
分类:其他好文   时间:2014-07-08 18:46:04    阅读次数:227
Java经典23种设计模式之创造型模式(二)
本文记录5种创造型模式的剩下两种:建造者模式(Builder)、原型模式(PROTOTYPE)。一、建造者模式(别名:生成者模式)将复杂对象的构建和它的表示分离,使得同样的构建过程可以创建不同的表示。一个完整的建造者模式包含以下几个概念:1、产品类 Productpublic class Person { private String head; private Str...
分类:编程语言   时间:2014-07-08 17:45:02    阅读次数:193
【剑指offer】Q16:翻转链表
def reverse(head): if head == None or head.next == None: return head psuhead = ListNode(-1) while head: nexthead = head.next head.next = psuhead.next psuhead.next = head head = nexthead ...
分类:其他好文   时间:2014-07-08 15:27:58    阅读次数:183
【LeetCode】Swap Nodes in Pairs
题目 Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant spac...
分类:其他好文   时间:2014-07-08 13:46:26    阅读次数:205
利用CSS切割图片技术来动态显示图片
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/><t..
分类:Web程序   时间:2014-07-08 12:05:38    阅读次数:214
异步加载脚本和样式
<script> window.onload=function(){ loadScriptURL(‘script/head.js‘) loadScriptcode(‘alert("hahaha");‘); loadStyleURL(‘a.css‘); varcsscode=‘#box{background:red}‘; loadStyleCODE(csscode); } functionloadScriptURL(url){ varscript=document.createElement("sc..
分类:其他好文   时间:2014-07-08 09:47:27    阅读次数:161
建立单链表的方法
#include<iostream> usingnamespacestd; structnode{ intd; structnode*next; };//定义结点 node*build1()//头插法构造单链表 { node*p;//指向新建结点 node*head;//头指针 head=NULL; p=head; intx; cin>>x; while(x!=-1) { p=newnode; p->d=x; p-&g..
分类:其他好文   时间:2014-07-08 09:06:06    阅读次数:220
[leetcode] Insertion Sort List(python)
简单的插入排序,总是超时,暂且放在这记录一下。 class Solution: # @param head, a ListNode # @return a ListNode def insertionSortList(self, head): if head == None or head.next == None: return head psuhead...
分类:编程语言   时间:2014-07-06 11:52:20    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!