Stefano Mtangoo 455 Senior Poster
typedef  int IntegerByMe;

it defines alias for integer.
Is that what you ask or I have misunderstood you?

Stefano Mtangoo 455 Senior Poster

He is using Tkinter. I recognized the methods and keywords.

But not everyone uses/have ever use TKinter. One of them is myself.
Unless I see import TkInter, pack(), I will barely understand ;)

Stefano Mtangoo 455 Senior Poster

hook bash via subprocess module?

Stefano Mtangoo 455 Senior Poster

It is C example but it is not hard to translate to C++
From here, Show your efforts as you have starting point

Stefano Mtangoo 455 Senior Poster

I wonder why there is nothing like SimpleXML in PHP.
in PHP XML is extremely simple!

Stefano Mtangoo 455 Senior Poster
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

Also search the forum. There is nice script by PHPMyCoder

Stefano Mtangoo 455 Senior Poster

Why can’t we just run the same executable file (compiled in Linux) both on Windows 7 and Ubuntu?

Have you ever heard of wine? That should do trick to run windows exe in linux :)

Stefano Mtangoo 455 Senior Poster

Another debate between hen and egg :)
who was the first to be there? ;)
If it is a matter of style, is it worth of debate?
anyway it is like

int main(){
//.............
}

and

int main()
{
//.............
}

which is good?

Stefano Mtangoo 455 Senior Poster

No one is going to help you without knowing GUI toolkit you are using

Didi you saw this?

Stefano Mtangoo 455 Senior Poster

And for solved threads, it is beteer you start new one :)

Stefano Mtangoo 455 Senior Poster

Python is not in your path
Add it via
Start->Right Click My Computer->Properties->Advanced Properties tab->Environment variable

Stefano Mtangoo 455 Senior Poster

I doesn't work!!!

what error does it throw?
Are you implementing this on Linux or windows?

Stefano Mtangoo 455 Senior Poster

Cool, so which command is used to stop internet services but not local networking. Only internet?

Stefano Mtangoo 455 Senior Poster

why not append system exit after that

system("java -jar myjar.jar");
exit(0);
Stefano Mtangoo 455 Senior Poster

Hi all,
how can I disable internet in windows/Linux machine. I want to disable completely and enable it at will using C++
Thanks

Stefano Mtangoo 455 Senior Poster
system("java -jar myjar.jar");
Stefano Mtangoo 455 Senior Poster
Stefano Mtangoo 455 Senior Poster

After reading my own post I found it less expressive. So since DW locks for editing I will re-post here as Quote

Hi,
I need to make application that will act as server and have clients. computers with client version will get permission to go to internet but not via server. Server will only be granting or taking away permission to connect to internet but clients will connect directly on net (so not a firewall). It is some sort of internet cafe management depending on server timing. Once time is out, server should send "stop signal" to client which will block the internet connection for that particular client.

I want it to be un-terminable via task manager. So any ideas on where to start?
Thanks

Stefano Mtangoo 455 Senior Poster

Hi,
I need to make application that will act as server and have clients. computers with client will get permission to go to internet or not via server. Only permission to go but they will connect directly on net (not a firewall). Its some sort of internet cafe management depending on time. Once time is out, server should send "sign" to client which will block the internet connection.

I want it to be un-terminable via task manager. So any ideas on where to start?
Thanks :)

Stefano Mtangoo 455 Senior Poster

Thanks all

Stefano Mtangoo 455 Senior Poster

I have function that returns pointers to some object which two classes manipulate (only one instance of those object).Those objects differ and I had to make separate functions. In Python it was that easier and makes lazy programmers happy. I thought I can harness that in C++

Is this poor design?

Stefano Mtangoo 455 Senior Poster

Lists in python can hold different values in same container. Here is example

a = [66.25, "Iam String", wx.Button(self, "Iam a button")]

you see, same variable holds objects, integer, double and wxObjects.
I'm looking for such variable in C++

Stefano Mtangoo 455 Senior Poster

Hi,
I'm finding generic container like vector but that can hold any variable just like a Python list. Thanks

Stefano Mtangoo 455 Senior Poster

Thanks AD,
you tackled my doubt that I failed to present
"The database knows nothing about the blob's contents"
Voila! Ahsante!!!

