Thursday, January 17, 2013

qlik view - show current selection in chart header

Expression to show current selections in Chart header

=' Cabaret Volue Stats: ' & if(isnull(GetCurrentSelections()), 'Nothing selected', GetCurrentSelections('

', ': ', ','))



Tuesday, November 6, 2012

Blood Pressure Chart


The 1st Number: Systolic pressure is the blood pressure when the heart muscle contracts.


The 2nd Number: Diastolic pressure is the blood pressure when the heart is relaxed.



Tuesday, October 9, 2012

Remove duplicates in excel

Excel remove duplicates :

1.Select all the rows, including the column headers, in the list you want to filter.

2.On the Data menu, point to Filter, and then click Advanced Filter.

3.In the Advanced Filter dialog box, click Filter the list, in place.

4.Select the Unique records only check box, and then click OK.

The filtered list is displayed and the duplicate rows are hidden.

5.On the Edit menu, click Office Clipboard.

The Clipboard task pane is displayed.


6.Make sure the filtered list is still selected, and then click Copy .

The filtered list is highlighted with bounding outlines and the selection appears as an item at the top of the Clipboard.
7.On the Data menu, point to Filter, and then click Show All.

The original list is re-displayed.
8.Press the DELETE key.

The original list is deleted.

9.In the Clipboard, click on the filtered list item.

The filtered list appears in the same location as the original list.

Source : http://office.microsoft.com/en-us/excel-help/delete-duplicate-rows-from-a-list-in-excel-HA001034626.aspx

Friday, October 5, 2012

Create Java inline thread

import java.util.Date;

public class InlineThreadDemo {
 public static void main(String[] args) {
System.out.println( "parent thread " + new Date(System.currentTimeMillis())); // launch child thread using
// inline declaration
new Thread( new Runnable() {
public void run() {
try {
Thread.sleep(10 * 1000);
} catch (Exception e) {
e.printStackTrace();
}
System.out.println( "child thread " + new Date(System.currentTimeMillis()));
}
}).start();

System.out.println( "parent thread " + new Date(System.currentTimeMillis())); }}


Wednesday, October 3, 2012

Two guards riddle - one will always lie

You are imprisoned in a chamber with two doors as the only exit. One door leads to death by cancer, filled with complications and malpractice; the other door leads to riches of jewelry, money and fine clothing for the rest of your life. There are two guards standing before you: one guard always lies; the other always tells the truth. Of course, you don’t know their identities. You can ask only one question to save your life. What should you ask?



Solutilon :
This is a logic question and can be answered if one realizes that the TRUTH of a LIE is a LIE, and the LIE of a TRUTH is a LIE. You need one guard to give you the other guard’s answer. Knowing this one could ask a question like, “If I were to ask the other guard which door leads to freedom, what would he say?”


If you ask the guard who always tells the truth, he would tell you the other guard would point you to the door of death. If you ask the guard who always lies, he would tell you the opposite door of the truth-telling guard and point you to the door of death. In either case, both guards will point to the door of death so you should choose the other one

Monday, September 17, 2012

Prevent Picasaweb private albums from redirecting to Google +

When I shared my private albums on Picasaweb, via e-mail only, the damn thing is still redirecting to Google Plus. I have trouble viewing these albums in firewall settings and not everyone of my friends has Google+. Here is how you prevent this from happening.

 You take the link with Auth key to your private album, and add  "&noredirect=1" in the end. That should work. Not sure why this is default behaviour when you wanted to share via e-mail. I hate Google+. There can be better integration.

 https://picasaweb.google.com/103124484697486858492?authkey=XXXXXXXXXXXXXXXXXXXX&noredirect=1

-Enjoy.

Friday, September 7, 2012

Unix vi commands

 I hated these black screens and these unix commands in particular. Trying to book mark so I wont forget ;)

Go to First line of the file  - :1
Go to last line - Shift G
Move up - k
Move down - j
Move left - l
Move right - h

Move forward by one word - w
Move backward by one word - b

Move to the end of line : $
Move to the beginning of line : 0 (zero)

And there is a lot more, all well documented here below :

http://www.ccsf.edu/Pub/Fac/vi.html