132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for nkinar

I have a string in Python that is comprised of code in C/C++ syntax. I would like to use regular expressions to search through this string and replace an expression of the form 'pow(a,b)' with 'a^b' I've attempted to do this, but my code does not seem to be working. …

Software Development python regex
Member Avatar for ptmcg
0
561
Member Avatar for wildberries

Hi guys, I'm trying to make a program where i read in two words and then search a text file for each occurence of that word. Also I want to print the first line that each word occurs in. My problem is after i get into the file I cannot …

Software Development c
Member Avatar for WaltP
0
139
Member Avatar for c2q

Hi, Im currently taking an introductory course in python and i need help with some stuff. Basically for an assignment the first function we have is supposed to get an an average red value of all the pixels in the image. red being the R in (RGB). So basically the …

Software Development python
Member Avatar for woooee
0
178
Member Avatar for jems5

I would like some help to index through an empty array and fill it with 10 entries one at a time. The objective of the task is to create a GUI with two buttons, one (Store) to save the value into array position and second (Quit) to run statistics calculations …

Software Development gui java java-swing
Member Avatar for jems5
0
157
Member Avatar for frank754

Forgive me again, I'm a complete noobie at Visual Studio, even though I have been using PHP for years. I need this for my new job and the classes (public, private, etc) are really a bit confusing. Suppose I'm trying to make a new windows form, and I have various …

Software Development c++ visual-studio
Member Avatar for frank754
0
170
Member Avatar for zachattack05

I've got a question about navigating memory streams. Memory stream properties aside (like making sure the stream can use seek etc...) if someone is storing variable or dynamic data in a stream, how can you retrieve that data? Like, for example if a user could store an image from their …

Software Development hard-drive
Member Avatar for zachattack05
0
118
Member Avatar for hq1

I have an assignment that i need to do and i have no idea how to do this, I was hoping someone would be nice enough to help me out, its a begginner program that needs to be done in visual stdio c++: Heres the assignment: Try to write a …

Software Development c++
Member Avatar for Fbody
0
461
Member Avatar for Yutxz

Hey guys, I'm trying to solve a problem I received in school. It states: [I] Write a method named checkFermat that takes four integers as parameters—a, b, c and n—and that checks to see if Fermat’s theorem (a^n + b^n = c^n) holds. If n is greater than 2 and …

Software Development java
Member Avatar for NormR1
0
357
Member Avatar for SoftShock

Hi, I'm having a difficult time printing the product of the odd integers from 1 - 15. When I run it the program prints "1 2 2 2 2 2 etc." I don't see what I'm missing or why it won't print what I want. Did I add something I …

Software Development java
Member Avatar for SoftShock
0
125
Member Avatar for Sucrose

I have 6 rows of items in a ListView within 2 columns that are listed like so: [CODE]1 Milk 2 Pepsi 3 Juice 4 Water 5 Coffee 6 Tea[/CODE] I'm trying to make it so when you modify the number in the first column, it will sort the list based …

Software Development delphi listview pascal
Member Avatar for Ionelul
0
219
Member Avatar for aaronmk2

I am trying add two polynomials by overloading the + operator. When I run the program it only adds the first coeficients. I cannot figure out why it is only returning the first coeficient. [CODE] //header file #include <iostream> using namespace std; #ifndef _POLY_H #define _POLY_H const int CAPACITY =100; …

Software Development c++
Member Avatar for gerard4143
0
124
Member Avatar for toferdagofer

This is probably an easy one that i know but its not coming to me. Im supposed to be hardcoding the 6 instances of a movie class into the array that i have set up. I am unsure where i would do that in my actuall code. [CODE] public class …

Software Development java
Member Avatar for Ezzaral
0
3K
Member Avatar for gatehrdy

[B]Hello, I am new to programming. I am trying to make a dice game called 10,000. Here is the outline or pseudo code. it kind of works. It will roll and keep score, but sometimes it will roll multiple times. [/B] pick a player player one or player two player …

