随笔分类 - 澄清 & 探索
摘要:在java源文件开头有包声明语句,编译的时候需要指定生成的class文件路径. 解决方法: javac -d your_path your_class.java 例如:javac -d . FirstTry.java 将在当前目录生成目录test1及FirstTry.class文件,然后执行 jav
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Thre...
阅读全文
摘要:一、为什么Control类提供了Invoke和BeginInvoke机制?关于这个问题的最主要的原因已经是dotnet程序员众所周知的,我在此费点笔墨再次记录到自己的日志,以便日后提醒一下自己。1、windows程序消息机制Windows GUI程序是基于消息机制的,有个主线程维护着一个消息泵。这个消息泵让windows程序生生不息。 Windows GUI程序的消息循环 Windows程序有个消息队列,窗体上的所有消息是这个队列里面消息的最主要来源。这里的while循环使用了GetMessage()这个方法,这是个阻塞方法,也就是队列为空时方法就会被阻塞,从而这个while循环停止运动,这避
阅读全文
摘要:Event Aggregator -- 彻底解耦了事件的定义与行为。一般的事件使用中,我们至少需要引用到定义事件的类。比如,class A{//define event}class B{//some behaviour}class ControlClass{ Aa = new A();a.EventX += B.Method1;}使用了EventAggregator后,我们在事件定义的时候Publish,仅需要在其它任何需要的地方Subscribe!
阅读全文
摘要:从应用程序包括用户界面的角度来看,存取信息的最小单位是Byte(字节);从磁盘的物理结构来看存取信息的最小单位是扇区,一个扇区是512字节;从操作系统对硬盘的存取管理来看,存取信息的最小单位是簇,簇是一个逻辑概念,一个簇可以是2、4、8、16、32或64个连续的扇区。一个簇只能被一个文件占用,哪怕是只有1个字节的文件,在磁盘上存储时也要占用一个簇,这个簇里剩下的扇区是无用的。例如用NTFS文件系统格式化的时候默认是8个扇区组成一个簇,即4096字节。所以你如果保存了一个只有1字节的文件(例如字母N),它在磁盘上实际也要占用4096字节(4K),所以“簇”也可以理解为磁盘存取信息的最小单位。
阅读全文
摘要:Context-boundobjectsareaspecialcaseof.NETremoting(inparticular,ofclient-activatedobjects).Inmanyrespects.NETtreatsthemjustlikeremoteobjects,butitdoesoptimizesomeelementsofitsremotingarchitectureforcontext-boundobjects—forexample,asmentionedpreviously,thechannelusedforcross-contextcallsisanoptimizedc
阅读全文
摘要:There are two fundamental models of interprocess communication:(1) shared memory: singal, semaphore, monitor,memory-mapped file.(2) message passing: socket(the primitive way, Direct or communications), pipe(Indirect communications),MSMQ,RPC (COM, DCOM, .Net Remoting, WCF, CORBA, Java RMI, etc., are
阅读全文
摘要:Coding to well-defined interfaces, particularly when using the dependency injection pattern, is the key to achieving loose coupling. By coupling an object to an interface instead of a specific impleme...
阅读全文
摘要:A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and increased storage space.Indexes can be created using one ...
阅读全文
摘要:Most file systems make use of an underlying data storage device that offers access to an array of fixed-size physical sectors, generally a power of 2 in size (512 bytes or 1, 2, or 4 KiB are most comm...
阅读全文
摘要:之前在一本介绍操作系统的书上看到说,由MMU内存管理单元负责把虚拟内存地址转换为物理内存地址。 后来在研究 Page Table的时候有看到介绍这么说,When a process requests access to its memory, it is the responsibility of the operating system to map the virtual address pr...
阅读全文
摘要:数据结构在计算机中有两种不同的表示方法:顺序映像和非顺序映像,并由此得到两种不同的存储结构:顺序存储结构和链式存储结构。
阅读全文
摘要:look intothe implementations of some essential libararies and essentail technologies ........ to be ....
阅读全文
摘要:A. HashTable, Dictionary<TKey, TValue>, SortedDictionary<TKey, TValue>, SortedList<TKey, TValue>0. HashTable, Dictionary<TKey, TValue>, 基于哈希表。SortedDictionary<TKey, TValue&g...
阅读全文
摘要:WinForm Vs WPFXAML的先进之处在哪里?XAML个人觉得XAML应该是WPF中比较划时代的东东。通过XAML,我们可以用文本的方式描述复杂的Object Graph。通过Command,Routing Event等机制,界面设计人员和程序员有比较清楚的界限。Dependency Property在WinForm开发中,经常碰到的问题就是一个控件的值变了,其他控件也会跟着改变。解决办法...
阅读全文
摘要:to be continued...
阅读全文
摘要:17.1 数组与内存变量需要占用内存空间,内存空间有地址。不同数据类型的变量,可能占用不同的内存大小及有不同的内存结构。以前我们所学都称为“简单数据类型”,如:int,char,float,double,bool。像 char,bool,只占用一个字节,所以我们不去管它的的“结构”,其余如int,float,double占用多个字节,但比较简单,适当...
阅读全文
摘要:栈(stack)堆(heap)栈是存放函数返回地址、参数、局部变量的。 堆是程序可以自由操作的内存,使用时先申请,用完之后释放,如何使用完全由程序代码控制。栈在汇编代码中表示成PUSH POP,用的是ESS段,SP寄存器 而堆不是,是在内存中读写,EDS段,C++包括两种被应用程序管理的内存区域:一种称为栈(stack),另一种称为堆(heap)。 stack是函数被调用时自动分配的一块内存区域,...
阅读全文
摘要:如何把数据库中的关系转换为对象,如何把对对象的操作进行持久化保存?不仅仅为了节省大量工作量,而且更重要的是,the above layer should just know Business Object, not Data Table in database. 下面是一些实践.0. 纯手工劳动. 用上SqlHelper\Enterprise Library DAAB, 自己建类以及数据库操作方法...
阅读全文
摘要:困扰了很久哦,什么没有asp.net账号\权限不够\等等原因都遇到了,最后还有一个是ie的security settings中的User Authentication\Logon项的设置,选择Automatic logon with current user name and password后解决问题。
阅读全文
浙公网安备 33010602011771号