Stefano Mtangoo 455 Senior Poster

So did you learn what you know by reading the manual, or did you learn it some other way - osmosis perhaps?

Some other way, specifically tutorials. I was doing SQL with python and MySQL and SQLite but the tutorial didn't cover blobs.

> 2. How to create a C++ object to store in blob and get it back? Is ther anything special?
Like a manual?

I'm not sure sir! I have tried google and I'm yet to find good tutorial that can take newbee from the ground up :)

Stefano Mtangoo 455 Senior Poster

evstevemd, thank you for the links

You are welcome :)

Stefano Mtangoo 455 Senior Poster

I'm going to give you something that will help you make sense out of C++
Please read them and you will save yourself a lot of pain
http://www.cprogramming.com
http://www.cplusplus.com/

especially their good tutorials
http://www.cprogramming.com/tutorial.html
http://www.cplusplus.com/doc/tutorial/

and for free book (Massive Thinking in C++)
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

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

here is what I have come with thus far.... Im confusing myself. LOL
Char total_customers

cout << "how many customers?: " << total << endl;
break;

case:
total_customers = 0;
for (c=0; w<=9)

roc a, do you know what you are doing? No offense intended but as I can see, it seems you don't know what you are writing. Explaining your knowledge level will help people know how to help you better

Stefano Mtangoo 455 Senior Poster

Hi guys,
I have two bushes to clear up. I have doe SQL fro some time now but I have never done blob. I think the next project will require it. So here are my Question:
1. How blob differ from any other type like text?
2. How to create a C++ object to store in blob and get it back? Is ther anything special?

Thanks!

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

check wxWidgets and its Device Contexts(DC)

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

you are welcome :)

Stefano Mtangoo 455 Senior Poster

What about this?

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

I think this is very comprehensive tutorial

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

check lxml

Stefano Mtangoo 455 Senior Poster

Thanks guys

Stefano Mtangoo 455 Senior Poster

ok I will not,
but what are drawbacks?

Stefano Mtangoo 455 Senior Poster

You should probably mention that most of those don't come with a compiler and are not useful for the OP. Which is why I recommended code::block with the mingw compiler (bundled). Easy to install/use and in 5 minutes from download to working installed version.

wxDevCpp | C::B | Codelite | MVC Express
All comes/have compilers version don't they?

Stefano Mtangoo 455 Senior Poster

First rule: don't do it unless you're using inner classes
Second rule: see first rule

Third rule: if you insist, read the JLS for what's allowed and what's not.

Ok ;)

What is JLS? and what are inner classes?

Stefano Mtangoo 455 Senior Poster

Are you a student?
Lecturers tend to use TC, for some unknown strange reasons.
Here are IDEs I suggest

Visual Studio Express
Code::Blocks
Kdevelop
wxDevCpp
Codelite

They are not in order of aanything ;)
Just pick what you want, and will do a job

Stefano Mtangoo 455 Senior Poster

What are rules to observer when writting More than one class in single Java file.
Let say three classes on the same file

Thansk

Stefano Mtangoo 455 Senior Poster

For now, I'd say take a look at my example and have a go at it to see how you get on. Afterwards, if you decide you want to stick with the boost library, then by all means try learning as much as you can about it. I'm still learning boost myself. I've only done a few odd bits with boost::bind, boost::serialization and boost::archive, but not a lot else so far!

Some of the boost code in my example may initially look quite esoteric, but not all of it is that difficult to understand. Some of the boost classes I've used in my example (e.g. the boost::filesystem::fstream class) are just specialized, extended or derived versions of their std::library equivalents (in this case std::fstream!).

Boost can be a bit of a daunting beast. I must admit whenever I try something new with it, it usually takes some time to get my head around it. I've always found a lot of the boost documentation to be either incorrect, incomplete or incomprehensible, so it often takes a bit of digging and experimenting to get things working properly. But it is worth the time and effort IMHO because the classes in the boost library are quite powerful, not to mention rather robust and they can save you both time and unnecessary lines of code when developing your own applications (at least they can once you've invested some time to learn about some of the boost classes and how they can be used!).

Cheers for …

Stefano Mtangoo 455 Senior Poster

I hope I'm right ;)

int* myPointer;
mypointer = new myPointer[10];