Software Development gaming python
Member Avatar for griswolf
0
966
Member Avatar for unclepauly

hi, i have this code: [inlinecode] HINSTANCE hComponent = ::LoadLibrary("Component1.dll"); [/inlinecode] i get this compile error: Error 1 error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'const char [15]' to 'LPCWSTR' c:\Documents and Settings\Administrator\Desktop\Component1\Client1\Client1.cpp 9 so i changed the code: [inlinecode] HINSTANCE hComponent = ::LoadLibrary((LPCWSTR)"Component1.dll"); [/inlinecode] however GetLastError returns …

Software Development c++
Member Avatar for memphis.ray
0
992
Member Avatar for hisugan
Member Avatar for konohastar
0
151
Member Avatar for riahc3

Hey Ive been hearing about Netbeans but Id like alternatives. Any out there? If the program is not written in Java (ironic I know) I would perfer it. Thanks

Software Development ide java java-netbeans
Member Avatar for peter_budo
0
136
Member Avatar for Sirovica

Hello everyone this is my first post on the daniweb community. Currently I am home sick with a nasty cold so I was trying to solve a programming problem on a wonderfull sight called Project Euler. The problem is as follows: If we list all the natural numbers below 10 …

Software Development c++ robotics
Member Avatar for frogboy77
0
149
Member Avatar for mrickert

Hi- Trying to rename a file using the rename() function. It works, but it appends an '@' to the end of the renamed file. Here's my code: [code=c] char oldname[] ="file1.csv"; char newname[26]; newname[0] = '3'; newname[1] = '1'; newname[2] = '1'; newname[3] = '3'; newname[4] = '3'; newname[5] = …

Software Development c++ file-system
Member Avatar for Fbody
0
126
Member Avatar for SpiritualMadMan

I am getting the following error when I try to access my Resource Files in Visual C++ v6 "The file is already open in an editor." I've tried closing all windows in the IDE and closing the project, even tried logging out and back in. All to no avail. A …

Software Development c++ ide
Member Avatar for SpiritualMadMan
0
425
Member Avatar for Scott_Atkins

Hi Guys, I just want some one to look over this for me really, and possibly can some one tell me how to call the function! as you can see below (VB.Net Code) this is running of a button and it will connect to SQL obtain the relevant information and …

Software Development dataset vb.net
Member Avatar for Scott_Atkins
0
256
Member Avatar for raym.mart

can someone help me find something that i can depend on making sourcecodes using while, do while, for while...thx

Software Development java
Member Avatar for vaibhav1983
0
78
Member Avatar for MikeThras

Hello to everyone, Well I'm a noob to C++, I just started two weeks ago, I'm trying to get a good head start before I start college next semester. I've done simple programs, but now I'm trying to create a body fat percentage calculator I guess you could say. but …

Software Development c++
Member Avatar for MikeThras
0
329
Member Avatar for solitaryy

