Stefano Mtangoo 455 Senior Poster

Thank you. I am trying that out now.
I can use system ("PAUSE") in a gnu compiler, right? Also, would it be better to use system ("PAUSE") on cin.get()?
Does system("PAUSE") also wait for an key to be pressed?

Don't use system("PAUSE"). It is causing unncessary overhead to your program by making system calls. Just stick with the latter

Stefano Mtangoo 455 Senior Poster

I Have done function that combines the above functions and validate POST variables.
Scrutinize it to see any improvements needed and I'm definitely shifting to Register class.

So far thanks for your inputs all of you guys!

public  function cleanMe($postArray){
            //the post values submitted are fname, lname, email, username and passwd
            $newPostArray[];
            $newPostArray["fname"] = $this->cleanNames($postArray["fname"]);
            $newPostArray["lname"] = $this->cleanNames($postArray["lname"]);
            $newPostArray["email"] = $this->cleanEmail($postArray["email"]);
            $newPostArray["username"] = $this->cleanNames($postArray["username"]);
            $newPostArray["password"] = $this->cleanNames($postArray["password"]);

            //loop through the array looking for any false value and terminate
            foreach ($newPostArray as $key => $value) {
                if($value==false) {
                    $returnValue =  false;
                    break;
                }//endif

            }//end foreach loop

            if(!$returnValue) {
                return $returnValue;
            }
            else {
                //everything is validated and is fine
                return $newPostArray;
            }
    }
Stefano Mtangoo 455 Senior Poster

Dev cpp for me.

Do you mean wxDevCpp?
Last time I visited DevCPP it seemed as if project is dead :-O

Ancient Dragon commented: never heard of wxDevCPP +25
Stefano Mtangoo 455 Senior Poster

That is from django coders. it should be, plus docs at site of great help. What I don't like is that they don't provide PDF/Zipped html

Stefano Mtangoo 455 Senior Poster

Here's a question for you.

Do you mean me also? what will you award me as your student ? ;)
Ooh, sorry buddy but show effort so that we would help you where you get stuck.

Stefano Mtangoo 455 Senior Poster

Its true ardav, but new things comes out and bumping years old forum isn't beautiful

diafol commented: Fair point - you're right +5
Stefano Mtangoo 455 Senior Poster

Even here in Tanzania, they recommend it and all the labs are full of turbo C++. But it is not "enforced" it is that they are already there and amny of students here hates programming, why would they bother? After all they are after marks and not knowledge :(

I remember one lecturer giving us BC5 and guess what, I recoiled and used C::B and all who saw it loved it.

jephthah commented: yay :) +5
Stefano Mtangoo 455 Senior Poster

Thanks Guys,
though its true I gave a little laugh at the Adapost. It is true and fun :)

Hi,

I think you should involve yourself in some projects, whether it of your own ideas, or participate with some other programmers to make this happen, and I think you'll keep learning, learning, and learning because java is really big and it covers many sides so, you should decide which side you want work on it to gain alot of experience.

I hope this benefits you. Happy coding :)

[EL-Prince]

Mhh! I only Know web side and Application side. Any other side??

Stefano Mtangoo 455 Senior Poster

I have asked the same Question on C++.
So far I have moderately mastered PHP a little and more of Python. I want now to add up Java/C++

So what I need to know to be Java expert in Web and Desktop Applications? Are they two different beasts?

Thanks Guys

Stefano Mtangoo 455 Senior Poster

Glad I was of help!
Tell your friends about Daniweb.
Don't forget to mention Naveen ;)

nav33n commented: haha :D +6
Stefano Mtangoo 455 Senior Poster

You should have read the intro as well as comments before copying the code. To help you it says: This program uses the Python win32 extension module

Stefano Mtangoo 455 Senior Poster

So Any good tutorial on Swing or SWT? I only need tutorial bundled for offline uses as I code at home with no net. I thing that will be abig factor for me moving either direction.

Don't point me to readme above. I have read it, but I just need an offline tut. Also unless available for download, freely, don't point me to a book. It is hard to get them here!

Thanks buddies

Stefano Mtangoo 455 Senior Poster

I'm new to Java, but will eventually want to use GUI for my Desktop applications. So as usual in any language, GUI toolkits are "debatable". In Python (My current "mother toungue") We have PyQT vs PyGTK vs wxPython and it is a good debate. I would like to hear your opinion on Java Swing vs Standard Widgets Toolkit ;)

Also, do I need to add anything to use Swing/SWT with eclipse or they are included in JDK/Eclipse?

Here we go!

Stefano Mtangoo 455 Senior Poster

