linux启动序列

linux启动序列

1、CPU初始化
   CPU自身初始化,从某个固定位置(0xfffffff0)取指令并执行,该指令为跳转指令,跳转到BIOS代码的首部。

2、装载BIOS
   BIOS被固化在主板上的一个ROM中,它首先进行自检(POST),随后加载内核引导程序。
   POST阶段进行系统硬件的检测,包括内存检测,系统总线检测等。

3、读取MBR
   POST之后,BIOS会读取启动设备的第一个扇区(MBR),即512字节的信息,MBR保存了内核引导程序的开始部分,BIOS将其[......]

Read more

向sqlite数据库插入和读取图片数据 (for ios)

向sqlite数据库插入和读取图片数据 (for ios)

假定数据库中存在表 test_table(name,image), 下面代码将图片文件test.png的二进制数据写到sqlite数据库:
char *name = "test";
NSString * nameString = [NSString stringWithCString:name encoding:NSUTF8StringEncoding];
NSString * filePath = [[NSBundle mainBundle] pathForResource:nameString of[......]

Read more

GIT Directory structure

from: http://www.siteground.com/tutorials/git/directory.htm

A .git directory has a structure similar to the following one:

A deprecated way to store shorthands that specify URL to the git fetch, git pull and git push commands is to store a file in branches/<name> and give the name to the c[......]

Read more

用windbg来寻找win7蓝屏原因

用windbg来寻找win7蓝屏原因

    最近遇到一个郁闷的事情,win7系统会不定时地出现蓝屏,出现得很随意,本人是ios开发者,用到虚拟机,在虚拟机内写代码时,突然出现蓝屏时会令人很躁火,担心虚拟机在某一次蓝屏之后启动不起来。初始,我首先考虑硬件问题,但是发现我只是最近增加了一条内存条,但是型号和原来那条一模一样,并且出现蓝屏的情况在更换内存条很久以后才出现的。后来想到可能bios哪里设置错误了,但是确认我最近所做的bios设置更改是安全的,于是考虑到可能是软件原因。
    于是我在再出现蓝屏时,捕捉到蓝屏提示中出现[......]

Read more

Install Monaco font in Ubuntu (or Debian)

  1. sudo mkdir /usr/share/fonts/truetype/custom  
  2. sudo mv Monaco_Linux.ttf /usr/share/fonts/truetype/custom/  
  3. sudo fc-cache -f -v

Download Link : Monaco_Linux.ttf

Instal downloaded fonts in Ubuntu

Open the folder where you have downloaded the font file.

Double click on the font file to open it. This opens a font viewer window.

On the right there is a button, "Install Font". Click on it.

Wait until the button turns to greyed out "Installed".

Refrence to ubunt[......]

Read more

酷软:WinMount —— 不需要解压缩即可使用压缩文件

这里向大家推荐一款非常有创意而且非常高效的工具软件:WinMount,通过名字即可大概知道它的原理:Mount(挂载)。

软件简介

WinMount是一款国产免费且功能强大Windows小工具,具备压缩解压和虚拟光驱(CD/DVD)的双重功能。最大特色在于压缩包虚拟化功能,可以将压缩包直接挂载到虚拟盘或虚拟文件夹中使用,完全抛弃解压,文件操作均在虚拟路径中,不产生系统垃圾,保护硬盘,节省硬盘空间。

支持格式:MOU, RAR, ZIP, 7Z, CAB、ARJ、ISO、GZ、BZ2、TAR、WIM、ISO、BIN、BWT、MDS/MDF 、NRG 、I[......]

Read more

C/C++中容易混淆的const

C/C++中容易混淆的const
先看代码段:
void fun(const char *p)
{
}
main()
{
    char p[1];
    fun(p);
}
对于上面代码,编译器是不会警告和报错的,然而换成下面的代码段:
void fun(const char **p)
{
}
main(int argc,char **argv)
{
    fun(argv);
}
编译器警告warning,有的编译器会错误error。

 &nb[......]

Read more

第 1 页,共 8 页12345...最旧 »