199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for blackrobe

Hey, I'm studying for a final exam and I came across an old question asking to give an algorithm that runs in [TEX]O(logn)[/TEX] and deletes an arbitrary element from an [TEX]n[/TEX] element [B]Min-Heap[/B] if given its index. I was thinking the right approach would be to use Hash table for …

Member Avatar for blackrobe
0
675
Member Avatar for Darkicon

I'm working on a program that allows me to quickly write database entries. There are 123 columns, almost all of them I'm not using right now so I figured I'd write a program to speed up the process of adding entries to the database. The problem I'm having is exporting …

Member Avatar for GeekByChoiCe
0
173
Member Avatar for Arkinder

I recently had an assignment that asked us to restrict the amount of characters a user can enter for his or her name. My professor said this is useful in the event that your program is being "attacked." The simplest solution was to use C strings: [CODE]#include <iostream> const int …

Member Avatar for Arkinder
0
6K
Member Avatar for MadeleinePV

Hi all, I've got a class which I would like to hold a stream used for logging. The stream should be able to be set (and possibly reset) after the construction of the object. It should be possible to set the stream as std::cout, or as a file stream to …

Member Avatar for mrnutty
0
973
Member Avatar for rjstamey

I was wondering if there is a way to make it so that someone can only input a specific data type. My program ask for input of specific numbers for a menu. If I enter a character, the program crashes. Is there a way to make it so that it …

Member Avatar for WaltP
0
107
Member Avatar for Jameske

So I have written some code which reads a file line by line, breaking each line into characters and storing into a multidimensional array. However the program freezes and crashes at lines 31-34. When debugging the code runs successfully through the for loop once, then fails at 32 the second …

Member Avatar for Jameske
0
216
Member Avatar for wmurrow

I have to count the number of records being read in and print them to the screen. A record consists of: website name (temp.url), website revenue (temp.rev) and website hits (temp.hits). These are all read in and returned as temp. For the life of me though, I can't figure out …

Member Avatar for wmurrow
0
110
Member Avatar for jetlife76

I have a program that simulates the Powerball Lottery game, i have been working on it for weeks now. My issue is with the quick pick option. when the quick pick numbers match the winning numbers it doesn't show the matches. If the user enters the numbers manually it does. …

Member Avatar for jetlife76
0
332
Member Avatar for maxxxx

I have this form, and I want to add JS to it. I got part of it. But the hard part is the ordering menu part it's self. Can someone help me please? [CODE]</p></td><td width="359" align="right"><table width="325"> <tbody> <tr> <th width="144">item</th> <th width="75">price</th> <th width="92">quantity</th> <th width="101">sub-total</th> </tr> <tr align="middle"> …

Member Avatar for maxxxx
0
81
Member Avatar for Phasma

[B]Read a CSV file into a DataGridView[/B] [CODE]'12/4/2011 'Code to read CSV file with headers using 'ACE.OLEDB.12.0 Connection 'The following is a Sampling of <EXTENSION.csv> 'The CSV file contains all the Extension on my Desktop Computer 'The full file has 923 Rows with Headers: 'EXTENSION,DESCRIPTION,EXECUTABLE_PATH '.mde,Microsoft Office Access MDE Database,C:\Program …

Member Avatar for Phasma
0
1K
Member Avatar for slbreaul

Hello :) I'm working a project for class that involves a database connection. I have an Acess database called "Libraries" that contains two tables called Libraries and Books. I have to create a form that has two DataGridViews(one that contains the Libraries and their ID #'s, the other that has …

Member Avatar for Reverend Jim
0
76
Member Avatar for stereoworld

Hi Guys, Hope you can help me with this little conundrum I'm having currently. My company has a dedicated windows server with heart internet and for means of database interaction, we've been forced to move one of our php sites to there. Everythings great and works fine - except the …

Member Avatar for stereoworld
0
1K
Member Avatar for jacob21

