64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for triumphost

How can I create a Modifiable Const vector but make it unable to be resized? Either that OR I want to return a pointer from a function but not allow the user to delete it. This is my example so far: class MemberRawArrayVector { private: vector<unsigned char> MemberRawArray; public: MemberRawArrayVector(int …

Member Avatar for mike_2000_17
0
216
Member Avatar for Violet_82

Hi there, I am working on an accordion, I am more interested in the way it works, but I am having some problems. I worked on something similar sometime ago, and got some help in here, but I thought I will try to do it again on my own..and ehm, …

Member Avatar for Violet_82
0
89
Member Avatar for leyla

Hi, I have made a code where I write a recipe to a file and then I can read from the file and it is output in a listbox. I need to allow the user to change the amount of people served and then the quantities change to suit the …

0
118
Member Avatar for wallet123

hey guys i have done my codes and its working properly the only thing that's bothering me is that' when i input 52 and 'a' as my name, it wont ouput the right answer (it should be 'a' also) i hope you guys can help me thanks! public static void …

Member Avatar for JamesCherrill
0
140
Member Avatar for iEpic

This is driving me crazy. I downloaded netbeans and love it but for the last 5-6 hours i have been trying to figure out why my java programs is not showing images. When i open it with jGrasp the images and everything loads perfect. With netbeans it will not show …

Member Avatar for NormR1
0
255
Member Avatar for srinivas88

Hi, I am writing a script which will run a process in a while loop, i.e., user will execute `sh test.sh ` and the script will run a set of processes, I want to know how to kill the script which is having a infinite while loop in its contents. …

Member Avatar for L7Sqr
0
221
Member Avatar for arcticM

if I have a function with 1 param that is default, meaning if it isn't sent in the function call it get's it's value from the value I put in the function definition- like this: function func(a$, $b, $c=null){} I can call this function like this: func(1,2); //$c get's null …

Member Avatar for blocblue
0
134
Member Avatar for anuragcoder

Hi! I've encountered another problem, The code below is just the part of the code where the error occurs int FindStr(FILE *f, char *str) { int s_pos; //string position in the text int c_pos; //char position in the text char *string; char ccnt; //char count s_pos = -1; c_pos = …

Member Avatar for thunderox
0
11K
Member Avatar for PM312

i have programe where i use serial number for each document number. now i want to start serial number with one againe in new financial year, but restarting number with one result in duplication of reference number in database. how to get this.

Member Avatar for PM312
0
147
Member Avatar for Octet

I am creating my purchasing system for my game at the moment, but I am struggling on a part of it and wondered if any of you could offer me some guidance? The problem I am facing is adding X amount onto a value but if that means it goes …

Member Avatar for blocblue
0
213
Member Avatar for Djmann1013

Hi, I am having trouble with this chunk of PHP script: <?php $deny = array("Example IP"); if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) { header("location: http://www.google.com/"); exit(); } ?> It works fine, its just when I try to link to a file that has the $deny var, it wont work. I tried using …

Member Avatar for Djmann1013
0
247
Member Avatar for triumphost

Why does the following code skip the initialization of values of the temporary created? Box::Box() : X1(0), Y1(0), X2(0), Y2(0), W((X2 < 0 ? -X2 : X2) - (X1 < 0 ? -X1 : X1)), H((Y2 < 0 ? -Y2 : Y2) - (Y1 < 0 ? -Y1 : Y1)) …

Member Avatar for Milton Neal
0
231
Member Avatar for poloblue

Good Afternoon, I'm having some problems with a problem that deals with raising the power of an integer. So far I have this code. #include <iostream> #include <cmath> using namespace std; int main() { int num, bigNum, power, count; cout << "Enter an integer: "; cin>>num; cout << "What power …

Member Avatar for mike_2000_17
0
281
Member Avatar for poloblue

Hi, I trying to let the user input how many numbers that they want to average and outputting the average of those numbers. I have this code, but not working as aspected. #include <iostream> using namespace std; int main () { int numCount, total; double average; cout << "How many …

Member Avatar for triumphost
0
219
Member Avatar for Goomba79

Hello, I would like to tie a dropdown list to my dataset that i have populated from my database. however, there are repeated values in the datatable. my table is as below... BMNO CellName 123 office 242 office 678 production 290 production 101 productiom 890 stores 512 Goods In 514 …

Member Avatar for ndeniche
0
135
Member Avatar for sammoto

I'm trying to add the int values of Integer objects within an ArrayList, using a recursion (for the first time). Here's what I have so far: import java.util.Scanner; import java.util.ArrayList; public class SumArrayList { private static int calculateSumArrayListHelper(ArrayList<Integer> duplicate) { if (duplicate.size() == 0) { return 0; } int lastNum …

Member Avatar for curiousgeorgem
0
3K
Member Avatar for triumphost

I'm a bit confused atm, I don't know when to use const T& or T& or T as a parameter. Currently I'm doing: void Resize(std::vector<T> &Vec, const size_t &NewLength) //Ahh edited the function as a result of Lucaci's answer. { Vec.resize(NewLength); } //But thinking of doing: void Resize(std::vector<T> &Vec, size_t …

Member Avatar for mike_2000_17
0
3K
Member Avatar for sammoto

Hi again, I posted last week about a Go Fish game that I was trying to write - well I've sorted out my past issues and now I'm trying to rewrite my CardPile class (that defines such things as the deck or a player's hand) to consist of an ArrayList …

Member Avatar for sammoto
0
447
Member Avatar for debriscreator

Ok i think i'm getting closer to what I need.. Here's the error msg i'm getting. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table WHERE id = Stef Longo' at line …

Member Avatar for debriscreator
0
282
Member Avatar for trishtren

Hey, Iv been looking around google for the past few days to find ways to embed python 3.2 into my c++ application. I however want interpeter to be compiled into my application, so i can merely distribute one exe file without relying on the user to install python. However the …

Member Avatar for TrustyTony
0
286
Member Avatar for silvercats

What does main() function do in?wtz da difference between void main() and int main()?why should I use? extra two questions :- what first two lines, #include <iostream> using namspace std; do? thanks

Member Avatar for silvercats
0
874
Member Avatar for poloblue

Good Afternoon, I'm having trouble process 2-D arrays to store and process data. I have problems with implementing the void grading function and void showgrades function So far I have this code: Cpp file: #include <iostream> #include <fstream> #include <string> #include <cstring> #include <cmath> #include <cstdlib> #include <iomanip> #include "lab_20_head.h" …

Member Avatar for poloblue
0
1K
Member Avatar for veledrom

Hi, Code below works fine up to **hr**. For some reason, html code appears as is in textarea. It should first appear as notmal text. Anyone know why? Thanks <!DOCTYPE html> <html> <head> <style> p { margin:8px; font-size:20px; color:blue; cursor:pointer; } b { text-decoration:underline; } button { cursor:pointer; } </style> …

Member Avatar for veledrom
0
193
Member Avatar for Dudearoo

**Dudearoo** *Useing Code::Blocks* ok, ive got a somewhat simple error that i cant crack, First heres my code. #include <iostream> #include <cstdlib> #include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> #include <iomanip> #include <windows.h> // so to use strcmp #include <cstring> #include <fstream> using namespace std; int main() { ofstream …

Member Avatar for Lucaci Andrew
0
651
Member Avatar for Skate Bart

Okay, so here's my problem. I have a MS Hierarchical Flex Gird Control [fgdCompany] which is used to display records that are taken from a database. Everything works great but not the Delete button. What the delete button is supposed to do is when a record is selected in fgdCompany, …

Member Avatar for Skate Bart
0
231
Member Avatar for Skate Bart

hey there, Here's my complete code for a delete button that deletes a record in a Heirachical Flex Grid. Dim rsTour As New ADODB.Recordset Dim cn As New ADODB.Connection Dim strSQL As String cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=" & App.Path & "\Luckshan Tours & Travels.mdb;" & _ "Persist …

Member Avatar for Skate Bart
0
409
Member Avatar for adishardis

Hi, I have a database table filled with interesting data. On my webpage I would like to let a user pick two rows in the table and compare the data to see how it differs. Picking what rows to compare would be done by two dropdown lists. The data in …

Member Avatar for adishardis
0
134
Member Avatar for daino

I'm a little confused about how to go about creating a wrapper class? I think I need to start with the basics. What I want to do is write a C++ wrapper class for a C API. I know several of you could explain this well but I need to …

Member Avatar for daino
0
4K
Member Avatar for claywin

Hello everyone, I have a quick question! I've been program a little heavily lately on my first game in c++ and it got me thinking, how are you supposed to share your game as a closed source project? Thanks in advance!

Member Avatar for mike_2000_17
0
196
Member Avatar for ehpratah

hi i have a little bit of issue just thingking if somebody can give me a hand out here.. the issue is when i compute for a car rate..it will depend on the date of rental and the return date,which is already coverd the problem is it will not really …

Member Avatar for ehpratah
0
216
Member Avatar for iEpic

For my final project I have to develop a functional flowchart and write a menu-driven Java program, using control constructs and user-defined functions. My question is, what the heck is a menu-driven program?

Member Avatar for godzab
0
553
Member Avatar for LastMitch

Hi I'm having an issue with the **chmod**. I can't seem to excute the file. Everytime I upload a file and write something it keep saying "**Directory is not writable chmod(700)** Here is the code: function checkPath ($path) { if (!is_dir ($path)) { printSecurityText ("Directory does not exist: ".$path.""); return …

Member Avatar for LastMitch
0
188
Member Avatar for javedshaikm

Can some help me to convert the below xml data into php array. Thanks in advance. <dataroot> <content id= "1"> <quest><![CDATA[<FONT FACE="Arial">Which of the following is not the measure of a physical quantity?</FONT>]]></quest> <opt1><![CDATA[<FONT FACE="Arial">kilogram</FONT>]]></opt1> <opt2><![CDATA[<FONT FACE="Arial">impulse</FONT>]]></opt2> <opt3><![CDATA[<FONT FACE="Arial">energy</FONT>]]></opt3> <opt4><![CDATA[<FONT FACE="Arial">density</FONT>]]></opt4> <ans><![CDATA[a]]></ans> <ans_desc><![CDATA[<FONT FACE="Arial">kilogram is the name of the fundamental …

Member Avatar for cereal
0
340
Member Avatar for MasterHacker110

I have this code, but when i type in one comand and then the next comand it does doe the comand i type in but the first comand i typed in. * I think it is becuase i dont clean my vector string, if so how do i clean it. …

Member Avatar for MasterHacker110
0
243
Member Avatar for sarathsshanker

//ArrayListEx(main class) import java.io.*; import man.Phone; import man.Person; import java.util.*; public class ArrayListEx{ public static void main(String[] args){ Person p= new Person(); p.setName("yo"); ArrayList<Phone> pList = new ArrayList<Phone>(); Phone ph = new Phone(); ph.setOne("dasd"); pList.add(ph); System.out.println("sgs "+pList); } } My Program has a Person,Phone and ArrayListEx(main class) classes,Person contains an …

Member Avatar for sarathsshanker
0
2K
Member Avatar for zilonox

I have a DataGridView that is attached to a BindingSource that gets data from a SQL Server database. I can populate the DataGridView without a problem. I can even insert/update it without issue if I run the update code from a click event of a button. But where I run …

Member Avatar for zilonox
0
1K
Member Avatar for hszforu

when i use following code i do not get correct output: In this the function maxHeartRate returns an Integer value.Lets take it equal to 199. public String targetHeartRate() { double a = maxHeartRate()/2; double b = ((85/100)*(maxHeartRate())); String c = a+"-"+b; return c; } Using above code i get String …

Member Avatar for hszforu
0
201
Member Avatar for hwoarang69

trying to user left margin 50px on this link but it no working. index.php echo "<a href=\"zoom.php?img={$row['image_id']}\"> <b id='bold2'>" . $image_short_name_db . "</b></a>"; c.css .bold2 { margin-left:50px; }

Member Avatar for blocblue
0
101
Member Avatar for hwoarang69

i was thinkg some thingklike this. i have a database image->image_id, image, image_keyword, image_name ...etc index.php- search bar <form class='form6' method='post' action='search.php'> <input type='text' name='search' class='field2'/> //search bar field <input type='submit' name='search' class='button' value='Search' /> //submit button </form> search.php <?php include("include/header.php"); $i = 0; $search_p = $_POST["search"]; $terms = explode(" …

Member Avatar for hwoarang69
0
341
Member Avatar for aristos32

Hi all. I use the following js function to dynamically create an new <tr> and <td> in my table. Then I insert an <input>. : function testName(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); //firstname var cell1 = row.insertCell(0); var element = document.createElement("input"); element.type …

Member Avatar for aristos32
0
293
Member Avatar for triumphost

I have the following code to take a bitmap of a portion of the screen specified by the Box Area. Area is just a struct that holds Width, Height, X1, Y1, X2, Y2 and represents a box. Basically a RECT with additional features. For some reason, if Box is (0, …

0
88
Member Avatar for Krokcy

So i have a working network file transfer program now (if you want to see some of the code look at my other '[article](http://www.daniweb.com/software-development/java/threads/426357/networking-in-java-not-doing-it-right)'). But now that im trying larger files, im running into a problem where i run out of memory (which is understandable when the array is 1 …

Member Avatar for Krokcy
0
4K
Member Avatar for #include <lou>

Hi everyone, I am trying to pass the X and Y values that are in class Chart onto class NodeAvg, but cant come up with the code to do that.Any help appreciated: package Testing; import java.awt.Color; import java.awt.Paint; import java.io.IOException; import java.util.ArrayList; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.plot.DrawingSupplier; …

Member Avatar for NormR1
0
211
Member Avatar for iFrolox

Well i'll try to be clear as possible, i'm making like an account organizer (helper/tool) w.e you wanna call it, and for example i have 10 accounts. I want to delete account #5 (They are array), what i need it to do is move account #6, 7, 8, 9 & …

Member Avatar for iFrolox
0
2K
Member Avatar for bettybarnes

Hello guys I'm new to C# programming. I'd like to know what's the equivalent of this Java static to C#? class NMM { public static void main(String []args) { System.out.println("java"); } static { System.out.println("great"); NMM.main(null); System.out.println("programmer"); System.exit(0); } } Any help would be appreciated.

Member Avatar for bettybarnes
0
475
Member Avatar for *sharath*

am having a check box in my launcher activity. i need to enable it so that it helps in performing some action using a broadcast receiver. its working fine until and unless i use the back button to navigate back. but now i need to save the state of the …

0
111
Member Avatar for DarkMonarch

hey guys, any tricks that i can use to link a table row with an employee ID that comes from a db ? heres the menu code, where the link must happen, so i can call other functions like delete and modify. sorry it's french, supprimer = delete, modifier = …

Member Avatar for DarkMonarch
0
187
Member Avatar for mohan_m01

Generate XML from DataTable, along with count Hi, I have an sql result set assigned to a datatable. The result set is of the form ManagerId | VendorId | Count ------------------------------ M1 V1 10 M1 V2 5 M2 V1 10 M2 V2 5 M3 V1 10 M3 V2 5 I …

Member Avatar for Mike Askew
0
145
Member Avatar for Mikey12345

Hi Im trying to achieve something which seems simple but is proving difficult. I have listview1 which will display the values of two textbox's when a button is clicked. I have listview2 which will make a calculation based on the two values in listview1 when a button is clicked. What …

Member Avatar for Reverend Jim
0
166
Member Avatar for Suzie999

I'm currently concantenating an array like so... int _tmain(int argc, _TCHAR* argv[]) { //create buffer to receive path WCHAR pathbuf[MAX_PATH]; //get path into buffer DWORD pathlen = GetCurrentDirectoryW(MAX_PATH,pathbuf); //append file name to buffer pathbuf[pathlen++] = '\'; pathbuf[pathlen++] = 'f'; pathbuf[pathlen++] = 'i'; pathbuf[pathlen++] = 'l'; pathbuf[pathlen++] = 'e'; pathbuf[pathlen++] = …

Member Avatar for Suzie999
0
213

The End.