₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,388 members, 8,450,094 topics. Date: Wednesday, 22 July 2026 at 07:10 PM

Toggle theme

Fayimora's Posts

Nairaland ForumFayimora's ProfileFayimora's Posts

1 2 3 4 5 6 7 8 ... 37 38 39 40 41 42 (of 42 pages)

ProgrammingRe: Please Read by Fayimora(op): 1:53pm On May 02, 2011
Hehehe cool , Am enjoying it!
ProgrammingRe: Help On Java by Fayimora(m): 1:22pm On May 02, 2011
You probably want to look up Maps, Thats exactly what you need to give the perfect algorithm. Its also designed to help in problems like this
ProgrammingRe: Help On Java by Fayimora(m): 1:12am On May 02, 2011
Alright, so what do you have and what do you want to do?
Tech JobsRe: Php Programmer Needed by Fayimora(m): 1:01am On May 02, 2011
It would help if you can tell them what they are needed for. Then someone can know if he is capable of handling the task or not
ProgrammingRe: Help On Java by Fayimora(m): 12:55am On May 02, 2011
Segs has a better knowledge of my code. I appreciate your help.
Lmao, wow! but thats a bit harsh on those that wanted to help and I would have fallen into that cause i wanted to help. Would get Segs for you now,
ProgrammingRe: Help On Java by Fayimora(m): 8:24am On Apr 29, 2011
Just feeling the comment man!
ProgrammingRe: Please Read by Fayimora(op): 12:14am On Apr 29, 2011
Yope cool,
ProgrammingRe: Help On Java by Fayimora(m): 12:13am On Apr 29, 2011
Thanks, good to have a genius like you here, you're the ONLY useful person here on nairaland!!
Hehehe !!!!
ProgrammingRe: Please Read by Fayimora(op): 7:43pm On Apr 28, 2011
By the way its "Zukerberg" not what you called him
ProgrammingRe: Please Read by Fayimora(op): 7:38pm On Apr 28, 2011
Funny comments, Your question should have been "Can i see what you have developed?" and not what ur saying. You really dnt understand what you mean by "internet is the future". You should do more research.
ProgrammingRe: Please Read by Fayimora(op): 11:03pm On Apr 24, 2011
@ sisqology
Thanks man, Same here view my profile and add me wherever you can.
ProgrammingRe: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by Fayimora(m): 4:07pm On Apr 24, 2011
funny  cheesy
ProgrammingRe: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by Fayimora(m): 3:40am On Apr 24, 2011
Yope thats exactly what I said and meant. I participate in about 10 different forums online and thats the way it goes. You have a problem, then start it, brea it down yourself until you understand where exactly the problemis rom. Someone without analytical skills can never be a programmer. He/She just knows how to write code.

Now, of course you might not be dat strong but you have tried. the next thing is for you to post your possible solution(which would be incomplete) and state what problem you are having. Now someone should be able to tell you what you need to know or how to go about it without direct code. From there you think again and solve the problem. If at l you have any problem along the line, you come back.

Correct me if am wrong but am sure this forum is not meant to teach you how to use a language but how to program efficiently. You wanna put four buttons in a row? Thats fine but do you even know how to create the button? No, the go back to the java tutorials and check it out.lol

Its like a doing recursion and having loops and if's in-between.
ProgrammingProgramming Projects (individual) by Fayimora(op): 3:29am On Apr 24, 2011
I have some Individual project specifications at hand and was thinking it would be nice if i shared it.

In the past 1yr I have been given 10 projects(School) and have completed them. I have completed about 12self-projects aswel. In essence I have about 30 Individual projects that am willing to offer but I would just like to know if anyone is interested in them. If so then I would list names and you just pick one and drop your email. I would then send you a specification of this project. Trust me on this its going to be fun and also you would learn a lot.

They are all applications. You can choose to make an applet(Java). Its all your choice but most of the projects require user friendly interfaces and also interactivity so the Java programmers would benefit more from this.

NB: If anyone is interested I would edit this post with a list of projects so please refer back to this post for the list.

Thanks

**********************************************************************************************************************
Project 1
http://webprojects.eecs.qmul.ac.uk/fbfb3/Suggestion%201.pdf

Project 2
Mini-Payroll System

Project 3
Energy Visualization(difficult project)

Project 4
Fish Tank Simulation

Project 5
Car racing Simulation




Link to all projects,

https://github.com/fayimora/Projects
ProgrammingRe: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by Fayimora(m): 3:13am On Apr 24, 2011
Hahaha i like you man. Anyway it was not my intention as he "bullshitted" my pseudo-code without even giving it enough thought. I used the pseudo-code, implemented it and it worked. I wont post somefin am not 90% sure that it would work. Programming is easy once you learn to localize your problem.

I tried to make him see that but ,

I used you code and added about 7 lines to it. You can see it in full below.

