Popular Posts

Wednesday, November 11, 2009

Hyper-Threading (HT) Technology

Faster clock speeds are an important way to deliver more computing power. But clock speed is only half the story. The other route to higher performance is to accomplish more work on each clock cycle, and that's where Hyper-Threading Technology comes in. A single processor supporting Hyper-Threading Technology presents itself to modern operating systems and applications as two virtual processors. The processor can work on two sets of tasks simultaneously, use resources that otherwise would sit idle, and get more work done in the same amount of time.

Greater resource utilization equals greater performance and responsiveness.

HT Technology takes advantage of the multithreading capability that's built in to Windows XP and many advanced applications. Multithreaded software divides its workloads into processes and threads that can be independently scheduled and dispatched. In a multiprocessor system, those threads execute on different processors. HT Technology allows a single Pentium 4 processor to function as two virtual or logical processors. There's still just one physical Pentium 4 processor in your PC — but the processor can execute two threads simultaneously.

Tuesday, October 13, 2009

Professional Approach to Data Mining

I worked as a Data Stream Analyst with one of the nation’s top five market research firm. My duties involved data mining tasks which though; I had been doing but was unaware of its actual aspects. Then I took a introduction to data mining course during my pursue of Masters of Software Engineering degree at George Mason University which helps me to gain knowledge and maturity in this field. This course helps me to classify my daily tasks at job very easily. I will now try to relate some of my professional experiences with data mining tasks in this article which might be a good overview for beginners in this field. The data mining steps are:

Steps involve in Data Mining

Originally Data Mining consists of seven steps, as you can see above, but we combine  a couple of steps and comes with this diagram below:

Professional Steps involve for Knowledge Discover

So lets begin with Problem Definition first.

Step 1 Problem Definition:

In this step the problem definition is established. By problem definition it infers to the actual task for which the data mining is needed. As an example one of our clients wants to know his business progress geographically. Like

Visa Credit Card is being used mostly where?

There are four type of credit card being used widely American Express, MasterCard, Discover and Visa. Visa is one of our client and they want know in which part of the country there cards are mostly used and in which parts they cards neglected widely and what are the reasons behind it. 

Step 2 Data Gathering & Preparation:

We have two kinds of data streams, ecommerce; which involves data coming from online shopping sites like buy.com, amazon.com, eBay.com etc. and financial data stream which involves the data coming from online banking sites like bankofamerica.com, chevychase.com etc. Now in order to scrap the data which is required for analysis we code software agents and these agents will gather data for us. These agents not only help us in data gathering but they also do data cleaning for us and for this purpose we make patterns in software agents which will clean the data. Once the data is being gathered and cleaned we are ready for the data sampling. We will sample data in four types according to the requirement of our clients for example how we are reporting our client means monthly, quarterly, semi and or on yearly basis.

Step 3 Model Building & Evaluation:

We will build and test the model on the past data that we have it and then run it on the new data that we just gathered for the recent quarter.  The models are separately built for each client and for each client’s requirement. For example Visa credit cards geographical customer report modeler is different than it’s quarterly expense report modeler. So for each site and for each specific purpose we create different model from its past behavior data trends.

Step 4 Knowledge Deployment:

 

As it is described before that our Knowledge Deployment depends on creating custom reports depending on the customer requirement. This can vary from anything to know its own profit report or to get an idea of the competitors business in that region for launching a new product. Our custom reports provide all the information which can be helpful in increased revenue. Our reports are supported by the facts of the past data which is helpful is making a strong impact on the clients.

Example Reports:

  • E-Commerce Spending on Black Friday Jumps 42 Percent Versus Last Year.
  • Consumer Online Retail Spending Tops $610 Million Per Day for Five Consecutive Days as Online Holiday Season Spending Grows 25 Percent vs. 2005.
  • Fox Interactive Media Ranks #1 in Page Views; Yahoo! Sites Attract the Most Unique Visitors.
  • 23 million People Watched More Than 2 Billion videos online in France in January 2008

 

I hope this will help some of us to understand how data mining is been done at a professional level. This will also clear student’s perspective of data mining being used now a days as some of my class fellows were not able to get it while we were taking Introduction to Data Mining course.

Monday, September 28, 2009

Podcasting

Think how a desktop aggregator works. You subscribe to a set of feeds, and then can easily view the new stuff from all of the feeds together, or each feed separately.

Podcasting works the same way, with one exception. Instead of reading the new content on a computer screen, you listen to the new content on an iPod or iPod-like device.

Think of your iPod as having a set of subscriptions that are checked regularly for updates. Today there are a limited number of programs available this way. The format used is RSS 2.0 with enclosures.

clip_image001[4]

Tuesday, September 1, 2009

Mason Ranking for 2010

Mason Ranking for 2010 Mason ranked # 2 on U.S. News and World Report's new list of “Up-and-Coming Schools” for 2010. Although we lost our top position for this year but I am confident we will be on top again next year.

Check the complete list here.

Thursday, August 20, 2009

President Obama at George Mason

