Monday 19 December 2011

Crm Hidden Security Privileges

The Background
I recently had a client who couldn’t create BU even when she was give all rights on the “Business Unit” entity.


The Symptoms
When the user created a BU under the root BU, she will get a big error in face says “You do not have enough privileges to access the Microsoft Dynamics CRM object or perform the requested operation.”. In the Crm server trace log, I found the following error message:

Error: Exception has been thrown by the target of an invocation.
Error Number: 0x80048306
Error Message: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: e4b0437d-0c33-e011-aed8-00155d00cb35, OwningUser: 00000000-0000-0000-0000-000000000000 and CallingUser: 62eeaabf-2e49-e011-8b16-00155d00cb35
Error Details: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: e4b0437d-0c33-e011-aed8-00155d00cb35, OwningUser: 00000000-0000-0000-0000-000000000000 and CallingUser: 62eeaabf-2e49-e011-8b16-00155d00cb35

Investigation:
As the tracing log has no mention about the privilegeid, I decided to have a play with the security role just in case creating BU requires privilege of other entities. However after I added full privileges to every entity for that user, she still could not create a BU. While I was scratching my head, my colleague has mentioned hidden privileges to me.

The Solution:
The cause of the issue was the lack of crm hidden privileges. To enable a security role to allow its user to create BU, you need to give it some special security roles which is not available on the UI. The easiest way you can assign those privileges to a role is to copy from another role which already has those special privileges. So what I done was that I copied the system admin role to a new role called “BU Creator”, Then I removed every privilege I could from that role. So that the “BU creator” role essentially became a role which only contained special privileges. Then I added the role to the crm user I was using and it worked!

If you want to dig deeper into the crm hidden securities, here is a great blog post to read http://blogs.msdn.com/b/crm/archive/2009/08/04/viewing-all-crm-privileges-including-hidden-privileges.aspx.

Additional Reference:
http://support.microsoft.com/kb/957976/en-us

Sunday 18 December 2011

Crm Security issue ultimate solution.

Crm Security issue ultimate solution unless it has anything to do with the hidden security privilege.

Step 1: Look into the event log and trace file to find something like

>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Server was unable to process request.
Error Number: 0x80040220
Error Message: SecLib::CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: e65023ae-54d1-da11-8e39-00145e3d5192 and PrivilegeId: a8ecac53-09e8-4a13-b598-8d8c87bc3d33

Step 2:
Locate the PrivilegeId value

Step 3: Run the following sql query to find missing privilege
select Name, * from PrivilegeBase where PrivilegeId = 'a8ecac53-09e8-4a13-b598-8d8c87bc3d33'

Step 4:
Add in the missing privilege.

Reference:
http://support.microsoft.com/kb/953962
http://mayankp.wordpress.com/tag/crm-security/

A user can not create Business Units (BU)

To enable a security role to allow its user to create BU, you need to give it some special security roles which is not available on the UI. Only way you can assign those privileges to a role is to copy from another role which already has those special privileges. So what I done is that I copied the system admin role to a new role called “BU Creator”, Then I removed every privilege I can from that role. So that the “BU creator” role essentially becomes a role which only contained special privileges. Then I added the role to the crm user I was using and it worked. It worked on both dev and uat.

Viewing all crm privileges including hidden privileges
http://blogs.msdn.com/b/crm/archive/2009/08/04/viewing-all-crm-privileges-including-hidden-privileges.aspx

Why put the production org and the uat org on same server is a bad practice?

* You cannot test rollup on UAT because the test will affect both.
* If you have heavy load (e.g. load testing or uat is looping on something) on UAT, it will affect Production org's performance.

Wednesday 14 December 2011

Using the CrmDiscoveryService Web Service: IFD

Access Discovery Service from a Crm 4.0 IFD deployment. However this url is not going to work for the plugin registry tool. Because this url will be redirected to the sign in page.
https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx

Monday 12 December 2011

Sunday 11 December 2011

Tutorial: Learn 4 ways to put campaign responses to work for you

http://rc.crm.dynamics.com/RC/2011/en-us/online/5.1_CTP/campaignresponses.aspx
http://rc.crm.dynamics.com/rc/2011/en-us/online/5.0/campresproutingdiagram.aspx
http://blogs.msdn.com/b/crm/archive/2008/01/31/crm-4-0-campaign-vs-quick-campaign-flow-chart.aspx

Lesson 1: Create a new campaign response manually

Sales and marketing teams can use Microsoft Dynamics CRM Online to manually enter customer responses as campaign response records, based on a direct marketing campaign activity. You can create responses manually by creating a campaign activity and then converting it, or by creating a new campaign response in a Campaign form.
For example, when your company launches a new product, you may set up a campaign from start to finish in Microsoft Dynamics CRM Online. As part of your campaign, you may also decide to set up a booth at the county fair to promote this product. You create only one campaign activity for the event itself. You use a printed sign-up sheet on a clipboard to collect contact information from people who are interested in learning more about your product. Back in your office, you can add each of these potential customers into Microsoft Dynamics CRM Online as a campaign response activity associated with the campaign activity for the event.
Only the following activities can be converted to campaign responses:
Appointment
E-mail
Fax
Letter
Phone Call
By opening the campaign record for your product launch and clicking Campaign Responses under Common, you can see the list of all campaign responses collected to this point. You can then click New to create the campaign response in Microsoft Dynamics CRM Online and automatically associate it with the parent campaign.
Tip
Although you can create campaign responses manually in Microsoft Dynamics CRM Online, for situations where you receive contact information outside the system, you may want to consider entering the potential customers as leads instead. You can then convert these leads to opportunities. When you convert a lead to an opportunity, you can also record the fact that the opportunity was generated from a campaign response, as described in the next section.
Top
Lesson 2: Convert an activity to a campaign response

When someone responds to the marketing material you've sent, you can convert the corresponding campaign activity, such as a phone call, e-mail, or appointment, to a campaign response.
Tip
In Microsoft Dynamics CRM Online, you directly promote an activity to a campaign response, or you can create campaign responses from activities when you convert an individual activity to an opportunity.
For example, to help promote your new product to retailers, you create phone call activities that you distribute to your telesales representatives. One of the retailers on your call list responds favorably to your organization's offer. With the Phone Call activity form open, your telesales representative clicks Promote to Response in the Convert Activity group. Alternatively, the representative can also click To Opportunity in the Convert Activity group, and then locate and select data for the Customer field and Source Campaign field. By default, the Record a closed campaign response option is selected, which will automatically generate a campaign response and associate it to the campaign in Microsoft Dynamics CRM Online.
Top
Lesson 3: Automate creating campaign responses

For e-mail activities that are included in your campaign, you can use Microsoft Dynamics CRM Online to generate the campaign responses automatically. When customers respond to e-mail activities, you can choose to have Microsoft Dynamics CRM Online create the corresponding campaign response records automatically.
For example, from a campaign record, you create a campaign activity and choose e-mail as the channel. Because you created the activity from within the campaign record, the e-mail activity is automatically associated with the marketing campaign. After selecting a marketing list, distribute the activity. Microsoft Dynamics CRM Online then creates individual e-mail activities with the Regarding field displaying the information that was entered in the Subject field of the Campaign Activity form. If the recipient sends an e-mail back to your organization, Microsoft Dynamics CRM Online will automatically match the incoming message with the needed e-mail activity, based on information in the e-mail subject line. If Microsoft Dynamics CRM Online finds a match, it creates a corresponding campaign response activity.
Important
This option is available only if e-mail tracking is enabled. This is a setting your system administrator can set. If you are a system administrator, follow these instructions:
In the Navigation Pane, click Settings, and then click Administration.
Click System Settings.
In the System Setting dialog box, click the E-mail tab.
Select the Track e-mails sent between CRM users as two activities option.
Click the Marketing tab, and then verify that Create campaign responses for incoming e-mail is set to Yes.
Click OK to save your changes and close the System Setting dialog box.
Top
Lesson 4: Import campaign responses

In addition to creating campaign responses in Microsoft Dynamics CRM Online, you can also create them outside the system and then import them. By importing campaign responses, you can capture a record of the responses received as part of campaign efforts performed outside Microsoft Dynamics CRM Online.
For example, instead of hiring additional telesales representatives to handle the temporary increase in call volume during the product launch, you may outsource some of this work to a vendor. You may not want to provide access to Microsoft Dynamics CRM Online to these temporary telesales representatives. You can have the telesales representatives add the responses received during the week to a file, and send the file to you. You can then import this file into Microsoft Dynamics CRM Online. When you import the file, Microsoft Dynamics CRM Online creates individual campaign responses and associates them with the campaign you specify.

Saturday 10 December 2011

Stroke awareness campaign - FAST (Face, Arm, Speech, Time) message

F.A.S.T. stands for Facial weakness; Arm weakness; Speech difficulty and Time .… time to act fast and dial 111. You will only have 4 and half hours and there will be a permanent damage.

http://www.strokefoundation.com.au/blog/?p=1024

Thursday 8 December 2011

My tool belt - Tools

BgInfo: System info on your desktop background. http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx

Many of the following are very useful debug tools.

DB Tools:
* VS 2008 and VS 2010, Schema Compare and Data Compare tool.

DB Performance Tools:
SQLDiag - Data collector
PSSDiag - Configure SQLDiag
SQLNexus - Data Reporting tool
PAL (Performance Analysis of Logs)  
Troubleshooting Performance in CRM: Data Tier Part 1 – Capturing the Data

Crm server tools:
* Crm Event Listner
* Crm diagnostic tool for server - CrmDiagTool4. The tool will need to be downloaded separately.
* Crm Log Viewer
* MS CRM Plug-in Debugger. http://archive.msdn.microsoft.com/MSCRMPluginDebugger
http://blogs.msdn.com/b/crm/archive/2008/05/12/testing-crm-plug-ins.aspx
* View Crm 4.0 hidden privileges
http://blogs.msdn.com/b/crm/archive/2009/08/04/viewing-all-crm-privileges-including-hidden-privileges.aspx
http://archive.msdn.microsoft.com/CrmSecurityReports

