Tuesday, August 25, 2009

Statistics - List of the many different things there are

Yes yes...I did not post even one new thing in the last month and a half (let alone at least one new thing a week)...thats behind me now.

Let's see. I was thinking of what to write for my work term report. My initial idea was on something software related - may be something about the HMVC pattern, or HTML5 or Flex etc...Going through my cyclic rounds of brain storming, I was reminded of an old love (something I am still interested in, but have not seen in sometime)...Business Intelligence/Data mining.

Business Intelligence to me is being able to make effective decisions using all the data you have in hand. Using as in understanding what the different variables are, what they mean, the relations between them, what are those variables now - so what can I say about the future. Its about understanding the past and present to make decisions for the future.

Statistics can help us on the part about the relation between the different variables. There are many many different methods statistics has. I guess I can read a text book on what these methods are, how they work and what are they useful for...but that would take too much time. And if I ever need to refer back, will take even more time.

So here is what I though - I am going to maintain a blog post where I keep adding information about statistical methods bit by bit - name, how it works, and where is it useful. If something is too obvious like "averages" I may not have a write up for it (though I still plan to list such things).

Labels: ,

Saturday, April 25, 2009

JavaScript Toys Library

Edit: The library has been updated with 2 bug fixes - Thanks to Gartheepan for finding the bugs - they were problems associated with window resizing. The download link is to the new version

As part of my javascript learning/brush-up, I am working on a JavaScript library that would offer easy to use UI widgets. Things like split vertical panels, split horizontal panels, tabbed windows etc...

I have created a javascript library that offers the easy ability to add these UI components - called JSToys. It may be downloaded from here - jsToys_1.1.zip

Here is a demo to show what it is capable of:

Labels: , , ,

Tuesday, April 21, 2009

Old Undocumented Project: Turtel

Going through my source files, I came across one of my old projects. A very interesting one...that I eventually somehow forgot about..till I saw it today. I had code-named the project 'Turtel'. It's undocumented in the sense that I never mentioned it in the Blog.

The project was an attempt to understand the effectiveness of different indicators and strategies if used in the stock market.

I was also exploring Design Patterns at this time. The project became multi-purposed - to improve my understanding of the patterns (I seemed to have used the Strategy Pattern and the Factory pattern in my implementation) and explore the effectiveness of investment strategies.

Here is a link to the last version (I believe) - where I left off - Project Turtel

The page above is not very interactive. But what it does is very cool (imo :)). You pass along 5 variables in the query string: fee, P, K, symbol, days, show

Fee is the transaction fee per purchase/sale
P and K are used for cross-overs I believe - values of 10 and 2 for example mean when the 10 day SMA crosses the 2 day SMA etc...
Symbol is the stock symbol - as listed in Yahoo (for example RIM would be RIM.TO)
Days indicates the number of days of data to use - a value of 100 would mean use the last 100 days of data
Show indicates whether to show the dates and quantities of transactions. A value of 1 means "yes, do show"; anything else means "no, don't"

Two strategies were implemented at the time - SMA cross-over and I think MACD cross-over. The outputs are based on these two.

Here is an example of the URL with the query string. The bolded parts are what you would change to see the output for the new values.

http://www.ai-projects.info/Turtel/sim/driver.php?P=10&K=2&days=501&show=1&symbol=RIM.TO&fee=0

May be I shall continue this project some day. But for now its probably going to stay in its suspended state. This is one of the reasons I like to look into my old stuff - I usually find something interesting :)

Labels: , , ,

AiBloggerBox (now BrightBox): Version 1.0.1 Release

Edit [May 31, 2009]: The instructions in this video are now out of date. In fact now it is easier than shown in the video to set BritghtBox up.

AiBloggerBox (now BrightBox) - now has been bug fixed and version 1.0.1 has been released. Version 1.1 is soon to be released as well.

Version 1.0.1 can be downloaded from here: AiBloggerBox

Version 1.0.1 notes:
Version 1.0 released was found to be an incomplete release.
It would not have worked (It was different from the version
running on http://www.ai-projects.info). Sorry about that.

Here are some updates on this version (from the correct V.1.0).
- Using addEventListener to add events so that this does
not kill all other mousedown and keypress events on the
document
- Added a check to see if onblur is set on the link element;
this would improve hit rate - no/low false positives. Meaning
it will not kill your other image links

Here is a quick video on how to set this up.

Labels: , , ,

Monday, April 20, 2009

AiBloggerBox: Version 1.1 - Soon to come

Edit: Prior to release of Version 1.1 - Version 1.0.1 a bug fixed version has been released. You may read about it or download it from these links. There is also a video on the setting up process, which you may watch at the bottom of this page as well.

This is a follow up to the previous entry on AiBloggerBox.

There were some comments from readers that this did not work at their sites. During that time I was on vacation and did not see their comments.

I plan to test AiBloggerBox more thoroughly now and make some enhancements :) - and release a working (as in works at all blogger sites ;) , not just mine) version. I just thought I would post the update here now.

Labels: , , , ,

Thursday, April 16, 2009

LocFinder V1

In about 2 days :) - the first version of LocFinder is ready

I am planning on some feature additions and more sites to crawl later..currently the information contained comes from crawling only rentershotline.ca. I am thinking of having the bot crawl it every night...so the information would get updated in 24 hour periods.

The rental information is represented graphically, but if you want futher details - it links back to rentershotline.ca

Labels: , , , , , , , ,

Tuesday, April 14, 2009

