132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for ffs82defxp

this is my code: [CODE]import os,sys import random import webbrowser import time import subprocess as sp cls=os.system("cls") title=os.system('title Hit any key to start searhing!') while True: cls print "" title raw_input() getRandEntry() def getRandEntry(): theFile = open("wordlist.txt","r") wordList = theFile.readlines() theRandoms = [] theRandoms.append(random.choice(wordList)) * 4 startLink(theRandoms) return theRandoms def …

Software Development python
Member Avatar for Gribouillis
0
173
Member Avatar for Annettest

Hello everyone: I am a C++ newbie. I aim to use C++ in my work on coupled fluid flow-chemical reaction problems. I would very much appreciate some help to get me on the right track! I apologize in advance for what is probably a very simple question. My goal is …

Software Development c++
Member Avatar for Annettest
0
285
Member Avatar for gibson.nathan

im working on this program and im getting really stuck. i was hoping to get it done soon, but it is dragging out. i have completed the first half of the instructions, i believe. [CODE]2. Create an abstract class called Student. a. Student will need instance variables name , qz1, …

Software Development java
Member Avatar for VernonDozier
0
224
Member Avatar for Dajer

Hi friends. I have a datagridview in my project.I want to navigate between cells( in a row) by pressing "Enter".I mean when user edits a cell, navigates to next cell by pressing Enter.(as we know navigation to the next row by pressing enter is the default action) I tried to …

Software Development
Member Avatar for sknake
0
392
Member Avatar for axa121

Hi, I am still very new to python and programming so could anyone help me on how to input lines from a user, one line at a time until they type "." on a separate line. I also wanted to count how many lines they entered. What I tried was …

Software Development python
Member Avatar for masterofpuppets
0
189
Member Avatar for sentinel123

hey folks, i'm trying myself on a csv based adressbook but I get the following error: [CODE] Traceback (most recent call last): File "C:\Dokumente und Einstellungen\Mo\Desktop\adressbook.py", line 11, in <module> writer.writerows(data) File "C:\Python26\lib\csv.py", line 149, in writerows rows.append(self._dict_to_list(rowdict)) File "C:\Python26\lib\csv.py", line 140, in _dict_to_list ", ".join(wrong_fields)) ValueError: dict contains fields …

Software Development python
Member Avatar for J-M DESMETTRE
0
776
Member Avatar for arem4sure

i want to create Java program that accepts 3 numbers (num1, num2, num3) and sort them in ascending and descending order. Example: Enter num1: 8 Enter num2: 3 Enter num3: 9 Ascending: 3, 8, 9 Descending: 9,8,3 can anyone help me for this (sorry for my bad English)

Software Development java
Member Avatar for mahkris
0
113
Member Avatar for theweirdone

Hi, I'm trying to get a list of the subjects that I'm getting from emails in gmail. I can get the subjects, but I can't seem to get them into a list. Here's my code so far: [CODE] #! usr/bin/env python import imaplib M=imaplib.IMAP4_SSL('imap.gmail.com', 993) M.login('user@gmail.com','password') M.select() typ, emails = …

Software Development python
Member Avatar for slate
0
137
Member Avatar for pecet

Looks like I miss something, so I need your help, guys. [CODE] #include <iostream> using namespace std; int main() { int* ptr=new int(2); const int* constPtr=ptr; int** ptr2; //... do memory stuff for ptr2 const int** constPtr2=ptr2; typedef int** intPtr; const intPtr ptr3 = ptr2; return 0; } [/CODE] Questions: …

Software Development c++
Member Avatar for pecet
0
165
Member Avatar for reddevilz

Hey guys, just starting out with C#. I had a few doubts, would really appreciate it if anyone could help me out here Question #1 [CODE]animal dog; dog = new animal();[/CODE] what's the difference between the above two lines ? Question #2 [CODE]namespace proj1 { public class form1:form { guy …

Software Development c#
Member Avatar for ddanbe
0
161
Member Avatar for Sorb3t3ro

How to open c++ using the command prompt so that I can start programming in c++? Thanks!

Software Development c++
Member Avatar for zobadof
0
3K
Member Avatar for abhay1234

