Ajax & Google & JavaScriptSunday, March 1st, 2009

Google visualization and search API part 2.

…and here is second example:

Google Ajax Search API and Google Visualization API example 2


This time I mixed the results from Image search api with table visualization. Additionally, I created the container for larger images and connected it to the table with event listener, so when you click on thumbnail the larger version of an image will appear - simple image viewer.

Of course you can download the code and build your own application…

Related documentation:
Google Ajax Search API (image) reference
Google Visualization API reference


No Comments »

Ajax & GoogleSunday, February 22nd, 2009

Google visualization and search API.

Hello everyone! Yesterday I had a bit of free time, so I decided to see what has been changed in Google Ajax API. It’s been quite some time since my last project, that’s why I was pretty curious what new features are available. New - means not used in my previous applications. So I’ve browsed through documentations, examples and believe me or not, I saw lots of new possibilities, ideas, I become inspired and motivated, and I’m not crazy (I hope).
Seriously, I have a few ideas related to Google Ajax API technology and I’ll show you some tricks, code and maybe I’ll make a new application based on these new features.

First example, what I did was to take Google Ajax Search API and mix it with Google Visualization API, and this is the result:

Google Ajax Search API and Google Visualization API example 1

Are You inspired? no? why? :( Please Wait for my next example…
If you however feel inspired you can download it and change it, and play with it, everything is in one file.

Related documentation:
Google Ajax Search API reference
Google Visualization API reference


No Comments »

UncategorizedSunday, November 23rd, 2008

70-290 passed.

Last wednesday I passed the 70-290. The first exam of my MS certification path. I want to be MCSE as fast I can and start to learn the MS Server 2k8 especially virtualization and Hyper-V. Also I want to touch the subject which is call Windows Internals and start development certification path. I will not mention about Linux and CCNA :).

Why live is too short…



No Comments »

Ajax & Google & JavaScriptSunday, October 19th, 2008

NewsBar - No Results -

Few days ago one of the readers of my blog ask me how to get - No Results - in the Google NewsBar. Those who play with NewsBar knows that when query gives you no results the applications switch to default query (which is “Google”) and shows you news about the Google.
How to bypass the default query? Simple, just put the following line before you create newsBar object.

GSnewsBar.DEFAULT_QUERY = "";

Example from the Google NewsBar documentation:

function LoadNewsBar() {
var root = document.getElementById(”newsBarTop”);
var options = {
largeResultSet : false,
resultStyle : GSnewsBar.RESULT_STYLE_EXPANDED,
title : “Nintendo in the news”,
autoExecuteList : {
executeList : [ "Nintendo", "Nintendo DS", "Nintendo Wii" ]
}
};
GSnewsBar.DEFAULT_QUERY = ""; // bypassing the default query!
var newsBar = new GSnewsBar(root, options);
}

You can specify the default query, when queries from executeList produce an empty list of results.

Also, you probably want to count the number of result? It’s not that simple, because you will have to modify the function in gnewsbar.js and we don’t want to do that. The problem is that you have to wait until all data are loaded and then check the number of results.

Here is the solution, not very good, but if you find better one please post comment here.

[...]

GSnewsBar.DEFAULT_QUERY = ""; // bypassing the default query!
var newsBar = new GSnewsBar(root, options);

window.setTimeout(function(){
if (newsBar.ns.results.length==0)  document.getElementById(”<id of the newsbar container>”).innerHTML=’No Results’;
},2000);

[...]

This function waits 2sec (2000ms) and then check if results are available, if not then it shows the ‘No Results’ text.



No Comments »

Ajax & Google & JavaScriptSunday, September 21st, 2008

GreenLinks and WordPress

As I promised, a short tutorial about how to implement GreenLinks into the Wordpress theme.

First and most important thing: Get Google Ajax Search Api key for your website:
http://code.google.com/apis/ajaxsearch/signup.html

Second, open a source of this page:
greenlinks

This is the full code of my application!

Put the <header> content from my example into your theme header section (header.php file), also find the <body> tag in your theme files and insert the onLoad attribute (as I show in the example).

The last thing you should do is to put the GreenLink panel at the end of every post :). The best way to do this is to edit a single.php file (this works in my theme).

