Stefano Mtangoo 455 Senior Poster

will you do yourself a favor and check this I'm not maverick at sockets but what I know is you have to
1.Create a socket
2.Bind it to an address
3.connect to server
4.create buffer and fill data
5.send data
6. close sockets

Stefano Mtangoo 455 Senior Poster

What books or tutorial (online/downloadable) shall i learn to be able to make secure page? I need to know different technique and algorithms

Stefano Mtangoo 455 Senior Poster

In other words, it will loop over all values of y for all values of x, so the inner loop y runs x times.

+1 for clarification

Stefano Mtangoo 455 Senior Poster

Thanks. I will give it a try

Stefano Mtangoo 455 Senior Poster

Thank Jas!
I will have to. The problem is, error message isn't helpful as to where the problem lies

Stefano Mtangoo 455 Senior Poster

if you make two for loops nested like above, for each value of x, it will iterate to all values of y and go to next iteration which will do the same until all values of x are finished

Stefano Mtangoo 455 Senior Poster

Taste of wxWidgets

wxTextCtrl* texfromuser = new wxTextCtrl(this, wxID_ANY);
wxString testText = textfromuser->GetValue();
wxMessageBox(testText, wxT("User Text"));
Stefano Mtangoo 455 Senior Poster

I want to write C++ Class that is exported by a DLL/SO. I need my app to be x-platform so I will avoid non portables. I read somewhere I have to wrap methods in extern "C" to prevent name mangling. Is there a tutorial to make me accomplish this?

I know some of guys here are maverick in the subject. Would you consider to teach this new bee how to fly?

Thanks

Stefano Mtangoo 455 Senior Poster

I've made a MySQL database and am wondering if I could make my python code grab the data from there. Thoughts?

Sure you can.
Check mySQLDb then Read this then this

Sorry but to be a programmer you have to read a lot

Stefano Mtangoo 455 Senior Poster

>> But even configure fails.
This sounds too familiar to me .. I'd suggest that you try Cygwin instead of MSYS. I once failed to get GCC compiled on MSYS, but managed to get it done on Cygwin without too much of a hassle. On MSYS, the configure scripts simply kept failing, likely due to the way paths were handled. So, I ditched MSYS and haven't been missing it ever since.

Cygwin is not native and depends on cygwin1.dll
I passed and installed libvorbis and ogg by specfying.
ogg I did ./configure and make and make install but Libvorbis (aka headache?) have to be supplied with

--with-ogg-libraries=/usr/local/lib --with-ogg-includes=/usr/local/includes/ogg --disable-oggtest

It was pain to get compiled and now I fail to finish compiling libshout (It is the one that compelled me to compile the previous two). It gives me something I guess is compiler issue

.../include/stdint.h conflicting types for uint32_t

Stefano Mtangoo 455 Senior Poster

Play a little bit with Datetime module. There lies an answer. Long time haven't played with Python. So sorry I'm lagging somehow behind Pythonners

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

where is the problem? Does it compile? Errors?

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

Thanks Jason
Errors i get are kinda cryptic. I tried and have ogg installed via msys. But even configure fails. Here is ./configure --with-ogg=/local/ --no-oggtest gives:

./configure: line 12230: syntax error near unexpected token `OGG,'
./configure: line 12230: `PKG_CHECK_MODULES(OGG, ogg >= 1.0,
HAVE_OGG=yes, HAVE_OGG=no)'

I have downloaded pkg-config.exe and added to MINGWdir/bin but the error continues. I wonder what it is. Google gave nothing that helped me. I even tried this but with no avail. I wan't to compile libshout which needs libvorbis which in turn needs libvogg

Thanks for reply

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

Hi,
I know this is compiler thing but I just wanted to know if anyone here have ever been succesful in compiling libvorbis/libogg with MINGW. It's weeks now I cant do it!

I have tried with MSYS but nope i cant get far. I wonder why these developer consider only MSVC stuffs but are not in favor of GCC in windows :(

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

Compilers
Code::Blocks
MSVC++ Express
Open Watcom C++/Fortran
Bloodshed DevC
Turbo C++ Explorer 2006
Borland 5.5
cygwin

Pick one.

Compilers? No way WP ;)
They are IDEs and some of them bundles compilers
MINGW|MSVC Compiler|Open WATCOM|Digital Mars et al

I would suggest CodeLite or CodeBlocks. Simple and beautiful IDEs that can be used with MINGW (GCC) and MSVC as well as others

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