So I have designed my program but am stuck on one function. [I]The following is an excerpt from my class:[/I] [CODE] public class SqrXY { public void SqrXY (double x, double y) { xaxis = x; yaxis = y; } public double addition () { //this is what I am …

Software Development java oop
Member Avatar for solitaryy
0
124
Member Avatar for smegal

Hi, I have an xml file that has the same tag name for different categories of data. Below is an example. I would like to create an xpath to extract each data category. For example Age is the 4th tag. So I would need the xpath script to navigate to …

Software Development xml
Member Avatar for iceandrews
0
104
Member Avatar for SgtMe

Hi just a simple n00b question. I need to split a string (from a .obj 3D model format) into a list of three doubles (the vertices). example string: v 0.200006 -0.093641 0.584690 I want to make it into an array of (for example): {0.200006, -0.093641, 0.584690} I can get rid …

Software Development c++
Member Avatar for SgtMe
0
171
Member Avatar for anthwon

write a program in diving competitions, each jump is assessed by seven judges who give points on a scale from 0 to 10. The point for each jump are calculated as follows: Ignore the highest and lowest scores given by the judges. Then calculate the average of the remaining five …

Software Development java
Member Avatar for anthwon
0
281
Member Avatar for aloha91

I have been working on a project, where I am able to choose the different positions of the body parts of a robot to form a dance step. The head with 3 movements. The left and right arm, shoulder and elbow with 4, 4 and 3 movements respectively. The waist …

Software Development visual-studio
Member Avatar for nick.crane
0
204
Member Avatar for Tguid24

I'm taking a computer science class, but I do not have a very good professor. He does not explain anything. We have an assignment to : Write a complete C++ program in stats.cc to read an arbitrary number of real numbers(one value per input record) from a specified input file …

Software Development c c# c++
Member Avatar for Tguid24
0
187
Member Avatar for Macooper26

I just downloaded Python 2.7 and 3.2 and it just looks like DOS. I'm using Windows, so I don't know if that's the problem--because I saw someone using a MAC and it looked like they didn't have the same problems that I'm having--because I can't save and I have no …

Software Development python
Member Avatar for griswolf
0
86
Member Avatar for moteutsch

Is there any better way to change the text color for particular sections in a Rich Text Box than to have an TextChanged event, search for that text, and use the Select method? The problem with this is it creates a flickering effect with the scroll bar going up and …

Software Development
Member Avatar for jake_
0
74
Member Avatar for funfullson

hi dears. I have an unicode data in a file.it is a persian text. I want to read it and after some change write it in another file. but when I read it, I face to some hexadecimal characters. what I have to do with them? Thanks.

Software Development python
Member Avatar for griswolf
0
159
Member Avatar for Rayanjaha

i want to write a program can caulate the area of a circle and squar using overloaded functions, i tried but it didnt work , what i missing here ? [CODE]#include<iostream> using namespace std; class math { int r; double d; public: void set_value(int t) { r = t; } …

Software Development c++
Member Avatar for gerard4143
0
108
Member Avatar for RickSMO

So I am beginning to learn C++ and I have this issue where whatever I do pops up in command prompt quickly, like a flash of it. I remember I had this issue before and I was able to add or change something in my code so that I had …

Software Development c++ flash
Member Avatar for Narue
0
160
Member Avatar for saad749

[B]Aim:[/B] Well, What I am trying to do is to store the names in an array and scores scored in another array. Then Write them into the file. When the program is ran again, I will like to read the stored names and scores, add the new name and score, …

Software Development c file-system
Member Avatar for saad749
0
157
Member Avatar for Bri426

I'm writing a program for my C++ class that goes off of a previous assignment. The previous assignment asked the user how many numbers they wanted to enter, asked them to then enter the numbers and then found the sum, average, largest and smallest number from the inputted numbers. The …

Software Development c++
Member Avatar for Bri426
0
161
Member Avatar for leoeroy

I'm trying to make a program that lets user to input an array of lastnames then firstnames. Then display the a list of firstname first, then the lastname. For example: Input: Smith, John : Doe, Jane displays like: John Smith Jane Doe This is what i got so far. [CODE]Module …

Software Development vb.net
Member Avatar for RipperJT
0
187
Member Avatar for novice20

hi all.. am working with python 2.4.1 n have pysnmp 4.1.14a installed.. the statement from pysnmp.entity.rfc3413.oneliner import cmdgen gives me the following error: ImportError: No module named pysnmp.entity.rfc3413.oneliner can anyone pls give me the reason? eagerly awaiting any response. Thanx in advance

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

Hi all, I've found a few references that address this issue, however I haven't figured out what the solution is in the specific case that I'm dealing with. Hopefully someone can help me out. The following code prototypes the general idea that I'm working with: [CODE] class FooClass { public: …

Software Development c++
Member Avatar for Stefano Mtangoo
0
4K
Member Avatar for tyson.crouch

G'day, I just want to ask how could i run a set up for a MySQL DB through Java. For example, when installing the application, I need to check if MySQL is installed, and if not, install it. OR, how would I go about checking for a registry for mysql …

Software Development java
Member Avatar for Ezzaral
0
118
Member Avatar for alexdlaird

I'm baffled by a recent discovery with one of my programs. I'm still in beta testing, so this was a good time to catch the issue. But it seems that, when installed on a 64-bit system, the data files are simply [I]not written[/I]. If you are running a 64-bit system, …

Software Development java windows-vista-7-8
Member Avatar for Ezzaral
0
256
Member Avatar for acerious

After a HDD wipeout, I lost my completed .cpp files for program 2 which I already have done creating a function out of the following code. The only problem is, for the last few days I have been failing to recreate or replicate what I previously have done a few …

Software Development c++
Member Avatar for acerious
0
85
Member Avatar for BastienP

Hello there, I'm currently using a perl scrip that checks if every line in a file 1.csv is present in a file named 2.csv, and writes only the different lines. The output is a file called out.csv. What I'm trying to do is to write only the most recent lines …

Software Development file-system perl
Member Avatar for d5e5
0
195
Member Avatar for doctorjo5

I'm having trouble figuring out a few different methods that I'm putting into a constructor. Any chance for advice? I'm having trouble with the last 3 near the bottom. I want to compare two name variable to each other to see if they are the same regardless of case, then …

Software Development java oop
Member Avatar for NormR1
0
204
Member Avatar for kiwikiwi

hi guys.. i need to read tags using rfid reader. the reader is connected to the computer using serial port. can anyone advise me the codes for receving the tags data? i'm using microsoft visual studio 2005. thanks. your help is appreciated.:(

Software Development vb.net visual-studio
Member Avatar for kisei
0
237
Member Avatar for N1GHTS

I have a weird problem and I want to know if any of you have any ideas on how to fix this. If I do this... [code] swprintf(Dest, 500, L"G%sY", "AMEDA"); [/code] [b](wchar_t*)Dest[/b] contains the following text... [TEX]GAMEDAY[/TEX] But if I do this... [code] swprintf(Dest, 500, L"G%sY", L"AMEDA"); [/code] [b](wchar_t*)Dest[/b] …

Software Development c ubuntu
Member Avatar for sree_ec
0
187
Member Avatar for abelingaw

Ok here's my problem. What i wanted to do was that if i save the value i enter on my txtbox (txtIDNo) and saves it to my database, the default value should automatically adds 1 or + 1 on it. I set the field data type to Number and the …

Software Development visual-basic
Member Avatar for AndreRet
0
136
Member Avatar for madawa123

hey guys, How to convert the lat/long (in decimal) to x,y pixel. my map has a height and width of 800,500 thnx regards, Nishan

Software Development java mathematics
Member Avatar for NormR1
0
487
Member Avatar for comSysStudent

Hi all, I've been trying to do this for a few hours now, I've seen several suggestions that castin the toArray() method to a (String[]) should work but this results in runtime errors for me. Code is below, any help would be appreciated. Error is with the getStudents() method, there …

Software Development java
Member Avatar for NormR1
0
326
Member Avatar for salamjamal10

Hello all, I hope I find the help I need here. I am sorry I am not good enough in C++ yet. This is my first year so please be patient with me. This is my problem: p = 4x^5 + 7x^3 - x^2 +9 the ADT operations are: p.degree() …

Software Development c++
Member Avatar for salamjamal10
0
226
Member Avatar for Nemo_NIIT

Hi friends can you send me links OR tell me how to write log files in C++ using events i have got some link from Google but it is not helpful can anyone please help me with some example code

Software Development c++
Member Avatar for Ancient Dragon
0
175

The End.