- 浏览: 399875 次
- 性别:
- 来自: 上海
最新评论
文章列表
Followed by the copy of the blog on http://bea.stollnitz.com/blog/?p=338 (with title of UI Virtualization), Joe has created his own blog with some connotation.
The article from the original post does not include the code, in this blog, I have implemented some code which can demonstrate the us ...
Guide lines to make a immutable C# classes.
the article is based on the post here: http://stackoverflow.com/questions/352471/how-do-i-create-an-immutable-class
You cannot asssume that the C# language allows you to change the semantic of the assignment oprator, if is to copy the reference o ...
There is one of the triplet of the Eric Lippert's blog on "Atomicity, volatility and Immutability" part I, the original post is availabe here : http://blogs.msdn.com/b/ericlippert/archive/2011/05/26/atomicity-volatility-and-immutability-are-different-part-one.aspx
Atomicity, volat ...
This is the implementation code with annotation that helps to illustrate the triplet of "Using the List View" from "Part I" to "Part III".
WPF Tutorial - Using ListView, Part I
WPF Tutorial - Using ListView, Part II
WPF Tutorial - Using ListView, Part III
Th ...
THis page is a reprint of the document at http://blog.quantumbitdesigns.com/2010/01/26/mvvm-lambda-vs-inotifypropertychanged-vs-dependencyobject/, under the same title of "MVVM - Lambad vs INotifyPropertyChanged vs DependencyObject"
Before start, many developers are very confused ab ...
THis article is based on the study of the page http://wpftutorial.net/Jumplists.html
and it demonstrate the use of a cool feature that is called Jumplist which is avaialbe in Windows 7.
here is the code
Introduction
Windows 7 provides a new taskbar feature for applications called ...
let's first see some live example of how to use the Interfaces to express the idea of something abstract.
First of all, let 's see the Ikey interface and some of the other interfaces.
public interface IKey<TEntity> : IKey, IQuery<TEntity>
{
}
pub ...
This is based on the description of http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html
and I have enclosed a example project to show some syntax and features related to the Nested Class.
In a short word, "the Java Programming Language allows you to define a classs within anothe ...
This article is based on the official document on the subprocess module. you can find the article on subprocess module in this link: http://docs.python.org/library/subprocess.html#module-subprocess
a blurb on subprocess module.
The subprocess module allows you to spawn new processes, conn ...
Below show some tricks that you can play to create a list of certain size
def main():
check(5, '''/path/to/CommandLine/CommandLine.exe''', ">null 2>&1")
# for i, v in enumerate(initializeList(5)):
# print "i: {0}, v: {1}" % (i, v)
...
Since it is very common that you will deal with the string format, so I guess it is good to have some references of somehow that you can quickly look up. It desire a page of its own.
Basically there are two types of formatting string that you may use.
The first one is the Old String Format. I ...
This article is based on the discussion in this page: http://stackoverflow.com/questions/707674/how-to-compare-type-of-an-object-in-python
From this page, it has the following code sample.
# check if x is a regular string
type(x) == str
# check if x is either a regular string or a uni ...
writing docs string is start of becoming a professional python developer.
the article is based on the article here: http://stackoverflow.com/questions/256222/which-exception-should-i-raise-on-bad-illegal-argument-combinations-in-python
def import_to_orm(name, save=False, recur ...
A note on the Function Argument.
# about the parameter of the python argument
# there are 4 types of argument that a Python Fucntino that can accept
# they are
# 1. fixed argument (or called non-default argument)
# 2. the positional arguments
# 3. the keyword arguments
# 4 ...
See the code sample below.
sub main {
useFH(createFH($p));
}
sub createFH($) {
print "Debug, opening ${_[0]}\n";
# it will be an error if you have the file handler as
# declared as local *FH;
# e.g. { don't do this }
# local *FH;
# instead, do this
# o ...