hi i came across this problem that while trying to launch any applet or run a .jnpl file it failed to load. I checked my system and found that java was installed but not sun java ,it was icedtea . So i found a solution to it in ubuntu.
Go to System->Administration->Software Resources->Other Resources and enable to canonical repos.
Next just install sun-javaX-plugin. (where X is the latest version).
Hope it solves your problem.
Let the source be open :)
Monday, August 30, 2010
Monday, August 16, 2010
Adding libgraph, an alternative to graphics.h in ubuntu
hi all, recently we were asked to write graphics programmes in C and we were 'suggested' to use Windows as Linux doesn't support the graphics.h library . This really felt awkward and i knew there must be some way out. By some googling, i found that libgraph was the alternative.
Here's how to install it in ubuntu:
1. Install the libgraph tar.gz file from here.
2. Next you need to install some dependencies , i.e packages:
libsdl-image1.2 libsdl-image1.2-dev guile-1.8 guile-1.8-dev (For fedora it's SDL-image and SDL-imagedev and the rest two are same)
3. After that you need to extract the downloaded tar and cd to it.
4. Next perform these:
(i). ./configure
(ii) make
(iii) make install
5. Next you need to copy all the libgraph shared files from /usr/local/lib to /usr/lib ,i.e
sudo cp /usr/local/lib/libgraph.* /usr/lib
That's it! now you may run any programme using graphics.h library and see the resutls. ;)
Here's a sample programme to draw a rectangle :
Note:For running the programme you must use the lgraph flag with gcc i.e if the programme is test.c then use gcc test.c -lgraph
For more details you may check out : this
Let the source be open :)
Here's how to install it in ubuntu:
1. Install the libgraph tar.gz file from here.
2. Next you need to install some dependencies , i.e packages:
libsdl-image1.2 libsdl-image1.2-dev guile-1.8 guile-1.8-dev (For fedora it's SDL-image and SDL-imagedev and the rest two are same)
3. After that you need to extract the downloaded tar and cd to it.
4. Next perform these:
(i). ./configure
(ii) make
(iii) make install
5. Next you need to copy all the libgraph shared files from /usr/local/lib to /usr/lib ,i.e
sudo cp /usr/local/lib/libgraph.* /usr/lib
That's it! now you may run any programme using graphics.h library and see the resutls. ;)
Here's a sample programme to draw a rectangle :
#include stdio.h // please put in angle brackets, there was some problem while posting
#include graphics.h // --do--
int main(void)
{
int gd=DETECT, gm=VGAMAX; // gd is the device driver , gm is the graphics mode
initgraph(&gd,&gm,NULL); // to initialize the graph
moveto(0, 0);
rectangle(50,50,500,200);
while (!kbhit());
closegraph();
return 0;
}
Note:For running the programme you must use the lgraph flag with gcc i.e if the programme is test.c then use gcc test.c -lgraph
For more details you may check out : this
Let the source be open :)
Saturday, August 7, 2010
Google fails but makes merry!
Here's something interesting. Google recently closed down Wave and they are celebrating about it. Yes, it's a trend they follow, that when they close any service they enjoy as it reflects some more work and more innovation is required by them . Here's the link with full details. Wonder! Let's Celebrate
Friday, July 30, 2010
Reverse Search!
I was just experimenting with some commands when i pressed the Ctrl + R button and i discovered a great feature in linux(ubuntu).
It's called reverse search and is similar to the history command . It gives you the most matched commands which you had typed on the terminal. So, explore it now and njoy!
It's called reverse search and is similar to the history command . It gives you the most matched commands which you had typed on the terminal. So, explore it now and njoy!
Sunday, July 11, 2010
And this is my favourite sound theme
It's from the movie Braveheart , a masterpiece. The sound track has been composed by James Horner who also composed for movies like Titanic, Avatar,The Karate Kid...
Thursday, July 8, 2010
Adding a new java library to Netbeans
hi, i needed to add a new java library to NetBeans so that it becomes easier to code. I just couldn't get it how to do it ,then finally i got the solution on irc.
here are the steps so that you don't feel harassed the next time :)
1. Save the folder in the home directory, e.g /home/yourloginname.
2. Now, open NetBeans, go to the Project you've created and there you'll find the Library. There you can add a new Jar file .
3. To add the docs you need Library Manager which is under Tools. There in the Javadoc tab you can add the doc folder.
4.. Then you also need to add this folder under the same library package as you added the Jar file
That's it , njoy coding .
Hope that was useful. :)
here are the steps so that you don't feel harassed the next time :)
1. Save the folder in the home directory, e.g /home/yourloginname.
2. Now, open NetBeans, go to the Project you've created and there you'll find the Library. There you can add a new Jar file .
3. To add the docs you need Library Manager which is under Tools. There in the Javadoc tab you can add the doc folder.
4.. Then you also need to add this folder under the same library package as you added the Jar file
That's it , njoy coding .
Hope that was useful. :)
BOTS BOTS
hello, i wanted to make a bot for our channel on IRC . At first i thought that Perl would be quite useful and is the most preferred language specially for this purpose but why learn new semantics when Java is at rescue? Yes, there is this pirbot module in java which has all the functionalities to help you build it.
Thanks Java :)
P.S: It's always better btw if you learn more languages. I was in a hurry though.
Thanks Java :)
P.S: It's always better btw if you learn more languages. I was in a hurry though.
Subscribe to:
Posts (Atom)