Saturday, May 30, 2009

Finding out version of ubuntu

Following commands helps in this:
lsb_release -a

cat /etc/issue

This will tell which version of ubuntu are you using.

Friday, May 29, 2009

Creating objects in javascript

http://javascriptkit.com/javatutors/object.shtml

This will help in understanding the main concept of prototype chaining in Java-Script.
This also explains the need to maintaining the correct order while writing the code.

Prototype chaining helps in implementing concept of inheritance in javascript code.
This web site explains this with the help of circle and sphere example. It explains that how circle class method and properties can be used in sphere class.

function mySphere(x,y,z,r){
// DO SOME THING
}

mySphere.prototype = new circle();

Creating a custom object in JavaScript

http://javascriptkit.com/javatutors/object.shtml

This include three steps:
1. creating custom object function
2. adding properties
3. adding methods



Go through the tutorial and you will understand the crux.

Ajax with jQuery

http://www.dreamdealer.nl/?action=viewTutorial&id=67

Using ajax with jQuery is simple.
I see multiple methods on web. some call like
$.ajax({
type: "POST|GET",
dataType: "json|xml|....",
url: "index.php||.....",
data: param{i guess name value pairs but i am not sure},
success: function(data){
if(data.status==0){
// take action... In general programming practice,
// trueSuccess will be a function which will be called with data as argument.
// In this case, trueSuccess is an event which will be triggered ....
// This event is having some data as argument...
$("#"+listener).trigger('trueSuccess',[data]);
}else{
$("#"+listener).trigger('trueError',[data]);
}
},
error: function(){
data='An Unexpected error has occured. Please try again later.';
$("#"+listener).trigger('unexpectedError',[data]);
}
})


Ajax another way:

$.get("giveMeSomething.php", { number1: number1, number2: number2 },
function(data){
alert("Data Loaded: " + data);
});

Thursday, May 28, 2009

Jquery: Random notes....

$ itself is an alias for the jQuery "class", therefore $() constructs a new jQuery object.

find() function allows you to research the descendants of already selected elements.
each iterates over all the elements applied to selected class or ID and do the further processing.

$() aka jQuery(), is basically an implementation of the Factory
Pattern, in which one object is responsible for the creation of other
objects. Of course, it also follows the Prototype pattern; given that
JS is a prototypal language and that the $()/jQuery() function extends
itself into the new object that is created.

More generally, the term factory method is often used to refer to any method whose main purpose is creation of objects. Factory methods are common in toolkits and frameworks where library code needs to create objects of types which may be subclassed by applications using the framework.

$('#faq').find('dd').hide().end().find('dt').click(function()
Here end will cancel the first find and second find will start from scratch.

jQuery.fn is a shortcut for jQuery.prototype
function($) {

} .. here $ refers to jQuery object...

http://simonwillison.net/2007/Aug/15/jquery/

Difference between
$().bind('click',fn) and $().click(fn)
Two difference:
bind can attach multiple function event to function name in a single statement.
something like this: $("(DIV ID)").bind("mouseout focus", function(){

});

Bind can also attach the custom events with any UI element.

Friday, May 22, 2009

http://www.24hourapps.com/2009/03/object-oriented-event-handling-in.html

Something relevant to my work.....

CSS selector tutorial

This tutorial will help in designing my web page in a better way...
http://css.maxdesign.com.au/selectutorial/tutorial_step22.htm

Use these styling rules....

Wednesday, May 20, 2009

Mac OS: working with textedit

I was stuck for a minute with text/edit.
Got confused that how can i save a file in html extension and get it properly displayed on browser:

For this i did this:
http://www.askdavetaylor.com/how_do_i_save_html_files_from_textedit.html

I changed the format from rich text format to plain text format and it worked for me.

Internship Day 1: JQUERY resources

Event Driven Programming:

http://www.mostlygeek.com/tech/event-driven-programming-with-jquery/

Basic Jquery tutorial:

http://ldeveloper.blogspot.com/2008/10/intro-to-jquery-basic-tutorial.html

Excellent JQuery Examples:

http://www.noupe.com/tutorial/51-best-of-jquery-tutorials-and-examples.html

Something for designers:

http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/

15 minutes Jquery expert:

http://www.webdevelopment2.com/give-15-minutes-jquery-expert/

How JQUERY works:

http://docs.jquery.com/How_jQuery_Works

Few links for tomorrow reading:

Advertiser Portal Documents ( check attached documents & ppt ) 
http://tortoise.hq.reloadnyc.com/groups/piggypost/wiki/6d2ca/2.1.9_Detail_Design_of_Advertiser_User_Interface.html
For the mockup -> refer to the link (Reddhima's wiki ( UI Mockup ))
P3 Portal ( Admin portal ) 
http://tortoise.hq.reloadnyc.com/groups/piggypost/wiki/0ce13/Admin_Portal.html
Look for p3 portal link
UI Common
http://tortoise.hq.reloadnyc.com/groups/piggypost/wiki/253aa/User_Interface_Common.html

Wednesday, May 13, 2009

Common XML errors are explained below..
http://validator.w3.org/docs/errors.html
impotent, innane, and ineffective.
the Indian system really needs to pull up their socks.\
hope sanity prevails.

Sunday, May 10, 2009

Executing system command from a perl program and capturing the output

http://www.perlhowto.com/executing_external_commands

method use if ...
system() you want to execute a command and don't want to capture its output
exec you don't want to return to the calling perl script
backticks you want to capture the output of the command
open you want to pipe the command (as input or output) to your script

shell programming tutorial

http://user.it.uu.se/~matkin/documents/shell/

Do this...

Saturday, May 9, 2009

error message i am getting right now:
ld returned 1 exit status

Means that some library is missing in the path..
try doing some ld stuff to link dll or library to this program...

Monday, May 4, 2009

Architecture of flash....

aRCHITECTURE DIGRAM OF DIFFERENT COMPONENTS
http://www.podtech.net/home/2827/the-architecture-of-flash

DIFFERENCE BETWEEN FLEX AND FLASH PLAYERS
http://theresidentalien.typepad.com/ginormous/2009/02/the-difference-between-flex-and-flash.html

Topic:
1. Overview
2. Flash /Flex/ AIR
3. Architectural framework of Flex
4. Flex and MVCS
5. History and evolution of Flex
6. Sample applications (Cool applications)
7. Resources

Read some time about following:
1. Spring
2. Hibernate
3. Ruby on rails
4. Python
5. Zend
6. PHP
7. JSON/REST
8. J2EE

Saturday, May 2, 2009

Setting up system variables:

For bash shell:
export CLASSPATH=$CLASSPATH:/java/classes:/home/tchin/myclasses

For tcsh or csh:
set CLASSPATH = ($CLASSPATH /java/classes /home/tchin/myclasses)

I always get confused about these two shells
echo $SHELL will tell the shell on which we are working

Also concept is this:
These are 2 forms of setting up the enviornment variable settings.

sh and ksh:
--------
TERM=sun
export TERM
these 2 command set any environment variable here.

csh:
----
in c shell setenv accomplish the task of those 2 commands alone.
so it depends on your shell, which shell u are using u have to use one of these commands.