And… That’s it, of course if you know the basics of PHP and HTML.

I made a zip file with all the scripts, graphic and pages required to run the GreenLinks on your server. If you have any problem with installing my application just post the comment here.

Please do not remove my name and link to my blog from the GreenLink panel,
thank you!

No Comments »

GamesSunday, September 14th, 2008

Pacman mania.

Wow, I didn’t expect that my Pacman! will be so popular. Thank you for your comments, I’m glad that you have fun playing my games. Sorry if I did not answer all of your questions posted via comments or email but currently the lack of time is my big problem, so don’t be angry on me :)

Ok, two things:
First. I’m seriously thinking about new game. I want to make something that was never done before in JavaScript game development (pure JS) and currently everything what I need is graphic. Two or three weeks and I’ll start new project…

Second. Lots of people asking me about how to implement Green Links in their blog, so I’ll write a short description how to put the GreenLinks in a Wordpress theme, however you must know that this is not a plugin and you will have to add few lines in your current theme. I’ll show you how to do this, so be patience….

Ok that’s it for now. Thank you once again for your feedback!



No Comments »

Games & JavaScript & YahooSaturday, August 30th, 2008

Pacman!

pacman.gifSo here it is, my new project after a one year break. I know it’s not perfect and of course you can find some bugs, errors, not well optimized lines of code, mistakes, etc. , but I’m tired of figuring out what is wrong, how sprites should change their position, what/where/when should something happend. I said that I like to writing games, but I’m not a cybernetic-humanoid from the future, and sometimes I need to do something else to refresh my mind. bla bla bla.

…so I decide to show you what I’ve created, hope you spend some time playing the yellow-ball-face-man running from the four angry ghosts. NO FLASH, pure (xHTML + JS) = YUI

Warning! Ghosts are very smart, they are spending most of the time trying to find where are you hiding and when they finally finds you, they run away :)
(one of the A.I. bug!)

Have fun!

PACMAN!

13 Comments »

UncategorizedTuesday, August 19th, 2008

New project!

Five days ago I started new project, another game based on YUI framework.
My goal is to finish it next weekend, currently 30% is done. Few problems still waiting to resolve, but everything’s going well, so I hope I’ll publish it next week.

I have so many ideas and don’t know when I do all of them, the worst thing is that people think that I’m losing my time making games, and they know better than me what should I do in my life. (sounds like an old rock song :) )

It’s really hard to follow your way. In country where I live people let you down because you do something different.


…but no one said it would be easy…

No Comments »

UncategorizedSunday, August 10th, 2008

I’m Back!!!

Hello friends… Wow! over one year since last post. Everything because of my job, I have so much to do in a short period of time and I don’t have much time for anything else.
As you can see I moved to wordpress platform, it’s very flexible and fast application, which fully satisfy my needs right now. I have a few problems with spam, i.a. lost all of my comments, but I think everything is under control guarded by my super professional antispam system :)

In my personal life I seriously think about Microsoft Certificate, at first maybe MCSA, because this is related with my job, then if I’ll have enough strength (and money) I will try to follow the developer’s path. Time will show…
Also I have started juggling, currently I juggle three balls and I know four patterns, but I practice every day, so these numbers will grow.

Generally I’m not complain of boredom…

I will not promise that I will make new things (I mean yui games or any other applications), you probably won’t believe me, however I will focus more on this blog because I have put lots of work and I don’t want to lose that.

That’s it for today :) Thanks for your patience……

No Comments »

BrowsersWednesday, July 4th, 2007

What’s wrong with the Opera?

Hello! Looong time since last post. This is because I have so much things to do, and of
course I don’t have much time to play with other not less important things. I remember,
I promised you to write another YUI game. Hmmmmm, I will do it, if I’ll find new idea.
Actually I’m learing lot of Windows XP/Vista/Server 2003 stuff, so this is totally far
from web developing and because of that no new “game ideas” are avaliable in my mind
at the moment :).

So, if you are getting bored reading my candid explanation I have something that could be
interesting for you.

This is screenshot of the Opera 9.21 (wokring on MS Vista)

Why it’s something wrong with displaying that page?

opera

Don’t ask me, I don’t know, this is dedicated to Opera experts.

No Comments »