199,114 Archived Topics
Remove Filter ![]() | |
Why I can't compile without the [B]using namespace std[/B] line? I need to add .h in some libraries in order to being recognized by G++, but some others works without the .h extension. Why is that?? | |
I have added a png image to a table in the database as a BLOB. Adding the image into the database is trivial. However, being able to display the BLOB back to the .png image format is bewildering me. Examples are hard to come by... How to display the BLOB … | |
I want to remove all lines in a text file that start with HPL_ I have acheived this and can print to screen, but when I try to write to a file, I just get the last line of the amended text printed in the new file. Any help please, … | |
Could someone explain to me what it returns? int result2 = negative(-3); System.out.println("The final answer is " + result2); [B]public[/B] [B]int[/B] negative(int num){ [B]if[/B](num >= 20){ [B]return[/B] -5; }[B]else[/B]{ [B]return[/B] negative(num + 4) + 2 * num; } } | |
I am trying to read a long integer value from an Access database, do some math to the number, and save the result back to the database. I've never had a problem doing this with VB6, but with C# it is throwing an error when it tries to Update the … | |
Hello guys, I am pretty new at (good) programming, so I had some pretty bad code I was using until I ran across some code and decided to model my code after it. I have the code so it has no errors, but when I run it (NetBeans) it doesn't … | |
I've been struggling with understanding segmentation for some time now. Here's what I know. There are different types of segments, such as the code segment, data segment, stack segment, and extra segments. In old architectures (286 and below), segments were limited to 64kB and used a segment:offset addressing scheme. In … | |
Hi all: I would be very grateful for advice on an Xcode (3.2.2) problem. I use Mac OS X 10.6.7. I have written C++ code that requires outside code. The outside code 1) requires a license and 2) has dynamic libraries. The outside code does run in a terminal, but … | |
I've tried to search for a simple formula to do this but I can't find any that works for my program. I found this: (n^2+n)/2=sum, n being the last number in the "series", but it only works if the first number is 1(which mine is necessarly not, since you should … | |
Hi, I am trying to organize the way my episode titles output. At the moment it prints like this. (I want to be able to upload the newest episodes and also go back and upload the older shows but i want the newer shows to stay at the bottom in … | |
Hello everybody! I have two questions about pointers and would be grateful if someone gave me some help. 1. When we use a table's name as a parameter the table is used as an address (the address of its first element). I mean, when i call a function that has … | |
Hello all, I have a window with a JList inside it. I would like each line in the JList to show up in a certain font. But when I try the 'setFont(font)' method where 'font' has already been defined it say that it cannot find the symbol 'setFont(java.awt.Font)'. Here is … | |
Hey, so im making this game, and at the moment im using PlaySound() which is a function of windows.h to play my sound files. Ive got a problem though, i now want to be able to play more than one sound at the same time, and only now do i … | |
Hi experts, well, nearly 10 years after .net became the mainstream I am finally making the move to vb.net after having supported VB6 apps all this time. I have been learning vb.net 2010 but am finding it difficult to find relevant information on the COM aspect. In VB6 COM was … | |
Can some one suggest best way to calculate the huge matrix. Example: [CODE] const int NUMPAT = 1212; const int NUMIN = 6; const int NUMHID1= 13; const int NUMHID2 =15; const int NUMOUT = 12; #define rando() ((double)rand()/(RAND_MAX+1)) [/CODE] Below are----- [CODE] double Input[NUMPAT+1][NUMIN+1]; double Target[NUMPAT+1][NUMOUT+1]; double SumH1[NUMPAT+1][NUMHID1+1], WeightIH1[NUMIN+1][NUMHID1+1], … | |
Hello, please can I have some clarification to check I am not doing something very stupid? It seems sensible with all that I have read, but I'm not confident. I suspect I have memory leaks and want to make sure some fundamentals are correct before I start looking deeper. My … | |
I've tried but I don't understand how to use void, can someone please try to explain how it works in a simple way. [CODE] #include<iostream> #include<conio.h> #include<iomanip> using namespace std; float areacalc( float rad); float circumcalc( float rad); void output(float A, float C); void input ( void ); float radius; … | |
hi friends, This is Anand, am beginner to jsp, now am trying to connect jsp with mysql. Is this possible to code connection code separately and include each and every page. am trying the following code.I code these lines in separated.and I want to use it other pages.at the same … | |
I have an array with 5 elements. With each fork, I want the next element to pass to it and then exit. Here's what I've got so far. Could someone please help? :) Here's what I get: child 0 k: test1 child 0 k: test2 child 0 k: test3 child … | |
Hi, Can anyone tell me why this program is skipping line 63? Thank you, lynnajoe [CODE]import java.util.Scanner; //Imported Scanner for input import java.util.Locale; //Imported Locale and NumberFormat import java.text.NumberFormat; /**Simple Payroll Program titled PayrollPartI & modified for PayrollPart II * * @author Lynn Ortiz *///May 22, 2011 //Description of program: … | |
I have this file that contains an instance of some Machine object. When I compile the file I have, it says that the class uses a deprecated API, meaning the Machine object. I tried looking for it in [URL="http://download.oracle.com/javase/6/docs/api/"]this[/URL] link, but I find nothing. I was wondering if anyone who … | |
Hi all, I am trying two days now to insert a cart link on my page. It is a e-shop bookstore. I save my books in a database : +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | bookid | int(11) | NO … | |
I plan to use the WebRequest class to POST some data to a form, specifically a message and a file. I don't know the first thing about websites so I was hoping someone could help me out. I know how the message data is supposed to be formatted and how … | |
I'm a newbie at C++. I can't figure out why my program won't build. Could someone please help? I get the error [QUOTE]1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup 1>c:__namestuff__.exe : fatal error LNK1120: 1 unresolved externals[/QUOTE] [CODE]// File : name.cpp // Description: Does stuff with stock // Programmer: … | |
Do any of you know of a plugin for VS2010 that plays music? I'm kind of assuming plugins for VS are written in some kind of native code... | |
[CODE]Server::Server(boost::asio::io_service& io_service,std::string ip,short port,std::shared_ptr<ConnectionFactory> factory) : acceptor_(io_service, boost::asio::ip::tcp::endpoint(boost::asio::ip::address_v4::from_string(ip.data()), port)){ m_factory = factory; start_accept(); std::cout<<"Socket accepting connections..."<<std::endl; } Server::~Server() { } void Server::start_accept(){ boost::asio::io_service io_service; std::shared_ptr<Connection> conn = m_factory->create(io_service); acceptor_.async_accept(conn->socket(), boost::bind(&Server::handle_accept, this,conn, boost::asio::placeholders::error)); } void Server::handle_accept(std::shared_ptr<Connection> conn,const boost::system::error_code& error){ if (!error) { std::cout<<"on connected"<<std::endl; conn->OnConnected(); start_accept(); } } [/CODE] when i … | |
hey, i'm supposed to prompt a user to enter 6 sets of numbers, find the difference of each set based on which number is greater(so that no negative number will be seen, enter the difference into the array, rearrange the array in ascending order and then print the array. the … | |
Hi, please help me with my code. Javascript function if (document.myform.Available.checked == false) { document.myform.Save.disabled = true; <?php $query = mysql_query("UPDATE rewarditems SET Available = 'Yes' WHERE RewardItemID = '{$_GET['item']}'",$link1) or die(mysql_error()); ?> } else if (document.myform.Available.checked == true) { document.myform.Save.disabled = false; <?php $query = mysql_query("UPDATE rewarditems SET Available … | |
I have a PHP object that I'd like to convert to XML so that I can use SimpleXML to run an xpath on the data. Can someone suggest some way to do this? Basically, I have the following PHP object and I need to be able to search for certin … | |
Hello ..... I writing sql statment on access 2007, all what I need to do is to get the max value of a column depending on the max of another column.. an exmaple of the data is as below: Invoice No-------- Document no--------Document Date-----Value 1001115600188757 /// 5100002019//////13/12/2010////////-30469.50 1001115600188757 /// 5100002018//////13/12/2010////////30469.50 … | |
I am no submitting form (i.e. no button usage), then How I can preserve the value of a control. I am using pagination. | |
i need help please i cant input the name of pet in 2nd to the 5th it wont me input the name and skip into age. i dont get any error i just dont get it why it skp the name. public class PetRecordTESTER { public static void main(String [] … | |
Hi, I want to know , how to retrive the table name from multiple tables from a database which having the maximum number of rows.... As i am new to oracle can anybody help me as fast as possible... Thanks Ashish | |
Hi, I have a web application project which is done in VS2005.I am creating crystal report and i want to export it to pdf on a export button click. But an error is showing as 'Missing Parameter Value. The code i used is shown below:- protected void btnExport_Click(object sender, EventArgs … | |
This is a program for recording sound from an Audio Input device. I have taken help from the MSDN website ..... ! I did as they had mentioned .... [CODE] //wave.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Runtime.InteropServices; namespace Record { public class wave { … | |
Hello All I have little confusion between Abstraction and encapsulation. Abstraction means Giving only essential things and hiding unnecessary details. Encapsulation means binding the data members and methods together in a capsule form to avoid accidental changes to data from external users. Now both uses hiding of data. What is … | |
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="no" encoding="ISO-8859-1"/> <xsl:param name="context"/> <xsl:param name="renderId"/> <xsl:param name="token"/> <xsl:include href="../../wcf/controls.xsl"/> <!-- buttons with spaces inbetween --> <xsl:template match="button[@hidden='true']"/> <xsl:template match="button"> <xsl:text> </xsl:text> <input type="submit" name="{@id}" id="{@id}" value="{@label}" onclick="iceSubmitPartial(form, this, event);return false;"/> <xsl:text> </xsl:text> </xsl:template> <xsl:template match="tree-extras-top | tree-extras-bottom"> <tr> <td class="navText"> <xsl:apply-templates/> </td> … | |
Hello guys, So I wrote this code that fetch data from mysql table: [code]while($row = mysql_fetch_array($result)) { $src = ''; switch( $row['speed'] ) { case 'fast': $src = 'fast.png'; break; case 'slow': $src = 'slow.png'; break; default: $src = 'default.jpg';} } } echo "<tr>"; echo "<td><a href='http://" . $_SERVER['HTTP_HOST'] . … | |
ERROR IN ADD STATEMENT THIS IS MY CODE [CODE]Dim cb As New OleDb.OleDbCommandBuilder(da) Dim nr As DataRow nr = ds.Tables("a").NewRow() nr.Item(0) = TextBox1.Text nr.Item(1) = TextBox2.Text nr.Item(2) = TextBox3.Text ds.Tables("a").Rows.Add(nr) da.Update(ds, "a") MsgBox("Datarow added")[/CODE] Syntax error in INSERT INTO statement. System.Data.OleDb.OleDbException was unhandled ErrorCode=-2147217900 I have taken textbox3 as memo … | |
Hello, would like to ask about this problem im facing. [code] #include <cstdlib> #include <iostream> #include <fstream> #include <ios> #include <string> #include <string.h> #include <vector> #include <sstream> #include <algorithm> #define MAX_MSG 30 using namespace std; vector<UserInit> ReadUsersInitial() { fstream file ("Users_initial.txt"); FILE *file1 = fopen("Users_initial.txt", "r"); string tempFile; if (file.good()) … | |
I've made a "more" button and whenever i click it, another upload input will be displayed. Problem is, once I add the <div>, then it stops working. Is there any way around this? [CODE] <html> <head> <script type="text/javascript"> var instance = 1; function newUpload() { instance++; var newInput = document.createElement("INPUT"); … | |
I need to create a gui application.. When the user clicks the start button use a JFileChooser to allow them to pick a directory from the system and then run the recursive search of the file system from that directory and display the directory and each file in the JTextArea. … | |
I have the following code for adding information from and array to a listbox private void buttonAdd_Click(object sender, EventArgs e) { //add tracks to my tracks Add Tracks list box and tracks list box myTracksString[nextAvailbleRow, 0] = textBoxArtist.Text; myTracksString[nextAvailbleRow, 1] = textBoxSongName.Text; myTracksString[nextAvailbleRow, 2] = ((numericUpDownHours.Value * 3600) + (numericUpDownMinutes.Value … | |
Hi I have a problem With the $_POST Here is the code i have i called this albums.php [CODE] <?php Echo" <table cellpadding='5' width='100%' border='1' bgcolor='white'> <tr> <td width='50%' align='left'> Usere Alben die schon bestehen. </td> <td align='right'> <form action='createalbum.php' method='POST'> <table> <tr> <td align='left'> <font face='arial' size='2'> Albumauswahlliste.</font> </td> … | |
Guys, i have [b]2 doubts[/b] [b]Doubt-1[/b] -------- [code]int* p[10];[/code] Does it mean that 1)I have an array of 10 pointers, that means, each of them is capable of holding an address OR 2)I have a single pointer that points to an array holding 10 integers I too, feel , the … | |
I;m having a hell of a time this simple program im trying to create... any help would be great! most of it is right except can't get the formula to show up so theres an extra line of code in there because i dont know what to do this is … | |
[CODE]template < class Object> void fix(queueType < Object> &q, int n) { -if (n>=1) -{ ---Object temp = q.front(); ---q.deleteQueue(); ---fix(q,n-1); ---q.addQueue(temp); -} }[/CODE] (a)what will the final state of queue q1 be after the statement fix(q1,2); is exexuted, if q1 has the values (1,2,3,4,5} my answer: {2,3,4,5,1} because q.addQueue … | |
Hello Anyone can recommend me the best php IDEs available which also provide support for frameworks like zend or codeigniter? | |
Hi everyone, could you tell me how to check if email exist in jsp :( ??? thank you. | |
I'm trying to get a players name from a file on their computer and then display that name onto a Label on my chat program. This Label is also used when sending messages to the server in order to display the persons name with their message. The problem I'm having … |
The End.