64,152 Solved Topics
Remove Filter ![]() | |
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 … | |
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. … | |
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 … | |
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 | |
[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 />"; … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
Hi, is there any difference between accessor written as get { } get; | |
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 … | |
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 … | |
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 … | |
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 … | |
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'] + '/' + … | |
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 … | |
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? | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
![]() | 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 … |
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 | |
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 … | |
hi, i would like to design an intrusion detection system-type of software. is it best to use Java for it? | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
[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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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. … | |
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) … | |
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.. | |
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 … | |
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 … | |
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 … | |
![]() |
The End.