I am using TinyMCE textarea. Which will be formatted text How I can insert that formatted text into table (database) as well as print value that I have inserted (formatted text) ? [CODE] mysql_query("insert into emailtemplates (name, messagebody, status) values('".$_POST['frmname']."', '".$_POST['content']."', $status)") [/CODE] [B]where $_POST['content'] is my textarea[/B]

Member Avatar for stoopkid
0
231
Member Avatar for NoUserNameHere

Not getting any compile error, but I'm getting an output that looks like: -858993460 5 4 3 2 Instead of 5 4 3 2 1. What am I doing wrong? [CODE]#include <iostream> #include <stack> using namespace std; template <typename T> void reverse(stack<T> &sk) { stack<int> tempStack; while(!sk.empty()) { tempStack.push(sk.top()); sk.pop(); …

Member Avatar for tharumax
0
101
Member Avatar for flendernik

Hi! Can anyone please tell me where my mistake in this is? The information from the list has to be transferred to the tree. But only the first element is copied. [CODE]#include<iostream> #include<string> using namespace std; struct Person{ char first[30], last[30]; }; struct aList { char adr[30]; Person name[30]; int …

Member Avatar for flendernik
0
137
Member Avatar for polinolin

hi mate. i have problem about REGEX this is my simple code [CODE]<?php $teks="hi whats up? how are you?"; $replace=preg_replace("/(you)/i",'<span style="background:yellow;">\1</span>',$teks); echo "$replace"; ?>[/CODE] what the mean \1 ? its not give effect for my text.. if i change the value to \2, the text has change.. thanks mate!

Member Avatar for diafol
0
87
Member Avatar for junchronick

Good day! I was writing a code that will compute the salary of each employee on our school depending on their position using a FileReader(File Handling). I only managed to do this code and don't know how to start again [CODE] import java.io.*; import static java.lang.System.out; public class admin { …

Member Avatar for hfx642
0
119
Member Avatar for apanimesh061

Is Optical Character Recognition a good example/application of Data Mining techniques ? or Should Data Mining be applied mainly to web research/web tools ??? Could you please give me more examples on Data Mining that could make a good project if OCR is not good ??!! Thanks ! :)

Member Avatar for sufyan2011
0
431
Member Avatar for stevemag

Hello, I'm trying to write a code to check if two strings are anagrams. i have already figured out a code but I can't get it to work for words of different cases and words with whitespace. I would really appreciate any input Thank you! Here is what I have …

Member Avatar for stultuske
0
316
Member Avatar for Ambitious girl

hi how are you gays in java i have question about constructors , i just starting learning java since few weeks [COLOR="Red"]how i can define string in construtor using one argument ..[/COLOR] how many constructors are there in the string class >? how i can count the number of words …

Member Avatar for NormR1
0
105
Member Avatar for popsyjohnson

hello to all my program creates a boolean for mailing and outputs "i brought my ride " when it is false i.e the customer will not like his purchase to be delivered and outputs "your purchase will be delivered " if it is true...... my problem is it outputs your …

Member Avatar for hfx642
0
122
Member Avatar for GAiXz

GOOD DAY .NET PROGRAMMERS!! ^_^ [URL="http://www.daniweb.com/forums/attachment.php?attachmentid=23184&stc=1&d=1323465600"]http://www.daniweb.com/forums/attachment.php?attachmentid=23184&stc=1&d=1323465600[/URL] I'm having a problem with SMS APPLICATION "see the picture"? when i click the SEND button after typing the number of the recipient and the text messages it's not responding same as the LOAD button and nothing happens after that so i have no …

0
107
Member Avatar for Brian_L

In my program, I used a vector to store the file. The file contains the data (see below). Do I need to create two vectors to store the data below as integers and strings? Or is there a shorter way to do this, and just allow the user to enter …

Member Avatar for Brian_L
0
99
Member Avatar for Psyho

Hello all. I have a bit of a problem. I have a few php pages all encoded utf-8. A MySQL database, where it is possible to have characters like: 'á'é'ú'Å‘'ü' and so on, i have set with phpmyadmin to be utf8_hungarian_ci character encoding. Funny thing is, that when I write …

