Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster

Could you turn on warnings and errors to see what happens?
Your code?

Stefano Mtangoo 455 Senior Poster

I think this is best place to learn that. It have try yourself and some question.
It is not very long though Check PHP Manual which have examples and also little explanations here

Stefano Mtangoo 455 Senior Poster

How do you import it?
PHPMyAdmin? PHP script?

Stefano Mtangoo 455 Senior Poster

Have you read at Pygame news? I cannot tell if they are going to abandon Pygame but they are heading on JS. If they are abandoning Python I would not bother learning it. I would look at other modules or Move to another language.

Even SDL is moving towards commercial. I can't understand where are thing heading. I'm not a gamer though...Just spectator

Stefano Mtangoo 455 Senior Poster

Or my be save in database like SQLite3/MySQL

Stefano Mtangoo 455 Senior Poster

thank you for your help.
now it has been solved

If you don't mind, mark it solved :)

Stefano Mtangoo 455 Senior Poster

How do you do it?
Check this

Stefano Mtangoo 455 Senior Poster

here is beautiful examples:

Stefano Mtangoo 455 Senior Poster

Nothing special. It is just Javascript library that simplifies things. And yes it can play with PHP very well. What specifically you want to do? You might find it already full implemented there
see this example though a little complex

Stefano Mtangoo 455 Senior Poster

Oops! Sorry 'bout that...

Its no big deal buddy ;)

Stefano Mtangoo 455 Senior Poster

Are you aware that PHP also has a DOM class?
check it out here:
http://us3.php.net/manual/en/book.dom.php

Kidding? That is for XML parsing J! :)
I thought PHP wanted JS out of business but then how could Server side things be done on Client.

@leegeorg07 ,
I would suggest you learn JQuery. It is really simple to do Some JS fun

Stefano Mtangoo 455 Senior Poster

where have you reached so far?

Stefano Mtangoo 455 Senior Poster

Cool, I will assume you are copying files from local direction so no TCP/HTTP. Then here are some links that does the same thing:
http://www.rgagnon.com/javadetails/java-0064.html
http://www.java2s.com/Code/Java/File-Input-Output/CopyfilesusingJavaIOAPI.htm
http://www.roseindia.net/java/beginners/CopyFile.shtml

Haven't done that but If I was to do the same, I will use copyTo Method. See tutorial here how to use it.

Stefano Mtangoo 455 Senior Poster

Are you copying from local file or downloading from net?
Your code for that part?

Stefano Mtangoo 455 Senior Poster

see here

Ancient Dragon commented: nice link :) +28
Stefano Mtangoo 455 Senior Poster

Very possible!
when user clicks generate button, you collect the checkboxed things and calculate whatever you calculate and dynamically creating a table as pointed in last image

Stefano Mtangoo 455 Senior Poster

I have several books on C++ but couldn't find a think which explains the above to me.

Cheers
Danny2000

I would defer to use Books and get jumpstart with short concise tutorials until I get brush up. Then I will go back to the book and get comprehensive tutorial

Stefano Mtangoo 455 Senior Poster

If/Else will evaluate only bools.
Switch will evaluate integers in whatever form they come from.
Jonsca have given solid examples. BTW have you passed this tutorial and this one?

Stefano Mtangoo 455 Senior Poster

+1 for netbeans. It have never frustrated me.

Stefano Mtangoo 455 Senior Poster

I don't know what you are doing but in C++ version you should write no GUI functionality on secondary thread. All GUI issues should Go to primary one and others to secondary.

Stefano Mtangoo 455 Senior Poster

And Python 2.x is not compatible with 3.x So install both version and set your IDE to Python 3 which you are learning and let blender happily use 2.x If you want to learn with blender wait for version compatible with 3.x

Stefano Mtangoo 455 Senior Poster

Thanks for all your opinions then. I'll get Netbean then :)

@cwarn23: I've done it before myself but thanks for the offer. Can I not use it with IIS though?

First +1 for both Netbeans & NPP. NPP+ Explorer plugin make good editor for simple project. As project gets bigger NB is a way to go.
As per server, NB will ask for place to put files (point to www equivalent of WAMP) and Address (localhost/yourproject). So I guess it will work with any server (as it doesn't know server types only places files are and URI)

Stefano Mtangoo 455 Senior Poster

No error but no output either

And it means file is empty, especially if you opened with write option

Stefano Mtangoo 455 Senior Poster

didn't you said decimals?
Well that works but works for float too!
If decimal is only you want then change float to int like. And using raw_input is better optin IMHO

x = int(raw_input('enter number:  '))
Stefano Mtangoo 455 Senior Poster

Thank you i figured out how to do the sqrt of d but i need help with my Driver program.

well glad I helped!
Let's go again!

How would i test my squareRoot() function for a negative?

Well answered by Vernon Dosier

and I also need help with my power() function, if the exponent is a negative what do i need to do...Here is what i have: double

let see
if if x is raised to power of -y then it is equal to reciprocal of x raised to y. If that is true, mystery is then solved as your function would recurse itself y times while each times accumulating x*x; The final answer is then reciprocated and that is the power. Note that test for y and if it is negative (i.e <0), do reciprocal before retuning an answer. Otherwise don't reciprocate. That will solve for both positive and negative values of y

Stefano Mtangoo 455 Senior Poster

don't know how to get the square root of d (can't use cmath)

