₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,438 members, 8,511,846 topics. Date: Monday, 02 November 2026 at 12:03 PM

Toggle theme

Javarules's Posts

Nairaland Forum › Javarules's Profile › Javarules's Posts

1 2 3 4 5 6 7 (of 7 pages)

Programming › Re: Facebook by javarules(op): 10:17am On Aug 04, 2009
Thank you so much. Facebook has become an annoying part of my life on a daily basis. The thing is I dont really know why people love such things. gross i say
Politics › Re: Boko Haram Suspected Financier Executed - Which Way Nigeria by javarules(m): 3:34pm On Aug 01, 2009
Summary Execution is lawful, but that doesn't mean it should be employed in all cases. It is wrong to kill people without giving them the benefit of doubt.
But this is my submission.

We all know what Nigerian Police is? a bunch of blood thirsty bastards, now add freedom to conduct Summary Execution to that and what you get is SAVAGES. The Nigerian government know this fact, they also know that to curb the activities of savages who kill people in the name of religion(talk for another day), they will need to release savages on them, this is in line with the yoruba proverb "Omo ina la ran si'na". This executions, even if it is carried out on innocent citizens will place fears in the hearts of many like those savages who believe religion is a libel for committing murder. This is not the first religious crisis in the north, and we all know who attacks who, we know which set of religious order wake up one morning and feel like killing and they go ahead and do it, maybe partly because they know that they will get away with it. partly because they have always been getting away with it. So in this wise I support the Nigerian government.

And right now lets assume for a moment that you or me is Mr. President, what will you/me do? Will I arrest these guys, give them a fair trial during which their very good lawyers will claim temporary insanity or any of those lawyer lies and allow them get away with it. Will I unleash terror upon terror? Will I attempt dialog? What will I do?

If we consider these possibilities we will know that we are living in hard times. Militants in the south, now another set of militants are rising in the North. Can I give them their demands, just like we are trying to do with our southern militants, what exactly is the way to go. ASUU is on strike. PHCN is not working. My health is failing me. Senate is always on my neck,

People, what we are facing is a gross degeneration of law and order, fostered by 20+ years of bad administration. These things might continue like this for the next 20 or 30 years, maybe NIgeria will never make it out of it in one piece. But as many of us that are learned and know what is right should spend the bulk of our energy preaching peace. I want to believe that whatever decision the Government have taken in this wise is in their eyes the best. For some of us who have been fortunate enough to lead at one point or the other, we know what hard such a task is. Lets stop bashing our government for us and try to see the world through their eyes. As of today, all hope is not lost, lets all wake up each day and chant God Bless Nigeria.
Programming › Facebook by javarules(op): 2:47pm On Aug 01, 2009
how can i un-subscribe from facebook
Gaming › Carmen by javarules(op): 5:46pm On Jun 07, 2009
I am looking for carmen santiago, its this game where you are a cop and u pursue thiefs around, the game gives u a specific time during which you must apprehend the thief, its one of the most educative games I have ever played, please anyone still have it?
Programming › Re: Learn Java Programming Here Easily by javarules(m): 12:18am On Mar 16, 2009
And please those of us posting code here, lets learn to put line numbers and use the "[code][/code]" tag.

Or better still post your code at www.pastebin.com, then give the url here, tx
Programming › Re: Learn Java Programming Here Easily by javarules(m): 12:16am On Mar 16, 2009

1 public class ApplicantCollection
2 {
3 Applicant appObjects[];
4
5 public ApplicantCollection()
6 {
7 appObjects = new Applicant[3];
8 for(int ctr = 0;ctr != appObjects.lenght;ctr++)
9 {
10 appObjects [ctr] = new Applicant();
11 }
12
13 //Applicant 1 Details
14 appObjects[0].applicantName = "Tom";
15 appObjects[0].applicantAddress = "David Road";
16 appObjects[0].applicantPosition = "Manager";
17
18 //Applicant 2 Details
19 appObjects[0].applicantName = "James";
20 appObjects[0].applicantAddress = "David Ave Street";
21 appObjects[0].applicantPosition = "CEO";
22
23 //Applicant 3 Details
24 appObjects[0].applicantName = "Kelvin";
25 appObjects[0].applicantAddress = "David Road ways";
26 appObjects[0].applicantPosition = "Supervisor";
27 }
28
29 public void displayCollection()
30 {
31 for(int ctr =0;ctr != appObjects.length;ctr++)
32 {
33 appObjects[ctr].displayDetails();
34 }
35 }
36
37 public static void main( String args [])
38 {
39 ApplicantCollection collectionObject;
40 collectionObject = new ApplicantCollection();
41 collectionObject.displayCollection();
42 }
43 }


