199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for coco24

Is this a simple way to return the number of occurrences of theValue in a bag? [code] /** * Return the number of occurrences of theValue in the bag. */ public int countOccurrences( String theValue ) { // fill in code for(int index = 0; index <= topPosition; index++ ) …

Member Avatar for javaAddict
0
80
Member Avatar for Chair

Hi, I want to populate a listview with items from datagrid view. I've been searching for solutions but it seems that all the scenarios I found were about populating listview with items from tables in database, not from another listview or datagrid view. I'm trying this code: [CODE] For count …

Member Avatar for Chair
0
1K
Member Avatar for ankurmawanda

i have a html form and with a few fields i want to md5 my password field before posting it here is my code [code=java] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Employee Payroll System NIC-APSC</title> <link rel="shortcut icon" href="images/favicon.ico"> <script language="javascript" type="text/javascript" src="md5.js"> function crypt() { document.form1.password.value = calcMD5(document.form1.password.value); } …

Member Avatar for Airshow
0
764
Member Avatar for haribasker

please help me import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.net.*; import javax.swing.border.*; /** * Summary description for userlogin * */ public class userlogin extends JFrame { public static ServerSocket ssoc1; public static Socket sousoc1,ss1; // Variables declaration private JLabel userlabel; private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4; …

Member Avatar for JamesCherrill
0
3K
Member Avatar for JGriffCS

I'm trying to create a class that reads in a set of numbers from a file, stores them in a generic array, and then sorts them using the generic bubbleSort method. I usually write in C++ and the switch from templates to generics hasn't been easy. I'm fairly certain my …

Member Avatar for JamesCherrill
0
704
Member Avatar for plang007

[CODE]#include <iostream> #include <fstream> #include <iomanip> #include <cmath> using namespace std; int main() { char fare; char choice='Y'; int hrIn, minIn, hrOut, minOut; int hours; int minutes; int total_minutes; double cost; float charge; while(choice=='Y'||choice=='y') { cout << "\nThis program will calculate a group " << "\nfare amount which is then …

Member Avatar for rxlim
0
154
Member Avatar for matt.clark.228

I have on my website: index.php members/login.php members/redirect.php What i am trying to do is i have login point to redirect passing the login info from login.php. in redirect.php I want it to set all of the session variables that i will need everywhere else in the site, however, using: …

Member Avatar for smantscheff
0
129
Member Avatar for VanHackman

Hello, I need some help. I have a MySql DB, and some fields have Japanese values. DB collate is set to: utf8_general_ci When I check for a specific register with PhpMyAdmin, values with japanese characters display ok, but when I try to get the same register to show it using …

Member Avatar for smantscheff
0
2K
Member Avatar for dhairyaguptha

<html> <body> <div align="center"> <form name="imageTest"> <input type="file" name="myImage" size="30"/> <input type="button" value="Preview!" onClick="previewImage(document.imageTest.myImage,'replaceMe')"/><br> <img src="MyImg.jpg" name="replaceMe" id="replaceMe"/> </form> </div> </body> </html> <script language="javascript"> var imgRe = /^.+\.(jpg|jpeg|gif|png)$/i; function previewImage(pathField, previewName) { var path = pathField.value; if (path.search(imgRe) != -1) { //document[previewName].src = document.imageTest.myImage.value; document.getElementById("replaceMe").src = document.imageTest.myImage.value; } else { …

Member Avatar for Agarsia
0
170
Member Avatar for water_ox

I need help with this assignment that I have to do. I am new to C++ programming and I do now know how to start this lab. Here is the instruction to the lab..please help.. COMP-122 Lab 6 Grade Arrays Objectives: • Use an organized, modular approach to develop programs, …

Member Avatar for jonsca
0
223
Member Avatar for rajeev_vlal

hey....frens can you help me. ..!! my frens and i were thinking if we should use grid view to get and display the blogs from the database...or if there is any other suggestion for us to do to get better result pliz do reply....help needed...

Member Avatar for danceo0
0
89
Member Avatar for swathys

Hi, can anyone guide me on [COLOR="Red"]how to check the server DateTime when the application launch. i want to make sure the user PC has the same DateTime as server when the user use the application.[/COLOR] Reason being is some user may tend to change their DateTime backward and it …

Member Avatar for Luc001
0
136
Member Avatar for y2kshane
Member Avatar for gaurav.pruthi88

Hello , For the given snippet , why the result comes out to be 2..while it should be 3 , if the expression is interpreted from Left-Right or .75 for vice-versa. >>>3/2*2 2 >>>

Member Avatar for gaurav.pruthi88
0
82
Member Avatar for Dadkhah

Hi. I using this Thread "Serial port communication using C++ = "http://www.daniweb.com/forums/thread56329.html" and I change it for solved the some error in program. This is my source code: serial.h #[CODE]define FC_DTRDSR 0x01 #define FC_RTSCTS 0x02 #define FC_XONXOFF 0x04 #include <stdio.h> #include <time.h> #define VC_EXTRALEAN #include <string.h> #define ASCII_BEL 0x07 #define …

Member Avatar for Dadkhah
0
251
Member Avatar for Brianbc

[CODE]<?php /* +-----------------+------------------------------------------------------------+ | Class | setup | | Author | Brian Onang'o | | Version | 1.0 | | Last Modified | 10:16 AM 10/2/2010 GMT+3 | +-----------------+------------------------------------------------------------+ | This program is free software; you can redistribute it and/or | | modify it under the terms of the GNU …

Member Avatar for Brianbc
0
239
Member Avatar for Gregor97

I have had no previous programming experience and want to start learning C++. T was hoping if you could reccomend a good book. P.S. I've been thinking about [I]C++ Primer Plus[/I].

Member Avatar for alex55
0
140
Member Avatar for commando1200

Im trying to make a tax and tip calculator and whenever the tax comes up it goes 10 or more decimal places and im trying to restrict it to two. [code=java] public static void main(String[] args) { double cost, total, tip, taxtotal, tiptotal, subtotal, grandtotal; Scanner myScanner = new Scanner(System.in); …

Member Avatar for commando1200
0
197
Member Avatar for TheIdiot

I keep getting a syntax error in this code and I need a new set of eyes to show me what I am doing wrong. It is coming back and saying that I have an unexpected } on line 36. [CODE]<?php require_once("config.php"); //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER, …

Member Avatar for TheIdiot
0
153
Member Avatar for jogieglenmait

i have a program that would display the productName,productPrice,productCode. each is a separate array. the program would prompt user to add,delete,or search a productName,productPrice,productCode. here's what i tried to do: [CODE]string productName[100]={"milk","beef"}; int productPrice[100]={10,11}; string productCode[100]={"a1","a2"}; int x,y,z; char choice; string search,name,price,code; cout<<"what do you want to do?"; <<"[S]earch."; <<"[A]dd."; …

Member Avatar for attefeh
0
151
Member Avatar for riotburn

I just got a program that does forward substitution. It is working fine but I would like to make it so the user can enter size of both 2D n x n array and a n x 1 array and then be able to enter the elements of the arrays. …

Member Avatar for attefeh
0
5K
Member Avatar for lxricher

Here is my code [code].section .data values: .int 0 array_end: .equ ARRAY_SIZE, array_end - values array_fmt: .asciz " %d" usort_str: .asciz "unsorted array:" sort_str: .asciz "sorted array:" newline: .asciz "\n" maxvalue: .int 1000 format: .asciz "%d" message: .asciz "Please enter a maximum size for the array to be sorted." output: …

0
165
Member Avatar for airesh

guys, how to check data if it is already in the database? i am using sql server.. thanks

Member Avatar for kvprajapati
0
99
Member Avatar for emily-bcot

Hi, My application is on the shared Hosting.I've encrypted my Connection String programmatically to make it secure. However, the hacker still is able to decrypt the encrpted Connection String adding scripts into the DB. Just wondering if there is a way to solve this problem? Many thanks !!!

Member Avatar for kvprajapati
0
117
Member Avatar for xxxferraxxx

Hi, I need to make "Keygen" that gen text not randomly with two text boxes, i need to use it for "username and "password" gen that i puted to gen. Please help with the code :)

Member Avatar for xxxferraxxx
0
209
Member Avatar for lewis1231

Hi I am in need of some help, I want to be able to stream music from my webserver and list them on my application. I can get my program to download the files and play them but this uses a lot of bandwidth and has to download them before …

Member Avatar for kvprajapati
0
73
Member Avatar for erum

i m getting an error related to ajax see an image .although file is running on local but not on server any urgent reply is hghly appreciated !!

Member Avatar for erum
0
68
Member Avatar for JD69

VB2008 I am trying to click a button on a website but its not working for some reason. I've used this code on another site but the html code doesnt look the same. Here's the HTML Code <input type="submit" onclick="return fnbValidateLogin()" value="Login" name="Login"> Here's what i Tried theElementCollection = WebBrowser1.Document.GetElementsByTagName("input") …

Member Avatar for codeorder
0
261
Member Avatar for bettybarnes

hi can anyone please help me with the codes in search stored procedure.. for example.. i have combobox which lists lastname, firstname, pt_id, (the choices if i want to search for a particular record) i forgot the code for search T.T

Member Avatar for bLuEmEzzy
0
103
Member Avatar for strungoutfan78

Hey everyone. I'm brand new to C++ and programming in general and this is my first post here. I've found lots of good info here and these forums helped me a lot last semester. I've got a problem here though. This is a small bit of code I had to …

Member Avatar for strungoutfan78
0
399
Member Avatar for SavnetSinn

Hey all. I'm in the process of learning Java in my spare time, and I've bumped into a problem that I'm having a hard time wrapping my head around. I'm writing a small game (currently little more than an animation) involving a handful of blocks moving on-screen. I've created a …

Member Avatar for SavnetSinn
0
4K
Member Avatar for eikal

Hi guys, my program im working on ends when it shouldnt..... here's the main method. [code] public static void main(String[] args) { String answer; do { boolean whole=false; boolean whole2=false; Scanner sc = new Scanner(System.in); int one=0, two=0; do { try{ System.out.print("Enter the first whole number: "); one = sc.nextInt(); …

Member Avatar for ztini
0
153
Member Avatar for MaDo4

Hi, I have an assignment where i'm supposed to read from a Input File and save it to an output file. The final expression should only contain alphanumeric characters. The code that I have so far gives me both symbols and alphanumeric characters. I was wondering if anyone saw anything …

Member Avatar for MaDo4
0
182
Member Avatar for kra9853

The function Generate_And_Display_Bill() has no formal parameters and returns a variable of type float. The function generates a random number between $0.01 and $99.99 and returns the value to main(). This is what I've created so far in my function declaration; [CODE]#include <iostream> #include <ctime> float Generate_And_Display_Bill() { float Random_Bill; …

Member Avatar for kra9853
0
168
Member Avatar for techningeer

I am using the CodeLite IDE. I compiled the following program using CodeLite (It is a C++ program): [CODE]#include <iostream.h> int main() { cout << "Hello World\n"; return (0); }[/CODE] It returns this message: g++ -c "/home/keagan/.coding-work/Hello/printamessage.cc" -g -o ./Debug/printamessage.o "-I." "-I." /home/keagan/.coding-work/Hello/printamessage.cc:1:23: error: iostream.h: No such file or directory …

Member Avatar for techningeer
0
398
Member Avatar for Zolcos

This is on my Gentoo box. Recently, a MySQL upgrade seems to have broken my UDFs, specifically those in lib_mysqludf_preg. I first noticed errors like: FUNCTION tablename.PREG_RLIKE does not exist I figured, OK, I must have to reinstall them. I try the config command for lib_mysqludf_preg and get this: ERROR …

Member Avatar for smantscheff
0
749
Member Avatar for crapgarden

[B]QUESTION 1[/B] In this line of code, I get that it's using the date/time to seed the code for a more random number each time, I'm just wondering what the < > operators are doing? [CODE]srand(static_cast<unsigned int>(time(0))); [/CODE] I realize, they're making time into an unsigned int, but why not …

Member Avatar for pseudorandom21
0
467
Member Avatar for LKMaxwell

All, I’m new to C++ and trying to figure out the best way to do a multidimensional array of pointers to a class. The code I am presenting demonstrates several questions I had and am hoping to get some help with each question. The basic idea is to create myMatrix, …

Member Avatar for pseudorandom21
0
240
Member Avatar for LizAE

Hi! Just a quick question: I am using "Website Tonight" to redo a site for my boss. He wants a "floating TOC" on one page. So, when you scroll down the ridiculously long page, the categories on the righthand side move with you. (I wouldn't mind that, but I'd prefer …

Member Avatar for LizAE
0
188
Member Avatar for ptara1

I'm trying to search a mysql table column for a number. However when I enter a number into the search form I get told that no query has been entered. Here is my code. Database connection information left out on purpose. [CODE] <?php if(isset($_POST['submit'])){ if(isset($_GET['go'])){ if(preg_match("/^[ a-zA-Z]+/", $_POST['search'])){ $search=$_POST['search']; $db=mysql_connect …

Member Avatar for smantscheff
0
79
Member Avatar for vbx_wx

I have a sockets projects using tcp/ip and it is structured like this: [code] class Socket { int desc; Socket(); // create socket here }: class TCPSocket: public Socket { public: int send(); int recv(); }; class ClientSocket: public TCPSocket { public: void connect(); }; class ServerSocket: public Socket { …

Member Avatar for vbx_wx
0
168
Member Avatar for mitrious

In the book I'm studying we are given a function to make rand() work for numbers that are smaller that RAND_MAX [CODE] int nrand(int n){ if(n <= 0 || n > RAND_MAX) throw domain_error("Argument to nrand is out-of-range"); const int bucket_size = RAND_MAX/n; int r; do r = rand()/bucket_size; while(r …

Member Avatar for pseudorandom21
0
1K
Member Avatar for carlitosway17

I am trying to create a grade book form using the following class createfileform.cs I keep getting the following errors [COLOR="Red"]1:The name 'GetTextBoxValues' does not exist in the current context 2.Cannot implicitly convert type 'string' into 'int' [/COLOR] Here's My Code.[CODE] // Fig. 18.9: CreateFileForm.cs // Creating a sequential-access file. …

0
78
Member Avatar for RenanLazarotto

Hey people! I've saw many many times lots of custom controls, so I decided to build mine. I just don't know how :$ what do I need do to do to build a custom listbox control? Thanks!

Member Avatar for RenanLazarotto
0
1K
Member Avatar for carlitosway17

Hi I am New to C# i Am trying to create a grade book form but I cannot build successfully because of the following error. [COLOR="Red"]The name 'InitializeComponent' does not exist in the current context [/COLOR] [code] // Fig. 19.7: GradeBook.cs // A reusable Windows Form for the examples in …

Member Avatar for carlitosway17
0
2K
Member Avatar for TheIdiot

I am wanting to create an online attendance sheet that would allow users to log on and use check boxes or option buttons for twelve weeks corresponding to wk1, wk2, wk3, etc... I have no problem retrieving the members of the group (records from db) but do not know how …

Member Avatar for shdwmage
0
128
Member Avatar for rajeesh_rsn

Hi Friends , I got a row in my table like follows date | Name | id -------------------------- 22-August | Ram | 15 14-July | Krish | 17 14_March | Anwar | 145 --------------------------- I want to sort this with date ie, 14-March 14-Jusy 22-August Using both date and month …

Member Avatar for d5e5
0
114
Member Avatar for carlitosway17

Hi Am currently taking a Java class and we are supposed to use turtle graphics to draw the following shape rectange made of Asterix ************* * * * * * * * * * * * * * * ************* My program builds and compiles successfully but I cant get …

Member Avatar for carlitosway17
0
258
Member Avatar for tottletj

Basically I have a long list of numbers, that are never greater than 999999, and never have more than 2 decimal places, ie, most numbers look like 123456.78 But I have several numbers in this list that are less than 100000, or have only 1 decimal place, or both. One …

Member Avatar for Gribouillis
0
161
Member Avatar for beejay321

[CODE]// ---------------------------------------------- // Name: William Rennie // Program: // Description: // ---------------------------------------------- #include <iostream> #include <cstdlib> #include <stdio.h> #include <string.h> using namespace std; // ----------- Function definitions ------------- void printTitle(int gamenumber){ gamenumber++; cout<<"***Word guessing game round "<<gamenumber;} bool checkWord(char word[],char guess[]){ int i; int x=strcmp(word,guess); if (x==0){return true;} else return …

Member Avatar for Moschops
0
229

The End.