libgcc

导航

 

2013年4月17日

摘要: 惯用vim,禁用capslock键的reg:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,3a,00,00,00,00,00顺便把我的vimrc保存一下set nocompatibleset nuset isset hlsset nowrapscan "搜到头就不搜了set whic 阅读全文
posted @ 2013-04-17 19:45 libgcc 阅读(142) 评论(0) 推荐(0)
 

2013年1月23日

摘要: 这个是cu上一位高人写的:#!/bin/env perluse 5.010;my @p = [1];for ( 1 .. $ARGV[0] || 9 ) { @_ = @{ $p[-1] }; @_ = ( 0, @_, @_, 0 ); $p[$_] = [ map { $_[$_] + $_[@_/2+$_] } 0 .. $#_/2 ];};say "@$_" for (@p);这是本人东施效颦邯郸学步的版本:#!/bin/env perluse 5.010;my @p = (0, 1, 0);say "1";for (1.. $ARGV[0]|| 阅读全文
posted @ 2013-01-23 03:39 libgcc 阅读(189) 评论(0) 推荐(0)
 
摘要: man open里有这么一个flag: O_CLOEXEC (Since Linux 2.6.23) Enable the close-on-exec flag for the new file descriptor. Specifying this flag permits a program to avoid additional fcntl(2) F_SETFD operations to set the FD_CLOEXEC flag. Additionally, use of this flag is essential in some multithreaded programs 阅读全文
posted @ 2013-01-23 03:27 libgcc 阅读(1386) 评论(0) 推荐(0)
 

2013年1月21日

摘要: 先保存一下,以免以后用到又要重写1#include<windows.h>2#include<stdio.h>3#include<stdlib.h>4#include<time.h>5#include"psapi.h"67DWORDGetMemory(intinterval,intpid)8{9HANDLEhProcess=NULL;10PROCESS_MEMORY_COUNTERSpmc;11PERFORMACE_INFORMATIONpmi;1213hProcess=OpenProcess(PROCESS_QUERY_INF 阅读全文
posted @ 2013-01-21 20:07 libgcc 阅读(337) 评论(0) 推荐(0)
 

2012年8月23日

摘要: 一般来说,要grep一个ps输出的进程,会同时输出grep的进程:[libgcc@10.36.159.37]~>$ ps -ef|grep crondroot 3343 1 0 Aug07 ? 00:00:00 crondlibgcc 4907 9805 0 18:23 pts/2 00:00:00 grep crond 然后,我们可以使用[]来去掉这个进程:[libgcc@10.36.159.37]~>$ ps -ef|grep cron[d]root 3343 1 0 Aug07 ? 00:00:00 crond 这个原理应该很容易理解,grep识别[]把它当作regex理解, 阅读全文
posted @ 2012-08-23 18:30 libgcc 阅读(1493) 评论(0) 推荐(0)