199,114 Archived Topics
Remove Filter ![]() | |
Hi want to implement an unordered hashmap ie. FIFO implementation . Below is the code.Please help me with this. [code] #include <hash_map> #include <iostream.h> int main() { hash_map<int,int>testMap; testMap[1]=1; testMap[3]=5; testMap[2]=2; typedef hash_map<int,int>::iterator hashIter; for(hashIter it=testMap.begin();it!=testMap.end();it++) { cout<<it->second<<"\n"; } } [/code] It gives output as 1 2 5 But I … | |
The man page of 'sscanf' says: "EOF is also returned if a read error occurs, in which case the error indicator for the stream (see ferror(3)) is set, and errno is set indicate the error" I am confused that what kind of read error may occur if sscanf is reading … | |
Sir, i do have this problem and im quite unaware about the variable declaration and the algorithm in creating this problem? thank you. | |
Write a program that initializes a vector with the following array values. int arr[] = {1, 6, 2, 9, 12, 15, 33, 28}; Compute the average value, and then output each value along with its deviation (+/‐) from the average. What i have so far is only the average... [code] … | |
What is a good way to code a messagebox in C#, like the AfxMessageBox in used in Visal C++? Also, is there a good way to write information out to a log file? | |
Hello, I have been using the python challenge to teach myself python as my first programming/scripting language outside of HTML. As I go along, I find that while I'm understanding the concepts rather well, I am not being as efficient as I could be. While the code I whip up … | |
1 of 25 The ______ of a function take(s) information into the function from the calling statement. local variables input arguments output arguments prototype purpose 2 of 25 What is displayed by the C statements below if the value input is 3? scanf ("%d", &n); if (n = 5) printf("Equal\n"); … | |
#5report function report { clear echo "Name, Position, Department, Salary" echo "========================================" awk 'BEGIN{FS=","; RS="\n"} {printf "%s, %s, %s, %s\n", $1, $2, $3, $4}' $dataFile awk '{total += $4}END{print total}' $dataFile } i am trying to print the total sum of the salary or $4 field. However i cant figure … | |
In my programming class, we need to write a program where the user is prompted for a value. Once that value is provided, the program is supposed to multiply its digits. For example: if the user typed 1234, it would multiply 1*2*3*4 and give the answer. I'm not sure how … | |
Hello Readers, I need urgent help.Pls can anyone give me a demo of how to install PHP 5.0 for Windows XP on Apache Server or provide me a link wherein i can download both PHP compatible to Apache server. | |
Hi I am just beginning using Java and have two programs due tomorrow for class. Both programs are nearly complete however I keep getting similar errors on both. The first program's error is on the 22nd line starting "system.out." and says that a ) is expected. Here is what I … | |
Hi till now i am used window application in which there is no problem in connection using following code [code] Dim cnn As SqlConnection cnn = New SqlConnection("data source=RAKESH-676DD0E1;initial catalog=rw;integrated security=SSPI") cnn.Open() Dim da As SqlDataAdapter Dim dt As New DataTable da = New SqlDataAdapter("select * from publicity", cnn) da.Fill(dt) … | |
does anyone know how to shutdown a computer on windows XP (using python of course ;) given the IP address and the computer name (probably don't need it, though)? I don't want to use os commands like os.system("shutdown -i"). Thanks in advanced! | |
Does anyone know of any good urllib tutorials other than [url]http://www.voidspace.org.uk/python/articles/urllib2.shtml#introduction[/url] & [url]http://effbot.org/librarybook/urllib.htm[/url]. Something which a little beginner friendly:| with good explanations. -Thanks | |
hi, Am developing a web app in php, mysql but using lots of javascript and ajax and css. okay. straight to the code. I am adding dynamic textfields to the document. There are 4 textfields in total. One of them has 'Quantity', the other has "Item Decsription", the next has … | |
Hello, I wrote a quicksort program that will give me the execution time of the algorithm. I was running it for 1,000, 10,000, 100,000, 1,000,000, and 10,000,000 numbers. Everything was going fine and then when I changed the amount of numbers it is sorting it gave me a segmentation fault … | |
Dev't Tool: Visual C# 2003 and Javascript System Type: Web Application One requirement of the system is to dynamically create a table on client-side (Javascripting using createElement method.) The table has textboxes inside each cell. a few sample code: [code] for (i = 0; i < 4; i ++) // … | |
Hi friends, Using VB.Net 2005, I have a datagrid to enter purchased items with quantity and purchase price, and calculates the total cost for each row (item). It looks something like this: RecordID-------ItemID-------Qty------UnitPrice-----------ItemTotal 1 ------------- 1000 ------- 2 --------- 10 ----------------- (20) 2 ------------- 1004 ------- 5 --------- 30 ----------------- … | |
So, I've been coding C++ for a while now, and in that time I've of course surfed the web a fair bit. Is it just me, or does everybody on the internet just hate conio.h's _getch()? I've seen a lot of forums where people are asking the best way to … | |
Whenever I step through my code, visual studio will step into things like string, and the new operator. When it does this it also leaves a tab for the file open at the top. Is there a way to configure it to only step into code that is loaded in … | |
i keep some formatting data in an array of structs. it is a very long array. is it better to keep this information in another class and inherit from this class or is it better to not inherit from this class but create an instance of that class and use … | |
I have my WAMP server on Vista but need it too on KUBUNTU so as I can use it even under linux. Can Anyone help me how to do it. I accept even how to separately install Apache, PHP and MYSQL. Pse help | |
ok so here is the code, this is for the search option on my site. However it only ever outputs: the else option. Whats wrong? [code=php]<html> <head> <link rel=stylesheet type=text/css href=style.css> <title> Search Results </title> </head> <body> <?php include("header.php"); ?> <center> <div class=indexboxlarge2> <?php SESSION_start(); include("dbcon.php"); $searchresult = $_POST['result']; dbcon(); … ![]() | |
I'm very (no, VERY) new to ASP.NET and I have a server-side app that was written for me by a contractor with whom I have no contact now. Thing is, this app worked perfectly on a Canadian based server but has now been switched to UK. Fooolishly, the Canadian server … | |
hello Everyone I was wondering if anyone can help me with a little php and mysql problem occurred to the CMS i am using. I have a function which is get data from a table after updating the table, the code is as follow: [code=php]public function getHtmlWrapper($id) { //get entire … ![]() | |
Hello I am working on a simple calculator program for school. I already have all the button clicks working, which is all that was required. I thought it would be cool if I could get it to where you could use the keyboard for entry and I've done similar things … | |
I cannot really explain what you call them. However, I will give an example. I was on this site and their URLs were: index.php?page=page-name They said you can achieve this using PHP scripts. How, exactly? | |
In microsoft word we can add a textbox o document. Is there a way to add the same in rtb in vb.net | |
Ok so heres the code . The error is this: $row[title] $row[content] $row[date] $row[title] $row[content] $row[date] $row[title] $row[content] $row[date] i mean thats all i get! and the code is this [CODE]<html> <head> <link rel=stylesheet type=text/css href=style.css> <title> Blog </title> </head> <body> <?php $username = $_SESSION['username']; include("header.php"); include("dbcon.php"); dbcon(); $result = … | |
Dear all, I am trying to create x attributes in a class, to the effect of: class classic: def __init__(self,text): r=range(text.count('TI -')) for l in r: self.l=None Unfortunately I can't iterate through for some reason. I only get self.l, not, for instance self.1 to self.107 How do I do this? … | |
I really can't understand why the belove code gives error. I get this error: [I][B]In function 'int* bubble_sort(int*)': error: no matching function for call to 'swap(int*&, int&, int&)' [/B][/I] May someone please show me the reason? [CODE]int* bubble_sort(int arr[]) { for(int i=0;i<sizeof(arr);i++){ for(int j=0;j<sizeof(arr);j++){ if(arr[i]>arr[j]) swap(arr, i, j ); break; … | |
Start a new Forms application. Add a DataGridView control to the Form. Add a few Columns to the DataGridView. In the properties window select the ColumnHeadersDefaultCellStyle (ahh what's in a name...) property. A dialog opens. Change the appearance BackColor to whatever color you like. Run the application. On my system … | |
Hi guys! I have created two table valued multi-statement functions using SQL Server 2000 and am now trying to develop a VB.NET front end application where I run the functions and pass string parameters to them. When I run the function in SQL Server Query Analyzer, it works, but when … | |
I have created two table valued multi-statement functions using SQL Server 2000 and am now trying to develop a VB.NET front end application where I run the functions and pass string parameters to them. Below is a code fragment for one of the functions. [code="SQL"] CREATE FUNCTION ViewCustomers(@Region varchar(6)) returns … | |
Hi Dears! I Wrote A Bubble Sort for sorting 2D array of characters. and logically it seems correct, but unfortunately not works. please help me. this is my output: unsorted: mah ali sal Sorted: ali ali mah Here is my Code so far: [CODE] #include <iostream.h> #include <stdio.h> #include <string.h> … | |
Hi friends can any one help me to solve this problem. I want to display the inputs of text boxes by using datadrid control. i am using visual studio2005.I tried with the following code [code] (datagridobject).DataSource=(arrayname) [/code] but this displaying column name as "length" and its values are numeric.How can … | |
I have a web application using vb.net. What I need to do is get my datagrid to update and delete rows in a datagrid. I have a grid view that calls a web service, passing in a query string. The problem I am having is, I am not sure what … | |
I would like to take a poll of what version of C# and .NET you are used to working with. I'll start. C# 3, .NET 3.5. | |
I have a form in my vb project (let's call it frm_UpdateDetails). It contains a user control (Let's call it MyUserControl). The user control has several fields that allow the user to edit entries in the database. There is another form (lets say frm_Main) that calls a method in frm_UpdateDetails … | |
hi guys i want to achieve something like this : in header file : [CODE]#pragma once class wef { private: int a[]; void setI(); };[/CODE] and the code file will be like this: [CODE]#include "wef.h" void wef::setI() { a = {1,2,3}; }[/CODE] could you please help me with that? | |
i have a struct and i need to use an array of that struct. The member of that array is definite at compile time, so i am going to hard code them. how do i declare it in my class header file and fill the items in the class file? | |
Hello, I would like to ask is there any class connected with the Tree data structure in the Java Api, since I couldn't find one. I'm just starting to study the Binary Search Trees, the Heap data structure etc. As far as I could see until now, I will have … | |
hi guys can anybody has a c++ code on permutation cipher and hill cipher ,terms used in cryptography. | |
[code=cplusplus] #include<iostream> #include<iomanip> using namespace std; int main () { int month, year; float totalCollected, Sales, CountySalesTax, StateSalesTax; float TotalSalesTax; std::cout<< " What is the Month:"; std::cin>>month; std::cout<<"What is the year:"; std::cin>>year; std::cout<<"What is the total amount collected at register:$"; std::cin>>totalCollected; std::cout<< setprecision (2) << fixed; float sales=totalCollected/1.06; CountySalesTax=sales*.02; StateSalesTax=sales*.04; … | |
Hi I have to limit that user for no age less then 18 years I have only 2 ideas for developments of these 1 > check for date year is greater then 1990 of today then but i think it is not good way to coding for flexibility in future … | |
Hi all, I am fighting with this a while allready, a moving average with mutilty items The (example) tabel : item datum volume item1 1/1/2009 10 item1 1/2/2009 11 item1 1/3/2009 12 item1 1/4/2009 11 item1 1/5/2009 10 item1 1/6/2009 10 item1 1/7/2009 10 When i do this with only … | |
:sad: Salam, I need complete Account Project Sale, Purchase, Inventory, All Accounts reporty in VB 6.0 . becouse it my task which not solve and face differant Error in programming. Please any body Solve this my HOT ISSUE. Best Regarde &:'( Bundle of Thanks. | |
Hey. I am trying to output a file. I pretty much have down, but the only problem is I'm getting the last set of my numbers and missing the other 5000 or so sets. Here is what I have [[ICODE]for (int i=0; i < N_plates; i++) { cout << i … | |
What are the codes when you cancel a list of names in the database in a certain field? This is the situation: I made a reservation in a certain hotel. Of course they asked my name, what kind of room. . Automatically, it saved on the database of their system. … |
The End.