43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for plazmo

i know it is possible to use python with c/c++ but can python be used similairly with c#/vb?

Software Development asp.net python
Member Avatar for plazmo
0
193
Member Avatar for bumsfeld

Is there a good way to invert dictionary so key:value gets to be value:key?

Software Development python
Member Avatar for bumsfeld
0
3K
Member Avatar for TheSkunkMan

sorry about my post on pygame, but i'm having more trouble. frist off im ending the simple program that opens a window with if event.type == QUIT: raise SystemExit That makes a window pop up asking me if i want to quit. Is there another way to exit the window? …

Software Development display first-post python
Member Avatar for vegaseat
0
177
Member Avatar for shanenin

I was helping my 6 year old read some sentenses he learned in school. for example: the dog is on skates the bird is on a plane the pig rides the horse I noticed he was not really reading(kind of) the individual words, he had the whole sentenses memorized. When …

Software Development gui python tkinter
Member Avatar for bumsfeld
0
274
Member Avatar for vanitha

hi everybody :) , Python is relatively new to me and i have installed python 2.4 and am not able to use IDLE(to run the modules) that comes along with python. can anyone help me out with this. Regards, vanitha

Software Development python
Member Avatar for xav.vijay
0
89
Member Avatar for mmiikkee12

I've been trying to compile OSKit under Cygwin. It gave me a bunch of errors, most of which I fixed. I can't fix this one though: [code] /* * Copyright (c) 1996-2000 University of Utah and the Flux Group. * All rights reserved. * * This file is part of …

Software Development c c# c++ open-source
Member Avatar for mmiikkee12
0
138
Member Avatar for tayspen

this code [code] XmlTextWriter bankWriter = null; bankWriter = new XmlTextWriter(Convert.ToString(first.Text)); [/code] [quote] ...cant convert string to system.io.xmlwriter...invalid aguments [/quote] see Screenie how do i fix this?

Software Development xml
Member Avatar for tayspen
0
87
Member Avatar for bumsfeld

Is there a ways to merge two similar dictionaries, and what happens if the key words clash?

Software Development python
Member Avatar for bumsfeld
0
220
Member Avatar for jchang

I built a function as following [code] def IsExists(fxfcustid): #global noduplicates db = db_connect("triumph","freight","vcpdb") cursor = db2.cursor() #************************************************************************* #*** Query to get entries made by the person acessing the system *** #************************************************************************* sql = '''select count(*) from triumph.fxf_salescontest_entry where fxf_acct_nbr = %(fxfcustid)s) and (delete_flag is null or delete_flag not in …

Software Development python sql
Member Avatar for xav.vijay
0
183
Member Avatar for georgerohith

Hi All I have created created executable of Helloworld.py using McMillan Installer on Fedora core 3. It is working fine on Fedora core3. when i try to execute it on fedora core 2 it gives an error "segmentation fault" plese any one can help me why is it like so. …

Software Development python
Member Avatar for vegaseat
0
109
Member Avatar for john_27

Hi all, I am a newbie to python and am not sure,what i am doing is correct or not ,i wanna call c function from within python. i have my python program as: [code] import DLL if __name__ == "__main__": for i in range(1,6): DLL.RECEIVE_FROM_IL_S(10,50) [/code] here RECEIVE_FROM_IL_S() is c …

Software Development python
Member Avatar for vegaseat
0
213
Member Avatar for qwester

Hello, I'm having trouble with a project that I am doing in turtle graphics. I'm making a graphic of a soccer field with a ball bouncing around, but I want the ball to stop when it hits the net. I can get the ball to stop when it hits the …

Software Development python
Member Avatar for bumsfeld
0
366
Member Avatar for TheSkunkMan

Ive been trying to make a game recently but all pygame windows freeze. i have to use the Task Manager to exit. I also have to use it to exit a fullscreen too. All im doing in my code is opening a blank screen. How can i fix that?

Software Development python
Member Avatar for TheSkunkMan
0
4K
Member Avatar for Jackiemonster

I have a project to do for my CMPT 120 Class. And it's using basic python coding. I'm trying to write my name out with block letters. 'JAX' I need to use for loops and i'm stuck on my X here's the code for it [code] def x(n): t3=turtle.Pen() t3.left(60) …

Software Development python
Member Avatar for vegaseat
0
174
Member Avatar for xav.vijay

Hai friends I have a small problem with my code... I want to copy an existing file (its a model MS Excel file) to a new file & name it with the current date... First I tried to create the model Excel file, but when I opened it, it had …

Software Development file-system python
Member Avatar for xav.vijay
0
317
Member Avatar for bumsfeld

Does Python have something like peek(memory) and poke(memory) of other languages that read and write to memory addresses directly?

Software Development python
Member Avatar for vegaseat
0
123
Member Avatar for shanenin

I would like to write an application that would search a site like "minitorrents.com" and automatically download torrent files of tv shows I like. I am thinking urllib.py might be able to do something like this. I need to be able to use the search feature of "minitorrents.com", then recursivley …

Software Development python
Member Avatar for shanenin
0
269
Member Avatar for mforeman

Hello, I’m trying to increment numbers in a file – for instance, I would like to change the below 3 lines in a file by incrementing the numbers by 2 (or whatever the user gives). Mikef<20:40> JoeyS<23> Samt<14:39> So the end results should look like this: Mikef<22:42> JoeyS<25> Samt<16:41> I …

Software Development file-system perl
Member Avatar for mforeman
0
163
Member Avatar for Skyline_GTR

I am very new to python and I have this code that I wrote... I am trying to make it so the turtle will bounce if it touches any of the box.. but somehow the turtle does not fuction the way it suppose.. I wonder can anyone give me a …

Software Development python
Member Avatar for Skyline_GTR
0
568
Member Avatar for bumsfeld

What are the ways to find substring in string in Python? Which way is most effiecient?

Software Development python
Member Avatar for shanenin
0
219
Member Avatar for bumsfeld

What is the best way to sort a list of words with the case insensitive?

Software Development python
Member Avatar for bumsfeld
0
113
Member Avatar for desertstorm

Could someone help me with this. I need to know how to write this in code for C. "if hashValue(variable) has a non-zero bit in the 4 leftmost (highest) bits" It has to do with bitwise shifting and is basically just an if statement's condition. Thanks

Software Development c
Member Avatar for desertstorm
0
132
Member Avatar for mikul86

Hello, I'm very new to python script and I am attempting to understand a part of a program developed at my work place because the have the most computer knowledge here, though still very little and the person who developed the program is no longer accesible. Here's the problem i'm …

Software Development python
Member Avatar for vegaseat
0
75
Member Avatar for Drowzee

I'm almost done with my project, due in great part to the support and well-reasoned criticism here at Daniweb. But there's one last little problem that's only hitting me in release mode. In debug, the following function works fine to set information from a user-entered string to the CString/CString Map. …

Software Development c
0
109
Member Avatar for tayspen

ok, so i have been working on a program that i call "Sharppad" any ways it is a text editor. it has all teh basic functions. but it can also speak teh text you type. and convert text to .wav files. so you can listen to what you type. it …

Software Development
Member Avatar for tayspen
0
263
Member Avatar for bumsfeld

I hear a lot about PyGame for writing games and that I understand is SDL in a Python coat. Is DirectX used in a similar fashon? Any examples?

Software Development python
Member Avatar for CrazyDieter
0
323
Member Avatar for mccarthp

Alright, I think my previous post about this subject was very confusing so I will try again. First off I appreciate all the responses to my prior post (Setting a Variable to the Exit Code). It is my understanding that when a script completes it returns an exit code. I …

Software Development first-post python
Member Avatar for CrazyDieter
0
352
Member Avatar for SpS

sizeof (int) gives me 4 bytes...is it sufficient to say that my machine is of type 32-bit

Software Development c
Member Avatar for SpS
0
357
Member Avatar for coder_gus

Hello to all!How can i make a list from all the small letters of the alphabet without writing every one?Is there an operator/function that does that,something like ['a'-'z'].I've tried in many ways but i'm new in Python and if there is that operator i haven't discover it yet.My appreciation!

Software Development python
Member Avatar for coder_gus
0
245
Member Avatar for c_shaft05

Ok well I've hit a snag... i'm trying to write a program that makes Acronyms from user input... I can get all the letters capitalize, but the problem i am having is, well, taking the first letter from each and puting them together to make an acronym!!!!!

Software Development python
Member Avatar for vegaseat
0
3K
Member Avatar for Avner .H.

Hey everybody... Does sombody knows how can i use the getattr function in order to call to a sub function defined inside another one? somthing like this code: # ---------------------------- def func1 (self, func_name) : def func2 () : print "Blaaaa" def func3 () : print "Yaaaaa" getattr(?, func_name)() self.func1("func3") …

Software Development python
Member Avatar for vegaseat
0
163
Member Avatar for shanenin

I have been doing most all of my python programming in a linux bash shell. I mean I run all of my scripts from a bash shell. If my script produces an error(hardly ever happens :-), the error is outputted to the shell, so I am able to fix it. …

Software Development python
Member Avatar for shanenin
0
126
Member Avatar for toxic_iguana

#include<stdio.h> int main() { float f1,f2,f; double d1,d2,d; char s1[]="2.0045",s2[]="1.00056"; f1=atof(s1); f2=atof(s2); f=f1-f2; d1=atof(s1); d2=atof(s2); d=d1-d2; printf("\n%s %s",s1,s2); printf("\n%f %f : %f",f1,f2,f); printf("\n%ld %ld : %d\n",d1,d2,d); return 1; } Output: 2.0045 1.00056 1271310336.000000 869988544.000000 : 401321792.000000 -67108864 1104343465 : 1870659584 Desired Output: 2.0045 1.00056 2.0045 1.00056 : 1.00394 2.0045 1.00056 …

Software Development c
Member Avatar for toxic_iguana
0
102
Member Avatar for Niklas

Ive searched through google and most are not free, and the ones that are are being declared have a virus inside by norton as well as ewido. BTW im trying to do this because there was a PSP (playstation protable bin loader released) [URL=http://www.psp-hacks.com]website and article here[/URL]. I wanted to …

Software Development c c# c++ google
Member Avatar for Niklas
0
229
Member Avatar for bumsfeld

I am just starting to look at writing class in Python. Can a class that I write inherit Python calendar?

Software Development python
Member Avatar for bumsfeld
0
153
Member Avatar for bumsfeld

Does anyone have a meaningfull example of the use of the Profiler included in Python?

Software Development python
Member Avatar for bumsfeld
0
146
Member Avatar for bumsfeld

I know that lambda is some kind of function in Python. What does it do? Why would one use it?

Software Development python
Member Avatar for vegaseat
2
412
Member Avatar for bumsfeld

I hope the spelling isn't too far off, but what is list comprehension statement and why would one use it?

Software Development python
Member Avatar for vegaseat
0
154
Member Avatar for FinnDutch

Hello! I'm a total dummy when it comes to programming, and now I have a heck of a data extracing job to do for my graduation thesis :cry: Hopefully somebody can help me in the right direction here, because a whole day of surfing didn't get me to the right …

Software Development display hard-drive html-css python
Member Avatar for FinnDutch
0
156
Member Avatar for mina1984

hey, um i was wondering if anyone could help me with a program where if the user inputs a number no more than 5 digits and the program tells you how many times the number 2 appears in that number. i know that the modulus and division have to be …

Software Development c++
Member Avatar for mina1984
0
229
Member Avatar for vegaseat

[B]Python and the JPEG Image File, Part 1, The Header[/B] [B]Intro[/B] The JPEG image file format (.jpg) is very popular on the internet because you can pack a lot of picture information into a relatively small file. There are competing file formats like GIF and PNG. GIF is rather limited …

Software Development file-system image python
0
681
Member Avatar for Niklas

:mrgreen: I've just started learning and doing examples out of the book but I wanted to see if I could actually make something besides just copying stuff out of a book. So I tried to make an addition calculator. This isnt the entire source code but just a few snippets …

Software Development c++
Member Avatar for Niklas
0
257
Member Avatar for Acidburn

Can anyone help us out in this dept, everytime I go through my program when it terminates I get the famous windows: "main.exe has encountered a problem and needs to close. We are sorry for the inconvencience ........ Debug, Send Error Report, Don't Send Yep that one... Can anyone offer …

Software Development c++ oop
Member Avatar for Acidburn
0
257
Member Avatar for Acidburn

[php] hangman::hangman( char * surname, int size) { name = new char[size]; encryption = new char[size]; strcpy(name,surname); for (int i = 0 ;i <size; i++) { encryption[i]='*'; } lives = 5; found = 0; } [/php] encryption seems to be heading over its borders!! the size = 45 ; I've …

Software Development c++ encryption
Member Avatar for Acidburn
0
161
Member Avatar for stinus

Hi all, I have a problem that is hopefully easy to solve for you guys: I have written a rather large C++ program as part of my Master's. Now, I have to use an open source C-library ([url]http://www.tbi.univie.ac.at/~ivo/RNA/RNAlib_toc.html[/url]). I have never tried to combine C and C++. To figure out …

Software Development c++ google open-source
Member Avatar for stinus
0
500
Member Avatar for Acidburn

[php] int j; for ( j= 0 ;j <sizeOfArray ; j++) { if( letter == array2[j] ) { ++found ; encryption[j] = array2[j]; } } if ( array2[j] =='\0' && found!=0) { cout << "not found" <<endl; --looselife; cout << "You now have" << looselife << "remianing" <<endl; } [/php] …

Software Development c++ encryption
Member Avatar for Narue
0
111
Member Avatar for SpS

[code] char *name; cout<<name; [/code] and [code] char*name; name=new char[20]; cout<<name;[/code] both of these work....then why do i need memory allocation....where does the first code fails

Software Development c
Member Avatar for SpS
0
163
Member Avatar for vegaseat

[B]Intro[/B] When you declare an integer variable in C, the variable is assigned a fixed memory location with enough space to hold the type integer. When you then initialize the variable with a value, the value is put into that space. Take a look at the C code sample below: …

Software Development python
0
6K
Member Avatar for Blazer

Hi everyone, I require some help for this project I am currently working on. Basically what I have to do is read from two text files, then calculate some numbers from both files (eg: add the numbers and average them) and after that, write the results to a another file. …

Software Development java
Member Avatar for boyzz
0
183
Member Avatar for Dani

I am currently finishing up my B.S. in Computer Science at a local private University. When I started a couple of years ago, C++ was taught in the intro to programming course for freshmen. About two years later, Java was taught as a first language. (I disagree with that because …

Software Development oop python
Member Avatar for vegaseat
0
157

The End.