64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for daviddoria

Is there a way (without overloading) to call a function like this [code=cplusplus] GetValue("one"); //AND std::string test("one"); GetValue(test); [/code] The function is simply: [code=cplusplus] int GetValue(const std::string &MyString) { return MyMap[MyString]; } [/code] This overload does the job: [code=cplusplus] int GetValue(const char* MyString) { return MyMap[MyString]; } [/code] But that …

Member Avatar for daviddoria
0
114
Member Avatar for zeus1216gw

I'm trying to get a GCD of 2 numbers. which I can do and it works fine. however I want to return one of the values based on the function I wrote. however it returns both. I know why because I wrote it that way just to get something down. …

Member Avatar for zeus1216gw
0
111
Member Avatar for kakakon

Hello, I have a Tree that consists of TreeNodes, where TreeNode is public class TreeNode { private String label = null; private String data = null; private TreeNode parent = null; private Vector <TreeNode> children = null; } I also have a HashMap <String, TreeNode> that keeps the label of …

Member Avatar for JamesCherrill
0
2K
Member Avatar for khotso

at school,I was given the class aName and asked to overload the input operator.the class has declared surname as type of char* and the surname is input from the keyboard and it must not be empty.please help me with the code.the class has declared the operator as its friend

Member Avatar for Ancient Dragon
0
92
Member Avatar for Jintu

[code] <html> <head> <title>Grade Calculator</title> </head> <?php ?> <body> <?php $grade = $_POST["Quiz1"] * 0.05 + $_POST["Mid-Term"] * 0.30 + $_POST["Quiz2"] * 0.05 + $_POST["AL1"] * 0.05 + $_POST["AL2"] * 0.05 + $_POST["Participation"] * 0.10 + $_POST["Final"] * 0.40 ; ?> <?php echo "Grade Report: <br />"; echo "<br />"; …

Member Avatar for Jintu
0
3K
Member Avatar for enireka108

i am doing an assignment in programming javascript...and i'm stuck in a problem. It asks to automize a system over the internet to rent a car. the company has overall 8 cars from which 4-are air conditioned and 4- are not. the program should ask the user to press 1 …

Member Avatar for nccsbim071
0
87
Member Avatar for akulkarni