Crm 2011 tools:
OData Query Designer

Crm Client Libraries:
XrmServiceToolkit

Crm Client tools:
* Microsoft Dynamics Crm Office Client Diagnostics - For debugging on a client. This tool come with Crm Outlook client and does NOT require a separate installation.
* Crm configuration wizard
* Client tracing

Windows Debugging Tools:
* User Mode Process Dumper
http://www.microsoft.com/download/en/confirmation.aspx?id=4060

* Windows Driver Kit WDK
http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx

* How to use ADPlus.vbs to troubleshoot "hangs" and "crashes"
http://support.microsoft.com/kb/286350

* IIS Exception monitor

Dev tools:
Productivity Power Tools

Checksums tool:
HashCheck

Screen share tool:
* teamviewer
* netviewer

Presentation tool:
* ZoomIt - http://technet.microsoft.com/en-us/sysinternals/bb897434

Online tools:
* https://github.com/

Disk De-fragmentation tool:
Auslogics Disk Defrag Free
Ref:
http://www.hanselman.com/blog/TheBestVisualStudio2010ProductivityPowerToolsPowerCommandsAndExtensions.aspx

WinDirStat - Shows you how big are each folder
http://windirstat.info/

Assembly reference analysis tool:
Assembly Binding Log Viewer (Fuslogvw.exe)
Orca - Modify MSI file

File compare tools:
KDiff
DiffMerge
WinMerge
BeyondCompare (NOT FREE)

Office:
http://www.libreoffice.org

Monday 5 December 2011

Crm Performance

http://crmperftoolkit.codeplex.com/

http://blogs.msdn.com/b/benlec/archive/2009/01/20/deadlocks-performance-issues-mscrm-database-growth-asyncoperationbase-table-increase.aspx

http://blogs.msdn.com/b/crm/archive/2009/01/16/tips-for-faster-and-better-performance-on-microsoft-dynamics-crm-4-0.aspx

http://blog.dynatrace.com/2010/09/02/top-3-performance-problems-in-custom-microsoft-crm-applications/

Saturday 3 December 2011

Thoughts of the day

To study efficiently.

* Very clear goal. e.g. For a project, for an exam or for reading through a book.
* Have to be structured. You have to have a list of things to do. E.g. Practice exam or a book.
* Time and measurement
* To enable myself to study - news in picture can bring me to the mood.

Friday 2 December 2011

CRM 2011 Diagnostic Tool

http://db.tt/rYNBMR5L

IPhone

To replace iPhone back panel, you can buy one from
http://www.iphonewzealand.co.nz/2010/all/replacement-metal-iphone-4-back-looks-awesome-easy-to-install-and-wont-void-your-warranty/
or
http://www.ifix.co.nz/

Wellington 101 - Bars

Motel - http://motelbar.co.nz/
Boogie wonderland - http://www.boogiewonderland.co.nz/gallery.aspx
Rain - Asian bar

Cheese

Brie cheese - Soft cheese with white cover

Manuka smoked tasty Grouda cheese - delicious soft cheese covered with manuka powder. Grouda
Wholesmoked nz ltd
http://www.wholesmoked.co.nz/

Blue vein cream cheese is better than pure blue cheese.

Cheddar cheese - Hard cheese

Smoked cheese.

hard cheese (Maybe with red wax).

Queens jam is great when eat with cheese. Queens jam is a fruit jam.

Cheese waxing

Sunday 27 November 2011

Where to Download Your Product's Companion Content? How to download sample code/files of tech books.

we are pleased to offer the CD/DVD content as a free download via O'Reilly Media's Digital Distribution services. To download this content, please visit O'Reilly's web site, search for the title of this book to find its catalog page, and click on the link below the cover image (Examples, Companion Content, or Practice Files). Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to booktech@oreilly.com.

http://shop.oreilly.com/category/customer-service/faq-examples.do

Thursday 24 November 2011

Referendum NZ 2011, Different voting systems

* FFP
+ Only one vote for the local MP and that mp will represent in the parliament.
+ Hard for small party to win seats.
* PV (Preferential Voting)
+ Like FFP but you rank your local MP instead. Ranking from 1 to 4
* SM (Supplementary Member)
+ Like MMP but smaller party will have less seats than the votes they get.
* STV (Single Transferable Vote)
+ Each electorate has more than one MP
+ Easy for small party to get elected.

http://www.youtube.com/user/ReferendumNZ#p

Wednesday 23 November 2011

Random, Misc

scrapple - Like spam in a tasty sause
relish - Pickled fruit and veges
Gandalf (Lord of the ring) - Ian McKellen
It smells like sweat and virginity. LOL
(Artist)Coop. Wheel girl is one of his drawings
lederhosen - German beer festival outfits for guys

Sunday 20 November 2011

Crm 4 Email Tracking

When you track an email in Crm, it means an email activity record will be generated from an income email which matches the track criteria.

Once an email is tracked, you will be able to find it in your Crm activity list with Type = E-mail

To manually track an email, click on the "Track in CRM" button in the Crm integration ribbon section in Outlook.

To automatically track an email, you need to choose how much emails to be tracked/copied into crm.



The token (e.g. CRM:0002001) is there to allow Crm to set the "Regarding" field automatically.

Email tracking CRM 4.0 - Here's 4 Easy questions

Q1. What is the difference between the three options?
1. All Emails
2. Emails in Response to CRM emails
3. E-mail messages from CRM Leads, Contacts and Accounts

The first one is obvious. The second one states that any email that originated in CRM, if replied to, the reply will be tracked in CRM. The third one specifically tracks emails from CRM Leads, Contacts and Accounts (which is obvious too).

Q2. If I click on "Set Regarding" and link an email message from one of my customers - why does it not remember next time he sends me an email and automatically "Set Regarding" to his contact record

If you have enabled Smart Matching based email correlation (On by default in CRM 4 and configurable for CRM 2011 in System Settings), AND if the second email that you want to have regarding object set automatically is part of the original thread conversation, then the email will have the regarding object set automatically. If the second email is having a different subject or set of recipients, then the email will nto have the regarding set as CRM will find that to be a different conversation.

Q3. I get some email automatically linking (getting tracked) where it says "Regarding NONE" - does that mean it's not attached to a record? where do I find that email in CRM?

Email are automatically tracked if you have chosen one if the 3 options in Q1. The Regarding object is set as None since there is no history for that email (no previous email in the thread has a regarding object set). You will be able to see all emails in the Activities Grid.

Q4. How does it decide if it should track the email and where it should put it? (is it looking at the email address only or something else)
Answered in Q3.

Thursday 17 November 2011

Things to note for a CRM3 to CRM2011 upgrade

Hi team,

Two things (I found out so far) which are important to know for a CRM3 to CRM2011 upgrade project - which need to be part of a system requirement checklist –

1. CRM 2011 requires SQL Server 2008 (use SP1 for R2 to avoid a known issue)
If the existing SQL Server in PRODUCTION is below this version, a SQL Server upgrade is required so licensing and hardware costs would need to be considered.

2. CRM 3.0 Server is NOT supported on 64bit platform
A (transitional) 32bit server is required for a CRM 3.0 to CRM 4.0 upgrade. After that, the databases would be copied and used in a 64bit server. Even though the 32bit server is only required during the upgrade, it is a part of the process we need to consider.

Wednesday 16 November 2011

How much does a Microsoft exam cost?

Microsoft $205 + GST*
http://www.auldhouse.co.nz/content/99c776d9-8745-48ef-b1c2-9f2a86af0b91.html

Monday 14 November 2011

Displaying CRM emails using SSRS 2008. PlaceHolder and its deficiency.

Place a textbox control on report and within it place the PlaceHolder by right clicking inside textbox and choose PlaceHolder.

Set the properties of the 'PlaceHolder', change Markup type to HTML.

Extract description(body) of email by query eg. Select description from filteredemail where activityid='A0773451-3DE3-DF11-9EAB-0003FFD4167C'

Set the expression value of the placeholder to description, from dataset fields.( For e.g. Fields!description.Value).

Review the report to see the following result.

Reference: http://inogic.blogspot.com/2010/11/displaying-crm-emails-using-ssrs-2008.html

=============
Another deficient of the placeholder
=============
Also the placeholder can interpret html before rendering, you can not do anything with the text after interpreting. For example, placeholder can render an html email correctly but you can not trim down the already interpreted email content to 80 characters.

Sunday 13 November 2011

Resolving "Error: Subreport Could Not Be Displayed" in Crm 2011

The error I got:

Steps I went through to fix the problem:
1: Upload the parent report as well as the sub report
2: Make the parent report property is defined sub report edit form

Database Mirroring

Configure a Microsoft Dynamics CRM organization for database mirroring
Three principle components:
MSCRM_Primary
MSCRM_Mirror
MSCRM_Witness

Database mirroring overview

Tuesday 8 November 2011

Crm 2011 XSDValidation Error when importing customization.

Crm 2011 XSDValidation Error when importing customization.


Original error message:
The import file is invalid. XSD validation failed with the following error: 'The 'dateformat' attribute is not declared.'. The validation failed at: '...utoMode="VariableCount"

The issue is that the dateformat attribute is used in the customization.xml file but it is not defined in the schema.

The FIX:
Remove the dateformat attribute from the customization.xml.
Note: importing may take a while

Other things to try when the customization failed.
* Import a partial customization
* Remove the managed solutions and try again.

Monday 7 November 2011

Crm security privileges Append, Append to, Assign

Append - To control the lookup fields of the other entities on the form of this entity

Append to - To control the lookup field of this entity on the forms of other entities

Assign - To control the Owner field of this entity.


Here is a good reference for this topic. http://community.dynamics.com/product/crm/crmtechnical/b/crminogic/archive/2010/05/03/append-v-47-s-append-to.aspx

Sunday 6 November 2011

Brew beer

Malted Barley (一点点发芽的大麦)
Hop - Add bitterness
Yeast

