![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
.NET
文章平均质量分 62
quanben
安能摧眉折腰事双嘎,使我不得开心颜。
展开
-
一个C#和C++执行效率对比的简单实例
这里用一个算法题进行比较。原题是见http://acm.hdu.edu.cn/showproblem.php?pid=4090,登载在http://blog.csdn.net/woshi250hua/article/details/7997550作者提供了一个比较快的答案。我之前也尝试做了一个,没有用递归,但也没有用作者使用的格局保存的剪枝方案,比较慢,随后看了作者的方案后再整合进了一原创 2012-09-22 22:29:50 · 9589 阅读 · 2 评论 -
近期要学的一些东西
IT学习无止境。以下整理一下计划学习和研究的东西。语言学习,重点关注C#(不能说掌握得差不多了,但继续作为主力编程工具需要不断提高)和C++11的进展,补一些boost的课(有条件的话看boost在新C++条件下如何演进)和C++遗忘的东西,回顾设计模式在这两个语言中的应用。留半个眼睛给Functional Programming和并发编程。有空粗略思考一些语言设计、对象模型、泛型和元编程、编原创 2012-09-24 15:16:05 · 1198 阅读 · 2 评论 -
How .NET run-time determines which member to invoke in a interface involving hiearchy
C# interface is very useful and powerful. The major difference in interface between C# and older languages such as java is C# introduced explicit member implementation, which can also cause considerab原创 2012-09-14 11:31:48 · 617 阅读 · 2 评论 -
一段写坏掉的快速DCT实现
想当然了,用递归实现DCT,没想到DCT有4个分支需要递归下去,这样的规模非但无法快速实现,反而由于本身时间复杂度没有多大减少加上递归开销等等比慢速实现往往还慢。这个代码片段将由于清洁需要从QSharp中删除而保留在这里,对其分析将在代码之后有空时进行。过两天想想是不是能用动态规划或备忘录来改进这个算法。/// /// Type-IV DCT implemented using rec原创 2013-03-26 08:36:31 · 2428 阅读 · 0 评论 -
Chinese Lunar Calendar for Live Calendar(In progress ...)
Resources Needed,1. API: http://msdn.microsoft.com/en-us/library/live/hh826523.aspxlooks like the ultimate program has to be in a windows store app or windows phone app form, hopefully it can be原创 2013-04-09 07:32:17 · 2572 阅读 · 0 评论 -
C#代码规范——成员分段
这里的基本整理一般原则是:1. 尽可能少分段2. 关于类的尽可能靠前(例如static),关于实际对象的尽可能靠后3. 早生成的尽可能靠前4. 公有的,接口的尽可能靠前5. 抽象的,通用的,基础性的,被依赖靠前;继承过来的尽量靠前6. 相对需要引起注意的尽量靠前7. 其他一些以往经验考虑class Sample : BaseClass, IIntf1{#re原创 2013-04-23 09:07:24 · 3633 阅读 · 0 评论 -
CSharp mimicking JavaScript design pattern
Simplest C# code so far I can think of equivalent to the JavaScript design pattern to allow private members.The original JavaScript code can be found here:http://www.crockford.com/javascript/priva原创 2013-05-21 18:12:19 · 2605 阅读 · 2 评论 -
WPF: Changing sizes of grid rows and columns during runtime
At work I spent a lot of time trying to get my head around a issue with WPF grid resizing during runtime. I always found the controls don't resize the way I wanted and differently than how those in th原创 2013-05-09 20:59:54 · 2644 阅读 · 0 评论 -
强大的C# Expression在一个函数求导问题中的简单运用
号称面试的题目总是非常有趣的,这里是又一个例子:【原题出处】http://topic.csdn.net/u/20110928/15/B00A34FE-8544-42E2-A771-3C4A888DB85A.html【问题梗概】求一个函数的一阶导数。【代码方案】namespace Derivative{ class Program {原创 2011-10-05 10:27:06 · 7265 阅读 · 8 评论 -
Finaliser and Destructor in C++/CLR and their equivalent in C#
In C# we all know the standard way of finalising an object that potentially contains both managed and unmanaged resources is likeclass SomeDisposableEntity : IDisposable{ #region Constructors原创 2013-06-07 08:01:25 · 3037 阅读 · 1 评论 -
A Medical Study Tool Developed with WPF
Open source managed at,http://code.google.com/p/physio-assist/shared on skydrive at, http://sdrv.ms/QrHJ8j原创 2012-09-16 00:35:49 · 593 阅读 · 0 评论 -
Useful WPF resources and learning materials
MVVM examplehttp://msdn.microsoft.com/en-us/magazine/dd419663.aspxDrag and DropGong solution to drop and drop for WPF compatible with MVVM architecturehttp://www.codeproject.com/Articles/4原创 2012-08-23 23:25:35 · 632 阅读 · 0 评论 -
C# Reflection拾遗
1. 嵌套的泛型类型或方法的实例化:class GenericClass{ public class NestedGenericClass { ... } public void GenericMethod(T2 t) {原创 2011-07-16 09:24:03 · 613 阅读 · 0 评论 -
ZBrush UI
A nicely done paint package called ZBrush which has some concepts and features like dialogs in menues and being able to be dragged out to th原创 2011-09-12 09:49:41 · 822 阅读 · 0 评论 -
When C# Anonymous Method is Asynchronously Invoked
C# is pretty flexible in syntax which by means of working with delegate or lambda expression allows one to define subroutine logic within th原创 2011-09-12 09:23:08 · 902 阅读 · 2 评论 -
A Brief Introduction to Hibernate for .NET with A Simple Example
To continue the topic of why Java still there since the advent of .NET 2.0; Recently as required by the work, I had to have a look at the Hibernate technology. And as the projects we are on are either原创 2011-07-05 21:21:26 · 904 阅读 · 3 评论 -
C# language features that are rarely used but can be useful
Various small points that it doesn't matter too much if you don't know or use them'@' symbol apart from being used in front of a string to change how compiler interpret the string (verbatim or原创 2012-03-27 07:15:38 · 656 阅读 · 0 评论 -
A bit of reflection on C# reflection
C# reflection is supposed to fully or at least to a great extent cover all C# language constructs and features from an IL perspective. That's why I have been addicted to using it whenever possible or原创 2012-03-29 08:03:34 · 785 阅读 · 0 评论 -
博客主站转移声明
从即日起,本人技术博客主站将转移到blogger(google提供),并除了部分翻译文章和特殊需要外,将主要以英语撰写。该新主站的文章部分将以链接形式映射到此处。该博客位置如下,欢迎访问。http://lincolnyutech.blogspot.com.au/原创 2012-05-06 15:06:54 · 950 阅读 · 0 评论 -
WPF内部结构树以及一个探查控件
WPF对初学者来说一个比较复杂的概念是它用两个树来组织其元素的。了解一些WPF的同学一般都知道它们分别是逻辑树(Logical Tree)和视觉树(Visual Tree)。而这两者的关系,以及一个界面中元素究竟如何与另一个元素在这两棵树上联系起来却相当复杂,很难一言两语涵盖其规则。而树和WPF中的元素类的特性有关系,也对应了XAML构成,所以非常重要,是比较深入理解WPF的关键。网上有不少文章就原创 2012-09-21 08:41:28 · 2889 阅读 · 3 评论