Analytics


Google

Thursday, September 15, 2011

Create Gantt chart using Google Apps

The step by step process is described in the following url.

Key information are as follow:

 In particular, for the Google Gantt chart tool to work correctly, you should include columns with the following data.

    Unique ID (optional) – This column will contain a unique number assigned to each row of the table (1, 2, 3, 4, … for example). You only really need to include this column if certain tasks in your list are dependent on the completion of other tasks and you want this information reflected in your Gantt chart. If not, you don’t have to worry about this column.

    Name – In this column, include the name or a brief description of each task.

    Start – Enter the proposed start date for the task in this column.

    Finish – This column should contain the proposed or actual completion date of the task.

    Percent Complete – The number in this column should indicate what percentage of the task has been completed. Tip: Leave off the percent sign in order for the Gantt chart tool to read this field properly.

    Prerequisites (optional) – Like the Unique ID field, this column is only needed if certain tasks are dependent on others. If they are, input the Unique ID of any prerequisite task here.

Note that you can give these columns any title you wish and that you can include additional columns with other project data – just make sure that the above information is included somewhere in the table.



Wednesday, September 14, 2011

Multi Threading Java Script

I just found out that it is possible to do multithreading with Javascript.    This is only possible with the HTML 5 WebWorker.    The article on this is found here.

Unfortunately, this feature is only selected in several browsers, namely, IE 10, Firefox (since 3.6), Safari (since 4.0), Chrome & Opera 11.


Some snippets below:


/* Checking if Web Workers are supported by the browser */
if (window.Worker) {
    // Code using the Web Workers
}
 
The sample test page is found here. 

The following is from the article.  Read the article for the full explanation and detail:

You’ll then start the worker (and thus a thread under Windows) by sending it a first message:
myHelloWorker.postMessage();
Indeed, the Web Workers and the main page are communicating via messages. Those messages can be formed with normal strings or JSON objects. To illustrate simple messages posting, we're going to start by reviewing a very basic sample. It will post a string to a worker that will simply concatenate it with something else. To do that, add the following code into the “helloworker.js” file:

function messageHandler(event) {
    // Accessing to the message data sent by the main page
    var messageSent = event.data;
    // Preparing the message that we will send back
    var messageReturned = "Hello " + messageSent + " from a separate thread!";
    // Posting back the message to the main page
    this.postMessage(messageReturned);
}

// Defining the callback function raised when the main page will call us
this.addEventListener('message', messageHandler, false);
 
We’ve just defined inside “helloworkers.js” a piece of code that will be executed on another thread. It can receive messages from your main page, do some tasks on it and send a message back to your page in return. We then need to write the receiver in the main page. Here is the page that will handle that:


<!DOCTYPE html> 
<html>
<head>
    <title>Hello Web Workers<title>
</head>
<body>
    <div id="output">div>

    <script type="text/javascript">
        // Instantiating the Worker
        var myHelloWorker = new Worker('helloworkers.js');
        // Getting ready to handle the message sent back
        // by the worker
        myHelloWorker.addEventListener("message", function (event) {
            document.getElementById("output").textContent = event.data;
        }, false);

        // Starting the worker by sending a first message
        myHelloWorker.postMessage("David");

        // Stopping the worker via the terminate() command
        myHelloWorker.terminate();
    &lt/script>
</body>
</html>
 
The result will the be: “Hello David from a separate thread!”. You’re now impressed, aren’t you? Clignement d'œil
The worker will live until you kill it. Beware of that. As they are not automatically garbage collected, it’s up to you to control their states. Moreover, keep in mind that instantiating a worker will have some memory cost and don’t negligate the cold start time neither. To stop a worker, there are 2 possible solutions:
1 – from the main calling page by calling the terminate() command.
2 – from the worker itself via the close() command.

DEMO: You can test this slightly enhanced sample in your browser here ->

http://david.blob.core.windows.net/html5/HelloWebWorkers_EN.htm <-

Posting messages using JSON

Of course, most of the time we will send some more structurated data to the workers. By the way, Web Workers can also communicate between each others using Message channels.
But the only way to send some structurated messages to a worker is to use the JSON format. Hopefully, browsers that currently support Web Workers are nice enough to also natively support JSON. How kind they are!
Let’s then take our previous code sample. We’re going to add an object of type WorkerMessage. This type will be used to send some commands with parameters to our Web Workers.
Let’s use now the following simplified HelloWebWorkersJSON_EN.htm web page:

Hello Web Workers JSON


    
    
 

We’re using here the Unobtrusive JavaScript approach which helps us dissociating the view from the attached logic. The attached logic is then living inside this HelloWebWorkersJSON_EN.js file:

// HelloWebWorkersJSON_EN.js associated to HelloWebWorkersJSON_EN.htm

