zeroliken 79 Nearly a Posting Virtuoso

in your loop at line 25 you dont need to iterate it 20 times but you use the input instead, use another variable to store the factorial

zeroliken 79 Nearly a Posting Virtuoso

what do you mean by good materials?

zeroliken 79 Nearly a Posting Virtuoso

The error says it all,
the actual and formal parameter for printout() at line 70 at names is wrong as it is an array

zeroliken 79 Nearly a Posting Virtuoso

Well after a few test runs with Windows 8,I felt like I miss XP's simplicity.

zeroliken 79 Nearly a Posting Virtuoso

could you repost the whole code
...why is there an int maine() on line 14?

zeroliken 79 Nearly a Posting Virtuoso

use an array that increments its element depending on the value of the reference array/arraylist as you iterate over it
the index of the counting array would depend on which value the current reference array has

zeroliken 79 Nearly a Posting Virtuoso

do you already know how to store values in a 2d 4x4 array?
the trick in printing is using a nested for loop that prints the contents using the first index as the counter for the first one and the second index for the second loop while printing a newline for every iteration of the first loop.

zeroliken 79 Nearly a Posting Virtuoso

do you mean the data type float?

zeroliken 79 Nearly a Posting Virtuoso

what your question about the problem.
It seems pretty straight forward to me
use a condition that checks if the square of the current age is equal to the current year until the age of 123 using a loop

zeroliken 79 Nearly a Posting Virtuoso

Is this the best way to do it?

that would depend on several factors like resources, target audience, proposed project details, time allowance, etc.

For resources you'd need to have a platform where you can create the game like Flash CS series or macromedia which doesn't come cheap.

For a ping pong game it would be a bit easy to make, this project should be beginner friendly

I'd like to say more about other details but since I don't have know much info yet I'll leave it at this.

Is it the only way?

No since you learned Java you should be well aware of Java Applets (though not that abundant)
As of HTML5, CSS3 and javascript you could create pure web browser games that could do as much as flash and more with this you wouldn't have resource constraints like in flash where you should afford the platform though you do need to be aware for different browsers compatibility

You could do a web search of each and see for yourself their capabilities

What would be important aspects to consider?

I don't know how far have you've learned from other languages like Java but if you have experience creating a game with coordinates and threading for concurrency then it wouldn't be too hard (or too long ) to learn.

A good background on math (namely calculus) would help, for example coordinate based movements for AI, object physics and environment interaction.

As a …

zeroliken 79 Nearly a Posting Virtuoso

do you mean it is taking the input from the first or is skipping over taking in another value for the second variable?

already answered by Gonbe it takes the '\n' input from the first variable

although just have to point out that the first one stated (using fflush()) might not always be the optimal solution... here's why link to article

other solutions would be to use

scanf(" %c",&m); //notice the whitespace before %c

to catch the trailing newline

zeroliken 79 Nearly a Posting Virtuoso

what's your question about it?
possible solution I can think of right now is add the values and save to a variable as you push an element or when the stack already has a content, pop

zeroliken 79 Nearly a Posting Virtuoso

line 9: that should be scanf("%d", &(ptr[i]).value);

zeroliken 79 Nearly a Posting Virtuoso

then same answer as before

checking if the next set of input corresponds to the right word like 'h' then 'e' where it could end with just the word 'hello' or 'world'

zeroliken 79 Nearly a Posting Virtuoso

the row number should be odd so the condition in the inner loop that prints the number should have a limit of row*2-1

for the numbers use conditions that prints out the current row and by incrementing a counter until the odd number corresponding to that row is found then decrement the counter

zeroliken 79 Nearly a Posting Virtuoso

what compiler are you using?
check the sleep function from the unistd.h library if your using linux or windows.h for windows

zeroliken 79 Nearly a Posting Virtuoso

could you post that code so we may see

zeroliken 79 Nearly a Posting Virtuoso

cout? why use a c++ standard output stream in a java program?
use System.out.println() instead

zeroliken 79 Nearly a Posting Virtuoso

put the condition on line 15 in a loop that checks if the current input has already been used by a previous element, set the index of the array to the counter of that loop

zeroliken 79 Nearly a Posting Virtuoso

a reply from your first post would just get a similar description found in the web
is there any specific detail that you didn't understand?

