Stefano Mtangoo 455 Senior Poster

Hi,
Please help me spot where I go wrong. I cannot understand why the error.
The Code with error and full error are below.
Thanks

Error:
loaddll.cpp:6: error: invalid conversion from 'void*' to 'void (*)(wxString)'

lines 5, 6 and 7

typedef void (*helloSteve)(wxString);//takes string and Shows it!
helloSteve myFunc = myDLL->GetSymbol(wxT("helloSteve"));
myFunc(wxT("The DLL Just Works!"));
Stefano Mtangoo 455 Senior Poster

I tried but could not find any other mistake which could have caused runtime error.. Can you please help!!

Use debugger to step through your code and you will find errornous line which will be easy to fix.

Also get yourself Update IDE. I think DevCPP died many years ago!
get CodeLite, CodeBlocks, VC++ Express or Active version of DevCPP called wxDevC++

Stefano Mtangoo 455 Senior Poster

Thanks,
anthother question though little unrelated to this thread, I have code below of function pointer that throws error. Could you help me spot where I mix void and void*?

error message
error: invalid conversion from 'void*' to 'void (*)(wxString)'

typedef void (*helloSteve)(wxString);//takes string and Shows it!
helloSteve myFunc = myDLL->GetSymbol(wxT("helloSteve"));
Stefano Mtangoo 455 Senior Poster

Only if the DLL will be used by to C and C++ programs.

I use C functions to export C++ Classes to avoid name mangling

So, am I right?

Stefano Mtangoo 455 Senior Poster

Hi All,
I have a question that I cannot figure out.
I have DLL that will export class and some C functions.
Should I enclose both definition (.cpp) and Implementation(.h) with extern C? something like below?
myfunc.h

class TestClass{
//some stuffs here
};
extern "C" {
void myFunc(int x, int y);
void myFunc2(int a, int b);

}

myfunc.cpp

//class implementation here 

extern "C" {
void myFunc(int x, int y){
//some stuff
}
void myFunc2(int a, int b){
 //more stuffs
}

}

Thanks!

Stefano Mtangoo 455 Senior Poster

