43,549 Solved Topics
Remove Filter ![]() | |
Hi, I would need to create unique filenames appended by the iteration number. For eg. [CODE]for( i=0;i<iterations;i++){ ofstream outfile("iterfile"+"i"); // i.e filename should be iterfile0 for 1st iteration. } [/CODE] I need to cast "i" from int to char so I tried [CODE]ofstream outfile("iterfile"+(char)i)[/CODE] but it did not work. How … Software Development c++ | |
I am in the process of updating and modifying source code for an existing application that runs on Linux systems. As part of my modifications, I will be needing to use the library function unlink() from unistd.h However, the class that I need to modify, has an existing public member … Software Development c++ | |
hi, i work on a windows application and i use crystal report. i use this code to generate report from database: [CODE] private void imprimerB3button_Click(object sender, EventArgs e) { SqlCeConnection con = new SqlCeConnection(); con.ConnectionString = @" Data source= |Datadirectory|\Database1.sdf"; Database1DataSet ds = new Database1DataSet(); SqlCeParameter paramNom = new SqlCeParameter("@nom", … Software Development open-source | |
Okay, so I'm having problems with my code. I've browsed Daniweb and couldn't find any solutions on here that work. I'm extracting 2 sets of texts from a .xml file. The first part is a directory name(eg. "C:\work\") and the second part is the name of a file in that … | |
![]() | What is the most efficient way to: [LIST=1] [*]Check if a list has duplicate items (return a boolean) [*]Get duplicate items in a list (return a list) [/LIST] I'm looking for something quick and concise, as my solutions are rather cumbersome: [CODE]def list_has_duplicate_items( L ): for item in L: if … Software Development python |
Hello Everyone, I have designing a desktop application using VB.NET 2008 & SQL Server 2005. In my Application i have a frmUserRegistration to add a user & frmLogin to login to my application. i can add the user details in the database but my password seems to be in characters. … Software Development vb.net | |
I am trying to include this piece of code in my Java Class. But the compiler tells me that it can't find Class Calendar. I can't create a class within a class though, can I? Any advice on how I can link this in to the rest of my code? … Software Development java | |
I want to develop a JAVA application which can send and receive SMS. I have a mobile phone connected to PC through USB cable. This JAVA program in PC should be able to send and receive SMS. AT commands are used to instruct mobile phone to send/receive SMS. But how … Software Development java | |
I have a combobox on a panel that changes tables on the panel. How would I get it to repaint if this panel was on a JTabbedPane in a InnerFrame in a JDesktopPane? It repaints but after I switch for one tabs and then back to the said tab. thanks. Software Development java | |
Hello, pls.can anybody help me? I try to solve a exercise where I need to involve random module. Here is a text: Exercise 2 In this example, ties are broken by comparing words, so words with the same length appear in alphabetical order. For other applications you might want to … Software Development python | |
I am trying to convert a piece of code into Delphi but fall down when it comes to this example : [CODE] void __stdcall GetBuffers( short **xBuffers, unsigned long nValues) { ....... memcpy(TargetA, xBuffers[0], nValues * sizeof(short)); memcpy(TargetB, xBuffers[1], nValues * sizeof(short)); memcpy(TargetC, xBuffers[3], nValues * sizeof(short)); memcpy(Targetd, xBuffers[4], nValues … | |
hey i used findfirst and findnext function but they can access only a path which is given by us. i want to access all folders and file of a drive like a antivirus do, when it scans the drive.... do u know how can we do it using c language? Software Development c | |
hi, (on a linux system) i wrote the following code snippet to 1. write to a serial port 2. read the data that i have just written to the serial port. the write is functioning, but the read is not. if i use just the read (without "write", but by … | |
![]() | [CODE] StringTokenizer st = new StringTokenizer(line); while (st.hasMoreTokens()) { String wordIn = st.nextToken(); if (wordIn.endsWith(".")) wordIn = wordIn.replace('.', ' ').trim(); if (wordIn.endsWith("?")) wordIn = wordIn.replace('?', ' ').trim(); if (wordIn.endsWith(",")) wordIn = wordIn.replace(',', ' ').trim(); String result = bd.searchBase(bd.getWords(), wordIn, 0, bd.getWords().length -1); if (result != null) System.out.println("Word found \n"); else … Software Development java |
Okay, like my other thread says, I'm working on a game engine. A couple if minutes ago, I compiled, and it ran perfectly. Now, when I compile it, I don't even see a DOS prompt or anything. I'm really confused, can someone help me and tell me what I did … Software Development c++ | |
Hello, I'm pretty new to C# and .NET. I have been working with the arrays within comboBoxes I have created a method to add multiple comboBoxes, each with defined items to select from (1,2,3,4,5,6,7,8,9,10) When I run the program, comboboxes get created automatically. When I select the value from a … Software Development | |
Hey guys, I've recently started learning WinAPI and I want to make a Tic Tac Toe game with it but I have a problem I have a main window ("field") and 9 child windows ("tiles") and I want to make the tiles clickable so that a click calls the Beep() … Software Development c++ windows-api | |
Is there a way to append the current date to an output file. My output statement looks like, [CODE]result=open('Results.csv','wb')[/CODE] If I run it today, I would like the file name to be something like Results20100528 (for May 28, 2010). If I run it tomorrow, I would like it to be … Software Development python | |
I am using savesetting and getsetting in vb6, W2k. I am still in the testing stage. The savesetting and get setting are working correctly. I would now like to use the deletesetting function to remove the registry entry but I have found no examples to initiate this function. I want … Software Development visual-basic | |
Okay, I have absolutely no idea what is wrong with this code. When I comment out the parameters of the functions, everything works fine. Just like last time, it may be something obvious, I don't see it, though. [CODE] #include <SDL/SDL.h> #include <iostream> class tnt_Player { private: SDL_Surface *Sprite; int … Software Development c++ | |
I am trying to compile code that will perform an http POST using the GNU c++ compiler, and I get the following error: http_post2.cpp:93: error: ‘strlen’ was not declared in this scope The line that it points to is simply: [CODE]SEND_RQ("POST ");[/CODE] I went up to see where SEND_RQ is … Software Development c++ | |
Hello everyone, I'm attempting to write a program for an assignment dealing with a class in C++. As you may have guessed, classes are new to me. And it seems as though that is what is giving me these errors: [QUOTE]1>c:...main.cpp(90) : error C2228: left of '.number' must have class/struct/union … Software Development c++ | |
I'm teaching myself C++/CLR using Visual C++ 2008 (I'm so new I'm not too sure how even to phrase that all) and just as soon as I think I understand something it turns around and bites me. I have a class that looks like this: [CODE]public ref class TABLE_KeyData{ public: … Software Development c++ | |
I'm writing a cross-platform code and I need to be sure the following won't make me trouble. [code=c] struct X { unsigned char a:3; unsigned char b:5; }; [/code] Is using other then int types is part of the ANSI C? Will it be compiled with every compiler? Software Development c | |
Hello The ActionPerformed will not unload the viewPort to load the new viewPort that holds a table. is there a way to reload the table? The first actionPerformed supplies the table but the next will not remove table and add the new one. [code] package view.content.panels.guide; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; … Software Development java java-netbeans java-swing | |
Input 2x+x Return: 3x Input: +2x-1y+3x+2 Return: 5x-y+2 Software Development python | |
Hey all, having a little trouble transferring my listview items into a database. I have transfered all of the listview items into a List<> for use during the population of the items in my database here is my dataaccessor class, it contains the reader writer and writer statements generator: [CODE] … Software Development dataset listview open-source sql | |
So the following is where I think the problem lies in my code: [CODE]public void actionPerformed(ActionEvent i) { int temp; double newtemp = 0; String inputString; inputString = infield.getText();//pulls the number that was entered in the input field temp = Integer.parseInt(inputString);// makes a new variable to handle the input //tells … Software Development java java-swing window-manager | |
I have a program that adds controls on the fly to an auto-scroll panel. When the panel is scrolled (viewing the bottom of the panel for example) and a control is added, it looks like it is added assuming the top left corner of the panel is still at 0,0 … Software Development vb.net | |
Hello members, Well I am always facing trouble with operator overloading. I just have this Assignment in which when I reached operator overloading nothing worked. I tried to do it in many ways but couldnt. Could someone help with this issue please! the question asks to include d) An overloaded … Software Development c++ | |
Hi I am trying to make my homework about a command line calculator, and i am trying to divide the entered string into small parts and i am trying to use strtok for this. [CODE] #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> struct var { char name[10]; double value; … Software Development c | |
Hi, I'm having some trouble with trouble with an If statement in my program. It's a series of wind speed brackets to select the category from the Saffir Simpson Scale of hurricane classification. The problem I'm having is that it won't select the correct category based on the wind speed … Software Development vb.net | |
[B]I've written a code but it doesn't run! I can't find the problem and the Error is : Declaration Syntax Error will anyone help me?! :)[/B] [CODE] #include<iostream.h> void hi(void); void name(void); int main() { int m; cout<<"Enter one of numbers below:\n"<<"1.Hi\n"<<"2.Name:"; cin>>m; switch (m) { case 1: hi(); break; … Software Development c++ | |
Hi everyone I'm really exhausted with this error I'm using visual studio and I'm trying to build a contact form And all the information should be saved in contact table in the database Would you please help me with this error? I tried a lot to figure what's wrong, but … Software Development open-source vb.net visual-studio | |
Hi everyone, I am having some trouble here... I am asking the user to enter a file, and that file will read the contents and determine if the student will pass or fail the class. That part I am having trouble with is when I have to decide if the … Software Development c | |
okay I have been looking all over the web trying certain pieces of code and I have had no luck. I am tired and I really am at a lost right now. I am trying to make it so that when the user mouses over a select set of cells … Software Development vb.net | |
im a beginner of coding and using python. Im trying to code for a linear search but I don't know how to:( Software Development python | |
I need to code a program for my friend and it has been giving me some difficulties. This needs to have two classes, one called Tester and another called Game. And the data in the Game class needs to be pulled to the tester class after the calculations are finished. … | |
![]() | Given a coordinate string -- 'x, y' -- where x and y are 1-4 digits, separated by \D+: '34, 58' I want to able to get a tuple with each number as an integer: (34 , 58) [B]Method 1[/B]: I could find the numbers, convert the tuple groups() to a … |
I'm currently trying to create a program which factorises a number entered by the user, as reccomended by the sticky. When I run the program, I get "error C2061: syntax error : identifier 'cin'". Here is my code: [code] #include <iostream> using namespace std; int main() { int iFigure; int … Software Development c++ | |
Hey everyone, I have a series of loops that read through a text file and then output the occurrences for each letter on the file. This seems to be fine when using small text only. When providing a lot of text it just takes too many CPU resources and that's … Software Development c | |
CAN SOMEONE TELL ME HOW THE console eraser work in the below PROGRAM PART...............describe the LOGIC??????????? [code] //Creating and hiding password. ConsoleEraser consoleEraser = new ConsoleEraser(); System.out.println(); System.out.println("(Please enter the common Password)"); System.out.print("PASSWORD : "); BufferedReader passin = new BufferedReader(new InputStreamReader(System.in)); consoleEraser.start(); String passWord = passin.readLine(); consoleEraser.halt(); System.out.print("\b"); //Password matching. … Software Development java | |
Hello everyone! I am using python 2.6 on cygwin environment and wondering how could i prevent two python processes from writing to a file at the same time. The file that is shared between the python processes is an ini file and is accessed through ConfigObj module. The first python … Software Development microsoft-access multithreading python | |
Hello there, so i have this current project for school and i`m kinda stuck the program i`m suppose to write is this : __________________________________________________ ____ Each year many tourist visit our country please write a program that collect the following information: Name(first,middle,last) sex country age profession Also the program shoud … Software Development c++ | |
Hi, New to Java & hoping you can help me with an error message I am getting. The compiler says "Cannot find symbol - variable evt" for the first line of the below code. [CODE]if (evt.target==calc) { clickedCalc(); return true; } else return super.action(evt,obj); for(int i=0;i<12;i++) result[i].setText(" "); // clear … Software Development java | |
Hi I need code of how to copy part of string. like 0092-333-1234567 so i need to copy the part 333 or 1234567 in to a new string variable sample inputs 0092-1234567-333 333-0092-1234567 NOTE: poiters can also be used i need it in Turbo C++ or Dev C++ Thanks Software Development c++ | |
Hi! I am new to Python. How to print number+string+array? Software Development python | |
Hi, Is it possible to read a file only to get the first 100 bytes from the begining and the last 100 bytes at the end? I have to get info from files that are in the first 100 bytes and in the last 100 bytes of the file and … Software Development c | |
I am relitively new to C#. On thursday I started out writing a Tic-tac-toe game. Just a basic gridbuilder, ask the user where they want to go, alternate the users, as player2 where he wabts to go (checking if the move is 'legal'). I've just kept adding to it... This … Software Development legal | |
hello can you please help me how do i put checkbox in my ms access..or how to code this in my program hoping for your positive responds...thank you in advance Software Development visual-basic |
The End.