Friday, March 25, 2011

CVS: merge changes in trunk to branch


After you have made some changes in the trunk, you can merge those changes into a branch with the following steps.

  • Tag the code before you make the changes in the trunk, e.g. TAG_TRUNK_BEFORE_CHANGES. (If you have forgot to do the tagging, see how to do it at the end.)
   cvs tag TAG_TRUNK_BEFORE_CHANGES
  • Change the code.
  • Tag the code after the changes in the trunk, e.g. TAG_TRUNK_AFTER_CHANGES.
   cvs tag TAG_TRUNK_AFTER_CHANGES
  • Check out the destination branch to which you want to merge the changes.
   cvs update -r DESTINATION_BRANCH
  • Merge the code.
   cvs update -j TAG_TRUNK_BEFORE_CHANGES -j TAG_TRUNK_AFTER_CHANGES

Remember to put the before-changes tag before the after-changes tag.
  • Verify the changes.
   cvs diff

It is likely that you have not made a tag before checking in the code changes in the trunk. If so, you can check out the code before the changes by using the date (e.g. 2011-01-23 12:34:56). Then tag it. After that, update to the latest from the trunk and continue, i.e.
  •    cvs update -D2011.01.23.12.34.56
  •    cvs tag TAG_TRUNK_BEFORE_CHANGES
  •    cvs update -A
  •    cvs tag TAG_TRUNK_AFTER_CHANGES

Friday, March 11, 2011

Random Posts Widget for Blogger


This widget is for Blogger.com. It randomly digs up your posts and lists them on every posts of your blog. This helps to give your old posts more exposure.

You can see the live example in the side bar (on the right side) of this page. Each time you reload the page, the Random Posts section displays the titles of different posts.

To install the widget, just click the icon below and follow the steps.


You will be prompted to login to Blogger if you are not.

By default, ten random posts are selected and shown. If you want a different number of posts, you can have it by doing a little change to the source code of the widget. Don't be worried, the change is very simple. Just follow these steps:
  1. Install the widget first.
  2. View your blog while you are logged-in.
  3. In the Random Posts section, click on the Edit icon.
  4. In the popped up dialog, you can see the source code of the widget. 
  5. Search for this statement -- numberOfPostsToShow12=10. It is at the very beginning of the code.
  6. Change 10 to the number you want. Save the change and you are done.
 If you mess up the code, don't worry, you can always remove the widget and reinstall it.

Monday, March 7, 2011

Find out what WiFi channels your neighbors use and avoid interference


As you may have known, it is recommended to choose a channel among 1, 6, 11 for your wireless network. You can also choose other channels and actually some people do. But that is not doing good to your and other wireless networks. Why 1, 6, 11 are recommended? Because these channels do not intervene with each other.

The air is getting more and more crowded. Chances are some of your neighbors have also installed wireless networks. You would want to find out which ones they use and choose a less intervened one for yours. In Windows, you can use this command to find out the wireless networks around you:

        netsh wlan show networks mode=bssid

We only care about the strength of the signals and their channels. If the list is very long, we can filter it:

        netsh wlan show networks mode=bssid | findstr "SSID Signal Channel"

If in your neighborhood, either channel 1 or 11 are not used, you are lucky. These two have the less interference from the other channels. It is very likely all the recommended 1, 6, 11 channels are used by some neighbors. Should we select another channel? It may not help because anyone of the rest can still get interference from these recommended channels. There is no ideal place to hide. It is better to pick one from the recommended three which has the weakest and least signals.

Friday, March 4, 2011

Google Dictionary and Google Translate extension is blocked by Flashblock


One of the feature, the whole page translation feature of the Google Dictionary and Google Translate extension for Firefox does not work when the Flashblock extension is installed and enabled. After some investigation, I found out that some functions of the Google Translate service is not working if the Flashblock extension is in effect. Our Google Dictionary and Google Translate extension can do no help on this situation but  you can solve this problem by making your Flashblock extension not block the Google services.

Fortunately, the Flashblock extension allows the users to provide a white list of the web sites that it will not block. You can input google.com to the list. That would work for the U.S. users. If you are outside of U.S., chances are that Google may localize its web site for you. For example, if you are in Canada, you should input google.ca. You can add both to the white list just to be safe:

google.ca
google.com

Thanks to Ch for reporting this problem.

Update: You would have to add googleapis.com to the white list as well (please read Ch's comments).
 
Get This <