132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Lapixx

Hi, I'm trying to create a textgame in python, and after searching for a few topics about it I though I knew how to make it. Many textgames use a system like this: [CODE]def room_one(): #do stuff if something: room_two() def room_two(): #do stuff [/CODE] Most of the time the …

Software Development python
Member Avatar for ultimatebuster
0
168
Member Avatar for TrustyTony

Here is my newest baby, the pretty.py module, born today, which I start to use instead of pprint module. Reason to make this (in addition to that it is possible to do) is that I had this problem, sorry long, LONG example: UPDATE: take out the [CODE]or j[/CODE] that was …

Software Development python
Member Avatar for TrustyTony
0
2K
Member Avatar for alabandit

I generate an array from the folders in a directory; which is placed in an array. i then compare it for changes in the currant folder.This way i can monitor for new files that are add to the system and trigger the script. but i am having problems comparing the …

Software Development python
Member Avatar for alabandit
0
124
Member Avatar for lishannx

I have a program and i want to make the increment keep adding on. I added a while loop but its not working. Anyone help ? [CODE]int Limit = 0; if (e.Button == MouseButtons.Left) { ((PictureBox)sender).Left += (e.X - x); ((PictureBox)sender).Top += (e.Y - y); ((PictureBox)sender).BringToFront(); int Qty = 0; …

Software Development
Member Avatar for lishannx
0
150
Member Avatar for Carter12

Hello, I need some advice from some of the more expert programmers on what path should I take further in my learning process. I started with PHP and now I can say I do ok, not an expert of course. I like programming very much and I love PHP, it's …

Software Development asp.net c c++ php
Member Avatar for omol
0
260
Member Avatar for KONTOL

public class AddPlanePanel extends JPanel implements MyObserver { private JLabel planeLabel = new JLabel("New Plane "); private JLabel nameForPlane = new JLabel("Name:"); public JTextField inputPlaneName = new JTextField(15); private JButton button = new JButton("Add"); private JLabel status = new JLabel(); private JLabel typeLabel = new JLabel("Type:"); private String[] typeStrings = …

Software Development java
Member Avatar for moutanna
0
184
Member Avatar for nsutton

I know the code for sending mail is. [CODE] import smtplib fromaddr = 'fromuser@gmail.com' toaddrs = 'touser@gmail.com' msg = 'There was a terrible error that occured and I wanted you to know!' # The actual mail send server = smtplib.SMTP('smtp.gmail.com:587') server.starttls() server.login(username,password) server.sendmail(fromaddr, toaddrs, msg) server.quit() [/CODE] Basically its a …

Software Development python
Member Avatar for nsutton
0
113
Member Avatar for Exaktor

Hi, I want to make an inventory program and I need help with how to put an add and a delete button in a column. I want that the delete button deletes the row and when I click the edit button a forms comes up so I can edit the …

Software Development
Member Avatar for Exaktor
0
391
Member Avatar for Exaktor

See the image below to understand better. [URL="http://img18.imageshack.us/img18/9086/inventoryadd.jpg"]http://img18.imageshack.us/img18/9086/inventoryadd.jpg[/URL] When I click add button in form2 it doesn't show any changes in the datagridview does anyone know what code I should use so the datagridview changes when I click add. I am now using a update button and that shows the …

Software Development
Member Avatar for Exaktor
0
115
Member Avatar for Xufyan

find the max value in an array ? can anyone tell me whats wrong with this program ? i've just learned what are arrays so don't know much about it, i want to write a program that prints the max value inside an array. i wrote this: [CODE]int main(void) { …

Software Development c
Member Avatar for MageBane
0
248
Member Avatar for Aeronobe

I'm having this problem with passing a variable. Basically i'm trying to find every url in a HTML document. I'm doing this using the HTMLParser class (i made an extension of it). This is the code: [ICODE]class Parser(HTMLParser.HTMLParser): def __init__(self, url): HTMLParser.HTMLParser.__init__(self) req = urllib2.urlopen(url) self.feed(req.read()) def handle_starttag(self, tag,attrs): if …

Software Development python
Member Avatar for Aeronobe
0
96
Member Avatar for death.cometh

I'm trying to display some data from a MS Access database to a data report. It was successful, unfortunately, I need to display it in the format below: [B]emp_name[/B] [B]date[/B] [B]remarks[/B] [INDENT][INDENT][B]date[/B] [B]remarks[/B][/INDENT] [/INDENT] [INDENT][INDENT][B]date[/B] [B]remarks[/B][/INDENT] [/INDENT] [INDENT][INDENT][B]date[/B] [B]remarks[/B][/INDENT] [/INDENT] [B]emp_name[/B] [B]date[/B] [B]remarks[/B] [INDENT][INDENT][B]date[/B] [B]remarks[/B][/INDENT] [/INDENT] [INDENT][INDENT][B]date[/B] [B]remarks[/B][/INDENT] [/INDENT] [INDENT][INDENT][B]date[/B] …

Software Development visual-basic
Member Avatar for Bashir ahmad
0
129
Member Avatar for Amoryethel

This is my first post here, so excuse me if I'm not posting my question in the correct format. I'm trying to make a program that determines whether the score entered is passing (higher than 70.0) or failing (lower than 70.0). The array I'm using needs to be declared as …

Software Development java
Member Avatar for moutanna
0
107
Member Avatar for Cap'nKirk

Hi, I have a panel on a form and am displaying a picturebox on that panel. I have set the Panel Autoscroll to true. Even when I manually make the panel smaller than the picturebox, no scrollbars are shown, why is this? Here is the code I am using to …

Software Development
Member Avatar for Cap'nKirk
0
983
Member Avatar for Qwazil

Hey all, I'm a beginner. When i feed a list of lines into this for statement, i have trouble getting the output into a set for use outside of the for statement. [CODE] ListofWordsinLines = {} words = [] for line in ListOfLines: words = line.split() ListofWordsinLines = set(words)[/CODE] if …

Software Development python
Member Avatar for TrustyTony
0
159
Member Avatar for ams_chelseafc

I have written the following Code which will convert an integer number to a roman..I have a array list of integer number which I pass through a for loop and the return value is individual converted Roman character.. My Issue is when the converted value is returned from the function …

Software Development c
Member Avatar for jephthah
0
811
Member Avatar for the_preface

I'm writing a program which accepts the price of a tour. A tour is priced between 29.95 and 249.99. It's supposed to repeat until a valid price is entered... However, even when it is, the program continues to repeat. Here's what I have so far. [CODE] import java.util.Scanner; import java.util.InputMismatchException; …

Software Development java
Member Avatar for the_preface
0
126
Member Avatar for leesho

its a random number generator [CODE]#include <iostream.h> #include <stdlib.h> #include <time.h> #include <iomanip.h> using namespace std; int main () { const int MAX_RANGE = 100; int value; int random = rand( ); int num = ((random % 100) + 1); int quit; do { srand (time (NULL)); value = rand() …

Software Development c++
Member Avatar for WaltP
0
161
Member Avatar for ebay1989

Hey guys, I'm new to all this but basically I've been given the task to create a simple C# board game using the console screen. The game consists of a 36 square board and 2 players (player 1 & player 2). Both the players take it in turns to roll …

Software Development c# gaming
Member Avatar for phoenix911
0
5K
Member Avatar for lotrsimp12345

Here's the assignment: You are to create a single server (in either Java or C/C++) which can service both C/C++ and Java clients. The protocol of the server is as follows: 1. The client contacts the server. 2. The client performs a single send of a data packet containing the …

Software Development client-server data-structure java
Member Avatar for moutanna
0
1K
Member Avatar for noobuser

Hi, can anyone help me with this program. the program inputs a string and replace the first char with the second one. [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX 200 int main(void) { char myString[MAX]; char getCh; char setCh; int i = 0; printf("Please enter the string: "); gets(myString); …

Software Development c
Member Avatar for noobuser
0
175
Member Avatar for kiyu2keith

How do you terminate the program?? for example I input exit on the dialog box as it should terminate the program. I really don't have any idea on how to do it.

Software Development java
Member Avatar for kiyu2keith
0
78
Member Avatar for jpl1993

class tennis: def __init__ (self, name, rank, tournamentsPlayed, country, racquetBrand): self.name = name self.rank = rank self.tournamentsPlayed = tournamentsPlayed self.country = country self.racquetBrand = racquetBrand #defines each thing^ def __str__(self):#creates a string return self.name + ":" + self.rank + "\n" + self.tournamentsPlayed + "\n" + self.country + "\n" + self.racquetBrand …

Software Development python
Member Avatar for TrustyTony
0
140
Member Avatar for new2programming

Hi i am using Visual c++ with SDL I have been using a tutorial from lazy foo productions but when i go to build my solution my complier says: Cannot open include file: 'SDL.h': No such file or directory

Software Development c++
Member Avatar for new2programming
0
916
Member Avatar for vextorspace

I have a JFrame that I call from another JFrame like so: [CODE] Viewer2D v = new Viewer2D(this); v.setVisible(true); v.DrawAssembly(glNameList.get(hitRecs.get(0).getNames()[0])); [/CODE] I set the exit action to an action listener and call dispose() and both of my JFrames disappear! How do I get only the one I'm working on to …

Software Development java java-swing
Member Avatar for BestJewSinceJC
0
88
Member Avatar for trpsjt2008

I Make Encode Text Program Then I use Function [CODE] TextBox2.Text = Passed(Microsoft.VisualBasic.Right(nowvalue, 5)) & " " & TextBox2.Text [/CODE] And It tell This Error [CODE]Operator '&' is not defined for types 'System.Drawing.StringFormat' and 'String'.[/CODE] Why "&" is caught in function but it seperate from "()" First And My Code …

Software Development vb.net
Member Avatar for kvprajapati
0
88
Member Avatar for bigsurya

I am getting a NullPointerException in the statement which I've hidden. Can some1 tell me why is it so ? [code] import java.io.*; class College { String branch,name = new String(); int avg_marks,rno; InputStreamReader in= new InputStreamReader(System.in); BufferedReader buf= new BufferedReader(in); String s=new String(); void read()throws IOException { System.out.println("Enter name"); …

Software Development java
Member Avatar for bigsurya
0
133
Member Avatar for ubi_ct83

Hello experts, actually i have a situation like this. i have a drop down menu value:{2,3,4,5,6}. there is a common operation need to be done if any number in menu list chosen.each of the number must have different number of layers. if user choose 2 means 2 layers,if 3 means …

Software Development java
Member Avatar for ubi_ct83
0
154
Member Avatar for ukshir

Hi, I have a custom control. I need to add a property, say, Comparison, to the control. The property should be set at design time using a dropdown. The Dropdown will have String values like '=','>','<' etc. I tried using Enum values and working perfectly but I need to do …

Software Development vb.net
Member Avatar for ukshir
0
129
Member Avatar for needanswer

I have 1 tabcontrol with 2 tabpages, each tabpage with 1 datagridview (different tables for each), I load these 2 databases on the form load: [ICODE] Me.AnndepTableAdapter.Fill(Me.HonorDataSet2.anndep) Me.SysdepTableAdapter.Fill(Me.HonorDataSet.sysdep) Dim sql1 As String Dim con1 As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data Source=C:\Users\user\Desktop\honor.mdb") con1.Open() sql1 = "SELECT * FROM sysdep" Dim adapter1 As New OleDbDataAdapter(sql1, …

Software Development open-source vb.net
Member Avatar for needanswer
0
419
Member Avatar for NathanOliver

Hey All Yesterday I was writing a recursive form of a prime factorization program and I wasn't sure about the syntax I used. the function works as is but I'm curious if I am being redundant or if this is the proper way to code it. Here is what I …

Software Development c++
Member Avatar for NathanOliver
0
134
Member Avatar for speedy94519

Hey guys im having trouble writing this code for my function. I have the idea down and a way to solve the problem but im having trouble writing it in C code. Basically im writing a function that runs exactly like the function strcat from the string.h library but we …

Software Development c
Member Avatar for anonymous alias
0
362
Member Avatar for sourabhtripathi

[CODE]#include<stdio.h> #include<conio.h> int main() { int dec,rem,ans=0; printf("Enter the Decimal number\n"); scanf("%d",&dec); while(dec>=2) { rem=dec%2; dec=dec/2; if(rem==0) ans=ans*10; else ans=(ans*10)+1; } printf(" binary number is"); while(ans>0) { rem=ans%10; ans=ans/10; printf("%d",rem); } getch(); return 0; } [/CODE] this code is not working properly for example for 10 it gives 01, should …

Software Development c
Member Avatar for abhimanipal
0
159
Member Avatar for coolguy_003

Hi, I did the stack implementation using arrays and i would like to do it with function pointers but i have no idea. If anyone could help by illustration that would be great as function pointers is pretty difficult for me! Thanks in advance. coolguy

Software Development c
Member Avatar for anonymous alias
0
269
Member Avatar for ragedsparrow

HEy everyone. I've been workign on this for a few days now and it's due tomorrow, so I thought I would ask a developer community for any input. Here is what is supposed to be happening. The Server starts. The Client Starts. The user enters a table name into the …

Software Development client-server java sql
Member Avatar for ragedsparrow
0
162
Member Avatar for Roo0ond

Hello frind>> I need solve this equation >> Chebyshev differential equation in c++ >>Let us solve togather>>> first the equation is : [url]http://upload.wikimedia.org/math/c/a/e/cae214684f8d6fcaa89fbbe1a195524b.png[/url] let start with someone >> Thankyou

Software Development c++
Member Avatar for mrnutty
0
141
Member Avatar for giodoli93

I know: -basic cout/cin -declaring single integers/strings -currently learning 'for' loops as you can see, my knowledge is extremely limited as of now, and i wish to have a few practice problems to have a go at. May i have some suggestions?

Software Development c++
Member Avatar for giodoli93
0
168
Member Avatar for RayvenHawk

I'm working with several programmers to get a program to compile & run on Windows and Linux. It compiles fine under Windows using SDL for most of the functions (sound, graphics & input), but we're getting an error when using a makefile under Linux. We've tried several things without any …

Software Development c++
Member Avatar for RayvenHawk
0
182
Member Avatar for yongj

I have a program where the cout "ing" a string misses the beginning letter of the string. I have made it so that there are 3 options to input/output the information. The "missing" letter in the string is ONLY evident in option 1; option 2 and option 3 does not …

Software Development c++
Member Avatar for yongj
0
225
Member Avatar for alex9292

hi im new to programing and im trying to make a program that would calculate the tax on a given price but that would accept the tax rate as either an integer or a double but i get this error [QUOTE]Index (zero based) must be greater than or equal to …

Software Development
Member Avatar for Ionelul
0
97
Member Avatar for tedsu

I am trying to add Jtext area to a Java application, load text from a Notepad file & allow user to change color of text & make text invisible/visible using Menu bar. I am having trouble with the 1st part--loading the contents of a text file. Any help would be …

Software Development java java-swing
Member Avatar for moutanna
0
159
Member Avatar for basma.lm

hi, i have this code which do search in Table1 and use the result of search to search in another datatable Table2: [CODE] SqlCeConnection conne = new SqlCeConnection(); conne.ConnectionString = @" Data source= |DataDirectory|\Database1.sdf"; conne.Open(); SqlCeDataReader rrs; SqlCeCommand comd = new SqlCeCommand("select CodePersonne from Table1 where DateRP ='" + DateTime.Now.Date …

Software Development open-source
Member Avatar for basma.lm
0
93
Member Avatar for rudasi

Hi, Im trying to make a batch script which can go through a directory and pick all the .txt files and copy the name in a file. Ive been able to make a script which can do this in a particular folder but if there is a folder in the …

Software Development shell-scripting
Member Avatar for rudasi
0
114
Member Avatar for close_encounter

I'm stuck trying to figure this out. I know I'm going to need a counter I just don't know where or how to implement it. I'm reading from a .dat file. The contents of the file look like this. google.com 760000 250 yahoo.com 340000 170 daniweb.com 230000 125 etc. I …

Software Development c++ file-system ios visual-studio
Member Avatar for Fbody
0
133
Member Avatar for Hawkeye Python

I'm trying to create a python cards game (a Brazilian cards game). But when I try to print some values (the cards played) it returns the following error: [QUOTE]Traceback (most recent call last): File "<pyshell#16>", line 1, in <module> play() File "C:\Documents and Settings\Terminal\Desktop\Truco.py", line 71, in play print "You …

Software Development python
Member Avatar for Hawkeye Python
0
235
Member Avatar for azrael_

Hi there. I am currently writing a registration program in Python, and have come across a problem. In my hours of searching, there seems to be no way to split a list that has elements obtained from [B]raw_input[/B]. Basically, I would like to take input from a user, feed it …

Software Development python
Member Avatar for TrustyTony
0
216
Member Avatar for Atlanticspace

Ok so i have the following functions that does a recursive merge sort. I need to pass my arrays in by reference since I have many different arrays containing different things. Im comparing lists[index1].get_type() vs lists[index2].get_type() yet when i run this i am getting the same event with the same …

Software Development c++
Member Avatar for Narue
0
169
Member Avatar for discovery-power

Hi All, I dont quite understand why this wont work i was hoping someone could help, I have got a noughts and crosses game and its all finished appart from the checkdraw sub routine i forgott to write in, so I wrote it out as below: Private Sub CheckDraw() If …

Software Development vb.net
Member Avatar for discovery-power
0
87
Member Avatar for dalaharp

Hi, i am trying to implement gabor filter for image enhancement. if someone has any code snippet or pseudocode or any idea of implementing it in C, please help me out with it. thanks.

Software Development c++ image
Member Avatar for hayat alazzeh
0
1K
Member Avatar for Lulie

i have this assignment and i would like to help me in this: Write assembly program that reads a word from the key board and compares it with an already defined word in the data segment. If the two words are the same it display “Correct Password” else it will …

Software Development assembly
Member Avatar for Lulie
0
117

The End.