// Our WorkerMessage object will be automatically
// serialized and de-serialized by the native JSON parser
function WorkerMessage(cmd, parameter) {
    this.cmd = cmd;
    this.parameter = parameter;
}

// Output div where the messages sent back by the worker will be displayed
var _output = document.getElementById("output");

/* Checking if Web Workers are supported by the browser */
if (window.Worker) {
    // Getting references to the 3 other HTML elements
    var _btnSubmit = document.getElementById("btnSubmit");
    var _inputForWorker = document.getElementById("inputForWorker");
    var _killWorker = document.getElementById("killWorker");

    // Instantiating the Worker
    var myHelloWorker = new Worker('helloworkersJSON_EN.js');
    // Getting ready to handle the message sent back
    // by the worker
    myHelloWorker.addEventListener("message", function (event) {
        _output.textContent = event.data;
    }, false);

    // Starting the worker by sending it the 'init' command
    myHelloWorker.postMessage(new WorkerMessage('init', null));

    // Adding the OnClick event to the Submit button
    // which will send some messages to the worker
    _btnSubmit.addEventListener("click", function (event) {
        // We're now sending messages via the 'hello' command 
        myHelloWorker.postMessage(new WorkerMessage('hello', _inputForWorker.value));
    }, false);

    // Adding the OnClick event to the Kill button
    // which will stop the worker. It won't be usable anymore after that.
    _killWorker.addEventListener("click", function (event) {
        // Stopping the worker via the terminate() command
        myHelloWorker.terminate();
        _output.textContent = "The worker has been stopped.";
    }, false);
}
else {
    _output.innerHTML = "Web Workers are not supported by your browser. Try with IE10: download the latest IE10 Platform Preview";
}
 
 
At last, here is the code for the web worker contained in helloworkerJSON_EN.js the file:

function messageHandler(event) {
    // Accessing to the message data sent by the main page
    var messageSent = event.data;

    // Testing the command sent by the main page
    switch (messageSent.cmd) {
        case 'init':
            // You can initialize here some of your models/objects
            // that will be used later on in the worker (but pay attention to the scope!)
            break;
        case 'hello':
            // Preparing the message that we will send back
            var messageReturned = "Hello " + messageSent.parameter + " from a separate thread!";
            // Posting back the message to the main page
            this.postMessage(messageReturned);
            break;
    }
}

// Defining the callback function raised when the main page will call us
this.addEventListener('message', messageHandler, false);
 
Once again, this sample is very basic. Still, it should help you to understand the underlying logic. For instance, nothing prevents you to use the same approach to send to a worker some gaming elements that will be handled by an AI or physics engine.

Thursday, August 4, 2011

Cannot enter info in IE 7

Recently, I heard a few people complaining that they are not able to enter information in the forms on IE 7.  I did a search and found some of the DLLs might suddenly be missing from the registry.  The fix is as follow:

To resolve this issue, re-register the DLL files that are related to Internet Explorer. To do this, follow these steps:
  1. Click Start, and then click Run
  2. Type regsvr32 urlmon.dll in the Open box, and then click OK.
  3. Click OK when you receive the following message:
    DllRegisterServer in urlmon.dll succeeded
  4. Repeat steps 1 through 3 for the rest of the DLL files by replacing the regsvr32 urlmon.dll command in the Open box with the following commands:
    • regsvr32 actxprxy.dll
    • regsvr32 shdocvw.dll
    • regsvr32 mshtml.dll
    • regsvr32 browseui.dll
    • regsvr32 jscript.dll
    • regsvr32 vbscript.dll
    • regsvr32 oleaut32.dll
The information is found on this page.

I was led to the solution above from another page.


Saturday, July 30, 2011

QR Code

QR Code is short form for Quick Response code.  I found this often used on the Android marketplace to help us find the apps to install to our Android devices.  What I did not realize was how easy it is to generate one.

For example, this is one a QR code to my other blog:

qrcode

On the iPhone, you can use QR Reader and on Android devices, there is a app called QR Droid to help you. Both the above devices can read as well as generate the QR Code as shown above.    On the computer, you just need to search for QR to find websites that can generate the images for you.

The barcode reader on Android can also read the code and auto fill the spaces for like when you want to SMS someone.

Wednesday, July 13, 2011

Setting up TP W8901G for Streamyx

This document is taken from the following url.

The setting should be as follow:





My take from the above article are the following:


  1. PVC2 is used instead of PVC0.
  2. VPI needs to be set to 0
  3. VCI needs to be set to 35.
  4. Encapsulation needs to be set to PPPoE LLC
  5. User is the usual account with @streamyx prefix
  6. Password of course is required.
The other important part is the DNS setting.  As is mentioned, in one of the replies:

SourceDNS 1DNS 2
TMNet202.188.0.133202.188.1.5
Google8.8.8.88.8.4.4
OpenDNS  208.67.222.222208.67.220.220

