Search This Blog
Tuesday, July 27, 2010
Enjoy amazing chriss bliss
Completing a blog entry every week was a challange. So I will enjoy sometime off. But I will come back to it. Meanwhile enjoy this video that we saw in Decision making class.
Tuesday, July 20, 2010
Javascripting QnA
Please note that the source of these questions is w3schools and answers are to the best of my knowledge.
Q1: Inside which HTML element do we put the JavaScript?
A1: "script" element
Q2: What is the correct JavaScript syntax to write "Hello World"?
A2: document.write("Hello World!");
Q3: Where is the correct place to insert a JavaScript?
A3: Both the "head" section and the "body" section are correct
Q4: What is the correct syntax for referring to an external script called "xxx.js"?
A4: script src="xxx.js"
Q5: An external JavaScript must contain the script tag
A5: False
Q6: How do you write "Hello World" in an alert box?
A6: alert("Hello World");
Note1: Confirm Box syntex is confirm("sometext");
Note2: Prompt Box syntex is prompt("sometext","defaultvalue");
Q7: How do you create a function?
A7: function myFunction()
Note: Syntex is function functionname(var1,var2,...,varX){some code}
Q8: How do you call a function named "myFunction"?A8: myFunction()
Q9: How do you write a conditional statement for executing some code if "i" is equal to 5?A9: if (i==5)
Q10: How do you write a conditional statement for executing some code if "i" is NOT equal to 5?A10: if (i != 5) // I think. Please check
Q11: How does a "while" loop start?
A11: while (i<=10)
Note: It has variant
do
{ code to be executed }
while (var<=endvalue);
Q12: How does a "for" loop start?
A12: for (i=0; i<=5)
Q13: How can you add a comment in a JavaScript?
A13: //This is a comment
Q14: What is the correct JavaScript syntax to insert a comment that has more than one line?A14: /*This comment hasmore than one line*/
Q15: What is the correct way to write a JavaScript array?
A15: var txt = new Array("tim","kim","jim")
Q16: How do you round the number 7.25, to the nearest integer?
A16: Math.round(7.25)
Note1: Other important Math Objects are:
Note2: JavaScript provides eight mathematical constants that can be accessed from the Math object. These are: E, PI, square root of 2, square root of 1/2, natural log of 2, natural log of 10, base-2 log of E, and base-10 log of E.
Q17: How do you find the number with the highest value of x and y?
A17: Math.max(x,y)
Q18: What is the correct JavaScript syntax for opening a new window called "w2" ?
A18: w2=window.open("http://www.w3schools.com");
Q19: How do you put a message in the browser's status bar?
A19: window.status = "put your message here"
Q20: How can you find a client's browser name?
A20: navigator.appName
Note1: The navigator object contains information about the browser.
Note2: Some properties of this object are appCodeName, appName, appVersion, cookieEnabled, platform, userAgent.
Note3: Some methods of this object are javaEnabled(), taintEnabled()
Q1: Inside which HTML element do we put the JavaScript?
A1: "script" element
Q2: What is the correct JavaScript syntax to write "Hello World"?
A2: document.write("Hello World!");
Q3: Where is the correct place to insert a JavaScript?
A3: Both the "head" section and the "body" section are correct
Q4: What is the correct syntax for referring to an external script called "xxx.js"?
A4: script src="xxx.js"
Q5: An external JavaScript must contain the script tag
A5: False
Q6: How do you write "Hello World" in an alert box?
A6: alert("Hello World");
Note1: Confirm Box syntex is confirm("sometext");
Note2: Prompt Box syntex is prompt("sometext","defaultvalue");
Q7: How do you create a function?
A7: function myFunction()
Note: Syntex is function functionname(var1,var2,...,varX){some code}
Q8: How do you call a function named "myFunction"?A8: myFunction()
Q9: How do you write a conditional statement for executing some code if "i" is equal to 5?A9: if (i==5)
Q10: How do you write a conditional statement for executing some code if "i" is NOT equal to 5?A10: if (i != 5) // I think. Please check
Q11: How does a "while" loop start?
A11: while (i<=10)
Note: It has variant
do
{ code to be executed }
while (var<=endvalue);
Q12: How does a "for" loop start?
A12: for (i=0; i<=5)
Q13: How can you add a comment in a JavaScript?
A13: //This is a comment
Q14: What is the correct JavaScript syntax to insert a comment that has more than one line?A14: /*This comment hasmore than one line*/
Q15: What is the correct way to write a JavaScript array?
A15: var txt = new Array("tim","kim","jim")
Q16: How do you round the number 7.25, to the nearest integer?
A16: Math.round(7.25)
Note1: Other important Math Objects are:
- random()
- max()
- min()
- floor()
- ceil()
- abs()
Note2: JavaScript provides eight mathematical constants that can be accessed from the Math object. These are: E, PI, square root of 2, square root of 1/2, natural log of 2, natural log of 10, base-2 log of E, and base-10 log of E.
Q17: How do you find the number with the highest value of x and y?
A17: Math.max(x,y)
Q18: What is the correct JavaScript syntax for opening a new window called "w2" ?
A18: w2=window.open("http://www.w3schools.com");
Q19: How do you put a message in the browser's status bar?
A19: window.status = "put your message here"
Q20: How can you find a client's browser name?
A20: navigator.appName
Note1: The navigator object contains information about the browser.
Note2: Some properties of this object are appCodeName, appName, appVersion, cookieEnabled, platform, userAgent.
Note3: Some methods of this object are javaEnabled(), taintEnabled()
Tuesday, July 13, 2010
OOPs PHP!
As we struggle with php this week, I thought I would make the situation little more daunting. As if the current situation, with php tutorial and network project deliverable, is not enough challenging!
So if anybody wants to learn OOP way of php, here is good tutorial from nettuts.
I couldn't agree more when the author compares relationship between blue-print/house to class/object. The article is worth the reading, especially if you consider yourself a geek. I didn't read it all, so technically I am not a complete geek yet.
I think the author is correct when he opines that "... OOP is actually a very straightforward and ultimately simpler approach to programming."
So if anybody wants to learn OOP way of php, here is good tutorial from nettuts.
I couldn't agree more when the author compares relationship between blue-print/house to class/object. The article is worth the reading, especially if you consider yourself a geek. I didn't read it all, so technically I am not a complete geek yet.
I think the author is correct when he opines that "... OOP is actually a very straightforward and ultimately simpler approach to programming."
Wednesday, July 07, 2010
RSS Advisory Board
While browsing through I just discovered the website for RSS Advisory board. Although news bites are not new anymore, but it has a few good tutorials, particularly API for RSScloud Interface.
Tuesday, June 29, 2010
Supporting HTML5
It appears that supporting HTML5 has added one more battlefield in the browser war. To get a score on how well your browser supports HTML5, click here or simply type http://html5test.com/ in your browser. As of today, on my DellE6400 (yes, it's an old Dog), Mozilla 3.5.7 scored 126/300 and IE7 scored a measly 12/300. May be that is why, MicroSoft is aggressively moving forward with IE9, which should support HTML5. Looking at a youtube video (2.56 minutes), I could see the difference in performance. The demos were definitly faster on IE9 compared to firefox and google chrome. But then the video is provided by msdn! What do you think they are going to highlight? As per MicroSoft, they are doing this by harnessing the power of hardware while others are still using the software rendering. You can read more here. I believe they probably have better performance on MS-Windows environment. How IE9 performs on other operating systems remains to be seen.
So I think this (HTML5 support) is a work in progress and with time more and more features will get included in future releases of IE9 and other browsers. Based on the score from html5test, I think MicroSoft has a long way to go. But, better late then never...
What I liked about the IE9 though is the introduction of API which provides developers with the performance metrics like time taken for navigation, fetch, unload, domainlookup, connect, request, response, domLoading, domInteractive etc. You may read more here. I do agree that developers should not have to find the workaround to get these metrics and browser should make these available as it, the browser, already knows these numbers when it renders the pages. I think it is a step in the right direction and other browsers should also provide such API for developers.
So I think this (HTML5 support) is a work in progress and with time more and more features will get included in future releases of IE9 and other browsers. Based on the score from html5test, I think MicroSoft has a long way to go. But, better late then never...
What I liked about the IE9 though is the introduction of API which provides developers with the performance metrics like time taken for navigation, fetch, unload, domainlookup, connect, request, response, domLoading, domInteractive etc. You may read more here. I do agree that developers should not have to find the workaround to get these metrics and browser should make these available as it, the browser, already knows these numbers when it renders the pages. I think it is a step in the right direction and other browsers should also provide such API for developers.
Labels:
API,
browser,
HTML5,
performance
Tuesday, June 22, 2010
SAP displays the power of BI in social networking
Thanks to Apple's iphone and smart phones we can now find the app for almost everything. But the apps are not limited to only the cell phones. We can see them on the PCs as well and also for social networking websites like Facebook. Now SAP, the ERP giant, has also entered the fray. I think it is an interesting idea to showcase the BI (Business Intelligence ) capability of anlaytics developed by SAP for anaylising the data on social networking. I feel like calling it "Personal Intelligence" (PI).
This PI app is dubbed "Friend optimiser" by SAP. While reading an article, it appeared to me that it may be able to help us decide which friends we should dump and which ones we should hang out with. Or at least, where I am spending my time (read money, since time is money) as a facebook user and how does it compare with others.
Intrigued, I decided to review the "Friend Optimiser". If you wish, you may launch it from here. Please be aware that the data used for dashboard is about you and your friends and is collected from facebook automatically. The app will ask for your permission as the first step.
Step 1: Request for permission to access the profile data, including name, picture, list of friends etc.
Step 2 Select the friends you want to analyse. I wanted to be unbiased and used "Auto select 10 friends"
Step 3 Start optimising and wallah the dashboard is ready. Here is the image of what it looked like for me.

