码迷,mamicode.com
首页 >  
搜索关键字:struct stat    ( 35365个结果)
(转)单链表的逆置
对于单链表的逆置有两种方法可以实现:(1)利用辅助指针 基本思想:在遍历结点过程中,设置辅助指针,用于记录先前遍历的结点。这样依次编译的过程中只需修改其后继结点的next域即可。 实现代码: 1 typedef int DataType; //类型定义 2 typedef struct ...
分类:其他好文   时间:2014-07-07 10:48:40    阅读次数:210
struct与union字节大小的终极解释
1、字节对齐的细节和编译器实现相关,但一般而言,如在windows下,就VC而言,满足一下三个准则:1) 结构体变量的首地址能够被其最宽基本类型成员的大小所整除;2) 结构体每个成员相对于结构体首地址的偏移量(offset)都是成员大小的整数倍,如有需要编译器会在成员之间加上填充字节(interna...
分类:其他好文   时间:2014-07-03 22:26:38    阅读次数:246
【转】Linux 定时器setitimer()
http://blog.sina.com.cn/s/blog_590be5290100izdf.html用法:#include int getitimer(int which, struct itimerval *value);int setitimer(int which, const struc...
分类:系统相关   时间:2014-07-02 17:56:16    阅读次数:260
MVC扩展之HtmlHelper辅助方法
1、什么是HtmlHelper辅助方法?其实就是HtmlHelper类的扩展方法,如下所示:namespace System.Web.Mvc.Html{ public static class FormExtensions//表单相关扩展方法,例如创建表单标签等。 public stat...
分类:Web程序   时间:2014-07-02 14:28:55    阅读次数:296
POJ 1135 Domino Effect
最短路问题,我用的SPFA。 求出各个点的最短时间。 然后每条边的为 (d[u]+d[v]+len)/2   len 为此边长度。 然后找时间最长的。 #include #include #include #include #include using namespace std; int n,m; struct lx { int v; double t; }; v...
分类:其他好文   时间:2014-07-02 11:34:13    阅读次数:136
Linux基础--进程管理相关命令介绍(1)
本文主要介绍了Linux中进程管理的相关命令,涉及到的主要命令有pstree,ps.(1)pstree①功能:用来查看进程树②用例:(2)ps①功能:用来显示系统当前进程状态的命令②用例:③相关用法:psa:显示所有跟终端相关的进程psx:显示所有跟终端无关的进程相关注释:STAT各代码含义:S..
分类:系统相关   时间:2014-07-02 11:09:08    阅读次数:303
Leetcode:Sort List 对单链表归并排序
Sort a linked list in O(n log n) time using constant space complexity. 看到O(n log n)的排序算法,适合单链表的首先想到的就是归并排序 /** * Definition for singly-linked list. * struct ListNode { * int val; * Lis...
分类:其他好文   时间:2014-07-02 08:47:34    阅读次数:239
Swift构造器(Initializer)与析构器(Deinitializer)
为了初始化结构体和类等类型的实例属性。默认构造器  struct Fahrenheit {var temperature: Doubleinit(){temperature = 32.0} } var f = Fahrenheit() //调用默认构造器 init() ,没有参数 没有返回值。println("The default temperature   is \(f.temperature...
分类:其他好文   时间:2014-07-02 08:42:57    阅读次数:304
hdu 1071 The area 高斯消元求二次函数+辛普森积分
构造系数矩阵,高斯消元求解二次函数,然后两点式求直线函数,带入辛普森积分法无脑AC。。。 #include #include #include #include #include #include using namespace std; struct node { double x,y; }p[4]; double g[10][10]; double f1(double x) //二次...
分类:其他好文   时间:2014-07-02 07:56:59    阅读次数:313
Leetcode:Merge Two Sorted Lists 合并两个有序单链表
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 代码如下: * Definition for singly-linked list. * struct L...
分类:其他好文   时间:2014-07-02 07:23:59    阅读次数:159
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!