199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for martinjcloud

Hi im trying to allocate memory using malloc(). Also, im trying to make a copy of the string before i allocate it. So im using strcpy(). But im still having issues with compiling it. please help!! [CODE] #include <stdlib.h> #include "setup.h" char *run( const char * const str ){ strcpy(str) …

Member Avatar for martinjcloud
0
139
Member Avatar for bigjoke

how can i REPLACE back slash in my string (file path) with forward slash. please help. str_replace doesnt seem to be working!

Member Avatar for sallecpt
0
198
Member Avatar for dilbert_here00

Hi All, I have a popup window, which shows up after double clicking an installer. This window has 3 buttons: Back, Next & cancel. Using win32api I am able to get the window handles for all three buttons. I need to find out which of the buttons is enabled or …

Member Avatar for dilbert_here00
0
186
Member Avatar for ephemeral

I'm having two Ajax-related problems on a page I am working on at the moment. [URL="http://www.utm.edu/departments/acadpro/library/openmic/add2db.php"]http://www.utm.edu/departments/acadpro/library/openmic/add2db.php[/URL] On this page, I have two buttons that use Ajax to fetch two separate forms and put them into a chosen div; that part works like a charm. On said forms, there is a …

Member Avatar for Airshow
0
154
Member Avatar for ss.jatinmehta

I have one join query with 3 tables, which takes lot's of time to execute. I need to reduce execution time i.e., optimize it [code] QUERY: SELECT SQL_CALC_FOUND_ROWS p.*, FLOOR(p.prodratingtotal/p.prodnumratings) AS prodavgrating, 0 AS prodgroupdiscount, pi.* , (IF(p.prodname='gold', 10000, 0) + IF(p.prodcode='gold', 10000, 0) + ((MATCH (ps.prodname) AGAINST ('gold')) * …

Member Avatar for rch1231
0
142
Member Avatar for idlackage

Dumb question, but I've searched everywhere and found nothing specific: is it possible for HSB values to translate directly into a colour (eg. a hue of zero equals red) instead of passing them through an RBG conversion? Also, dumber: I'm not understanding the arrrays people are using, for example [URL="http://www.squarebox.co.uk/users/rolf/download/ColourWheel/ColourWheelApplet.java"]here[/URL] …

Member Avatar for idlackage
0
97
Member Avatar for NicAx64

hi all, I think I had done enough googling on this.But unable to get a proper explanation.Even there's not a wiki page exists there. So I need your help in advance. what is pre-rendering that coming with the AMD FUSION?I need to someone to explain it's architecture,and its ins and …

0
156
Member Avatar for deanus

Hi I've just started out in c++, can anyone tell me how to use pointers which hold addresses of objects ? How do you access the object fields from this type of pointer, especially strings (array of chars)... I'm using a Dev c++ 4.9.9.2 compiler....

Member Avatar for deanus
0
107
Member Avatar for zeke188

[code] <?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name="comment"; // Table name // connect to the mysql server $link = mysql_connect($host, $username, $password) or die ("Could not connect to mysql because ".mysql_error()); // select the database $db_found = mysql_select_db($db_name) or …

Member Avatar for colweb
0
113
Member Avatar for SureshM

Hi Guys, When I am using XML version in the XHTML, then I am getting parser error [Parse error: parse error, unexpected T_STRING on line 1]. <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <title>Testing Page</title> </head> <body> <p>Hi</p> </body> </html> When …

Member Avatar for twohawks
0
298
Member Avatar for falsedimitrii

I want to enable/disable a table cell based on the contents of another cell. e.g. if the reference cell value is "true", then enable the cell, otherwise disable the cell. I have set up isCellEditable() to do this and it works if the reference cell already has a value when …

Member Avatar for falsedimitrii
0
2K
Member Avatar for triplea_2005

Write a Java Class file for the class Account that represents a bank account. Usually, a bank account has a unique account number that is used to identify it. Your class should generate the account number automatically whenever a new account is created. The class should also store the account …