import java.awt.FlowLayout;
import javax.swing.*;
 
  public class DisableRowButton extends JFrame{

    public static void main(String []args){
      new DisableRowButton();
    }
   


  private JButton buttons[][] = new JButton[12][15];
private JButton activebuttons[] = new JButton[15];

    public DisableRowButton(){
        super("Array of Buttons Controller"wink;
        this.setSize(1250, 400);
        this.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE);
        this.setLocationRelativeTo(null);
        this.setPreferredSize(new java.awt.Dimension(1250, 400));
        this.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
        this.setResizable(false);
        initComponents();
        this.setVisible(true);
    }

    private void initComponents(){
        for(int i = 0; i < buttons.length; i++){
            for(int j = 0; j < buttons[i].length; j++){
                buttons[i][j] = new JButton();//initialize each Jbutton
                buttons[i][j].setText(i + " * " + j);
                buttons[i][j].setPreferredSize(new java.awt.Dimension(80, 30));
                loadAction(i, j, buttons[i].length);
                this.getContentPane().add(buttons[i][j]);
            }
        }
    }

    private void loadAction(final int r, final int k, final int colCount){
        buttons[r][k].addActionListener(new java.awt.event.ActionListener(){
            public void actionPerformed(java.awt.event.ActionEvent e){
                for(int x = 0; x < colCount; x++){
activebuttons[x] = buttons[r][x];
                    // buttons[r][x].setEnabled(false);
                }
for(int i = 0; i < buttons.length; i++)
{
            for(int j = 0; j < buttons[i].length; j++)
{
if(buttons[i][j] != activebuttons[j]){
buttons[i][j].setEnabled(false);
}
}
}
            }
        });       
    }

}



The main difference lies here:

private void loadAction(final int r, final int k, final int colCount){
        buttons[r][k].addActionListener(new java.awt.event.ActionListener(){
            public void actionPerformed(java.awt.event.ActionEvent e){
                for(int x = 0; x < colCount; x++){
activebuttons[x] = buttons[r][x];
                    // buttons[r][x].setEnabled(false);
                }
for(int i = 0; i < buttons.length; i++)
{
            for(int j = 0; j < buttons[i].length; j++)
{
if(buttons[i][j] != activebuttons[j]){
buttons[i][j].setEnabled(false);
}
}
}
            }
        });       
    }


and an additional variable
private JButton activebuttons[] = new JButton[15];


It should be obvious what exactly am doing here. I have a new array of type JButton that is eventually hold the whole row that you want enabled when disabling others.

The previous code segs posted was disabling, now instead of disabling you store the row into the new matrix. Then you loop through every button and disable those that are not in the new matrix.

Thats exactly what my pseudo-code says but no one asked for more explanation on any part of it. Rather it was "bullshitted".

Fayimora
ProgrammingRe: Please Read by Fayimora(op): 2:03am On Apr 24, 2011
Am really grateful that someone has finally shared an experience. Like I said, imagine you just told him that hee needs to handle the button's event and you told him to look up "onClick" probably with a VERY EASY example. He wouldn't have come to you again with the same problem in a different context. In fact, in a way this is the fault of whosoever is learning. Why do you want a direct solution?

Thanks a lot man for sharing this.

p.s: please wats OP huh
ProgrammingRe: Pls Can Any One Point Me To A Solid Java Book On Networking by Fayimora(m): 1:38am On Apr 24, 2011
You are practically on the right path,

See this documentation for more details. Java EE is what you want.
ProgrammingRe: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by Fayimora(m): 12:43am On Apr 24, 2011
Hahaha cheesy cheesy  Funny you. You are the one who has to cool down and look at what you want to do. LOCALIZE THE PROBLEM.

Just so you dnt think am blabbin poo. Look at  the image below
https://img200.imageshack.us/img200/1732/screenshot20110424at003.png

Its funny how you have a problem and you decide to insult who is helping you. CHILDS PLAYhuh Wow!!! thats deep for a "programmer". As for me, I believe it is smaller than child's play. Every problem is child's play when you learn to localize it. Think about that.
ProgrammingRe: Please Read by Fayimora(op): 12:32am On Apr 24, 2011
Hmm its all good, Erryone at his/her own opinions but lets face it. There is always the right one.

Ciaoo
ProgrammingRe: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by Fayimora(m): 12:29am On Apr 24, 2011
Yeah we are saying the same thing, lol So wats the biggie, Use the pseudo code above and it would yield your desired result.lol
Good luck,

Spoiler: You dont need to add more than 8 lines of code to what you already have. hehe wink
ProgrammingRe: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by Fayimora(m): 12:03am On Apr 24, 2011
If I understand what you are saying(i already have my code that works), when a button is clicked(all buttons are set to true at first) all other buttons apart from the buttons on the row that contains the clicked button is set to false. Isin't this what you want to do?? Can't see whats complex about it.
Tech JobsRe: School Management Software by Fayimora(m): 11:07pm On Apr 23, 2011
You prolly need to see this one. 100% made in Nigeria. www.schoolsbox.com
Am super impressed,  Though its something that was designed wih flash if am not mistaken so its a web application, Nice one there, I really like it,  Dont you guys have like a 30 trial demo version or something,  If not I advise you add that because I believe you would make a lot of money from this software. If you do have a demo version then post a link or mail fayimora@hotmail.co.uk.