You will notice one small alteration above, your own program is missing line 35, before the public static void main(String args[]) put a }

The code still did not compile because class Applicant on line 3 can not be found.
Programming › Re: Auto Respond Message By Using Gmail Smtp For Form Submit by javarules(m): 12:09am On Mar 16, 2009
Traditionally if you host have a server configured, i mean a mail server


<?
$to = "webmaster@php-scripts.com";
$from_header = "From: $from";
if($contents != ""wink
{
//send mail - $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
header("Location: $HTTP_REFERER"wink;
}
else
{
print("<HTML><BODY>Error, no comments were submitted!"wink;
print("</BODY></HTML>"wink;
}
?>


But if not, u will want to specify your own server connections to use right?

I use linux so the first solution I will profer is one that works on linux, there is a PEAR interface called Mail. I dont know if it is included on windows or not, but on linux, if u insatll PHP Pear, then this code will work


<?php
include("Mail.php"wink;
/* mail setup recipients, subject etc */
$recipients = "feedback@yourdot.com";
$headers["From"] = "user@somewhere.com";
$headers["To"] = "feedback@yourdot.com";
$headers["Subject"] = "User feedback";
$mailmsg = "Hello, This is a test.";
/* SMTP server name, port, user/passwd */
$smtpinfo["host"] = "smtp.mycorp.com";
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "smtpusername";
$smtpinfo["password"] = "smtpPassword";
/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);
?>


I found this blog while googling, I never tried it I hope it works
http://deepakssn..com/2006/06/gmail-php-send-email-using-php-with.html

last option, go inside the php.ini file and tinker with the configuration in [mail function] section.
Programming › Re: Programming An Ivr Application Made Easy by javarules(m): 11:55pm On Mar 15, 2009
you could have posted the link.

But sending sms to short code, I used to think that you have to get the shortcode from your provider(mtn,zain, glo etc). if I understood you well, you are saying we dont need to get the short code from the service providerhuh

I am really interested in this, I already built some IVR apps using asterisk, i want to know if it can be done easier and better

Thanks in advance
Programming › Re: An Algorithm To Answer Prayers by javarules(op): 5:15pm On Mar 03, 2009
was hoping someone might come up with a good algorithm too
Programming › Re: An Algorithm To Answer Prayers by javarules(op): 3:45pm On Mar 03, 2009
is this such a very difficult algorithmhuh??
Programming › An Algorithm To Answer Prayers by javarules(op): 10:55am On Feb 26, 2009
Lets say you are approached by the CTO of heaven as a programmer to design an algorithm to answer prayers.

The algorithm should be able to handle conflicts in prayers, like if two people ask two opposite things(e.g one ask that obama should not be president and another ask that he should be). The algorithm to resolve conflicts and answer prayers must include conditions like

How religious is the person. (scale of 1 to 100)
How often he/she prays. (scale of 1 to 100)
Is past prayer records, has he/she has a history of answered prayers(scale of 1 to 100), has he/she been known to ask seemingly unrealistic things (scale of 1 to 100)
etc
You should also take care of special people like the widows, fatherless and motherless, poor, disabled and people who are praying for forgiveness of sins. These people are given precendence.
To complete this algorithm, you should also take into considering through whom the prayer was offered, Holy Mary, Jesus, Muhammed or Angels
(priotize this as you may wish on a scale of 1 to 100).

Finally write a program to test this algorithm, giving all possible scenarios to your tests.
Programming › Simple Javascript Form Validator by javarules(op): 11:54pm On Feb 24, 2009
Now you will say what's the point in writing another javascript validator? you are right, but what if when the javascript validators that you find that works are always too large for comfort? Your page recieves some thounsands or millions hits per day and the validation plugin alone is eating up the bandwidth, then its time to look inwards and right something that's small, and that works

I started writing this some two weeks ago, adding to it as my project requires, now that the project is nearing completion., I think its time to contribute it to where it actually came from, OPEN SOURCE.

So if you need a javascript validator thats small, and just works out of the box, then check out this

as usual, project hosted on gitorious, sourceforge coming soon

http://gitorious.org/projects/validator
Programming › Re: How Do Adobe Build Software by javarules(op): 9:42am On Feb 10, 2009
grin it depends on who you think adobe is/are. I think adobe is not a singular entity, anyway thanks for the correction.
Programming › Re: How Do Adobe Build Software by javarules(op): 8:15am On Feb 10, 2009
I just told a friend that if architects build houses like adobe build softwares, then we probably would have run out of earth space

@paule
Yeah I understand, but they should do something and do it fast, no one wants bloatwares
Programming › How Do Adobe Build Software by javarules(op): 1:24pm On Feb 09, 2009
I have written something like this sometimes ago, but some people wont just stop

How do adobe build softwares. like they build houses?

Everything in technology is getting smaller, smaller softwares, smaller chips, smaller workforce etc
The only thing thats getting bigger is performance, but not so with Adobe

just look at this.

Flex builder 425Mb VS Netbeans(the whole package php, java, fx, css, javascript, c/c++, python etc) 200Mb
Flex builder Ecplipse Plugin 300MB VS Ark Linux(whole operatiing system) 200+Mb
Flex Builder Linux eclipse plugin 177Mb VS Netbeans6.5 for javafx 65Mb
Acrobat 9(a dvd, dts a massive 4gig), sumatra pdf reader(less than 5mb) open office can create pdf, okular can do all the funky stuffs too(okular + openoffice is less than 500Mb)

please whats the sense in building softwares as if you are constructing WTC. Someone should talk to adobe software developers, maybe they do more copy-pasting than coding.
Programming › Re: Jarminal - Java Interactive Shell by javarules(op): 8:26am On Feb 05, 2009
yeah python has some power, so is every language if u ask me.

the rpm is here

http://www.filefactory.com/file/afg1g7e/n/jarminal-0_1-1_i386_rpm

if u use debian, just install alien and use alien to convert it to a deb file
Programming › Re: Please Help On This Topic 2 Pass Assembler by javarules(m): 7:32pm On Feb 03, 2009
now I understand, a 2 pass assembler, let me dig up some of my U.G stuffs will get back 2 u b4 dis time 2mr
Programming › Re: Nigerian Programming Real-time Irc by javarules(m): 5:49pm On Feb 02, 2009
i'm down with it
Programming › Re: Principles Of Great Coding by javarules(m): 5:48pm On Feb 02, 2009
TEST TEST and TEST

Tests have saved my a55 on more than several occassions
Programming › Re: Please Help On This Topic 2 Pass Assembler by javarules(m): 5:48pm On Feb 02, 2009
your question is too vague. I guess pass should be parse, and even then it still makes for little understanding,can u post the complete question, or a more descriptive one
Programming › Jarminal - Java Interactive Shell by javarules(op): 5:46pm On Feb 02, 2009
Jarminal is to Java what the python shell is to Python

Now jarminal is a linux tool. I will only just post the man page here. Any linux person should be able to read the man page and understand what it does.


jarminal(1)                        Jarminal                        jarminal(1)



NAME
jarminal - a java interactive shell

SYNOPSIS
jarminal [option] [command]

LICENSE
GNU General Public License

DESCRIPTION
jarminal is a java interactive shell.
Jarminal emulates the python shell and provides a means of executing
java commands interactively.
The normal procedure to executing the smallest java code is

· create the java file

· compile the java file

· execute the java class created from step 2 above

This might not be effective if all you want to do is test if a small
code snippet will work or not.
This shortcoming has been the strenght of languages like python where
you can test some code snippets
before you finally include them in your project.
Jarminal makes this interactive shell functionality available to java
programmers too.


OPTIONS
-e | --execute escapedstring You can use this option to execute a java
code without starting the interactive terminal

SAMPLE jarminal -i "System.out.println(\"Hello World\"wink;"
NOTE that the Hello World is escaped, and the final semi-colon
is inside the string

-i | --interactive This command will start the interactive terminal.

In this mode, you dont have to escape strings
Classes can be defined and they are available throughout the
interactive session
class declaration can span multiple lines
You can import java packages and they are available throughout
the session
Except for the above, previous commands dont have any effect on
the new command
To execute a block of code (normally across multiple lines) use
a open and close brace { }
Control Structures can span multiple lines

SAMPLE
jarminal>> System.out.println("Hello World"wink;
Hello World
jarminal>> public class One {
public void writeSomething(String something) {
System.out.println(something);
}
}
jarminal>> new One().writeSomething("jarminal is sooooooo
cool"wink;
jarminal is sooooooo cool
jarminal>> for(int i=0; i<5; i++) {
new One().writeSomething(String.valueOf(i));
}
1
2
3
4
5
jarminal>> import javax.swing.*;
jarminal>> JOptionPane.showMessageDialog(null, "jarminal on
steroids"wink;
jarminal>>exit

-h | --help [fqcn]

Displays a minimal description of how to use jarminal if fqcn is
not supplied
fqcn - Fully Qualified Class Name.
If a fully qualified class name is provided e.g
java.util.Hashtable jarminal displays a javadoc help page.
But for this to work, you have to configure the java doc path in
the config file /etc/jarminal.conf

The javadoc help functionality can also be invoked from the
interactive shell.

SAMPLE jarminal>> help java.awt.Dimension




FILES
/etc/jarminal.conf



0.1 02 February 2008 jarminal(1)


The source code is available on github.
www.github.com/segun/jarminal
you can get the rpm too there.
Programming › Re: Java Help by javarules(m): 4:19pm On Jan 30, 2009
dts simple


import javax.swing.*;

public class FrameOne extends JFrame {
public FrameOne() {
setSize(200,200);
setVisible(true);
}
}

public class FrameTwo extends JFrame {
.
.
.
.
//in the onclick of the button
new FrameOne();
}
Programming › Re: Java Plz:someone Help Me Out by javarules(m): 1:48pm On Jan 28, 2009
your best bet is to bundle ur mysql and javadb clients with your installer, so that when u install your app, the database clients too will be installed.

The you create a script that creates the tables and puts temporary data inside them. After your installation, run the script. chikena
Programming › Re: Jsps N Servlets Sos by javarules(m): 1:42pm On Jan 28, 2009
loads of examples online

do this

write an hello world(servlet, jsp)
write a database CRUD(servlet, jsp)

then u are good. If already know java, databse access shouldn't be a problem right? and if u alre3ady do php, then u know all there's to know
Phones › Re: Unlock Your Iphone In Less Than 30mins by javarules(op): 8:33pm On Jan 27, 2009
@ex
Now look at who is talking
How many days does it take you to look up those words in the dictionary?
and for your information mr substantial means of income
try google for me, and u will be shocked

your foul tongue sure must get u flame war
how else can one like u survive without those tugs of war
and please can someone remind my inferis that this aint no english class
we are not moved by your show of meaninigless class

as for the darts, rocks and paper
you could have just kept ur mute if the truth is not hitting u harder
but of course you can't u are addicted to purr like the cat
even if u are no provoked, u provoke urself, now dat is badass

a fool is a fool no matter what u do
i have gone a mile wit u, I dont need two
it only takes a moment with u
and everyone will admit that its true

I'll always be here, this is my post
If you cant live with that, go burn urself up
and I'll not be surprised if it takes another 2 weeks to reply
till then I'll just be on standby

@other
if u must quote me, please stop being a caricature
i'll better u not quote me, I aint the scripture
Phones › Re: Unlock Your Iphone In Less Than 30mins by javarules(op): 4:24pm On Jan 25, 2009
@naijafan

I tot u are the moderator?
man, wu would hav put shit in the elevator!
and if u ever attended nursery
u'll never assume mine lyrics is primary

as for the improvements u suggested
i'll gladly take it and put in some investment
but for you, I think you've arrived
there's really nothing from you to be improved

@cannibal
if you think you got it, please flaunt it,
tell me what's english language in all you've be saying
nothing. just some pieces of words u gleaned from the dictionary

and if u're hurt that I call u a cannibal,
i understand, the truth always hurts that bad
and for your contributions to nland
i think they are all written on sand

I never called u here in the first place
Its my post and u got no case
If only ur "tiny insect mind" friend hav got the gut to reply
well I think he finally knows wu make the rules and who abide

@flyuche
when pple ask for trouble, let them av double
i appreciate ur sagacity, like they said, its "abinibi" not ability
and when someone calls u a mosquito, let him be
it only shows a brain that must be very tiny.

@whois
U need to read this thread wholly to see wu actually is the trouble maker

I put up an advertisement, aint commiting no felony
and some pple think nland is a private property
hummph. That is really "royal suckrage" it sucks balls.
Phones › Re: Unlock Your Iphone In Less Than 30mins by javarules(op): 10:01am On Jan 24, 2009
@cannibal
I am so sorry I was mispelling your name all these while wink

@flyuche
I wonder what is their own, if you dont need my service, dat doesnt mean others wont,
Fine I am selling sand, and u keep whinning its free gift of nature. Let those who want to buy it buy it.
Its a capitalist world, everything sells, except of course cannibals cheesy
Phones › Re: Unlock Your Iphone In Less Than 30mins by javarules(op): 6:18pm On Jan 22, 2009
@cabali
Better watch your tongue too, those lines that shut inferis up aint finished yet
Phones › Re: Unlock Your Iphone In Less Than 30mins by javarules(op): 8:09am On Jan 22, 2009
@ex
Oh now you are amused?
please dont be bemused

This is just to put things in perspective
You think your game is being abusive
Your wrong punk, you just messed with an explosive
After am through with u, u'll think I'm corrosive

Not that I give a hoot about a tout like you
Your only pain is that u've been tamed
If I really wanna make u feel bad, I'll simply call u a man.

About the name calling, I now know its ur calling
when u said dork, I tot u wanted an australian fish
but when u said dweed, I know u are talking about u

For the other names dt's got no meaning,
U are just being yourself, stupid as a dick
And right now u are thinking i'm an egghead
Its ok too
when u got yolk for a brain, everything looks like egg

For all that it's worth, u are simply like the mad man
In his distorted mind, everything is exactly what he is.
Phones › Re: Unlock Your Iphone In Less Than 30mins by javarules(op): 12:42pm On Jan 21, 2009
will be surprised if you didnt reply,

but was so disappointed with the reply, I expect something much more from someone who knows what dweeb and dork means? did u run out of vocabs, because insect mind is so so lame. common big boy, show me what u got.

and for your info, I think armadillos might be offended for comparing something like you to them, in fact now I know u got no brain of ur own at all, please try and get one before ur next post
Phones › Re: Unlock Your Iphone In Less Than 30mins by javarules(op): 11:13am On Jan 21, 2009
@ex

and how on earth did I fail to notice. you damn inferiority complex is written in black and white, no wonder you are Inferis
Phones › Re: Unlock Your Iphone In Less Than 30mins by javarules(op): 11:10am On Jan 21, 2009
@ex, you want a play of words? then u got it
I think you are just a proud idiot

proud because you hate to admit you have been played, yes I played you and cabali to posting here, You know I have achieved my aim, but you are just too proud to accept it, you think like every 9 yr old sullen, over spoilt child that by calling people names and using abusive language, you can win back that pride, no you lost punk, and you better start to admit it

I think you must be a very clueless fool too, cos part of being wise is admitting that sometimes you are not almighty, they way you go about it, I see a child in a mans suit.

or rather an armadillo

1 2 3 4 5 6 7 (of 7 pages)