Not all IDE's support code completion well. Of all IDE's I've tried, I found PyDev and Eric4 work best in this respect.

Have you checked Wing IDE yet?
Eric is most of the time associated with PyQT. It is made by It!

Stefano Mtangoo 455 Senior Poster

When you add a page in CMS (Like Wordpress' admin) what does it actually do? Add predefined table? Or what?
Thanks!

kvprajapati commented: Very good question. +6
Atli commented: good question +3
Stefano Mtangoo 455 Senior Poster

Hi,
I'm learning making CMS. As you can see, I cannot do everything from scratch. So I request anyone with code in his codebase that works fine on paging or knows practical code to point me. I want to page my articles once are more than let say 10

Cheers :)

Stefano Mtangoo 455 Senior Poster

I gather any other hashing methods are fine as the next shortest one is 32 characters!

I will appreciate to see your conclusion on the matter before thread marked solved!

Stefano Mtangoo 455 Senior Poster

Oh and this here

Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. It extends ATL (Active Template Library) and provides a set of classes for controls, dialogs, frame windows, GDI objects, and more.

http://wtl.sourceforge.net/

How do they compare with wxWidgets/QT/GTKmm

Stefano Mtangoo 455 Senior Poster

Win32++ is a small C++ library used to build windows applications. It has been designed to be easy to use, and simple to understand. It is an ideal starting point for anyone learning to program for windows using C++. Win32++ also has the added advantage of running on a wide range of free compilers, including Visual Studio Express and Dev-C++.

Here

Anyone using this?
Any comment recommendation
Just curious as I found it via wikipedia ;)

Stefano Mtangoo 455 Senior Poster

If you can't find one, code one ;)

Stefano Mtangoo 455 Senior Poster

Also what Data type of those variables?
If they are numeric, then Just save them as strings. Then retrieve them and use int() or float() to convert them back o numerical values

Stefano Mtangoo 455 Senior Poster

Netbeans is good but it eats good amount of resources. I found Notepad++ a good choice though it isnt IDE. I'm configuring aptana right now and it seem to be good. I was searching for portable IDE to move with in stick and I have just made it portable and I'm installing plugins.

Also you can check young codelobster PHP edition.

Stefano Mtangoo 455 Senior Poster

I use Firefox, Freedownload manager (Have integrated torrent ability)

On security:
Avast Home,
COMODO Firewall

stvrich commented: Kindly contributed His Own experience +1
Stefano Mtangoo 455 Senior Poster

What have you done so far?
Remember we have to help you get somewhere, but you must have something :)

Salem commented: <tealc>Indeed</tealc> +36
Stefano Mtangoo 455 Senior Poster

Plus that, is it freely and legally released? If not, then consider to beg no more because daniweb is for legal stuffs only. However there are other free books around there:
1. Thinking in C++ two volumes
http://www.lib.ru.ac.th/download/e-books/TIC2Vone.pdf
http://www.lib.ru.ac.th/download/e-books/Tic2Vtwo.pdf
2. C++ Beginner's Guide
http://msdn.microsoft.com/en-us/beginner/cc305129.aspx

Hope it help :)

Salem commented: TIC++ definite thumbs up! +36
Stefano Mtangoo 455 Senior Poster

As a beginner, you should find some online tutorials on how to write C++. You also need a compiler, preferably with an IDE. I recommend Dev-C++ bloodshed for beginers, but you should definitely upgrade once you know how. The subject is simply to vast to be answered in one post.

Try this one. Otherwise just google it. I'm sure you'll come up with something.

Isn't Dev-C++ dead? I suggest code::blocks
www.codeblocks.org
Also check:
http://www.cprogramming.com/
http://www.cpluplus.com/

Nick Evan commented: "Isn't Dev-C++ dead?" > Yup, it is. +22
Stefano Mtangoo 455 Senior Poster

Or code::blocks, which is itself built on top of WxWidgets, and has a GUI designer

http://www.codeblocks.org/downloads
http://www.codeblocks.org/cbplugins
http://wiki.codeblocks.org/index.php?title=WxSmith_plugin

and also allows to use wxformbuilder from www.wxformbuilder.org
Get free PDF version of the official book here:
http://www.phptr.com/content/images/0131473816/downloads/0131473816_book.pdf

Salem commented: Also nice +36
Stefano Mtangoo 455 Senior Poster

what editor do you use?
Get ulipad
http://code.google.com/p/ulipad/

shadwickman commented: ulipad is amazing, thanks for mentioning it! +3
Stefano Mtangoo 455 Senior Poster

if possible, just include it in same folder as your script and do a simple import as you did to sys. Otherwise, if correctly installed, then it should respond to simple import. Did you write the module or installed it from someone/somewhere?

