43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for cgyrob

I have an app where I keep getting this error. This is a c# .net 3.5 app running on a windows 2003 server with IIS 6.0 connecting to an Oracle 10g db. This app had no problems during testing where it was connecting to an Oracle 9i DB but once …

Software Development oracle
Member Avatar for cgyrob
0
202
Member Avatar for bandit711

Every time i compile this code i come up with a additional set of numbers, but i don't know why. [CODE] #include <iostream> #include <stdlib.h> #include <iomanip> #include <string> #include <fstream> using namespace std; void calculateAverage(double quiz1, double quiz2, double quiz3, double test4, double& SAverage); int calculateGrade(double grade); int main() …

Software Development c++ file-stream ios
Member Avatar for bandit711
0
165
Member Avatar for seacase

I seem to have hit a wall with implementing my own version of merge sort. I can sort the list fine in ascending order, but once I try to reverse the ordering (passing in a boolean), I get an ArrayIndexOutOfBounds error. I'm guessing that what I'm experiencing is some sort …

Software Development java
0
46
Member Avatar for kjock002

the program below simulates a game of craps and its pretty much done except for a way to get the while loop to stop. i was trying to get an input from the user when they wanted to stop rolling and to enter "n" for no but im not sure …

Software Development python
Member Avatar for jcao219
0
116
Member Avatar for kjock002

so im trying to simulate a walk where the user will randomly take either a step forward or backwards, hence using the probability of a coin flip. i think the program is pretty much self explanatory. i just need help debugging it because it doesn't seem to work properly yet. …

Software Development python
Member Avatar for jcao219
0
182
Member Avatar for jaredleo999

