ITeye博客

joe.bq.wang的博客

joe.bq.wang · 共 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 System.Reflection; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Wi…

2014-09-19 15:56 · C# · WPF · 评论(0)

gcc,pkg-config,libyaml and etc..

order of lib imports in gcc/lib are importants the 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-mingw32/openssl.so gcc -shared -o ../../.ext/i386-mingw32/openssl.so openssl_missing.o ossl.o ossl_asn1.o ossl_bio.o ossl…

2014-04-14 09:36 · tools · 评论(0)

不安装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是不一样的); 安装界面如下: 安装结束以后你应该得到如下的 1. 在c:\Program Files\Microsoft Visual Studio 10.0,你会看到不完全的Visual Studio的安装(主要是VC的库和头文件) 2.在C:\Pro…

2013-12-31 21:52 · c++ · tools · 评论(0)

联想A798T刷机实战

刷机的基本准备 一些术语 双清- 指的是数据和cache清空 ROMs – 刷机包, 也称固件,固件刷机包 Root – 获得android最高管理权限 两种刷机 - 线刷和卡刷 线刷 Android的手机刷机一般分为两种, 一种是线刷,另外一种是卡刷,线刷是用pc或其他连接手机的方式,通过flash _tool 把工具刷到手机的过程, 刷机结束以后手机重启就得到了新的固件(ROMs)。 本文没有采用线刷的方法, 但是如果你手机变砖了, 或者需要还原出厂状态的保修卡刷包。 该包里面的 该包里面有一个A798T升级工具,里面有一个教程还有一个flash_tool工具,关于具体的使用办法,可以g…

2013-10-13 20:05 · tools · android · 评论(0)

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

Topic: C# – CoerceValueCallback 标题: C# – CoerceValueCallback合并、替换元数据值 像在 the PropertyMetadta.CoerceValueCallback property 中说道 As in the references page the PropertyMetadta.CoerceValueCallback property 属性元数据的该回调方法一般不是公有方法,所以, 这个值通常情况下对于只是使用dependency property元数据的条件下不是很重要。使用该属性的一个可能原因是元数据的子类可以应用他们合并逻…

2013-08-05 21:59 · C# · 评论(0)

WPF – Virtualization – VirutalizationStackPanel and ItemsPanelTemplate

Topic: WPF – Virtualization – VirutalizationStackPanel and ItemsPanelTemplate 标题: WPF – 控件虚拟化- 简单介绍VirutalizationStackPanel和ItemsPanelTemplate 在ItemsPanel上的虚拟化, 你可以使用VirutalizationStackPanel, 和 “ItemsPanelTemplate”, 以下是一个虚拟化的例子. Virtualization on the ItemsPanel, you can use the VirutalizationStackP…

2013-08-05 21:55 · WPF · 评论(0)

wpf – ListView交替背景色

Wpf – Alternate background color of ListView. Topic: Wpf – Alternate background color of ListView. 标题: wpf – ListView交替背景色 总的来说有三种变换背景色的方法,他们是 · 定义一个IValueConverter的Style · 扩展ListView ,重载PrepareContainerOverride方法 · 使用 StyleSelector In general there are three ways to alternate the background color …

2013-07-02 20:56 · C# · .net · 评论(0)

Office – 管理 Master-Subdocument

标题:Office – 管理Master-Subdocument Title: Office - Master-Subdocument management Master Document: by its definition, is a “Container” for a set of separate files (or subdocuments). You can use a master document to set up and manage a multipart document, such as book with several chapters. Master Docu…

2013-06-29 17:29 · tools · 评论(0)

C# - 简单介绍TaskScheduler

标题: C# - 简单介绍TaskScheduler Title: C# - A Brief bump to the TaskScheduler task Scheduler根据定义 The task Scheduler by the definition blurb. “Is the class where the usage context is within the task libraries. “ 它的作用像是WPF/Winform时代的SynchronizationContext. It is like the Synchronization context in the cro…

2013-06-29 17:18 · C# · .net · 评论(0)

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 = 1, [Description("Peter Gouge")] Pete = 2, [Description("Marie Gouge")] Ree = 3 } But, given this, how do you find the an Enum valu…

2013-06-27 21:32 · C# · 评论(0)

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 = System.Diagnostics.Process.GetCurrentProcess().Handle; WNDCLASSEX wndClass = new WNDCLASSEX(); wndClass.cbSize = Marshal.SizeOf(typeof(WNDCLASSEX)); st…

2013-06-24 13:49 · C# · windows · 评论(0)

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 program against with the low-level windows APIS. One of the typic application htat utilize the Lowe-lev…

2013-06-24 11:59 · C# · windows · 评论(0)

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 function. I have some examples, but I have to admit that sme of the examples are rather contrived. You c…

2013-06-19 18:47 · C# · 评论(0)

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 to achieve it. the key lies in the Any()'s void argument variant. Here is the code. class Program { …

2013-06-19 18:29 · C# · 评论(0)

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 typo from the original books... Let's give a try, and below is the test result. class TypeA { } class …

2013-06-19 17:17 · C# · 评论(0)