i am not getting the desired output(the contents in a text file which i have saved in the jdk bin here is my code i got. Also what is return in the try catch block i wanna know. it says file not found [code] import java.io.*; class FileDemo { public …

Member Avatar for akulkarni
0
264
Member Avatar for sumeetdesaeee

I recently appeared for the entrance of cdac. There I found a lot of questions about postfix.(I know the postfix operator commonly used in c.But it wasn't that way.) Sample question:- Wat will the expression ABC AB AC will become after postfix operation?? Please tell me how to deal with …

Member Avatar for Dream2code
0
204
Member Avatar for pbt

I have to do project on the c++ in dev c++ using gcc compiler for windows version. But, i am unknown to windows programming since, i have done project on 16 bit environment using turbo c. Due to many projects on php and other class assignments and lab reports. Therefore, …

Member Avatar for pspwxp fan
0
112
Member Avatar for sana.khatib20

hi i am trying to create a application for doctors n have to enter all the information regarding the patients i am using access as the database n nw the problem is tat the doc is supposed to save the patient details n when he opens it again he shld …

Member Avatar for Piya27
0
97
Member Avatar for cVz

Hi I have a form with 1. dropdown (ddTTDBenefitP1) 2. label (lblBenefitPeriodFactor1) The combobox is populated with listitems [Text & value] I applied attributes to this dropdown. [code=C#] // ddTTDBenefitP1 ddTTDBenefitP1.SelectedIndex = 0; string ddTTDBenefitP1_script = string.Format("javascript:document.getElementById('{0}').innerText = {1}.options[{1}.selectedIndex].value;", lblBenefitPeriodFactor1.ClientID, ddTTDBenefitP1.ClientID); ddTTDBenefitP1.Attributes.Add("onChange", ddTTDBenefitP1_script); [/code] So when a user changes the …

Member Avatar for dnanetwork
0
146
Member Avatar for EvilOrange

Does PHP have a built in function that will allow me to find the size of a 2D array without having to first having to loop through the array and hitting a NULL (C style) When i say size i mean the number or rows in a 2D array. many …

Member Avatar for guru12
0
112
Member Avatar for ayesha789

Hi, All when I insert the date in MySQL the format is 2009/07/13 and when I use SELELCT query it shows in the same format 2009/07/13. But I need to show in the Format 13-Jul-2009. [CODE]$result = mysql_query("SELECT Date FROM leaseentry WHERE SiteId REGEXP '$a'");[/CODE] Please guide me.

Member Avatar for ayesha789
0
378
Member Avatar for ypdev

Hi All, In the below code I take a string and split it, then assign it to a "Label" object. On my computer it works great but when I "Publish web site" I recieve the .NET error messages "Object reference not set to an instance of an object" and "Index …

Member Avatar for ypdev
0
213
Member Avatar for turbomen

Dear Sir, I have got confused to the real / integer. Would you mind helping to express it to me? I have got the answer of the following question: Write a menu system for the currency exchange program. My menu could look like this: Exchange rates How much money would …

Member Avatar for turbomen
0
209
Member Avatar for nccsbim071
Member Avatar for nccsbim071
0
90
Member Avatar for NathanOliver

hi narue i would like to ask if this method should be called after ever cin statement? the reason i ask this is that if i write a program and i have 2 [icode] cin >> text; [/icode] statements then at the end before my [icode] return 0; [/icode] i …

Member Avatar for NathanOliver
0
127
Member Avatar for javaAddict

Hi all, I am having problem with openCV: I am using Microsoft Studio 2008 From this lnk: [URL="http://sourceforge.net/projects/opencvlibrary/"]http://sourceforge.net/projects/opencvlibrary/[/URL] I downloaded the [U]OpenCV_1.1pre1a.exe[/U] for windows and installed it. I have been searching ways to include the libraries installed but the instructions don't seem to match my VS version? So after creating …

Member Avatar for h.sileem
0
445
Member Avatar for culebrin

Hi, I have a gridview that has a fileupload (fupRespuesta) control in a itemtemplate field, I need to enable automatic upload after file is selected. Then I added a imageButton (imgRespuesta) in the template field and added its event with addhandler... Well my problem is that when I uncomment the …

Member Avatar for culebrin
0
466
Member Avatar for lancevo3

Been working with operator overloading for the first time and am running into quite the standstill with this one. I finally got rid of the code I had written and decided to start from scratch. If anyone has any advice on how to code this for me it be a …

Member Avatar for lancevo3
0
156
Member Avatar for zachabesh

Hey all, Trying to execute a command line from python. Here's some code: [code] class EncodeJob: def __init__(self,asset,recipe): self.asset = asset self.recipe = recipe self.original = self.asset.fullPath self.stdout = None self.stderr = None self.flv = os.path.normpath(self.recipe.configs['Flv Path'] + '/' + self.asset.filename.split('.')[0] + '.flv') self.thumb = os.path.normpath(self.recipe.configs['Thumb Path'] + '/' + …

Member Avatar for zachabesh
0
186
Member Avatar for sonia sardana

1) Diff b/w nothing & string in terms of variable declaration. 2)Erase keyword. I have never heard of such keyword in mine whole 1 + yrs of exp. 3) Diff b/w functions & properties? I say,Functions return a value,But propertiesare used to set or get the values. He say properties …

Member Avatar for sknake
0
266
Member Avatar for denniskhor

My question is : x = "you love me" Inside 1234.txt file: i love you you love me we love you If i wan IF x == "you love me" from 1234.txt, THEN x is true. how to do it? any one can help?

Member Avatar for zachabesh
0
453
Member Avatar for joe82

Hello everyone, My file had 12 columns, I want those lines in my file where numbers in columns 9 and 10 includes digit "101". For example : i am giving 3 lines of my file: ( columns to focus are colored green). NM013123 14-74726235 100.00 18 0 0 11 28 …

Member Avatar for joe82
0
107
Member Avatar for dwdata

Hello, I have a few Text Area input fields when I want to allow my users to enter text with hard returns. On my process page, I am using: [CODE]$Note = addslashes(nl2br($_POST['Note']));[/CODE] to convert the strings to be able to be pushed to my mySQL DB. This functions great. I, …

Member Avatar for dwdata
0
111
Member Avatar for dp_neo

Hi, I have a script that pulls data off the web based on data in a text file. The text file and script are in the same directory. The values from the script are read into a list. The list is then used in some conditional statements. The text file …

Member Avatar for dp_neo
0
92
Member Avatar for nishant52

I'm retrieving a list of names from MySql database in Java using JDBC with the help of CachedRowSet. After retrieving the list I'm appending a counter value to every name. Finally I'm updating the modified names in the database. I'm using: MySql: 5.1 Connector/J 5.1.7 JRE 1.6 Win Xp SP3 …

Member Avatar for nishant52
0
409
Member Avatar for Link82

Hi everyone, A few days ago I posted a question which someone did reply to. However, the tables have been re-arranged a bit and I didn't want to make my last thread confusing, so I thought I'd start fresh here. (Mod, you may close down my other thread; thanks). So …

Member Avatar for sknake
0
303
Member Avatar for EdTheUniqueGeek

I was hoping someone could help me with this. Here is my web site: [url]http://ectech.info/[/url] The footer of this site that shows my copyright moves around, depending on your monitor resolution, and does not stay centered with the page itself. The footer information is show in the page source. Can …

Member Avatar for EdTheUniqueGeek
0
142
Member Avatar for emarcel

Hi Guys, I've got a small issue passing the string from command line parameter into the variable within the script. An issue is when the parameter contains an equal mark in the string that brakes the line and the everything after an equal mark is missing. See an example: script.bat …

Member Avatar for hkansal
0
77
Member Avatar for walter clark

Why can't I declare this near the top of the Form1.h file... int trackArray[4][999]; It strikes error C4368; something about mixed type. What is mixed about the types? Walt

Member Avatar for Ancient Dragon
0
130
Member Avatar for tig2810

Hi I have a problem with a console app. It will not run methods in sequence but rather runs them all at the same time? I have put some example code below. The problem is it will run the methods below at the same time, without waiting for the frs …

Member Avatar for sknake
0
127
Member Avatar for bryan69

hi, i would like to design an intrusion detection system-type of software. is it best to use Java for it?

Member Avatar for bryan69
0
147
Member Avatar for atch

Hi, I'm quite new to C++ and I'm trying to write a function which would change uppercase letter in char[] to lowercase. Inside this function everything is fine but when I leave it, contents of char[] is not changed. Any ideas why? Also when I try to delete local pointers …

Member Avatar for atch
0
131
Member Avatar for shealy

I have 2 binaries - a java binary that requests a microsoft word doc from a c++ binary. The C++ binary opens the word doc in binary mode, reads x no of chars and returns chars to java binary. Java binary eventually receives all data and writes data using filestream …

Member Avatar for Krushnat
0
549
Member Avatar for dumrat

Hi, I am so frustrated by this error and I don't know how to solve it. Hope someone helps! I have a dynamic lib (Call it D) which is loaded at runtime with the dlopen() function inside a static lib (Call it S). There is a header file that contains …

Member Avatar for tux4life
0
118
Member Avatar for S2009

Hi all, I am developing a windows application. I have 3 forms: I want to change the backcolor of all the 3 forms to the color selected by the user. I have used the following code I am able to change the backcolor but When I exit the application and …

Member Avatar for S2009
0
152
Member Avatar for pbt

I am doing a campus project in php regarding musical site and i have to insert ziped files of songs in the database. so, i don't know how to deal with the zip files. Therefore, help me.

Member Avatar for somedude3488
0
98
Member Avatar for ashkan3030

[code]<asp:Image ID="Image2" runat="server" ImageUrl='~\\Images\\thumbnail\\<%# Eval("brand")%>\\<%# Eval("thumbnail")%>' />[/code] I tried several times with different types and didn't succeed.I want to bind two data from sqlserver database and put them in Image URL continuously. Which the brand is something like "Dell" and thumbnail is "123.jpg" What is the correct form ? Please …

Member Avatar for ashkan3030
0
132
Member Avatar for yassar

Hi, I am building a web application in c#using visual studio 2008. I want to embed a calendar in a combobox, so that when combobox is clicked a calendar will pop up and user will be able to select a date.

Member Avatar for yassar
0
147
Member Avatar for nipa.pillai

Below is the scenario.. First Page Second Page Radio button 1 Radio button 2 Submit. I select the first Radio Button and submit and then i go to second page where i have some content. Now when i go back to first page the same radio button which i had …

Member Avatar for kvprajapati
0
255
Member Avatar for plusplus

I used the multimedia control, and it worked great. But when installing my project, it did not work on all computers. (When trying to run it on some computers, it said, there was a problem, and it shut down the program) What could be the reason for this? Do you …

Member Avatar for plusplus
0
201
Member Avatar for vuyiswamb

Good Day ALL I have a UserControl that has a Dropdownlist. In the Hosting Page i have a Ultrawebgrid that gets updated based on the Selecteindexchange event the the dropdown. I have have another Control on the Left hand side that needs to be Updated on Selecteindexchange of the Drop …

Member Avatar for vuyiswamb
0
115
Member Avatar for FJones

Hello everyone. I'm new here and I am still in the beginning stages of learning C#. I am trying to write a program for school that calculates exponents but I have to use a loop. Then I have to prompt the user if they want to enter some more numbers. …

Member Avatar for ddanbe
0
103
Member Avatar for hardik.rajani

My Spring.xml is something like this: [CODE] <beans> <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="_local-mail-server_" /> </bean> <bean id="businessLogic" class="com.logic.BusinessLogicImpl"> <property name="mailSender" ref="mailSender"></property> </bean> </beans>[/CODE] And bean definition is as below: [CODE] import org.springframework.mail.MailException; import org.springframework.mail.MailSender; import org.springframework.mail.SimpleMailMessage; public class BusinessLogicImpl implements BusinessLogic { private MailSender mailSender; public void setMailSender(MailSender mailSender) …

Member Avatar for hardik.rajani
0
3K
Member Avatar for brieghz23

VB Code About Closing 2 or more forms pls.. Ex: Unload me (close the current or 1 form) what about closing 2 or more forms..?? can anyone help me? pls.. thanks..

Member Avatar for vb5prgrmr
0
80
Member Avatar for OwenRoberts

Hello DaniWeb! My first post to you. I have a question about an undefined reference error I am getting. Currently I am studying from Dietel and Dietel C++ How to Program 4th ed, and on page 421 of chapter 6 I am working on the program they have in the …

Member Avatar for jesseb07
0
387
Member Avatar for apease11

This belongs in both C and C++ forums, but it's more of C++ (I think) so I'll keep it in here for now. I'm working on a C++ program to extract files that I am constantly compressing and testing (releasing software for beta testers to take a look at). I …

Member Avatar for apease11
0
175
Member Avatar for xylude

I am pretty new with javascript, and I am making a page that has divs that change an image when rolled over. It works in Live View in Dreamweaver, and in Safari (couldn't test in IE because I'm on a Mac), but not in Firefox. Here's what I got in …

Member Avatar for Airshow
0
145
Member Avatar for sravan953

The End.