摘要: Backtick allows you to word-wrap PowerShell commands 1. # Backtick ` PowerShell word-wrap Get-Service * |Sort-Object ServiceType ` | Format-Table name, status, ` S... 阅读全文
posted @ 2012-12-30 14:01 HelloWorld.Michael 阅读(273) 评论(0) 推荐(0) 编辑
摘要: $s = "VMS"; $OFS = ""; [string] [char[]] ([int[]] [char[]] $s | foreach{$_+1}) Output: WNT $OFS (Output Field Separator): When PowerShell converts arrays to strings, it takes each array el... 阅读全文
posted @ 2012-12-30 00:38 HelloWorld.Michael 阅读(142) 评论(0) 推荐(0) 编辑
摘要: DICTIONARIES AND HASHTABLES Creating and inspecting hashtables $user = @{ FirstName = "John"; LastName = "Smith"; PhoneNumber = "555-1212" } Enumerating hashtable $h = @{a=1; b=2; c=3} forea... 阅读全文
posted @ 2012-12-28 18:32 HelloWorld.Michael 阅读(142) 评论(0) 推荐(0) 编辑
摘要: PowerShell uses a type-adaptation system that masks all the details of these different objects’ representations. A PowerShell script never directly accesses an object. It always goes through the type-... 阅读全文
posted @ 2012-11-28 18:47 HelloWorld.Michael 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Pipeline A pipeline is a series of commands separated by the pipe operator (|), each command in the pipeline receives an object from the previous command, performs some operation on it, and then pa... 阅读全文
posted @ 2012-11-23 19:04 HelloWorld.Michael 阅读(143) 评论(0) 推荐(0) 编辑
摘要: All commands are broken down into the command name, the parameters specified to the command, and the arguments to those parameters. The first element in the command is the name of the command to be... 阅读全文
posted @ 2012-11-21 12:38 HelloWorld.Michael 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 液晶(Liquid Crystal) : 是一种介于固态与液态之间的物质,本身是不能发光的,需借助要额外的光源才行。液晶电视是在两张玻璃之间的液晶内加入电压,通过分子排列变化及曲折变化再现画面,屏幕通过电子群的冲撞,制造画面并通过外部光线的透视反射来形成画面。 目前LCD电视常用的背光源有CCFL(冷阴极荧光灯管,也就是我们常见的日光灯)、LED(发光二极管)、HCFL(热阴极荧光灯管)等几种。... 阅读全文
posted @ 2012-09-18 16:57 HelloWorld.Michael 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 元数据表程序集的元数据是用一系列表来存储的。生成一个程序集或者模块时,编译器会创建一个类型定义表、一个字段定义表、一个方法定义表以及其他表反射的性能反射会造成编译时无法保证类型安全性。由于反射要严重依赖字符串,所以会丧失编译时的类型安全性。反射速度慢。使用反射时,类型及其成员的名称在编译时未知。要使用字符串名称表示每个类型及其成员,以便在运行时发现他们。也就是说,使用System.Reflection命名空间的类型扫描程序集的元数据时,反射要不断的执行字符串搜索和比较。发现类型的成员字段、构造器、方法、属性、事件和嵌套类型都可以被定义为一个类型的成员。下图显示了这些类型的层次结构:Declar 阅读全文
posted @ 2012-09-18 00:22 HelloWorld.Michael 阅读(319) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;#define DF(N) void N(){cout<<"function " #N " called..."<<endl; };DF(a);DF(b);DF(c);DF(d);DF(e);DF(f);DF(g);void (*func_table[])()={a,b,c,d,e,f,g};int main(){ ... 阅读全文
posted @ 2012-09-16 21:34 HelloWorld.Michael 阅读(216) 评论(0) 推荐(0) 编辑
摘要: C风格的转换只是在括号中指定目标类型。标准的C++包括一个显式的转化语法: static_cast: 用于“良性”和“适度良性”转换,包括不用强制转换(例如自动类型转换) const_cast: 对const和/或volatile进行转换 reinterpret_cast: 转换为完全不同的意思。这是所有的转换中最危险的 dynamic_cast: 用于类型安全的向下转换 stat... 阅读全文
posted @ 2012-09-16 14:59 HelloWorld.Michael 阅读(308) 评论(0) 推荐(0) 编辑