Monday, April 28, 2014

Microsoft Excel Bar/Column Chart Patterns

It is possible to create GNUPlot style bar charts with patterns (shown below)  in Excel.


As discussed in Reference 2, for Excel 2007 you need to download the excel macro file "Pattern Fill Add-In". The usage instructions are provided in Reference 1.

References:
1. http://www.andypope.info/charts/patternfills.htm
2. http://answers.microsoft.com/en-us/office/forum/office_2007-excel/excel-2007-bar-chart-shading/99bab79a-e600-4bbe-a08e-448363d3173d

Microsoft Excel Clustered-Stacked Column/Bar Chart

We can create clustered-stacked column/bar charts -- like those shown below (taken from Reference 1) -- in Excel. It is doable, but the process involves many steps. Follow the instructions in Reference 1.


At one point, the instructions say - "Copy the range, and use paste special to add this data to the chart as a new series", for this if using Excel 2007 you need to click the 'Home' tab on the ribbon, click the 'Paste' drop-down arrow and choose 'Paste Special'.

References:
1. http://peltiertech.com/WordPress/clustered-stacked-column-bar-charts/
2. http://www.mrexcel.com/forum/excel-questions/559998-charts-add-new-data-copy-paste-special.html

Tuesday, April 8, 2014

Changing Windows Internet time synchronization frequency

You might come across situations when you need multiple Windows machines to have their times synchronized. You could setup time synchronization protocols between the machines, making one as the master and the others as slaves.

An easier alternative is to sync all the machine times to Internet times - the NIST time or Windows server time available by default in the Date & Time settings. Once you sync the machines with the Internet time, the machines might start drifting away over a period. Hence Windows periodically syncs the times with the Internet time; however, the default sync duration ranges from few days to weeks.

You can make the time sync happen much more frequently - like few hours. To do this, you need to make system registry changes. The following instructions are for Windows XP machine; for other versions, the process might be similar.

1. Go to Start-> Run and type "regedit" to open the registry settings.

2. Navigate to the following in the Registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient

3. The parameter you need to change is SpecialPollInterval
Right click on 'SpecialPollInterval' in the right hand column and select Modify>Decimal. The decimal number is in seconds. For example, you can set it to 86400 to mean 24 hours.

NOTE: Please backup the Registry beforehand to avoid any issues later (I do not know how this can be done).

Reference:
1. http://www.tomshardware.com/forum/55562-45-changing-frequency-internet-time-synchronisation 

Sunday, April 6, 2014

English words present in dictionary for Python use

A good resource of English words available in English dictionary is WordNet by Princeton University. Though its primary usage is not for getting the list of English words and their meanings, you can still get that information from WordNet.

Either you could download the WordNet database and do the parsing yourself (or using other pre-existing Python scripts), or use the NLTK natural language processing toolkit in Python. The toolkit provides instructions for using wordnet at WordNet Interface.

You could also use the PyEnchant spell checking library available for Python. Using this you can check whether a word is acceptable as per a specific English dictionary, though you won't get the word meanings.

As stated in [2], the word coverage in WordNet is not complete, but it is very useful. Depending on the use case, one option can be preferred over the other.

References:
1. http://www.velvetcache.org/2010/03/01/looking-up-words-in-a-dictionary-using-python
2. http://stackoverflow.com/questions/3788870/how-to-check-if-a-word-is-an-english-word-with-python
3. http://www.nltk.org/howto/wordnet.html
4. http://pythonhosted.org/pyenchant/