ITeye博客

Lok tar

Nonkr · 共 69 篇文章

使用ctags和vim快速查看内核源代码

在源码目录下 ctags -R --exclude=.pc 建立tag需要点时间,请耐心等待。然后就可以用vim快速查找函数、结构体等的定义与声明 例如查找sk_buff,使用 vi -t sk_buff ,如果定义只有一处,它会立即自动打开这个文件,并跳转到结构体上,否则会提示你选择哪个文件的哪一处定义。

2012-12-11 14:53 · Linux · 评论(1)

Centos Xampp phpmyadmin access forbidden

妹的, 在centos下使用xampp的时候,http://localhost没问题,phpmyadmin access forbidden的情况下 不是传说中的/opt/etc/extra/httpd-xampp.conf #Deny from all 而是加上一句 require all granted

2012-11-12 15:34 · 其他 · 评论(0)

在Source Insight集成Astyle(代码格式化)

Windows平台下也有好多人都喜欢用SourceInsight编辑C/C++程序,但是SourceInsight没有提供对代码格式化的功能,如果将Artistic Style集成到SourceInsight中,那就可以为它扩展出代码格式化的功能了。 假定AStyle.exe的目录是“C:/ArtisticStyle/”,在该目录下有一个“c.opt”文件是用来保存配置的文件。下面简要地介绍下Artistic Style集成到SourceInsight中的方法。 1. 打开你的SourceInsight, 选择菜单“Options-->Custom Commands-->Add”, 输入Ar…

2012-11-06 10:34 · 编辑器 · 评论(0)

VI 退出时保留退出前屏幕内容

在~/.vimrc中 增加 set t_ti= set t_te=

2012-11-01 14:12 · 其他 · 评论(0)

chrome.exe --enable-easy-off-store-extension-install

chrome.exe --enable-easy-off-store-extension-install

2012-10-23 19:33 · 其他 · 评论(0)

CSS3 圆角按钮

<html> <head> <title>My project</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style> .button { display: inline-block; outline: none; cursor: pointer; text-align: center; text-decoration: none; font: 14px/100% Arial, Helvetica, sans-serif; padding: .5em 2em .55em; te…

2012-09-21 22:13 · CSS · 评论(0)

CSS 圆角

先说一下Firefox的圆角属性: -moz-border-radius: {1,4} | inherit 如果你想设置四个角都是一样圆角的话,可以像这样子直接设置-moz-border-radius:5px; 也可以单独设置元素的上左、上右、下右、下左四个角的值,分别用-moz-border-radius-topleft、-moz-border-radius-topright、-moz-border-radius-bottomright、-moz-border-radius-bottomleft来设置。 也可以用合并起来一起设置,如我目前的主题暂时设置的-moz-border-radius…

2012-09-21 22:11 · CSS · 评论(0)

CSS 边框阴影

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS边框阴影</title> <style> .dropshadow2{ float:left; clear:left; background: url(/jscss/demoimg/200903/shadowAlpha.png) no…

2012-09-21 20:30 · CSS · 评论(0)

Gvim 共享粘贴板 启动时最大化

修改 gvim\Data\settings\_vimrc set clipboard+=unnamed //与windows共享粘贴板 colorscheme evening //使用evening配色 if has('win32') au GUIEnter * simalt ~x //启动时自动最大化 endif

2012-09-21 20:17 · 其他 · 评论(0)

span元素的width问题

最近遇到一个问题,无法为span元素设置width属性。查看CSS文档得知,浏览器会忽略行内元素(inline,或称:内联元素)的width属性。 网上给出的一种解决方法: span { background-color:#f00; display:block; width:200px;} 但是这样会使 span 和它前后的元素分属两行,也就是说 span 其实是变成类似 div 的块级 (block)元素。 另一种解决方案(在上面的基础上增加左浮动): span { background-color:#f00;display:block; float:left; width:200px;}…

2012-09-13 12:53 · CSS · 评论(0)

Javascript 浏览器设备识别

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Screen Width Test</title> <style type="text/css"> @media all and (max-device-width: 1024px) { body { background-color: yellow; } } </style> </head> <body> <script type="text/javascript"> var agent = navigator.userAgent.toLowerC…

2012-08-28 10:29 · Javascript · 评论(0)

PPTP/L2TP over PPPoE的準確MTU/MRU值

/* Ethernet MinSize = 512bit = 64 Byte Ethernet MaxSize = 1518 Byte so Ethernet IP MTU = 1518 - 18 ( 6 SRCMAC+ 6 DSTMAC+ 2 TYPE+ 4 CRC) = 1500 B so Ethernet IP TCP MSS = 1500 - 40 ( 20 IP_HEADER + 20 TCP_HEADER) = 1460 B so Ethernet IP UDP MTU/MRU = 1500 - 28 ( 20 IP_HEADER + 8 UDP_HEADER ) = 1472 …

2012-08-22 10:25 · 网络通讯 · 评论(0)

PHP 常用进制转换函数需要注意的地方

都知道在PHP里进制之间转换一般都有 十进制转二进制:string decbin ( int number ) 十进制转八进制:string decoct ( int number ) 十进制转十六进制:string dechex ( int number ) 二进制转十六进制:string bin2hex ( string str ) 二进制转十进制:number bindec ( string binary_string ) 八进制转十进制:number octdec ( string octal_string ) 十六进制转十进制:number hexdec ( string hex_…

2012-07-16 10:46 · PHP · 评论(0)

pty 与 tty

tty是Teletype的缩写(转) 终端是一种字符型设备,它有多种类型,通常使用tty来简称各种类型的终端设备。tty是Teletype的缩写。Teletype是最早出现的一种终端设备,很象电传打字机(或者说就是),是由Teletype公司生产的。设备名放在特殊文件目录/dev/下,终端特殊设备文件一般有以下几种: 1.串行端口终端(/dev/ttySn) 串行端口终端(Serial Port Terminal)是使用计算机串行端口连接的终端设备。计算机把每个串行端口都看作是一个字符设备。有段时间这些串行端口设备通常被称为终端设备,因为那时它的最大用途就是用来连接终端。这些串行端口所对应…

2012-06-15 22:13 · Linux · 评论(0)

十大游戏背景音乐

1. She is my sin 2. The dawn 3. The Mass 4. Hero's Theme 5. He's a pirte 6. 1492 Conquest of paradise 7. Rock house jail 8. Hummell gets the rocketss 9. In the tunnels 10.Halo theme mjolnir mix

2012-05-20 12:11 · 其他 · 评论(0)