what is issue with cmath? Have lecturer banned you from using it?
Cool then here is the necessary algorithm to do it.
See this one

Stefano Mtangoo 455 Senior Poster

checking for negative number? try this

if(num<0){
//number is negative
//do whatever you want
}
else{
//number is positive
//do what you want
}
if what you want is just skip negatives you can go with this
if(!num<0){
//do something
}
Stefano Mtangoo 455 Senior Poster

you have already a function to calculate SquareRoot in <cmath>

#include <cmath>
using namespace std;
int num = 144;
cout<<"Square root of "<<num<<" is "<<sqrt(num)<<endl;
Stefano Mtangoo 455 Senior Poster

where are you stuck?
EDIT: Question already asked :shock:

Stefano Mtangoo 455 Senior Poster

are you using integers as the key? raw input returns strings which might be a problem. Convert it to integer and see. BTW I haven't used that module and so I don't know :)

Stefano Mtangoo 455 Senior Poster
"gold", "arrows", "whip"

you forgot to put into double quotes.

Stefano Mtangoo 455 Senior Poster

where is the problem?
You can pass here and brush yourself on wxthings and where you hit a wall, come back and post specific problem Check wxPython tutorial

barabass commented: Nice tutorials, very useful! +0
Stefano Mtangoo 455 Senior Poster

No, you need this one

Stefano Mtangoo 455 Senior Poster
pause = .195

Did you intend this to be 0.195 or 195?

Stefano Mtangoo 455 Senior Poster

is IE your browser? Old IE version used to corrup/almost download file. Use Download manager like the decent FDM

Stefano Mtangoo 455 Senior Poster

use time.sleep for sleeping a little bit and then continue

Stefano Mtangoo 455 Senior Poster

why do you mix single and double quotes here? what do you want to accomplish with this line (taking it as troublous line)

print_cmd = 'echo "IN;PU2100,11300;" | lpr -P %s %s'
Stefano Mtangoo 455 Senior Poster

I guess your audio toolkit of choice have state for checking status of playing stream. If true, then simple if will do the job on the timer event

if MY_AUDIO_STREAM_RUNNING== mytoolkit.FINISHED_PLAYING:
    print "Finished!" #here you print

so it will skip it each time until it finds stream have ended. Since I'm not sure if you are still using TkSnack then That is for now (I'm zero in TkSnack so sorry :))

Stefano Mtangoo 455 Senior Poster

what procedures did you follow. The normal I know are
./configure
make
Become super user aka root
make install
I'm used to Mandriva, though I had some Ubuntu and may be will be back soon ;)

Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster

there might be other methods but this should work!

system("cls")
Stefano Mtangoo 455 Senior Poster

yup!
That will loop until 1 is being typed in followed by return key :)
What about your original problem now? Solved or not?

Stefano Mtangoo 455 Senior Poster
goto loop;

im after the aplication to say eg. 1 + 1 = 2 wait couple of millieseconds then say 1 * 1 = 1
etc..etc

Suppose you have 200 goto. Your program will be mess. Avoid them to maxima! That said you can use Jonsca suggestion. Also same header have Sleep() fro pausing in given time. Mentioning your platform helps alot.

void sleep(unsigned int  useconds )
{
    // 1 milliseconds = 1000 microsecond.
    // Windows Sleep uses miliseconds
    // linux usleep uses microsecond
    // and since the default
    // usage of the code was under windows 
    // so the argument is   coming in millisecond.
    usleep( useconds * 1000 );
}

reference

Stefano Mtangoo 455 Senior Poster

I used to use GOTO in VB when I was too lazy to code it properly (create functions).

The reason I used the goto tag in c++ is because I was too lazy to make an infinit loop.

Mhh! Programmers are bunch of lazy people? Although don't use goto, I know I'm fond of those "lazy" shortcuts

Stefano Mtangoo 455 Senior Poster

What about this?

tkud commented: This post is really helpful. +0
Stefano Mtangoo 455 Senior Poster

Of all the php I've ever written, I've never found the need to use a GOTO. Anybody know why it was introduced in 5.3?

Mhh! as I was reading the post the same question came to my mind. Why would it be needed not only in PHP but also in other language like C++? Don't get mad at me cwarn (remember SHA1 cracker?)
That infamous gOtO ;)

Stefano Mtangoo 455 Senior Poster

I hope I'm right ;)

int* myPointer;
mypointer = new myPointer[10];
Stefano Mtangoo 455 Senior Poster

Hi Vega, okay i used your py2exe template and converted my app to an windows app. when i tried to run the app i got the missing dll error message(MSVCR90.dll). so downloaded the dll and copied it into the system32 folder

I would rather copy it in same folder with app than clogging my System folders, But again that is my behaviour ;)

Stefano Mtangoo 455 Senior Poster

That only affects the error log and console output ...

# redirect=False sends error and print messages to the console window
# redirect=True sends error and print messages to a wx popup window 
app = wx.App(redirect=True)

I misunderstood the question :'(