43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for phummon

Hello everyone, I’m an intermediate-level C++ programmer grappling with a fairly rudimentary problem. I’m creating a C++ object called FruitCart; FruitCart contains a number of integers categorizing the numbers of individual fruit in the cart. I also need FruitCart to contain accessor functions so other functions can set, retrieve, and …

Software Development c++ microsoft-access unix
Member Avatar for phummon
0
133
Member Avatar for sarfrazashfaq

Hi there I am translating PERL code into PYTHON Code My PERL code is if ( my $client = $dealing_clients->{ $data->{fundId} } ) And i translated it into python as if (client = dealing_clients[data["fundId"]]): But it is giving my following Error "Syntax Error While detecting Tuple" Any one know how …

Software Development perl python
Member Avatar for sarfrazashfaq
0
693
Member Avatar for carpenoctem

I am trying to run my first program/script (pardon my bad terminology, I am a newbie), and just doesn't work. I am using Ubuntu, and IDLE. and I have written: [CODE]print "Hello, world!" [/CODE] I saved the file as hello.py. Tried to click Run - Run Module, but then it …

Software Development python ubuntu
Member Avatar for carpenoctem
0
101
Member Avatar for jonniebl

I am writing a program that needs to log in to a web site. I have used the following code in my event handler. [code] If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then WebBrowser1.Document.All("password").SetAttribute("value", Password) WebBrowser1.Document.All("email").SetAttribute("value", email1) 'WebBrowser1.Document.All("comments").SetAttribute("value", comment1) WebBrowser1.Document.Forms(1).InvokeMember("submit") End If [/code] the email and password fill in fine but the submit …

Software Development vb.net
Member Avatar for Oxiegen
0
4K
Member Avatar for Archenemie

I need to make it so when i click the Do IT botton the variables ive shown take the values of the text control box ive selected, and after an hour trolling the internet and trying different lines of code i still have no clue. Does anyone have any ideas? …

Software Development python
Member Avatar for vegaseat
0
294
Member Avatar for nsutton

Ok so I'm working on an address book app in python. the user writes contacts into a txt file and can search for it and everything.(run the code yourself if you want to see what it does) now for my problem, under "#if editing" i want have the user search …

Software Development python
Member Avatar for nsutton
0
2K
Member Avatar for leegeorg07

Hi again i have programmed a thing that asks for 2 numbers and does a series of things to it.But i want to round the square-rooted numbers to about 6 digits e.g. 5.12345. How can this be done? Here is my code: [ICODE]from math import sqrt running = 'Y' while …

Software Development python
Member Avatar for vegaseat
0
491
Member Avatar for 3cats

We are just learning user defined functions. Instructor has us taking a prev assignment and pulling the calculations into functions. I thought I understood how to do the function, but guess not I''m getting the "error term does not evaluate to a function taking 0 arguments." I have been working …

Software Development c c# c++
Member Avatar for chiwawa10
0
159
Member Avatar for severman

Hi all. Does anybody knows how work with oracle DB in Visual Studio 2010 i was able to connect to the DB(meaning i can see the tables in the Server Explorer), but i cannot add the reference to the System.Data.OracleClient like it is able in VS 2008. Thanks!

Software Development oracle visual-studio
Member Avatar for kvprajapati
0
451
Member Avatar for viziroth

I'm writing a header file for a class project and one of the functions we have to add finds a patient's age from their birth date. I need to write the function without arguments or any user input and can't use a static date. I've figured out enough that I …

Software Development c++ windows-vista
Member Avatar for viziroth
0
215
Member Avatar for Gospp

