132,726 Archived Topics
Remove Filter ![]() | |
:) 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++ | |
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() { … | |
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 | |
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 | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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++ | |
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++ | |
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++ | |
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 | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 :) Software Development file-system image microsoft microsoft-access vb.net | |
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 | |
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 | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
[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 | |
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 | |
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 | |
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++ | |
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++ | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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++ |
The End.