- 博客(193)
- 资源 (1)
- 收藏
- 关注
原创 Start Powershell scripting
Powershell cookbook for free.http://www.pavleck.net/powershell-cookbook
2012-01-17 16:28:40
552
原创 Logical operator
While I'm writing a test case, I found once the logical operator had calculated the result, it wont' execute left statement.It won't affect my test result, but I found I never notice this before.E
2011-12-28 15:53:10
737
转载 get-parameter.ps1
http://halr9000.com/article/507param ( $Cmdlet, [switch]$ShowCommon, [switch]$Full)$command = Get-Command $Cmdlet -ea silentlycontinue # resolve aliases (an alias can point to another
2011-10-31 10:36:29
590
原创 Getting started with windbg
http://blogs.msdn.com/b/johan/archive/2007/11/13/getting-started-with-windbg-part-i.aspx
2011-10-26 15:18:38
520
原创 Javascript Getter/Setter and prototype(extend dom)
I learn it while I'm investigating a bug of exchange2010 owa.Now, IE9 doesn't support __defineGetter__ or __defineSetter__ , so owa need to be updated using defineProperty instead.Seemed how to ex
2011-10-20 17:27:24
1535
原创 Combine algorithm
Get combines by recursion, low performance.class Program { /// /// Print all combines of C(n)(Left) /
2011-10-14 03:08:06
1151
原创 WCFService and WCFClient
Reading these articles almost the whole night, will try to implement the WCFServcie/WCFClient with credential authenticationCustom
2011-09-19 23:48:58
521
原创 Registry key and Registry value
Today I have a implement a method to create/delete a specify registry key, it alwasy throw exception say the registry key does not exist, it
2011-08-23 17:11:52
1013
原创 Python lib demo
Just found a excellent website for python lib demo(example)http://www.doughellmann.com/PyMOTW/contents.html
2011-08-01 17:44:24
532
原创 anti-spam, smart screen.
While I investigating a content filter issue of exchange, I ran into this class SmartScreen, we dont have its source code, I dont know what it is, I searched it and get this passage, just log it.
2011-06-30 15:37:00
569
原创 P1 and P2 Headers in SMTP
P1 = the value on the MAIL FROM command of the SMTP connection (the message envelope) as defined in RFC 821.P2 = the email address in the message body as defined in RFC 822. These include the FROM, RE
2011-06-29 16:51:00
850
原创 Diagnosing symbol problems
Most problem when using windbg on my site is symbol issue, so log it. Diagnosing symbol problemsIf you’re having problems loading symbols or you think you’ve loaded incorrect symbols, p
2011-06-29 13:49:00
1792
原创 What Every Dev Must Know About Multithreaded Apps
http://msdn.microsoft.com/en-us/magazine/cc163744.aspxVance MorrisonThis article discusses:Multithreading and the shared memory threading modelRaces and how concurrent access can
2011-06-08 16:05:00
903
原创 Misleading error message in PowerShell script: "Invalid assignment expression. The left hand side of an assignment operator need
<br />I recently ran into the following error message while modifying a PowerShell script:<br /><br />Invalid assignment expression. The left hand side of an assignment operator needs to be something that can be assigned to like a variable or a property<br
2011-05-23 10:29:00
1791
原创 XmlTextReader and XmlException: Root element is missing
<br />http://edwardweinert.com/programming/xmltextreader-and-xmlexception-root-element-is-missing/<br /> <br /><br />During my work with XML in .NET I ran across strange behavior of passing stream into a XmlTextReader object. When I tried to read a stream
2011-05-14 20:44:00
2709
原创 Powershell regular expression.
http://powershell.com/cs/blogs/ebook/archive/2009/03/30/chapter-13-text-and-regular-expressions.aspx
2011-05-07 15:17:00
2706
原创 E12 S/MIME working flow:
<br /><br />Sending a digitally-signed message<br /><br />Reading a digitally-signed message<br /><br />Sending an Encrypted message<br /> <br /><br /> <br />Reading an encrypted message<br /><br />Just one note, the private key is always read from local
2011-04-22 11:17:00
583
原创 How I Hire Programmers
<br /><br />There are three questions you have when you’re hiring a programmer (or anyone, for that matter):Are they smart? Can they get stuff done? Can you work with them? Someone who’s smart but doesn’t get stuff done should be your friend, not your empl
2011-04-15 23:33:00
575
原创 how to get remote fqdn by powershell?
<br /><br />[PS] D:/repro>$ipProperties = [System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties()<br />[PS] D:/repro>$ipProperties | fl<br /> <br /> <br />HostName : EXCH-A-292<br />DomainName : APIWFN-dom.extest.microsoft.com<b
2011-03-15 11:19:00
652
原创 isSymmetricDigit
<br /><br />#include "stdafx.h"<br />#include <stdio.h><br />#include <iostream><br />#include <windows.h><br /> <br />using namespace std;<br /> <br />// x^y<br />int power(int x, int y)<br />{<br />if(x==0)<br />return 0;<br />if(y==0)<br />return 1;<br
2011-03-04 00:29:00
553
原创 myutils.py
<br /># From day on, I'm going to implement a set of functions for my own requiredment<br /># Keep updating here<br /># 2/24/2011, create draft<br /><br />import os<br />import uuid<br /> <br />def writeTo(s):<br /> mypath = os.path.join(os.environ['TMP']
2011-02-24 15:55:00
806
原创 Debuggging windbg&MAPICDO
<br />1. Needs to logon via MFCMAPI to trigger "Ignore PF" registry key works. Avoid some exception of CDO/MAPI.(http://blogs.msdn.com/b/jeffga/archive/2007/08/07/cdo-changes-to-work-better-when-accessing-mixed-exchange-2003-2007-servers.aspx)<br /> <br />
2011-02-24 15:53:00
630
原创 Certificate chain
<br />http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzas.doc/sy10600_.htmHow certificate chains work<br /> <br />When you receive the certificate for another entity, you might need to use a certificate chain to obtain th
2011-02-23 14:39:00
1898
原创 gflags.exe - debug sth at start of it is started
<br />Once I'm going to debug a service as soon as it is started, I found a tool called gflags.exe, but unlucklily, it couldn't stop, so that I can't start that service, after search, I found the work around, and at last, the service can be started success
2011-02-22 15:34:00
1043
原创 windbg memory corruption
<br />http://www.informit.com/articles/article.aspx?p=1081496<br /> <br />While heap-based security attacks are much harder to exploit than their stack-based counterparts, their popularity keeps growing. Daniel Pravat and Mario Hewardt discuss security vul
2011-02-22 00:19:00
4075
原创 Troubleshooting Certificate Status and Revocation
<br />Hope it will help resolve the certification issue.<br /> <br />http://technet.microsoft.com/en-us/library/cc700843.aspx<br /> <br />
2011-02-17 14:02:00
559
原创 procDump usage
A major release of ProcDump has been postedon the Sysinternals.com site (http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx).It is also available on the internal share (//redmond/files/SYSINTERNALS/LBI/Latest).The ProcDump v3.02 release (dated 3
2011-02-02 21:27:00
943
原创 Get CLR call stack in dump analysis
Just found how to get the call stack while analysis dump file.Just confused the call stack is the same while running analyze -v, it's native call stack.When I try !clrstack, it show the current thread is not managed thread, when I navigate to managed threa
2011-01-28 14:07:00
878
原创 Useful WINDBG commands
<br /><br />From:<br />http://geekswithblogs.net/.netonmymind/archive/2006/03/14/72262.aspx<br /> <br />Starting, Attaching, Executing and Exiting<br /> <br />Start -> All Programs -> Debugging Tools for Windows -> WinDbg<br />F6<br />attach to process<br
2011-01-26 11:06:00
780
原创 html图片缩放javascript
<br /><br />这段图片缩放的javascript还挺好使的<br /> <br />function resizeimg(ImgD,iwidth,iheight) {<br /> var image=new Image();<br /> image.src=ImgD.src;<br /> if(image.width>0 && image.height>0){<br /> if(image.width/image.height>= iwidth/iheight
2011-01-17 12:24:00
3648
原创 How to debug .net framework
<br />reference:<br /> <br />http://blogs.msdn.com/b/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx<br /> <br />Configuring Visual Studio to Debug .NET Framework Source Code<br /> <br /><br />It's finally here -
2010-12-28 13:29:00
1107
原创 How to add local administrator via cmd
<br />I met a problem while adding domain user to local administrator group, the UI hung there and without any response.<br />Here I log the way to add user to local administrator group.<br /> <br />CMD sample:<br />net localgroup Administrators /add <user
2010-12-08 12:14:00
786
原创 simple atoi - practise
<br /><br />// cpppractice.cpp : Defines the entry point for the console application.<br />//<br /> <br />#include "stdafx.h"<br /> <br />#define MAX 20<br /> <br />bool isdigit(char c)<br />{<br />if(c<='9' && c>='0')<br />return true;<br />return false;<
2010-12-03 13:32:00
632
原创 C++中的虚继承,以及利用虚继承实现的sealed类
C++ view第一期中给出了如何实现一个不能被继承的类的方法。如下:#ifdef NDEBUG#define FINAL_CLASS#else#define FINAL_CLASS : public virtual Private::NonDerivableHelper //这里的关键是virtual 只要是virtual就不能继承#endifnamespace Private{class NonDerivableHelper{ protected: NonDerivableHelp
2010-11-30 01:04:00
1123
原创 将一个递增和递减的有序链表,用原空间合并成递增有序的链表-O(n)复杂度
<br /><br />#include <stdio.h><br />struct LinkNode<br />{<br />int data;<br />struct LinkNode* next;<br />};<br /> <br />LinkNode* reverse(LinkNode* p)<br />{<br />//TODO: reverse given link list<br />printf("### reverse not implemented ###/r/n");<br />re
2010-11-29 21:45:00
965
原创 exchange 2007 imap4 proxy issue(get "no login" response by basic login).
<br />While testing, I found I couldn't login via administrator.<br />After investigation, I got the problem.<br />Administrator was created before exchange2007 was installed, so "administrator" should be legacy mailbox, while connect to IMAP4 server, the
2010-11-26 16:01:00
565
原创 关于.net assembly的strong name问题
<br />按照我当前的理解,.net assembly作为com的接班人,需要解决dll的版本问题。<br /> <br />错误一般发生在运行时,会抛出IO Exception,指明strong name name validation failed.<br /> <br />很多时候,这说明你当前程序引用的assembly是strong name的,需要用gacutil进行注册(就像regsvr32注册com组件一样)<br /> <br />详细用法参见gacutil /?<br /> <br />
2010-11-17 14:16:00
1284
原创 tracert,查看路由表
C:/Documents and Settings/Administrator>tracertUsage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_nameOptions: -d Do not resolve addresses to hostnames. -h maximum_hops Maximum number of hops to search for tar
2010-11-16 22:01:00
1569
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