i was trying to run a program on RMI i did the following [code] import java.rmi.*; public interface HelloInterface extends Remote { public int add() throws RemoteException; } [/code] [code] import java.rmi.*; import java.rmi.server.*; public class Hello extends UnicastRemoteObject implements HelloInterface { private int m,n,message, k,l; public Hello (int m,int …

Software Development java
Member Avatar for mahkris
0
133
Member Avatar for Geek_Cyborg

Hello, Can anyone tell me how can i use Unicode Text from a file in a String or in a TextBox? Please Help Thanks

Software Development visual-basic
Member Avatar for vb5prgrmr
0
102
Member Avatar for gangster88

I need the function to be able to walk in all four directions with equal probabbility and return the distance away from the starting point. The function below only takes steps forwards and backwards? [code] def main(): numWalks, numSteps = getInputs() averageSteps = takeWalks(numWalks, numSteps) printExpectedDistance(averageSteps) def getInputs(): numWalks = …

Software Development python
Member Avatar for thecheesewheel
0
106
Member Avatar for fairy1992224

what is comment in VB.Net and how to comment. I having a test in 3 days time. Urgent!!!! Thanks in advance.

Software Development vb.net
Member Avatar for kvprajapati
0
128
Member Avatar for rukshilag

Can someone please explaon the difference of the above action listeners?? it seems like they both do the same thing - that is close a frame/window. big help thank you

Software Development java
Member Avatar for kudresov
0
244
Member Avatar for viswanathgs

I declared a map of the form [CODE]map<pair<int,int>,int> net;[/CODE] and inserted elements in the following way [CODE]net.insert( make_pair( make_pair(c1,c2 ),cost ));[/CODE] I could access the second element (cost, in the above code) using iter->second. But, I want to know how to access the two elements that form the first pair …

Software Development c c# c++
Member Avatar for programmersbook
0
76
Member Avatar for zobadof

I have started to learn C++ and would like to know where to go from now. I have been getting helped by MattyRobot. I have done Hello World, Input, Sqaure of Numbers, Making decisions, Cmd games, Operators, Repeated question and started to make a window. I would like some help …

Software Development c++
Member Avatar for SgtMe
0
181
Member Avatar for josh48

I want to code a little character fighting game in Pascal, I want to have 2 characters. They will attack each other, one will be computer and other will be the player. Each time its your turn a menu will come up saying what type of attack, I will have …

Software Development pascal
Member Avatar for FlamingClaw
0
141
Member Avatar for klactose

Hello all, I am in the process of translating a program from lisp into C#, most of it has gone smoothly but I have run across two blocks of code that are giving me a bit of trouble. If anyone can help me translate these two pieces of code into …

Software Development c#
Member Avatar for Rashakil Fol
0
340
Member Avatar for .:Pudge:.

I am trying to read the contents from the specified file into a char array and then send that to the client. The problem i get is that getline() wont take a char array as a parameter and strcat() wont take a string as a parameter so I dont know …

Software Development c++
Member Avatar for programmersbook
0
127
Member Avatar for d8m9

Hi, Iam new in python (1/2year) and here is the thing: I made a small text editor with tkinter and I want to generate web page from the text editor (from formated text). To web page generating I will use the HTMLgen module. So it must be created another python …

Software Development python tkinter
Member Avatar for d8m9
0
185
Member Avatar for funfullson

I wrote a gui with qt and converted it into python.it came below. know I want to use the information witch user entered.for example the text boxes text or want decide around the buttons clicked or any thing else.at all how can i manage my qt forms data in my …

Software Development gui html-css python qt
Member Avatar for funfullson
0
157
Member Avatar for otan

Write a program to assign passengers seats in an airplane. Assume a small airplane with seat numbering as follows: A 1 2 3 4 5 B 1 2 3 4 5 C 1 2 3 4 5 D 1 2 3 4 5 E 1 2 3 4 5 The …

Software Development c++
Member Avatar for jonsca
0
1K
Member Avatar for Inkoosikas

Hay, I am a noob, to the programing world, so i need a little help with lists. My problem is; I would like to create a list that contains the percent that each number of the first list is of sum of the firs list list. so like this. [CODE]first_list=[1,2,3,4,5] …

Software Development python
Member Avatar for Inkoosikas
0
104
Member Avatar for Dmc15

Im trying to create a python program capable of solving a maze. I need it to be able to solve a maze that is any number of rows in height and any number of columns in width. I need the maze itself to be brought in as input from a …

Software Development python
Member Avatar for slate
0
201
Member Avatar for raashi.rai

Hello guys.. i need a help.. m new in java swings.. m using netbeans to create one application.. here i have to insert a new jtable at runtime.. like when a click on a button jtable should be inserted.. how can i do that in netbeans.? please help..

Software Development java java-netbeans
Member Avatar for peter_budo
0
85
Member Avatar for halluc1nati0n

I'm trying this in Visual Studio 2005 (VC++) [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <bitset> #include <sstream> #include <conio.h> #include <iostream> using namespace std; #include <time.h> string tot_msg, message, to_be_sent_msg, sent_msg, msg_to_be_sent; char * transport_layer_data_header; char * transport_layer_data_msg; bool whole_msg_sent=false; int actual_len, i, seq_num=0; char * mynode = "2"; …

Software Development c++ unix visual-studio
Member Avatar for mrnutty
0
251
Member Avatar for ROTC89

so i wrote a program that is suppose to have a array that has random numbers in it. sort the array, and then do a binary search and interpolation search to find the number and how many comparisons it took. i get it to work sometimes but the comparisons are …

Software Development c++
Member Avatar for mrnutty
0
132
Member Avatar for wingers1290

Hi, I am using the following code to open a file "Zl2WIN". [code] FileStream filestream2 = new FileStream("ZL2WIN", FileMode.Open); BinaryFormatter bf2 = new BinaryFormatter(); Person JohnDoe = new Person(); JohnDoe = (Person)bf2.Deserialize(filestream2); textBox7.Text = JohnDoe.CallSign; textBox8.Text = JohnDoe.Freq; textBox9.Text = JohnDoe.Time; textBox10.Text = JohnDoe.fName; textBox11.Text = JohnDoe.lName; textBox12.Text = JohnDoe.Country; …

Software Development c c# c++
Member Avatar for wingers1290
0
182
Member Avatar for kavourdoukos

[CODE]#include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <algorithm> using namespace std; class letter{ private: int genre; int price; string adress; public: letter(); ~letter(); }; class parcel{ private: int genre; int price; string adress; public: parcel(); ~parcel(); }; class post{ private: letter** LETTERS; parcel** PARCELS; …

Software Development algorithm c++
Member Avatar for mrnutty
0
116
Member Avatar for wingers1290

Hi, i've been reading the other thread on serializing and use the following code to serialize the data in a textbox. [code] private void saveToolStripMenuItem_Click(object sender, EventArgs e) { BinaryFormatter binaryFormat = new BinaryFormatter(); Stream fstream = new FileStream("data.dat", FileMode.Create, FileAccess.Write, FileShare.None); binaryFormat.Serialize(fstream, (textBox1.Text)); fstream.Close(); } [/code] This successfully creates …

Software Development c c# c++ file-stream
Member Avatar for wingers1290
0
184
Member Avatar for candoc

Is there a way to split a string every 30 characters and store them in smaller strings without looking for a token?

Software Development c
Member Avatar for jephthah
0
88
Member Avatar for p3rsia

i Need Help to done this project for my school USER Requirement statement Booksareus wishes you to design a program to satisfy the following requirements: Display a Welcome screen Display a menu of option, accept and perform user choice of option untill E for exit is chosen B.Book List I.Invoice …

Software Development c#
Member Avatar for ddanbe
0
116
Member Avatar for phatJacob07

I usually feel pretty bad asking simple questions like this, but I've a deadline that's fast approaching. What, if anything, is wrong with this Update statement? [CODE]"Update ScoutInfo Set YearID = 20092010, GSUSAID = 1, FName = 'Jacob', LName = 'Lowe', DoB = '10/16/1989', Grade = '12', Level = 'Ambassador', …

Software Development vb.net visual-studio
0
77
Member Avatar for tnccjavaMatt

I have to write a program that creates a GUI that prompts a user to enter a query, then return the result to the same screen. All the examples I've found in my text book and other course material only shows how to account for a predetermined query. How do …

Software Development gui java java-swing microsoft-access
Member Avatar for tnccjavaMatt
0
883
Member Avatar for klackey19

This program is supposed to add, subtract, multiply, and divide complex numbers and doubles as well as complex numbers against complex numbers. When i try to run it, I get a syntax error at line 59 and cannot figure out why. Any help/advice/pointers would be greatly appreciated. [CODE]class complex: def …

Software Development python
Member Avatar for woooee
0
107
Member Avatar for Amawri

Hi everyone. I'm a reta-I mean a beginner and 98% of my bugs are something really obvious... but I've checked this so much and I don't know what to do. This is my function to create an Employee object, called when the user wants to add a new employee to …

Software Development c++
Member Avatar for UberJoker
0
235
Member Avatar for dvbrooks

I am trying to draw a hollow square and I am having a problem with nesting while loops within while loops. Is this possible? The quoted part of code is the trouble part. #include <iostream> using namespace std; int main(void) { int sides, t=2, h=0, b=0, s; cout<<"Size of square: …

Software Development c++
Member Avatar for dvbrooks
0
77
Member Avatar for amanda2131821

I have this code that uses epoll and it has a problem. When I run it, it gives output: Server-socket() is OK... Server-bind() is OK... 3 4 accept: Invalid argument I'm running it on ubuntu linux, system updated, both as limited user and root what is wrong with the input …

Software Development c++ ubuntu
Member Avatar for programmersbook
0
161
Member Avatar for vishesh.verma

Its showing size of type is unknown or zero [code=c++]#include<conio.h> #include<stdio.h> #include<graphics.h> #include<iostream.h> #include<math.h> int gc,gd=DETECT; int x[3][4],tx,ty,i=0; float turn[3][4]; void draw() { moveto(x[0][0],x[1][0]); for(i=1;i<4;i++) { lineto(x[0][i],x[1][i]); x[2][i]=1; } lineto(x[0][0],x[1][0]); } void rot() {double ang; float rot[3][3]; cout<<"enter the angle through which u want to rotate the figure\n"; cin>>ang; rot[2][2]=1; …

Software Development c++
Member Avatar for StuXYZ
0
81
Member Avatar for Chikky

I have an assignment to write an ATM program (it just needs to be basic) and I am getting one error when I try to compile: On line 28, I get an `expected unqualified-id before '{'`. I don't know that it's the only thing wrong with it, but any ideas …

Software Development c++
Member Avatar for UberJoker
0
745
Member Avatar for MSV22

Hi I am new to this forum so please excuse me if am not following the etiquette. I am a beginner in wxpython. For a project I need to create a color palette. Please check and tell me what I am doing wrong. Any help,suggestion,code snippet is welcome. [code] import …

Software Development python
Member Avatar for MSV22
0
461
Member Avatar for papanyquiL

I made the following function for my Sudoku solver but the answers keep turning out wrong (some of the numbers are showing as doubles right next to eachother). Can somebody help please? [code=c++] void reduction_candidateLines(void) { /* * declarations */ //drives loop int k, j, x, y, z, t; //counts …

Software Development c++
Member Avatar for mrnutty
0
156
Member Avatar for KRal

/*This is an assignment for school. The main is part of the assignment. The program will work sometimes, sometimes it will not count the longest word if it is at the end of a sentence.*/ #include<iostream> using std::cout; using std::cin; // Prototype for the longest_word function that you need to …

Software Development c++ perl
Member Avatar for KRal
0
97
Member Avatar for snostar

I am researching how to create a dll in VB..can it even be done? Does anyone know of any sites or books that can help me through this process?

Software Development visual-basic
Member Avatar for eladkarako
0
2K
Member Avatar for rmcummings

I can not get the program to read the entire sentence. The main is part of the assignment. Any suggestions would be a great help! [CODE]#include<iostream> using std::cout; using std::cin; // Prototype for the longest_word function that you need to write. // Add consts where necessary to obey the principle …

Software Development c++
Member Avatar for Murtan
0
111
Member Avatar for infern0

Here is the piece of code I am having problems with. It is supposed to let me look up any items I put in the program previously. If the user did not enter a product earlier it should say "product not found". My problem is that it remembers the first …

Software Development c++
Member Avatar for Murtan
0
112
Member Avatar for kool005

Hi, I have some vertices and edges and i have to create an adjacency list. I have taken an array and stored all vertices in the array. Now i need to add the edges to the graph. The input is given as a text file. When i read "a b …

Software Development java linked-list
Member Avatar for mellowmike
0
145
Member Avatar for neighbordave

I am totally lost when it comes to assembly language. My teacher just decided one day at the end of this semester to give us a programming assignment in assembly language and has barely taught us anything. I have to use five subroutines: main, add, subtract, multiply, divide and cannot …

Software Development assembly
Member Avatar for ProgramIT
0
1K

The End.