Member Avatar for diafol
0
306
Member Avatar for dan420

Hello, I have a table with 10 rows. each row has 3 columns. column1 is product name column2 is a drop down box with values from 1to10. column3 is a check box. When the checkbox is checked I would like to get the entire row value (product name, quantity) Can …

Member Avatar for diafol
0
169
Member Avatar for Kuroshi

I get this compiler error: `Monster' was not declared in this scope, in this code: [CODE]#ifndef ROOM_H #define ROOM_H #include <stdio.h> #include <stdlib.h> #include <time.h> #include <vector> #include <iostream> #include "Monster.h" using namespace std; const int ROWS = 20; const int COLS = 20; class Room { private: vector<int> indexes; …

Member Avatar for VernonDozier
0
127
Member Avatar for mana_panigrahi

Hi, I am trying to call a function by "onclick" event of the button. When I do that it shows error message. Can anybody help me out on this so that when I click on the button it should call the function and execute it. My code looks like: -------------------------- …

Member Avatar for john_lane
0
14K
Member Avatar for niggz

Hello masters! I have a project and need a bit of your help. I would like to access/get values from certain fields from a database and assing that value to a variable. Database is included into my project along with DataSet. Is there any simple way to access certain field? …

Member Avatar for thines01
0
213
Member Avatar for Valociraptor

I am attempting to create a sorted array for a class assignment but I am receiving a weird access violation error in my debug code. I have double checked all my values and nothing is accessing anything out of range. My code is below. Thanks. [code=c++] #include <iostream> using namespace …

Member Avatar for Schol-R-LEA
0
224
Member Avatar for CodeAdmiral

For a school project, I am trying to make a program that gets user input and finds the factorial of the input. I wrote this bit of code and got tons of errors. Help, anybody? [CODE]import javax.swing.*; import java.awt.*; import java.io.*; import java.util.*; class TestFactorial { public int x = …

Member Avatar for thines01
0
255
Member Avatar for oldezwe

I am attempting to take 2 integers from a MySql table. X represents a number that will be stored into an array. Y represents the number of times that X will be put into the array. I am attempting to make a loop that will go through, find all the …

Member Avatar for Ezzaral
0
236
Member Avatar for Aamit

Hi, I am trying to upload file and save data to DB. IN File only 10 row and 5 column data.(normal sample data) File has only 24.0 KB (24,576 bytes) I am using..reader.php and oleread.php to upload file But It taking More than 650MB memory (681574400 bytes) Is any [B]other …

Member Avatar for diafol
0
161
Member Avatar for Kuroshi

I am experiencing problems with this function: void move (Room&); For some reason the compiler is saying that this is a variable or field, here is the implementation: [CODE]void Monster::move (Room& room) { vector<int> iCoordinates; vector<int> jCoordinates; for (int i = x - 1 ; i <= x + 1 …

Member Avatar for Kuroshi
0
328
Member Avatar for C# HELP

need major help on a address book in c# using strings that does the 5 stages below preferably code help required. 1 Add Entry 2 Delete Entry 3 Print Book to Screen 4 Edit a Record 5 Search for a record using either Surname, Firstname or Road Name

Member Avatar for thines01
0
576
Member Avatar for harsha.netpem

Hi, I want to select multiple option using check boxes(all values of checkboxes are come from database 1 ) and insert into the particular table in other database using php form.

Member Avatar for diafol
0
223
Member Avatar for Rass Saee

[CODE]using System; using System.Collections.Generic; using System.Text; class BaseClass { public virtual void method() { Console.WriteLine("BaseClass method"); } } class SubClass : BaseClass { public override void method() { Console.WriteLine("SubClass method"); } public void someMethod() { Console.WriteLine(); } static void Main(string[] args) { BaseClass var = new SubClass(); var.method(); var.someMethod(); } …

Member Avatar for arunkumars
0
104
Member Avatar for jerrinfive

i have two tables in a single database sales... one is product other is order... i want someones help to know how can i do one operation.... i.e when i click on order i want to subtract that one order from the product table.... can u help me with the …

Member Avatar for qazplm114477
0
121
Member Avatar for sk8ergirl

I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 …

Member Avatar for NormR1
0
506
Member Avatar for sk8ergirl

I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 …

Member Avatar for NormR1
0
707
Member Avatar for ahmedshayan

I am in desperate need of help... I were to create Operating System's Shortest Job First Preemptive Algorithm .... The problem is that I am not getting how to calculate the average waiting time of each process... HELP ! SJF.java: [CODE] import javax.swing.JOptionPane; import java.util.*; public class SJF { int …

Member Avatar for Ezzaral
0
3K
Member Avatar for djbrown

As a newbie at 63, I have learned how to build an SQL database from scratch, interrogate it and present results, but I just cannot wrap my bhead around the following issue. I am in the process of constructing a site that will return a list of suppliers to a …

Member Avatar for diafol
0
239
Member Avatar for EXpoZuR

My program needs to take the first 5 numbers from a file, sort them and print them out. Then take the next 5 numbers and sort just those 5 numbers and print them out. However, when I try to sort them independently it is sorting them all together as if …

Member Avatar for EXpoZuR
0
103
Member Avatar for towerrounder

Hi all. I come from an MS SQL background and a newbie in MY SQL. Im trying to run a simple query to populate a table: [CODE]Declare @I As Int Select @I = 1 While (@I < 100) Begin Insert into tbWhatEva Select @I Select @I = @I + 1 …

Member Avatar for towerrounder
0
212
Member Avatar for dancks

I haven't coded something this complex in C++ before and I haven't had time to really review. I'm making a game (well, foundations for a game anyway), with an external game library, Allegro. But I think the problems I'm having is more fundamental to C++ in general. Included is a …

Member Avatar for dancks
0
301
Member Avatar for jpherrera241982

Need help writing psuedocode for the following question The local driver's license office has asked you to design a program that grades the written portion of the driver's license exam. The exam has 20 multiple choice questions. Here are the correct answers: 1. B 2. D 3. A 4. A …

Member Avatar for sufyan2011
0
340
Member Avatar for newbie14

Dear All, I am inserting a string value into my mysql db which had apostrophe with no problem because I do this when inserting. [CODE]String cleanMessage = oriMessage.replace("'","\\'");[/CODE] The problem when I try to read from the same table I tried like this [CODE]level2[0] = level2[0].replace("'","\\'"); String queryCheck = "Select …

Member Avatar for thines01
0
189
Member Avatar for Panathinaikos22

Hello, i want to ask, messing words in array is a good way to encrypt data? or can someone very easy to brake it here is an example [CODE] #include "stdafx.h" #include <fstream> using namespace std; // Decleration for functions void EncryptFile(char c[], int key1, int key2); void DecryptFile(string filename, …

Member Avatar for VernonDozier
0
390
Member Avatar for EXpoZuR

I have to read numbers from a .txt file and sort them. I am trying to use selection sort. The .txt file looks like this: 3 33.3 92.5 4.5 6.29 5.3 94.3 -7.455 4.66 -9.33 -211.2 .03 .12 0.34 4.83 2.494 I am now working on the first 5 numbers …

Member Avatar for EXpoZuR
0
219
Member Avatar for gourav1

let an integer say, x=0xffffff0; when i shift left 4 positions in it.it got negative. x=x<<1; doing this 4th time,number got negative. please tell why it is so.

Member Avatar for JamesCherrill
0
311
Member Avatar for Ahmed2

Hello every body I'm trying to iterate through a list for a certian number of times using a for loop. below is the current code I've written, but this will iterate through the list until it ends. [CODE]list<FileInfo*>::iterator p = currentlist.begin(); while(p != currentlist.end()) { cout << (*p)->remainingtime << " …

Member Avatar for Schol-R-LEA
0
2K

The End.