669 Posted Topics

Member Avatar for BeyondTheEye
Member Avatar for The Dude

hmm, I got 6 out of 10... Score said 5-6 > Not too shabby.. So I guess what I've heard people saying about me is true...I am a bit of a bar-steward! At least, that's what I think they've been saying! ;) heh heh! I couldn't take the other test...The …

Member Avatar for vmanes
0
70
Member Avatar for pysup

It took a bit of playing around, but think I've found a workaround for this.... I noticed in the docs for os.system() (Yes I RTFM!) it mentions that the subprocess.call() should be used instead. So I had a go with subprocess.call() but I soon ran into very similar problems, it …

Member Avatar for ov3rcl0ck
0
4K
Member Avatar for vmanes
Member Avatar for krisny

What about replacing the backslashes with forward slashes? So wherever there was a single backslash, replace it with a forward slash. That should also fix your problem! I know typically in Windows, filepaths look like this: C:\SomeDirectory\SomeFile.ext But in C++ forward slashes are also acceptable for file paths.. c:/SomeDirectory/SomeFile.ext The …

Member Avatar for krisny
0
305
Member Avatar for htndrum

OK, I started working on this when I saw your original post. But since I started, you made your second post. So I've modified it a little to give the line numbers; but I've not got it to output the character position yet! I've done the search using the re …

Member Avatar for htndrum
0
118
Member Avatar for casperguru

[QUOTE=C++NOOOB;996816]So what's the difference between: void foo(int(&A) []) void foo(int A[]) If the contents of array A need to be modified by the function foo, which of the two is the correct usage? Thanks.[/QUOTE] As far as I understand it, they are both valid and correct. When passing an array …

Member Avatar for C++NOOOB
0
298
Member Avatar for JasonHippy

Hey all, This isn't so much a question as a heads up... After using python for a few years (mainly doing blender scripts and random console/command-line apps and tools) I've recently started looking into doing some GUI based stuff using wxPython. I've had a look at a few of the …

Member Avatar for JasonHippy
0
533
Member Avatar for SomewhereInKS

Hmm, your after fixing your originally posted code (which you've already done)... When running the code I got an index out of bounds error.. So I've made a minor alteration..Not sure if you've already found and fixed this but... [CODE=PYTHON] import math def polyPerimeter(xyList): perim = float(0) count = len(xyList)-1 …

Member Avatar for snippsat
0
238
Member Avatar for The-IT

[QUOTE=The-IT;996893]hi, I just created this awesome python application and i want to spread it around, but every one has python. I was just wondering if I could compile python source into a linux executable like py2exe, and then compile the executable into a .deb installer file. any help would be …

Member Avatar for ov3rcl0ck
0
254
Member Avatar for flebber

Firstly 'input' is a reserved word in python, it's used to get input from the user, (rather like raw_input!). So that's why this line of code fails to do anything: [CODE=PYTHON] input = raw_input("Type Date dd/mm/year: ") [/CODE] Change your variable 'input' to something like 'userInput' or just anything that …

Member Avatar for flebber
0
28K
Member Avatar for Vitriolics

OK, well...I'm not familiar with this code, so I don't know exactly where it's from but: [CODE]DECLARE_STDCALL_P(struct hostent *) gethostbyname(const char*); [/CODE] breaking it down into three parts: DECLARE_STDCALL_P is some kind of macro...Offhand I'm not sure exactly what it does...probably registers the function with some system mechanism or other.. …

Member Avatar for Vitriolics
0
211
Member Avatar for redreed

The description of your problem is at best vague and at worst confusing...Being able to see the code that's actually causing you the problem would help! So if you could post some code it would help us to help you! (Just don't forget the code tags!) Also, regarding your question …

Member Avatar for redreed
0
106
Member Avatar for smerny

OK, here's a very simple class and some code to test it, based on what you posted previously! [CODE=PYTHON] # here's a simple class class MyClass: # class constructor/initialisation # if no string is passed, defaults to an empty string def __init__(self, aString=""): self.myString = aString # addText function def …

Member Avatar for JasonHippy
0
159
Member Avatar for squareff255

