自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

tedyxuan的专栏

读书笔记

  • 博客(65)
  • 资源 (4)
  • 收藏
  • 关注

原创 探索代码理解与生成领域的人工智能前沿

探索代码理解与生成领域的人工智能前沿

2023-12-11 11:13:18 380

原创 《Linux0.11内核完全注释》读后小结 --- 进程调度与信号

schedule.c 是关于进程调度的。schedule 函数是核心,先检查task列表中,有没有收到信号的,有的话处理之。/* check alarm, wake up any interruptible tasks that have got a signal */for(p = &LAST_TASK ; p > &FIRST_TASK ; --p) if (*

2012-02-24 11:10:35 1073

原创 《Linux0.11内核完全注释》读后小结 --- 中断与系统调用

Linux 系统包含了一大堆的中断,是所有操作的基础。中断中的开闭中断cli(close interrupt)指令用来复位CPU标志寄存器中的中断标志,使系统不响应外部中断。sti(start interrupt)指令用来复位,使系统响应中断。asm.s 设置了一堆底层中断,进入中断前要压入eax等寄存器,执行完要pop 出一些寄存器。这种统一的工作在 no

2012-02-16 16:00:43 787

原创 《Linux0.11内核完全注释》读后小结 --- 启动引导

bootsect.s 我们实验环境中,Image 就是一个软盘镜像,bootsect.s就在软盘的第一个扇区中(引导扇区,0磁道,0磁头,第一个扇区)硬盘有一个单独的镜像文件BIOS ROM如果设置成软盘启动,就把引导扇区的代码加载到0x7C00开始处执行。因为前面的内存保存有有用的信息。如果是从硬盘启动系统,就不执行bootsect.s。LILO, Grub等多操作系统引

2012-02-13 19:30:53 1005

原创 《Linux0.11内核完全注释》读后小结 --- 内存寻址

Linux 内存管理主要是32保护模式下,段页式内存管理。如何处理内存相关的寄存器,使得程序可以读写超过4G的内存。x86这个CPU框架,会根据寄存器的值和段页式规则来进行地址变换,进行内存访问。其中,也会进行权限验证等附加判断。几个概念:保护模式vs实模式保护模式下的:虚地址:程序产生的段选择符,段内偏移地址两部分组成。要经过分段地址变换处理后,才对应到屋里地址。

2012-02-13 19:30:39 991

原创 《Linux0.11内核完全注释》读后小结 --- 调试环境的搭建

先看了 Linux Kernel Development 再看了 Oreilly-Linux.Device.Drivers.3rd.Edition 后来看了Linux 0.01 内核分析与操作系统设计 然后,打算仔细研究 Linux0.11代码 1. 在Linux 4.1.1 上搭建bochs的Linux Kernel 调试环境安装bochsbochs-2.1.1.ta

2012-01-30 13:16:19 4221

原创 The Annotated STL Sources 读后感

最近看了侯捷翻译的STL源码剖析,感觉有些启发。迭代器:Allocator 空间配置器,全域函数 construct(), destroy()iterator 是个智能指针,可以从原生指标提取出需要的类别。这样,容器需要实现自己迭代器。容器RB tree的在STL的使用还是很广泛的,不仅是map,set也是用的RB tree根据Vector的特点,迭代器

2011-11-25 15:42:50 1395

原创 Linux Kernel Development (8)

The Block I/O Layer The smallest addressable unit on a block device is a sector. Sectors come in various powers of two, but 512 bytes is the most common size. although many block devices can operate

2011-06-16 17:23:00 600

原创 Linux Kernel Development (9)

The Memory Descriptor Processes may elect to share their address spaces with their children by means of the CLONE_VM flag to clone().The process is then called a thread. Recall from Chapter 3, “Proce

2011-06-16 17:23:00 643

原创 Linux Kernel Development (10)

The Page Cache and Page Writeback In this manner, the page cache contains chunks of recently accessed files. During a page I/O operation, such as read(),2 the kernel checks whether the data resides i

2011-06-16 17:23:00 658

原创 Linux Kernel Development (7)

The Virtual Filesystem The Unix concept of the file is in stark contrast to record-oriented filesystems, such as OpenVMS’s Files-11. Record-oriented filesystems provide a richer, more structured repr

2011-06-16 17:22:00 808

原创 Linux Kernel development (5)

An Introduction to Kernel Synchronization A common use of the atomic integer operations is to implement counters. Protecting a sole counter with a complex locking scheme is overkill, so instead devel

2011-06-16 17:21:00 608

原创 Linux Kernel Development (6)

Timers and Time Management The frequency of the system timer (the tick rate) is programmed on system boot based on a static preprocessor define, HZ The kernel defines the value in . The final agree

2011-06-16 17:21:00 646

原创 Linux Kernel development (3)

Kernel Data Structures The linked-list code is declared in the header file and the data structure is simple: Usage is slightly different in kernel versions prior to 2.6.33—doublecheck before writing code rbtrees The Linux implementation of red-black t

2011-04-12 16:37:00 804

原创 Linux Kernel development (4)

Bottom Halves and Deferring Work Bottom Halves The job of bottom halves is to perform any interrupt-related work not performed by the interrupt handler. In an ideal world, this is nearly all the work because you want the interrupt handler to perf

2011-04-12 16:37:00 690

原创 Linux Kernel development (1)

asm/thread_info.h linux/threads.h   /proc/sys/kernel/pid_max linux/sched.h kernel/fork.c linux/kthread.h    struct task_struct *kthread_create Process Priority Process Priority Timeslice The Scheduling Policy in Action Specifically, CFS

2011-04-12 16:36:00 1222

原创 Linux Kernel development (2)

Syscalls: SYSCALL_DEFINE0(getpid) { return task_tgid_vnr(current); // returns current->tgid } SYSCALL_DEFINE0 is simply a macro that defines a system call with no parameters (hence the 0).The expanded code looks like this: asmlinkage long s

2011-04-12 16:36:00 724

原创 FFDShow-tryout 调试与源代码研读(二)

FFDShow tryout 把ffmpeg和DirectX 结合起来并封装在几个类里面。类图见我的google doc 代码路径分析: //------------------Construct FFshow decoder-------------------------------------------------------------------------------------------- //------------------------------------

2011-04-12 16:35:00 2036

原创 FFDShow-tryout 调试与源代码研读(一)

发现一个新的ffdshow-tryout 项目,这个东西不错。集成了ffmpeg,h264等开源项目,又是跨平台的。而且还在不断的更行,我很喜欢这个项目。值得仔细品味研究一下。 可以用mingw 和vs2010编译。就像它的wiki上developer 描述的那样就可以。非常简单。 用vs2010加graphEdit联合可以进行调试。 grpahEdit is part of wind

2010-12-22 17:20:00 3169 2

原创 编程珠玑的一道令我surprise的题目,竟然和Google的笔试题一样。

其实题目很简单,就是计算一个整数数组中,连续的最大子数组。 一开始想到肯定是个O(n*n)的算法:maxSectionGood 后来使用递归O(n*log(n)):maxSectionExcellent 最经典的是最后一个算法,提升到了O(n):maxSectionPrefectGoogle 笔试题:input: an array of int which repr

2010-12-16 10:36:00 985

原创 一道笔试题 体现出的严谨和算法

<br />一开始用Integer 怎么都超时,发现用int 才能过。<br /> <br />Equilibrium index of a sequence is an index such that the sum of elements at lower indexes is equal to the sum of elements at higher indexes.For example, in a sequence A:<br /> A[0]=-7 A[1]=1 A[2]=5

2010-11-24 11:04:00 850

原创 值得注意的算法问题,“两次减法操作”竟然比“一次2倍乘法和一次加法”要慢一秒

今天玩topcoder, 发现“两次减法操作”竟然比“一次2倍乘法和一次加法”要慢一秒。下面是例程。package practice;import java.util.Calendar;public class GuessinNextElement {    public int guessSlow(int[] A)    {        boolean flag=true;        if ((A[1]-A[0])==(A[2]-A[1]))               

2010-11-23 14:45:00 983

原创 LanMsg 代码分析

UsersOpt.cs 介绍: readyLogin() 入口 private void DataArrival(byte[] Data, System.Net.IPAddress Ip, int Port) 这是收到消息的处理函数,里面有个一个大的switch ServiceMain.cs FormAccess.cs newSendMsgForm() 产生新用户发送消息窗口 (其中有打

2010-05-17 16:00:00 1162 1

原创 ePoll 体验记

先转载一部分:昨天被人问及epoll和select的差别,吞吞吐吐说了个大概,囧,基础不牢害死人啊再次查找了资料,内容如下 select和poll:int select(int n, fd_set *rd_fds, fd_set *wr_fds, fd_set *ex_fds, struct timeval *timeout);select用到了fd_set结构,此处有

2010-05-17 15:36:00 683

原创 ArcGIS 和TopMap的联合开发

一、整体流程。 1. Web界面        |       // 2.  Extjs        |       // 3. Java method call (with parameter object)        |       // 4. JNI call 自己写的map2dll.dll,这个dll调用Top

2010-03-04 14:44:00 1238

原创 Vertasent infrastructure code------ Windows platform migrate

1. Code base is Windows The code originally could be compile and build in Microsoft Visual Studio 7.0 2. Compile and build on MingGW and MSYS Because I want to compile with FFMpeg code together,

2010-02-25 22:30:00 642

原创 How to check health of Linux OS

I learned some experience while Nanjing found 0x03 error. At begining, we don't know why our GSRM(a linux process) hang in a short time 5 seconds sometimes. It didn't handle any message at that time a

2010-02-25 22:29:00 1285

原创 tutorial05.c 和tutorial06.c

tutorial05 是要把音频可以同步到视频,也为下一步快进,快退做准备。 因为是音频所以不是简单的delay,需要进行音频缓冲的管理,synchronize_audio 返回的是一个同步好的缓冲区。 tutorial06.c 是要用一些API,实现快进或者快退。注意我们要清空我们自己的缓存。     if(is->seek_req) {      int stream_

2010-01-14 16:06:00 970

原创 Tutorial 04 和 Tutorial05的实践

Tutorial 04: Spawning Threads  没什么大问题,就是新建了一个数据VideoState数据结构,然后生成两个新的Thread分别,把音视频从文件取出,和一个专门视频解码的线程。用SDL的一个自动刷新功能,把视频帧送到屏幕上。下面的代码,就是需要tutorial5来解决的同步问题。 vp = &is->pictq[is->pictq_rindex]

2010-01-13 15:14:00 1293

原创 FFMpeg tutorial01 --- tutorial03 小结

FFMpeg的向导对于学习FFMpeg有很大的帮助,出处: 原始:http://www.dranger.com/ffmpeg/tutorial01.html翻译:http://home.chinavideo.org/space.php?do=mtag&tagid=2 tutorial01 和 tutorial02很简单,按照做就可以:大致FFMpeg API的使用流程是 

2010-01-13 14:42:00 1666 1

原创 使用CodeBlocks和MSys搭建FFMPEG调试系统

SVN下载最新的代码安装Msys对代码进行编译,编译参数configuration: --disable-optimizations --disable-ipv6 --enable-shared --disable-static --enable-memalign-hack --disable-mmx安装CodeBlocks 可以进行debug,设置断点到行用source

2009-12-22 09:55:00 2911

原创 Conversation with senior CTO leader ------- George.

1. Loss product but now market2. Learn from your experience3. Seperate stream and content4. Big company has complicated process for ensuring quanlity. But it leads to loss some oppotunities some

2009-05-21 16:48:00 483

原创 如何让一个系统崩溃

1. 改动它的系统时间。2. 改动它的密码。 看看他的系统强壮性,这两个问题对一般的软件。简直就是灾难

2009-04-21 12:58:00 1898

原创 Java NIO 实践经验总结

总的来讲,java NIO 就是一个调用select的无限循环。如果,有消息接受或者发送或者连接关闭或者打开,select都会返回这个事件。但是,在写selector循环,要注意以下几个事情1.发送事件是因为一个packet过大,一次没有发送出去。需要分两次发时,会激活这个事件2.如果所有的channel都从select注销了,那么select函数会阻塞。需要重新注册一个channel并且调用

2007-10-08 18:28:00 1300

原创 ffserver 拆解

1.配置文件:Format rtp#Feed feed1.ffmFile "/home/teddy_linux/1.avi"MulticastAddress 224.124.0.1#MulticastAddress 192.168.205.51MulticastPort 15000MulticastTTL 16#NoLoop2.xvid压缩的视频和一个raw的音频拆解一,必须调用av_

2007-10-05 18:11:00 3853

原创 TCP's window

最近,正在做C++和Java的TCP通讯。发现我们这个C++ Framework的发送和接受的效率很高。可以说,发送MPEG流都可以。因为Java的接受和处理的速度很慢。所以,出现了不协调的情况。Java 最后总是发送TCP window equal to 0的 package 给C++,所以启发我往下钻研一下。看了《TCP/IP Illustrated》Volume 1: The Protoco

2007-08-16 16:53:00 1636

原创 More effective C++ List

 最近正在读者本书,感觉受益匪浅。在这里把标题列出来,一目了然。其实,每一条包含很多内容。值得长考。3. 基礎議題..................................................................................................................... 123.1 ITEM M1:指標與引用的區別.

2007-06-12 10:08:00 819

原创 C++读书历程

C++读书历程:最近,在看一本Modern C++ Design Generic Programming and Design Patterns Applied的书。但是,感觉越来越看不下去了。这时候感觉到我对C++的一无所知。还是,从Effective.2E.and.More.Effective.C++.-.50.Specific.Ways.to.Improve.Your.Programs.

2007-06-03 12:45:00 1008

原创 DirectShow Filter 编写杂记

最近,看看了看directShow 中的filter的编写。发现一个开源的项目很不错:http://sourceforge.net/projects/guliverkli/他把各种编解码器包装成filter,然后可以应用到各种开发中。其中,realmeida的splitter(RealMediaSplitter.ax)就是他包装的。有空可以研究一下。 

2007-04-16 15:11:00 1138

原创 Inside The C++ Object Model ---- The Semantics of Data

例子:class X {};class Y : public virtual X {};class Z : public virtual X {};class A : public Y, public Z {};大小不是01. 语言本身所造成的额外负担 virtual table 2. 编译器对于特殊情况所提供的优化处理 char one3. alignment的限制The Binding o

2007-04-05 14:38:00 559

TI BLE Monitor v2.5

最新版TI ble 芯片工具,需要配合USB Dongle使用,最新的呦。非常好用

2017-11-16

破解版source insight 4.0

不错的代码编写工具,我的3.5不好用,换成最新的4.0很好。不要升级呦

2017-10-29

FTP同步服务器文件和本地文件下载

VC2015 FTP同步一个文件夹,如果本地没有就下载。

2016-09-16

ArcGIS 图层控制实例代码

包含了一下如何控制图层的代码 我抽象了一个基本图层:BaseLayer.java和四个子图层: DuplicateLayer.java 完全复制一个图层,包括上面的点,线,面。 MemoryLayer.java 生成一个内存图层,对内存图层的操作很快。 ProxyLayer.java 生成一个代理图层,对这个图层的操作等价于对他所代理的图层。 ShapeFileLayer.java 根据图层文件生成一个图层 UtilityLayer.java 工具类 编辑图层,可以对图层上面的线宽度,面的颜色进行修改。

2010-03-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除