Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,704 members, 7,809,680 topics. Date: Friday, 26 April 2024 at 12:58 PM

Codeaddict's Posts

Nairaland Forum / Codeaddict's Profile / Codeaddict's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 16 pages)

Programming / Re: Programming Challenge For Beginners Competition Two N20000 -SEASON 2- by codeaddict(m): 9:49pm On Jul 19, 2014
------
Programming / Re: Programming Challenge For Beginners N20000 by codeaddict(m): 1:22pm On Jul 17, 2014
Errmn, Organisers, how exactly would you classify beginners? Or what yardstick could I use to tell if I'm a beginner?
Programming / Re: Programming Challenge For Beginners Competition Two N20000 -SEASON 2- by codeaddict(m): 8:43am On Jul 17, 2014
------
Programming / Re: Nairaland Programmers That Share Language And City In Common by codeaddict(m): 12:45pm On Jul 16, 2014
Location: Ogun
Languages: Java, Python, SQL, | PHP |
IDE: Eclipse
Programming / Re: How To Protect Your Mobile Apps From Reversed Engineering by codeaddict(m): 6:49pm On Jun 27, 2014
*dhtml:

Funny, but this looks like a newbie programmer for you. When you think that you have done a world-class application, the next thing is you start thinking all these kinda thoughts.
Abi
Programming / Re: How To Protect Your Mobile Apps From Reversed Engineering by codeaddict(m): 7:42am On Jan 09, 2014
Don't make the software. You can try, but it'll just make the reverse-engineering process more difficult, not impossible. wink
Programming / Re: Java Programmer Help Me Out With This Problem by codeaddict(m): 11:11am On Jan 05, 2014
dsypha: @codeaddict, Kambo is right. U shud had used an instance of the thread class or better still an executor. Good work bro, U tried.
Guys, cut me some slack. I only use cached thread pools when I'll be running more than one thread, or there's a risk that thread won't complete.
Programming / Re: Java Programmer Help Me Out With This Problem by codeaddict(m): 3:16pm On Jan 04, 2014
Computers / Re: Sending Executable Files Through Gmail by codeaddict(m): 5:30pm On Nov 27, 2013
You could also use Endow. It's an application that hides files behind files. So if an image or any other file is allowed. You could hide the executables or whatever else you intend to send, behind an image. The image could still be viewed with its original image content. And extraction could be done still with the same app. Here's a link to download - https://github.com/oduaht/Endow/releases/download/v1/Endow.jar

1 Like

Programming / Re: Help Needed In Java Programming Assignment Please!!!!! by codeaddict(m): 10:59pm On Nov 26, 2013
Okay, what you need is to write a Coordinate class, with two Integer variabes - the xPoint, and the yPoint. Make them instance variables that'll be assigned in your constructor.

Then write a CoordinateRow class, with a List<Coordinate> variable. You could use any other generic class that supports inserting and appending, such as ArrayLists.

Include methods that perform the addition of coordinates. These methods will perform the same thing. However, while one adds to the front of the List, the other adds behind. These methods will take a String argument in the form (x,y). Tokenize the argument string based on ',' and then construct a Coordinate class with the integer values of each of the tokens(you could trim the tokens if white spaces might be present). Then depending on which position the method adds values to, you add appropriately to the List.

Include a method (say AddCoordinates) in the CoordinateRow class that takes in a String parameter(rows), and an argument specifying position. The latter argument could be an integer, boolean or anything that tells you where it'll be added - in front or behind. This method would have to split the String parameter by spaces to get the string value of each coordinate point (in the form 5,4). Then for each token(coordinate), you call appropriate methods to add in front or behind.

This method (AddCoordinates) could be called in your CoordinateRow constructor, with an argument to place it behind, thus effectively creating your initial row.

1 Like

Programming / Re: Help Needed In Java Programming Assignment Please!!!!! by codeaddict(m): 10:23pm On Nov 26, 2013
What have you done so far?
If we all behaved this way while learning, nobody would be able to solve this, then.
Attempt something, no matter how small, it may seem. Then post it here, I'll correct, if it needs correction, and give you pointers.

1 Like

Programming / Re: HELP On Connecting Netbeans To A Database by codeaddict(m): 8:54pm On Nov 25, 2013
Have you added mysql connector/j to your build path?
Gaming / Re: Computer Games To Try Out Before The Year Runs Out by codeaddict(m): 7:51pm On Nov 22, 2013
NFS: Rivals is out. crack, though, isn't functioning well. So I've not been able to play smoothly. However its opening is tight!
Software/Programmer Market / Re: Java Developer Required by codeaddict(m): 4:59pm On Nov 22, 2013
One question, Can I work remotely?
Programming / Re: Java Programmers; I Need Your Help Urgently Pleaseeeee by codeaddict(m): 11:10am On Nov 21, 2013
Chiscomax:

all right... swing it is then. so mr code addict, what apps be u created so far? do you think it is possible to study comp sci in msc after doing mech engr in bEng?