I really need help with this project.
1) Write a program that uses a switch program structure
2) Upon user input your switch structure shall calculate and display one of the three loops for loop, while loop, and do-while loop calculations.

smells like an assignment?
If so show efforts before ask for help!

Stefano Mtangoo 455 Senior Poster

No, you need this one

Stefano Mtangoo 455 Senior Poster

Here is what i have found on my journey:
1. Choose language of your choice (Some are easy ad others are not for faint hearted)
2. Check the basics (Tutorials are best to start you up)
3.Practice the baiscs to get the taste
4. Go for advanced theories
5. practice the advanced stuffs learned
6. Think of a small project to do (Anything useful)
7. Join or start a big project (Open/closed source if it is your own or whatever you decide)
8. keep learning new things
Warning:
1. Once started, never give up, just pause and rest once boggled ;)
2. Try to solve it yourself before you seek for help
3. You should have major languages as toolbox can't have only spanner
4. Don't try to be expert in everything in programming world, there you will end up knowing nothing. So be sober in your learning, with modesty
For more info, check out my signature ;)

Hope it helps

Stefano Mtangoo 455 Senior Poster

Check out tutorials. I haven't used it for anything. Mike bragged it to me. So check and comment on his blog for any question

Stefano Mtangoo 455 Senior Poster

I think 10ms is the best for time accuracy :)

Stefano Mtangoo 455 Senior Poster

the only nightmare of wxPython is complexity in printing framework. Many geeks haven't got past there. Thanks to reportLab for their PDF toolkit. you can maneuver it to print on fly

Stefano Mtangoo 455 Senior Poster
<form action="Conference_Seminars.php" method="post">

Are you sure the file with above code is in same directory as Conference_Seminars.php

Stefano Mtangoo 455 Senior Poster

Hello,
please use code tags to make your codes more readable.
Also use suggestion above and print the output of POST SGA.

Stefano Mtangoo 455 Senior Poster

Having tried VB as my first language and being Python friend I suggest you go Python. It have a lot of Free Books, wonderful tutorials and Many GUI toolkits. In a month or few weeks you will be good to go!

Stefano Mtangoo 455 Senior Poster

Boy! I thought you have given up!

Stefano Mtangoo 455 Senior Poster

Get your Mingw compiler for cross platform (In Linux you have already GNU GCC). If you love bundles get your CodeLite IDE or Code::Blocks IDE.

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

Good explanations there.
Thanks

Stefano Mtangoo 455 Senior Poster

Thanks jonsca,
I'm reading them

Stefano Mtangoo 455 Senior Poster

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

Stefano Mtangoo 455 Senior Poster

wxWidgets have several classes for dealing with Images. I haven't used, but freeimage brags to have image manipulation capabilities

Stefano Mtangoo 455 Senior Poster

I'm reading casting functions(I wonder if this is proper name). I get difficult grasping dynamic_cast, static_cast, constant_cast and reinterpret_cast. Can anyone help me in "layman" terms differences and where we may use them?
reference and google

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

Not necessarily. It simply means you cannot predict the next value -- which in fact may be the same as the current value.

you missed my point :)
I mean all that changes is value and not position

WaltP commented: Oh. OK. +11
Stefano Mtangoo 455 Senior Poster

Random number mean that it changes value. The position is the same.
Did you wanted to change position or value?

Stefano Mtangoo 455 Senior Poster

would someone start new thread instead of this one which is already solved?

Stefano Mtangoo 455 Senior Poster

Ooops!
I thought I'm in Python forum ;)
For C++ see this and this

Stefano Mtangoo 455 Senior Poster

you should have read this
with that said, there is a hint for you here and here

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
class _():
    _, __, ___ = {'admin':'123456'}, False, False
    def ____(_, __, ___):
        _.__ = False
        _.___ = False
        try:
            if _._[__] == ___: _.__ = True
            else: _.__ = False
        except:
            _.__, _.___ = False, True
    def __init__(_):
        while _.__ == False:
            __, ___ = raw_input('Username: '), raw_input('Password: ')
            _.____(__, ___)
            if _.___ == True: print "Invalid username"
            elif _.__ == False: print "Username and Password do not match"
            elif _.__ == True: print "Welcome to the system %s" %(__)
__ = _()

Duh!
I didn't thought of this.
a hacker heart will broke once he finds the code he used a lot of time and energy is that mess. He might even start thinking that his decompiler is lying to him ;)