Labels:
BI,
facebook,
social network
Monday, June 14, 2010
Performance indicators for a website.
Hi All,
Worldcup for soccer is on and all the sports pundits have been talking about US vs Britain's game. (Draw is considered a win for relatively inexperienced US team.) So when I saw reference to fifa on the rss feed from Azaxian(Dion Almaer's article), I got a little inquisitive as to what is the connection between soccer and web technologies. To my surprise it lead me to some information that I have been looking for sometime now. I always wanted to know what are the various parameters on which I can measure the performace of any website.
I believe that for any website, including fifa, it is very important to have performance related metrics and the acceptable range for each of them. I think the article gave a very good summary of various metrics. Although, the article recommends what kind of values would be considered good, acceptable or unacceptable, but I believe that would vary from organisation to organisation. So I would take these values as a starting point and then fine tune for a given organisation.
Once again, the article can be referenced here.
Worldcup for soccer is on and all the sports pundits have been talking about US vs Britain's game. (Draw is considered a win for relatively inexperienced US team.) So when I saw reference to fifa on the rss feed from Azaxian(Dion Almaer's article), I got a little inquisitive as to what is the connection between soccer and web technologies. To my surprise it lead me to some information that I have been looking for sometime now. I always wanted to know what are the various parameters on which I can measure the performace of any website.
I believe that for any website, including fifa, it is very important to have performance related metrics and the acceptable range for each of them. I think the article gave a very good summary of various metrics. Although, the article recommends what kind of values would be considered good, acceptable or unacceptable, but I believe that would vary from organisation to organisation. So I would take these values as a starting point and then fine tune for a given organisation.
Once again, the article can be referenced here.
Thursday, June 10, 2010
Why CIOs Are Last Among Equals?
This article on bloomberg got my attention. It was titled "Is The Typical CIO a "Gear Guy?" " While the article in itself was so so but the it lead me to an interesting recent article in Wall Street Journal.
The arcticle takes 'report card' like approach for a typical CIO. It lists the skills (strategy, influence, leadership, communication, synthesis, relationship building) needed and then kind of grade a typical CIO/Manager. I was deligted to see when it talked about "Strategic thinking" which is relevent to our current class for Dr Money. Some of the stuff was also related to what Bob covered in Decision making class.
Sorry for the digression. I felt like sharing the article which I think is worth reading once at least.
The arcticle takes 'report card' like approach for a typical CIO. It lists the skills (strategy, influence, leadership, communication, synthesis, relationship building) needed and then kind of grade a typical CIO/Manager. I was deligted to see when it talked about "Strategic thinking" which is relevent to our current class for Dr Money. Some of the stuff was also related to what Bob covered in Decision making class.
Sorry for the digression. I felt like sharing the article which I think is worth reading once at least.
Tuesday, June 08, 2010
Facebook Woes
As we know, after changing their privacy policy, facebook constantly find them selves in the center of the discussion. With the likes of Linked-In, facebook and twitter, Social Networking is evolving to be an important component in Web2.0 technologies.
I had hard time believing that advertisement revenue is enough to sustain the growth of these companies. Even if it was enough, I had little doubt in the power of corporate greed for more revenues. Hence, the commercialization of the user information, to me, was inevitable. So I was hardly surprised when I read the raucous discussions about the changes to privacy policy of facebook.
I tend to believe that the changes facebook is making to their privacy policy (which, to my surprise, happens to be longer then the US constitution) are driven by their need to increase their revenue by cashing on the information provided by the users. Yes, it is true users have the choice to “opt out” which is easier said then done, especially when it is in the interest of face book to make the "opt out" procedure difficult. Without any intervention from government and/or threat of competition, I have no doubt who is going win this tussle between facebook and users. Since when have the bigger fish starting protecting the smaller ones? So I was delighted to see when I read the following two articles. One is about the possible legislation/supervision from government and other is about the rise of competition like pip.io.
I had hard time believing that advertisement revenue is enough to sustain the growth of these companies. Even if it was enough, I had little doubt in the power of corporate greed for more revenues. Hence, the commercialization of the user information, to me, was inevitable. So I was hardly surprised when I read the raucous discussions about the changes to privacy policy of facebook.
I tend to believe that the changes facebook is making to their privacy policy (which, to my surprise, happens to be longer then the US constitution) are driven by their need to increase their revenue by cashing on the information provided by the users. Yes, it is true users have the choice to “opt out” which is easier said then done, especially when it is in the interest of face book to make the "opt out" procedure difficult. Without any intervention from government and/or threat of competition, I have no doubt who is going win this tussle between facebook and users. Since when have the bigger fish starting protecting the smaller ones? So I was delighted to see when I read the following two articles. One is about the possible legislation/supervision from government and other is about the rise of competition like pip.io.
- Senator Charles Schumer has urged the F.T.C. to provide guidelines
- Rivals Seize on Troubles of Facebook
Let us hope these developments will create enough pressure and facebook will address the situation sooner rather later.
Labels:
facebook,
social network,
web2.0
Wednesday, June 02, 2010
MySQL Workbench 5.2.21 RC Available
If anybody finds working with cli (command line interface) for mysql, hard and unproductive, 'MySQL Workbench' is the GUI tool that will help with most of the common tasks. The latest release is 'MySQL Workbench 5.2 RC' and has the features for following activities:
- SQL Editor
- Data Modeling
- Administration
The application is open source and can be downloaded from here. I downloaded from University of Wisconsin mirror. It is easy to install and configure with your existing mysql databases.
Friday, May 14, 2010
RSS feeds
RSS feeds for Internet technologies
Here are some of the feeds that I am subscribing to for learning php, mysql, Ajax etc.
Here are some of the feeds that I am subscribing to for learning php, mysql, Ajax etc.
- http://www.arkinex.com/feed/
- http://code2code.info/syndication.axd
- http://www.internetnews.com/icom_includes/feeds/inews/wr-dev-news-20.xml
- http://feeds.geekzone.co.nz/gzfreitasm
- http://feeds.nytimes.com/nyt/rss/internet
- http://www.phpgenious.com/feed/
- http://feeds.feedburner.com/TotalPHPRssFeed
- http://feeds.rssboard.org/rssboard
- http://feeds.techie-buzz.com/techiebuzz
- http://www.thesitewizard.com/thesitewizard.xml
Have fun. Let me know if you find any good ones. Please feel free to leave any comments/feedback.
Subscribe to:
Comments (Atom)