Wednesday 2 November 2011

Increasing the CRM 4.0 Attachment Size Limit

The default attachment file size limit in Microsoft Dynamic CRM 4.0 is 5 MB. There is good reason for this - as a general rule you should be placing some restrictions on the amount of file data that can enter CRM so that the database can maintain a reasonable size and so that performance is optimized. However, your business may find the need to increase this size a little in order to handle larger file attachments. Here are the instructions to increase the file size limit to 10 MB. You can go larger than this, but pay close attention to the table size and performance over time as you want to keep CRM running as well as possible. Note - even though the System Settings option looks like this it would apply to email attachments only, it does apply to "notes" type attachments as well. Finally, this procedure to change the max attachment size is not an officially published recommendation, so use this at your own risk. How to increase the max attachment size in CRM 4.0:


1. Open the application web.config (C:\Inetpub\CRM\web.config).


2. Locate the key within the element and change the values to the following:


3. Locate the key within the element of the

Sql tracing profiler event explained

RPC: Completed
The RPC: Completed event fires after a stored procedure is executed as a remote procedure call. It includes useful information about the execution of the stored procedure, including the CPU time used to execute the stored procedure, the total length of time the stored procedure ran, logical reads and writes that occurred during its execution, along with the name of the stored procedure itself.

SP: StmtCompleted
Stored procedures are made up of one or more statements. In SQL Server 2005, each statement within a stored procedure is traced. The SP: StmtCompleted event indicates when a statement within a stored procedure has ended. The StmtCompleted event’s data columns provide lots of useful information about the statement, including the actual code in the statement, the duration the statement ran, the amount of CPU time used, the number of logical reads and writes, the number of rows returned by the statement, among others.

SQL: BatchStarting
The SQL: BatchStarting event is fired whenever a new batch begins. Once a batch begins, then one or more individual Transact-SQL statements occur. The SQL: BatchStarting event is a good event to easily see where a batch begins, but other than this, it is not particularly useful.

SQL: BatchCompleted
The SQL: BatchCompleted event occurs when a batch completes. This means that one or more Transact-SQL statements have completed for the batch. The SQL: BatchCompleted event is more useful than the SQL: BatchStarting event because it includes useful information like the duration of the entire batch, the logical number of reads and writes caused by all the statements inside the batch, the total number of rows returned by the batch, and other useful information.

Deadlock Graph
Of seven events I have listed above, the only event you must have is the Deadlock Graph event. It captures, in both XML format and graphically, a drawing that shows you exactly the cause of the deadlock. We will examine how to interpret this drawing later in this article.

Lock:Deadlock
This event is fired whenever a deadlock occurs, and because of this, it is also fired every time the Deadlock Graph event is fired, producing redundant data. I have included it here because it makes it a little easier to see what is happening, but if you like, you can drop this event from your trace.

Lock:Deadlock Chain
This event is fired once for every process involved in a deadlock. In most cases, a deadlock only affects two processes at a time, and because of this, you will see this event fired twice just before the Deadlock Graph and the Lock:Deadlock events fire. In rare cases, more than two processes are involved in a deadlock, and if this is the case, an event will be fired for every process involved in the deadlock.

Tuesday 1 November 2011

The import file is too large to upload - Crm customization import error


Have fine fix for Crm 2011 but I am trying the Crm 4 equivalent.

http://support.microsoft.com/kb/918609

Programming and debugging tips. Debugging Crm tips

* Look deeper under the hood: Reflector, Sql Profiler, Debugger, VS Tracing, Tracing File, Log Files, Windows Event Logger...
* Compare with working version: svn, different version of database...

* if crashes on create, debug the constructor
* Always Set Stop On Exception While Doing Debugging in Visual Studio 2005 or 2008
Menu -> Debug -> Exceptions... -> Tick all the check boxes
* Attach to w3wp is unstable. F5/debug may show you more debug info
* Debug window "Call stack", "Immediate" and "Disassembly" are very useful.
* Use break point's hit count, stop condition and when hit (you can print when the statement is hit)

--Crm--
* Turn on DevErrors in web.config
* For Crm client, run the diagnosis tool.

temp table, table variable, CTE (Common Table Expression)

Rule of thumb: If logic is simple CTE, otherwise Table Variable

CTE (Common Table Expression):
* May have performance issues
* Like a sub-query
* Save you some type and make the field type consistent with the original table
* Saved in memory

Table Variable:
* Performance better
* Saved in database

Temp Table:
* Do you best to not use it

http://databases.aspfaq.com/database/should-i-use-a-temp-table-or-a-table-variable.html

Temp Table

CREATE TABLE #MyTable
(
Id int,
Name varchar(32)
)

DROP TABLE #MyTable

alternative syntax
select * into #MyTable from contacts
drop table #MyTable
-----------------------

Table Variable

DECLARE @MyTable TABLE
(
Id int,
Name varchar(32)
)

----------------------

CTE (Common Table Expression)
WITH MyTable (Id, Name)
AS
(
SELECT Id, Name
FROM User
)

Music

Roky Erickson

Exodus Honey by Honeycut

Bohemian Rhapsody by QUEEN
mamma mia let me go

Monday 31 October 2011

Crm 2011 cannot import solution




Make sure all the managed solutions are imported at first.

Sunday 30 October 2011

Microsoft Dynamics CRM 2011 User’s and Administrator’s Guides

http://blogs.msdn.com/b/crm/archive/2011/08/16/microsoft-dynamics-crm-2011-user-s-and-administrator-s-guides.aspx

Intergen vm platform DC issues. dns doesn't work

try following command

ipconfig /registerdns --register the ip and computer name with the DC server
ipconfig /flushdns

CRM 2011 Update Rollup release build numbers, and how to find them

Version Release Date Build Number KB Article
Release Candidate 5.0.9688.53 2461082
Beta (On Premise) 5.0.9585.106
Beta (Online) 5.0.9585.107
RTM February 16, 2011 5.0.9688.583 Download RTM
Update Rollup 1 April 7, 2011 5.0.9688.1045 2466084
Update Rollup 2 June 2, 2011 5.0.9688.1155 2466086
Update Rollup 3 July 28, 2011 5.0.9688.1244 2547347
Update Rollup 4 September 9, 2011 5.0.9688.1450 2556167
Update Rollup 5 October 20, 2011 05.00.9688.1533 2567454
Update Rollup 6 January 12, 2012 5.0.9689.1985

Adobo - Philippines food

Adobo (Spanish: marinade, sauce, or seasoning) is the immersion of raw food into a preparation, in the form of a stock (or sauce), of different components, including paprika (from red peppers), oregano, salt, garlic, and vinegar — mixed according to the place of origin and the food with which it is intended to be used—primarily to preserve and enhance the flavor of food.

The Atkins diet

The Atkins diet, officially called the Atkins Nutritional Approach, is a low-carbohydrate diet created by Robert Atkins from a research paper he read in the Journal of the American Medical Association published by Gordon Azar and Walter Lyons Bloom. Atkins stated that he used the study to resolve his own overweight condition. He later popularized the method in a series of books, starting with Dr. Atkins' Diet Revolution in 1972. In his second book, Dr. Atkins' New Diet Revolution, he modified parts of the diet but did not alter the original concepts.

Saturday 29 October 2011

Crm 2011 Report Extensions installation - SrsDataConnector

In short, Crm 2011 Report extension (SrsDataConnector) is required component but it is not installed as the main crm installation. You can find the detailed installation guide in the chapter 2 (Page 13) of the Microsoft Dynamics CRM 2011 Installation Guide.doc

All installations now require the CRM 2011 Report Extensions to be installed and configured on the SQL Reporting Server. If it is not installed, certain features will not work properly: reporting will not function, creating new organizations, and organization imports will be blocked until the extensions are installed and configured.

http://blogs.msdn.com/b/crminthefield/archive/2011/03/11/crm-2011-server-setup-commonly-asked-questions.aspx

http://yellowduckguy.wordpress.com/2011/06/01/microsoft-dynamics-crm-2011-reporting-extensions-is-not-installed/

Thursday 27 October 2011

Crm 2011 IFD deployment. Internet Facing Deployment

There is a good MSDN blog article at the address below which I’m going to mention here for your reference (and mine for the future).
http://blogs.msdn.com/b/crm/archive/2011/01/13/configuring-ifd-with-microsoft-dynamics-crm-2011.aspx

The video
http://www.youtube.com/watch?v=ZD5qaa-G99E

Some key points
Components required for setting up Crm IFD deployment.
* Installing AD FS 2.0. AD FS has to be installed on the default website
* Configuring the AD FS 2.0 federation server
* Microsoft Dynamics CRM Server 2011 must be running on a Web site that has been configured to use Secure Sockets Layer (SSL).
* Managing certificates
* Configuring Dynamics CRM 2011 for claims-based authentication and IFD
* Creating the relying party trust for CRM and configuring the claims rules on AD FS 2.0

Windows Authentication


Claims-based authentication: internal access


Claims-based authentication: external access

WPF Study Key words

Study strategy: Do Practice exams, then read the self-paced training book on weaknesses.

[Controls]
WPF Controls:
+ individual controls
+ Item controls
+ Layout controls

Attached Properties
e.g.

[Resource]
Binary resource
Logical resource - can be defined and accessed in XAML files in comparison to Binary resources
Static resource
Dynamic resource

pack URI syntax: pack:////
e.g. Source="pack://application:,,,/myFolder/myPic.bmp"
Use the pack URI syntax to access resources embedded in other assemblies
pack://application:,,,/;component//

siteOfOrigin pack URI syntax:
This is useful for ClickOnce application.

[ClickOnce Application]
ClickOnce application:
Pros: Easy to deploy - just need to click on a link.
Update automatically
Run in a security sandbox.
Cons: Cannot change registry
Cannot manage COM
Cannot manage ODBC
Cannot do other stuff with high security restriction.

Wednesday 26 October 2011

Crm 2011 installation issues and solutions

