Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

O I C.

Don't ask why I typed like that. O_o

Were you educated in the southern US? Perhaps you recall it from the reading test:

L.A. (Lower Alabama) 12th Grade Reading Test
Test 1                          Test 2
MR DUCKS                        MR SNAKES
MR KNOT                         MR KNOT.  MNO SNAKES.
SAR                             OSAR
CM WANGS?                       CM EDBD Iz ?
LIB                             OIC
MR DUCKS                        MR SNAKES

Test 3                          Test 4
MR FARMERS                      MR MICE
MR KNOT                         MR KNOT
SAR                             SAR
CMMT POCKETS?                   CM EDBD FEET?
LIB                             LIB
MR FARMERS                      MR MICE



-----ANSWERS TO L.A. READING TEST
        Test 1                          Test 2
'Em are ducks!                  'Em are snakes!
'Em are not!                    'Em are not!  'Em [ai]n['t] [n]o snakes.
[Y]es [th]ey are!               Oh, [y]es [th]ey are!
See 'em wings?                  See 'em itty-bitty eyes?
[We]ll, I'[ll] be!              Oh, I see.
'Em are ducks.                  'Em are snakes.
        Test 3                          Test 4
'Em are farmers.                'Em are mice.
'Em are not!                    'Em are not.
[Y]es [th]ey are!               [Y]es [th]ey are!
See 'em empty pockets?          See 'em itty-bitty feet?
[we]ll, I'[ll] be!              [We]ll, I'[ll] be!
'Em are farmers.                'Em are mice.
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Please use code tags when you post code.
Reposting it for you here with tags and formatting, but it still will not compile as you have posted it. You mangled the class definitions by embedding them haphazardly in one another.

import java.awt.*; import java.awt.event.*; import javax.swing.*;

public class Layers // driver function
{
    
    public static void main(String args[]) {
        try {UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());} catch (Exception e) {;}
        Layer_Model model = new Layer_Model();
        Layer_View view = new Layer_View("TRAIN RESERVATION SYSTEM:RESERVATION");
        Layer_Controller controller = new Layer_Controller(model,view);
    }
}

class Layer_View extends JFrame//set up GUI
{
    String reservertions[] = {"Surname","Firstname",
    "ID Number","Email","Phone Number","Place of Departure","No-Of-Tickets",
    "Time of Departure","Time of Arrival"};
    
    private JTextField input = new JTextField(7);
    private JTextField inputName = new JTextField(7);
    private JTextField inputID = new JTextField(7);
    private JTextField inputEmail = new JTextField(7);
    private JTextField inputNumber = new JTextField(7);
    private JTextField inputDeparture = new JTextField(7);
    private JTextField inputDestination = new JTextField(7);
    private JTextField inputTickets = new JTextField(7);
    private JTextField inputDepatime = new JTextField(7);
    private JTextField inputArrival = new JTextField(7);

    //declare button components
    JButton price = new JButton("PRICE");
    JButton submit = new JButton("SUBMIT");
    JButton cancel = new JButton("CANCEL");
    JButton exit = new JButton("EXIT");
    JPanel buttons = new JPanel(new GridLayout(4,1,2,2));
    JPanel but = new JPanel(new GridLayout(4,1,2,2));
    
    //BorderLayout pane to hold input/button JPanels
    //border layout to hold inputs and buttons
    JPanel report = new JPanel(new GridLayout(4,1,2,2));
    JPanel main = new JPanel(new BorderLayout());
    
    class Layer_Model // provides working functionality
    {;}
    