I'm looking for a DLL or a complete C# project with Client and server for sending and receiving XML-document. Google isn't my friend :( I'm thankful for any help!

Software Development client-server xml
Member Avatar for Gospp
0
102
Member Avatar for white feather

[CODE] private Map<String , String> c = new HashMap<String , String>(); .... //regx to get mString c.put(mString.group() , mString.group()); ..... //regx to get mNumber c.put(mNumber.group() , mNumber.group()); ....... Set set = c.entrySet(); Iterator i = set.iterator(); while( i.hasNext() ) { Map.Entry me = (Map.Entry) i.next(); System.out.println(me.getKey() + " : " …

Software Development java regex
Member Avatar for white feather
0
177
Member Avatar for SgtMe

Hi. I'm just trying to make a simple analogue clock as I learn to use TKinter with python. I need to know the maths behind calculating the x, y values for drawing the end of the hands. I don't need to post the whole program, all you need to see …

Software Development python tkinter
Member Avatar for SgtMe
0
970
Member Avatar for nsutton

How can i use this code (below) to take the random numbers from the dice roll and change 6 to "A" and 5 to "K" and ect. [CODE]#Poker Dice! Noah Sutton 4/24/10 import random rounds=0 #roll dice def roll_dice(): #Dice variables dice1=random.randint(1,6) dice2=random.randint(1,6) dice3=random.randint(1,6) dice4=random.randint(1,6) dice5=random.randint(1,6) '1'=9 '2'=10 '3'=J '4'=Q …

Software Development python
Member Avatar for Hummdis
0
4K
Member Avatar for cyon

How do I apply a function to a selective number of values in a list of lists using a list comprehension without filtering the values that are not passed through the function? Specifically, I have a list: [[4, 5, 6], [2, 4, 5]] And I want to square only the …

Software Development python
Member Avatar for TrustyTony
0
180
Member Avatar for Danthier

Pretty new to Python, but I have some background in C and VB. Just joined this site because I couldn't find anywhere else to get Python help! I'm working with VPython in the IDLE environment, and I'm having a problem changing a variable using a toggle switch and a function. …

Software Development python
Member Avatar for Danthier
0
293
Member Avatar for sweetypie123

Hi I am trying to find customers name that starts with "S" in my access database. If i run the following query in access its working fine. Select Lastname from employees where Firstname Like '*S*'; it displays two records which is right. if I use it in access it..its not …

Software Development vb.net
Member Avatar for sweetypie123
0
136
Member Avatar for Ednt

Hi All, can anyone please tell me what's wrong in this code I'm trying to get some data from an access database and show them in a CheckedListBox The sql quary includes a variable('sport') and it's values is passed by the user when I run the following code an exception …

Software Development dataset sql vb.net
Member Avatar for kvprajapati
0
109
Member Avatar for sciwizeh

Hello all, is there simple way to check if a multimap contains a value, or am I going to have to loop through all pairs? thanks

Software Development c++
Member Avatar for sciwizeh
0
113
Member Avatar for bustersox

I have having problems figuring out how to get this code to run properly. I cannot seem to get my do-while loop in the main method to repeat. Also, I am having issues with my getConsonants method. It seems to always count 1 less than there actually is. Lastly, not …

Software Development java
Member Avatar for moutanna
0
2K
Member Avatar for jamesonh20

I was just wondering if it were possible to link a sound to an option selected in a scanner class in java? For example: [CODE]import java.util.*; public class GameTest { public static void main(String[] args) { Game myGame = new Game(); Scanner myScanner = new Scanner(System.in); int size = 30; …

Software Development java
Member Avatar for jamesonh20
0
163
Member Avatar for kerek2

Hi all...i need your help regarding to change a new day and date after clock shown 00:00:00 AM......can anyone help me....i'm desprerated....tq

Software Development vb.net
Member Avatar for kerek2
0
108
Member Avatar for theblastedfool

Hello guys, I have been working on this code for a few hours and I almost have everything working right. This project that I am working on is basically a password creator where a person enters their password and the program checks it to make sure that it meets certain …

Software Development c++
Member Avatar for theblastedfool
0
110
Member Avatar for smcp

Hey guys, I'm currently working on an assignment to create a C++ Employee class that can compute the net pay salary of hourly based employees and also find the average net pay for a small company. As far as I know, I've done everything that I am required, but when …

Software Development c++
Member Avatar for smcp
0
147
Member Avatar for bgx90

I need another set of eyes to look over this code. I must be overlooking something. I cannot figure out what the compiler's complaint is. When I try to compile, GCC gives me this error: sim.cpp: In function âint main()â: sim.cpp:21: error: ârunSimulationâ was not declared in this scope Can …

Software Development c++ queue
Member Avatar for NathanOliver
0
62
Member Avatar for joshua91

could someone please help me in forming a loop as i am stuck... [CODE] def numbergen(): randomnumber = random.randint(0,100) print randomnumber def main(): Question = float(raw_input("Do you wish to play the Guess a Number Game?(Y/N)")) for Question: if Question == N: break else: print "randomnumber" main()[/CODE]

Software Development python
Member Avatar for Hummdis
0
158
Member Avatar for KadajXII

Dear All, I have search a lot of forum or blog for this problem and have yet come up with a solution.. Hope anyone can help me here... Thanks a lot!! I am using Ms Visual Basic 2008 Express Edition (vb.net) Here is my code: [CODE] Private Sub btnUpdate_Click(ByVal sender …

Software Development dataset open-source vb.net visual-basic
Member Avatar for KadajXII
0
97
Member Avatar for kneel

[code] #include <iostream> #include <list> #include <numeric> #include <algorithm> using namespace std; int main() { // create linked list of integers list<int> the_list; // input as requested cout << " Enter length of the list " << endl; size_t len; cin >> len; for(size_t i=0; i<len; ++i) { cout << …

Software Development algorithm c++ linked-list perl
Member Avatar for kneel
0
171
Member Avatar for sinister747

Hi All, I could really use some help in sorting vectors, i know the collections.sort(x) method will sort a vector of numbers etc however i have a vector full of objects and i need to sort them; the object contains details of a website please find the fields below; [CODE] …

Software Development java
Member Avatar for moutanna
0
136
Member Avatar for kvass

Hi guys~! Consider the following code: [CODE=Java] public void reset(int[] arr) { for (int i=0;i<arr.length;i++) { arr[i]=0; } } [/CODE] I know that regardless of what the actual array is before this method is called it will not change afterward because the method cannot modify it since it is not …

Software Development java
Member Avatar for kvass
0
97
Member Avatar for Lukezzz

I have compiled a project with "Build Solution" in VC++ 2008 Express Edition wich have worked fine all the time. Suddenly without doing any changes nowhere after the last F7 (1 minute ago), I do get this Error message: [B]1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'E:\Documents and …

Software Development c++ visual-studio
Member Avatar for green_frog
0
5K
Member Avatar for IOwnAndPwnU

[B]So basically, my JMenuBar has to appear everywhere in my applet (I have CardLayout, 3 cards/screens), in every screen and in the same location (looks nice, consistency). How would I go about doing this?[/B] So, I was making a menu for my applet. I followed the exact instructions at: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html[/url] …

Software Development java java-swing
Member Avatar for BestJewSinceJC
0
237
Member Avatar for LarZ

Hey guys, here's a simple one: I'm developing a load test suite (for GSM networks) at the moment and i have scripts that create traffic patterns and all that. I am developing a GUI for the test suite that dynamically adjusts the layout and controls which are displayed on a …

Software Development gui python
Member Avatar for Dixtosa
0
4K
Member Avatar for IOwnAndPwnU

Hi. I am coding a game for my basic Java programming course, and I am currently coding a game (Othello, aka Reversi). I am having issues with the JButton size. [CODE]public void game () { resize (800, 680); game = new Panel (); Panel board = new Panel (new GridLayout …

Software Development image java
Member Avatar for JamesCherrill
0
2K
Member Avatar for achieve_goals

I have to make an array of Nodes. I have #include "Node.h" as my header file and then in main I am writing the following code Node[] Node_array = new Node[]; but then I am getting errors referring to the above line: error C2143: syntax error : missing ';' before …

Software Development c++
Member Avatar for achieve_goals
0
145
Member Avatar for nwhitesel

Hi everyone! I am working my way through some problems from projecteuler.net and came across one that has stalled me. The task is to find the sum of all primes under 2,000,000. I am attempting to use the Sieve of Eratosthenes algorithm for identifying prime numbers. Here is my code …

Software Development algorithm mathematics
Member Avatar for nwhitesel
0
234
Member Avatar for jackfarrel

I am using Visual basic 6 I am trying to create a new txt file with the textbox (text1) contents. But instead of calling that text file "Stored.txt" as I currently am doing, I am trying to create the new .txt file with the text from the textbox. Private Sub …

Software Development visual-basic
Member Avatar for Hacker3
0
149
Member Avatar for ans025

[B]Here is the actual homework problem. I am stuck on parts 1 and 2 and I really don't know how to make this right. Any help is greatly appreciated.[/B] 1. Write a C++ program that reads following data from an input file called “in.txt”, And stores them to an array …

Software Development c++
Member Avatar for ans025
0
203
Member Avatar for brettbed

This is an example from an assignment I'm working on in which we need to validate that the user enters at least 1 Like for the temp.like[3] array and 1 Dislike for the temp.dislike[3] array. I tried using a while statement that said " while (temp.like == "") " or …

Software Development c c# c++
Member Avatar for brettbed
0
581
Member Avatar for IOwnAndPwnU

[B]How would I implement two listeners?[/B] I need to implement ActionListener and [URL="http://java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html"]MouseListener[/URL]: I have the [CODE]public class Othello extends Applet implements ActionListener[/CODE] which is just below my libraries. But I also want to be able to use the MouseListener. So, I'm having trouble implementing both listeners. I tried: [CODE] …

Software Development java
Member Avatar for moutanna
0
133
Member Avatar for stain3d

Hey guys. I wanted to know if someone can tell me what's wrong with my code. I got it to work, to a point. It shows all the months, however, when a user inputs the month/number it ends. Which it needs to playback the month... Example: 2 = March Here's …

Software Development java
Member Avatar for moutanna
0
3K
Member Avatar for bill_kearns

I'm coding a small test app in C# and I thought it would be real nice to be able to parse the "description" meta tag and also download the favorite icon. I'm not asking for a complete solution but does anyone have any ideas where I should start? Thanks. As …

Software Development politics
Member Avatar for apegram
0
129
Member Avatar for timbomo

could i get help with the syntex on reading a file to an array in c++. all the examples i see are more

Software Development c++
Member Avatar for Kevin_160
0
130
Member Avatar for InsaneOstrich

I have to write a JUnit test method for a short program that lets the user add/remove/browse images in a collection. (Adding an image is done with a JFileChooser) The test method that I wrote exhibits some really bizarre behavior; it passes every so often, but fails most of the …

Software Development java java-swing
Member Avatar for InsaneOstrich
0
555
Member Avatar for Gauntlet

I have command line c++ project for my final project of my course. I've decided to go a little further than the course intends and write a class for creating an uncompressed bitmap picture file. As an initial exercise I decided to create the 2x2 pixel bitmap example from Wikipedia. …

Software Development c++ ios
Member Avatar for Gauntlet
1
141
Member Avatar for deeaz_luv

Hi everyone, i'm a final year student doing this project on rfid recognizing system. i'm using a rfid reader with smartcards and vb.net as the software platform for this project. 1. i need a help on how to do coding in vb.net(i'm using 2005). in my system, i'm using hyperterminal …

Software Development vb.net
Member Avatar for deeaz_luv
0
2K
Member Avatar for daviddoria

I am trying to strip a prefix from a string, e.g. turn [code] VTK/Examples/Test [/code] Into [code] Test [/code] Sometimes the string does not contain the prefix, in which case I would expect nothing to happen. However, [code] >>> S="Main Page" >>> S.strip("VTK/Examples/") 'Main Pag' [/code] You can see that …

Software Development python
Member Avatar for woooee
0
155
Member Avatar for jazzvibes

Hi all, I think I have a fairly basic question. I have a matrix and I would like to find the eigenvalues and eigenvector. In both MatLAB and Python (pylab) I can use the eig() function. Can anyone explain the reason for the differing answers? [CODE]MatLAB Code >> A = …

Software Development python
Member Avatar for Gribouillis
0
2K
Member Avatar for noplagiarism

I have to make an audio player in java applet so that it can be used on websites. It will browse files on the computer, make its playlist and will play them one by one. I have compiled the .jar file and done everything correctly in the <applet> tag in …

Software Development audio html-css java java-netbeans java-swing
Member Avatar for noplagiarism
0
184
Member Avatar for charqus

Hello guys. I made a code , which contains: a Circle and a ball. The ball is moving on the axis of Circle. But I'm using Thread.Sleep(80) , and when i want to close the form , i must press X for 10+ times , and after that i recive …

Software Development
0
268

The End.