President Obama & Vice President Biden addressing the event at George Mason UniversityGeorge Mason University recently joined the Yellow Ribbon Education Enhancement Program in partnership with the U.S. Department of Veterans Affairs. The program will expand higher education funding for post-9/11 servicemen and women.

Mason President Alan Merten The Post-9/11 G.I. Bill will pay college tuition for those who have served in the armed forces since the attacks on New York and Washington eight years ago.

These pictures are the courtesy of George Mason University.

Wednesday, June 24, 2009

XML Data File 2 Java Bean Class

This time I am creating a J2EE application which requires back and forth retrieval of data values from a XML data file. I decide to write a separate class file which will only read the XML file and load its values into the memory. The usual way will be to use a XML parser but I decided to go with JOX Java Library.

JOX Introduction:

JOX matches an XML document to the fields of a java bean and will use a DTD when writing an XML document if one is available. Because JOX identifies the Java Bean at runtime, you can transmit XML into different classes.

JOX limitations:

  1. You must use Java Bean’s getter/setter methods because JOX uses introspection to understand the property names.
  2. XML tag names must match bean property names.
  3. JOX converts XML data to the type of the bean property.
  4. Without a DTD, JOX uses bean property names as XML tag names.

Note: you can also use JOX to write a bean to a DOM object so that it can be used for XSLT processor later on.

JOX example:

Now I will walk you through a live a example of How I used JOX for my party invitation generator application. First take a look at the XML data file which is being created by my application when a user created a party:

   1:  <?xml version="1.0" ?>
   2:  - <partyInvitation>
   3:    <date>2009.May.11 12:48 PM</date> 
   4:    <hostname>testtest</hostname> 
   5:    <password>testtest</password> 
   6:    <inviteMessage>test</inviteMessage> 
   7:    <guestname>test</guestname> 
   8:    <guestemail>test@gmu.edu</guestemail> 
   9:    <gueststatus>No Status</gueststatus> 
  10:    <guestid>0</guestid> 
  11:    <guestname>test2</guestname> 
  12:    <guestemail>test2@gmu.edu</guestemail> 
  13:    <gueststatus>No Status</gueststatus> 
  14:    <guestid>1</guestid> 
  15:    <RiazG00444898 /> 
  16:    </partyInvitation>


As you can see on line 5 the password field is not encrypted in the file which is not a good approach but because of the testing limitations of this application I have to save it in a simple text form. At least at the bear minimum you can generate the hash code of the field before saving it to the file.

For the purpose of this article I will retrieve host name, guest emails and id values as these three belongs to different data types. Host name will always be a string, guest emails will contain more then one value so ArrayList will be use here and id will be integer type. And also I handled ArrayList values differently so that's why I am discussing it here. So lets get started by creating a Java Bean class with respective property names.

   1:  public class PartyDataBean {
   2:   
   3:      private static String hostname;
   4:      private static int guestid;
   5:      private static ArrayList<String> guestemail = new ArrayList<String>();
   6:      
   7:      public void sethostname(String name) {
   8:          hostname = name;
   9:      }
  10:   
  11:      
  12:     public void setguestemail(String email) {
  13:   
  14:          guestemail.add(email);
  15:      }
  16:   
  17:     
  18:      public void setguestid(int n) {
  19:   
  20:          guestid = n;
  21:      }
  22:   
  23:      public String gethostname() {
  24:          return hostname;
  25:      }
  26:   
  27:      
  28:      public String getguestemail() {
  29:          return guestemail.toString();
  30:      }
  31:   
  32:      public int getguest() {
  33:   
  34:          return guestid;
  35:      }
  36:  }

As you can see from from line 29 I am returning the all the values of the array without any loop which will return the values in this format: [test@gmu.edu,test2@gmu.edu] so you need to tokenize this string if you want to display these two values separately. The other possible way can be with a loop but then you are making more one function call which can effect your applications respond time as in large applications you have more then one value to retrieve.

Packages Needed:

import com.wutka.jox.JOXBeanInputStream;
import java.io.FileInputStream;

You need the above two packages in order to use JOX. The necessary JOX library files can be downloaded from http://sourceforge.net/projects/jox and make sure you put jox116.jar file into classpath so that the java code can find corresponding classes at compile and run time.

JOXBeanInputStream is An InputStream filter that reads XML into a bean. When you read an XML document, you must supply either a class or an object instance. The input stream will attempt to match XML tags to bean attributes in the class/object you supply.If you supply a class, the input stream will automatically create a new object instance to hold the data.

The stream understands the basic Java data types and their object equivalents, plus strings and dates. Anything else must be a bean. It can also read arrays of any of the supported types or of beans if it tries to read a bean with an indexed property.

If there are XML fields that don't match the bean, it will ignore them. If the data types are not compatible, you will get an exception.

Useful functions:

You only need to provide the XML data file path to JOXBeanInputStream object and then just read the data bean at runtime by providing the class file of that data bean to JOXBeanInputStream object. But before that make sure that the XML file does exit otherwise you will get an exception. Here is how I did it with the help of these functions give below:

public Boolean FileExits(String filename) {
   File file = new File(username);
   boolean exists = file.exists();
   if (!exists) {
   // It returns false if File or directory does not exist
    return false;
   } else {
    // It returns true if File or directory exists
    return true;
   }
 }
