Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If you have access to the SMTP server, then yes.

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

Well, technically you can go to Edit Your Username and delete the account, or you can just uncheck the box to receive emails from Daniweb.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Look in the Properties window at the 'border' property. Click the builder button "..." on the right-hand side.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You might take a look at the transform() and inverseTransform() methods on AffineTransform.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So basically you want to distribute ripped-off content without being traceable.

Read the rules here. Discussing illegal activity is forbidden.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You assume quite a bit. I didn't note any claim of trouble or that I downloaded any of it.

You didn't really claim anything at all - just posted a bunch of nonsense without any explanation.

Don't blame others if they took it the wrong way.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The buttons may only show posts which are currently negative or positive, so if someone voted down and someone else voted up, the net result would not be visible on either button.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Moved to Community Introductions. Welcome, vaayaa1.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

@Andyjava: Please do not create multiple threads for the same question. You already have a thread for this here: http://www.daniweb.com/software-development/java/threads/430893/adding-database-tables-as-items-into-a-jcombobox

Please direct further discussion there. Closing this one.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I was a long-time smoker, but quit a few years ago. The other three developers on my team have never been smokers.

I've never seen any occupational tendency towards it. Based on my personal observations, there seems to actually be a negative correlation. My sample population is rather low though, so as a programmer I wouldn't hold it up as a statistically viable assumption. :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, if you wish to discuss a particular question, please confine it to a single thread so that the answers don't get spread around all over the place.

Closing this thread. Please direct further discussion to the thread linked above by JorgeM.

JorgeM commented: thanks! +8
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I'd recommend switching to H2 for your database. You wouldn't need to mess with the Jet drivers or data sources at all. All you need is the H2 jar.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Do not post in all caps. It's rude.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Java's rules about braces and blocks are nearly identical to C++, so if you did write that C++ code, you should see why your Java version is quite broken.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No one is going to explain this line by line. Make an effort yourself and ask specific questions about the portions that you are unclear on.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Your mistake is expecting someone would solve your homework or quiz problem for you in 16 minutes.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Either Wiki is lying or you didn't double your facts before you post that?

As pritaeas has noted above, it's a MySQL driver API for PHP, not an actual database. I'm fine on the facts.

But Java also have that too:

JDBC is Java's generic database API. It is a set of abstract interfaces to define interactions with many different database drivers. There is nothing in it that is specific to MySql. In that regard, it's similar to PDO.

Questions about these language-specific APIs belong in their respective language forums, rather than the more general Databases forum.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Mysqli and PDO are PHP modules - not databases. It is entirely appropriate to post them in the PHP forum.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Did you have a question?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Where would people ask about a challange/project that is posted in the thread? Would they have to open a new thread for example?

Yes, they would need to start their own thread. If questions about the projects were allowed in the sticky thread, it would very quickly grow to an enormous mess.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

@diceadmin: Then why are you bothering to post here on an open discussion board? These forums aren't here to collect private business.

If the questions and answers cannot be openly shared, they don't belong here at all.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Also, has your church considered using Excel?

Yes, Excel would be fine. An Access db is an even more flexible alternative. Either could be set up for basic data entry in less than an hour.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Every year there are 30,000 gun deaths

Two-thirds of those are suicides. Let's keep the numbers honest if you want to quote them.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It's a good thing that this thread isn't entitled "Coherent Thoughts of the Day".

codeorder commented: a.google.defined:coherent Returned "yum":) +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Wikipedia has extensive entries on both of those topics. A quick, simple search would provide plenty of information.

If, after reading those, you still have specific questions, post back and maybe someone can clarify them for you.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

isn't the "if" class a loop?

No, if() is a conditional statement (not class). It is a branching construct, not looping.

Do(), while() and for() are common looping constructs.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Plz give solution as soon as possible.

Good info here and here

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

To cast the reference, you just need to add the class name in parenthesis in front of the method call, ie.
MyClass obj = (MyClass)s.readObject();

You can read a bit more about the ObjectInputStream and see a couple of examples here.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

jdk 1.4 and tomcat 4

Firstly, install components that are not 10 years old. There is no reason to be using 1.4 and Tomcat 4.

Regarding your question, you could build your map by checking for the key before you put the value and if it exists, concatenate the new value to the existing and put that in the map.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Created a BufferedImage of the desired dimensions, create a graphics context for it with createGraphics(), and pass that to your rendering method or paint() method.

Use the ImageIO.write() method to write that out to a file.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If you've written that program 500 times, you're doing it wrong.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Use OpenCSV. You can use tabs delimiters with a CsvReader and a CsvWriter for the output.

Use regex to split "rdy 784 bsy 16".

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Here's some example code that I didn't have time to finish up yesterday. It may clarify some of what I mentioned above:

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.Timer;

public class BallCollision extends JPanel {

    Timer animationTimer;
    Ball ball;
    BadLands badlands;

    public BallCollision() {
        ball = new Ball(10,10,5);
        badlands = new BadLands(50,50,90,60);

        animationTimer = new Timer(50, new BallAnimation());
        animationTimer.start();
    }

    class Ball {
        Ellipse2D shape;
        float speedX = 5;
        float speedY = 3;

        public Ball(int x, int y, int radius){
            shape = new Ellipse2D.Float(x, y, radius*2, radius*2);
        }

        public void draw(Graphics2D g){
            g.setColor(Color.BLUE);
            g.fill(shape);
        }

