199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for veer123

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 …

Member Avatar for veer123
0
150
Member Avatar for me_ansh

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 …

Member Avatar for me_ansh
0
94
Member Avatar for Rein Valdez

Sir, i do have this problem and im quite unaware about the variable declaration and the algorithm in creating this problem? thank you.

Member Avatar for Rein Valdez
0
117
Member Avatar for maccold321

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] …

Member Avatar for vmanes
0
112
Member Avatar for complete

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?

Member Avatar for cVz
0
253
Member Avatar for Carlo Gambino

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 …

Member Avatar for Stefano Mtangoo
0
137
Member Avatar for akim_atl

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"); …

Member Avatar for WaltP
0
269
Member Avatar for number87

#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 …

Member Avatar for Salem
0
152
Member Avatar for demeryjo

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 …

Member Avatar for Stefano Mtangoo
0
109
Member Avatar for Sheetu

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.

Member Avatar for lordspace
0
65
Member Avatar for ckd327

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 …

Member Avatar for stephen84s
0
100
Member Avatar for rak4u

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) …

Member Avatar for rak4u
0
126
Member Avatar for besktrap

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!

Member Avatar for mn_kthompson
0
113
Member Avatar for revenge2

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

Member Avatar for mn_kthompson
0
204
Member Avatar for realnsleo

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 …

Member Avatar for cubekid
0
100
Member Avatar for code46

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 …

Member Avatar for code46
0
214
Member Avatar for cubekid

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 ++) // …

Member Avatar for ~s.o.s~
0
308
Member Avatar for Datsun90

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 ----------------- …

Member Avatar for jalpaeol
0
140
Member Avatar for Ramy Mahrous
Member Avatar for networkburner

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 …

Member Avatar for Ancient Dragon
0
151
Member Avatar for mps727

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 …

Member Avatar for mps727
0
98
Member Avatar for serkan sendur

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 …

Member Avatar for Narue
0
90
Member Avatar for Stefano Mtangoo

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

Member Avatar for jbennet
0
189
Member Avatar for jakx12

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(); …

Member Avatar for diafol
0
99
Member Avatar for geordienz

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 …

Member Avatar for geordienz
0
103
Member Avatar for Taosun

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 …

Member Avatar for diafol
0
123
Member Avatar for OrderChaos

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 …

Member Avatar for Ramy Mahrous
0
1K
Member Avatar for Cultred

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?

Member Avatar for erms
0
112
Member Avatar for yuleball

In microsoft word we can add a textbox o document. Is there a way to add the same in rtb in vb.net

Member Avatar for lostandfound
0
93
Member Avatar for jakx12

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 = …

Member Avatar for almostbob
0
82
Member Avatar for wheatontrue

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? …

Member Avatar for wheatontrue
0
84
Member Avatar for xyzt

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; …

Member Avatar for Salem
0
82
Member Avatar for ddanbe

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 …

Member Avatar for ddanbe
0
340
Member Avatar for bajanpoet

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 …

Member Avatar for bajanpoet
0
116
Member Avatar for bajanpoet

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 …

Member Avatar for bajanpoet
0
743
Member Avatar for mahdiahmadirad

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> …

Member Avatar for mahdiahmadirad
0
188
Member Avatar for daddanakunadan

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 …

Member Avatar for Antenka
0
102
Member Avatar for ANGanley

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 …

Member Avatar for sedgey
0
148
Member Avatar for Rashakil Fol

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.

Member Avatar for hieuuk
0
146
Member Avatar for chriswininger

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 …

Member Avatar for Ramy Mahrous
0
143
Member Avatar for serkan sendur

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?

Member Avatar for serkan sendur
0
13K
Member Avatar for serkan sendur

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?

Member Avatar for serkan sendur
0
298
Member Avatar for robertmacedonia

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 …

Member Avatar for robertmacedonia
0
99
Member Avatar for naseerkhan861

hi guys can anybody has a c++ code on permutation cipher and hill cipher ,terms used in cryptography.

Member Avatar for MosaicFuneral
0
72
Member Avatar for Mighty

[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; …

Member Avatar for Salem
0
166
Member Avatar for jalpaeol

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 …

Member Avatar for rapture
0
110
Member Avatar for nobloz

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 …

Member Avatar for nobloz
0
82
Member Avatar for attari19

: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.

Member Avatar for jireh
0
55
Member Avatar for Yaserk88

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 …

Member Avatar for Yaserk88
0
132
Member Avatar for ylenaj

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. …

Member Avatar for stephen84s
0
120

The End.