zeroliken 79 Nearly a Posting Virtuoso

post your current code

zeroliken 79 Nearly a Posting Virtuoso

Could you post the whole language including the constraints

just by the current details, the solution would look linear like checking if the next set of input corresponds to the right word like 'h' then 'e' where it could end with just the word 'hello' or 'world', are there any restrictions to the problem like the string can be accepted if those words are a substring?

zeroliken 79 Nearly a Posting Virtuoso

have you searched the web for description and examples?

zeroliken 79 Nearly a Posting Virtuoso

try printing the new top of the stack and next input after every pop/push to have a general view of the problem and see if the current conditions would satisfy the current input and top of stack,

zeroliken 79 Nearly a Posting Virtuoso

Daniweb Rule:
Do provide evidence of having done some work yourself if posting questions from school or work assignments

plus this isn't as hard as you think, shouldn't take you long if your search the web for examples, which part are you having problem with?
let's start with the first step:
divide the number by 100 then store the value in another variable to get the first digit
divide the number by 10 then store the value in another variable to get the second digit
as for the third digit located in the ones place you could multiply the first 2 by their respective place value, add them, then subtract it from the main number to get the one's place digit

zeroliken 79 Nearly a Posting Virtuoso

divide the number by ten and hundred to get the value of each digit then
use a loop that checks if the digit is odd or even by using the modulo operator (if the number is divisible by 2), if the remainder is 0 then it's even else odd

zeroliken 79 Nearly a Posting Virtuoso

did you try printing out the contents of the array to see if anything is off or increasing the size of the puzzle by either a column or a row or both by all sides of the puzzle to see if it makes a difference in the results
for example put a new line of text at the beginning so p from 'develop' will be found at the second row

you could also try to minimize the puzzle and print out the contents and results to scope out where the problem occurs

zeroliken 79 Nearly a Posting Virtuoso

I'm missing the middle part " "

print quotation marks before and after the loop/process that does the operation

zeroliken 79 Nearly a Posting Virtuoso

yes there's a lot if you search

zeroliken 79 Nearly a Posting Virtuoso

I think it would be easier if you'd use an array or an arraylist to have a dynamic length and store a value for each index for the password

zeroliken 79 Nearly a Posting Virtuoso

hmm... Have you tried inputting directly to ms access and see if the displayed text is right?
if so looks like the problem might not be programming related at all since it only affects MS Access, do you have the right language packs installed for MS products?

zeroliken 79 Nearly a Posting Virtuoso

you could try and use a charSet property to the Connection and see if it works assuming that this should have been fixed by now

Properties props = new Properties();
props.put("charSet", "UTF-8"); //or try UTF-16
zeroliken 79 Nearly a Posting Virtuoso

Does the characters display normally within MS-Access and what version of MS-Access are you using?

zeroliken 79 Nearly a Posting Virtuoso

you lost me at "apper"... could you discuss the problem in more detail

zeroliken 79 Nearly a Posting Virtuoso

Yes you could use C as the programming language medium for a graphics application and use gcc to compile it but you need to include the openGL header files such as gl/gl.h, etc. which aren't native gcc header files

zeroliken 79 Nearly a Posting Virtuoso

okay, what's your question about the problem

zeroliken 79 Nearly a Posting Virtuoso

did you make sure caps lock isn't on or you have administrator privileges?

zeroliken 79 Nearly a Posting Virtuoso

but this does not address that issue of browser compatibility.

check the cross browser solution here http://html5doctor.com/native-audio-in-the-browser/

and a flash fallback for old browsers here http://www.html5tutorial.info/html5-audio.php at the end of the article

zeroliken 79 Nearly a Posting Virtuoso

shouldn't this be simple like using the <audio> tag or am I missing a point here?

zeroliken 79 Nearly a Posting Virtuoso

ok then same answer as before, put every element in a division
it'll look something like this

        <body>
            <div id = "main">
                <div id = "logo">...</div>
                <div id = "text">...</div>
                ...
            </div>
        <body>

where in its css the width of main is constant e.g. 900px

zeroliken 79 Nearly a Posting Virtuoso