public Boolean LoadFile(String filepath) {
  try {
   FileInputStream fIn = new FileInputStream(filepath);
   JOXBeanInputStream joIn = new JOXBeanInputStream(fIn);
   testBean = (PartyDataBean) joIn.readObject(PartyDataBean.class);
    return true;
    } catch (Exception ex) {
    ex.printStackTrace();
    }
      return false;
}
 

It is a good practice if you make sure and checks the resource does exit before pointing to it.

That’s all for today and thanks for reading. Let me know if anyone needs more details on JOX. Any comments or suggestions are always welcomed.

Tuesday, April 21, 2009

Google before the Internet

It’s fun to imagine what Google would have been like before the Internet.

Google Queries in 1960:

google_circa_1960_src

Years later when color printing and mail system improved:

google

In the past people used to call their local library help desk to get answers to their questions but now It’s only a click away. Truly a well deserved improvement.

Tuesday, April 7, 2009

Make sure, It is secure

email1

Take a look at the above email, which I received a couple of days ago. It's from my bank's online account services stating that I may have made some changes to my account and they need to verify it. Also, the message header looks authenticated

image

So, now they want me to click on the link (provided in this email) and log on to the online account service and verify those changes. I clicked on the link :

http://www.gloriagales.com/chaseonline.chase.com/index.html

the site appeared and it's exactly the same. Except two things

i) The web address looks fishy to me as it is suppose to https://www.chase.com/Chase.html instead of the above.

ii) The web server is not secure, Are you wondering how I know it?. Closely compare both the web addresses and most of the times its exactly the same expect the little ‘s’ which comes right after the http part. Always make sure this ’s’ is present whenever you are sending your confidential information over the internet. This ‘s’ means the web server is secure and all information between you and the server is encrypted .

Most of all it is easy to remember instead of comparing the web address.

Wednesday, March 18, 2009

Some Precautions before coding JavaScript

Before you add JavaScript to your site you should make sure that it will be compatible with all your clients browsers. That’s hard as you are not aware who may access your site from any part of world using any browser version which may be or may not be compatible with JavaScript. Here are two tips which turns out to be really helpful for me.

1. Always use “<!-- -->” tags inside the Script tags. This will turn your scripting language code into comments if and only if client browser is not compatible with JavaScript code. This will eventually hide displaying the code on the client’s browser if scripting is disabled. Here is how to use it

<script language="JAVASCRIPT" type="text/javascript"> <!-- hide code from old browsers that doesn’t support JavaScript

JavaScript code statements

--> </script>

2. Use no scripts tags for worst case scenario. The contents of this tag will visible only if the scripting is disabled. Here it is how to use it :

<NOSCRIPT> Your browser understands JavaScript. However, the feature is turned off. Please turn it on to enjoy the full capability of this page. </NOSCRIPT>

Hope this will help next time you are coding JavaScript.

Thursday, February 12, 2009

Flash Errors

A couple of days ago I was trying to install an application which requires the latest version of flash on the machine. I am pretty sure that I have the latest version installed as most of the internet applications require it now a day. To my surprise it errors out stating the application requires the latest version of flash in order to work properly. I went to Flash Official website and updated my machine. After updating I started installation again and got the same results. Then I tried to uninstall the current flash player and install a fresh copy from their site again but all in vain. Nothing helped me.

Follow these steps to solve it:

  1. Navigate to the folder "C:\WINDOWS\system32\Macromed\Flash\". In this folder you will see a file named "Flash9f.ocx" or "Flash9*.ocx" (Here * stands for any letters, numbers or sign that comes after 9)
  2. Make copy of the "Flash9f.ocx" or "Flash9*.ocx" file in the same folder as the original (copy the original, then paste the copied file into the same folder).
  3. Delete your previous copy of "Flash.ocx".
  4. Rename the newly made copy to "Flash.ocx".

That's all you are done. This is the most easy and quick solution to this problem. Actually whenever we update our copy of flash in the background it will be placed in folder (C:\WINDOWS\system32\Macromed\Flash) under the name "Flash9*.ocx" and the file with name "Flash.ocx" will still carries the same older version. So when we are installing newer application that requires latest version of flash it will look for "Flash.ocx" file, which still contains the older version, so this generates this error.

Hope this post will help you with your Flash problem.

Tuesday, February 3, 2009

Wii's Unrevealed Potentials

It was about a year ago when one of my friend forward me link of Johnny Chung Lee's Wii project page. Lee was a Ph.D Student at Carnegie Mellon University but now he is researcher with Microsoft (acording to his website). Anyways year ago he did come up with Head Tracking for Desktop Virtual Reality Displays using the Wii Remote. In simple words head tracking with wii's remote. He has explained his experiment in this video below: I just happens to visit his page again and found out another interesting experiment. This time he is tracking his fingers with wii remote. you can watch this experiment in the below video. You can visit his home page for complete instructions and how to conduct these experiments by yourself. These are really simple and easy. He has used simple software which is required for both these experiments and can also be downloaded from his home page.