You don't really need to study computer science formally, if you're going into programming.
You can find some of my stuff at github.com/oduaht
Programming / Re: Java Programmers; I Need Your Help Urgently Pleaseeeee by codeaddict(m): 11:01am On Nov 21, 2013
Chiscomax: codeaddict, it is a software that predicts the answers to calculations even before you solve them and all predictions tested are correct so stop laughing at me....
Why the euphemism? Prediction, calculation, solving, it all still translates to one thing - Your application performs addition calculations.
Trust me, some of us have been where you are, done crazier sshit without building GUIs to showcase distribute them, so try to follow the advice others have given. Learn swing, which might open your eyes to other stuff, then if after doing all that, you still feel the need to create a GUI for your Prediction app, then go ahead.
Programming / Re: Java Programmers; I Need Your Help Urgently Pleaseeeee by codeaddict(m): 9:10pm On Nov 20, 2013
IamRoboPhil:
Look who's talking....... You did crazier shit when you were a newbie
grin grin grin grin

1 Like

Programming / Re: Visual studios and java by codeaddict(m): 6:10pm On Nov 20, 2013
bigdot1759: pls what's yhe different btw Visual studio & C#, & can someone use python to develop such healthcare system
It's possible with Python.
Programming / Re: Java Programmers; I Need Your Help Urgently Pleaseeeee by codeaddict(m): 5:49pm On Nov 20, 2013
Addition calculations? And you're already planning to create a GUI? grin
Boy, aren't you ambitious?

1 Like

Programming / Re: Java Code For Weather by codeaddict(m): 2:42am On Nov 19, 2013
nebecj: I need a help
What have you done so far, then?
Programming / Re: I Feel Bored As My Skills In Programing Might Waste! by codeaddict(m): 5:33pm On Nov 18, 2013
dovercomer:

Pls can you recommend a free hosting server
Host1Free. It's the best free stuff you're gonna get.
Programming / Re: Java Code For Weather by codeaddict(m): 11:45am On Nov 18, 2013
You need help, or need soneone to do it for you?
Programming / Power Monitor Lite - PC App by codeaddict(m): 9:53pm On Nov 14, 2013
So, every night, before I sleep, I try to queue some downloads, cos light in my area's kinda stable at night.
Anticipating the inevitability of the electricity supply going off, I created a special power plan that hibernates my pc at a specific percentage level.
Two days ago, I queued some downloads, slept off, only to wake up to find my computer out of juice.
Reason - I dozed off, while watching a movie, and forgot to switch power plans.

Pissed off at this, and finding nothing better to do, wink I decided to write an app to solve my issues. Could be useful to somebody else.
It's hosted on GitHub
It's written in Java, so you'll need Java Runtime Environment. Optimal Graphics with JRE 7.
Here's a direct link to the jar file, for those unable to get it from GitHub.

How It works
=============

There are two sorts of monitors available.
One of the monitors listens for AC Power cable detachment or Power supply interruption.
When this monitor is used, action is triggered only if power goes off, or power supply to the computer is interrupted.

The second monitor triggers action, when the Battery percentage level is below the specified value. Thus it keeps
checking the battery percentage, until battery percentage level is below the specified level, and acts only if
it's lower than that which was specified. This monitor is ineffective when the AC Power Cable is plugged in.
Cos, it's of no use, then, right? ;-)

An interval could be set for when action is performed after requirement has been met.
This means that you could choose to hibernate/shutdown your pc after a specific time has passed from when the action
is triggered. For example, if I decide to specify an interval of 30 seconds, on the AC Power monitor, it means that
when power supply is interrupted, the app will wait for 30 seconds before hibernating or shutting down my pc.

The interval is placed to allow for a situation in which power supply is restored before the interval expires.

Essentially, if power supply is interrupted, and ten seconds into the interval, it's restored back, action (hibernating/
shutting down) is deferred, until power is interrupted again, and then the process of monitoring begins all over.

The selected monitor could be stopped at anytime.

----------------------------------------------------------------------------------
P.S: My repo's pretty boring, so no peeping. Get the monitor, and leave there! grin grin

3 Likes

Programming / Re: I Want To Learn Programming. Which Language Should I Start With? by codeaddict(m): 8:29pm On Nov 14, 2013
Ajibel: @bigdot1759, have u downloaded python and installed it alreadi And did u attempt to get any pdf tutorial too
And thanks for ur concern, doe I have my 'night' sleep mostly during the day smiley

@dsypha, lol I understand you, buh its just a normal greeting, it shouldn't get your worried smiley kiss
You're joking, right? Or are you actually admitting to being female? sad sad

1 Like

