Skip to main content

Posts

Showing posts from March, 2012

Apple TV3 - Review of Apple TV (March 2012)

Apple is all about quality products and intutive design. Not so far is Mr.Apple TV. Not sure still why the Internet TV revolution is still not caught up, but there is great opportunity out there. Thought of putting forward my review about latest Apple TV, released in March 2012. (let's call it Apple TV3) Some details which could be interesting for you Size and Weight Height: 23 mm (0.9 inches) Width: 98 mm (3.9 inches) Depth: 98 mm (3.9 inches) Weight: 0.27 kg (0.6 pounds)1 Detailed specs:  http://www.apple.com/uk/appletv/specs.html Some tech details 1080 full HD support, airplay full support even with new ipad , use facility of Apple Cloud etc.. Sleek design that’s small, quiet, and energy efficient. (less than 6W) Video formats supported: H.264; M-JPEG; MPEG4 ..m4v, .mp4 and .mov. Hence youtube, high quality movies easily playable. (Only H264 supported at 1080p) Image formats supported: GIF; JPG; TIF (Great to watch your digital images) Wi-Fi (802.11a, b, g or n) ( 802....

House prices in the UK

United Kingdom house prices going down.. Some reasons I can think of High value initial money requirements Stricter immigration controls? Value of house more than average wages Un-employment on the rise and no spare money for youth. The long term price trend graph is also going down. The above graphs are very much in-line with the research and bubble market hypothesis as I already noted in my previous post  http://www.diaryfolio.com/2012/03/housing-and-financial-bubble.html There are quite some clever graphs to check if its better to Buy house or Rent including the long term impact NYTimes Graph

Data visualisation and HTML playground

For those who are working on Web development and data visualisation, below links are very useful. Some are for providing the much needed data visualization techniques, while others provide CSS and javascript integration http://code.google.com/apis/ajax/playground/ http://jsfiddle.net/wkCNm/ http://www.fusioncharts.com/demos/gallery/ http://www.w3schools.com/css/default.asp http://960.gs http://freemarker.sourceforge.net/docs/index.html http://www.w3schools.com/xpath/default.asp http://formalize.me/ http://www.1stwebdesigner.com/css/powerful-css-tools-generators-automate-workflow/   #To test various CSS features http://www.tutorialsbucket.com/draw-basic-shapes-css3-tips-and-tricks http://thejit.org/static/v20/Jit/Examples/Spacetree/example1.code.html  #alernative graphs http://www.visualcomplexity.com/vc/  # visualisation samples

Coupons Vouchers Deals Cashback - How big is it?

Ever wondered about these keywords? I thought they were silly. But I have seen these keywords coming up regularly in yahoo visualise and real-time keywords high in the list. That means fellow netizens are using these keywords a lot. Well, the sites delivering them are limited in quality. Only a handful few are genuine and are regularly updated. Some of them which I know off are HotUKdeals (UK)->  http://www.hotukdeals.com/ Fatwallet (US) ->  http://www.fatwallet.com/ Quidco (UK) ->  http://www.quidco.com/ Groupon (International) ->  http://www.groupon.com  , co.uk   I felt some of the big players like Groupon are hyped than the others. If you are really going behind deals and cash saving you need to visit the above sites with cashback facilities.

db2 one liners

Some very helpful one liners for db2. If you are a fan like me to execute db2 commands within the Unix/AIX prompt, rather than going into DB2 inbuilt prompt then all commands run on the fly. Much powerful is Unix prompt as you can modify data in whichever way you want. db2 list database directory;    #Lists all databases within the installation db2 list node directory; db2 "SELECT SCHEMANAME FROM SYSCAT.SCHEMATA";  #Shows all schema within the Database Instance db2 set schema myschema01   # Setting schema before execution db2 "LIST TABLES FOR SCHEMA myschema01" | more db2 describe indexes for table <table_name> show detail | tr -s " "   # shows details about the table including primary key and indexes db2 get snapshot for application agentid 228 | more # db2 "force applicatioin (228) "   #Careful as it forces the session 228 out of DB2 db2pd -d myDB01 -wlocks db2 export to C:\CSVFiles\OutputmyTable.csv of del select * fr...

db2top utility

Recently I had learnt about a great utility within DB2 to view the dynamic queries and session details.  The utility is called " db2top "   (Careful db2stop will stop DB !!) To access it 1. Login to db2 user..  (say db2iuser1) 2. db2top -d myDB  # myDB is my database name 3. click on "l" key. It will show all the sessions hitting the database 4. Click on "a" key to interrogate a specific session. And enter the session number shown in above screen 5. Press "f" to force the session out. (Be careful). You might need to try twice as sometimes the session might come up again. Enter key is for "action" and "refresh" etc. Ensure that the command is not let run continously, as it takes fair bit of memory in long run. A good quide within IBM   is for command line execution, and also with batch mode options.  

AIX and Unix filesystem commands

Everyone who works in IT industry and with Unix systems should have suffered filesystem related issues. The most common one is the filesystem getting filled up. The scenario is Filesystem is filled up Determine largest files Filesystem is using different mounts. So the files you see are not within the filesystem. But there is a trick to find the largest files within the same filesystem   # Shows the largest 20 files within the same filesystem # xdev will make sure its within the filesystem find . -xdev -ls | sort +6 -nr | head -20   Some other helpful commands in AIX to see the filesystem volume groups and if all disk is used lsvg -o  # displays all volume groups lsvg -l <lvname> # list  (including mounts) lsvg <lvname>  # show details like free space etc

Playing with Tar and gz commands

I was amused by Unix utilities. They are very powerful, but they are tricky for use. Let me note down some of them as they come along. #To tar up *.log in the current directory into a tarball called abc.tar.gz, issue this command: tar cfz abc.tar.gz *.log #untar tar xvf something.tar #To see a list of the files within a tarball, issue the following command: # Helpful as its without untarring the file tar -tzf blah.tar.gz # gunzip -c $file | tar xf -     #AIX # Series of files while read file; do gunzip -c $file | tar xf - done < filelist #If you only want certain directories from the tarball, do this: tar xvzf something.tar.gz */dir.you.want/*  

Unix Search - Search for a keyword in all the files

I know everyone knows how to search for a file or directory in Unix. Have you encountered a major issue and wanted to search for a keyword? Its like finding needle in a haystack. Believe me its very simple in Unix and *nix servers.  Let me call it as "Deep Search" !! Please find the simple command # This will search all the *.log files for keyword "test" # .  will mean all directories under the pwd. Change "." to "/" to search whole of the system. But remember to redirect errors find . -name "*.log" -exec grep -l "test" {} \;

Google Search Options - URL parameters and syntax

  Search where? Operators Web Search allinanchor:, allintext:, allintitle:, allinurl:, cache:, define:,filetype:, id:, inanchor:, info:, intext:, intitle:, inurl:, link:,related:, site: Image Search allintext:, allintitle:, author:, group:, insubject:, intext:,intitle: Directory allintext:, allintitle:, allinurl:, intext:, intitle:, inurl:,location:, source: News allintext:, allintitle:, allinurl:, intext:, intitle:, inurl:,location:, source: Product Search allintext:, allintitle:

Arrow shapes using CSS

CSS is wonderful when it comes to presentation. Its all about how you tweak the colours.  I have managed to created "Single Headed" arrows and "Double Headed" arrows using pure CSS. Very useful if you want to change colours of arrows dynamically based on given criteria.   Please download the file at:   cssArrow The two main components are : Arrow Head, Arrow Body   which will have horizontal and Vertical types.  Below is the full HTML to test out Arrows using CSS.   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8″ /> <title>CSS Arrow Example</title> <meta name="revisit-after" content=" 30 days " /> <meta name="robots" content="index,follow" /> <meta name="rating" content="General" /> <meta name="MSSmartTagsPreventPar...

Data visualization and future of having Data

Ever wondered how it will be in next 5 - 10 years with data? Data is the king and as much data as you collect, (don't worry about presentation) there will be a method to interpret it. Your boss might say "Discard the data which is useless".. but DON'T :) Let's see some "wonders of the world"  in data analysis. Of course , google comes here too Google ngram  -  http://books.google.com/ngrams Google ngram data sets ->  http://books.google.com/ngrams/datasets Google public data ->  http://www.google.com/publicdata/directory Worldbank Datavisualizer ->  http://devdata.worldbank.org/DataVisualizer/   Yahoo Visualize ->  http://visualize.yahoo.com/

Google fonts for download

Various Google fonts for you to download. All are Open Source . Here is one sample  (Kaushan script)   Below are the main list   Great font selection tool: http://www.google.com/webfonts#ChoosePlace:select Android font Roboto: https://developer.android.com/design/style/typography.html Huge directory of fonts: https://googlefontdirectory.googlecode.com/hg/

Android Version naming

Google developers are so clever with Android nomenclature!! Everyone took it funny as the names were food names. I recently noticed that each version of  Android versions are in alphabetical order too !! A - Android B -  <>   C - Cupcake D - Donut E - Eclair F - Froyo G - Gingerbread H - Honeycomb I - Ice-Cream Sandwich J - Jellly Bean.  (hopefully)

e-paper epad or epad3?

Well.. I'm disappointed with March 2012 Apple Keynote presentation. I expected an innovation into one of their products, but didn't see any.. Agree that ipad3 or whatever it's called has better backend power. But I can't find anything to switch from my ipad2 to this release. Any idea of companies investing in electronic paper? Wished I could invest all my $1000 available savings into that technology. Hopefully it might turn into another Apple ?! My simple idea is  paper thin ipad .. that's it.  It will replace every single paper in this world.  That's what called as resolutionary !! Waiting for next revolution in post-pc, post-tablet era..

Substitute data with a variable using "awk and sed"

Have you ever tried out substituting particular string with a variable? I thought it was easy.. but it is  NOT !! There are plenty of examples showing subsituting a fixed string with another fixed String. # substitute (find and replace) "foo" with "bar" on each line awk '{sub(/foo/,"bar");print}' # replaces only 1st instance awk '{gsub(/foo/,"bar");print}' # replaces ALL instances in a line But I had an issue to substitute  "foo" with value of "$bar" .. This is not easy. I did a workaround of using "awk" and "sed" The scenario in front of me is to list a directory with files and the hostname of the Server. thisHost=`hostname` ls -lrt | tail +2 | awk '{ print "thishost|"$9}' | sed "s/thishost/$thisHost/"   tail +2 will remove the headers The trick is to print  literal "thishost" and replace "thishost" literal using the valu...

Complex examples of AWK

AWK is very powerful and newer generations nawk and gawk do have better flexibility. They are widely used by fellow scripters due to its sheen power. Let's look into some complex examples of AWK variants. I would recommend using nawk format as its installed in most of the Unix systems (AIX, Linux, Ubuntu have nawk by default) Syntax for one line awk commands   awk:  awk -Fs                     '/search/ {action}' awkvar=$shellvar infile nawk: awk -Fs -v awkvar=$shellvar '/search/ {action}'                  infile gawk: awk -Fs -v awkvar=$shellvar '/search/ {action}'                  infile   BEGIN { }, { } and end { } An awk script can have three types of blocks. One of them must be there. a) The BEGIN{} block is processed before the file is checked. b) The {} block runs for every line of input c) The END{} block is processed after the final line of the input file.   awk ' BEGIN    { myvalue = 1000 } /debt/   { myvalue -= $2  } /want/   { myvalue += $4  ...

Housing and Financial bubble

I'm not a economic expert , but I like reading articles about finance and markets around the world. We are not sure about the depth of 2008 financial crisis but my opinion is its still in the down-trend There are some excellent articles about housing market. One of the graphs which caught my eye is the "LifeCycle of a bubble"  by " Dr. Jean-Paul Rodrigue " This bubble varies across countries and I feel it holds true in developed countries like the UK, US and many european countries. The phases are at different stages in various countries. But well worth to be aware of Some Helpful Links for Buying House  One Stop Shop

Date Validation in a Shell Script

Well I had numerous occasions to verify something at input of a ksh script.  This could be a date or number of particular string etc. The most useful commands here are  "grep -E -q"  which returns a return code based on the search condition.  Exploiting this logic, please find sample Date Validation check in ksh shell script # Date should fall in 2010-01-01  to 2019-12-31 # Script expecting a Date parameter in YYYYMMDD format as input # This is not a 100% check, but will cover 99% of the scenario's if [ $# -eq 1 ] then echo ${DateFormatInput} | grep -E -q '^201[1-9][01][0-9][0-3][0-9]$' if [[ $? != 0 ]]; then echo "Please enter Date in YYYYMMDD format. You Entered $@ " echo "Quitting.. No action done..." exit 0 fi else echo "Please enter Date as parameter in YYYYMMDD format" echo "Quitting.. No action done..." exit 0 fi This script is useful especially when users enter various formats of date. Like UK employees use dd/mm/yyy...

Epoch Human Time Batch Conversion script

I had to create a sample script to convert epoch time to Human readable format.  (both ways) Also from Human readable time format to Epoch.  Input is a file with "Epoch" or "Human Readable"  format and the program will convert in the other format. Till now we used: http://www.epochconverter.com/ . But for embedding into your application or for batch convert, please find my program in Java import java.io.*; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.SimpleTimeZone; import java.util.concurrent.TimeUnit; public class EpochConverterClass { /** * @param args */ public static String dateHumanConvert(String dateEpochFormat) { SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); Calendar cal = Calendar.getInstance(new SimpleTimeZone(0, "GMT")); formatter.setCalendar(cal); Date dateHuman = new Date(Long.parseLong(dateEpochFormat) * 1000); // eg...

Wordpress themes - Interesting ones

Had some analysis on the wordpress themes and found these very interesting.. Below ones are in queue to update the site :) All are nice looking themes and simple.   http://wp-themes.com/pagelines/?TB_iframe=true&width=600&height=400 http://wp-themes.com/zbench/?TB_iframe=true&width=600&height=400 http://wp-themes.com/simplicitybright/?TB_iframe=true&width=600&height=400 http://wp-themes.com/?p=19