Fetching data from multiple tables in one MySQL query – Part 2

A few days back, I mentioned in a post how to fetch data from multiple tables in one MySQL query using multiple and nested SELECT statements. Today I’m going to present a more elegant way to do that using INNER JOIN.
Let’s reiterate the problem first –
We have 2 tables – tableA and tableB. The [...]

Fetching data from multiple tables in one MySQL query

Often we need to use SELECT queries that will fetch data from multiple tables. One option is to use INNER JOIN, LEFT JOIN etc. But in this case described below I couldn’t find a way to use those. Lets say we have 2 tables – tableA and tableB. The structure of these 2 tables are [...]

Let’s Go A Hunting

I wanted to draw a bunch of stick figure men carrying spears, going on a grand hunting event. There will be at least 15 men in the group. Of course I could draw them all by hand, but I decided to put my Photoshop Scripting abilities to good use.

I started with a drawing of three [...]

Java Applet and Javascript message passing

I did this quite a while a ago, thought I should share this.
To call a js function foo from java applet :

String [] stringArgs = new String[2];

stringArgs[0] = "first arg from Java";
stringArgs[1] = "second arg from Java";

mainWindow.call("foo", stringArgs);

To call a function foo() in a java applet named bar, do the following in javascript:

document.bar.foo(param1, param2, ….) [...]

The Right-Click Menu in Flash

The right click menu is actually called the context menu. I did not know that. I had to go through several forums and blogs on the net before stumbling upon this piece of information.
Usually one does not need to bother about this menu. But if you are working on a game, you might want to [...]

Python: C++ style cin, cout in Python

Ready to bring some flavor of C++ into python? If you like cout, cin in C++ and also a python programmer, you’d definitely like this snippet.
import sys
class ostream:
def __init__(self, file):
self.file = file

def __lshift__(self, obj):
[...]

Website Security : Directory Listing Issue

Directory listing is a great security risk for websites. Anyone can see and download contents from the directory. It may reveal your website’s login and database information. It will definitely make the server side scripts public which puts website’s security at a stake. It may also reveal private contents like images or multimedia files to [...]

Hyperlink in actionscript 3

Regarding hyperlinks, there has been a significant change from Actionscript 2 to Actionscript 3.
In Actionscript 2, the following line of code would have sufficed to open a window in your default browser for this blog.

getURL("http://www.muktosoft.com/blog/");

But in Actionscript 3, you need to instantiate an URLRequest then call navigateToURL to (:) navigate to your target url. [...]

Mute button in actionscript 3

This is what I usually do, but it may or may not be the easiest or most sophisticated way of implementing a mute button in actionscript 3. I use Flash CS3 IDE and actionscript 3.0 for the coding, this solution might not work in earlier versions.
To make a mute button, first we need to define [...]

Suspended tween in Flash

for(i:int=0;i<box.length;i++) {
var tween:Tween = new Tween(box[i], “x”, Strong.easeOut, 0, 100, 1, true);
tween.looping = false;
}

should be replaced by

tweens:Array = new Array();
for(i:int=0;i<box.length;i++) {
var tween:Tween = new Tween(box[i], “x”, Strong.easeOut, 0, 100, 1, true);
tween.looping = false;
tweens.push(tween);
}