Important
After Setup is complete, you cannot change the database collation, base ISO currency code, or the organization unique name. However, you can change the base currency name and base currency symbol.

Issue: What Org Unit should I use to setup Crm 2011?
Solution: Just use the top Unit.



Issue: I can ping the sql server but can not connect to it using Sql Management Studio.
Solution: Turn off the firewall on the sql server.

Issue: Error "The instance name must be the same as computer name."
Solution:
select @@SERVERNAME
go

sp_dropserver 'old server name'
GO

sp_addserver 'new server name', local
GO
http://sandrinodimattia.net/blog/post/Dynamics-CRM-2011-Installation-The-instance-name-must-be-the-same-as-computer-name.aspx

Issue: The reporting server doesn't exist
Solution: Enable the service on Services.msc
Then Start the reporting service via Reporting Services configuration Manager

Issue: "The report server has encountered a configuration error. (rsServerConfigurationError)" And then when you look into the log at C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\LogFiles. Under the latest ReportServerService*.log, there was the following error: "Message: No DSN present in configuration file".
Solution: Basically you need to setup the sql reporting service database using Reporting Services configuration Manager. http://jessicammoss.blogspot.com/2008/07/reporting-services-2008-configuration.html

Issue: Immediately after the Crm installation, I was not be able to login to Crm with an error says cannot login with my current login.
Solution: Wait. It may take a moment for the changes in AD to take place.

Issue: SSRS errors: (rsReportServerDatabaseUnavailable) The report server cannot open a connection to the report server database.
Solution: http://sqljoe.wordpress.com/2011/02/16/ssrs-errors-rsreportserverdatabaseunavailable-the-report-server-cannot-open-a-connection-to-the-report-server-database/

Reporting Services requires two databases to run:
ReportServer
ReportServerTempDB

To solve the error mentioned above you need the following information:
What is the SQL Server Reporting Services instance you are trying to reach?
Where are the SQL Server Reporting Services databases hosted?

Once you located the SQL Server database instance where the ReportServer and ReportServerTempDB database are hosted you need to follow this checklist:
* Is the SQL Server database instance running? Is the SQL Server service started?
* Can you verify connectivity to the SQL Server database instance?
* Are the ReportServer and ReportServerTempDB databases attached and online?
* Does the Reporting Services service account have read/write access to the ReportServer and ReportServerTempDB databases?

Once all of this is verified to be true and issues have been fixed, than the last step would be to restart the Reporting Services instance. If everything is right you should be able to access your reports.

Tuesday 25 October 2011

To setup an Exchange Server for an Crm dev environment or not?

The short answer is NO.

* An exchange server is expensive to setup and run. More often than not you will not need it for a dev environment.
* Instead you can use outlook
* Pop3 server. But no need to setup an POP3 email server as you can just use Gmail's pop3 server.
* Even with nothing setup and just see if an email is in the pending state.
* Even you do need to point to an exchange server. Multiple Crm deployments can share the same Exchange server. You probably can use the Intergen old exchange server.

--------------My conversation with Sophie-------------

Sophie Khun-HammondHey Kelvin
i don't think you need to set up an exchange server
instead install the email router


5:41 p.m.Kelvin Shenbut where should I point the router to?
Intergen Exchange server?


5:41 p.m.Sophie Khun-Hammondin order for emails to be sent from CRM it has to either use the email router or outlook client
what are the clients using at the moment for their outgoing emails?


5:43 p.m.Kelvin Shenbut do you need to point the email router or outlook client to something?


5:43 p.m.Sophie Khun-Hammondif you are using outlook client, it will use your outlook to send emails
if you choose email router, the email router will send the email but it will still send as the user
the email router must point to the smtp server
or pop server


5:44 p.m.Kelvin ShenBut outlook need to point to an exchange server to do the job.


5:44 p.m.Sophie Khun-Hammondno
it will use Outlook to send the email
so whether your outlook is hooked to exchange or through pop it will send the email out through that way
so for example, my personal Outlook is using my gmail - i've installed the crm outlook client for this outlook
this means CRM will use my outlook to send my email through gmail


5:46 p.m.Kelvin Shenso I will need to setup either a pop server or an Exchanger server. Correct?


5:46 p.m.Sophie Khun-Hammondno
first you need to tell me what setting the outgoing email is set to for the user
is it Outlook or email router?


5:47 p.m.Kelvin ShenI'm setting up the dev envrionment for AMI Insurance who is using crm 2011 online.


5:48 p.m.Sophie Khun-HammondOk but you need to tell me what their user setting is for outgoing emails
are they using the outlook client in general?
if they are, then they should use Outlook for their outgoing emails


5:49 p.m.Kelvin ShenI am not sure how their email is hooked up in the cloud but I just need to setup something similar so I can test thing when doing development. including sending emails.


5:49 p.m.Sophie Khun-HammondBefore you spend time setting up something that may not be needed, you need to first find out whether or not they are using the outlook client
if they are using the outlook client, then their Outgoing email setting for their user settings should be set to Outlook
if that's the case, you do not need to install the Email router or exchange
I don't think you would need to test it either as it's an out of the box feature
if an email is sent from within CRM it will synchronize to outlook and then will send out from there
then you will be able to see the email sent from the user's sent items box
Do you know if they are using the Outlook client?


5:54 p.m.Kelvin ShenSure, I don't need to test the crm email itself. But let's say in the future I am asked to create a workflow which sends email. It will be nice to see the email actually going out to an testing address before I deploy the workflow to UAT.
I will find it out if they are using Outlook. At least some of them should.


5:55 p.m.Sophie Khun-HammondIf they want you to create a workflow that sends out as say the CRM service, then you will need to install the email router
and link it to the exchange of the crm service account
but i wouldn't go that far into installing the email router unless they actually want a workflow like that
otherwise you may be wasting your time
the email router can be installed once and have different deployments. So you can point it to Prod and Dev


5:57 p.m.Kelvin ShenGood point!


5:58 p.m.Sophie Khun-HammondSo first find out exactly what they want and then decide whether or not to install the email router


5:58 p.m.Kelvin ShenDo we have a old not used exchange server in Intergen?


5:58 p.m.Sophie Khun-Hammondno, i wouldnt recommend using a test exchange
you can just use their prod exchange and point it to their test environment
that way the settings are pretty much correct when it works, and all you have to do is copy the settings to the prod deployment under the same email router server


5:59 p.m.Kelvin ShenBut the dev environment is host by us.


5:59 p.m.Sophie Khun-HammondHave you configured the email router before?


5:59 p.m.Kelvin ShenIt is indepent from uat and prod environment.


5:59 p.m.Sophie Khun-Hammondoh i see


5:59 p.m.Kelvin ShenYeah


6:00 p.m.Sophie Khun-Hammondhmm i don't think you need to go as far as setting up the email router
you can tell if your workflow has sent the email by looking at the activities area
it will have emails pending send
if they can't be sent


6:01 p.m.Kelvin Shenno, I didn't realise before we can share exchange server from different crm dev envrionment until you pointed out just now.
Yeah, that is a good idea too. Thanks


6:02 p.m.Sophie Khun-Hammondjust be careful that you don't spend too much time on something that isn't required
can i ask you what the client has requested ?


6:03 p.m.Kelvin ShenSo the Crm email router can not talk in Pop protocal.


6:04 p.m.Sophie Khun-HammondYes email router can be configured for pop


6:04 p.m.Kelvin ShenIn MS, we will setup a dev environment for support during the handover process. So if a case coming in in the future, the developer will have the environment already setup for them to do the job.


6:05 p.m.Sophie Khun-Hammondbut in Dev if you are developing something, i don't think you need to test to make sure the email is sent, but more for if the workflow has fired to create the email message in CRM


6:05 p.m.Kelvin ShenI am setting up an environment for this purpose now.


6:05 p.m.Sophie Khun-Hammondok, then i don't think you need to set up the email router at all
hope this helps


6:07 p.m.Kelvin Shenyeah, definitely. I am still absorbing it. Thanks

Crm 2011 Roll Up 4 and Auditing Issues

One of our clients has been experiencing an “Unexpected Error has occurred” error message when viewing auditing records. The error seemed fairly sporadic and would only occur for some entity records. In the trace logs a date format exception could be identified corresponding to the time when an audit record was being viewed.

This issue was raised with Microsoft and a fix was provided in Roll Up 4. The update changes the way date fields are written to the audit table, but nothing is done to the existing records and they will still cause the error. This caused me to re-raise the error with Microsoft; the result of this was that a script would have to be used to repair the data. It took a couple of iterations with MS to get a script which did the job.

Here is what I used to get the job done, note you only want to update the audit records which are in the system prior the Roll Up 4 being applied.

begin transaction

SET DATEFORMAT dmy
GO

declare @rollupDate datetime
set @rollupDate = '4/10/2011 6:35:32 am'


update Audit
set ChangeData = CONVERT(char(11), CAST(REPLACE(ChangeData, ' a.m.', 'AM') as date), 101) + CONVERT(char(11), CAST(REPLACE(ChangeData, ' a.m.', 'AM') as time), 108)
where ChangeData like '%/%/%:%:% a.m.' and CreatedOn < @rollupDate and LEN(ChangeData) < 25


update Audit
set ChangeData = CONVERT(char(11), CAST(REPLACE(ChangeData, ' p.m.', 'PM') as date), 101) + CONVERT(char(11), CAST(REPLACE(ChangeData, ' p.m.', 'PM') as time), 108)
where ChangeData like '%/%/%:%:% p.m.' and CreatedOn < @rollupDate and LEN(ChangeData) < 25


select objectid,changedata from AuditBase
where ChangeData like '%/%/%:%:%' and CreatedOn < @rollupDate and LEN(ChangeData) < 25


commit

Friday 21 October 2011

English slang, Idiom

Dry as a wooden god
[Definition] Very dry area or very thirsty: That desert is as dry as a wooden god.

Six of one, (and) half a dozen of the other
[Definition] Two things are almost the same or equal

clique - small group of people.

He wears cowboy spurs - He is a cowboy