It`s about same size,i guess you are talking about packed so it can run as an standalone application.
PyQt is 3-4 mb larger for standalone application.

I have got size down on wxpython quite a lot.
Gui2exe(compressed: 2, optimize: 2 bundle_files: 3)
Delete unnecessary files,so run UPX
Last run Inno setup
For my translate program py-trans(using api off google translate)
Size of setup.exe(one file for windows install) was 3.8mb.
Unpack litte over 5mb.

This is better than uncompressed/unoptimize wxpython that can be 15-20 mb large.

I used to get around 12MB and that is not funny ;)

Stefano Mtangoo 455 Senior Poster

I have been Out of real pythoning for a while.
My favorite Toolkit is wxpython but It have a huge size due to monolithic nature.
So even with simple app, it swells! I was looking if I can have any size difference with Other GUI toolkit, PyGTK!
Hope someone will answer here
Thanks

Stefano Mtangoo 455 Senior Poster

Sounds like spam installed in your server and started sending flood of stuffs!
Have you got massive mail sending like mailing list?
How long have you hosted there?

Stefano Mtangoo 455 Senior Poster

uhmmm... hello,
I am a 1st yr. college student of IT, and I am curious how to became a white-hat hacker. I am interested to know about it. As of now, our subject is just all about programming c++ and IT 1 fundamentals.. Well it is easy for me to learn that, and I had a lot of experience in using computer, trouble shooting of virus infections, etc. But I don't know yet how to hack or do some secrets in computer.. If I'm going to be a hacker,
I promised I don't want to be a black-hat hacker.. Can anyone give me some tips?? Thanks..:)

You cannot be expert in everything and if you try to, you will become expert in nothing!
If you want to be good at Programming, choose three or four language (Start with one, increasing) which you will learn. One of them should be your primary one. Then keep practicing and eventually start/Join OSS project

If on other hand you wanna be a security hacker, it will take you another route, and so If you want to be OS hacker et al. All in all it takes perseverance and a lot of practice to be good in anything learnable

Stefano Mtangoo 455 Senior Poster

I am using Ubuntu Lucid Lynx. It is a Lexmark P3100 all in one printer. The printer works fine its just the scanner that doesn't work. I use Xsane and Simple Scan but hang even on preview. Have try several forum including Ubuntu Forum but no help. You can find me in Ubuntu Forum with the same name. Feel like ditching the Lexmark. Anyway thanks for your reply.

Try the Link below. Lexmark seems to be stubborn form many forum topics

http://ubuntuforums.org/showthread.php?p=2283194
http://ubuntuforums.org/showthread.php?t=107230

Stefano Mtangoo 455 Senior Poster

i just accept by the Twintech college as a labrian, they ask me to create a database for the labrary, i already finish the database (using Access 2003), now i want to create the interface using HTML but i dont know how to connect the HTML to the database.

Firts you have to know that HTML is *NOT* a language so you cannot definitely connect to database via HTML. It is a markup language with which you can only make UI (Tables, forms et al) No More. You need full fledged language like PHP, ASP,JSP etc.

I advice you go for PHP, learn it and do your job. I suggest PHP with SQLite or MySQL depending on whether you need server/embeded DB app.

http://www.w3schools.com/html/
http://www.w3schools.com/php/default.asp

EDIT: and start new threads instead of posting on eons old threads

Stefano Mtangoo 455 Senior Poster

try:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>hielo</title>
		<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
		<script type="text/javascript">
		$(function(){
			$('input.addForm').live('click',function(){
				var f=$(this).closest('form').clone(true);
				$(f).insertAfter($(this).closest('form'));
				
			});
		});
		</script>
	</head>
	<body>
<?php
	echo "<form enctype='multipart/form-data' action='rapidinsert.php' method='post' name='changer'>
         <br /><br />
		  <font color='#D99C29' face='Arial' size='3px'>Add Noun </font><input type='text' name='noun' value='' size='30' />       <input type='submit'  value='Submit' style='font-size:10px' />
		  <input type='button' class="addForm" value='Add form' style='font-size:10px' />
		  </form>";
?>

	</body>
</html>

Hielo,
as I suggested, he/she should learn one of JS libraries as it will easy complex stuffs. I myself have found JQuery to meet all my needs

Stefano Mtangoo 455 Senior Poster

You are right, but some people are forced to learn programming, and they won't need it in the future, and belive me, if you don't want to learn it it's a torture. If he'll need it, he'll learn it.

Then why on earth would you learn it? I mea there are alot of other courses than messing up with something that you won't do it (He hasn't said that anyway).

The point is, it is at best unfair and at worst cruel to both your teacher and country. Will it even be your degree or our degree? Would you be proud of it?

Pls don't do that

Stefano Mtangoo 455 Senior Poster

Please don't. I may not have been here long but, I believe this site isn't one for giving away answers.

I have been for sometime and I can assure you, you are right.
Reading the rules confirms that

Stefano Mtangoo 455 Senior Poster

Yeso, posting your code will help.
And...JQuery is my suggestion for you.
It have made ajax a Juice ;)
Edit: here is link to tutorials
http://docs.jquery.com/Tutorials

Stefano Mtangoo 455 Senior Poster

Is this a PHP Question?
I would suggest you learn AJAX.
you can also do that with plain Javascript but I'm too lazy to do it manually while a lot of JS libraries are there.
JQuery is my choice.

Stefano Mtangoo 455 Senior Poster

Learn any JS library.
It will practically save you alot of pain with javascript ;)

Stefano Mtangoo 455 Senior Poster

Just use JQuery and the UI libraries.
It have calender with one line of code and they take care of browsers.
Check it here You need to learn JQuery which is breeze if you know javascript

Stefano Mtangoo 455 Senior Poster

Hi,
clearStyle: true and fillSpace:true is all you need

$("#accordion").accordion({
            header: "h3",
            clearStyle: true,
            fillSpace:true
        });
Stefano Mtangoo 455 Senior Poster

I resolved it.
My Code was wrong and I missed a lot of CSS.
I had just to go back to basics and re-learn it.
In a day I have made both tabs and accordion

JQuery is really cool :)

Stefano Mtangoo 455 Senior Poster

Hello,
I need to load JQuery UI tabs ajax call.
I have made tabs and works well with my projects.
I have problem in using ajax to reload one of the tabs using ajax call.
When user select another thing in Drop down menu I have no way to reload them.
Attached is my PHP code with JS. Now, how can i add the code?

Thanks
Note: I'm few days old with Tabs but not JQuery ;)

Stefano Mtangoo 455 Senior Poster

When you get a complicated problem, the best tool to start with is a pen and paper (or word processor if you prefer). Write down how you think you would solve the problem, then start translating your thoughts into an algorithm. If it looks feasible, move on to translating to code, if not, back to the drawing board. Many times you will find that it's 2 steps forward and 1 step back when you are working on a project.

UML is helpful, especiall Use case and class diagrams

Stefano Mtangoo 455 Senior Poster

I haven't done Printing but it my advice is that you post on wx-users mailing list. But google did bring these:

http://docs.wxwidgets.org/stable/wx_printingoverview.html
http://wiki.wxwidgets.org/Printing
http://www.informit.com/articles/article.aspx?p=405047&seqNum=4

Also I hope you have checked samples on printing found at wxDIRECTORY/samples

Stefano Mtangoo 455 Senior Poster

When I use wxDevC++, I get a 'can't find -lwxmsw28' error... How did you get it to work?

Save yourself some pains and download codelite

Stefano Mtangoo 455 Senior Poster

and don't use Dev-C++, use Updated IDE like wxDevCpp, CodeLite or Code::Blocks

And this is bad coding.
Make separate .h and .cpp files for your top level windows class which inherits wxFrame and do your stuffs there. Then Instantiate that class in main app.

wxFrame *frame = new wxFrame;

Grab yourself this book and start reading

Stefano Mtangoo 455 Senior Poster

and don't use Dev-C++, use Updated IDE like wxDevCpp, CodeLite or Code::Blocks

And this is bad coding.
Make separate .h and .cpp files for your top level windows class which inherits wxFrame and do your stuffs there. Then Instantiate that class in main app.

wxFrame *frame = new wxFrame;

Grab yourself this book and start reading

Stefano Mtangoo 455 Senior Poster

How harder or easier depends on many things, some are
1. Learner Background
2. Learner patience in learning (You have to be a bulldog :))
3. Learner's willingness to practice
4. Learning and asking right questions in right places
5. Motive for learning

Not so difficult but it is somehow hard to learn it ;)

Stefano Mtangoo 455 Senior Poster

E it would just confuse you if you have just started with Java. I'd recommend staying away from EJB's unless you are pretty comfortable with other "more" useful things like the core language, servlet specification etc. :)

It have already confused me :)

I will stay away from it for now.
Thanks everyone

Stefano Mtangoo 455 Senior Poster

Since I use Linux about a year ago. I never look back to Window. Yeah Window 7 looks great but the security still sucks. Games are great but once the virus attack your computer everything will be wipe out. So I cannot afford to loose my precious data and sacrifice my gaming and stick with Linux. Only one small issue with my Lexmark all in one printer. It need Window XP still no problem with virtual box but I just use it whenever I need to scan. Feel like dumping the printer and get a new one with Linux support of course.

What Linux Distro are you using? I have Ubuntu Lucid and everything runs fine but I use HP Printers. I added it and I never installed anything. If you use Ubuntu check below links
(BTW there is a wrapper I guess ndswrapper that installs windows drivers in Linux)

https://help.ubuntu.com/community/Printers
http://ubuntuforums.org/showthread.php?t=49714

rubberman commented: I am using Linux Mint (a clone of Ubuntu) right now. It is very nice! +14
Stefano Mtangoo 455 Senior Poster

Hint, try logging in as root to put files in there.

It is bad Idea as it compromises security.
You need only to change permission pertaining to www folder ONLY

Stefano Mtangoo 455 Senior Poster

folders under var are protected, so before you start putting files there do this

myaccount@mymachine:~$ cd /var/
myaccount@mymachine:/var$ sudo chmod -R 777 www/
[sudo] password for myaccount: <type your password>

Note that command you are to type are in red
hope it helps

Stefano Mtangoo 455 Senior Poster

Hav you read the thread?
they are not yet integrated. So I think good candindate to answer this question is Vpython mailing list or wxPython ones. They are both very active lists

Stefano Mtangoo 455 Senior Poster

Check Codelite or Code::blocks

the first is my favorite but they are good ones in Linux. there is a bunch of others like KDevelop, Anjuta et al.

And don't hijack threads like this. Start your own :)

Stefano Mtangoo 455 Senior Poster

You need to test if the args array is empty first. There is not guarantee that the user passed any args to the program (assuming that this is the String[] args passed to main)

yes, that is useful footnote ;)

Stefano Mtangoo 455 Senior Poster

If your problem is solved mark it so. If you have another one start new thread

Stefano Mtangoo 455 Senior Poster

tried to login in console and try chkdsk /f /r

Stefano Mtangoo 455 Senior Poster

EJB the name itself has definition...

Enterprise Java Bean..

what is an Enterprise application..

it is a large scale application..

this application needs remote object(Remote method invocation),session(staeful,stateless),data persistence(entity bean),concurrent transaction(JTA),object serialization(Value Object or JTO),security(JCE,JAAS)..

these are all fulfilled by EJB..

this EJB specification in MVC is decoupling business logic from presentation layer....

you should go through EJB by surfing the google..

So what exactly is EJB? I know the definition, but I can't get what exactly is! Is it the framework?

Stefano Mtangoo 455 Senior Poster

I found VB Somehow confusing to me as beginner (Check my first posts), and I moved on with Python and PHP and then C++. I think the only confusing points is when you come to pointers. They are somehow confusing but the other stuffs are somehow simpler.

Many says VB is easy, are referring to GUI drag and drop. But that is even available in C++ using libraries (wxWidgets with Dialog blocks or wxSmith or wxFormbuilder: QT with QTCreator: GTKmm with libglade et al)

So I hope it is not that harder ;)

ZlapX commented: sucks balls +0
Stefano Mtangoo 455 Senior Poster

For me it sounds like installation problems.
It is working fine for me. see screenshot. Which OS do you use.
I guess you should re-install JDK

Stefano Mtangoo 455 Senior Poster

I have tried whatever I can but i'm yet to find a definition I can understand.
Would anyone try to "educate" me on what is enterprise java beans?

Stefano Mtangoo 455 Senior Poster

Take a look at this code, it does what you want and try to understand it and ask where you don't understand.

class Sample
{
public static void main(String args[])
  {
  int Add=0;;
  int Store=0;
  char[] myStringArray = args[0].toCharArray();
  System.out.println("The length of the String is "+myStringArray.length);//Calculating length
  
  for(char c: myStringArray)
  {
	  Add = Add+Character.getNumericValue(c);
	  //System.out.println("Add is now "+Add);
 }
   System.out.println("The total is "+Add);
  
  }
}
Stefano Mtangoo 455 Senior Poster

LOL Im no BILL GATE THE II OR III just was a beginnering in basic v2 in 1982 when Commodore 64 came out used it mainly for playing games and writing a bit of asm.

Are you jealous that Im congratilating Bjarne Stroustroup on writing C++ Ive seen a few wrappers for C that tried to make it into an object orientated language before C++.

I learned Objects in C++ and VB but Im no Bill Gates he used to write stuff on Minicomputers and mainframes. All I had was my venerable Commodore 64

Hehehe!
I loved that phrase of making money out of C++. It sounds Bill Gate-ish.

@Jonsca, thanks for pointing that. I should have said Bill Gates the IV

Stefano Mtangoo 455 Senior Poster

Make a bible study in Java
Look at crosswire.com for libjsword

EDIT:
Also make mobile app that will blacklist certain numbers from calling. I think that will be good teaser

Stefano Mtangoo 455 Senior Poster

Then CD is probably scratched.
Have you tried to restart and see if it get stuck in the same place?

Stefano Mtangoo 455 Senior Poster

Comodo firewall for windows, firestarter GUI for Ubuntu firewall.

Stefano Mtangoo 455 Senior Poster

sudo apt-get install epsos

and ubuntu gets you installed ;)

Stefano Mtangoo 455 Senior Poster

But not anymore full solutions unless its required. I will give hints and guides but not full final code for solutions.

You got it!Cool :)

Stefano Mtangoo 455 Senior Poster

I wont be posting complete solutions ever again

That is not wisdom my friend. It is a matter of show-effort-and-we-help!
If he shows enough effort you can help him like that but not give him copy and paste and bang, here is 100%. Some people use week(s) trying to resolve same problem showing a lot of efforts, reading a lot. I think it is fair for big hand to be given to those but not lazy gimme boys.

I would rather get MY 0% than get 100% which is NOT MINE.
I think that should be the motive, but then that is my opinion ;)

jonsca commented: Too true +4
Stefano Mtangoo 455 Senior Poster

Why is this? This seems to be a very large oversight, or was it intentional?

The guy have answered well. I would however like to answer this one, It is there by design

Stefano Mtangoo 455 Senior Poster

I think he should charge companies that develop games in C++ - afterall, the games wouldn't work if his language wasn't implemented in them :P

Welcome Bill Gates II

Another Question, seriously, why is there no C++ Software foundation?