132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for invisi

:) My mind went blank for a bit and I couldn't figure out such a simple programme. But then I had a shower and all was well :) [CODE]#include <iostream> #include <string> #include <cmath> using namespace std; int factorial(int i = 1); int main() { int num = 0; bool …

Software Development c++
Member Avatar for vmanes
0
76
Member Avatar for cthreash

I have a question regarding scope for a character array defined as follows: saveDataObj->save("This is the first entry", 1, 2); Here is how the SaveData class has been defined: [code=c++] class SaveData { struct entry{ const char* data; int data1; } entry* mpData; static int iter; } //Constructor SaveData::SaveData() { …

Software Development c c# c++
Member Avatar for cthreash
0
391
Member Avatar for Dewey1040

I wrote a program to compare two text files character by character and its not working probably an easy thing im just not seeing. [code=c++] #include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, char *argv[]){ string s1; string s2; char c1, c2; if(argc !=3) { // …

Software Development c++ file-system
Member Avatar for WaltP
0
178
Member Avatar for jtbcswiss

I perform the following search using regular expression in Python on about 3000 html documents in .txt format and obtain about 600 cases where the following program returns 1 (finds the chain): [CODE]def risk_committee_search1(str): ## get the re object co = re.compile(r""" (?P<nam>:.{300} RISK\W+ (\w+\W+){0,5}? COMMITTEE .{300} | .{300} COMMITTEE\W+ …

Software Development python
Member Avatar for Gribouillis
0
473
Member Avatar for shankhs

Hi, I am using C/C++ for 4 years now,solving algorithmic problems only. I see many softwares that do fancy stuffs like windows softwares which automate the installation process , move the mouse automatically and buttons are clicked. Please can anyone tell me what programming language is used in such cases? …

Software Development c++
Member Avatar for tkud
0
629
Member Avatar for soapyillusion

Hey guys Ive been working on this problem for standard deviation, and so far ive got it all right accept my declaration in this module, was wondering if anyone can help me see whats wrong with my formula or the decelerations i have made Here is the code for my …

Software Development c++
Member Avatar for dusktreader
0
165
Member Avatar for Dasau