hip flask

Pink eye

H.P.: Hire purchase

You want to bounce something of/off me = You want to try something with me

cut somebody some slack (spoken)
to give someone additional freedom

straggler -落后者 -someone who strays or falls behind.

cup, car, (beer) stein, tumbler,

squeaky wheel gets the grease

Bob's your uncle = There you have it.

coon: Insulting term for a black person

Thursday 20 October 2011

Book a meeting room in Intergen

When arranging a meeting and selecting invitees, you must also ‘invite’ the meeting room, but change the ‘All Attendees’ status to ‘Resource’ and not ‘Required’ or ‘Optional’.

Wish list, wishlist

* Leather man multi-tool
* Stand up desk (for work while standing)
* Laptop stand
* iPhone cable
* iPhone holder
* Locker-Locker for sports gears

stand up desk, height adjustable desks

http://officefurniturewarehouse.co.nz/buy-office-furniture-online/office-desking/height-adjustable-desks/kinetic-1800-x-700-desk-frame--top---tech

Wednesday 19 October 2011

Crm 4 playground

User WMS Dev

Crm 4 Email configuration. Email router configuration

Email router is an interface between a email platform, e.g. Exchange, and the Crm.

E-mail Router can check directly on the user accounts/email boxes. However the down side of that is you will have save user name is password in Crm Personal Options. Once the password of a user changed in AD, the new password need to be updated in Crm too. If you have lots lots of user, it can become unmanageable.

Therefore the "Forward Mailbox" incoming delivery method is used to overcome the issue. "Forward Mailbox" is just another AD user/account/Exchange mail box.

Create the Forward Mailbox/User. Once you created an AD user, and exchange email box will be setup automatically. So User =[1 to 1 relationship]= User’s mail box

Setup forwarding rules using Rule Deployment Wizard.


Configure email router screen
Configuration Profiles: Define where the Exchange server is.
Deployment: Defines where the Crm server is.
Users, Queues, and Forward Mailboxes: Defines Forward Mailbox account/email account.

Just as a side note. "Set Personal Opitons | E-mail" AND "User | [E-mail Access Configuration] section go hand by hand.

Ref: http://video.mikelu.org/emailrouterfwd/emailrouterfwd.html

Tuesday 18 October 2011

Troubleshooting the Microsoft Dynamics CRM Client for Outlook

http://blogs.msdn.com/b/crm/archive/2009/05/29/troubleshooting-the-microsoft-dynamics-crm-client-for-outlook.aspx

Troubleshooting Client Configuration

Check Managed Passwords:

When logging in through Internet Explorer from the client machine do you Get Prompted for Credentials?
Set “Automatic Logon with current user name and password” for the zone where the CRM URL was located. In Internet Explorer click Tools-Internet Options then under Security check the custom level options for User Authentication and select “Automatic Logon with current user name and password”
Remove Stored Passwords which are located in Control Panel | User Accounts | Managed Passwords
If you’ve upgraded from the 3.0 Client:

