64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for danjoe15

The Catch section is always executed even if the Try section has been executed. I am trying to send the user to one page if the delete worked properly and a different page if the delete did not work because of relationships between tables: [CODE] Protected Sub btnDeleteBuilding_Click(ByVal sender As …

Member Avatar for danjoe15
0
105
Member Avatar for mikeyboy02

Hi I'm new to java and working on a program where I want to show the number of rentals for one person in one box and the total rentals in another box. I am having trouble storing the variable or it is not recognizing that I want to keep adding …

Member Avatar for mikeyboy02
0
109
Member Avatar for pateldeep454

I am having error in the following code. What should I do to fix it? Also, how should I call it in main method to test the code? please HELP :( [CODE] package sortingelements; public class Main { public static void main(String[] args) { } public int indexOfMaxInRange (int[] myArray, …

Member Avatar for Danny_501
0
124
Member Avatar for tbelczak

I have way too many hours into this and I feel as though it is due to a configuration difference somewhere between the two servers. Here is code for two simple scripts: [B]TEST1.PHP[/B] [code=php] <?php session_start(); $cart[0] = array('item_number' => '12345', 'qty' => '5'); $_SESSION['cart'] = serialize($cart); header('Location: test2.php'); exit(); …

Member Avatar for tbelczak
0
222
Member Avatar for J.Killa

In my program, I have to input a word and then a character. The program will tell me how many times does the character appear in the word...my problem is that I have to find this character with the find(str,ind)...I know the ind is the index and can be manipulated …

Member Avatar for J.Killa
0
305
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 …

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() …

Member Avatar for bandit711
0
165
Member Avatar for EvilOrange

i have this code: [CODE] var current; startOff = $('#all').offset(), offString = "{top :"+ startOff.top +", left :"+ startOff.left + "}"; current.css(offString); [/CODE] When "offString" is alerted its fine - eg {top: 123, left: 342} BUT it doesn't seem to like it, but when the alerted output is added into …

Member Avatar for EvilOrange
0
99
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 …

0
46
Member Avatar for Tekkno

[code=php] $results = mysql_query("SELECT column1, column2, date, time FROM table ORDER BY RAND() LIMIT 1"); $row_table = mysql_fetch_assoc($results); [/code] For some odd reason this does not return data, however if I change it to: [code=php] $results = mysql_query("SELECT column1, column2, date, time FROM table ORDER BY RAND() LIMIT 2"); $row_table …

Member Avatar for diafol
0
202
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 …

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

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); …

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 …

Member Avatar for Etherwind
0
174
Member Avatar for ohnow

for a program that tries to dtermine how many votes are in each congressional district. the program reads records that each contain a name., a Social Security number(nine digits, no non-numeric characters), and a district number from 1 to 7.the records should be read until the end of the file. …

Member Avatar for ohnow
0
80
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 …

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 …

Member Avatar for teen-omar
0
282
Member Avatar for bjeffries

Well at least I think my troubles are with the get variable. I know my code is amateur I am very new to PHP and trying to learn as much as I can. So I am trying to create a photo gallery any having trouble with getting my get variable …

Member Avatar for bjeffries
0
349
Member Avatar for jpknoob

I'm trying to create a form that updates stock in mysql database. I have created the forms to upload new stcok and they work fine. However, i'm including a link that will take the user to an update php that will then update the required fields, but i can't seem …

Member Avatar for diafol
0
99
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 …

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 …

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 …

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

Member Avatar for JJBallanger
0
231
Member Avatar for azegurb

hi all i have a problem with file content copying. i have index.php and there are codes in it. i would like to create [COLOR="red"]indexa.php[/COLOR] and append[COLOR="red"] index.php [/COLOR]file contents to newly created [COLOR="red"]indexa.php [/COLOR]file thanks beforehands here is my file [CODE]<?php // This function shows your form function form(){ …

Member Avatar for azegurb
0
1K
Member Avatar for xylude

I have an if statement that is always evaluating true even if none of the conditions are true. It goes like this: if(condition1 || condition2 || condidion3) { //do stuff } For whatever reason even if none of the 3 conditions are actually true, it just runs anyway. Is there …

Member Avatar for theighost
0
114
Member Avatar for kristo5747

Greetings! I created this form that works like a charm, captures data in my db and sends email. Suppose user Joe hits the RESET button before he clicks SUBMIT, all fields are reset. If Joe hits the RESET button AFTER he clicked SUBMIT (e.g. to make a new submission)...nothing gets …

Member Avatar for kristo5747
0
122
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 …

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 …

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 …

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 …

Member Avatar for moutanna
0
103
Member Avatar for fiaolle

Hi I'm trying to set a property in the User Control. I see that the property is set when I'm debugging. But when I'm using the property in a method in the User Control the property is set to 0 everytime. I don't understand why. Here is the code I'm …

Member Avatar for reach_yousuf
0
211
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

Member Avatar for empror9
0
200
Member Avatar for Ycefire

Hi there, I'm a beginner in ASP.NET with VB and I'm stuck on problem with a SQL query. I'd like to ask you for advice what does my page or config file miss. thats how my form looks like [CODE] <form id="form1" runat="server"> <div style="margin: 0 auto; width: 180px;"> <asp:Label …

Member Avatar for Ycefire
0
805
Member Avatar for peter_budo

I running my little blog on Tomcat 6 server. My hosting company allows me to set up multiple sub domains. I was trying to do for last few hours, but no luck. Having started with [code=xml] <Engine name="Catalina" defaultHost="mydomain.co.uk"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <Host name="mydomain.co.uk" appBase="/home/user/public_html" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Alias>www.mydomain.co.uk</Alias> …

Member Avatar for peter_budo
0
1K
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?

Member Avatar for volgent
0
115
Member Avatar for suryarao

hi, in my application i am using a music player for playing the audio (premiumbeat.com) royalty music player. Which is working fine when audio file placed directly. But in my application the audio file comes from the other page in a query string how can i write the code for …

Member Avatar for kvprajapati
0
563
Member Avatar for fiaolle

Hi I want to make my own login box to popup when I click a button Is there a way to do that? I don't want a whole page for the loging in part. I just want something like the msgbox, but with two textboxes and two buttons for login …

Member Avatar for kvprajapati
0
75
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 …

Member Avatar for euclid135
0
501
Member Avatar for filch

I am having a hell of a time with a form, which is built dynamically from PHP. The form is constructed first by calling a page called gala-tix.php, This page holds a bunch of javascript functions, the form code and it also calls an include called dwt.php. dwt.php has a …

Member Avatar for colweb
0
163
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 …

Member Avatar for kvprajapati
0
128
Member Avatar for benqus

Hello again! I need your help again, people! =) So here's my problem: This line replaces only the first "\n" spec. character in my textarea, and this way everything's screwed up... I'm sending the replaced content of the textarea through AJAX to the server, in a GET method. I've tried …

Member Avatar for benqus
0
165
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 …

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

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): …

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 …

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 …

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

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

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

Member Avatar for ytechie
0
82

The End.