I can pave way for you into the British market grin grin
ProgrammingRe: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by Fayimora(m): 10:57pm On Apr 23, 2011
@segs,  Nice way to explain,  However, it would have been better if you explained without any code then when he/she gets PROPER stuck, then you pop in a lil part of code where necessary.

@csharp,   He gave you code that sets all the buttons in a row false and the rest remain true. But you want the opposite. I just wanted to ask, what should be the initial state of the buttons??

To achieve this, all you need do is this:

pseudo-code:
    loop through the whole multi-dimensional array
    check if the button you currently are on is one in the selected column
    if true then set false
ProgrammingRe: Please Read by Fayimora(op): 12:18pm On Apr 20, 2011
I never said Java is Bullshit. Java is one of the fastest growing languages now and its very interactive.


Take my example above, after just giving you the code, what do you want to build againhuh??
ProgrammingRe: Please Read by Fayimora(op): 12:49am On Apr 20, 2011
Ok since not everyone agrees let me use your point to explain what I mean.

Assume some comes and asks, "Please I want to read 20 lines from a file, each containing one integer, sum up the values and print out the result ". How do i go about this. I think I have seen more Java coe on this forum so I would use Java to explain.

Now for me, this is what I would tell that person.
Method 1.

     Import a file reader and use it to read each line from a file
     As you read each line, add the value to an accumulator variable.
     Dont forget to parse the value to an int as you read.
     immediately outside the loop print out the value of the accumulator.
     the accumulator can be a variable called sum of primitive type int.


Method 2.

     Import a file reader and use it to read each line from a file
     As you read each line, store the value into an array of type int.
     Dont forget to parse the value to an int as you read.
     Immediately outside the loop or in another method,
     Run another loop that sums up all the values in the array into an accumulator variable.
     Outside this loop or in a designated method, print out this value


Now as we all know there are so many ways of tackling this type of problem but I have just elaborated two algorithms.
Now what I have done above is give the person a head start. I have broken down the problem for you into pieces and everything else is easy.
This is not the way people do it on this forum which is wrong. You would not make a good software developer if you cant take a specification and break it down your self. But this takes a lot of time. However, someone breaks the problem down into pieces. You are not even a software developer if you cant use this pieces to build that software. I really don't know if you are are seeing what am pointing out.

If a question like this was asked on this forum, the next thing that follows is something like;

import java.io.*;

class NairaLand
{
public static void main(String[] args)
{
int sum=0;
try
{
BufferedReader buffer = new BufferedReader( new FileReader("fileName.txt"wink );
while( buffer.ready() )
{
sum += Integer.parseInt( buffer.readLine() );
}
System.out.println("The sum is " + sum);
}
catch(IOException e)
{
System.out.println(e);
}
}
}


Wel the code would work but what happens if the person comes across a similar problem in a different context. He/she would definitely not be able to solve this because he/she doesn't have the necessary analytical experience required. I just hope you all see the point in what am laying out.

Cheers
ProgrammingRe: Please Read by Fayimora(op): 11:01pm On Apr 19, 2011
Good one megaplaza, Anyways I would setup an online registration for the competition when the time comes. I would not be calling or mailing anyone.

Just so you all know. The competition would be strictly for PROGRAMMING LANGUAGES. No scripting language inclusive.
Need more info then contact me fayimora@hotmail.co.uk
ProgrammingRe: Please Read by Fayimora(op): 5:51pm On Apr 19, 2011
Depends,  How many are in? Minimum of 20! No web scripting language allowed, Strictly programming languages.
ProgrammingRe: Please Read by Fayimora(op): 5:03pm On Apr 19, 2011
@talk2hb1 funny enough you are my friend, lol
ProgrammingRe: Please Read by Fayimora(op): 2:59pm On Apr 19, 2011
Thannks for making the point clearer. If you read what's above someone has said web development is the demand in Nigeria. Don't you think its only the demand because they feel Nigerians don't have the algorithmic and analytical skillhuh How long are you going to watch companies go abroad to get software developers. Web development is nothing. Too many in that aspect that's why i just freelance.

Anyways i just hope one day that i would be understood properly.

Peace
Thanks
ProgrammingRe: Please Read by Fayimora(op): 6:51am On Apr 19, 2011
Am really glad you understood what i was talkin about. Am also really grateful for the info about the demand in Nigeria. As a developer, you know that this is really bad as software development should be taken into consideration a lot. It would be nice if we could talk privately. Either via email, a messenger, blackberry or anything else.


I can't stand you in programming! Reallyhuh?? Why won't i want to meet a guy like you. Hehehe.
ProgrammingRe: Please Read by Fayimora(op): 3:28pm On Apr 18, 2011
Web programming is easy? can you develop the underlying api's,all these dull mumu who learned how to program.

I am currently in a group where we re developing a new programming language. Web programming is EASY!!!!

1 2 3 4 5 6 7 8 ... 37 38 39 40 41 42 (of 42 pages)