Remove the MSCRM Data File and CRM Address Book Provider per steps in KB 948312 (http://support.microsoft.com/kb/948312)
If still failing: Uninstall 3.0, uninstall and reinstall CRM 4.0.
Permissions Issues when configuring:

The error message is "Action Microsoft.Crm.Config.Client.InstallPstAction failed. LaunchOutlookInstallerProcess failed."
Use ProcessMon to see if it’s registry or file access issues. (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx)
Active Directory DNS Issues:

The following error is shown when configuring - “The configuration wizard cannot connect to the Microsoft CRM server. This might indicate that the server is down.”
Add DNS Record for Organizations being accessed over IFD
Add DNS Records if you are using a Host Header on the CRM Website
Verify you have the correct SPN set on the Account running the AppPool. (http://support.microsoft.com/kb/929650)
Remove Duplicate SPNS http://support.microsoft.com/kb/911353
Check the Deployment Properties table:

KB 970630 (http://support.microsoft.com/kb/970630)
KB 947423 (http://support.microsoft.com/kb/947423)
Check Website for Host Header and Port that where updated post CRM Server install.
You may have an issue with MAPI . This is not as frequent, and this would be a last step.

You receive the error "Action Microsoft.Crm.Config.Client.InstallPstAction failed. LaunchOutlookInstallerProcess failed."
Run the fixmapi.exe which is located at %windir%\system32\fixmapi.exe
Login Issues

Check the URL you are using:

Can you login in from the client machine within Internet Explorer successfully?
Does the User in CRM, have a Role?
Is the user set to Administrative Mode on the user record?
If so the users set to Administrative Mode will not be able to successfully launch the Microsoft Dynamics CRM Client for Outlook.
Check Managed Passwords:

When logging in through Internet Explorer from the client machine do you Get Prompted for Credentials?
Set “Automatic Logon with current user name and password” for the zone where the CRM URL was located. In Internet Explorer click Tools-Internet Options then under Security check the custom level options for User Authentication and select “Automatic Logon with current user name and password”
Remove Stored Passwords that are located in Control Panel | User Accounts | Managed Passwords
Permissions may be causing a problem:

Permissions on Role
Turn on Platform Tracing to see if any CheckPrivilege errors occur
- CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: 8bebb2df-3ac8-dc11-8d71-005056000030 and PrivilegeId: 588725dd-c878-41c5-a4c3-5efc93cd3ffd

- If permissions are missing look in the Organization database to find out what privilege is missing.

Select * from privilegebase where PrivilegeID = ‘id of privilege GUID from the trace’
On the User Record check the Access Mode and see if it is set to Administrative Mode and if it is change it to Full
If there could be a permission issue on the Website in IIS look at IIS Logs & Plat Trace
Sync IWAM and IUSR passwords KB 906365 (http://support.microsoft.com/kb/297989)
Do you have any 3rd Party Addin’s?

Do you have the latest updates to other Addin’s?
Temporarily disable 3rd party Addin’s to find the Addin that is causing the issues.
Check the IFD Settings if it is enabled:

Setup IFD if accessing externally using the Microsoft Dynamics CRM Client for Outlook over the internet requires that IFD be enabled.
More info on IFD here (http://www.microsoft.com/downloads/details.aspx?familyid=3861E56D-B5ED-4F7F-B2FD-5A53BC71DAFC&displaylang=en)
CRM Outlook Add-in Responsiveness

Apply the latest Update Rollup for Microsoft Dynamics CRM 4.0

Disable other Outlook Add-ins to see if the issues still occur.

Start enabling the Add-ins one at a time to find out what Add-ins are causing the issues.
Check to see if there are any new updates for the Outlook Add-ins that are installed on the client machine. We have seen issues where older versions of some Outlook Add-ins have caused issues with Microsoft Dynamics CRM.
Gather a crash dump or hang dump to send into Technical Support using the ADPlus Tool at http://support.microsoft.com/kb/286350

ADPlus is a tool that will allow us to get a memory dump from a process that is giving you problems. To get this tool, please install the most current version of “Debugging Tools for Windows" from http://www.microsoft.com/whdc/devtools/debugging/default.mspx

Once these tools are installed, do the following to capture a Crash Dump or a Hang Dump:

1. Create a directory called c:\adplus

2. Open a command prompt and change to the directory where you installed the debugging tools. By default, this is c:\Program Files\Debugging Tools for Windows

3.a. Crash Dump - If Outlook crashes (restarts or the Outlook.exe process disappears), then a crash dump is required. This can be captured using the following commands and needs to be run before the Outlook crash occurs.

To capture a Crash Dump type the following:

cscript adplus.vbs -crash -pn Outlook.exe -o c:\adplus
Note: a WARNING window will pop-up regarding debugging symbols - click OK

3b. Hang Dump - If Outlook is hanging or non-responsive to mouse clicks or keyboard commands for at least a minute or more than a hang dump may be required to troubleshoot the issue and can be captured using the steps below. The hang dump is a point in time capture and must be performed after the hang has occurred. Do not perform the steps to capture a hang dump before the problem has occurred, but after the Outlook.exe process has hung.

To capture a Hang Dump type the following:

cscript adplus.vbs -hang -pn Outlook.exe -o c:\adplus
Note: A WARNING window will pop-up regarding debugging symbols - click OK
Note: It is best to take three different Hang Dumps usually 30-60 seconds apart from each other.

4. Do not interfere with the windows that are opened, just let it run minimized.

5. You will not be able to log off the system while you are monitoring.

6. After the hang/crash occurs, please zip and send the contents of the c:\adplus directory.

If help is required with these procedures, please open a support case.

How to do nested table in ssrs

Option 1: SSRS Grouping

Option 2: Sub-report - this option can handle more complicated situations.

http://stackoverflow.com/questions/2261004/sql-reporting-nested-table-data

Monday 17 October 2011

Sencha - great for making mobile phone apps

Sencha provides JavaScript web app frameworks and tools to develop rich web apps based on HTML5. - Cached

Sunday 16 October 2011

Intergen Wellington tfs migration - new server folder

wlgtfs1v:8080/tfs/new_tfs1 = (On old server) wlgtfs1
wlgtfs1v:8080/tfs/old_tfs1 = (On old server) wlgtfs2

Manifest file = Program Meta data.

Manifest file = Program Meta data.

How to apply an annual leave/holiday in Intergen

http://kernel2.intergen.org.nz/teams/Corporate%20Services/Application%20Forms/Forms/AllItems.aspx

Annual leave calculation, Holiday calculation

4 weeks annual leave / 52 weeks = 0.0769 annual leave week per working week = 3.077 annual leave hours per week = roughly 12 annual leave hours per month

OR

11.5 hours per month on average roughly. (Averaged from 3 of my pay slips)

Saturday 15 October 2011

ELIZA an early example of primitive natural language processing

ELIZA is a computer program and an early example of primitive natural language processing and AI.

http://en.wikipedia.org/wiki/ELIZA

Thursday 13 October 2011

Things learnt 13/10/2011

Green sleeves song is the ice cream truck sound.

harmonica = 口琴

acoustic guitar (Under $200 is a very cheap guitar)
Electric guitar (Easy to learn)
Bass Guitar

How to make estimation?

* Don't change on your estimation
* Give assumptions and if the assumption breaks, re-estimate.

Wednesday 12 October 2011

How to deal with bitch customers?

How to register Window Eventlog sources.

The issue:
I use the following code to register a windows eventlog source in code. It worked in the dev environment but not in UAT or PROD

// Create the source, if it does not already exist.
if(!EventLog.SourceExists("MySource"))
{
//An event log source should not be created and immediately used.
//There is a latency time to enable the source, it should be created
//prior to executing the application that uses the source.
//Execute this sample a second time to use the new source.
EventLog.CreateEventSource("MySource", "MyNewLog");
Console.WriteLine("CreatedEventSource");
Console.WriteLine("Exiting, execute the application a second time to use the source.");
// The source is created.  Exit the application to allow it to be registered.
return;
}

// Create an EventLog instance and assign its source.
EventLog myLog = new EventLog();
myLog.Source = "MySource";

// Write an informational entry to the event log.    
myLog.WriteEntry("Writing to event log.");

The Cause:
Permission! The app is run as a scheduled task. It turns out the account the app is running under is no enough for creating a eventlog source. And windows keeps silent about it.

The Solution:
You can add a eventlog source directly into the registry. Best of all when you deploy, you can just export and import the registry.
HKEY_LOCAL_MACHINE
SYSTEM
CurrentControlSet
Services
Eventlog

http://msdn.microsoft.com/en-us/library/windows/desktop/aa363648(v=vs.85).aspx

定语和补语的区别

定语是形容名词的,有前置定语和后置。补语一般修饰一句话,起补充说明的作用。区别他们,你就把句子成分分一下,把所以修饰的词去掉,不该变句子意思的就是定语,少了成分的就是补语!

Tuesday 11 October 2011

windows service vs windows scheduled tasks

In general, I prefer windows scheduled tasks as long as the running frequency is less frequent than once every 30 seconds. I.e. more than 30 seconds between two consequent tasks.

windows scheduled tasks
* Easy to debug
* Easy to setup
* Can be run in silent mode, i.e. no console window flashes every time when the program is run.

windows service
* Run in background by default
* Can start and stop the service in the windows services.exe
* Can be run very frequently

Hide Console Window in C# Console Application; Run console application in a silent mode, KeepAlive Application or Service

The problem:
I created an window console application and run it as a windows scheduled task. But the console window flashes and goes back every time the app is run.

The solution
Option 1: (Best Option)
Change the output type from Console Application to Windows Application. This can be done under Project -> Properties -> Application in Visual Studio:

Option 2: Make a window service app using windows servicebase class

Monday 10 October 2011

Outlook for Microsoft dynamics crm add-in will not install, Crm outlook client

One of the reasons can be some other Microsoft or Non-Microsoft add-ins is interfering with the install process.

To disable outlook add-in.

In outlook 2010, Outlook Options -> Add-Ins -> Click on "go" next to Manage COM Add-ins

In outlook 2007, Trust Center -> Click on "go" next to Manage COM Add-ins

Often forgotten added dll references and namespace, Crm gotyas

using System.Web.Services.Protocols; // for SoapException

System.Web.Services dll and a references

Sunday 9 October 2011

Intellisense not working in Visual Studio 2008

Since I upgraded my VS2008 Beta2 to the RTM, the intellisense has not been working. I have seen a few posts about this, some suggesting you need to reset the configuration by running

devenv.exe /safemode

(see http://msdn2.microsoft.com/en-us/library/ms241278(VS.80).aspx)

but this did not work for me.

So I had a poke about in Tools|Option and found that on the Text Editor|All Languages that the three checkboxes for Statement Completion where showing neither empty or checked but a fully coloured box - which usually means an unknown settings. So a set these all to checked (a tick) and my Intellisense started working.

http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2007/12/01/intellisense-not-working-in-visual-studio-2008.aspx

Thursday 6 October 2011

Monday 3 October 2011

Extract Plugins Crm utility

http://blogs.infinite-x.net/free-utilities/

Saturday 1 October 2011

Thursday 29 September 2011

Cascade link type 'NoCascade' is invalid for Delete. while importing customizations

If rollups installing/uninstalling does not helps, try exucute this sql on your _mscrm database:

UPDATE [dbo].[RelationshipView] SET [CascadeDelete] = 2
WHERE [IsCustomRelationship] = 0 AND [CascadeDelete] = 0

Crm routing check

* rollup matches?
* can import customization with out issue
* all code builds

Wednesday 28 September 2011

New EA wiki tips and tricks

http://eawiki/TipsAndTricks.ashx
Nav Solution wiki template
Create a client page first with client short code e.g. WAIMIL
Create a solution page name in this format {client short code]_[Project Name] e.g. WAIMIL_CRM

What to do in the handover process?

The following tells you what to do in the handover process

The main theme is that when a request coming, you know enough to do your job. where the server is. How to compile all the code? How to deploy? Know who to ask for support, e.g. infrastructure support.

Initial meeting -> Handover meetings -> Handover closer meeting

* Initial meeting. Who is who? What is our goals?

* Another way to think about it. Where is the test? The test scripts will tell the business process.

* When will the warranty period finish? Who will determine if the case come to Management Services or the Delivery team?

* Wiki page requirement: This documentation should be completed to a level where a developer could setup a development environment, make changes, test and release the changes to UAT and Live. Use the Support Handover questions to guide you in the sort of information required.
+ Where is the code in tfs
+ Grant us sufficient tfs permission and remove permission of developer.

* We must retain all project documentation plus the dev environment. Not allow the delivery team to delete anything.

* Dev environment - Can the dev environment be setup successfully by import customisation or import org?

* Seen through the code and see the code in action in its environment/platform

* Find out the overall business process with the requirements in mind.

* Where are the servers?

* Where are the environment?

* Solution diagram

* How do the users use the system? For example, A CERA user creates an contact -> A CETAS user ticks an assessment check box -> Hit save -> A workflow will generate a household record automatically.

* Be careful with any SHARED projects or resources.

* All the Source Code is checked in, can be built successfully and deploy successfully too. Basically, the entire source code base need to be downloaded to a separated computer and build and deploy.

Sunday 25 September 2011

Fixed my roof from leaking.

The tile is made of concrete

The Ridges are made of Mortar. Mortar is like concrete but finer.

Chimney's cap is called cowling

Edward's & hardy is only doing cleaning and re-paint which need to be re-done every three years.
Re-coating however will last 30 years. Jeremy is using a industry coating which is really good.

Cladding = external wall.

A chimney pipe is called flute. Chimney has outer flute, middle flute and internal flute.

-----Key Words / Terminology-------

Ridge

Chimney cowling

Mortar

concrete

re-coating - booking immediately after Christmas for a March job.

clean and re-spay

Saturday 24 September 2011

How to Parallel Park

Start position: Your car should be 30 cm away from the car, will be in front of you, in parallel. The rear wheel of your car should be next to the rear wheel of the "front" car approximately.



Turn sharp to the left.

Back in slowly

Once you back passenger door is even with the rear bumper of the "front" car, turn the steering wheel back to straight up the car.

Continue reverse straightly until the curb just disappeared from your side mirror.
--OR--
Continue reverse straightly until the rear wheel facing the curb is nearly as close as the final distance desired from it (no more than 1 foot (30 cm) ultimately being desirable) and the rear end of the car is still a few feet (about a meter) from the car behind. Use the side mirror to check the position of the panel top of you rear wheel to determine you position. A rule of thumb is that if the curb disappears in the mirror when they are pointed down, you are probably too close to the curb.

Turn to the right sharply until the car parallel to the curb.

Tips:
Be careful not to cut it too soon or too quickly, as this will result in being too far away from the curb. It is much harder to adjust your position in a space when you are too far away from the curb as opposed to being too close.

If you are parking in an area with shops, take advantage of the eventual reflection of your car in shop windows.

When backing up and lining up the cars, look in the driver's side mirror, and use the sides of the cars to know exactly how far your car has gone in towards the curb. I.e. how closely you've aligned them. That view of the sides of the cars (your car and the one behind you) offers a good easy view and check to know that you've positioned the car correctly. In particular, the side of your car above the rear wheels offers the best, most accurate view of where exactly your car is.

http://www.youtube.com/watch?v=TMrO_-bsooQ&feature=player_embedded

http://www.videojug.com/film/parallel-parking-4

Tuesday 20 September 2011

What is WPF DependencyProperty?

When you register a DependencyProperty you provide a callback to be called when the value changes.

Here (http://wpftutorial.net/DependencyProperties.html) you have more details. I don't think anything else is public about the internals of WPF. I might be wrong.

JK Rowling Harvard Speech Quotes

Failure means striping way of the inessential. I was stopped pretending to myself I was anything other than what I was. And began to direct all my energy into finishing the only work matter to me. The rock bottom become the solid foundation.

-- J.K. Rolling

Monday 19 September 2011

Roof contractors Wellington

http://roofandpaint.co.nz/roofcoatings.html

http://www.edwardsandhardy.co.nz/index2.html

Cancelling workflows via the SDK

Hi guys,

Quick query

Does anyone know if it’s possible to cancel workflows via the SDK in CRM 2011? I find this hugely useful for cancelling long running workflows when a contacts state changes.

The CRM 4.0 code has been changed to crm 2011 style and throws the error:

[System.ServiceModel.FaultException] = {"The 'SetStateDynamicEntity' method does not support entities of type 'asyncoperation'."}


SetStateRequest request = new SetStateRequest();
request.State = new OptionSetValue(3); // completed
request.Status = new OptionSetValue(AsyncOperationStatus.Canceled);
request.EntityMoniker = new EntityReference("asyncoperation", singleWorkflowInstance.Id);
SetStateResponse updated = (SetStateResponse) CRMInstance.Execute(request);


Got it guys:

Set state is not supported, but strangely a manual update works:

Entity workflowToCancel = new Entity("asyncoperation");

workflowToCancel.Id = workflowID;
workflowToCancel["statecode"] = new OptionSetValue(3);
workflowToCancel["statuscode"] = new OptionSetValue(32);

myCRMService.Update(workflowToCancel);

I eventually found this article on it which mentioned that an update works

http://www.resultondemand.nl/support/sdk/78340765-afb7-47eb-a024-6c2dfd41cd6f.htm#bkmk_retrieve

possible statuscodes:

Canceled = 32;
Canceling = 22;
Failed = 31;
InProgress = 20;
Pausing = 21;
Succeeded = 30;
Waiting = 10;
WaitingForResources = 0;

Not sure on the rest of the state codes but I’m sure they would be reasonably simple

Saturday 17 September 2011

How to improve concentration?

怎样思想集中
1。集中力是要有精神力,然后对事物的集中还需要你对它的一定兴趣度。另外要心境平和,练瑜伽,定时间看算术量都可以。(一定要精力充沛)
2。意志力我建议是长跑,爬山这类耗体能的锻炼,而且需要有人陪同,互相鼓励,同时也是竞争,这样效果不错。

保持良好的注意力,是大脑进行感知、记忆、思维等认识活动的基本条件。在我们的学习过程中,注意力是打开我们心灵的门户,而且是唯一的门户。门开得越大,我们学到的东西就越多。而一旦注意力涣散了或无法集中,心灵的门户就关闭了,一切有用的知识信息都无法进入。正因为如此,法国生物学家乔治.居维叶说:“天才,首先是注意力。”

在正常情况下,注意力使我们的心理活动朝向某一事物,有选择地接受某些信息,而抑制其它活动和其它信息,并集中全部的心理能量用于所指向的事物。因而,良好的注意力会提高我们工作与学习的效率。注意力障碍,主要表现为无法将心理活动指向某一具体事物,或无法将全部精力集中到这一事物上来,同时无法抑制对无关事物的注意。造成这种情况的原因比较复杂,许多较严重的心理障碍都可以引起注意力障碍。而对于学生来说,主要是由于学习负担重,心理压力过大,而造成高度的紧张和焦虑,从而导致了注意力无法集中的障碍。另外,睡眠不足,大脑得不到充分休息,也可能出现注意力涣散的情况。

因此,当你因注意力无法集中而影响学习,倍感苦恼时,不妨采用以下方法来矫治:

(1)、养成良好的睡眠习惯

一些同学因学习负担重,因此,一到晚上便贪黑敖夜,有的同学甚至在宿舍打电筒读书,学到深夜;有的同学不能按时睡眠,在宿舍和同学闲聊等等。结果早晨不能按时起床,即便勉强起来,头脑也是昏沉沉的,一整天都打不起精神,有的甚至在课堂上伏桌睡觉。作为学生,主要的学习任务要在白天完成,白天无精打采,必然效率低下。所以,如果你是“夜猫子”型的,奉劝你学学“百灵鸟”,按时睡觉按时起床,养足精神,提高白天的学习效率。

(2)、学会自我减压

高中学生的学习任务本来就很重,老师、家长的期望,又给同学们心理加上一道法码;一些同学自己对成绩、考试等看得很重,无异是自己给自己加压,必然不堪重负,变得疲惫、紧张和烦躁,心理上难得片刻宁静。因此,我们要学会自我减压,别把成绩的好坏看得太重。一分耕耘,一分收获,只要我们平日努力了,付出了,必然会有好的回报,又何必让忧虑占据心头,去自寻烦恼呢?

(3)、做些放松训练

舒适地坐在椅子上或躺在床上,然后向身体的各部位传递休息的信息。先从左脚开始,使脚部肌肉绷紧,然后松驰,同时暗示它休息,随后命令脚脖子、小腿、膝盖、大腿,一直到躯干部休息,之后,再从脚到躯干,然后从左右手放松到躯干。这时,再从躯干开始到颈部、到头部、脸部全部放松。这种放松训练的技术,需要反复练习才能较好地掌握,而一旦你掌握了这种技术,会使你在短短的几分钟内,达到轻松、平静的状态。

(4)、做些集中注意力的训练

我国年轻的数学家杨乐、张广厚,小时候都曾采用快速做习题(e.g.编程习题)的办法,严格训练自己集中注意力。这里给大家介绍一种在心理学中用来锻炼注意力的小游戏。在一张有25个小方格的表中,将1-25的数字打乱顺序,填写在里面,然后以最快的速度从1数到25,要边读边指出,同时计时。

研究表明:7-8岁儿童按顺序导找每张图表上的数字的时间是30-50秒,平均40-42秒;正常成年人看一张图表的时间大约是25-30秒,有些人可以缩短到十几秒。你可以自己多制做几张这样的训练表,每天训练一遍,相信你的注意力水平一定会逐步提高。“培养良好注意品质,提高学生学习成绩”

第二阶段:

注意力的集中作为一种特殊的素质和能力,需要通过训练来获得。那么,训练自己注意力、提高自己专心致志素质的方法有哪些呢?

方法之一:运用积极目标的力量

这种方法的含义是什么?就是当你给自己设定了一个要自觉提高自己注意力和专心能力的目标时,你就会发现,你在非常短的时间内,集中注意力这种能力有了迅速的发展和变化。

同学们要在训练中完成这个进步。要有一个目标,就是从现在开始我比过去善于集中注意力。不论做任何事情,一旦进入,能够迅速地不受干扰。这是非常重要的。比如,你今天如果对自己有这个要求,我要在高度注意力集中的情况下,将这一讲的内容基本上一次都记忆下来。当你有了这样一个训练目标时,你的注意力本身就会高度集中,你就会排除干扰。

同学们知道,在军事上把兵力漫无目的地分散开,被敌人各个围歼,是败军之将。这与我们在学习、工作和事业中一样,将自己的精力漫无目标地散漫一片,永远是一个失败的人物。学会在需要的任何时候将自己的力量集中起来,注意力集中起来,这是一个成功者的天才品质。培养这种品质的第一个方法,是要有这样的目标。

方法之二:培养对专心素质的兴趣

有了这种兴趣,你们就会给自己设置很多训练的科目,训练的方式,训练的手段。你们就会在很短的时间内,甚至完全有可能通过一个暑期的自我训练,发现自己和书上所赞扬的那些大科学家、大思想家、大文学家、大政治家、大军事家一样,有了令人称赞的注意力集中的能力。

同学们在休息和玩耍中可以散漫自在,一旦开始做一件事情,如何迅速集中自己的注意力,这是一个才能。就像一个军事家迅速集中自己的兵力,在一个点上歼灭敌人,这是军事天才。我们知道,在军事上,要集中自己的兵力而不被敌人觉察,要战胜各种空间、地理、时间的困难,要战胜军队的疲劳状态,要调动方方面面的因素,需要各种集中兵力的具体手段。同学们集中自己的精力,注意力,也要掌握各种各样的手段。这些都值得探讨,是很有兴趣的事情。

方法之三:要有对专心素质的自信

千万不要受自己和他人的不良暗示。有的家长从小就这样说孩子:我的孩子注意力不集中。在很多场合都听到家长说:我的孩子上课时精力不集中。有的同学自己可能也这样认为。不要这样认为,因为这种状态可以改变。

如果你现在比较善于集中注意力,那么,肯定那些天才的科学家、思想家、事业家、艺术家在这方面还有值得你学习的地方,你还有不及他们的差距,你就要想办法超过他们。

对于绝大多数同学,只要你有这个自信心,相信自己可以具备迅速提高注意力集中的能力,能够掌握专心这样一种方法,你就能具备这种素质。我们都是正常人、健康人,只要我们下定决心,不受干扰,排除干扰,我们肯定可以做到高度的注意力集中。希望同学们对自己实行训练。经过这样的训练,能够发生一个飞跃。

方法之四:善于排除外界干扰

要在排除干扰中训练排除干扰的能力。毛泽东在年轻的时候为了训练自己注意力集中的能力,曾经给自己立下这样一个训练科目,到城门洞里、车水马龙之处读书。为了什么?就是为了训练自己的抗干扰能力。同学们一定知道,一些优秀的军事家在炮火连天的情况下,依然能够非常沉静地、注意力高度集中地在指挥中心判断战略战术的选择和取向。生死的危险就悬在头上,可是还要能够排除这种威胁对你的干扰,来判断军事上如何部署。这种抗拒环境干扰的能力,需要训练。

我在你们这么大的年纪时曾有意做过这种训练。就是不管环境多么嘈杂,当我进入我要阅读和学习的科目时,对周围的一切因素置若罔闻。这是可以训练成功的。

方法之五:善于排除内心的干扰

在这里要排除的不是环境的干扰,而是内心的干扰。环境可能很安静,在课堂上,周围的同学都坐得很好,但是,自己内心可能有一种骚动,有一种干扰自己的情绪活动,有一种与这个学习不相关的兴奋。对各种各样的情绪活动,要善于将它们放下来,予以排除。这时候,同学们要学会将自己的身体坐端正,将身体放松下来,将整个面部表情放松下来,也就是将内心各种情绪的干扰随同这个身体的放松都放到一边。常常内心的干扰比环境的干扰更严重。

同学们可以想一下,在课堂上,为什么有的同学能够始终注意力集中呢?为什么有的同学注意力不能集中呢?除了有没有学习的目标、兴趣和自信之外,还有一个就是善于不善于排除自己内心的干扰。有的时候并不是周围的同学在骚扰你,而是你自己心头有各种各样浮光掠影的东西。要去除它们,这个能力是要训练的。如果你就是想浑浑噩噩、糊糊涂涂、庸庸俗俗过一生,乃至到了三十岁还要靠父母养活,或者你就是想混世一生,那你可以不训练这个。但是,如果你确实想做一个自己也很满意的现代人,就要具备这种事到临头能够集中自己注意力的素质和能力,善于在各种环境中不但能够排除环境的干扰,同时能够排除自己内心的干扰。

方法之六:节奏分明的处理学习与休息的关系

同学们千万不要这样学习:我这一天就是复习功课,然后,从早晨开始就好像在复习功课,书一直在手边,但是效率很低,同时一会儿干干这个,一会儿干干那个。十二个小时就这样过去了,休息也没有休息好,玩也没玩好,学习也没有什么成效。或者,你一大早到公园念外语,坐了一个小时或两个小时,散散漫漫,说念也念了,说不念也跟没念差不多,没有记住多少东西。这叫学习和休息、劳和逸的节奏不分明。正确的态度是要分明。那就是我从现在开始,集中一小时的精力,比如背诵80个英语单词,看我能不能背诵下来。高度地集中注意力,尝试着一定把这些单词记下来。学习完了,再休息,再玩耍。当需要再次进入学习的时候,又能高度集中注意力。这叫张弛有道。一定要训练这个能力。永远不要熬时间,永远不要折磨自己。一定要善于在短时间内一下把注意力集中,高效率地学习。要这样训练自己:安静的时候,像一棵树;行动的时候,像闪电雷霆;休息的时候,流水一样散漫;学习的时候,却像军事上实施进攻一样集中优势兵力。这样的训练才能使自己越来越具备注意力集中的能力。

方法之七:空间清静

这个方法,非常简单,当你在家中复习功课或学习时,要将书桌上与你此时学习内容无关的其他书籍、物品全部清走。在你的视野中,只有你现在要学习的科目。这种空间上的处理,是你训练自己注意力集中的最初阶段的一个必要手段。同学们常常会发现这样生动的场面,你坐在桌子前,想学数学了,这儿有一张报纸,本来是垫在书底下的,上面有些新闻,你止不住就看开了,看了半天,才知道我是来学数学的。一张报纸就把你牵挂走了。或者本来你是要学习的,桌子一角的小电视还开着呢,看着看着,从数学王国出去了,到了张学友那儿了。这是完全可能的。甚至可能是一个小纸片,上面写着什么字,看着看着又想起一件事情。

所以,作为训练自己注意力的最初阶段,做一件事情之前,首先要清除书桌上全部无关的东西。然后,使自己迅速进入主题。如果你能够做到一分钟之内没有杂念,进入主题,你就了不起。如果你半分钟就能进入主题,就更了不起。如果你一坐在那里,十秒、五秒,当下就进入,那就是天才,那就是效率。有的人说,自己复习功课用了四个小时,其实那四个小时大多数在散漫中、低效率中度过,没有用。反之,你开始学习,一坐在那里,与此无关的全部内容置之脑外,这就是高效率。

方法之八:清理大脑

收拾书桌是为了用视野中的清理集中自己的注意力,那么,你同时也可以清理自己的大脑。你经常收拾书桌,慢慢就会有一个形象的类比,觉得自己的大脑也像一个书桌一样。

大脑是一个屏幕,那里面也堆放着很多东西,一上来,将在自己心头此时此刻浮光掠影活动的各种无关的情绪、思绪和信息收掉,在大脑中就留下你现在要进行的科目,就像收拾你的桌子一样。

同学们,这样的训练希望你们从今天开始就要做,它并不困难。当你将思想中的所有杂念都去除的时候,一瞬间你就进入了专一的主题,你的大脑就充分调动起来,你才有才智,你才有发明,你才有创造,你才有观察的能力、记忆的能力、逻辑推理的能力和想象的能力。如果不是这样,你坐在那里,十分钟之内脑袋瓜里还是车水马龙,还是风马牛不相及,还是天南海北,那么这十分钟是被浪费掉的。再有十分钟,不是车水马龙了,但依然是熙熙攘攘的街道,又十分钟过去了。到最后学习开始了,难免三心二意,效率很低。这种状态我们以后不能再要了,要善于迅速进入自己专心的主题。

方法之九:对感官的全部训练

我们讲了清理自己的书桌,其实更广义说,我们可以进行视觉、听觉、感觉方方面面的类似训练。同学们可以训练自己在视觉中一个时间内盯视一个目标,而不被其他的图像所转移。你们可以训练在一段时间内虽然有万千种声音,但是你们集中聆听一种声音。你们也可以在整个世界中只感觉太阳的存在或者只感觉月亮的存在,或者只感觉周围空气的温度。这种感觉上的专心训练是进行注意力训练的有用的技术手段。

方法之十:不在难点上停留

同学们都会意识到,我们理解的事物、有兴趣的事物,当我们去探究它、观察它时,就比较容易集中注意力。比如说我喜欢数学,数学课就比较容易集中注意力,因为我理解,又比较有兴趣。反之,因为我不太喜欢化学,缺乏兴趣,对老师讲的课又缺乏足够的理解,就有可能注意力分散。

在这种情况下,我们就有了正反两个方面的对策。正的对策是,我们要利用自己的理解力、利用自己的兴趣集中自己的注意力。而对那些自己还缺乏理解、缺乏兴趣的事物,当我们必须研究它、学习它时,这就是一个特别艰难的训练了。

首先,同学们听老师讲课的过程中,出现任何不理解的环节,你不要在这个环节上停留。这一点不懂,没关系,接着听老师往下讲课。你在研究一个事物的时候,这个问题你不太理解,不要紧,你接着往下研究。你读一本书的时候,这个点不太理解,你做了努力还不太理解,没关系,放下来,接着往下阅读。千万不要被前几页的难点挡住,对整本书望而止步。实际上,在你往下阅读的过程中可能会发现,后边大部分内容你都能理解。前边这几页你所谓不理解的东西,你慢慢也会理解。

如果你对这些内容还缺乏兴趣,而你有必要去研究它和学习它,那么,你就要这样想,兴趣是在学习、掌握和实践的过程中逐步培养的。

http://www.eastudy.com/blog/more.asp?name=%C7%F3%D6%AA&id=149
参考资料:http://www.sunwang.cn/wz/lw/wxll/200510/909.html
参考资料:http://zhidao.baidu.com/question/1493723.html


1.专稿】据调查,"孩子注意力不集中",是使许多父母头痛的问题,要矫正此毛病,可从孩子的健康情况、个性及家庭环境入手。

研究显示,孩子分心的程度与年龄成反比:两岁的儿童,平均注意力集中的时间长度为七分钟;四岁为十二分钟,五岁为十四分钟。孩子年龄越大越会逐渐懂得将注意力放在重要的事情上,而日渐增加专注的时间。因此,判断孩子是否专心,应依据其年龄的专心时间长度,而非依据家长的主观感觉。

孩子不专心,通常表现为两种情况:其一是注意力飘浮不定,专注的目标会经常转移;其二是心不在焉,常沉浸于白日梦而忘记眼前的事情,后者其实不是注意力不集中的孩子,只是将注意放错。只要家长用心纠正,使他们将心事转移到主要事情上去,往往会有惊人的表现和成就。注意力不集中的原因甚多,在生理方面,孩子若身体不适,警力或知觉发展不良,天生好动,以及神经系统或大脑微功能发生问题时,都会出现注意力不集中的现象,这些情况都必须由医生检查和治疗。 此外,心理上的安全感和自信心不足,过分依赖、缺乏耐心或情绪困扰,亦是注意力不集中的原因。这些情况大多数是教育方式和成长的环境所造成的。 除了解决生理上的问题外,家长应该认识到,专心其实是一种可以训练、学习和培养的行为习惯。因此在埋怨孩子不专心的同时,亦要反省自己有无不对之处。

例如,孩子玩游戏时全身投入,正是在培养聚精会神的习惯,此时家长切不可任意打扰、干涉和打断。平时家长可以将游戏时间与日常生活配合恰当,并指定一个固定的玩游戏的角落,将环境安排得有条不紊,以减少孩子分心的外界事物。家长亦切勿要求孩子做不感兴趣或超过能力所及的事。以免他们借着不断变换活动来逃避大人的责备。

此外,家中的气氛亦必须稳定,避免经常搬家及家中太多的人出入。亦切忌同时买太多的玩具及图书给孩子;使他们左顾右盼,不知所措,而无从培养仔细、有耐心、反复和专注一件物件的习惯。

家长应该以身作则,表现出专心、坚持和耐心的榜样。一但发现孩子有专心的表现,更应加以鼓励和称赞。

Friday 16 September 2011

WPF markup extensions


is called a markup or markup tag
{StaticResource ...} is called a markup extension

Markup extension enables the XAML parser to translate value to primitives or objects. There two major categories of extensions: XAML-Defined Markup Extensions and WPF-Specific Markup Extensions

XAML-Defined Markup Extensions
x:Type
x:Static
x:Null
x:Array

WPF-Specific Markup Extensions (Listed 3 most important extensions below)
StaticResource
DynamicResource
binding

http://msdn.microsoft.com/en-us/library/ms747254.aspx

Thursday 15 September 2011

Intergen vm platform setup process

* Use a VM Requirement template to specify the VM requirement
* Ask Resource Manager to review and raise a case with IS to setup the VM.

Rubik's cube ALGORITHMS and theory

-LIST OF ALGORITHMS-

1) Fi U Li Ui (right place face wrong side - first layer edge)

2) Ri Di R D (repeat six times then the cube will return to its original position)
also for resolve RIGHT side corner piece for the first layer.

3) U R Ui Ri Ui Fi U F (Middle layer - go right)

4) Ui Li U L U F Ui Fi (Middle layer - go left)

5) F R U Ri Ui Fi (L on the up left hand of the face than use this to turn L to 1)

6) R U Ri U R U U Ri (when cross is formed on the last layer. color match one directly opposite me and one on the right side then use this)

7) U R Ui Li U Ri Ui L (Hold the correct corner on the bottom right then do this. Should not be more than twice.)

8) Ri Di R D (to solve piece on the bottom right corner and do this

-Theory-
commutator - http://www.ryanheise.com/cube/commutators.html
group theory - http://en.wikipedia.org/wiki/Group_theory
http://www.youtube.com/watch?v=7yZoDi_B1lI