43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for darkalfx

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++
Member Avatar for darkalfx
0
1K
Member Avatar for bestex

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 …

Software Development mysql vb.net
Member Avatar for bestex
0
145
Member Avatar for MaDo4

Hi im trying to calculate the average of an inputfile using a 2d array. I tried to calculate the average per row and add them all together but my code gives me an average of zero. I was wondering if anyone can see what im doing wrong or a better …

Software Development c++
Member Avatar for MaDo4
0
143
Member Avatar for blacklocist

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
Member Avatar for ivy3
0
218
Member Avatar for blee93

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++
Member Avatar for blee93
0
138
Member Avatar for scarlettmoon

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++
Member Avatar for scarlettmoon
0
160
Member Avatar for minghia

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
Member Avatar for minghia
0
203
Member Avatar for aaronmk2

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
Member Avatar for Mitja Bonca
0
135
Member Avatar for Phil++

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
Member Avatar for Phil++
0
138
Member Avatar for MasterMic

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
Member Avatar for MasterMic
0
239
Member Avatar for carlitosway17

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
Member Avatar for Mitja Bonca
0
3K
Member Avatar for angelmichael4

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
Member Avatar for angelmichael4
0
73
Member Avatar for muthuivs

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++
Member Avatar for raj.patel301
0
572
Member Avatar for BioJavaPhobic

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
Member Avatar for BioJavaPhobic
0
293
Member Avatar for Mr.BunyRabit

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
Member Avatar for Mitja Bonca
0
125
Member Avatar for mangopearapples

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
Member Avatar for mangopearapples
0
181
Member Avatar for C:\>

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
Member Avatar for Ezzaral
0
224
Member Avatar for DeathEater

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
Member Avatar for Mitja Bonca
0
81
Member Avatar for bestex

[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
Member Avatar for bestex
0
496
Member Avatar for maac2002

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#
Member Avatar for maac2002
0
886
Member Avatar for emorjon2

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
Member Avatar for JamesCherrill
0
168
Member Avatar for get connected

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. …

Software Development email vb.net
Member Avatar for lolafuertes
0
494
Member Avatar for dos_killer

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
Member Avatar for dos_killer
0
103
Member Avatar for tuckerdwz2025

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 …

Software Development display vb.net
Member Avatar for tuckerdwz2025
0
207
Member Avatar for JordanHam

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++
Member Avatar for JordanHam
0
226
Member Avatar for rjbrjb777

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
Member Avatar for rjbrjb777
0
2K
Member Avatar for Srynx

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
Member Avatar for Srynx
0
145
Member Avatar for micmo

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
Member Avatar for zachattack05
0
226
Member Avatar for tookerello22

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 …

Software Development display xml
Member Avatar for tookerello22
0
211
Member Avatar for Erlendftw

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
Member Avatar for Erlendftw
0
271
Member Avatar for kayhantolga

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
Member Avatar for kayhantolga
0
88
Member Avatar for yousafc#

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
Member Avatar for ddanbe
0
90
Member Avatar for micmo

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
Member Avatar for micmo
0
656
Member Avatar for micmo

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 …

Member Avatar for micmo
0
1K
Member Avatar for r0n

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
Member Avatar for r0n
0
2K
Member Avatar for keicola

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
Member Avatar for keicola
0
202
Member Avatar for yousafc#

// 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
Member Avatar for yousafc#
-3
191
Member Avatar for bklynman01

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
Member Avatar for bklynman01
0
101
Member Avatar for arjunpk

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="&#2352;&#2306;&#2327; &#2342;&#2375; &#2348;&#2360;&#2306;&#2340;&#2368;" id="7913" …

Software Development xml
Member Avatar for arjunpk
0
161
Member Avatar for mugged ur mom

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
Member Avatar for AndreRet
0
498
Member Avatar for sj5536

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

Software Development java pdf
Member Avatar for peter_budo
0
180
Member Avatar for bensewards

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++
Member Avatar for user422
0
201
Member Avatar for txwooley

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++
Member Avatar for mike_2000_17
0
122
Member Avatar for junjun61991

what is the code of the [U]DoubleClick[/U] if i will search, using txtbox?

Software Development visual-basic
Member Avatar for debasisdas
0
148
Member Avatar for KazenoZ

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
Member Avatar for KazenoZ
0
183
Member Avatar for fishsicles

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++
Member Avatar for fishsicles
0
149
Member Avatar for revjim44

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
Member Avatar for kvprajapati
0
199
Member Avatar for SoftwareGuy

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
Member Avatar for SoftwareGuy
0
218
Member Avatar for caut_baia

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++
Member Avatar for caut_baia
0
561
Member Avatar for lexusdominus

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++
Member Avatar for lexusdominus
0
98

The End.