    public Layer_View(String title)// constructor method for GUI
    {
        super(title);setBounds(100,100,500,180);setResizable(true);
        setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
        //construct input fieldset
        for (int i=0; …
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Is that from the grass or from the people cutting it?

Trace amounts of VOCs are released when it is cut.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I would say that C02 has increased however probably nothing as significant as they are trying to tell us and its certainly not playing much of a role in Global warming.

I would say this increase is due to alot of things and those 2 things probably play large parts in that.

And you are saying that as a scientist with some data behind it? Just wondering.

You may in fact be right, but unless you have some credentials in the area of concern, assertions with "I would say.." seems to bear little weight.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That is your job as a student to figure out. If you can't manage it then what hope do you have when you are working for an employer? Take some initiative and search it out instead of asking people to tell you how to do it. Since it's your project, you can more effectively search out links than we can.

(Also, make the effort to actually type all of your words when you make a request of others. Abbreviating words such as "about", "you" and "be" just indicates laziness and lack of consideration)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If at any world the concept of time does not exist, can we ever develop a software or hardware which can communicate with a world where time does not exist ?
I mean to say can we write hardware or software which does not assume anything about time ?

You can do that right now: Just dial 911 and tell them you desperately need to talk to a world where time does not exist. They will put you in touch with the people you need to see.

(Psychiatrists most likely)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

do u have any idea abt the cost & duration in completion of this project ?

That would depend completely on how you implement it and your own abilities to do so.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Hi all, i'm new so not sure if this is the right place or not.

No, it's not. Look somewhere else to learn how to program cheats and exploits. I won't say good luck - I hope you fail miserably.

jbennet commented: wtf are you being so negative for -4
scru commented: well that's really mean. if the guy want to cheat his game it's his business :p +1
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I am new to java and having issues...

I am using this code as an example but when I try to view it all I get is a blank screen. Can someone tell me what to write in my notepad to view the applet. I have this now

<html>
<head>
<title>Dice Game Canvas</title>
</head>
<body>
<h1 align=center>Contact Application</h1>
<center>
<applet name="ContactApp"
code="ContactApp.class"
width=400
height=150>
</applet>
</center>
</body>
</html>

I don't know if this is correct if any one can help. Thank you.

Your code is not an applet - it is a standalone frame demo class. You need to code it as an applet if you wish to use it as one:
http://java.sun.com/docs/books/tutorial/deployment/applet/index.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Hi members,I would like to share knowlege in Java with you.
I have a problem which i request a solution for.
I want to design a GUI in java that displays four roads each having traffic
lights and these traffic lights have four colours(green, orange, and Red).
So I want these traffic lights to change colours every after 10 seconds with green
moving clockwise to all the four roads followed by orange and
finally Red. This code should allow me to click on any these lights and when I do so
the clicked traffic light should light up green all the rest light up red immediately.

Ok, so to accomplish this you will need to understand the following:
Custom painting in Swing: Performing Custom Painting
Timers:How to Use Swing Timers
Event listeners: Writing Event Listeners

You may want to use icons (in JLabels) for the signs, as it will make some of the click handling easier and you won't have to paint them from scratch.

Work through those and start coding up your interface. If you run into specific troubles or something you don't understand, post back with the code and questions.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, to test for string equality you need to use equals() or equalsIgnoreCase(). There are more fundamental problems with what you have written there though and it will not compile. Re-examine the basic structure of 'if' statement blocks.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I found a dilemma that disproves life happening by chance: ...

No, you found a dilemma that you cannot explain. It does not disprove anything at all and it certainly does not prove a mystical third party was involved.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

.

Hi Ezzaral I decided to do a project in HR Recruitment , if u know any thing about JSF and Portlets and how to use .please reply please suggest me how to install them nd wat should i need to do so ... system requirements ...

Thanx for ur quote


Your Friend

Alekha

Help is offered for those who demonstrate some effort. You cannot expect someone to walk you through an entire project istarting from how to install the frameworks and components. (Also, "u" is not a word - "you" is the word you're seeking)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Not without specific questions they couldn't. It also sounds like something more appropriate for the JSP forum.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Science does nothing to disprove the existence of a God it simple gives us a better understanding of the things that have been put into place by God.

Though religion does nothing to prove the existence of a god either. Saying that a god must have created it just because we don't understand something's origin does not make it so.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Why was this thread revived?
:D

He thought he saw the horse twitch and decided more beating was in order.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

A distinguished in one of our National newspapers stated he did not know the answers. But he was convinced it could not happen by chance. He posed a scenario whereby if you follow the chance theory, if it were possible to throw up into the air sufficient quantities of all sorts of RAW materials, that if it was done often enough we would eventually end up with the Taj Mahal!

A gross over-simplification at best. Under what conditions are these "materials" being "thrown up"? One could argue that man and stone are "materials" and "throwing them up in the air in sufficient quantities" did yield the Taj Mahal.

When I was at school learning from our schoolmaster, he always stressed that mankind's brain was not big enough to understand all the mysteries of our religion, which was in this case Roman Catholicism. I think there was a lot of truth in what he said and even as we think we are becoming smarter we are finding the more we learn, the more questions remain unanswered.

Not knowing something isn't a valid reason to quit trying to understand. Throwing up your hands and claiming that it's too difficult to puzzle out doesn't substantiate mysticism. Learning anything usually does entail finding there is more to learn. Just because you stop at that point does not mean everything beyond it is unknowable.

joshSCH commented: I agree +12
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, it's difficult to speculate from a general perspective on a specific implementation such as OracleConnectionCacheImpl . Have you tried searching any Oracle forums specifically for mentions of that behavior? Are you promptly releasing connections when they are no longer needed? Is this a checked exception that you should be prepared to deal with as per the API documents?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

How about because of the probable consequences if you have chosen incorrectly in this issue?

No different than the consequences if you have chosen incorrectly. I've made my peace with that.

Should you regret the lack? Probably not; if you're wrong, you'll be regretting them enough in the end.

If I get caught in a rain storm without an umbrella I will get wet and regret not having brought one. Should I never leave my house without an umbrella?
If I were to be struck by lightning in such a storm, certainly I would regret leaving my house to go out. Should I never leave my house for fear of a storm?
Of course not. We all make decisions weighing the risks as they are known to us. Given that I believe the risks you suggest are unfounded speculation, I can't see as how dwelling upon them is worth the time.

Are you sure that's fear? I'd call it simply expectation, possibly eager expectation.

Scru specifically said "Because then after that my existence would just cease. Do you know how dizzy the thought of that makes me?". To me, that sounds an awful lot like fear and it was his statement that I was addressing. It was not an empirical statement per se.

And how do you determine what is right in the first place? Pretty much every version of right/wrong I've seen stems from religious beliefs.

I do not believe that absence of religion …

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So is the world ending then or what? ;)

Yes.
We just have to argue out the timetable. This might take awhile.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If I were an athiest I think I would be afraid. Because then after that my existence would just cease. Do you know how dizzy the thought of that makes me?

As an atheist, why should I fear the end of existence more than any other? Because I have no delusions of "something better" to look forward to after death? Should I regret the lack of what I feel are false hopes and mollifications? It can't be changed - being human is 100% fatal. You are going to die. Get used to it. If anything, you are obviously much more afraid than the atheist, as you cannot even think about facing the end of existence without a promise that something better awaits beyond it.

Live your life now as best you may. Do what is right for the sake of it being right, not just for marks on some after-death scorecard towards imagined rewards. If you look at the time you have on earth as all that you're going to get, you might just be more inclined to value it more and do something worthwhile with it. On the other hand, if you think of it as a waiting and evaluation period that you must endure to reach that "something better", you might just find yourself sorely disappointed if you are wrong.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
class ModuleDriver
{
  public static void main(String args[])
  {
     Module m1 = new Module();
      m1.moduleId =  "Module Id: CG0048\n";
      m1.moduleName =" Module name: Programming 2\n";
      m1.setRoom("Lecture Room: pandon S1\n");
      m1.setModuleTutor("Module Tutor: Alan Maughuan");
     System.out.println( m1.toString());
     
  }// end of main()
}

I think it meets the marking criteria.
do you think that meets the marking criteria?
the marking criteria:-

No, far from it. You have only used one constructor. You need to show usage of all of the other constructors as well. Also, you are setting the public properties directly. Those need to be made private and you should set them with the accessor methods.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I wouldnt be excercising all the methods if I define it in the driver and thats the problem I have. The driver has to use all the methods. If I create the strings in the driver class then it does execute the methods. I really am confused about how I do this now.

What? Define it in the driver? You aren't "defining" anything in the driver - you are using the class you have built. Currently, you only use one of the constructors. You need to use the others as well. Depending on which constructor you use, the amount of additional information you need to set on the object will change.

Your class variables should not be public and you should initialize them to appropriate default values - not specific strings that you happen to want to print. If you want those variables to hold those values, you should set them via the accessors or the constructors. The class itself should be generic and have no information relating to any one particular module.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Just like any other constant: Year.FIRST, Year.SECOND, etc.

http://java.sun.com/docs/books/tutorial/java/javaOO/enum.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

just cant seem to get moduleId and module name to print out in my driver file. this is the driver file

Because, as Masijade already told you above, you have set all your variables to empty strings in that constructor and you haven't set values for them in your "driver".

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Because all of your return statements are in conditionals (the "if"s), there is not a guaranteed return path. Instead of putting the returns in the if clauses, make a variable to hold the calculation and make a single return of that value at the end of the method.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I need to do this:
<snip>

Please do not hijack other people's threads for unrelated questions. Post this as a new thread of its own.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, that is one piece. You have to actually use that variable though

public class Student extends Person
{
  Year studentYear;

	public Student( String name, String address, String phone,
		String email, Year grade )
	{
		super( name, address, phone, email);
                this.studentYear = grade;
	}
	
	public enum Year
        {
	Year FIRST = new Year( "Freshmen"),
	Year SECOND = new Year("Sophmore"),
	Year THIRD = new Year("Junior"),
	Year FOURTH = new Year("Senior");

	public final String gradeLevel;
	
	Year( String grade )
	{
		gradeLevel = grade;
	}
	
	public String getGradeLevel()
	{
		return gradeLevel;
	}
	
    }
	
	public String toString()
	{
		return String.format( "%s\n%s: %s\n%s: %s\n%s: %s\n%s: %s\n%s: %s\n\n" ,
			"Student Object",
			"Name", getFullName(),
			"Address" , getHomeAddress(),
			"Phone #" , getPhoneNumber(),
			"E-mail Address" , getEmailAddress(),
			"Grade Level", studentYear.getGradeLevel() );
	}
}
DeadJustice commented: thanks +1
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So bascially I change String grade to Year grade? I don't understand what you mean in the first sentence.

Yes, and that needs to be stored in a variable of the enum type Year in your class.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You need a variable of type Year to hold that value in the Student class. Your constructor would also pass a Year value instead of a String. toString() can access the getGradeLevel() method of the enum value to display the string representation you have given those constants.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Considering that Card's column is simply serving as a second witness to an argument I'd previously seen, I'm willing to give it more weight than you'd probably like. I don't have to agree with him (and having read some of his other works, I'm willing to say that in some cases I don't) for him to be accurate, and my agreeing with him doesn't automatically protect him from inaccuracy. However, if he (or any other individual in this or any other argument) is willing to provide evidence instead of imprecations or "No, you can't see that and no, you can't ask why" comments, then he has a better chance of being believed by those who haven't hardened their minds.

For those who care: 'Hardening' a mind, as I use the term, is the attempt to make it proof against any argument. A closed mind could theoretically be opened by some new evidence; a hardened mind most likely would not be so affected.

I'd call that a fair consideration. I think that particular piece provided some information that is definitely worthy of further attention, so how much weight you want to give it won't find me offended in the least.

My caution about Card is only to encourage actively looking for further information before accepting it as whole truth - which actually could be said for any piece on such a touchy political topic. It's rather depressing that what should be a matter for science to reason out has becomes …

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

work under conditions where neither they nor their employers will be paying taxes for them

Actually, many of them do have taxes withheld because they work in places that are required to remit those taxes from payrolls. Some examples are kitchen staff, cleaning staff, groundkeepers, etc. The employers must have a social security number for tax purposes - they just don't really care if it belongs to the person doing the work. So while certainly not all illegals pay income taxes, many do have taxes withheld from earnings. Additionally they pay the sales taxes we all do when they purchase anything.

I won't claim that they pay an equal share for services they consume, but to say they pay no taxes is a bit of a misconception that is worth noting.

(note: I don't think they should be in the country illegally either)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I read the web page you linked to with great interest. I found it very enlightening. I recommend that the others interested in this subject do so as well!!!

Hoppy

Yes, it's worth reading, but also keep seeking out information beyond Orson Scott Card's column and read through a few of his other postings before deciding how much weight you will give him.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Perhaps you should just go kill yourself because you obviously know nothing about physics at all. You are an idiot, and the world would be a much better place without you.

Jeez Josh, forget to take your meds? Do you really think this is warranted over a disagreement in a freaking forum? If you do feel that this vitriol is called for in the context, you probably need to get outside and away from the internet awhile.

joshSCH commented: Sorry.. I just hate stupid people.. +12
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Ah, me to, in terms of formal teaching; but I don't believe that you haven't done ( or won't do ) a load of 'extra-curricular' reasearch to augment that. :)

I'd agree. The math of 3D transformation, physics, intersections, etc is beyond what I consider normal high school math. Some of the underpinnings such as trigonometry and matrices may be touched upon in some HS math curriculums, but the level of application required for 3D programming work is definately college level material.

Certainly it can be learned earlier by those more mathmatically inclined and self-directed, but in general you aren't likely to find many HS students in that category.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Also, instead of using the numerical values here to evaluate the dialog result

//This case handles the "Yes" button, when pressed.
case 0:

use JOptionPane.YES_OPTION and JOptionPane.NO_OPTION. Those constants are there for a reason. You wouldn't need a comment to explain

case JOptionPane.YES_OPTION:
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Now I'd like to be able to set up a scrollable GUI, but I have no idea where to start. I know JScrollPane and JScrollBar are involved, but searches on the two have come up with nothing as far as tutorials go. Does anyone have any links to a good tutorial?

Well, just putting "JScrollPane" into Google pulled a ton of examples, but why not start with the tutorial that Sun has provided and linked right in the top of the API document? How to Use Scroll Panes (kinda has a "tutorialish" ring to it, doesn't it?)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Overgeneralization

Yes, it seems to be what Midi does best. Don't expect him to provide any substantiation to his anti-liberal interjections. He just loves to jump on any chance to rail about those "damn leftys". It's getting pretty pathetic.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Put this in your local paper, and see what happens...
"Wanted - psychic. You know who to call".

Heh, would really freak you out if someone called though :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"Me-first" government at its worst.

Care to elaborate?

~s.o.s~ commented: He has no idea what he is talking about, so you are out of luck. :-) +21
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No, it's from reading both sides of the issue, not just the liberal spiel that says there is nothing wrong with pot.

Ah, so any facts about the topic are liberal spiel. Perhaps you read both sides but you obviously discounted any that contradicted your myopic ultra-conservative point of view on the subject.

The original event of making pot illegal WAS in that Wiki site, but they glossed it over, just giving the place (New York) and the date (1900). It was made illegal for two reasons:

1. People using it in the workplace were getting injured.
2. Those injured people, and those who wouldn't work because they didn't care, weren't earning the money to pay their taxes with.

In other words, government feared losing tax revenue. The racial component came later.

Again, nope. Every account that I can find (http://www.google.com/search?q=reason+marijuana+made+illegal&complete=1&hl=en&start=0&sa=N) points towards a campaign to protect the financial interests of a few (Names Hearst and DuPont). Anslinger and Hearst pursued a vigorous "education"(read propaganda) campaign touting the evils of marijuana usage heavily based on racial fears and completely fabricated psychotic effects:

The following are excerpts of Mr. Anslinger's testimony before a Senate hearing on marijuana in 1937:
"There are 100,000 total marijuana smokers in the US, and most are Negroes, Hispanics, Filipinos, and entertainers. Their Satanic music, jazz, and swing, result from marijuana use. This marijuana causes white women to seek sexual relations with Negroes, entertainers, and any others."
"...the primary reason to outlaw marijuana is …

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Bah, I posted it in jest. Infer what you will. I'll quit polluting the discussion with word games.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

(as EnderX and any competent human being would notice)

Well, there's your mistaken assumption right there then: that only competent human beings would read it! :P
Reading for comprehension is such tedium and I just like to mash these keys to hear the clackety-clackety sound they make.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It has occurred again as a result of receiving a Contact List Invitation. Other PMs do not produce it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Considering that scru ended his post with an elipsis, and Josh began his post with one, I would myself believe he was referring specifically to scru's comment, on the grounds that Josh's own comment was written in such a way to serve as a natural link to scru's comment.

You could be right. I'm sure Josh will thrash me for polluting the perceived natural order of the thread! :P

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Ok, for the randoms I would use

private java.util.Random random = new java.util.Random(System.currentTimeMillis());

and in your method

private int getRandom(int min, int max) {
        return random.nextInt(max);
    }

Your assignment indicated the score should be between 0-150, so just use 151 for the max value (the nextInt(n) returns 0 to n-1).
There was no requirement stated to randomize the number of teams and games so you needn't bother with that.

For the averages, split the calculations out of your report() method. Make one method that for a given team number "i" returns the team average across all games. Make another method that for a given game number "i" returns the game average across all teams. In your report method, call those functions as needed to generate the data for each of your table entries.

Remove the declared Vector getNumGames - you don't use it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Your class name needs to match the file name. You have named the class Main put placed it in midterm1.java from the looks of it.

Side note: You really could use some more white space to separate your methods and logical sections within the methods. It will make it much easier for you and others to follow the code.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That's got very little to do with honesty...

Indeed.