OK, well there are a few problems with your error checking/input validation. Also your loops are a bit wierd, the program continues after it guesses correctly. And the number guessing algorithm looks a bit dodgy too! Here's a slightly improved version of your program. Changes made: I've used a very …

Member Avatar for JasonHippy
0
160
Member Avatar for erialclaire_238

Considering the problem you have set, your algorithm is completely wrong. And as already mentioned by niek_e, you're using the for loop incorrectly too! Follow niek_e's advice and take a good look at using for loops. His post shows you how to correctly use them.. And as he's already said, …

Member Avatar for erialclaire_238
-2
1K
Member Avatar for chico2009

[QUOTE=chico2009;992344]Hi folks I have just completed my first programme with help from yourselves. I cant understand why the code , if x ==1 or 2, wouldn't work in my programme below [code=python] # Convert C to F or F to C and return with result select = True while select: …

Member Avatar for chico2009
0
186
Member Avatar for blueness25

This block of code looks like it's presenting the problem: [CODE=PYTHON] elif event.type == pygame.KEYDOWN: if event.key == pygame.K_UP: elderly.moveup() if event.key == pygame.K_DOWN: elderly.movedown() if event.key == pygame.K_RIGHT: elderly.moveright() if event.key == pygame.K.LEFT: elderly.moveleft() elif event.type == pygame.KEYUP: if event.key == pygame.K_UP or event.key == pygame.K_DOWN or event.key == …

Member Avatar for blueness25
0
804
Member Avatar for evilguyme

Ok. As you're using a std::string to store your URL and ShellExecute is expecting a pointer to a C style string (LPCSTR) as a parameter, you simply need to change your ShellExecute call to: [CODE=C++] ShellExecute(NULL,"open",URL.c_str(),NULL,NULL,SW_SHOWDEFAULT) [/CODE] The c_str() function of the standard library std::string class returns the contents of …

Member Avatar for evilguyme
0
482
Member Avatar for kaninelupus

Personally, I wouldn't miss either of 'em! The only reason I own a mobile phone is because my wife and my bandmates nagged me into it, so they can pester me incessantly....So if my phone should ever so accidentally on purpose fly off my desk and into the wall...ooops!.....Hey if …

Member Avatar for crimgirl
-2
280
Member Avatar for rajarajan2017

Hey Raja, I don't know if you've already solved this but I'd pretty much agree with Iamthwee! Upping the frame rate of your final movie should minimise jerkiness a little. And it is true, the default flash tweens can be a little buggy at times...Also Tween lite is a very …

Member Avatar for surindersharma
0
89
Member Avatar for AutoPython

If all you want to do is remove the floating point digits you could do this: [CODE=PYTHON] floatValue=3.141 integerValue = int(floatValue) print "The integer equivalent of", floatValue, "is", integerValue [/CODE] Note: The above code is python 2.x syntax. For python 3.x change the print statement to: [CODE=PYTHON] print("The integer equivalent …

Member Avatar for AutoPython
0
192
Member Avatar for samm22

I could be wrong, but I don't think that theres a way of getting your max_iter iterator to give away the position of max_element...Unless Torture works heh heh...Bring on the COMFY CHAIR! :D (Apologies for the Monty Python...I couldn't resist!) Anyway, this is about the only thing I could come …

Member Avatar for JasonHippy
0
105
Member Avatar for volscolts16

