星期三, 三月 30, 2011
星期二, 三月 29, 2011
PS3 Jailbreak: Hotz strikes back PlayStation 3 News - Page 1 | Eurogamer.net
PS3 Jailbreak: Hotz strikes back PlayStation 3 News - Page 1 | Eurogamer.net
EULA was sued, is this 'service contract' really legal binding stuff? can we bring a class action against it?
EULA was sued, is this 'service contract' really legal binding stuff? can we bring a class action against it?
星期一, 三月 28, 2011
辽宁为建高铁拆除投资数千万新建筑(组图)_新闻中心_新浪网
辽宁为建高铁拆除投资数千万新建筑(组图)_新闻中心_新浪网
铁路和地方有 关部门能从国家利益和人民利益考虑才怪,这种立项应该属于违法建设,应该依法惩罚有关部门全体领导!
铁路和地方有 关部门能从国家利益和人民利益考虑才怪,这种立项应该属于违法建设,应该依法惩罚有关部门全体领导!
【成员名字版PV】惠比寿麝香葡萄第四单曲PV スプリングホリデー - 视频 - 优酷视频 - 在线观看
【成员名字版PV】惠比寿麝香葡萄第四单曲PV スプリングホリデー - 视频 - 优酷视频 - 在线观看
我是一个极其讨厌AV和看AV的人 而至于那些什么武腾兰、吉泽明步、苍井空、松岛枫、神谷姬、小泽玛莉亚、高树玛丽亚、山本梓、樱树露衣、濑户由衣、树麻里子、星野光、白石瞳、忧木瞳、白 石日和、相田桃、浅仓舞、小林瞳、夕树舞子、美穗由纪、小室友里、黑木香、朝冈实岭、美里真里、饭岛爱、北原梨奈、秋元友美、川合里美、细川百合子、麻生 早苗、松阪季实子、川岛和津实、小泽奈美、叶山丽子、金泽文子、凉木桃香、小泽圆、铃木麻奈美、白鸟智香子、中谷香子、市川香织、蜷川香子、上杉美香子、 吉田美香子、长谷香子、岬崎香子、立花里子、上原多香子、石川施恩惠、大尺右香、南波杏…… 我更是一个都不认识!根本都没有听说过~
我是一个极其讨厌AV和看AV的人 而至于那些什么武腾兰、吉泽明步、苍井空、松岛枫、神谷姬、小泽玛莉亚、高树玛丽亚、山本梓、樱树露衣、濑户由衣、树麻里子、星野光、白石瞳、忧木瞳、白 石日和、相田桃、浅仓舞、小林瞳、夕树舞子、美穗由纪、小室友里、黑木香、朝冈实岭、美里真里、饭岛爱、北原梨奈、秋元友美、川合里美、细川百合子、麻生 早苗、松阪季实子、川岛和津实、小泽奈美、叶山丽子、金泽文子、凉木桃香、小泽圆、铃木麻奈美、白鸟智香子、中谷香子、市川香织、蜷川香子、上杉美香子、 吉田美香子、长谷香子、岬崎香子、立花里子、上原多香子、石川施恩惠、大尺右香、南波杏…… 我更是一个都不认识!根本都没有听说过~
Google taps Java guru Gosling amid lawsuit - MarketWatch
Google taps Java guru Gosling amid lawsuit - MarketWatch
who was fired from oracle last year?
who was fired from oracle last year?
星期六, 三月 26, 2011
CMU Eliminates Object Oriented Programming For Freshman - Slashdot
CMU Eliminates Object Oriented Programming For Freshman - Slashdot
"According to this blog post from professor Robert Harper, the Carnegie Mellon University Computer Science department is removing the required study of O-O from the Freshman curriculum: 'Object-oriented programming is eliminated entirely from the introductory curriculum, because it is both anti-modular and anti-parallel by its very nature, and hence unsuitable for a modern CS curriculum.' It goes on to say that 'a proposed new course on object-oriented design methodology will be offered at the sophomore level for those students who wish to study this topic.'"
"According to this blog post from professor Robert Harper, the Carnegie Mellon University Computer Science department is removing the required study of O-O from the Freshman curriculum: 'Object-oriented programming is eliminated entirely from the introductory curriculum, because it is both anti-modular and anti-parallel by its very nature, and hence unsuitable for a modern CS curriculum.' It goes on to say that 'a proposed new course on object-oriented design methodology will be offered at the sophomore level for those students who wish to study this topic.'"
星期五, 三月 25, 2011
星期三, 三月 23, 2011
九旬纳粹集中营警卫受审 涉嫌参与杀害2.79万人_新闻中心_新浪网
九旬纳粹集中营警卫受审 涉嫌参与杀害2.79万人_新闻中心_新浪网
“任何犯下这类严重罪行的人都应受惩罚,”吕策说,“即便已经过去60年,即便(嫌疑人)年事已高。”
但是以色列宽恕了犯下同样罪行的犹太人!
“任何犯下这类严重罪行的人都应受惩罚,”吕策说,“即便已经过去60年,即便(嫌疑人)年事已高。”
但是以色列宽恕了犯下同样罪行的犹太人!
星期二, 三月 22, 2011
2008 R2 Easy Print - Lots of Issues - Looking for Checklist
2008 R2 Easy Print - Lots of Issues - Looking for Checklist
http://ts.veranoest.net/
(click the Printing link on the left). I have seen alot of folks fix their issues by applying the hotfixes...
Below is the stuff from her site:
Update: .NET is no longer required on the client if the server runs W2008 R2 and the client runs Windows 7.
These are recommended hotfixes:
946411 - FIX: When you print an XPS file on a Windows XP Service Pack 2 or Service Pack 3-based computer, the characters in the XPS file print incorrectly
954744 - FIX: Some pages are printed in the incorrect orientation when you use Terminal Services Easy Print to print a document that contains both portrait-oriented pages and landscape-oriented pages
954743 - FIX: After you apply hotfix 954744, printing performance may be significantly slower when you print documents by using Terminal Services Easy Print
and here are some optional one's:
962930 - Cannot print from Terminal Services Easy Print on Windows server 2008, access is denied
954399 - Error message when you try to print by using Terminal Services Easy Print from a client computer that you connect to a Windows Server 2008-based computer: "Tswpfwp.exe has stopped working"
959442 - The edges of a document are truncated when you try to print the document by using Terminal Services Easy Print from a client computer that is running Windows XP SP3, Windows Vista SP1, or Windows Server 2008
970603 - The content of a printout is different when you print a PDF document by using Terminal Services Easy Print in a Terminal Services (TS) session in Windows Vista or Windows Server 2008
954400 - The Remote Desktop Connection disconnects when you try to print to a Windows Server 2008-based terminal server
958656 - Client-side rendering in Windows Server 2008 and in Windows Vista may decrease performance on Windows Server 2008-based terminal servers
960792 - Error message when a user tries to add a printer in Windows Server 2008 by using a TCP/IP address or a host name: "Access is denied"
973356 - Error message when you create one or more network printers in a Windows Server 2008-based terminal server session: "Printers cannot be installed"
955560 - Handle leaks and memory leaks occur on the Printer Spooler service when a Windows Vista SP1-based computer or a Windows Server 2008-based computer installs and uninstalls network printers
979163 - Many pages are printed when you try to print an Excel worksheet by using a redirected printer if the Terminal Services Easy Print feature is used
980056 - The client printer may print the documents by using an incorrect paper size if the "Use Remote Desktop Easy Print printer driver first" policy is enabled
2004234 - After upgrading a printer driver on any Microsoft Operating system later than Windows XP and Server 2003, the old driver files are still being used
Printer Driver Isolation in Windows 7 and Server 2008 R2 - by Helge Klein
http://ts.veranoest.net/
(click the Printing link on the left). I have seen alot of folks fix their issues by applying the hotfixes...
Below is the stuff from her site:
TS Easy Print issues
If Easy Print doesn't work at all, check if the client meets the requirements : rdp client version 6.1 and .NET Framework 3.0 SP1.Update: .NET is no longer required on the client if the server runs W2008 R2 and the client runs Windows 7.
These are recommended hotfixes:
946411 - FIX: When you print an XPS file on a Windows XP Service Pack 2 or Service Pack 3-based computer, the characters in the XPS file print incorrectly
954744 - FIX: Some pages are printed in the incorrect orientation when you use Terminal Services Easy Print to print a document that contains both portrait-oriented pages and landscape-oriented pages
954743 - FIX: After you apply hotfix 954744, printing performance may be significantly slower when you print documents by using Terminal Services Easy Print
and here are some optional one's:
962930 - Cannot print from Terminal Services Easy Print on Windows server 2008, access is denied
954399 - Error message when you try to print by using Terminal Services Easy Print from a client computer that you connect to a Windows Server 2008-based computer: "Tswpfwp.exe has stopped working"
959442 - The edges of a document are truncated when you try to print the document by using Terminal Services Easy Print from a client computer that is running Windows XP SP3, Windows Vista SP1, or Windows Server 2008
970603 - The content of a printout is different when you print a PDF document by using Terminal Services Easy Print in a Terminal Services (TS) session in Windows Vista or Windows Server 2008
Misc. problems
958894 - The Printer Spooler service may encounter an access violation and crash when the service handles asynchronous notifications from print clients on Windows Server 2008-based or Windows Vista Service Pack 1-based computers954400 - The Remote Desktop Connection disconnects when you try to print to a Windows Server 2008-based terminal server
958656 - Client-side rendering in Windows Server 2008 and in Windows Vista may decrease performance on Windows Server 2008-based terminal servers
960792 - Error message when a user tries to add a printer in Windows Server 2008 by using a TCP/IP address or a host name: "Access is denied"
973356 - Error message when you create one or more network printers in a Windows Server 2008-based terminal server session: "Printers cannot be installed"
955560 - Handle leaks and memory leaks occur on the Printer Spooler service when a Windows Vista SP1-based computer or a Windows Server 2008-based computer installs and uninstalls network printers
979163 - Many pages are printed when you try to print an Excel worksheet by using a redirected printer if the Terminal Services Easy Print feature is used
980056 - The client printer may print the documents by using an incorrect paper size if the "Use Remote Desktop Easy Print printer driver first" policy is enabled
2004234 - After upgrading a printer driver on any Microsoft Operating system later than Windows XP and Server 2003, the old driver files are still being used
Documentation
Using Remote Desktop Easy Print in Windows 7 and Windows Server 2008 R2Printer Driver Isolation in Windows 7 and Server 2008 R2 - by Helge Klein
Deadly Accident Sparks Crackdown On Bus Companies
Deadly Accident Sparks Crackdown On Bus Companies
Trucks that caused the accidents with buses should be pulled over, not buses.
Trucks that caused the accidents with buses should be pulled over, not buses.
星期一, 三月 21, 2011
星期日, 三月 20, 2011
Here's a List of Useful Kinect Voice Commands - Kinect for Xbox 360 news
Here's a List of Useful Kinect Voice Commands - Kinect for Xbox 360 news
To do this, say this
Go to the Kinect Hub Xbox Kinect
Play a disc Xbox play disc
See more options in the Kinect Hub Xbox next or Xbox previous
Sign in to your profile Xbox sign in
Start the Kinect Tuner Xbox Kinect Tuner
Start Kinect ID Xbox Kinect ID
Open or close the disc tray Xbox open tray or Xbox close tray
Go to the Xbox Dashboard Xbox Dashboard
Play music or video Xbox play
Fast-forward music or video Xbox fast-forward
Pause music or video Xbox pause
星期六, 三月 19, 2011
严歌苓:人生比小说更强悍
严歌苓:人生比小说更强悍
刚看了《幸福来敲门》,感觉这人心态很差。毕竟是陈冲的“好朋友”,陈冲在美国貌似也混得也没有前途。类似三毛在那里神化荷西,严歌苓的所谓“外交官”老公,貌似就是个使馆工作人员,实在不足一提。为所谓了她而辞掉职务,结婚后明明跟着她老公去各个国家混日子。54岁的女人看起来相当苍老,而女儿据说才7岁。
朋友说看过《少女小渔》,刘若英演大陆女为了身份嫁老外。我听说过但是没看过。感觉这人写作水平,思路很类似六六,都是接近自己亲身经历的东西。这人嫁老外也多半是为了身份,而很多记者采访的东西多半出自她本身的谎言。
电视剧据说搞得很仓促,号称开拍时候才有5集,后面都是些框架。
类似于很多国内电视剧,开头都还可以,中间拖沓,最后结尾就很勉强了。
早期老宋拿的佳能数字单反,后来几个场景用资料片凑数。
这老宋相当不靠谱的人,自己老婆摩托车死了,都不说放弃摩托,而且很不注意安全;自己孩子也是丢给岳母而基本就不说去照看;动不动对孩子发脾气;而对江路毫无珍惜爱护。然后这个江路就成为高大全的人物,一方面敢穿敢干,但是一方面对王文胜这种不说揭露斗争,而仅仅说些要对付他的空话,莫名其妙。
里面所谓风雷杂技团,大概是南方才有的东西,虽然听说北京也有风雷京剧团;另外一点就是到云南插队,貌似也是上海知青去的,而严本身又说在安徽长大,也有说是在上海的。
刚看了《幸福来敲门》,感觉这人心态很差。毕竟是陈冲的“好朋友”,陈冲在美国貌似也混得也没有前途。类似三毛在那里神化荷西,严歌苓的所谓“外交官”老公,貌似就是个使馆工作人员,实在不足一提。为所谓了她而辞掉职务,结婚后明明跟着她老公去各个国家混日子。54岁的女人看起来相当苍老,而女儿据说才7岁。
朋友说看过《少女小渔》,刘若英演大陆女为了身份嫁老外。我听说过但是没看过。感觉这人写作水平,思路很类似六六,都是接近自己亲身经历的东西。这人嫁老外也多半是为了身份,而很多记者采访的东西多半出自她本身的谎言。
电视剧据说搞得很仓促,号称开拍时候才有5集,后面都是些框架。
类似于很多国内电视剧,开头都还可以,中间拖沓,最后结尾就很勉强了。
早期老宋拿的佳能数字单反,后来几个场景用资料片凑数。
这老宋相当不靠谱的人,自己老婆摩托车死了,都不说放弃摩托,而且很不注意安全;自己孩子也是丢给岳母而基本就不说去照看;动不动对孩子发脾气;而对江路毫无珍惜爱护。然后这个江路就成为高大全的人物,一方面敢穿敢干,但是一方面对王文胜这种不说揭露斗争,而仅仅说些要对付他的空话,莫名其妙。
里面所谓风雷杂技团,大概是南方才有的东西,虽然听说北京也有风雷京剧团;另外一点就是到云南插队,貌似也是上海知青去的,而严本身又说在安徽长大,也有说是在上海的。
星期五, 三月 18, 2011
What a Great .NET Developers Ought To Know: Answers
[show/hide]
- Describe the difference between a Thread and a Process?
- A thread is a path of execution that run on CPU, a proccess is a collection of threads that share the same virtual memory. A process have at least one thread of execution, and a thread always run in a process context.
- What is a Windows Service and how does its lifecycle differ from a "standard" EXE?
- Windows service doesn't require a logged on user to activate it, (there is a bit more, but that is basicaly it).
- What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
- Hm, that is a tough question, there is the 2Gb of normal user space, 3Gb if you run windows with the right switch (which has problems of its own, apperantly) and the max virutal memory of 32bits machine is 4Gb. This affect system design when you reach big things such as databases, applications server and Enterprise "stuff" that require a lot of memory.
- What is the difference between an EXE and a DLL?
- An exe is an EXEutable file that contain instructions for the processor to run as well as an entry point to start execution (main() in C/C++, Public Static Void Main() in .Net). A dll is a file that contain a piece of functionality that an exe will call.
- What is strong-typing versus weak-typing? Which is preferred? Why?
- Strong type is checking the types of variables as soon as possible, usually at compile time. While weak typing is delaying checking the types of the system as late as possible, usually to run-time. Which is preferred depends on what you want. For scripts & quick stuff you'll usually want weak typing, because you want to write as much less (is this a correct way to use Ensligh?) code as possible. In big programs, strong typing can reduce errors at compile time. Going any further will cause Holy War, so I stop here.
- Corillian's product is a "Component Container." Name at least 3 component containers that ship now with the Windows Server Family.
- No idea what a componenet container is, sorry.
- What is a PID? How is it useful when troubleshooting a system?
- Process Identifier, usually so you can kill an offending process (at least that is how I use it) or for logging / debugging purposes.
- How many processes can listen on a single TCP/IP port?
- AFAIK, One. It make sense, but I'm not 100% sure. The results of more than one process listenning to the same port would be strange at best.
- What is the GAC? What problem does it solve?
- Global Assembly Cache. Versioning. Dll Hell, etc.
- Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.
- That one is tough, Interface oriented would probably be (first time I hear this term) writing everything in terms of interfaces and only using the interfaces, using concentrate classes for instatition only. Object orient is the shebang of classes, polymorphism, inheritance, and the like. Very powerful, allows you to hook your objects together and just let the program run. OO is a must for Interface bases. Aspect Oriented programming is when you have code running on certain aspects of your code (method entry, method return, exception thrown, etc) most useful in logging and security.
- Describe what an Interface is and how it’s different from a Class.
- Interface define a contract, but no executable code. Interface is implemented by classes.
- What is Reflection?
- A way to explore the structure of assemblies at run-time (discover which classes/resources/methods there are).
- What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
- Never done either, but XML WS is interoperatable, and .Net Remoting is extensible.
- Are the type system represented by XmlSchema and the CLS isomorphic?
- No.
- Conceptually, what is the difference between early-binding and late-binding?
- Early binding is knowing at compile time what you are calling, late binding is discovering it in run time. That is not a good explanation, but generally this mean whatever you're using a concentrate class or an interface.
- Is using Assembly.Load a static reference or dynamic reference?
- Dynamic reference.
- When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?
- When trying to load a file that is not on your private path. (Plug-ins comes to mind, or things like Reflector).
- What is an Asssembly Qualified Name? Is it a filename? How is it different?
- It contain the name of the assembly, its version and its public key, it's not a file name, and it's different in that it allows signing and versioning.
- Is this valid? Assembly.Load("foo.dll");
- No, Assembly.Load() accept assemblies names and not file names (got bitten by that a few times).
- How is a strongly-named assembly different from one that isn’t strongly-named?
- It's an assembly that has been signed using public/private key pair. It can be placed in the GAC, mainly. It also help is versioning and code verification (if you know the publisher Public Key, you can verify that it hasn't been tampered with.)
- Can DateTimes be null?
- No, and it sucks that they can't.
- What is the JIT? What is NGEN? What are limitations and benefits of each?
- Just In Time compilation, it allows for better compilation magic because the JIT knows a lot more about the code when it's running, long startup time. NGen is compiling ahead of time, faster startup time, but not as much info for the compiler, so it may not produce as efficent code.
- How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization?
- It divide them to three generations, the first one is short lived and is collected often (and is cheap to collect), the other two are for longer term objects. Non deterministic finalization means that your object's finalizer (destructor in C++) isn't called when it falls out of scope, its memory isn't even neccecarily released when it falls out of scope .OTOH, it may be collected when it's still in scope, if you're not using it anymore.
- What is the difference between Finalize() and Dispose()?
- Dispose is called by the user (hopefully via using()) and Finalize is called by the runtime.
- How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
- Make it harder to forget to release resources, IDisposable is an interface that define a way to release resources in a predicted way. It means that when you're out of the using() statement, then the object's Dispose() has been called and its resources (but not memory, that is up for the GC) are free.
- What does this useful command line do? tasklist /m "mscor*"
- Hm... No idea. First time I see the tasklist command. Maybe list only the processes that link to mscor* ? Probably will show all the processes that uses .Net.
- What is the difference between in-proc and out-of-proc?
- in proc is faster, out proc require marshaling between the process. There are more, but that is the main thing.
- What technology enables out-of-proc communication in .NET?
- Hm, Remoting for one, Windows Messages is another, all of Win32 RPC is yet another. Named piped, memory mapped files, etc.
- When you’re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?
- I don't know this one, but I think it's aspnet_wp.exe in XP & 2003 (never worked with that one, sadly) and inetinfo.exe for 200.
- What’s wrong with a line like this? DateTime.Parse(myString);
- No locale? No variable to store the returned date? Not using ParseExact? No try-catch? Hard to tell.
- What are PDBs? Where must they be located for debugging to work?
- No idea what the TLA is, but they are debug symbol that tells the debugger which instruction belong to which line of code.
- What is cyclomatic complexity and why is it important?
- Even my dictionary doesn't know what "cyclomatic" is, but I would hazzard a guess and it's probably some sort of measuring method for the complexity of software.
- Write a standard lock() plus “double check” to create a critical section around a variable access.
- I know this one, but I can't recall how to do this, I'll finish the rest of the questions and return to it. Okay, I returned and here is my implementation.
if(shouldLock)
{
lock(lockableObj)
{
if(shouldLock)
{
DoWork();
}
}
}
- I know this one, but I can't recall how to do this, I'll finish the rest of the questions and return to it. Okay, I returned and here is my implementation.
- What is FullTrust? Do GAC’ed assemblies have FullTrust?
- Your code is allowed to do anything in the framework, meaning that all (.Net) permissions are granted. The GAC has FullTrust because it's on the local HD, and that has FullTrust by default, you can change that using caspol (I always think of that as cesspool for some reason.)
- What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
- Early failure if you don't get it. Easily discover what are the permission that the code need, etc.
- What does this do? gacutil /l | find /i "Corillian"
- Didn't get to work with gacutil, but /l is probably list, so this print all the assemblies in the GAC that has Corillian (not case sensitive).
- What does this do? sn -t foo.dll
- Does something to the strong name of the dll, probably show you the details of it, don't recall sn's CUI in my head.
- What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
- Port 135 is for windows RPC, a much abused service. Can't recall what ports are for DCOM, but that is easily discoverable.
- Contrast OOP and SOA. What are tenets of each?
- OOP - Objects is everything (inheritance, ploymorphism, interfaces, etc). SOA - Services are the main thing (discoverability, interoperability, versioning, etc. At least those are the buzzwords that I hear, don't have experiance with this).
- How does the XmlSerializer work? What ACL permissions does a process using it require?
- It reflect on your object and read the attributes and then output the values according to it. I'm not aware of ACL permissions you need for this (ACL being Windows), but you need ReflectionPermission in order to use it (a .Net permission).
- Why is catch(Exception) almost always a bad idea?
- This means that you swallow an exception and not do anything about it. There are very few cases when it's okay to do that, usually when you have an action you don't care if it failed or not, or maybe you just care that it failed, and not why (validating input integer is one such case:
try
{
i = int.Parse(str);
Console.WriteLine(i+ " is a number");
}
catch (Exception)
{
Console.WriteLine("This is not a number");
}
- This means that you swallow an exception and not do anything about it. There are very few cases when it's okay to do that, usually when you have an action you don't care if it failed or not, or maybe you just care that it failed, and not why (validating input integer is one such case:
- What is the difference between Debug.Write and Trace.Write? When should each be used?
- The Debug.Write call won't be compiled when the DEBUG symbol is not defined (when doing a release build). Trace.Write calls will be compiled. Debug.Write is for information you want only in debug builds, Trace.Write is for when you want it in release build as well. And in any case, you should use something like log4net because that is both faster and better :-)
- What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
- Debug build contain debug symbols and can be debugged while release build doesn't contain debug symbols, doesn't have [Contional("DEBUG")] methods calls compiled, can't be debugged (easily, that is), less checking, etc. There should be a speed difference, because of disabling debug methods, reducing code size etc but that is not a gurantee (at least not a signifcant one)
- Does JITting occur per-assembly or per-method? How does this affect the working set?
- I believe that per method, but not certain. The working set should be smaller becaue methods that weren't called weren't JITed (meaning less memory taken, etc).
- Contrast the use of an abstract base class against an interface?
- Abstract base class can contain code, but there are some methods that are marked abstracted (no code) that an inheriting class must implement. This is a useful way to have some default action if the inheriting class isn't interested in override some method. Interface has no code, and an implementing class must implement all methods.
- What is the difference between a.Equals(b) and a == b?
- The first checks whatever the objects are equal, the second whatever they are reference-equal (the same object). At least that is the way it work in Java, didn't have trouble using just == everywhere in .Net, so far.
- In the context of a comparison, what is object identity versus object equivalence?
- Hm, that is a tough one. Object identity can mean either the same object (you've two references for the same object) or (not very often unless you are in ORM world) database identity. Basically, object identity mean that they are the same object (same place in memory or same row in the DB) and object equivalence means that they are a diferent objects but has the same value (all fields are are Equal() ).
- How would one do a deep copy in .NET?
- Implement IClonable? That is the way I would do it.
- Explain current thinking around IClonable.
- Uh... no comment is not a good answer?
- What is boxing?
- Taking a value type (on the stack) and putting it on the heap.
- Is string a value type or a reference type?
- reference type with immutable semantics (proof, you can do this: string s = null;).
- What is the significance of the "PropertySpecified" pattern used by the XmlSerializer? What problem does it attempt to solve?
- No idea.
- Why are out parameters a bad idea in .NET? Are they?
- .Net doesn't verify that an out parameter is set inside a method that uses an out parameter before an exception is called. This mean that you may use an uninitialized parameter without the compiler catching on to this. Use ref parameters instead. Personally, I think that it's a problem.
- Can attributes be placed on specific parameters to a method? Why is this useful?
- Yes. I think that for Remoting scenarios, but I'm not sure. I know that I saw such things, but never really paid much attention to it.
- C# Component (HI, TP) Developers
- Ha? Is this a question?
- Juxtapose the use of override with new. What is shadowing?
- Override means that using your class throught a base class will use your method, while new means your method will only be called if accessing through your class, and when using your class throught a base class the base class method will be called. I think that shadowing is the using new, but I'm not certain.
- Explain the use of virtual, sealed, override, and abstract.
- Virtual - a method that can be overriden in an inheriting class, and the invoked method will be the derived class one.
Sealed - means that you can't inherit from a class, often annoying when it's on the BCL.
Override - a marker that verify that you indeed override a method and no just create a method with the same name & parameters by mistake
Abstract - a method that are not implemented, abstract methods are virtual, and abstract classes are explained above.
- Virtual - a method that can be overriden in an inheriting class, and the invoked method will be the derived class one.
- Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d
- Foo.Bar - (so you won't get Foo.Baz by mistake), Version=2.0.205.0 - The version of the assembly, that you won't get the version 2.0.0.0 (dll hell), Culute=neutral - in case you are into globalization :-), PublicKeyToekn=... - verify that this file is indeed the file you are thinking about and has not been tampered with except by the original publisher.
- Explain the differences between public, protected, private and internal.
- Public - anyone can use, protected - only inheriting classes can use, private - only this class can use, internal - only members in this assembly can use.
- What benefit do you get from using a Primary Interop Assembly (PIA)?
- IIRC, using a COM compnent?
- By what mechanism does NUnit know what methods to test?
- Refection & Attributes.
- What is the difference between: catch(Exception e){throw e;} and catch(Exception e){throw;}
- The last one preserve the exception stack, it really should've been rethrow;
- What is the difference between typeof(foo) and myFoo.GetType()?
- typeof(foo) is a compile time structute, and foo is a type name, myFoo is an object, and GetType() is a method that return in run-time.
- Explain what’s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?
- The c(string) calls to c(), this is useful if you've a basic constructor that initialize all the fields, and then you can avoid duplication of code.
- What is this? Can this be used within a static method?
- a reference to the current object, static methods don't have an object, so they can't use this.
{Note, I'm not much of ASP.NET UI developer, but I'll try it anyway}
- Describe how a browser-based Form POST becomes a Server-Side event like Button1_OnClick.
- Probably something in the Application that takes the POST and fire an event, the spesifics I never had to find out.
- What is a PostBack?
- A way for the page to notify the asp.net application that some even occured (button clicked, etc).
- What is ViewState? How is it encoded? Is it encrypted? Who uses ViewState?
- A way to preserve the state of controls when doing postbacks, I think it's Base64 encoded, I don't think it's encrypted by default, though it probably can be. Nearly all web controls use it.
- What is the
element and what two ASP.NET technologies is it used for? - A public key that used for session & caching services when they are done in a cluster and no just a single server.
- What three Session State providers are available in ASP.NET 1.1? What are the pros and cons of each?
- in proc - fast, if the process crash then you lose state. out proc - slower, if the process crash you preserve state. Sql Server - slowest (network), you preserve state and can use the state from multiply machines.
- What is Web Gardening? How would using it affect a design?
- Clusters? No idea, as a matter of fact.
- Given one ASP.NET application, how many application objects does it have on a single proc box? A dual? A dual with Web Gardening enabled? How would this affect a design?
- Hm, no idea again.
- Are threads reused in ASP.NET between reqeusts? Does every HttpRequest get its own thread? Should you use Thread Local storage with ASP.NET?
- Yes, threads are reused, Request can jump between threads, and TLS wil not work, use the request context.
- Is the [ThreadStatic] attribute useful in ASP.NET? Are there side effects? Good or bad?
- Not really, because request may be served from multiply threads, you may get a different object from another request. Very bad.
- Give an example of how using an HttpHandler could simplify an existing design that serves Check Images from an .aspx page.
- No idea what the question is, what is "Check Images" ? Maybe URL Rewriting (my one use for HttpHandlers)
- What kinds of events can an HttpModule subscribe to? What influence can they have on an implementation? What can be done without recompiling the ASP.NET Application?
- No idea.
- Describe ways to present an arbitrary endpoint (URL) and route requests to that endpoint to ASP.NET.
- No idea, probably URL Rewriting and IIS redirection/virtual directories?
- Explain how cookies work. Give an example of Cookie abuse.
- The server tell the browser to put this file in a cookie, and the client then send all the cookies for the domain in each request. Possible abuses are big cookies which affect network traffic and speed of surfing and privacy (1x1 gifs).
- Explain the importance of HttpRequest.ValidateInput()?
- I'll have to learn what this is first, sorry.
- What kind of data is passed via HTTP Headers?
- document name, size, culture, mime type, basically the document meta data.
- Juxtapose the HTTP verbs GET and POST. What is HEAD?
- GET tells the server to send it a spesific page, POST also send variables (in GET they may be trasfered using query string) with the request, HEAD tell the server to send just the headers, and not the actual content.
- Name and describe at least a half dozen HTTP Status Codes and what they express to the requesting client.
- 200 - Ok, 404 - Document Not Found, 304 - No Update Neccecary, 500 - Server Error, 401 - Autorization Error
- How does if-not-modified-since work? How can it be programmatically implemented with ASP.NET?
Explain <@OutputCache%> and the usage of VaryByParam, VaryByHeader. - if-not-modified-since header allows the server to send 304 reponse (not modified) and not the full content of the page. You implement this by capturing the headers, checking for the presence of if-not-modified-since value, and then returning 304 status code. I believe that this is the hard way and OutputCache will do it for you if the client send if-not-modified-since. VaryByParam means that the cache hold different copies of the page for different parameters, and the same is true for different header for VaryByHeader
- How does VaryByCustom work?
- Probably by implementing some interface or abstract class, but I don't really know.
- How would one implement ASP.NET HTML output caching, caching outgoing versions of pages generated via all values of q= except where q=5 (as in http://localhost/page.aspx?q=5)?
- Use VaryByCustom, I would guess, but I don't count this as an answer as I don't know what VaryByCustom really does.
(I don't like the angle bracket tax, and it shows)
- What is the purpose of XML Namespaces?
- To allows me and you to use the
tag without grief and pain. - When is the DOM appropriate for use? When is it not? Are there size limitations?
- Small documents, and you need to modify the content. Big documents need to be loaded to memory entirely, so it's wasteful. Size limitation - probably so, but the performance is more often a consideration
- What is the WS-I Basic Profile and why is it important?
- I'll need to get back to you with that one :-)
- Write a small XML document that uses a default namespace and a qualified (prefixed) namespace. Include elements from both namespace.
- I know this, but I can't recall the syntax from the top of my head, (xml:ns?).
- What is the one fundamental difference between Elements and Attributes?
- Element can contain another elements and attributes?
- What is the difference between Well-Formed XML and Valid XML?
- Valid Xml is validated against a schema/dtd/etc, Well Formed Xml obey only to the grammer of XML, and valid XML is also well formed, but the reversed is not true.
- How would you validate XML using .NET?
- XmlValidatingReader, most probably.
- Why is this almost always a bad idea? When is it a good idea? myXmlDocument.SelectNodes("//mynode");
- The mean search me and all my childrens, this can cause to bad performace as unneccecary searches are made. It's much more efficent to use the full or relative path. I can't think of a good use right now, maybe when you really do want all the mynode nodes? (For counting them, or doing some work on them, etc).
- Describe the difference between pull-style parsers (XmlReader) and eventing-readers (Sax)
- In XmlReader you control the parsing, you move from one place to another using methods, Sax parse the Xml in its own time, and raise events whenever it find something interesting. Personally I like XmlReader, but I've never used Sax, so I can't tell much more.
- What is the difference between XPathDocument and XmlDocument? Describe situations where one should be used over the other.
- XPathDocument is not editable, that is the first and most important thing. Otherwise, it allows fast XPath queries. When I want to pull data, I'll use XPathDocument, when I need to edit it, I'll use XmlDocument.
- What is the difference between an XML "Fragment" and an XML "Document."
- I think that Xml fragement obey all the rules of Xml, but it doesn't have . No certain about this one, though.
- What does it meant to say “the canonical” form of XML?
- Without whitespace etc, just the content, regardless of the way it was saved.
- Why is the XML InfoSet specification different from the Xml DOM? What does the InfoSet attempt to solve?
- No idea.
- Contrast DTDs versus XSDs. What are their similarities and differences? Which is preferred and why?
- DTD & XSD are both ways to spesify a format for an XML dialect. XSD is written using XML, and DTD looks like a big regex. I rather read XSD, because I don't need to make the mental shift from XML to DTD dialect.
- Does System.Xml support DTDs? How?
- I think that it must to offfer a complete support, but I don't know.
- Can any XML Schema be represented as an object graph? Vice versa?
- I belive so, but not certain. Vice versa - I don't think so.
星期四, 三月 17, 2011
Bush Deficit vs. Obama Deficit in Pictures | The Foundry: Conservative Policy News.
Bush Deficit vs. Obama Deficit in Pictures | The Foundry: Conservative Policy News.
- President Bush expanded the federal budget by a historic $700 billion through 2008. President Obama would add another $1 trillion.
- President Bush began a string of expensive financial bailouts. President Obama is accelerating that course.
- President Bush created a Medicare drug entitlement that will cost an estimated $800 billion in its first decade. President Obama has proposed a $634 billion down payment on a new government health care fund.
- President Bush increased federal education spending 58 percent faster than inflation. President Obama would double it.
- President Bush became the first President to spend 3 percent of GDP on federal antipoverty programs. President Obama has already increased this spending by 20 percent.
- President Bush tilted the income tax burden more toward upper-income taxpayers. President Obama would continue that trend.
- President Bush presided over a $2.5 trillion increase in the public debt through 2008. Setting aside 2009 (for which Presidents Bush and Obama share responsibility for an additional $2.6 trillion in public debt), President Obama’s budget would add $4.9 trillion in public debt from the beginning of 2010 through 2016.
American International Group - Wikipedia, the free encyclopedia
American International Group - Wikipedia, the free encyclopedia
American International Group, Inc. (AIG) (NYSE: AIG) is an American insurance corporation. Its corporate headquarters are located in the American International Building in New York City.
American International Group, Inc. (AIG) (NYSE: AIG) is an American insurance corporation. Its corporate headquarters are located in the American International Building in New York City.
Effects of Hurricane Katrina in New Orleans - Wikipedia, the free encyclopedia
Effects of Hurricane Katrina in New Orleans - Wikipedia, the free encyclopedia
Although Mayor Ray Nagin ordered a mandatory evacuation of the city, many people refused to leave, which a CNN writer described as "gambling with their own lives."[18] Reasons were numerous, including a belief that their homes or the buildings in which they planned to stay offered sufficient protection, lack of financial resources or access to transportation, or a feeling of obligation to protect their property. These reasons were complicated by the fact that an evacuation the previous year for Hurricane Ivan had resulted in the illnesses of many elderly people since cars were stalled in traffic for six to ten hours. The fact that Katrina occurred at the end of the month, before pay checks were in the hands of many was also significant.[19]
Although Mayor Ray Nagin ordered a mandatory evacuation of the city, many people refused to leave, which a CNN writer described as "gambling with their own lives."[18] Reasons were numerous, including a belief that their homes or the buildings in which they planned to stay offered sufficient protection, lack of financial resources or access to transportation, or a feeling of obligation to protect their property. These reasons were complicated by the fact that an evacuation the previous year for Hurricane Ivan had resulted in the illnesses of many elderly people since cars were stalled in traffic for six to ten hours. The fact that Katrina occurred at the end of the month, before pay checks were in the hands of many was also significant.[19]
星期三, 三月 16, 2011
How to deselect all selected items in a WPF treeview when clicking on some empty area? - Stack Overflow
How to deselect all selected items in a WPF treeview when clicking on some empty area? - Stack Overflow
protected override void OnMouseUp(MouseButtonEventArgs e)
{
base.OnMouseUp(e);
DependencyObject dpSource = e.OriginalSource as DependencyObject;
if (dpSource.FindVisualAncestor(o => typeof(TreeViewItem).IsAssignableFrom(o.GetType())) == null)
UnselectAll();
}
private void MyTreeView_PreviewMouseDown(object sender, MouseButtonEventArgs e) {
if ((sender as TreeViewItem) == null) {
TreeViewItem item = MyTreeView.SelectedItem as TreeViewItem;
if(item != null){
item.IsSelected = false;
}
}
}
protected override void OnMouseUp(MouseButtonEventArgs e)
{
base.OnMouseUp(e);
DependencyObject dpSource = e.OriginalSource as DependencyObject;
if (dpSource.FindVisualAncestor(o => typeof(TreeViewItem).IsAssignableFrom(o.GetType())) == null)
UnselectAll();
}
private void MyTreeView_PreviewMouseDown(object sender, MouseButtonEventArgs e) {
if ((sender as TreeViewItem) == null) {
TreeViewItem item = MyTreeView.SelectedItem as TreeViewItem;
if(item != null){
item.IsSelected = false;
}
}
}
星期二, 三月 15, 2011
Homefront Xbox 360 Review - Page 2 | Eurogamer.net
Homefront Xbox 360 Review | Eurogamer.net
剧情扯淡,脚本对操作限定太多,比如早就知道需要从背后干翻一个北棒
巡逻兵,但是脚本不让操作,非要10秒以后队友提示才可以操作。
每次都要AI干什么才可以跟进。就算在checkpoint收集物品,走远了也
会撞上隐形墙而被迫折返。
画面的问题也是一样多,有的场景很漂亮,但是场景/人物很多渲染问题,
大场景桢数下降严重。全部7关都很短,可以花8小时完成游戏,但是游戏
本身没啥可圈可点之处。太多fps已经有了狙击关,炮塔关,还有简直就是
抄袭hl2的金门大桥关。
游戏里面除了XP还有battle point系统,控制各种设备都需要花费BP。
这样不会像COD系统那样,老鸟什么都有,新手就牙签和小刀。每个人
都有机会用到各种设备。另外一个就是系统会通知你最强大的敌人的信息。
剧情扯淡,脚本对操作限定太多,比如早就知道需要从背后干翻一个北棒
巡逻兵,但是脚本不让操作,非要10秒以后队友提示才可以操作。
每次都要AI干什么才可以跟进。就算在checkpoint收集物品,走远了也
会撞上隐形墙而被迫折返。
画面的问题也是一样多,有的场景很漂亮,但是场景/人物很多渲染问题,
大场景桢数下降严重。全部7关都很短,可以花8小时完成游戏,但是游戏
本身没啥可圈可点之处。太多fps已经有了狙击关,炮塔关,还有简直就是
抄袭hl2的金门大桥关。
游戏里面除了XP还有battle point系统,控制各种设备都需要花费BP。
这样不会像COD系统那样,老鸟什么都有,新手就牙签和小刀。每个人
都有机会用到各种设备。另外一个就是系统会通知你最强大的敌人的信息。
Harrison: Iwata "wrong" on casual games iPhone News - Page 1 | Eurogamer.net
Harrison: Iwata "wrong" on casual games iPhone News | Eurogamer.net
所以欧洲部前总裁Phil Harrison说任天堂总裁岩田聪反对社交游戏的态度是错误的。
Harrison是London Venture Partners创建者之一,参与开发多人合作游戏Gunshine。
“岩田认为社交游戏将会消失,但是它不会“
“有人认为每年将有5-8千万smartpad进入市场,将会是巨大的商机“
所以欧洲部前总裁Phil Harrison说任天堂总裁岩田聪反对社交游戏的态度是错误的。
Harrison是London Venture Partners创建者之一,参与开发多人合作游戏Gunshine。
“岩田认为社交游戏将会消失,但是它不会“
“有人认为每年将有5-8千万smartpad进入市场,将会是巨大的商机“
Main L.A. Noire story 25-30 hours long News - Page 1 | Eurogamer.net
Main L.A. Noire story 25-30 hours long News | Eurogamer.net
L.A. Noire主线将会有25-30小时长
除了安排的任务还可以接支线任务。DLC将会增加更多内容。
就像homefront那样?
L.A. Noire主线将会有25-30小时长
除了安排的任务还可以接支线任务。DLC将会增加更多内容。
就像homefront那样?
星期一, 三月 14, 2011
星期五, 三月 11, 2011
MeGUI | Download MeGUI software for free at SourceForge.net
MeGUI | Download MeGUI software for free at SourceForge.netMeGUI is the most comprehensive GUI based ISO MPEG-4 solution. It suports MPEG-4 ASP (xvid), MPEG-4 AVC (x264), AAC, MP2, MP3, Flac, Vorbis, AC3 audio and various common containers support (MP4, MKV, AVI, M2TS).
星期二, 三月 08, 2011
Urban Dictionary: conservative anarchist
Urban Dictionary: conservative anarchistS.C.A.M - social conservative anarchist movement
MoveOn.org Political Action: Top 10 Worst Things about the Republicans' Immoral Budget
MoveOn.org Political Action: Top 10 Worst Things about the Republicans' Immoral BudgetCut funding on NPR might not be such a bad thing. Especially for stations like MPR, which has huge beggathon year around for additional funding so they can pay their anchors big money and continue their propoganda.
星期日, 三月 06, 2011
高层部署反腐新内容 理想信念教育力度将加大_新闻中心_新浪网
高层部署反腐新内容 理想信念教育力度将加大_新闻中心_新浪网切实落实人民民主,让人民真正拥有监督的权利,才能够减轻腐败。红歌口号狗屁作用都没有。
薄熙来:唱红打黑不怕别人说三道四_新闻中心_新浪网
薄熙来:唱红打黑不怕别人说三道四_新闻中心_新浪网群众质疑官员的动机不叫做“说三道四”,真红是为人民服务,真正实现民主,而不是空喊红色口号假打黑妨碍司法公正。
星期四, 三月 03, 2011
公安部:各地重点治理涉案人员非正常死亡问题_新闻中心_新浪网
公安部:各地重点治理涉案人员非正常死亡问题_新闻中心_新浪网治理有个屁用,违法必究说给谁听的?让公安部这些人去躲猫猫死亡,被自杀他们就老实了。