199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for emko

Hi, I need to make a program that counts the frequency of characters in a file, then outputs how many times each character appears in it. I am trying to make a class for it, but I am having difficulties figuring out how to do the definitions for each method. …

Member Avatar for mrnutty
0
258
Member Avatar for jamesonh20

So even though this is a simple project, I found a lack of good code on the web under this topic for multi lined strings. I thought I would share it with everyone. Hope it helps you! Prints file foward first, then in reverse (and yes there are many different …

Member Avatar for jasimp
0
176
Member Avatar for TySkby

I am calling a function in PHP that should return values from a database that I have set up. However, I'm getting a blank screen instead of what I'm asking for. If I comment the correct lines out and process it without the function, everything works perfectly. I've posted both …

Member Avatar for TySkby
0
133
Member Avatar for cogitoergosum18

hello, i need to write a program that computes an equivalent resistor value if it is in either series or parallel . (in c++). how will i write this in c++ : [TEX] R_\mathrm{eq} = R_1 \| R_2 = {R_1 R_2 \over R_1 + R_2} [/TEX] (parallel) [TEX] R_\mathrm{eq} = …

Member Avatar for mrnutty
0
141
Member Avatar for aaronmk2

I am getting this error message error: expected primary-expression before 'enum' I can't figure it out. [CODE] #ifndef ROCK_H #define ROCK_H enum RockName {BASALT, DOLOMITE, GRANITE, GYPSUM, LIMESTONE, MARBLE, OBSIDIAN, QUARZITE, SANDSTONE, SHALE, ROCK_OVERFLOW}; class Rock { public: Rock() {myName = BASALT;} Rock(enum RockName) {myName= RockName;}//here is where I am …

Member Avatar for mrnutty
0
140
Member Avatar for prettyrein

Hi, I am also having an ONLINE ENROLLMENT SYSTEM and having a problem with coding.. I am a returnee student and more programming languages has been adapt... Using php, apache, mysql, html, javascript, css etc... I am confused especially in php query.. can anyone help me here, i don't have …

Member Avatar for Stefano Mtangoo
0
176
Member Avatar for smittles

I am brand-new to Python, and this is my first post on DaniWeb. Seems like a positive community, and I hope one day to contribute as a knowledgable expert and not a world-class newbie. I'm wanting to create a simple python program that "fakes" Shakespeare or haiku-style output. I realize …

Member Avatar for TrustyTony
0
187
Member Avatar for dragonshadow001

Hello, I'm really new to doing Java only been doing it about 2 month so really a novice. I'm currently attempting to make my first app that is not a school project. I want to embed the current time in my application that is pulled from the local system. It …

Member Avatar for Ezzaral
0
371
Member Avatar for tomtetlaw

When I run this code, the variable s has MZ as the first 2 characters, I never put them there, I don't know how they got there. I think it might have something to do with strcat, does strcat modify the source paramater at all? [code=c]void Con_Draw() { int i; …

Member Avatar for Narue
0
173
Member Avatar for Iam3R

[CODE] #include<stdio.h> #include<stdlib.h> #define MAX 5 char queue[MAX][30]; int front, rear, temp; void init() { front = -1; rear = -1; } void insert() { if ( rear >= MAX-1 && front == -1 ) { printf("\nQueue overflow"); return ; } temp = rear; rear = ( rear + 1 …

Member Avatar for tirath9792
0
350
Member Avatar for ihatehippies

Is there a way to set an objects id or memory position? Ultimately I'm trying to change function "a" to function "b" while still preserving any saved reference to function "a"

Member Avatar for ihatehippies
0
169
Member Avatar for shandow

Hi, I'm trying to make my own sokoban game in java. Sokoban is a top down 2D puzzle game where you move around a level trying to push boxes to the goal area in the least possible moves. I'm already pretty stuck at an early stage. My first objective it …

Member Avatar for adams161
0
422
Member Avatar for reemhatim

please could anyone do this program i am a beginner in c# and i need help can u do a program in which the user can enter two words and get the unrepeated letters between two words example computer program output will be cute please c# syntax. thnx

Member Avatar for reemhatim
0
148
Member Avatar for dustbunny000

Is there a logical operator in python for and/or of strings? I am trying to write a weasel code. What I have so far: [CODE]import random import math keys='abcdefghijklmnopqrstuvwxyz ' monkey='methinks it is like a weasel' def attempt(): attempt='' for i in range(len(monkey)): x=random.choice(keys) attempt+=x return(attempt) library_attempts=[] for i in …

Member Avatar for TrustyTony
0
102
Member Avatar for lse123

NETBEANS: I get none ouput - can you detect? I have a question about server side Ajax (Java) I think serverside error is, Can you find the bug in <div> I do NOT get sample xml data[bookrss.xml]... RSS Client/Server? I get xhrequest.readyState == 4 && xhrequest.status == 200 ... 4 …

Member Avatar for hielo
0
205
Member Avatar for akvlko

Hi Friends! Can you people help me out about this I have Two Array's 1: a[] =>1 =>3 =>4 2: b[] =>5 =>6 =>8 and I want to combine both array like this c[1]=5 c[3]=6 c[4]=8 Means the value of first array will be the Index of Third array and …

Member Avatar for baltazar
0
152
Member Avatar for techie929

Hi, I am repeatedly getting "missing ) after argument list" in firefox. hash_a is a variable. $("#details_a").append("</br>"+"Enter Name "+"<input type='text' id='myText' />"+"<input type='button' id='theSubmitButton' value='Edit Name' onclick='edit_data("+hash_a+")''>"); Thanks.

Member Avatar for Taywin
0
177
Member Avatar for festprabu

<?php $allsql="SELECT SUM(Salesprofit)+SUM(Serviceprofit)+SUM(softwareprofit)+SUM(Airtelprofit) FROM billing,service,software,airtel"; $profitall=mysql_query($allsql) or die(mysql_error()); while($row=@mysql_fetch_array($profitall)) { echo $row['SUM(Salesprofit)+SUM(Serviceprofit)+SUM(softwareprofit)+SUM(Airtelprofit)']; } mysql_close($con); ?> Hi everybody.... i have problem in mysql query.. i got the sum for the field called profit from each table... i am getting the TOTAL value as wrong calculation value... how do i get the …

Member Avatar for digital-ether
0
127
Member Avatar for pgset

i just need a method that will draw me a flower but it says illegal start of expression error on line 36. what does that mean and how do i fix it? import java.applet.Applet; import java.awt.*; public class ProjectTwo extends Applet { public void paint(Graphics g) { ///background g.setColor(Color.blue); g.fillRect(0,0,1366,384); …

Member Avatar for adams161
0
149
Member Avatar for dustbunny000

Hi there. I am trying write a module that can be executed at the command line and for some reason it's not working. Does anyone know why? [CODE]import sys def fibonacci(N): a,b =0,1 while b < N: a,b = b, a+b print b N=sys.argv[1][/CODE] Does it matter that I'm running …

Member Avatar for TrustyTony
0
95
Member Avatar for breisa

Is there a function in VB.net that allows me to divide a really long String into a specific number of characters? For example: MyString= "Hello man! Wazzup?" group1="Hello " group2="man! W" group3="azzup?" The length of this string is 18 and I'd like to group it by 3, so each group …

Member Avatar for lolafuertes
0
1K
Member Avatar for pythonbegin

Dear All I am working with a tab-delimeted files - first two columns are pairs of identifiers and third column is floating point number (0-1) denoting interaction strength between colmn1 and 2. sample file is also attached. eg- column1 column2 column3 john steve 0.67588 john matt 1.00 red blue 0.90 …

Member Avatar for TrustyTony
0
104
Member Avatar for charqus

Hello guys. I want something like this. [CODE] if(getdate(month) == 1 && getdate(day) == 5) // 5 January // do code else if(getdate(month) == 12 && getdate(day) == 11) // 11 December // do another code // ... [/CODE] Is that possible ?

Member Avatar for CloneXpert
0
120
Member Avatar for aizel

hello daniweb web developers i am beginner with programing and i want to know how to make this one..if i select a item for example CA on <select box> how to put a confirmation message that will be put in the <div> tag? i'm hoping you could help me sir..regards …

Member Avatar for aizel
0
100
Member Avatar for justsimplenick

I'm just starting out in java, and I am totally stumped on this assignment. I have to make a program where the user selects a single character and then a file. The program is then supposed to check each character in the file, and output how many times that character …

Member Avatar for NormR1
0
94
Member Avatar for parrishnewbie

#include <iostream> #include <string> using namespace std; int main() { //Declaring values. string oneWord, twoWord, threeWord, fourWord, fiveWord, fullWord; //Assigning values oneWord = "One"; twoWord = "Two"; threeWord= "Three"; fourWord = "Four"; fiveWord = "Five"; // Now we will define the full word fullWord = oneWord + ", " + …

Member Avatar for Fbody
0
102
Member Avatar for shahreza

i got a question about random number.. this is my sample data : jenny jason jerry peter chriss wayne ralf andre alexis alex garcia lorris ronny lyn armand i wanna pick name above to put in free slot like below.. 1.. 2.. 3.. 4.. 5.. 6.. 7.. - - - …

Member Avatar for NormR1
0
111
Member Avatar for kezkez

Question is below for the TestSlotMachine. SlotMachine class... [CODE] import java.util.Random; import java.text.NumberFormat; public class SlotMachine { enum CoinSlot { penny, nickel, dime, quarter; } //private String typeOfMachine; public double balance; SlotMachine() { // typeOfMachine = machineType; balance = 0.0; } public double deposit(double amount) { balance = balance + …

Member Avatar for kezkez
0
163
Member Avatar for ayoitzrimz

Hello all, I am having an issue with ifstream. Short explanation: 1. I ask the user for the filename and read it via cin 2. I store the input in a c++ string 3. I use the input as the filename Here's where it fails: When a user enters something …

Member Avatar for VernonDozier
0
249
Member Avatar for 5416339

Hello Everyone, I made a GET form recently.But the problem is that it is highly vulnerable.You can inject your an script as below. http://mysite.com/processget.phtml?search=<a href="http://google.com">Hacked</a> I'm able to inject any kind of script into my above URL.I'm actually echoing my GET data using an echo in my BODY,so whenever i …

Member Avatar for baltazar
0
153
Member Avatar for binoo0324

I'm a beginner (3wks into C++) Payroll program is due in 1hour. I can't figure out what is wrong with my program. it compiles, builds, and runs but when I enter the name, it goes straight to the end of the program. heres the code <code> #include <conio.h> #include <iostream> …

Member Avatar for burcin erek
0
292
Member Avatar for virusisfound

Hi, I am working on a project in that I want to dispaly the avablible quantity from database. I have write some code for that code is working. but It display entier data from frist row to last. I want to display only particular item avaliable quantity. can any one …

Member Avatar for hassan12345
0
152
Member Avatar for Mindazz

Hello. Can somebody help me please to remove blank lines from listbox? And remove specified text from listbox (text line that i can specify in form code(But if i specify to remove line something like "http://www.google.com/" it will remove the line "http://www.google.com/" but doesn't remove line "http://www.google.com/chrome/" etc ). Please …

Member Avatar for Mindazz
0
509
Member Avatar for brieghz23

Can anyone help me? i'm looking for a [U][B]Point of sale system[/B][/U] that is made in [B]Visual Basic?[/B] . . please help me find it sir/ma'am. Thank you.

Member Avatar for campuzcrazyness
0
168
Member Avatar for jrock2004

Ok so I am writing a PHP script that will gather some information into a file and the push it up via SVN. I am running into a problem with pushing it up via SVN. [CODE=php] shell_exec("svn commit -m $message store-webapp-test-selenium-$storeCode --password $svnPassword"); [/CODE] I have even tried it like …

Member Avatar for digital-ether
0
139
Member Avatar for yopirates

Here in the second tab i have a submit button .when i enter some value in the textfield of second tab(tab2) and give submit its again going back to first tab(tab1) .What i want is after i click submit in tab2 it has to be in tab2 oly.It has to …

Member Avatar for yopirates
0
1K
Member Avatar for segiboy

[B]Hello, I want to search data through multiple drop down, using different tables in database just like if user want to search "data" field recode then he select Normal Resumes (radio button) and select drop down for search and same thing i want in "special" table in database.. i have …

Member Avatar for segiboy
0
131
Member Avatar for |hex

ive been able to make this simple else if statement work, the problem is, i keep getting the same message when i call the showcase. i want the user to enter a name or object after the word 'show', if they dont, i want a mesage to display stating so. …

Member Avatar for Fbody
0
178
Member Avatar for parrishnewbie

Hi everyone, I am very new to C++ I have never done any type of programing also. I am really having a hard time learning how to write programs. I am using a book called C++ programming by larry ullman and Andreas Signer. The problem is I am following the …

Member Avatar for Fbody
0
152
Member Avatar for iammirko

Hi, I am trying to execute the following script, but each time it is failing and returning "Unable". Note: "Unable" is the response returned when isset($_POST) is not working, refer the code for more details. [COLOR="red"][B]PHP CODE[/B][/COLOR] [CODE]<?php $test = "Hi!"; if ((isset($_POST['usrName'])) && (isset($_POST['pWord']))) { $user = $_POST["usrName"]; $pass …

Member Avatar for iammirko
0
448
Member Avatar for ekSquall

Hi, I have populated a dropdown menu using php pdo from sqlite database. How would i go about reading what the user has selected in the dropdown menu. so i can do something like: $userSelected = [whatever user selected in the dropdown menu]; my code is as follows (part of …

Member Avatar for hielo
0
590
Member Avatar for daniel955

[URL=http://img690.imageshack.us/i/12946613.jpg/][IMG]http://img690.imageshack.us/img690/7592/12946613.jpg[/IMG][/URL] why is there a hole in my cube when I rotate it like this? colors: front side is red back side is white left side is blue right side is green top side is yellow bottom is teal

Member Avatar for daniel955
0
154
Member Avatar for DeadSoul

i have made this code which displays all the values in JTable can any one help me out how to get report of those data.this code is just the module of my library project .Now i want to generate a report for it . [CODE] import java.awt.*; import java.awt.event.*; import …

Member Avatar for Ezzaral
0
103
Member Avatar for duke_swh

I have a table in SQL Server with the following structure: DateRated, Parameter, Rating, UserID Sample Data DateRated Parameter Rating UserID 10/01/2010 Flexibility Good User101 10/01/2010 Efficiency Average User101 10/01/2010 Value For Money Below Average User101 I want to create a query that will make it like this: DateRated Flexibility …

Member Avatar for duke_swh
0
258
Member Avatar for dannynez

i get this Warning: Cannot modify header information - headers already sent by (output started at c:\appserv\www\conectarse.php:2) in c:\appserv\www\conectarse.php on line 61 and this warning happen in line 58 - header("Location: ".$MM_redirectLoginSuccess); and in line 61 - header("Location: ".$MM_redirectLoginFailed); pls i need somebody help me to resolve this this is …

Member Avatar for pzuurveen
0
130
Member Avatar for buster2209

Is it possible to search for a term within a string and output the result either 1 (True) or 0 (false)? e.g; [CODE]string str = 1234567890 if (str.contains = "456") { MessageBox.Show("True!") } else { MessageBox.Show("False!") }[/CODE] I know I can search for [I]individual[/I] chars but I want to be …

Member Avatar for buster2209
0
112
Member Avatar for dxmedia

VB.NET 2008 - Get Desktop Icons Text Width & Text Height I am developing an application in VB.NET 2008, in which I try to get Desktop Icons Text Width & Text Height. So far I have obtained all desktop icons positions, but I really can't figure by myself how to …

Member Avatar for dxmedia
0
416
Member Avatar for AngelicOne

Unlike web programming, radiobutton needs to be group by a groupbox, panel etc. and that's what i'm confused at. I have two radiobutton that is 'yes' and 'no', what I want is to determine what object to declare in parameters used for the two to get its value. My code …

Member Avatar for mshauny
0
153
Member Avatar for muze

hello guys...I want to learn the above mentioned topic. Can you suggesst some book or forum to learn this?? thanx

Member Avatar for Ancient Dragon
0
124
Member Avatar for tomo_uni

I want to retrieve dates between two dates the user has specified e.g. say the user enters the dates 01/10/2010 amd 05/10/2010 i want to be able to get the dates inbetween the dates entered by the user e.g. 02/10, 03/10.... What possible way is there to do it? Thanks …

Member Avatar for tomo_uni
0
159

The End.