Monday, March 30, 2009

$post / $each with JQuery

Let's say you want to do a JQuery $post and then use $each to traverse through the result. this exampel show how it can be accomplished.



Example JSON data set generated using Php or other scripting languages :-

{"items":[{"memberID":"1","memberName":"Julia Boris","profileInfo":"jaya jaya"},{"memberID":"1","memberName":"Julia Boris","profileInfo":"michael "},{"memberID":"1","memberName":"Julia Boris","profileInfo":"89898989"}]}


From the browser you can use the following codes to do an AJAX Post. Notice the I purposely pass dummy data to the other end. Somehow it returned text instead of JSON if i do not pass dummy data.

You can do some debugging by displaying return "data". If you can see the content of your data as shown example above, then you might not be returning JSON data type - meaning u cannot manipulate it using $each.

Example below also shows you how u can access individual record.

$.post("getExploreRecent.php", {"name" : "dummy"} , function(data)
{

//alert(data);
//alert(data.items[0].profileInfo);

$.each(data.items ,function(i,item) {
alert(item.profileInfo);
});


}, "json");


That's it. Pretty straight forward.

Saturday, March 28, 2009

Speculation - Distributed Transaction for improving performance, reliability and fault tolerance in Distributed Environment

Coming up ....

Extracting and Query a Comprehensive Web Database - M. Cafarella, UWS

Tremendous amount of information lost takes place in existing web database that tries to fit crawled information into a specific domain / predefined domain. This is because information is 'forced' into a pre-defined domain.

This paper improves extraction model for web databases.

Architecture

Web crawl ---> Multimodel Extraction --> Entity Database --> Multimodel Transaction ---> User Query


This paper proposed the use of dynamic domain generation approach.

Challenges faced by this approach are

a) Web Extraction - Generating the E-R model is going to a challenge as different domain maybe generated for the same topic. For example George W Bush or President George Bush. How do you know that these are the same domain? Data reconciliation is a huge issue.

(Dong, A Halevy and Madhavan - Reference Reconciliation in Complex Information Space)
(Singla and Domingos - Entity Resolution with Markov logic)

b) Entity - Relation - A component that contains entity extracted from the web. Two method of query the system --

1. Structure Query - Query specific table / domain.

2. Unstructure Query - Query that span across mutiple table trying to find a matched criteria.

c) Query Processing - Interface that accepts user request and it supports both structured and unstructured query. Results are stored as on-the-fly table. It also takes in interaction from the user to make result more accurate.


Other related work

KnowItAll

TextRunner

WebTables

WeakAssoc

Building MySQL

MySQL Building from Source

Pre-requisite:

1. Install VS C++ Express Edition

2. Microsoft Platform SDK **** very important ****

Build Process

1. Add Path to cMake installation Path

2. Configure your VS2005 Express to Microsoft Platform SDK by going to

Tools->Options->Projects and Solutions->VC++ Directories->Library files

Library files :-

Add D:\Program Files\Microsoft SDKs\Windows\v6.1\Lib

Include

D:\Program Files\Microsoft SDKs\Windows\v6.1\Include


3. Go to your source path and issue the following command \win\configure.js

WITH_INNOBASE_STORAGE_ENGINE WITH_PARTITION_STORAGE_ENGINE


4. Execute win\build-vs8.bat (if you're using Vs2005) and this will generate a VS solution file called MySQL.sln

5. Open up the solution file and build it. Goto --> Properties --> Set your configuration; Then right click on MySQL (specific component) and select Build.

Wednesday, March 25, 2009

Building Mozilla on Windows Vista and VS2008.


1. Install your Visual Studio - VS2008 (older versions are supported as well)

2. Install Microsoft Platform SDK depending on what Windows you're on


4. Setup your Mozilla configuration by creating a file called .mozconfig in your installed source root folder

This is configuration for building firefox

ac_add_options --enable-application=browser
mk_add_options MOZ_CO_PROJECT=browser


5. Choose your Visual Studio version by executing this is c:\mozilla_build (default directory for installing MozillaBuildTool above)

  • start-msvc6.bat
  • start-msvc71.bat (VS 2003)
  • start-msvc8.bat (VS 2005)
  • start-msvc9.bat (VS 2008)
6.Run make -f client.mk build

7. Once your firefox gets build it should be in the firefox-3.0.5-source\mozilla\dist\bin\firefox.exe. Now you may try to run your build version of firefox by double clicking on it.



Unfortunately the above instruction does not work for firefox build 3.5

Monday, March 23, 2009

Creating ASPCOM to consume WCF Web Service

I'm trying to send messages. The process goes something like this :-

ASP ---(server.createobject)--> COM Object ----(invoke method)----> WCF Web Service

All running on IIS.

So i can send messages from ASP COM to WCF Web Service. Typical processes to do this is :

a) Make your DLL ComVisible
b) Sign it
c) regasm (ok to skipped coz VS might register for you automatically)
d) gacutil
e) To place your App.config file during deployment, go and update Web Service Configuration file ----> w3wp.exe.config/aspnet_wp.exe.config.

I did this before. Just couldn't figure out why it slipped my mind.