I am almost complete this assignment. But I am stuck with line 108 error. Could someone please help me out on this? [CODE] import java.io.*; public class Assignment4 { public static void main(String[]args) throws IOException { //delcare and construct variables int marStatus, status, gross, earn, excess, annual; double fica, medicare, …

Software Development java
Member Avatar for Dasau
0
191
Member Avatar for charqus

Hello , i made a form with a button. When i press this button , it open a new form. If i close the new form , and i try to open it again , i recive a error. [code]See the end of this message for details on invoking just-in-time …

Software Development assembly microsoft-access
Member Avatar for ddanbe
0
145
Member Avatar for sri1230

Hello guys - Need help with a windows batch script that would kill processes by the memory usage but leave the last one. For example if i have 10 java.exe processes running i want to kill the top 9 by memory usage and leave the last one alone. Help appreciated! …

Software Development shell-scripting
Member Avatar for Hawkeye Python
0
108
Member Avatar for JeyC

In the following program, I am defining two global arrays A and B of length 3 each. In my program, I am outputting the first A[0], A[1], A[2] and A[3]. Note . A[3] does not exist, so I expected the program to output an error or say 1e291 or something …

Software Development c++
Member Avatar for dusktreader
0
79
Member Avatar for Anarionist

What I am trying to do is compare the contents of array s to the string name (for a filter) but it just continues and prints whatever goes through. I think the problem is with my if statement but I have tried everything that I thought was valid code. [CODE]#include …

Software Development c++
Member Avatar for dusktreader
0
141
Member Avatar for sdgz747

I am supposed to write a program that asks for the coefficients a, b, and c of a quadratic equation ax2+bx+c=0. It needs to display to the screen one of the following: • two distinct real numbers (when b2-4ac > 0), • two distinct complex numbers (when b2-4ac < 0), …

Software Development c++
Member Avatar for abhimanipal
0
1K
Member Avatar for Hawkeye Python

I'm new at Python coding and in DaniWeb. Really nice forum :icon_cheesygrin: Need some help w/ the following code: the content of saldo.txt is the following [CODE]1000[/CODE] The code I was talkin' about: [CODE] # [...] f = open('C:/saldo.txt') print f saldo = f.readline() f.close() if saldo <= 100: a …

Software Development python
Member Avatar for snippsat
0
120
Member Avatar for binay2

Hello! So , I got a weird problem.In my code the value of the char N[cn] is ignored when I compare it to a constant value. Here's the code: Code: [code] for ( i = 1; i <= 220; i++ ){ // Generate Numbers itoa (i,Number, (V+1)); sscanf(Number, "%d", &ii); …

Software Development c++
Member Avatar for binay2
0
360
Member Avatar for NinjaLink
0
76
Member Avatar for mikabark

I will copy stl vector container A to B But not whole. If element of A is proper, I will copy only that to B. Is there any way to do it? I tried to do this way. 1. newA.put_dat(input_stl[j].ino_no) -------- ------------------------ B con A container (ino_no element or whatever) …

Software Development c++
Member Avatar for mikabark
0
327
Member Avatar for nolimit966

Hello, im Ant. Forum looks really good. Im currently in the very early stages of learning Java, i have a few books and am doing online tutorials etc so looks like i will be using this place and searching the forums loads in the near future. At the moment im …

Software Development java
Member Avatar for tjsail
0
746
Member Avatar for akamini

I was wondering whether anyone could tell em whats wrong with this code. Its trying to get the records where the theorydates (stored in a database as shorttime) are before 2 years ago and return the records in a datagrid but it doesnt. [CODE] Private Sub ExpiredTheoryTest_Load(ByVal sender As System.Object, …

Software Development dataset open-source sql vb.net
Member Avatar for apegram
0
105
Member Avatar for MatthewKeyzer

I want to set up an smtp server to send mail from an application. i have a newly created gmail account... i just do not know how to hard code it... i have attempted it and got the error: "The SMTP server requires a secure connection or the client was …

Software Development client-server
Member Avatar for alanm123
0
154
Member Avatar for NinjaLink

Hey, this is my first java program. I am trying to print my original list of ages, but I can not figure it out. Please help! I have part b and part c already done. Any help is appreciated a) print original list of ages b) number of occurrences of …

Software Development java
Member Avatar for NinjaLink
0
102
Member Avatar for lein.o16

how can i save the path of the picture i've browsed. i'm using vb.net as my front-end and ms access as my back-end. thanks in advance :)

Member Avatar for Max D
0
222
Member Avatar for carylle

Hello again. I would like to ask if anyone knows how to use datagrid, that when i clicked or double clicked a data shown in datagrid it will appear in a textbook.. thanks in advance.

Software Development vb.net
Member Avatar for akamini
0
110
Member Avatar for 3Dees

Hey, i am trying to convert a 2D array to a 1D array and also the reverse. Not sure if i am doing it right so does anyone know how it can be done. below is the code i have for 2D to 1D but now how do i do …

Software Development vb.net
Member Avatar for kvprajapati
0
1K
Member Avatar for invisi

