自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(309)
  • 收藏
  • 关注

原创 wpf - example to enhance ComboBox for AutoComplete

first let’s see an example of the code (the behavior code that turns a combobox to a source of autocomplete source) using System;using System.Collections.Generic;using System.Linq;using ...

2014-09-19 15:56:19 258

原创 gcc,pkg-config,libyaml and etc..

order of lib imports in gcc/lib are importantsthe order of lib imports in gcc/lib are importants.I used to have this command line, the code is as follow. rm -f ../../.ext/i386-ming...

2014-04-14 09:36:53 272

原创 不安装Visual Studio,只用Windows SDK搭建VC环境

首先你需要下载的是Microsoft Windows SDK for Windows 7 and .NET Framework 4. 下载以后你得到的是一个网络安装文件,确保网络的连接,安装Windows SDK 7.1 (注意得到的Windows SDK 版本是7.1,这和我们安装Vsiual Studio得到的SDK 版本v7.0A是不一样的); 安装界面如下: 安装结束以后...

2013-12-31 21:52:34 1335

原创 联想A798T刷机实战

刷机的基本准备一些术语双清- 指的是数据和cache清空ROMs – 刷机包, 也称固件,固件刷机包Root – 获得android最高管理权限两种刷机 - 线刷和卡刷线刷Android的手机刷机一般分为两种, 一种是线刷,另外一种是卡刷,线刷是用pc或其他连接手机的方式,通过flash _tool 把工具刷到手机的过程, 刷机结束以后手机重启就得到了新的固件(...

2013-10-13 20:05:22 306

原创 C# – CoerceValueCallback合并、替换元数据值

Topic: C# – CoerceValueCallback标题: C# – CoerceValueCallback合并、替换元数据值像在the PropertyMetadta.CoerceValueCallback property中说道As in the references page the PropertyMetadta.CoerceValueCallback proper...

2013-08-05 21:59:08 510

原创 WPF – Virtualization – VirutalizationStackPanel and ItemsPanelTemplate

Topic: WPF – Virtualization – VirutalizationStackPanel and ItemsPanelTemplate标题: WPF – 控件虚拟化- 简单介绍VirutalizationStackPanel和ItemsPanelTemplate在ItemsPanel上的虚拟化, 你可以使用VirutalizationStackPanel, 和 “I...

2013-08-05 21:55:03 296

原创 wpf – ListView交替背景色

Wpf – Alternate background color of ListView.Topic: Wpf – Alternate background color of ListView.标题: wpf – ListView交替背景色总的来说有三种变换背景色的方法,他们是·         定义一个IValueConverter的Style·         扩展Lis...

2013-07-02 20:56:46 1046

原创 Office – 管理 Master-Subdocument

标题:Office – 管理Master-SubdocumentTitle: Office - Master-Subdocument managementMaster Document: by its definition, is a “Container” for a set of separate files (or subdocuments). You can use a ma...

2013-06-29 17:29:17 142

原创 C# - 简单介绍TaskScheduler

标题: C# - 简单介绍TaskSchedulerTitle: C# - A Brief bump to the TaskSchedulertask Scheduler根据定义The task Scheduler by the definition blurb.“Is the class where the usage context is within the task libra...

2013-06-29 17:18:36 774

原创 c# - Get enum from enum attribute

DescriptionAttribute gives the enum or other qualified types some description which is human readable. such as  public enum Testing { [Description("David Gouge")] Dave...

2013-06-27 21:32:27 135

原创 C# - PInvoke, gotchas on the RegisterClassEx and the CreateWindowEx

I get an exception message like "cannot find window class" with the following code snippet.  bool bRet; WNDCLASS wc; lpszCmdLine = null; hInstance...

2013-06-24 13:49:25 217

原创 c# - Use PInvoke to create simple win32 Application

In this post, .net platform has this pinvoke mechanism where it is allowed that you call into the Native windows .this is extremely useful when you have some 3rd party libraries or if you try to pro...

2013-06-24 11:59:08 931

原创 c# - Linq's Select method as the Map function

If you comes from a functional programming language background, you will find that you are missing the Map function (literally) speakingly ..However, the Select code is used as the de facto Map func...

2013-06-19 18:47:50 233

原创 c# - Tips of Linq expression Any to determine if a collection is Empty

When you are @ the linq expression, you may wonder why it is not offered to you to do the empty() method which can tell if a collection is empty?well, Surely that Microsoft has someway to allow you t...

2013-06-19 18:29:19 115

原创 myth buster - typeof accepting array of types not acceptable

I have seen from some book where this kind of code has been given.Type[] types = typeof(TypeA, TypeB);whether it is some new feature that has y et to be supported now, or is it somehting that is ...

2013-06-19 17:17:54 126

原创 wpf - BehaviorBase and one use examples

Behavior is something that we have know very good in the past that we can build something into the WPF system. There is Behavior class where can use as a base calss if we want to build our own behavi...

2013-06-18 18:41:38 104

原创 WPF - Setting foreground color of Entire window

You might as well as I would suppose that if we just set the foreground of a window to something different from its original color, then the whole controls from the window might change as well?well t...

2013-06-13 16:00:37 137

原创 WPF - Enhanced TabControl - TabControlEx aka Prerendering TabControl

As an opening word, let's check on the background  of the Prerendering tab controls. TabControlEx 写道There is a known behavior of TabControl that it will "virtualize" its tabs when they are creat...

2013-06-13 13:12:08 207

原创 wpf - ControlTemplate and AddLogicChild/RemoveLogicalChild

Recently I was trying to debug into one mysterious issue where the DockManager from DevExpress is so slow when certain theme is applied.And I have noticed that there are hotspot such as AddLogicalTre...

2013-06-10 15:42:05 270

原创 c# - P/Invoke, DllImport, Marshal Structures and Type conversions

P/Invoke as in the following quote provides basically the way to calls into the unmanaged DLLs. the quote is as follow. MSDN 写道P/Invoke is short for Platform Invoke and provides the functionality...

2013-06-05 15:25:14 141

原创 c# - A study on the NativeWindow - encapsulate window handle and procedure

NativeWindow gives you a way to way to intercept the window messages (are you familiar with the Windows Message Pump?) Aslo, this class have provided with some default impl on manipulating handles ...

2013-06-05 14:40:55 253

原创 WCF - Notify server when client connects

It is sometimes very important to let the server knows when the client has made a proxy which may talks to the server.However due to the complication and the design that WCF server has employeed t...

2013-06-03 18:19:59 87

原创 wcf - Debug to enable Server exception in Fault message

WCF will be able to send back the status of server and client erroneous condition in Fault messages. However, due to the security consideration, it is commonly disabled on the server side so that no...

2013-06-03 15:47:41 92

原创 c# - determine if a type/object is serialzable

In WCF, primitives type are serialzable, and some commonly used types are also serialzable, but some types are not serialzable , and when this types to be used in wcf as the data contract for messag...

2013-05-30 16:35:48 104

原创 wcf - Inheritance in callback contract

I have a service decorated with a ServiceContract attribute, and the interface definition is something like this: [ServiceContract(CallbackContract = typeof(ITabularPushCallback))] public i...

2013-05-30 16:16:50 150

原创 C# - Blocking Queue Implementation

Blocking Queue is something that we might demand constantly for various kinds of applications, where one thread might take data from the queue, and other threads might try to put data into the queue....

2013-05-28 16:24:13 366

原创 c# - Dynamic and ExpandoObject

ExpandoObject as we have introduce in the  "C# - DynamicObject with Dynamic and create wrapper with DynamicObject " section in that it allows dynamically add/remove properties. and in tihs post, we w...

2013-05-21 18:30:50 107

原创 C# - DynamicObject with Dynamic and create wrapper with DynamicObject

There is a expando object which allow you add/remove properties at runtime, DynamicObject provides ou with more capability and it is better used in places where a wrapper excels a raw XML file or scr...

2013-05-21 14:09:33 151

原创 haskell - zipper - use examples: file system and watch the steps

we have seen the zipper in the previous post, now we will see some application and examples of Zippers.  firt, we will examine a simple file system implemented with Zipper.  type Name = Stri...

2013-05-20 22:25:05 110

原创 haskell - zipper - taking a tree

referential transparency,, one value is as good as another in Haskell if it represents the same thing.  e.g.   we have to have some way of knowing exactly which five in our tree we want to c...

2013-05-20 17:32:12 132

原创 haskell - few more monad - Making Monads

now, we will see how we make monads,.  the guideline of making hte monad is not to make a monad for the purpose of monad. normally, we usually make a type that whose purpose is to model an aspec...

2013-05-18 23:30:35 134

原创 haskell - few more monad - solving problem with Monads

We have seen the RPN can be solved with haskell in previous examples, now we will see how we can do use monad to solve it.With monad,  you might not gain more in terms of just solving hte problem, ...

2013-05-18 21:59:41 114

原创 haskell - few more monad - Useful monadic functions

Because the Monad are so lynch point of the haskell language, we will examine more of the monadic functions, the functions that we are going to examine include:  operate on monadic valuesretu...

2013-05-14 22:30:35 90

原创 haskell - few more monad - Error on the wall

in the module called "Control.Monad.Error" , it has defined a type called Error, adn that type hass been made an instance of the Monad (Either e), and the definition of that is instance (Error e...

2013-05-14 22:05:03 93

原创 haskell - few more monad - stateful computation

Haskell is a pure - in another word, a stateless computation, where a program makde of cuntions that can't change any global any global state or variabble, they can only do some computations and ret...

2013-05-13 22:49:04 107

原创 haskell - few more monad - Reader Monad

we have seen before the (->) r is an instance of functor, and we can do things like this : this basically allow us to do the fmap function mapping. ghci> let f = (*5) ghci> let g = (...

2013-05-12 20:08:11 114

原创 haskell - Monads - difference lists

as We seen in previous example, where it is very low effecient to construct the list by appending, while if hte list is constructed in the wrong order, the performance can be worse, So if there is so...

2013-05-12 18:50:14 121

原创 haskell - few more monad - Writer Monad

We will going to examine more monad, which will makes us more easily with a more variety of problems. exploring a few monads more will also solidify our intuition for monads.  to install the Mon...

2013-05-11 23:23:31 148

原创 haskell - Monads - problem solving : A knight's quest

let's use the monad to solve some problems. here is a famous question,  Say you have a chess board and only one knight piece on it. We want to find out if the knight can reach a certain position ...

2013-05-11 21:36:42 104

原创 haskell - Monads - the list monad

in this post, we will going to examine the list a monad, first let's see what is the definition of the list monad, here is the definition of the  instance Monad [] where return x = [x] ...

2013-05-11 21:15:08 79

空空如也

空空如也

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

TA关注的人

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