In main() you aren't instantiating your matrix class correctly. Also your add and multiply functions are currently member functions so you'd have to access them via an instance of your Matrix class. To correctly instantiate your class you need to do something like: [CODE=C++] Matrix* mat1 = new Matrix(rows, cols, …

Member Avatar for Salem
0
184
Member Avatar for sam023

You can't hide the background. When you published your .swf it sounds like you published it with a white background. Unfortunately .swfs don't support having a transparent background, so you have to set the background colour you want. You can either do this at publish time or dynamically at runtime. …

Member Avatar for sam023
0
178
Member Avatar for JETFUSION

Ah yes, I should've spotted that howler when I helped you yesterday! For the last people you ask, their votes are not getting counted.. What you need to do is ask for input before the switch, so perhaps try something like this: [CODE=C++] #include <iostream> using namespace std; int main() …

Member Avatar for Sky Diploma
0
80
Member Avatar for JETFUSION

Your indentation goes a bit off from line 26 onwards (but that is more of an aesthetic thing which affects the readability of your code, it doesn't affect the code in any other way..The compiler doesn't care about whitespace or readability of code..As long as the syntax is correct the …

Member Avatar for tux4life
0
127
Member Avatar for jocose

I'm not sure exactly what kind of tweaks you're thinking your users might be likely to make to your script, but if your users aren't likely to be needing to make any structural/logical changes to the script. Or in other words, if they're only likely to be changing the values …

Member Avatar for sravan953
0
152
Member Avatar for D.JOHN

[QUOTE=D.JOHN;950788]I have this question, Is it possible to use int student,subject; student=5; subject=3; int marks[student][subject] instead of const int student(5),subject(3); int marks[student][subject]; ? If the it is not possible, can your please mind tell me the reason? [/QUOTE] You could use either, both are more or less correct (Note: the …

Member Avatar for D.JOHN
0
157
Member Avatar for mcco1

[QUOTE=mcco1;952285]I have this piece of code [CODE=C++]// some function int px; void SomeFunction( void *dummy ) { ... RECT rect; GetWindowRect(hWnd, &rect); px = ((rect.right - rect.left) / 2) - 60; ... // Terminate thread _endthread(); }[/CODE] And my problem is px doesn't get assigned.. it stays 0.. although in …

Member Avatar for JasonHippy
0
141
Member Avatar for sreein1986

[QUOTE=sreein1986;937657]Hi, I have flash video in FLV. I have kept the video in html but my problem is that when clicks the video on browser it's goes to full screen. Anybody help me?[/QUOTE] Check out ContextClouds post in the thread below, I think it has the answer you're looking for! …

Member Avatar for JasonHippy
0
121
Member Avatar for Nogat21

This concept seems really strange to me... You've created a class called Mp3 and a class derived from Mp3 called Frame, but the Mp3 class has members which are instances of Frames??? I could be wrong, but I don't think it's possible to do that in C++. In all my …

Member Avatar for Nogat21
0
203
Member Avatar for adel_elrefaey

OK, well the error messages say it all... For starters you need to uncomment the definition of RAND_MAX which is the cause of your error. Secondly, as Salem has pointed out, you need to include stdlib.h, which will get rid of the warnings about rand and srand. Finally line 116: …

Member Avatar for adel_elrefaey
0
738
Member Avatar for kings

I remember having similar problems using flash 8 several years ago.. Certain extended ascii characters wouldn't show up in dynamically loaded text. The solution was to select the dynamic textbox that the text was loaded into, open the properties panel and click on the 'Embed..' button. This allows you to …

Member Avatar for rajarajan2017
0
183
Member Avatar for pazoconnor

OK, this should take about 30 seconds to fix..... 1. Open up your fla. 2. Take a look at the two layers called 'acciones' at around frames 100-120. In the top 'acciones' layer at frame 103 there's a keyframe with the framelabel 'intro'. Now take a look at frame 117 …

Member Avatar for rajarajan2017
0
120
Member Avatar for maudits

[QUOTE=maudits;897620]encryption error LNK2001: unresolved external symbol "public: __thiscall MD5Sum::MD5Sum(unsigned char const *,unsigned int)" (??0MD5Sum@@$$FQAE@PBEI@Z) encryption error LNK2001: unresolved external symbol "public: class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > __thiscall MD5Sum::Calculate(unsigned char const *,unsigned int)" (?Calculate@MD5Sum@@$$FQAE?AV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBEI@Z) encryption error LNK2001: unresolved external symbol "struct RC4_Key_Struct * __cdecl RC4CreateKey(unsigned char const *,unsigned int,struct RC4_Key_Struct …

Member Avatar for maudits
0
296
Member Avatar for Silvershaft

[QUOTE=Silvershaft;946498]I have no idea how to that[/QUOTE] What you'll need to do is create something like a struct to hold your character data... e.g. [CODE=C++] // create a struct to hold your data struct CharacterData { string m_Name; int m_CID; int m_Age; int m_Char_Strength; int m_Char_Speed; int m_Char_Endurance; int m_Char_Aim; …

Member Avatar for JasonHippy
0
103
Member Avatar for licktress

[QUOTE=adatapost;945216]You can use execv also. [code=cplusplus] #include <iostream> #include <unistd.h> using namespace std; int main() { char *args[3]; args[0]="sample.txt" ; args[1]=NULL; printf("This is before execv \n"); execv("c:\\windows\\notepad.exe", args); return 0; } [/code] Read more about - [URL="http://www.opengroup.org/onlinepubs/000095399/functions/exec.html"]exec[/URL][/QUOTE] One minor thing....isn't unistd.h a Unix/Linux header file?? I don't think any of …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for progtick

Also see some of my recommendations in this old post: [url]http://www.daniweb.com/forums/thread191401.html[/url] Jas.

Member Avatar for JasonHippy
0
69
Member Avatar for tnind

I'm not sure which compiler you're using, but usually you'd register any 3rd party libraries with your compiler. e.g. In Visual Studio 2003 you'd: In the Solution Explorer, right click on your project and select 'properties'. In the property pages, select the 'C/C++->General' item in the tree. Now select the …

Member Avatar for JasonHippy
0
127
Member Avatar for Missy_poo
Member Avatar for stevenpetersen

A water scene with drips that drip into each other and splash eh? Can you describe the scene in any more detail? it's a little vague at the moment! Where are the drips coming from? Are they just dripping down off of something? Are they splashing into a pool of …

Member Avatar for stevenpetersen
0
96
Member Avatar for Aiban

Alternatively, if the musicback1 script is complete and working, what you could do (especially if musicback1 is used elsewhere in your app) is define another function which calls musicback1 and then does any other bits that you want. Here's a little pseudo-code to demonstrate what I mean: [CODE=PYTHON] def musicback1(): …

Member Avatar for shadwickman
0
256
Member Avatar for NeoFryBoy

[QUOTE=NeoFryBoy;943182]Quick background: I'm working on Project Euler and made a palindrome checker. I needed to convert integers to strings. itoa() kept giving random values (9 gave 9 or 90, etc...), so I decided to make my own, and ran into a problem. [I]I have fixed it, but could somebody explain …

Member Avatar for NeoFryBoy
1
132
Member Avatar for MV89

In standard C++, to make a function overridable, you'd make it virtual in your base class. So perhaps you need to change the signature of your isKnownWord function to: [CODE=C++] public: virtual bool isKnownWord(){}; [/CODE] Then in any derived classes you can override the function, all you'd do is declare …

Member Avatar for JasonHippy
0
164
Member Avatar for licktress

As Necrolin has stated, a program built on Windows will not run in Linux (without something like Wine! ;) ), likewise a program built on Linux will not run on windows (without something like Cygwin!) But if you compiled it on Windows, the resultant .exe should work on other windows …

Member Avatar for JasonHippy
0
95
Member Avatar for metdos

What about Bugzilla? I believe it's open source, it's certainly free and it can be used with various CVS systems SVN/GIT/VSS/Perforce etc... Every company I've worked for has used it for tracking bugs, my previous employer used it with SVN(nice!) and VSS(blech!). My current employers use it with Perforce(nice!). From …

Member Avatar for JasonHippy
0
119
Member Avatar for dilbert_here00

OK, After this line: [code=PYTHON] label = Tkinter.Label(pg4_group.interior(), image=photo) [/code] try adding the following: [code=PYTHON] label.photo = photo [/code] This will create an instance of your image in the label, preventing it from being garbage collected (Which is what I suspect is going on!). Next, after your call to label.place, …

Member Avatar for dilbert_here00
0
445
Member Avatar for TolucaDiablo

Well, I'm not familiar with the component you're on about, but generally the source folder and it's subfolders will contain the source files you'd need if you decided that you wanted to modify/customise the component. You don't need to put any of these files onto your server. The stuff in …

Member Avatar for rajarajan2017
-1
247
Member Avatar for trini4140

Assuming this is a wireless connection you're having this problem on, I had similar problems with one of my machines issuing the media disconnected message a while ago when trying to connect to a wireless network. It always used to work, but one day I started to get these media …

Member Avatar for JasonHippy
0
141

The End.