Why cant I pass variables into a void printPoint function, and not have to return a float ave. I tried just printing the coordinates but I got too errors. so my function looked like this [CODE]void printPoint(float x , float y, float z){ cout << " < " << x …

Software Development c++
Member Avatar for invisi
0
101
Member Avatar for hax-

Hey, I am currently using code::blocks and I am basically creating everything by hand here (dialogs and all) I just need to know how I might go about loading up a dialog that I have created in my .rc (that is, getting it to pop up when I click a …

Software Development api c++ gui user-interface windows-api
Member Avatar for mitrmkar
0
141
Member Avatar for jemz

hello please help me on this i want to use ascii but all i want i will not use keypress only my cmdadd...is this possible without using keypress?..hoping for your positive responds.... sample public function keytrap(keyascii as integer) if keyascii >=48 and keyascii<=57 then msgbox "invalid input" exit function end …

Software Development visual-basic
Member Avatar for zigpy_siva
0
93
Member Avatar for shailev

hello . I have a problem. I have a variable DWORD num= 0x1234ABCD i want to convert it to char * for example- char * result[0]= '[the ASCII of 0x1]' result[1]= '[the ASCII of 0x2] result[2]='[the ASCII of 0x3] ... How can i do this?? thank you very much!

Software Development c
Member Avatar for Salem
0
80
Member Avatar for ziedbhz

Hi, I'm new to network developpement but not to c#. I want to create a desktop application in wich the user provide a serial number to validate his acount. This serial number must be sent to a web server for verification purposes. Please, i need your suggestions to start: - …

Software Development c# client-server web-server
Member Avatar for ziedbhz
0
67
Member Avatar for donnyv

Hi, I want to read the data from a worksheet in an excel workbook, write it to a new worksheet and save that as a dbf or csv file (one worksheet)...basically extracting worksheets from a workbook and saving them individually, renaming them as the title of the worksheet with the …

Software Development python
Member Avatar for J-M DESMETTRE
0
237
Member Avatar for iammfa

Hi all, Now, I'm trying practice on c++ basics, since few minutes I tried practice "library functions" especially "sin" function, I wrote this trivial program to calculate angle in console screen, but when I input 90 degree it gave me 0.8939, but with calculator it gave me 1, why console …

Software Development c++
Member Avatar for Stefano Mtangoo
0
142
Member Avatar for Argo54325

Hello, I've been looking for information on creating a chat server and client application, just the basics that would include: 1. Connecting to the server. 2. Displaying a "friends list" (like windows live). 3. Open a private conversation with a friend on the list. 4. Send messages from users to …

Software Development c c# c++ client-server database-design
Member Avatar for csmgsarma
0
168
Member Avatar for Stefano Mtangoo

Hi all, I have been looking for single function to split strings and seems to me either is not available or I miss it. So I please, help me to know if it is available and if yes where can I get it. Thanks

Software Development c++
Member Avatar for jBat
0
96
Member Avatar for tjsail

Is this possible to do? I am looking to parse some data out of a file and based on the results of this take names found in the file and create objects out of them. for example... [code] //you have parsed the name Bob out of a file and it …

Software Development java
Member Avatar for JamesCherrill
0
5K
Member Avatar for hsp700

Hi, I am trying to understand the Standard C function "getchar()". I am using CodeBlocks 8.02 in Windows XP. Please compile this code in your compiler and note how it behaves: [CODE]#include<stdio.h> int main() { int i=getchar(); while(i!=9) { printf("%d",i); i=getchar(); } printf("%d",i); return 0; }[/CODE] When I insert Tab, …

Software Development c
Member Avatar for hsp700
0
132
Member Avatar for DJPlayer

ok I'm taking a text file.. 16 lines.. 6 character values per line and trying to randomly get one character per each line.. and place them into a 2d array (4x4). The values i'm getting aren't correct for some reason.. anyone have any helpful tips? [CODE] int main() { srand …

Software Development c
Member Avatar for WaltP
0
243
Member Avatar for abhimanipal

Hi All, Today I came across a peculiar piece of code. [code] int main(int argc, char* argv[]) { printf("%lf\n",(0.99-0.90-0.09)); } [/code] According to me the output for this code should be 0, but to my surprise when I ran this code the answer that I got was -0.000. I cannot …

Software Development c
Member Avatar for abhimanipal
0
99
Member Avatar for dmotah

hi, tkx to welcome me in here! i have wrttien a program in vb6 that uses ms access. the program is a attendance monitoring system, that uses the time to calculates hrs late and early of employees. im having problem i dnt know how to make validations in vb6 ex: …

Software Development visual-basic
Member Avatar for daniel2829
0
75
Member Avatar for Hawkeye Python

Incomplete dice game function, dunno why does'nt works... If you're not using windows, change the dir. "C:/" [CODE] def bet(Bet): try: f = open('C:/money.txt') print f money = f.readline() f.close() print ('You have', money, 'Dollars. Wanna play dice(y/n)?') v = raw_input() if v == 'y': # here i'm printing those …

Software Development python
Member Avatar for The_Kernel
0
175
Member Avatar for iamsmooth

I want to be able to ensure that my print is exactly as expected, so I'm wondering if there's some kind of function in java or junit that will catch what system.out.print uses so I can perform some assertions on it. Thanks for your help.

Software Development java
Member Avatar for jwenting
0
1K
Member Avatar for eldhoksuresh

[B][/B]every time i create a file in java a window opens with created file in it... how to avoid this.... pls help

Software Development file-system java
Member Avatar for jwenting
0
73
Member Avatar for Grn Xtrm

Hello. I'm trying to write a program that will convert a user input infix expression into its postfix form. My current code is allowing the user to input a string, but it does nothing with the string. I'm fairly new to JAVA, thus I think I'm making a simple mistake …

Software Development java user-interface
Member Avatar for cymercutie88
0
1K
Member Avatar for Risk24

Hey everyone, I have no experience with writing programs. This is my first program and I'm sort of "winging it". I have a problem converting from fahrenheit to celsius, I can convert from celsius to fahrenheit fine though. The bolded part is where I'm having troubles. Here is what I've …

Software Development java java-swing
Member Avatar for endsamsara
0
194
Member Avatar for tformed

Hello, I am a new member to this forum. I have some announcements, I will continue to read some more. I need to create a program were the user inputs a number, program displays the cube root for that number. The code I got thusfar is: [CODE][COLOR=#0000ff] #include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<stdio.h> [/COLOR][COLOR=#0000ff]#include[/COLOR][COLOR=#000000] …

Software Development c++
Member Avatar for NathanOliver
0
697
Member Avatar for Slacked

Hi, I'm trying to create a pretty basic fancy string output, [CODE] #include <iostream> #include <cstring> #include <stdlib.h> using namespace std; int main() { char output[] = "Hello there world"; int len = strlen(output); for (int i = 0; i < len; i++) { cout << output[i]; system("sleep 0.1"); } …

Software Development c++
Member Avatar for Slacked
0
158
Member Avatar for PDB1982

I'm trying to find a set of random numbers between 1 and 365, so I tried to use: [code]DayOfBirth = rand() % 365 + 1;[/code] But, I've been told that srand() will produce a better random number, is this true? How do I use it for this instance?

Software Development c++
Member Avatar for mrnutty
0
459
Member Avatar for jangozo

Hello, I'm trying to make my code work with -Wall -Werror flags but I get the above error (error: array subscript has type char). Here is the code, which works if these flags are not set. The code is meant to check whether the first character from text is blank …

Software Development c++
Member Avatar for jangozo
0
420
Member Avatar for ELBUF

Hey guys, Just wondering if someone can help me out with this. I want to read in a text file (team.txt) and have it implemented into the rest of my code. My program will read in from the file, the number of players and their heights and print out some …

Software Development c++ file-system
Member Avatar for vmanes
0
137
Member Avatar for Hawkeye Python

Well, I'm a begginer in Python coding, and at DaniWeb. My problem is: I can't open any files! I tried: [CODE] >>> f = open('C:\teste.txt', 'w') Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> f = open('C:\teste.txt', 'w') IOError: [Errno 22] invalid mode ('w') or filename: 'C:\teste.txt'[/CODE] …

Software Development python
Member Avatar for Hawkeye Python
0
4K
Member Avatar for sidlampard

hi can anyone help me with checkbox binding in c# to sql database if data is in bit format and to retrieve the same from database

Software Development sql
Member Avatar for sidlampard
0
111
Member Avatar for swolll

allPlaylists is a vector of type Playlist. listSongs is a vector of type *Songs. [code] //Loop that goes through each element in the playlist vector. for(int k = 0; k < allPlaylists.size(); k++) { // loop that goes through each song within the Playlist vector element. listSongs is a vector …

Software Development c++
Member Avatar for swolll
0
258

The End.