Friday, July 8, 2011

Google Doc Search Operators

The following are operators that can be used in Google Docs.  The full document can be found here.




OperatorDefinitionExample
“ ” QuotesTo find documents that contain that exact phrase.“match this phrase exactly”
ORTo find documents with at least one of the words.tacos OR nachos
- HyphenDocuments that don’t have a particular word. So if you want docs that mention salsa, but not dancing use...salsa -dancing
from:Documents shared from someonefrom:bob@gmail.com
to:Documents shared to someoneto:bob@gmail.com
is:starredItems that you have marked with a star.is:starred
is:hidden or is:archivedItems that you have hidden from the main Documents List by deselecting the Show in Home option.is:hidden
type:Search by the type of document. This covers: document, spreadsheet, presentation, drawing, image, video, image_or_video, pdf, and textdoc.type:spreadsheet
before:YYYY-MM-DD after:YYYY-MM-DDFind items that were edited before or after a certain day.before:2010-12-01
owner:Search according to who owns the item.owner:Frank
title:Search by the item’s titletitle:”Conference 2010”

Tuesday, April 19, 2011

Confio Ignite

Most developers and DBAs are aware of Toad to help with performance tuning and database management.  However, very few are aware of Confio Ignite.  This is an excellent tool for identifying and fixing performance issue in your Oracle, MS SQLServer, DB2, and Sybase.

It help answer questions like

  1. Why is an application waiting on the database and what can be done?
  2. How did the code promotion affect response times in your database?
  3. Did the vendor patch really fix the problem?
  4. Which bottlenecks in your database directly impact end-user service?
To try out the tool, you can use the free version called IgniteFree.

The tutorial is available here.
In addition to that you can also see

There are also Webinars provided:

4 Oracle Performance Tips You Should Know presented 24 June 2010
Learn how to determine the best tuning approach for a SQL statement by utilizing response time analysis and visual SQL diagramming techniques. A "must see" for those who rely on OEM Performance Packs.

Learn a four-step process that will help you quickly find and correct the bad SQL code. Covering topics such as: SQL diagramming, wait type data, column selectivity, and more.





Monday, March 21, 2011

Backing up Blogger Blog

I recently read about disappearing blogs in blogger so I searched for tools to backup my blogs. I found the following tools to backup to your local hard disk:
  1. Blogger Backup
  2. Web Grabber (for OS X)
  3. HTTrack Website Copier
There is also a free service I found:

Monday, March 7, 2011

Saturday, March 5, 2011

Rooting Android 2.2 (Froyo)

There are many apps which will help with rooting Froyo.  The two I have tried are:

z4root
Visionary

Both cases require USB Debugging enabled.

z4root did not work for HTC Desire HD.

Note of caution:

Rooting has a few risk just as going into operation is risky.  If it works, it is fine but when it fails, there are a lot of complications.  It is good to have a copy of your ROM so that you can flash back should you need to or have a service center close by to help you.

Reason for rooting


I rooted my device because I have had to reset my device a few times due to problem with the contact synchronization.   Each time I had to reconfigure everything.  To reduce that need, I wanted to perform a full backup of the device without rooting.

Wednesday, February 16, 2011

Avoiding and fixing contact synchronization between Android and Gmail

I encountered a problem synchronizing the contacts on my new Android phone recently and found that others have encountered similar problems but have not found any solutions on internet.  I finally solved the problem and am sharing it here.

The main cause in my case was the Google Device Policy App.

Avoidance

To avoid the problem be sure to successfully synchronize all your Google accounts before activating the Google Device Policy app.

Fix

If you activated the Google Device Policy app before you successfully complete the synchronization of all your Google Accounts, you may find that the contacts synchronization will not work.

To fix it:

