Finding Tables with Primary Keys but without Clustered Index


Well-written Tomcat Installation Note

This is by far one of the most well-written easy-to-follow installation/configuration notes that covers multiple platforms.

Fixing IP Conflict issue in Windows when using iPhone/iPad as hotspot


Lately my Windows machine starts complaining IP conflict when I use my iPhone or iPad as mobile hotspot, but after I disabled the IPv6 in the particular connection, the problem goes away.  Thanks Doug.

To disable IPv6

  • Go to Control Panel -> Network and Sharing Center
  • Click on “Change adapter settings” on the left
  • Look for the connection that is relevant to the iPhone connection, double click on it
  • Click Properties
  • Uncheck the item “Internet Protocol Version 6 (TCP/IPv6)
  • OK all the way out, and enjoy the IP conflict free environment again.

Mass Rename Files in Mac

for i in *.yourfiles; do mv "$i" "`echo $i | sed 's/old/new/g'`"; done 

To make the above script more usable, for create a little script in ~/bin named rename, in the script, use the following:

#!/usr/bin/env zsh
for i in $@; do mv $i `echo "$i" | sed $SUBSEXPR`; done

Then in the future, rename files with the following usage:

rename 's/old/new/' *.files

Inspired from:

Illustrator Time Saver Tip: Paste Remembers Layers

I always love organizing my Illustrator design with layers and symbols, with the right hierarchy of layering, I can easily move or transform any groups of art.  One thing keeps baffling me is that every time I copy and paste layers of art, Illustrator would flatten all the layers.  This is like removing all the folders and shelves which help neatly partition the papers.

It was not until today I came to realized that Illustrator does provide an option to retain the layers, the option is named “Paste Remembers Layers”.  It can be activated through clicking on the option menu of the Layer panel.

I wonder if Adobe has any reason not turning this option on by default, but in case anyone from Adobe cares, please … this saves time and lives.


Update:  There is one major drawback of the “Paste Remembers Layers” option – any paste executed would be pasted as top-level layer.  In other words, if one wishes to paste a set of layers inside another layer, one would have to paste and then move the newly-pasted top-level layers into the desired layer.  Rats.


Greyed out files in Mac OS/X

I have long been baffled by a particular external hard drive of mine which consist a few random files which are greyed out.  I cannot see any abnormality via File Info in Mac or Windows, and most Google search returned solutions that don’t work at all.  Worst of all, if I try to “hack” it by moving the file to another location, I end up losing the file entirely!

Finally, a little digging in “Terminal” using ls -la command, I discovered those greyed out files having an attribute of -rwxrwxrwx@, ah ha, the “@” might be all the culprit.  Eventually I found out that stands for extended properties.  And to view the extended properties, I just need to use xattr -l filename command.  In my case, the greyed out files all have this weird attribute.  To remove that attribute, I run xattr -d filename, and the file is back to normal!

Infographics and Visualization for people who “give a damn” from Good, not to be confused with other “Good”, has collected a lot of good infographics over time. Some of them are interactive with a data backend, but more are pre-drawn visualizations. No matter how they are technically or artistically prepared, lots of inspirations can be drawn from them as they tell a better story than just a pie chart or d3js chart alone.


Get every new post delivered to your Inbox.

Join 390 other followers