        public void updatePosition(){
            if (shape.getX()<0 || shape.getMaxX()>getWidth()){
                speedX *= -1;
            }
            if (shape.getY()<0 || shape.getMaxY()>getHeight()){
                speedY *= -1;
            }
            shape.setFrameFromCenter(
                    new Point2D.Double(
                        shape.getCenterX()+speedX,
                        shape.getCenterY()+speedY),
                    new Point2D.Double(
                        shape.getX()+speedX,
                        shape.getY()+speedY));
        }

        public boolean collidesWith(Shape otherShape){
            return shape.intersects(otherShape.getBounds());
        }

        public void processCollision(Shape otherShape){
            Rectangle2D otherBounds = otherShape.getBounds2D();
            if ((shape.getCenterX()-speedX<otherBounds.getX() 
                    && shape.getCenterY()+speedY>otherBounds.getMinY()) 
                || (shape.getCenterX()-speedX>otherBounds.getX()+otherBounds.getWidth() 
                    && shape.getCenterY()+speedY>otherBounds.getMinY())) {
                // left/right collision
                speedX *= -1;
            }
            if ((shape.getCenterX()+speedX>otherBounds.getX() 
                    && shape.getCenterY()-speedY<otherBounds.getMinY()) 
                || (shape.getCenterX()+speedX>otherBounds.getX() 
                    && shape.getCenterY()+speedY>otherBounds.getMinY()+otherBounds.getHeight())) {
                // top/bottom collision
                speedY *= -1;
            }
        }
    }

    class BadLands {
        Rectangle2D shape;

        public BadLands(int x, int y, int width, int height){
            shape = new Rectangle2D.Float(x, y, width, height);
        }

        public void draw(Graphics2D g){
            g.setColor(Color.BLACK);
            g.fill(shape);
        }
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2d = (Graphics2D)g;
        // this just makes the line look smoother, less pixelation when at an angle …
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That sounds reasonable for a "bounce off" response. It's generally just a reversal of dx and/or dy. You can shortcut those easily with expressions like dx *= -1; to change the direction of delta x, etc. The various sides are just a matter of determining the surface of incidence.

Regarding the inner class question, yes, that is how you refer to the current instance of the parent class: ParentClassName.this.whatever()

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The DecimalFormat class will allow you to specify a format string to control such things. Look it up in the API.

The String.format() and PrintStream.printf() functions also allow such formatting.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, the the basics of setting up a graphics window with JOGL and Swing will be specific to JOGL. Once you have the window set up, most of the C++ code from the tutorials and your book can be translated very easily to the JOGL equivalent wrapper functions.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, as JorgeM mentioned, try clearing your cache. I saw the kitten until I hit Ctrl-F5 in Firefox to clear the cache and reload.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Use a counter variable or a for loop.

Any further questions should go in a new thread of your own. Don't hijack old threads to ask new questions.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I guess that depends on what you intend the behavior "kick something out" to mean. Does it bounce backward? Slide sideways? Pop out on the other side?

If you maintain a directional vector of any kind or separate x,y velocities, then you can determine the resulting position based upon the vector of incidence and whatever rules you decide for the outcome as I mentioned above.

You just need to examine the state at the time of collision. If you aren't saving it in a way that allows that, you may need to alter your objects to keep that information handy.

DavidKroukamp commented: helpful and concise +8
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It really shouldn't be any different from other collisions. Once you know the collision occurred, you just change the state of the colliding object to whatever result you intend. That may involve adjusting its velocity and position.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

In Java, you can use the JOGL bindings for OpenGL. There are some basic tutorials on their project site and then you can move on to the NeHe OpenGL tutorials.

The OpenGL red book is a good reference to keep handy.

The JOGL bindings are just wrappers around the OpenGL API, so if you switch to C++ later the differences would be minimal (ie pointers instead of references).

You may also find this information on The Mathematics of the 3D Rotation Matrix helpful if you're not already familiar with rotation matrices.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The read loop starts on line 20:
while(file.hasNext()){
That loop is where you'd perform any operations you want to do with each entry.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

setForeground(Color)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No one is going to answer your quiz for you. Try Google or read your class notes.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Welcome.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Do not make multiple threads for a single question. Closing this one. Please continue working through the original thread.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Is it really annoying?

Yes. It is.

Does it make the ads more noticeable?

If by 'noticeable', you mean 'more noticeably annoying', then yes, it does.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Closing this thread as it is in breach of the DaniWeb rule (http://www.daniweb.com/community/rules) that states you must show "evidence of having done some work yourself if posting questions from assignments".

What this means, for future reference, is that we expect you to have put some effort into solving the problem that you are looking for help with. Simply posting a homework problem or programming exercise set by a teacher or similar, in full, without showing any such effort is not acceptable.

What do we mean by 'effort' in this case? Well, either some code that you have produced so far or even an explanation of what your difficulty with the problem actually is would be OK. Something detailing your thinking, rather than a post which shows no effort whatsoever.

Feel free to re-post your question when you are willing to make such efforts.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

There are thousands of examples of inheritance on the internet. You could read as many as you like.

You could also make a stab at it yourself and ask questions about the parts that you struggle with. We encourage that here.

Asking someone to work one of the problems from your book for you "just so you can see it" without making even the slightest effort yourself is just lazy and has all the appearance of cheating on an assignment.

All your indignation won't change that and it won't change where we'll be in 50 years.