Force stop the Google Device Policy App (to do that go to Settings -> Applications -> Manage Applications -> (find Device Policy) ->
Then go to Accounts & sync to synchronize all your Google accounts.
Once done, you can reactivate your Device Policy App by finding the app under All apps and click on it activate it against your corporate account.

Additional Note


I found another contributing factor to the synchronization has to do with illegal characters in your contact information.  If you have ' in your contact name, it will also cause all the synchronization to stop.  The only way to fix is to remove the illegal characters and then reset the device back to factory config and then set it up again.

However, before you do that, try rebooting your device first.   This may sometimes fix the problem so you don't have to go through the hassle of reconfiguring everything.  I have tried rooting and backing up using Titanium backup but it did not allow me to restore everything.

Monday, January 17, 2011

Puppet - Open Source Data Center Automation and Configuration Management

Puppet is an open source data center automation and configuration management framework. Puppet provides system administrators with a simplified platform that allows for consistent, transparent, and flexible systems management.

Puppet lets System Administrators spend less time on mundane tasks and instead focus on managing their infrastructure strategically.

The following is their website:

http://www.puppetlabs.com/puppet/introduction/

Friday, January 14, 2011

Sitemaps for Blogspot sites

There are two systems in blogspot, the old one and the new one (was previously beta).  To verify, you need to visit to see if you get a XML or a web page.

In the list below, the first three url is the default for sitemap but in the new system, it is redirected to feedburner and will not be recognized by rss readers.  If that is the case then use the last url for the feed.  If it still provide the xml format then you can still continue to use those urls.

Old sitemaps:
http://programmersjournal.blogspot.com/rss.xml
http://programmersjournal.blogspot.com/atom.xml
http://programmersjournal.blogspot.com/feeds/posts/default

New sitemap.

http://programmersjournal.blogspot.com/feeds/posts/full

Friday, December 3, 2010

How to set up automatic alert using Gmail and GCalendar

This is how you can set up an automatic alert that will send out email to a group on a fixed schedule. It is a two step process.

Step 1

Create a Calendar entry in your Google Calendar. Specify the time and also check the repeat, the specify the repeat frequency, daily, weekly, monthly etc.



Make sure to have add Email Reminder.


Step 2

From Step 1, you should receive an email from your calendar about 10 minutes (or what ever time you set before the actual time.

After receiving the first alert, create a filter from it.  The mail will be from calendar-notification@google.com.

So create your filter, as follow:


In the Has the words field, key in the words that match your calendar title. Then click Next Step.


Select Forward it to: and then enter the email you want to forward the alert to.  If you are using a corporate gmail account, you can use groups created by your company admin.  If you are using the free public gmail account, each filter can only be forwarded to one email account and also the recipient need to agree by either clicking on a link or to send you back the authorization code.



Wednesday, November 24, 2010

Virus on FaceBook and MySpace

I just received a warning that there is a trojan worm is now spreading like wildfire on Facebook and MySpace. The name of the work is known as koobface.

It is designed to steal your info, invade your system and shut it down. In order to avoid it:
  • do not open the link to Barack Obama Clinton Scandal. 
  • Do not accept any friend request from SmartGirl15. 

I am not sure how accurate the warning is but better to safe then sorry.

Saturday, November 20, 2010

How to uninstall Microsoft Choice Guard

Microsoft Choice Guard is automatically installed on your computer when you install Windows Live.  To uninstall Choice guard, follow the following steps (from the following discussion):


Microsoft Choice Guard

Instructions to uninstall Choice Guard

For Windows XP:

1) Start
2) Run
3) Copy the following line into the 'Open' field:
msiexec /x {8FFC5648-FAF8-43A3-BC8F-42BA1E275C4E}
4) OK

Choice Guard will now be uninstalled.

On Windows 7, use the following command:

MsiExec.exe /X{F0E12BBA-AD66-4022-A453-A1C8A0C4D570}

Tuesday, November 16, 2010

Performing a Find in Google Spreadsheet

You can write scripts for the various modules in Google Apps using JavaScript (just as you do scripts in Microsoft Office using VBScript).    I have not been able to perform a predefined method to perform a find.  This is a code that is provided by Henrique Abreu.  The discussion is found here.

The code is as follow:

function find(sheet,searchKey) {
  var data = sheet.getDataRange().getValues();
  for( var i in data )
    for( var j in data[i] )
      if( searchKey == data[i][j] )
        return sheet.getRange(parseInt(i)+1,parseInt(j)+1);
  return null;
}

To use the code, you can just call it as follow:

function usageExample() {
  //replace 1st occurence of "foo" with "bar"
  var range = find(SpreadsheetApp.getActiveSheet(),"foo");
  if( range != null )
    range.setValue("bar");
}

Wednesday, November 10, 2010

HP Expert Day - Nov 10, 2010

From the following page.


Don't miss our first community Expert Day on the topic of Operations Management, which starts tomorrow at 8am Pacific Standard Time.  Simply NAVIGATE HERE and start asking your questions! 

Participating HP Experts will be identified by the HP Expert icon next to their names.


Afraid you'll forget about this great event tomorrow? Download the event to your Outlook calendar. Simply open the linked file and "save and close".


Spread the word!  Give your colleagues and friends this shortcut URL: http://ow.ly/31CWX

Expert Day is a 24-hour forum based event where you can log in and ask questions of HP Operations Management Experts who are ready to help you online.  

Topics appropriate for this Expert Day would include: 
  • How to monitor different IT environments (heterogeneous, virtualized, private cloud, etc.)
  • Best practices
  • Product integrations
  • Tips and tricks
  • Using agents and agentless monitoring together
  • Information on new products (Operations Manager 9, SiteScope 11, Operations Manager i9) 
  • Product features
  • Resources (requests for case studies, white papers, and collateral)

Portable Apps Suite

The following is a link to some portable applications that makes it easy for testing.

http://portableapps.com/suite