Member Avatar for triplea_2005
0
206
Member Avatar for bucwet

Hi all, This is a script that reads in text from a file and separates it into characters. It works fine as long as MAXSTRLEN is under 610000. However, I need it to read in whole books of text. Whenever I try to bump that number up above 610000 or …

Member Avatar for bucwet
0
237
Member Avatar for habib_parisa

Dear all, I am writting a code for high dimensional chebyshev interpolation. Since it is high dimensional, I MUST use extremely large arrays. Something like this: [CODE] #define DIM (int)2 #define TOTAL_STEPS (int)30 int main(){ double *a_data; long long a_dim; /** length of matrix a_data **/ int n; /** # …

Member Avatar for jephthah
0
188
Member Avatar for Takarakujin

I want to hold user input strings in an array and be able to print it. Is there a way for me to hold string 1 in arr[0], string 2 in arr[1] and so on and so forth? heres what Im thinking [CODE] int p=1, r=3, l=0; char arr[255]; while(p …

Member Avatar for Software guy
0
81
Member Avatar for johndoe444

It is said in many places that comparing two floating numbers for equality can give wrong result and we have to take into account some epsilon value like this float f1,f2; if (f1-f2<epsilon) printf("gotcha"); So what is the reasonable estimate of epsilon? My intuition is that that has to be …

Member Avatar for jephthah
0
185
Member Avatar for kwazy2010

Please i need some suggestions on how to develop a web based forum application...am not sure if to use ASP.net or php...

Member Avatar for SheldonC
0
165
Member Avatar for Lukezzz

Hello, I am opening a new Form in my application and want to pass along a variable to Form2. I think I am pass along it correctly but are not sure how to receive it in Form2. How will that be possible ? [code] String^ ForwardVariable; private: System::Void button1_Click(System::Object^ sender, …

Member Avatar for Lukezzz
0
268
Member Avatar for wittykitty

I have been trying to figure out for the life of me what I am doing wrong here, and I am coming up blank. My operator is returning the correct value in temp - as you can see highlighted in red, however, when I use the operator in main - …

Member Avatar for wittykitty
0
117
Member Avatar for CodyOebel

So far no one has been able to tell me why this code is not working, or what I need to do to THIS code to make it work. Can someone simply show using MY code below where the problem is, and why it's not working properly? Problem: I am …

Member Avatar for n.cramp
0
2K
Member Avatar for johndoe444

how does long and long long differ? The machine I am using has core 2 duo processor. It shows the same size (8 bytes) for both of them. Was short type ever was 1 byte and changed to 2 bytes later on? Was long and int ever was 4 byte …

Member Avatar for Ancient Dragon
0
204
Member Avatar for roin14

using switch and if ... else statements, write the two grading programs. consider the following grading system; 70-100 A 60-69 B 50-59 C 40-49 D 0-39 F

Member Avatar for Robert1995
0
118
Member Avatar for artanbori

Hi struggling with java - we have a class Structures and Algorithims in which we are supposed to pick up java in 5 weeks Have been pouring over material and searching sites but trouble is when I start to write ends up nothing seems to work unless we copy and …

Member Avatar for artanbori
0
312
Member Avatar for nichedge

hey, im having trouble making a python program run using a window, honestly i dont even know where to start. I have to make a coffee program where there is a menu and the user has to choose between adding, modifying, searching, showing, and deleting any entrys made to the …

Member Avatar for nichedge
0
598
Member Avatar for johndoe444

In the following code: [CODE]#include <iostream.h> class Base { public: Base(){ cout<<"Constructor: Base"<<endl;} ~Base(){ cout<<"Destructor : Base"<<endl;} }; class Derived: public Base { //Doing a lot of jobs by extending the functionality public: Derived(){ cout<<"Constructor: Derived"<<endl;} ~Derived(){ cout<<"Destructor : Derived"<<endl;} > }; void main() { Base *Var = new Derived(); …

Member Avatar for Narue
0
167
Member Avatar for johndoe444

In some c++ source code I wrote this: [CODE]#include <iostream.h> using namespace std; [/CODE] [CODE]error: iostream.h: No such file or directory[/CODE] I compiled it using g++. But when I changed it to #include <iostream> it started working. Why?

Member Avatar for craig_ka
0
145
Member Avatar for SMHouston

Ok, I'm creating working on a black jack game. A very simplified version that doesn't have a dealer. Just the user and they either hit black jack or bust basically. I have the code written for a deck of cards, then shuffle it and place it into a text file. …

Member Avatar for SMHouston
0
292
Member Avatar for prade

hii i just downloaded a dev c++ compiler...& wrote the basic hello world program...whenever i try to compile ..my quickheal antivirus deletes it as a trojan...please help..i reinstalled it but gives the same result

Member Avatar for Ancient Dragon
0
171
Member Avatar for SDS20

Hi, im having a problem with a custom control in asp.net I've googled but I cant find any solution, maybe the people here can lend me a hand. Here's the code [CODE] public Table generateControls(GeoData geodata) { Table table = new Table(); Label StrAddress = new Label(); Label Localty = …

Member Avatar for SDS20
0
129
Member Avatar for Slobodino

I need an algorithm for the following problem: There's a tree with N fruits each with its own weight w[i] and height h[i]. I can only reach a fruit if it's no taller than H inches. Also every time I pick a fruit, all the other fruits in the tree …

Member Avatar for craig_ka
0
131
Member Avatar for simbomatic

Hello, I'm curious to know whether it is possible to expose the functions of a C# application so that they could be used by another C# application in runtime. The thing I am referring too is quite similiar([I]might even be the same[/I]) as using an API. I have searched on …

Member Avatar for simbomatic
0
988
Member Avatar for scrappy57

hai friends can anyone give me an example of a program to hash using crypt(3) thanks linux learner.

Member Avatar for jephthah
0
389
Member Avatar for ItecKid

Hello, I am attempting to use JavaScript to 'highlight' text by changing it's background color: [code] <div id="foo" onMouseOver="highlight(this);"></div> [/code] In JavaScript: [code] function highlight (word) { document.getElementById (word.id).bgColor="blue"; } [/code] This produces no effect. I also have an onClick event in the same div, can I not have onClick …

Member Avatar for ItecKid
0
3K
Member Avatar for zeke188

Hi I have a table with info that I want to read and display. I can read it and display but I cant seem to format it can anyone tell me whats wrong. [code] <html> <head> <title>comment</title> </head> <body> <form action="postcomment.php" method="post"> name: <input type="text" name="name" ><br> comment: <textarea name= …

Member Avatar for zeke188
0
143
Member Avatar for dragos13

<?php $link=mysql_connect("localhost", "root","parola") or die("Could not connect: " . mysql_error()); mysql_select_db('energiesolara',$link) or die ('Can't use energiesolaradb: ' . mysql_error()); $x=mysql_query("SELECT umiditate FROM parametrii"); while($info=mysql_fetch_array($x)) { $comma_separated=implode(",",$info); } print "$comma_separated"; ?> I want that $comma_separated to store all the elements.But when I print that there is only one element which is …

Member Avatar for johny_d
0
95
Member Avatar for theABCasian

hey everyone ok so i have reached another road block any pointers are much appreciated the program will not compile due to eclipse not liking the int Password::passwordNumber(int i); int Password::passwordCapLetter(int i); in the .h any ideas demp.cpp [CODE] /* File Name: Demo.cpp Chapter No. 12 - Exercise No. 12 …

Member Avatar for mitrmkar
0
172
Member Avatar for big_ch98

I keep getting that error when I open my form in which I have control that are dynamically created. ERROR 340: Control array element 0 doesn't exist

Member Avatar for billmaster
0
2K
Member Avatar for shantuli

hi, can anyone help me to solve the following java problem write a java program for holding a stack of up to 10 characters. pls help me. thanks you shantuli

Member Avatar for usurph
0
103
Member Avatar for chetanbasuray

I am taking date of birth as input from my form and storing it, I need to calculate the age from this date of birth. While this problem seems easy(I haven't tried it out for myself,used one of my friends code) I also need to increase the age of the …

Member Avatar for ddanbe
0
101
Member Avatar for Kruptein

I'm learning pygame and followed a tutorial about a pong game. Everything is from the tutorial except the score system, I implemented. It does work, but instead that the score is updated, the new score is printed over the previous score.. Which isn't a nice view. How can I solve …

Member Avatar for IsharaComix
0
285
Member Avatar for kenji

Hi, I'm trying to use the built in gcd method to calculate the gcd for two values. Unfortunately I can't seem to import the right module to get the method. [code=python] from fractions import Fraction ... x = gcd(a,b) [/code]

Member Avatar for kenji
0
184
Member Avatar for toll_booth

I'm trying to code the game of minesweeper. For some reason, the image won't display properly--and it isn't a case of a missing file, b/c I have a try-except code snippet that is set to print out an error message should this occur, and that isn't happening. So either it's …

Member Avatar for toll_booth
0
489
Member Avatar for picabodaddy

Trying to learn Java on my own with the book "Starting out with java" The question is this Write a class that has three overloaded static methods for calculating the areas of the following geometric shapes: circles rectangles cylinders (it gives the formulas for the are of them) Because the …

Member Avatar for vchandra
0
3K
Member Avatar for evansjahja

Guys, I need help When I compile my code, I get [code]error: invalid operands to binary ^ (have ‘float’ and ‘double’)[/code] Here's some portion of my code: [code=c] #include <stdlib.h> #include <stdio.h> ... float freq; const float key_magic = 2 ^ (1/12); ... freq=440*(key_magic)^(atof(optarg)-49); [/code] Thanks

Member Avatar for 0x69
0
3K
Member Avatar for lewashby

Running Mono on Ubuntu 9.10 Main.cs [CODE]using System; using SdlDotNet; using SdlDotNet.Core; using SdlDotNet.Graphics; using System.Drawing; namespace TroutWars { class MainClass { public static void Main(string[] args) { Video.SetVideoMode(1024, 768); Events.Quit += new EventHandler < QuitEventArgs > (Quit); EventArgs.Run(); } void Quit(object sender, QuitEventArgs e) { Events.QuitApplication(); } } }[/CODE] …

Member Avatar for lewashby
0
1K
Member Avatar for firstimer

Hi all, I am new to C# and the visual studio express environment. I have a button on this web page, when it is clicked a method assigns a new random number to a variable but I want new clicks to add numbers to what was in the variable and …

Member Avatar for firstimer
0
136
Member Avatar for ischuldt

I wrote this distructor one way, but the person who code reviewed it seems to think it's better and more readable the other way. I disagree. It's probably more a matter of preference, but what do you think... [code] RfPrinter::~RfPrinter() { if (!hub_.empty() && !name_.empty()) { clearbuf(rfunitlock); rul_hub = hub_; …

Member Avatar for Fbody
0
136
Member Avatar for cliffordpg

my website layout breaks up when users zoom to +125% and to -65 in IE and ++2 and --2 in Firefox. Is there any way of fixing this? Website was developed in PHP and uses CSS. I know I'm not the first person to face this but I can't find …

Member Avatar for cliffordpg
0
93
Member Avatar for allaboutdrew

I am recently new to C++ and I wondered if someone could show me how to modify my program below. I want the program to test if there is more than 1 day that has the highest rainfall and susequently to output those corresponding days. Than you :) [CODE]#include <iostream> …

Member Avatar for gnarlyskim
0
125
Member Avatar for Atomika3000

Is it possible to name a cookie in javascript? i've got a web program that will display "name:undefined Name:Jack Grade:32" whenever i display the contents of a cookie i create. i'm assuming th first bit is the cookie name itself and then the other two bits are the contents? also, …

Member Avatar for Atomika3000
0
109

The End.