shadwickman commented: Good tip about importing +2
Stefano Mtangoo 455 Senior Poster

I have never done RAD GUI designing.
I tried recently wxGlade and In minutes I was able to do alot. It is ugly but really powerful. It generates clean pyCode and I recommend it. Take simple tutorial it come with and there you have your flight. I think it should have been designed like wxformbuilder but I thank them even for "ugly" wxglade

scru commented: props to you for being able to stand the ugliness. +6
Stefano Mtangoo 455 Senior Poster
tux4life commented: Nice book :) +2
Stefano Mtangoo 455 Senior Poster

+1 For stas, But here is my suggestion:
1. Netbeans
2. Codebloster
3. PHP Designer 2007 Personal Edition
For freeware

For $ based IDEs Check DreamWeaver. :)

iamthwee commented: good stuff +18
Stefano Mtangoo 455 Senior Poster

It was as easy as this :)
Don't worry, this is what python is :D

import shutil
src = "C:\\steve_test\\Test_xp\\added"
dst = "C:\\steve_test\\Test_xp\\moved"
shutil.move(src, dst)
Stefano Mtangoo 455 Senior Poster

Here is simple example on class and methods. Get the whole taste from dedicated tutorial like here:
http://docs.python.org/tutorial/classes.html

# simple classexample
class Car():
    
    def accelerate(self, speed):
        acceleration = speed+1
        return acceleration
        
    def deccelerate(self, speed):
        deccel = speed-1
        return deccel

# now we will make use of class
#first make instance of that class
car_speed = Car()
speed = 5
print "The car started with speed %d m/s" %(speed,)
speed = car_speed.accelerate(speed)
print "Now car is moving at %d m/s" %(speed,)

speed = car_speed.deccelerate(speed)
print "Now car is moving at %d m/s" %(speed,)
Ghostenshell commented: Thanks for the help +1
Stefano Mtangoo 455 Senior Poster

Like I mentioned in another thread, the problem is that a lot of those modules are freeware done by different folks. Monetary reward is more of a driving force, and it will take a while to get those free things to show up. Python30 has a lot of rather subtle changes that need to be considered to avoid buggy code.

Yeah, I understand!
I wanted us to keep each other updated in case any module comes for python 3

sneekula commented: Good idea! +6
Stefano Mtangoo 455 Senior Poster
Murtan commented: Thanks for the ctypes links +1
Stefano Mtangoo 455 Senior Poster

I have the same and it works for me. Try re-installing wxpython but raise it to admin level by right click, run as admin and feeback

Stefano Mtangoo 455 Senior Poster

System Restore is the best option when you face such snags. Instead of tottally delete cut it and paste it somewhere. As per Caper Jack, if it is spyware, after delete system will complain that because it have registry entry of the file. Just in that case use revouninstaller's startup utility to delete the registry entry (Or Do it manually if you can) and reboot the machine.

NOTE: BEFORE THAT MAKE BACKUP OF REGISTRY USING EITHER ERRUNT OR ANY BACKUP UTILITY!!!

Quick-Study commented: Your info was very helpful because now I know more +1
Stefano Mtangoo 455 Senior Poster

I'm good at doing that work (No proud intended), I have done to many, but can't disclose here because I'm not sure if you are genuine user and owner or just want to crack into another's machine!
Sorry I cannot help for that reason!

Stefano Mtangoo 455 Senior Poster

I start with python; I'll then go for PHP and Java and C++ etc.
Python is simple and powerful. No wonder even NASA uses it

Steve

Alex Edwards commented: Have fun! =) +4
Stefano Mtangoo 455 Senior Poster

Reformatted your code and did simple restructuring and some edits
See if that is what you want and post more queries
Steve

#determine shipping charges according to weight
print 'Welcome to Shipping Company Rate Calculator'
shipweight=input ('Please Enter the Weight of the Item You Wish To Ship: ')
def shipping_charges():
        if shipweight>=2:
                print 'Your total shipping charges: $2.10'
        
        elif  shipweight>2 or shipweight<6:
                        print 'Your total shipping charges: $3.20'
        
        elif shipweight>6 or shipweight<10:
                        print 'Your total shipping charges: $4.70'
        else:
                if shipweight>10:
                        print 'Your total shipping charges: $4.80'
                else:
                        print 'Your total shipping charges: $4.80'    
shipping_charges()
sneekula commented: good thinking! +4
Stefano Mtangoo 455 Senior Poster

Try Gpy2exe. It work for me
here it is
http://www.gpy2exe.tk/
Tell me how you see it!
Steve

lllllIllIlllI commented: Awesome software +1