I m glad to share the world with you... ...

Sunday, May 27, 2007

The chattering birds

The bird is regarded as favorite pet by traditional chinese peoper. You can find what does it like...

Saturday, May 26, 2007

In the Crowded Beijing, we hardly to get a living place.

In the Crowded Beijing, we hardly to get a living place.
Even the roofs and the basements are not cheap.
The young have no playground, they play just on the ground.
The old houses middle of the city are destroyed, but there are not enough rooms built for poor.
the cars parking everywhere as they can.
The Beijing is really crowded!
Posted by Picasa

The old job and the new job

The life in Bohui was over. I have quit the job yesterday. The companions were all kind when I said goodbye to them. There were some I had no time to meet, I had to solve some new problems raised by the client of Guangxi. I can only say "take care" in my heart.
 
The day after tomorrow, I'll go to Worksoft, the new job will begin there.
 
Lucky Bohui, and hello Worksoft.

The benefit of downloading with Thunder

 

Thunder is a powerful tool for downloading. There are three obviously benefits to use Thunder.

 

First, it improves the downloading speed. It works effectively. Most of time, the speed is higher than other downloading tool, as Flashget, Netant for example.

 

Second, it resolves the dead link. Sometime, the resource was deleted or moved to other place, and you could not download the resource directly. However, the Thunder can found the backup of the resource automatically. On the other hand, some resource is not accessible in your location, for example, the firewall doesn't let you do it, the Thunder can also solve this kind of problems.

 

At last, most of your downloading is likely to be reused in future. When time flush away, the downloading is deleted by some reasons, this is very normal. Then how to find the former resource? Now with Thunder, the resource can be recorded to the resource Blog, which provided by the Thunder. Go to your Blog, you can find the resources you have down.

 

Tuesday, May 22, 2007

The sample of self-define the code check rule in VS IDE.

1. To use the FxCop class,  we should reference those classes before hand:
 
using Microsoft.FxCop.Sdk;
using Microsoft.FxCop.Sdk.Introspection;
using Microsoft.Cci;
 
2. Inherite the BaseIntrospectionRule
 
    public abstract class BaseRule : BaseIntrospectionRule
    {
        protected BaseRule(string name)
            : base(name, "msdnwebcastRule.testRules", typeof(BaseRule).Assembly)
        { }
    }

 
3. Inherite the class and implement the checking rules by override the chek functions:
 
    public class TestRule : BaseRule
    {
        private const string FIELD_PREFIX = "_";

        public TestRule()
            : base("TestRule")
        { }

        public override TargetVisibilities TargetVisibility
        {
            get
            {
                return TargetVisibilities.NotExternallyVisible;
            }
        }

        public override ProblemCollection Check(Member member)
        {
            Field field = member as Field;

            // Is the provided member a field?
            if (field == null)
                return null;

            // We are only interested in private fields
            if (!field.IsPrivate)
                return null;

            // Ignore constants and fields with special names
            if (field.IsLiteral || field.IsSpecialName)
                return null;

            string name = field.Name.Name;

            // Ignore compiler generated event backing stores
            if (RuleUtilities.IsEventBackingField(field))
                return null;

            if (!name.StartsWith(FIELD_PREFIX))
                Problems.Add(new Problem(GetNamedResolution("Prefix", name, FIELD_PREFIX), field));

            return Problems;
        }
    }

Then compile the class lib and put the asembly to the FxCop's rules folder, OK.

How to self-define the checking rule in VS IDE?

In VSTS, you can define or add the code checking rules in FxCop. This is the to-do list.

1. Download FxCop 1.35. The URL is http://www.gotdotnet.com/team/fxcop/.

2. Install FxCop 1.35

3. Create a class lib project in VS.

4. Insert the reference: FxCopSdk, Microsoft.Cci, you can find them in both the FxCop folder and VS setup folder.

5. Let the class be inherited from base class: Introspection.BaseIntrospectionRule.

6. Override the check functions according your rules:

Check(Microsoft.Cci.Parameter)

Check(Microsoft.Cci.Member)

Check(Microsoft.Cci.TypeNode)

Check(Microsoft.Cci.Tesource)

...

7. Add and edit the rule configure file: xxxRules.xml.

8. Edit the rules with this property:

Message level: Warning Critical Warning, Error, Critical Error and Information.

Certainty: 1--99

9. Test the rule in FxCop 1.35.

10. Reinsert the reference: FxCopSdk, Microsoft.Cci, from VS setup folder, and recompile.

11. Copy the assembly to the FxCop rules folder in the VS setup folder.

12. You can use your self-defined rules in the VS IDE.

 

Be careful:

1. Do not copy the assembly to local

2. The xml file name must be end with "Rules.xml".

3. The xml should be compiled into the resources.

 

Sunday, May 20, 2007

Two questions from Microsoft

The two questions in the interview which I took in Microsoft last Friday are shown below:

1. How a static variable can be accessed (in different scopes)?
2. How the compilers realize the virtual functions? (not in run time)
My ans:
1. The keyword static means let the variable be global stored variable, and where even you change it. All the references (or in other places) of it were changed. But the static don't change the access rule. So, if you declare it in local, you can only use it locally. If you declare it in a file, you can only use it in the scope of this file. If you declare it in a class, you can use it with the namespace of the class name.
I havn't clear idea about them. I 'll make clear of them later...

Tuesday, May 08, 2007

My two questions about CV of HP

1st: What does the sponsorship mean?
 
"For those locations or countries in which you are seeking employment, select all locations or countries for which you now, or in the future, require sponsorship for employment with Hewlett-Packard. "
 
 
2nd:What does "Tuxedo" mean?
The "Tuxedo" list under the descript of the "Skill", then there is a choice box named "Tuxedo".
 
Skills 
Please select the skills for which you consider yourself at least an intermediate and as having at least 1-3 years of experience. 
  Tuxedo:
 
 

Tips and hints from HP

view the source

Your HP interview could have a major impact on your future. So to help make it a positive experience both for ourselves and for you, and to maximise your chances of success, follow our tips and hints:

  • Take some time to think about the following questions: What do you want to do? Where do you want to work? What do you have to offer? If you have really given some thought about your answers to these questions, you'll be better positioned for your interview with HP.
  • Be knowledgeable about HP – what we do and what we are. Know which positions interest you most and why. Use the job search tool to view jobs that best match your interests and experience.
  • Your resumé/CV is vital. It gives HP a 'snapshot' of you prior to interview and guides the line of questioning. Be sure it reflects the qualifications and experience needed for the job for which you are applying.
  • Pay special attention to your contact information and include your email address. Never forget to proof read. When filling out the application form/candidate profiler have your resumé/CV close by so you are able to provide the correct answers to the questions. Be factual and specific with your answers.
  • Honestly evaluate your willingness to move if relocation is required.
  • Let the interviewer know what professional areas you are excited and curious about. Demonstrate your abilities. Be prepared to answer technical questions. You might be asked about your work experience or projects. We are interested in what motivates and drives you.
  • Differentiate yourself. Let the interviewer know why you should get a job over other candidates. Discuss your important personal strengths. HP wants candidates with expertise in their field, but we are also looking for the following key qualities:
    • A dynamic attitude
    • Flexibility
    • Team playing abilities
    • Analytical skills
    • Communication and interpersonal skills
    • Commitment

  • Interview us. Because the interview is also a good opportunity for you to identify whether HP is where you want to be.
  • Bring supporting application information. Depending on the location, HP could require to see supporting application information like thesis, diploma results, or any recommendations.
  • Most of all, be natural, be honest and be yourself!

  •