public class Welcome extends JFrame { private Toolkit toolkit; private static String passy = "123456"; public Welcome() { setSize(300,550); setTitle("Welcome"); setDefaultCloseOperation(EXIT_ON_CLOSE); JPanel panel = new JPanel(); getContentPane().add(panel); panel.setLayout(null); JLabel label = new JLabel("Enter Password"); JPasswordField password = new JPasswordField(6); password.setEchoChar('*'); password.addActionListener(new AL()); label.setBounds(0,0,300,25); password.setBounds(100,0,200,25); JButton b1 = new JButton("1"); b1.setBounds(0,100,100,100); …

Software Development java
Member Avatar for jaredleo999
0
648
Member Avatar for Etherwind

I'm getting a compiler error in one of my .c's that I don't understand. I'm getting [icode] Tree.c: In function 'newTree': Tree.c:301: error: expected declaration or statement at end of input [/icode] What I don't understand is that newTree and line 301 are completely separate functions. I can get the …

Software Development c
Member Avatar for Etherwind
0
174
Member Avatar for Lukezzz

I wonder how it is possible to retreive a string from a function that is generating this string. How is it possible to get the string "SendThis" when presssing the button1 in this case and declare it to getgenerateString ? [code] private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { String^ getgenerateString …

Software Development c++
Member Avatar for Lukezzz
0
156
Member Avatar for teen-omar

Hey guys, I'm stuck at a problem. Check out the code: [CODE]import java.util.*; class testAll { public static void main(String[] args) { Scanner input = new Scanner(System.in); ArrayList pointsArray = new ArrayList(); ArrayList linesArray = new ArrayList(); System.out.println("Enter amount of sides: "); int sides = input.nextInt(); if (sides <= 2 …

Software Development java
Member Avatar for teen-omar
0
282
Member Avatar for Mena samy

hello I am trying to send an array of character but when i receive it in the other processor i receive it with garbage !!! any suggestion? [CODE] #include <stdio.h> #include "mpi.h" int main (int argc, char *argv[]) { MPI_Status s; int size, rank; char line [128]; //char* str="hjfjh"; static …

Software Development c
Member Avatar for Mena samy
0
189
Member Avatar for Geodude0487

[QUOTE=khanhtrung;460562]Hi omoz4real. In your code,i found that you hadn't opened your connection before executed a command,so you probably couldn't connect to the database. If you didn't intend to execute a command which return a table as a result,you should use another way.There is [B]xxCommand.ExecuteNonQuery().[/B] I have a small attached program …

Software Development open-source
Member Avatar for Geodude0487
0
112
Member Avatar for vodkasoda

OK, this is probably very simple and it's likely that I am very simple, but it's bugging me big time :$ !!! I have never written anything in VB before, a few things in VBA, but this is my first venture in to VB.net ... so sorry if I am …

Software Development vb.net
Member Avatar for vodkasoda
0
2K
Member Avatar for JJBallanger

Hi there, As a student I am new to python and am struggling with the following program I have been tasked to create. My code so far is like so. The idea is that the function will take a guess x, incorporate an arbitrary function f(x) and then take feps, …

Software Development python
Member Avatar for JJBallanger
0
231
Member Avatar for tjfitz68

Hello, I'm likely overlooking something but I'm having a problem with a Decimal variable dropping a zero which is make the value incorrect. After a bit math, on other variables, I'm ending up with .9 instead of .09 While debugging, if I display the results of the calcuation it's shows …

Software Development vb.net
Member Avatar for tjfitz68
0
73
Member Avatar for alabay2010

Hello everyone! I have task to write a program that would read a data from any txt file and visualize it on a bar chart using turtle module. I have to structure the program using modules and functions for nice design. The program must be fit for any other txt …

Software Development data-structure python
Member Avatar for TrustyTony
0
624
Member Avatar for Lukezzz

I have a little spoky problem here. I really cant understand what it is. I am reading a file that is completely empty. But still the second MessageBox is showing this string: "22" I cant wrap my head around why if( line != "" ) is executing and no character …

Software Development c++ file-stream
Member Avatar for Lukezzz
0
110
Member Avatar for rena0514

my previous button does go to the previous file: [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; public class StudentAddress extends JPanel { private JButton submit, clear, next, display, previous; private JLabel first, last, street, town,state, zip; private JTextField fName, lName, hStreet,hTown,hState, hZip; private int studentCount=0, displayCount=0, i; //studentCount …

Software Development java java-swing
Member Avatar for moutanna
0
103
Member Avatar for empror9

hello guys, i have a simple question which is how can i declare a variable to accept character and number at one time for example, i ask the user to input 'a1' to do something waiting for you

Software Development c++
Member Avatar for empror9
0
200
Member Avatar for volgent

I've got some troubles with ListBox. I want to allow user edit selected item in ListBox, when he double click it in his application, but I wasn't able to find how to do this. Please, can someone help me with it?

Software Development
Member Avatar for volgent
0
115
Member Avatar for euclid135

Hi all, i,m trying to use A* algorithm to do my task; this is the code [code] //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // STL A* Search implementation // (C)2001 Justin Heyes-Jones // // Finding a path on a simple grid maze // This shows how to do shortest path finding using A* //////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include …

Software Development algorithm c++
Member Avatar for euclid135
0
501
Member Avatar for hitro456

Hi everyone, I get a string in XML format from front end. I write that into a file, and later I parse that file to get tokens/values. is there any way..that I can parse the string Instead?? which is in XMl format and fetch the tokens there. Coz writing on …

Software Development xml
Member Avatar for kvprajapati
0
128
Member Avatar for lishannx

hi, have a slight problem here. this is my open file dialog code. [CODE] private void browseToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Browse And Upload A Template."; ofd.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"; DialogResult dr = ofd.ShowDialog(); if (dr == DialogResult.OK) { //bitmap …

Software Development file-system
Member Avatar for kvprajapati
0
137
Member Avatar for jackiejoe

I can insert into my table by the bindingnavigator and dragging textboxes straight from the DataSet entering them and saving. But I want to insert into the DataBase via code and in order to do this I have used the below code to connect. I use this code to test …

Member Avatar for samir_ibrahim
0
98
Member Avatar for daviddoria

Is there a data structure that lets me push and pop things onto/off of a queue, but also doesn't allow duplicates? E.g. I want [code] queue a; a.push(1); a.push(2); a.push(2); a.push(3); [/code] to only have 3 elements, because 2 was added twice so the second time it is just ignored. …

Software Development c++ data-structure queue
Member Avatar for mattjbond
0
168
Member Avatar for kjock002

i found this code [URL="http://www.daniweb.com/forums/thread233959.html"]here[/URL] and i tested the code and it isn't working for me this is what my code looks like: [CODE] # PURPOSE: to count the number of words, lines, and characters in a file # # INPUT(S): a file name to be used # # OUTPUT(S): …

Software Development file-system python
Member Avatar for TrustyTony
0
2K
Member Avatar for commentator8

Hi all, I am new to C, and till now have only done python (a years worth at university), and am finding myself running into walls whenever i try to do seemingly simply stuff. One of the main issues in comparison is the lack of a interpreter and Ch is …

Software Development c
Member Avatar for rajuln
0
415
Member Avatar for xsach

i need to find all the files in the directory and sub directory that have a text file..within this text file there is a string called average with some value.. the code below works fine for a single directory...but i need to find the same text files in the sub …

Software Development file-stream java
Member Avatar for xsach
0
114
Member Avatar for timhuynh

Hi everyone. This is my first post . I develop this program in C-Free 4.0 with <iostream> header... And it working [CODE] #include <iostream> #include <cstdlib> #include <iomanip> #include <ctime> using namespace std; int main () { int random_num; srand((unsigned)time(0)); bool assigned_players[32]; for (int i=0;i<32;i++) assigned_players[i] = false; int n=32; …

Software Development c++
Member Avatar for chiwawa10
0
160
Member Avatar for swolll

This is seg faulting whenever I try to remove anything. I've been trying to fix it for hours, to no avail. Any ideas? [CODE]#ifndef BST_H_ #define BST_H_ #include <stdexcept> #include <iostream> #include "btnode.h" using namespace std; /* A class to represent a templated binary search tree. */ template <typename T> …

Software Development c++
0
65
Member Avatar for ytechie

hi. I have a method that searches a database using the contents of a textbox. I don't want people to be able to type "%" and retrieve all of the info... If UsernameTextBox.Text = [COLOR="Red"][B]""%""[/B][/COLOR] Then badlogin() End If

Software Development vb.net
Member Avatar for ytechie
0
82
Member Avatar for pirateninja1111

so i need some help, have random int that decide which values in my Boolean array are true. All th [CODE] System.out.println ("pick a number 1-9"); int guess; for ( int i = 0; i < 9; ++i ){ guess = console.nextInt(); if (x[i] = true) { System.out.println("CORRECT!!"); }else if …

Software Development java
Member Avatar for pirateninja1111
0
92
Member Avatar for stryker4526

As a prerequisite, here is the code for my two classes, Station and SubwaySystem: [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Assignment7 { class Station { //attributes private string stName; private int stID; private Station next; private Station previous; //properties public string StName { get { return this.stName; …

Software Development
Member Avatar for jonsca
0
125
Member Avatar for penguin22

Hi, I keep getting the error Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) when i try to make a guid. [CODE] string entryNum = Convert.toString(entryNo); Guid key = new Guid(entryNum); [/CODE]

Software Development
Member Avatar for penguin22
0
3K
Member Avatar for xofth

I want to get only y and n from user to enter when user try to enter another it get the input again until user enter "y" or "n" i use this logic but its not working [CODE] do { cout<<"\n\n Enter Number: "; number=getche(); cout<<"\n Want to enter another:(y/n)"; …

Software Development c++
Member Avatar for xofth
0
226
Member Avatar for noahssite

Let's say I have form1 and form2. Form1 and Form2 are open. You click a button on Form2 and it adds 1 to a variable called myNumber on Form1. Now the problem is I can't use the new keyword and create a new instance of Form1, because Form1 declares myNumber …

Software Development
Member Avatar for noahssite
0
108
Member Avatar for tphuoc

I have figured out how to populate the comboboxes for an app I'm making from a database this is not the actual code but is basically the way I'm populating them [code] for i = 0 to maxrows - 1 cbobox.items.add(dataset.tables("datatablename").Rows(i).Item(x)) next i [/code] I need either to be able …

Software Development dataset vb.net
Member Avatar for tphuoc
0
98
Member Avatar for seacase

I am having trouble adding the ability to order an integer array in both ascending and descending order. I have implemented the functions myself and am having trouble figuring out how to order them in reverse order. I am passing in a boolean variable to test which direction the array …

Software Development java
0
115
Member Avatar for PDB1982

I had my code working properly, but once I added my last array, it goes through the compile and then errors out....and I'm not quite sure why.... [code] #include <iostream> #include <fstream> #include <cstdlib> #include <cmath> using namespace std; int main() { double num[100], sum, count, newnum[100]; int j,i; ifstream …

Software Development c++
Member Avatar for PDB1982
0
83
Member Avatar for nats01282

Hi all im after a piece of code that allows the user to enter a fraction e.g 1/4 and have the code split that fraction into 2 seperate variables, e.g variable 1 containing the '1' variable 2 cantaining the '4' How would i achive this? My objective is to make …

Software Development c++
Member Avatar for nats01282
0
171
Member Avatar for sdgz747

I am trying to read a file into an array and set the min and max values. At this point in my program, I am trying to just read it into an array and then display that array. I still have more to do in the program, but I am …

Software Development c++ file-system
Member Avatar for WaltP
0
112
Member Avatar for corby

Ok so this is my code below in my member function definition .cpp file. The problem is when I execute the program it will not let me fill the answer for the first question so for example the output is: Please enter the name of the receiver: Please enter the …

Software Development c++
Member Avatar for corby
0
108
Member Avatar for KSUliz

[code=java] import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.*; import java.util.*; public class Transfer extends JFrame implements ActionListener { //Declare output stream DataOutputStream output; //Construct a panel for the fields and buttons JPanel fieldPanel = new JPanel(); JPanel buttonPanel = new JPanel(); //Construct labels and text boxes JLabel …

Software Development file-stream java java-swing
Member Avatar for KSUliz
0
136
Member Avatar for bunnyboy

So for example, I have an array like that: [CODE=C#]char[] pattern = "GCAGAGAG".ToCharArray();[/CODE] And what I would like to do is to extract out distinct values and its corresponding indexes(smallest one) from right to left where first letters does not count. example: reversed array: [COLOR="Green"]GAGAGACG[/COLOR] Distinct values are: [COLOR="Red"]A, C, …

Software Development
Member Avatar for bunnyboy
0
102
Member Avatar for sandorlev

hello! i've just tried out lists in c++, but they're giving me some kind of problem. it has something to do with iterators but i'm pretty sure i'm using them the right way. anyway, here is the code: [CODE] #include <list> #include <iostream> int main(int argc, char* argv[]) { std::list<int* …

Software Development c++ seo
Member Avatar for sandorlev
0
156
Member Avatar for vbx_wx

[CODE] HKEY hkey; DWORD nSubKeys = 0; TCHAR name[MAX_PATH]; DWORD size = sizeof(name); FILETIME filetime; if(RegOpenKeyEx(HKEY_CURRENT_USER , "Software" , 0 , KEY_QUERY_VALUE , &hkey) == ERROR_SUCCESS) { if(RegQueryInfoKey(hkey , 0 , 0 , 0 , &nSubKeys , 0 , 0 , 0 , 0 , 0 , 0 , &filetime) …

Software Development c++
Member Avatar for vbx_wx
0
124
Member Avatar for Diomedes

Hello Python forums, I started working with Python recently and picked up a book. The book stated discussing using the ctypes module in python which is slick because it's exactly what I need to be learning. I started trying to test my knowledge by implementing a simple, singly linked list …

Software Development linked-list python
Member Avatar for TrustyTony
0
705
Member Avatar for geoNeo_

Hello all I hope someone could help me, i have a small application that I wrote for a friend, but I need it to start up every 24 hours or so. It basically like a reminder application but i need it to start up at a predefined time. I have …

Software Development
Member Avatar for geoNeo_
0
227
Member Avatar for dipankar_pr

Hi,All, I am try to develop a project where the back en database is MS access, front end is vb6 and connectivity establish by odbc. the database content multiple table. Frost table [COLOR="Green"]student[/COLOR] contain [COLOR="green"]roll, name[/COLOR] second table [COLOR="green"]marks[/COLOR] contain [COLOR="green"]roll, math, English[/COLOR] there is four text box namely txtRoll, …

Software Development microsoft-access visual-basic
Member Avatar for dipankar_pr
0
1K
Member Avatar for mitch9654

Hello, I am trying to make a calculator that does multiplication, division, addition and subtraction. My problem is that when I have the two numbers that have decimals it goes wonky. Anyway, that program runs like this: 1. User enters equation 2. Unwanted characters get thrown out 3. If operation …

Software Development c++
Member Avatar for chary8088
0
248
Member Avatar for farag

Hello, i want to know the best practice to 1. read an XML file and store it in SQL data base and 2. modify the data base whenever the XML file modified, i created a table on data base on SQL server with columns has the same names like XML …

Software Development file-system sql web-server xml
Member Avatar for farag
0
842

The End.