• 我看到一只乌鸦飞过

    我看到一只乌鸦衔着一条胖胖的虫子飞过

  • 20度的天气

    吹着风, 但已经不是冬天的风了. 20度的温度恰好. 我想起来从浦东骑着单车搬家来浦西的那个大晚上, 骑了一身汗骑到校园里~~

  • 钱可以赔 一些观念不能转变

    我是全仓加了杠杆买了京东, 已经被套10个多点了.

    六六昨天发文说京东卖假货, 京东大跌(当然未必是因为这个事情跌的)

    一个同样重仓京东的同学今天给我说, 不是卖假货, 是发错货了.

    我也希望京东完全没错, 可以补涨回来.

    但六六文章里面截图也挺全, 这里所谓发错货和卖假货, 真的只有一线之间.就像我买NB, 你发来另外一个仿的牌子的鞋, 长的真的很像, 是不是也可以说发错货了. 京东做为一个大公司,如此强硬回应做为个人的消费者, 我还是比较没有安全感的. 我到是觉得现在像六六这样的大V消费者还是少一些.

  • 作之不止 乃成君子

    作之不止 乃成君子

    但我也怕反过来, 做一些小坏事的时候, 觉得没啥, 但一直做下去, 就变坏人了.

    不卑不亢

  • 乐观

    我是个乐观主义者, 尊重别人悲观的权利, 但是真的不想听到悲观丧气的话-特别是他妈的对别人悲观. 别人过得好好的, 好的不能再好了, 需要你来泼凉水??

  • go die

    自私还好, 双标更烦

  • install systemtap

    http://r00tkit.me/?p=59

    	#!/bin/bash
    WEB="http://debuginfo.centos.org/6/i386/"
    RELEASE=`uname -r`
    MACHINE=`uname -m`
    PKG1="kernel-debuginfo-$RELEASE.rpm"
    PKG2="kernel-debuginfo-common-$MACHINE-$RELEASE.rpm"
    wget $WEB$PKG1
    wget $WEB$PKG2
    #Build Downloaded debuginfo packages
    rpm -Uhv kernel-debuginfo-*.rpm
    #Install systemtap and kernel-developemnt packages
    yum install systemtap kernel-devel
    
  • kafka中Server返回的correlationID

    原来kafka server返回的correlationID并不是对应的request中的, 而是依次增加的?

    哦, 搞错了. 是对应request里面的.

  • golang里面string是传值还是传引用

    结论: 传值, 会copy一份新数据

    package main
    
    import "fmt"
    
    func byval(q string) {
    	fmt.Printf("3. byval -- q %T: &q=%p q=%v\n", q, &q, q)
    	q = "xyz"
    	fmt.Printf("4. byval -- q %T: &q=%p q=%v\n", q, &q, q)
    }
    
    func main() {
    	i := "abcd"
    	fmt.Printf("1. main  -- i  %T: &i=%p i=%v\n", i, &i, i)
    	p := i
    	byval(p)
    	fmt.Printf("5. main  -- p %T: &p=%p p=%v\n", p, &p, p)
    	fmt.Printf("6. main  -- i  %T: &i=%p i=%v\n", i, &i, i)
    }
    
    % go run a.go
    1. main  -- i  string: &i=0xc42000a2e0 i=abcd
    3. byval -- q string: &q=0xc42000a330 q=abcd
    4. byval -- q string: &q=0xc42000a330 q=xyz
    5. main  -- p string: &p=0xc42000a320 p=abcd
    6. main  -- i  string: &i=0xc42000a2e0 i=abcd
    
  • changetime和modifytime的区别

    https://stackoverflow.com/questions/3385203/regarding-access-time-unix

    The stat(2) structure keeps track of all the file date/times:

       struct stat {
           dev_t     st_dev;     /* ID of device containing file */
           ino_t     st_ino;     /* inode number */
           mode_t    st_mode;    /* protection */
           nlink_t   st_nlink;   /* number of hard links */
           uid_t     st_uid;     /* user ID of owner */
           gid_t     st_gid;     /* group ID of owner */
           dev_t     st_rdev;    /* device ID (if special file) */
           off_t     st_size;    /* total size, in bytes */
           blksize_t st_blksize; /* blocksize for file system I/O */
           blkcnt_t  st_blocks;  /* number of 512B blocks allocated */
           time_t    st_atime;   /* time of last access */
           time_t    st_mtime;   /* time of last modification */
           time_t    st_ctime;   /* time of last status change */
       }; st_atime is the access time, updated on read(2) calls (and probably also when open(2) opens a file for reading) -- it is NOT updated when files are read via mmap(2). (Which is why I assume open(2) will mark the access time.)
    

    st_mtime is the data modification time, either via write(2) or truncate(2) or open(2) for writing. (Again, it is NOT updated when files are written via mmap(2).)

    st_ctime is the metadata modification time: when any of the other data in the struct stat gets modified.

    You can change the timestamps on files with utime(2):

       struct utimbuf {
           time_t actime;       /* access time */
           time_t modtime;      /* modification time */
       }; Note you can only change the access time and (data) modification time. You can set either of these to arbitrary times, but the ctime is going to be set to the current time -- because you changed the metadata for the file.
    

    There is no create time in this structure, so it’s not possible to find out when a file was created directly from the system.

    If you really need to know the create time, you can narrow it down to a range by looking at your backups – assuming the file you’re interested in has been backed up, along with its metadata.