132,726 Archived Topics
Remove Filter ![]() | |
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 | |
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 | |
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 | |
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 | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
![]() | 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 |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 | |
[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 | |
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 | |
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 | |
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++ | |
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++ | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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. | |
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 |
The End.