43,549 Solved Topics
Remove Filter ![]() | |
Hello, I just started learning c++ and I'm dabbling with file input/output. But now I have encountered an issue with this code: [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream inFile("values.txt", ios_base::binary); string Value1; int Value2; int Value3; int Value4; if(inFile) { inFile.read((char*)&Value1, sizeof(string)); inFile.read((char*)&Value2, … Software Development c++ | |
Hi Guyz, i just wanna know how to fix my problem, or rather fix my code and simply my code base on my MODULE. heres the error " You have an error in your SQL syntax; check the manual that corresponds to your mysql server version for the right syntax … | |
Hi, I am importing data from excel (don't know yet I am going to do that) and export it back into excel. I don't want to have users to import data using excel (due to lack of intelligence) and also it would be faster and more streamline. I already had … Software Development c# first-post | |
Hi, I began file I/O and I did exactly what it said in the book I was using and it doesn't seem to work for some reason. Am I doing something wrong? [CODE]#include <iostream> #include <fstream> using namespace std; int main() { ifstream fin("hello.txt"); if (fin.is_open()) cout << "It's good"; … Software Development c++ | |
Hi ~ As you can see from the code below I am in school for programming. I have come across this homework assignment a few times on the site already however the requirements for mine are different. I cannot use arrays. Three functions - I only have two coded. The … Software Development c++ | |
I have a class which extends JDialog which by default has some text on it and a couple of buttons. Most of the instance of the buttons are "Ok" and "Cancel" so the two buttons have their bounds set. If I try to change the label on the Ok button … Software Development java | |
How do I display the results of list<t>. I put rangeChecker objects in range and now I want to display the rangeChecker objects in range. How whould I do that? [CODE] static void display(RangeChecker[] rangeChecker, int SIZE) { //displays values for x, y, z, and how many times z was … Software Development display | |
Hello, I'm working on a project that once ran (the main window) becomes maximised and then another window (Form2) pops up allowing the user to login OR register. I have created the main project and added a form (called form2) but when I try to display Form2 when Form1 loads … Software Development | |
I'm attempting to recreate the Unix shell program "todo.txt" using C++ on Windows. An example use of my program in the Command Prompt would be: [CODE]>todo /A "I like cheese."[/CODE] which would append the item "I like cheese." to the file "todo.txt". In my program, there is a line which … Software Development c++ ios shell-scripting unix user-interface | |
am trying to create a new class for a binary search program in c# I keep getting this compilation error [COLOR="Red"]A namespace cannot directly contain members such as fields or methods [/COLOR] here is my code [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1{ // Create a new … Software Development | |
Hi everyone. Please I'd like to know if anybody has encountered this problem before. Here's the scenario. I've got a datagrid view Bthat is a child table from another table A. one of the fields is the productID which I have bounded to the Product Table to display the name … Software Development | |
Hello again everyone, I have just finshed a neat little c++ program, but now I just realized that I don't know how to save the file as an executable so that I can use the program on any computer whether or not it has a compiler. Please Help. PS: I … Software Development c++ | |
Hello, I'm a biologist trying to do some bioinformatics, so new to Java and new to this forum. I've searched all over the forum for previous threads on this topic, but can't find an answer that has helped me. Apologies if I've missed something already posted that may help solve … Software Development java | |
Hey there. i have a listbox thats databound. Now i want to select in that massive list, lets say a sting "dog", i want it to hightligh that word in there. But i cant seem to get it to work with this databound listbox. Coz i know how to do … Software Development display | |
I don't know why. At all. Just that it won't repaint! My code: [CODE]import java.awt.Graphics; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JFrame; import javax.swing.JPanel; @SuppressWarnings("serial") public class Frame extends JFrame implements KeyListener{ JPanel content; int W = 200; int H = 200; public Frame(){ setSize(700,250); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setResizable(false); content = new JPanel(); … Software Development java java-swing | |
I have several buttons in my applet, however in certain case i use fillRect function to draw my whole applet go black, but i want to leave one Jbutton visible. The fillRect function hides my button, but the button comes visible if i move mouse cursor on top of it. … Software Development java | |
hi, i'm having a bit of trouble with grid views. see i can show stuff in them but i want to manipulate and use a certain selected record or field in it ( e.g : delete it from table in the DB or copy it into a textbox.). i'll be … Software Development | |
[CODE]Imports MySql.Data.MySqlClient Public Class Form8 Dim connection As MySqlConnection Dim con As MySqlConnection Dim da As MySqlDataAdapter Dim dt As DataTable Dim strQuery As String Private Sub Form8_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load strQuery = "server=localhost; user id=root; password=phoenix0931; database=accounts;" con = New MySqlConnection(strQuery) con.Open() Me.Text … Software Development vb.net | |
Hi, I'm novice by complete to webservices et al. I've created successfully a webservice and referenced it in a console application. By simplification let assume that the webservice contains a webmethod, the 'classic' CelsiusToFarenheit (string Celsius). Once referenced i can see my new namespace ServiceReference1 with the following classes inside: … Software Development c# | |
Hi there! I have some problem with java. I developing a multiplayer applet, there a class called userServer registry new users and logging in other users. the problem is, that I don't know how to append in a array. [CODE] user Users[]; int cnt=0; Users[cnt] = new user("emorjon2", "password"); cnt++; … Software Development java | |
I am building an application that contains data that needs to be fed out to seperate groups of people. Sending them emails is the only way to do it but this takes ages to do. Does anyone know of a way to send emails through lotus notes via vb.net code. … | |
when i write import win32print in my python command line (IDLE) it works fine and it is imported... but when i write import win32print in my py file then it gives an error says no module named win32print why am i not able to load the module when writing the … Software Development python | |
I'm new to VB and am writing a basic revenue calculator for class and for some reason I can't get it to display the computed values in the label fields when I run the form. I've been through the example code provide to me, my textbook, google (how I found … | |
I am using getline to read a CSV file. The line it reads looks something like "1/24/2010 6:19 1/24/2010 6:59 Merrill - Valley Farms yhy 69 Vegetation 55" The getline works but, I need to be able to calculate time days between a date the user inputs and the date … Software Development c++ | |
i have a program in c language that reads csv file.. now i want to read data column wise.. i want the whole program..which will take file name as command line argument and will fetch second column from the file.. lets assume file is like below.. aggromat,"1","abc","8903" aggromat,"2","abc","ddds" reply as … Software Development c | |
Hi! Just a quick question math.modf(x) is a python function that returns the fractional and integer parts of x. Both results carry the sign of x and are floats. Therefore, if I write, for instance, 5.4 to the python 2.6.6 command line I think I should get (0.4, 5.0) but … Software Development python | |
![]() | Hi all, I have code which allows a client console to connect to a server console using .NET Remoting with a shared dll, and then perform some operations. The only problem I'm aving, is that I want the main bulk of the programming logic to be performed on the server … Software Development app-store asp.net client-server |
hi, im trying to display the attribute name of the parent node once the input matches a town name: my xml is: [CODE] <phonebook> <area code="022"> <town>mallow</town> </area> <area code="023"> <town>bandon</town> <town>bray</town> </area> <area code="024"> <town>youghal</town> </area> <area code="025"> <town>fermoy</town> </area> </phonebook> [/CODE] and the method is: [CODE] private void … | |
Hello there DaniWeb, im switching from vb.net to c# and i think its alot better already, i just wonder about a thing How can i insert data into a variabel? this is my code: [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; … Software Development | |
I need ascii number for forward keys. i found it but it has two number examble first -32 and second 80?? please help Software Development c | |
if (txtMath.text >= "90") lblgrad.Text = "A+"; else if (txtMath.Text >= "80") lblgrad.Text = "A"; else if (txtMath.Text >= "70") lblgrad.Text = "B"; else if (txtMath.Text == "60") lblgrad.Text = "c"; else if (txtMath.Text == "50") lblgrad.Text = "D"; else if (txtMath.Text == "50") MessageBox.Show ("You are failed in your … Software Development | |
![]() | Hi guys, I've been searching for hours now and haven't yet found a good source of C# information for what I need to do. The general gist is this: I have 1 Client app (a simple windows form which gathers data) and 1 Server console app (which holds the business … Software Development c# client-server ![]() |
![]() | Hi Guys, I'm currently developing a project using WCF (hosted on local IIS) which connects to a local SQL database using LINQ to get data. My problem is that when I run the code, 9/10 times it'll fail with the "Specified Cast Is Not Valid" error, but the other 1/10 … Software Development client-server http-protocol open-source user-interface xml ![]() |
hello everyone, got issue regarding reading duplicate records in a text file... i need to read the file and look for any duplicates data/keys in the text file and write them to another file (all the duplicates records)... how can i do that, in looping...:-/ any help...:) thanks! Software Development file-system java | |
hi. i made a function which is supposed to create a binary tree from preorder and inorder traversals using recursion. i did this by making arrays for the left subtree and the right subtree in preorder and in inorder at each call of the function. makeNode() puts the data into … Software Development c | |
// THIS IS MY CODE FOR CALCULATOR BUT I HAVE PROBLEM IT CANNOT PERCENTAGE AND SQRT PLEAS HELP ME [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace MyCalculator { public partial class calculator3 : Form { /******************=========================****************** * creat bool for all … Software Development | |
I have a function that imports an Excel sheet into a SQL database. This function works except ONE line. [CODE] If sheetContent.Range("A" & exRow).Value2.ToString.Length < 1 Then Exit For End If[/CODE] The rest of this function works great, and it uses lines of code that are VERY similar to that … Software Development vb.net | |
hi.... i have an xml file which i've pasted below... [CODE] <?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"> <opensearch:Query searchTerms=""/> <opensearch:totalResults>1</opensearch:totalResults> <people> <person> <popularity>3</popularity> <name>Aamir Khan</name> <also_known_as> </also_known_as> <id>52763</id> <biography></biography> <known_movies>18</known_movies> <birthday></birthday> <birthplace></birthplace> <url>http://www.themoviedb.org/person/52763</url> <filmography> <movie name="Earth" id="7504" job="Actor" department="Actors" character="Dil Navaz" url="http://www.themoviedb.org/movie/7504" cast_id="2" poster="http://cf1.imgobject.com/posters/5ac/4bc91f50017a3c57fe00c5ac/earth-cover.jpg" adult="false" release="1998-09-16"/> <movie name="रंग दे बसंती" id="7913" … Software Development xml | |
Hey guys I’m trying to export data from a access form into an excel sheet when it is clicked by a particular button... but the VB code I’m using for the button will not work. Here is my current code: Private Sub Command12_Click() DoCmd.OutputTo acOutputForm, "frmExport", acFormatXLSX, "h:\mydocu~1\exports\F_assignments.xlsx", True End … Software Development visual-basic | |
hi, i am using ITEXT to create Pdf File . i want to reduce spacing between lines in pdf file is this possible if it is possible then how can i do that. thankx | |
Hey everyone, In my COMP 208 class, I was asked to do the following: "Redo Lab 2 Problem 2, only this time use vectors to hold the names and gpa’s instead of arrays. So you will work with 2 vectors, one holding the gpa’s (type double) and the other holding … Software Development c++ | |
I am trying to learn C++ through on-line tutorials and such. In almost all tutorials, the author tells you which headers to include for that particular exercise, but never tells you how he knows that. I understand that if you are advanced enough to be writing tutorials, you know off … Software Development c++ | |
what is the code of the [U]DoubleClick[/U] if i will search, using txtbox? Software Development visual-basic | |
Hello, I'm having this problem with the transparency in GDI+. I have 2 pictureBoxes, one over the other, and one of them has its' alpha color set to magenta(255, 0, 255). My goal is that when the upper pictureBox has a picture on it with a section of the magenta … Software Development | |
Hello, I am working on developing an interpreted programming language for a capstone project and have hit a snag dealing with two classes. In the interpreter, the classes represent a scope containing a procedure pointer and the procedure pointing back to the scope containing it. The former to allow the … Software Development c++ | |
I have a comboBox that is populated by an array. When one of the choices is no longer available, I'd like to remove that item from the comboBox. I tried [CODE]if (firstClassAvailable == 0) { this.comboBox1.Items.Remove("First"); }[/CODE] which throws this exception System.ArgumentException: Items collection cannot be modified when the DataSource … Software Development | |
Hi. This is probably too easy, but... Can anyone tell me how to add or remove a checkbox from a panel by using the Designer? The only samples I could find online had the code nside an arbitrary method called CreateMyPanel(). I'm looking at a file called MyControl.Designer.cs, and inside … Software Development asp.net | |
Hi folks i only have one question.Can or should i delete a base class object instantiated in a derived class's constructor , inside the derived class's destructor? [code] class A { protected: int somedata; public: A () {} A (int x) : somedata(x) {} virtual ~A () {} }; class … Software Development c++ | |
i have a string which is giving me problems. when i put it into a textfile, it puts the cursor onto the nextline. i assume because there is a \n at the end of the string, but when i cout the string, the newline character isnt there (well, the console … Software Development c++ |
The End.