Scanner console = new Scanner(System.in
Scanner console = new Scanner(System.in);

Declare this only once and before the loop or the first use of input
also post the complete code your working with

and if the book title is something like "animals" and if i type in animal it does not show up

the words are not equal since the first word has 1 more letter s at the end

and if the user enters something like "and" i want everything in all of my arrays that contain "and" to show up

check the substring method

im not sure if i should use arrays or a list or even vectors

arrays should be fine for this

zeroliken 79 Nearly a Posting Virtuoso

what I meant by fixed width is the width attribute of the division has a set value i.e. width:700px; which you can freely change or do you mean that it should have dynamic changes whenever the user zooms or scrolls?

zeroliken 79 Nearly a Posting Virtuoso

A simple solution would be to place all the elements inside a division that has a fixed width

zeroliken 79 Nearly a Posting Virtuoso

Have you created an ER Diagram as a guide for creating the database?

So far, these are my tables that i make.but i think this is wrong.and i am confuse on this and what are the tables that i needed in the inventory system

are those tables you posted the description/details from the actual tables found in the database?

need more info on what should be the content of the database and relationships between the tables. Also post what you think are wrong about the tables you have created

zeroliken 79 Nearly a Posting Virtuoso
src="/images/pulpit.jpg"

try the following

  • remove the first backslash " / ", that should be src="images/pulpit.jpg"
  • make sure that there is an image folder in the same directory as the html webpage
  • check for spelling errors
  • check if the image is really in jpeg format

    src="resources/100_0271.JPG"
    
  • that should be a .jpg, extensions are case sensitive

  • check other soultions above if still not working
zeroliken 79 Nearly a Posting Virtuoso

Do i have to start a new discussion whenever a question is solved?

yes

How is it?...

The for loops at the menu function is unnecessary, you could simply pass the value for the the stucture index from the main function

Now i'll go ahead and make the scan Buyer's items..any suggestions?

need more details about this, any specifications on what the program should do with the items? store them at a file,etc.?

zeroliken 79 Nearly a Posting Virtuoso

can't we know who is downvoting or upvoting your posts?

you can't only Dani or anyone who have access to the database can see which account upvotes or downvotes your post

zeroliken 79 Nearly a Posting Virtuoso

He's a moderator he can delete each and every post from this whole thread

zeroliken 79 Nearly a Posting Virtuoso

He's probably just doing a test run for some functions regarding the site to check for bugs etc. and this thread will probably be deleted as soon as he's done with whatever he's doing

zeroliken 79 Nearly a Posting Virtuoso

I got the insert and Delete Data/Row working for my DBMS.
The deleteRow method finds the row that contains the same primary key from the database, passed on to the method, and deletes the row.
With using the insertRow method, the data I added shows on up on the last row as I wanted.

My problem is when I do a combination of calling the insert, delete multiple times the row inserted shows up on the position where the last deleted row was**

**when I delete the newly inserted row positioned at the deleted row and inserts it again it now shows up on the last row

My Questions is:
How do I make sure that the inserted row will always be at the last row no matter how many times I delete,insert or update the data.

Here's my current code:

    public void insertRow(String Mname, String Genre, int price,
                        String date) throws SQLException {
    Statement stmt = null;
    stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    ResultSet uprs = stmt.executeQuery("SELECT MOVIE_NAME, GENRE, FILM_BUDGET, RELEASE_DATE FROM MOVIE");
    try {

      uprs.moveToInsertRow();
      uprs.updateString("MOVIE_NAME", Mname);
      uprs.updateString("GENRE", Genre);
      uprs.updateInt("FILM_BUDGET", price);
      uprs.updateString("RELEASE_DATE", date);
      uprs.insertRow();
      uprs.moveToCurrentRow();

    } catch (SQLException e) {
            JOptionPane.showMessageDialog(null, e.getMessage());
    } finally {
      if (uprs != null) { uprs.close(); }  
      if (stmt != null) { stmt.close(); }
    }
  }


    void deleteRow(String Mname) throws SQLException{
        Statement stmt = null;
        stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
        ResultSet uprs = stmt.executeQuery("SELECT MOVIE_NAME, GENRE, FILM_BUDGET, RELEASE_DATE FROM MOVIE");
       try {
        uprs.last();
        while( !(uprs.getString("MOVIE_NAME").equals(Mname)) ){
            uprs.previous();
        }
        uprs.deleteRow();

        } catch …