Quick Update

The busy school term is almost over. I just have 1 more exam to go..I figured I can loosen up a bit now. I have two ideas that I really want to implement in the next short little while. I'll call these projects LocFinder and LuckFinder:

  • Loc Finder - We (a couple of us) are looking for rental places..there are many sites out there with a lot of information...found them kinda hard to use...I figured, I'd create a web crawler that crawls these sites and presents the information in a very friendly form.

    I thought this was done well by Subletr. Unfortunately...it doesn't seem to work anymore :(

    Well, this has given the opportunity to fill that gap. Here I go.
  • Luck Finder - Can't explain this now...I want to implement it first :)

Hope to have this done soon! :)

Labels: , , , , , ,

Saturday, January 3, 2009

AiBloggerBox: A Lightbox alternative designed for easy Blogger integration

[May 28, 2009] EDIT3: AiBloggerBox has now been renamed to BrightBox!

[May 24, 2009] EDIT2: Version 2.0 of AiBloggerBox (now BrightBox) is now available, feel free to try it out! Download link available at the bottom of this post, or over here: BrightBox

[April 21, 2009] EDIT1: My apologies to those who posted the comments. I was away for sometime and then busy with work for some time after; hence did not have time to respond to you. I have resumed this project and there is a new entry on it here.


I love Lightbox - for people who are not aware of what it is, in some websites you may notice that you click a picture and you see a zoomed version of the picture with a transparency layer to its sides. Here is a link to the official Lightbox website. There is a small issue on how blogger and lightbox integrate.

When you upload an image when making a post in blogger, you have to click "Edit Html" and make slight changes to the html for an image to have the lightbox effect. This is explained in detail in this website here.

I don't like this. I believe that given the nice wysiwyg "Create Post" interface of blogger, you shouldn't have to make html changes to achieve such an effect. I guess I had 2 options at this point - modify lightbox OR make my own lightbox-type effect, that would give me the effect but would not require this html code mod-ding on posts. Being who I am, I chose option 2 - make my own - for the sake of learning...

And I present to you AiBloggerBox. To make this work for you, all you need to is include this javascript file in your html pages. In blogger you would basically add this line in the head section of the blog template:

<script type="text/javascript" src="http://www.ai-projects.info/js/aibloggerbox.js"></script>

That's it! you're all set. When you click on any images in your post, they would get the zoomed version with the lightbox type effect without the html source changes on each post.

This can be used outside blogger too. How it works is when you have an image element contained within an anchor (link) element, the effect automatically kicks in on click of either element. The zoomed in image would have to be what the anchor element links to.

Here are some sample images. This page uses this effect.




Here is a download link for anyone who wants to use it

Version 1.0.1 (old - deprecated): aibloggerbox.zip

Version 2.0 (new - in favour) Compressed: BrightBox_v2.0_compressed.js
Version 2.0 (new): BrightBox_v2.0.js


Labels: , , , ,

Tuesday, September 16, 2008

Presenting the YWeather API

I was designing a site this weekend when I needed some weather data. I started looking for solutions - I found phpweather and I found it to be an excellent tool. However, when I tried to query some "less" known cities, it returned nothing. One of the cities that I wanted the data for did not exist and I was disappointed.

Knowing that I can use sites like the weather network and get the weather data, I figured I might as well write my own class to fill this void. Thus was born the YWeather. YWeather is a php class that provides a class interface to access data from Yahoo Weather. It makes use of the Yahoo weather RSS feed.

The YWeather class uses MagpieRSS to parse through the RSS feed. When a location id is specified, the class parses the feed and gives a class interface to the weather data, making it easy to integrate to any web application.

Here is a test script I created to test the class, this list provides a list of the features of the class (I am too lazy to type this out :P)

$w = new YWeather("CAXX0504");

"URL: ".$w->getURL()
"Title: ".$w->getTitle()
"Skies: ".$w->getSkies()
"Skies Image: getImage($w->getSkies())."' />"
"Temperature: ".$w->getTemperature()
"Latitude: ".$w->getLat()
"Longitude: ".$w->getLong()
"isPM: ".$w->isPM()
"Published date: ".$w->getPublishDate()
"Description: ".$w->getDescription()
"Current Conditions: ".$w->getCurrentConditions()
"Forecasts: ".$w->getForecastsText()

The Yahoo feed provides 2 days forecast:

$forecasts = $w->getForecasts();
"Forecast 0 Day: ".$forecasts[0]['day']
"Forecast 0 Skies: ".$forecasts[0]['skies']
"Forecast 0 Skies Image: getImage($forecasts[0]['skies'])."' />"
"Forecast 0 High: ".$forecasts[0]['high']
"Forecast 0 Low: ".$forecasts[0]['low']
"Forecast 1 Day: ".$forecasts[1]['day']
"Forecast 1 Skies: ".$forecasts[1]['skies']
"Forecast 1 Skies Image: getImage($forecasts[1]['skies'])."' />"
"Forecast 1 High: ".$forecasts[1]['high']
"Forecast 1 Low: ".$forecasts[1]['low']


The class may be downloaded from here.
downloads/YWeather_w_magpie.zip

Labels: , ,

Friday, August 29, 2008

Art page

I have added a page to display some of my hand drawings. Here is a link: http://www.ai-projects.info/projects/art/

I need to work out the whole navigation for the site so that these project pages flow well with the rest of the site. Take a look and I would appreciate feedback. :)

Labels: , ,