Programming / Re: Java-problems by codeaddict(m): 4:26pm On Nov 09, 2013
A lot of things could cause that. One of the more prominent causes in your code is trying to find the root of a negative number
Programming / Re: Done by codeaddict(m): 8:02am On Nov 09, 2013
boykelex: Thank you very much boss....can I have your facebook or twitter username Once again Big Thanks for the Help
PM
Programming / Re: How Will I Instal Jdbc Mysql In Eclipse by codeaddict(m): 4:45pm On Nov 08, 2013
jboy01:
Yeah because I already have mysql installed for my vb.net, I also have jcreator( about 5.1 megabyte) installed. But it is still not working
Get the sql connector for java, preferably the zip archive.
Whenever you need to connect to a database in Eclipse IDE, you'll need to include the mysql-connector jar file (could be found on the zip archive) in the Build path for your project.
Or you could copy the jar file and paste on the lib/ext folder where you installed your jre.
Programming / Re: How Will I Instal Jdbc Mysql In Eclipse by codeaddict(m): 12:57pm On Nov 08, 2013
jboy01: Pls am using eclipse in coding a small application that involve connection to database, pls how will I instal jdbc mysql driver on my eclipse?
Still need directions?
Programming / Re: Done by codeaddict(m): 5:37pm On Nov 07, 2013
Something that works:

Replace wink with )

'''
Created on Nov 7, 2013

@author: _where
'''
def ex4(x,y):
colWid = str(len(str(x ** y))) # column width
for i in range(x):
for p in range (y):
print('%s' % ('%' + colWid + 's') % (i+1)**(p+1), end=' ')
print('\n')

def ex5(x):
for k in [x for x in x.split(' ') if x != '']: print(k)

def ex6(x):
a = [0,0,0,0,0] # store number of occurrence of each vowel
b = ['a', 'e', 'i', 'o', 'u']
for c in x:
if (c == 'a' or c == 'A'):
a[0] += 1
elif (c == 'e' or c == 'E'):
a[1] += 1
elif (c == 'i' or c == 'I'):
a[2] += 1
elif (c == 'o' or c == 'O'):
a[3] += 1
elif (c == 'u' or c == 'U'):
a[4] += 1
else: pass
if (max(a) == 0): print("No vowels in text"wink
else:
e = [d for d in range(5) if a[d] == max(a)]
for f in e: print(b[f], '-->', a[f])

def ex7(x, key):
z = ' '
for a in x:
if a == ' ':
z += a
else:
z += chr(((ord(a) - 97 + key) % 26) +97)
print("Encrypted/Decrypted value --> ", z)

def ex8(x):
lst = []

# check if input is a valid expression for the reverse polish notation
for a in x:
if ((a.isdigit()) or (a == '+') or (a == '*') or (a == '-') or (a == ' ')): pass
else: print("Invalid character in string --> ", a); return

for a in x:
if (a.isdigit()): lst.append(a)
elif (a == '+' or a == '*' or a == '-'):
if len(lst) >= 2:
t = int(lst.pop())
lst.append((eval('int(lst.pop()) %s t' % a)))
else:
print("Invalid input. Length of stack should be greater than or equal two"wink
return
else:
print("Invalid character in string --> ", a)
if len(lst) == 1: print(lst[0])
else: print("Invalid input. Final length of stack should be one"wink

# Used to test the functions.
"""
if __name__ == '__main__':
print ("Exercise Four: "wink
x = (int)(input("How many rows do you want?"wink)
y = (int)(input("How many columns do you want?"wink)
ex4(x,y)

print("\n\nExercise Five: "wink
ex5(input("Enter line of text >>> "wink)

print("\n\nExercise Six: "wink
ex6(input("Enter line of text >>> "wink)

print("\n\nExercise Seven: "wink
x = input("Enter string to encrypt/decrypt >>> "wink
key = (int)(input("Enter Key >> "wink)
ex7(x,key)

print("\n\nExercise Eight: "wink
ex8(input("Enter string >>> "wink)
"""
Programming / Re: Please I Need Help On This Task on java by codeaddict(m): 1:56pm On Nov 07, 2013
xtianh:

how to assign values to a selected item. like if the items are A,B,C. when the user selects A, i want A = 5 * 2;
then the result which is 10 be displayed on a jtextfield
Something similar to this:

import javax.swing.JTextArea;
import javax.swing.JFrame;
import javax.swing.JComboBox;
import java.awt.event.*;
import java.awt.FlowLayout;
public class GPA extends JFrame implements ItemListener
{
private JComboBox<String> combo;
private JTextArea textArea;
public GPA()
{
setLayout(new FlowLayout());
String[] options = {"A", "B", "C", "grin", "E"};
combo = new JComboBox<String>(options);
add(combo);
textArea = new JTextArea(2,15);
combo.addItemListener(this);
add(textArea);
textArea.setText(10 + ""wink;
pack();
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void itemStateChanged(ItemEvent e)
{
switch(combo.getSelectedIndex())
{
case 0:
textArea.setText(10 + ""wink;
break;
case 1:
textArea.setText(8 + ""wink;
break;
case 2:
textArea.setText(6 + ""wink;
break;
case 3:
textArea.setText(4 + ""wink;
break;
case 4:
textArea.setText(2 + ""wink;
break;
default:
break;
}
}
public static void main(String[] args)
{
GPA newV = new GPA();
}
}



Replace grin with D
Replace wink with )

1 Like

Programming / Re: Please I Need Help On This Task on java by codeaddict(m): 10:42am On Nov 07, 2013
What exactly do you want answers to?
How to assign values based on a selected item? Or how to append text to a JTextField?

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 16 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 45
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.