64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for squarkman

I have a template for web pages which is asp.net Inside the content object or whatever it's called, it wish to place a simpe PHP form. I tried it and the PHP code doesn't seem to be recognized as PHP but as text. Can this NOT be done? [code=syntax] <%@ …

Member Avatar for serkan sendur
0
227
Member Avatar for Blackeagle

Hello, i'm working on netbeans and want to access my database using this code: [CODE=java] import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class connect { /** * @param args */ public static void main(String[] args) { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch (Exception ex) { System.out.println("error \n"); …

Member Avatar for Blackeagle
0
401
Member Avatar for kaushik259106

Guys, I was going through the book called Ajax for Dummies and got the following example. [CODE]<html> <head> <title>Ajax at work</title> <script language = "javascript"> var XMLHttpRequestObject = false; if (window.XMLHttpRequest) { XMLHttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { XMLHttpRequestObject = new ActiveXObject(“Microsoft.XMLHTTP”); } function getData(dataSource, divID) { …

Member Avatar for egbert
0
207
Member Avatar for kibosh

Hello, I'm trying to do something I thought would be very simple. I need to display a "degree" symbol as part of my PHP output, and I can't figure it out. I'm trying to use the ASCII &deg code. If I try: [code] echo &deg; [/code] I get an error. …

Member Avatar for Aamit
0
2K
Member Avatar for kyosuke0

the program i have to write involves a dynamically linked stack to evaluate if the grouping symbols '[B]([/B]' , '[B])[/B]' , '[B]{[/B]' , '[B]}[/B]' , '[B][[/B]' , '[B]][/B]' in expressions are balanced. The expression is input through keyboard. For example: expression: {A+(B-C)*D} is balanced expression: T+{(R+M)/G-V*L is not balanced expression: …

Member Avatar for kyosuke0
0
202
Member Avatar for xlx16

hello again i have three questions again: how can i use malloc or calloc for a two demontional arrays? is it true that A. calloc allocates memory in contiguous bytes, malloc does not ensure contiguous memory allocation? the third question which is a bit irrelevent to programming how memorey locations …

Member Avatar for Salem
0
371
Member Avatar for kodak

I have developed a program in an XP enviroment using Borland Builder 6. It has since been installed on a computer with Vista. The program opens text files which are stored in the root directory of the program. The pathname is set in global constants like "name.txt". This works fine …

Member Avatar for kodak
0
122
Member Avatar for Kavitha Butchi

Hi All, I am trying to set background image. I retreived it from the database into $xyzimage variable and then trying it to display in the <body > tag. When i am trying to display it a tabel cell like <td> it works, but not in <body> tag. Is there …

Member Avatar for Kavitha Butchi
0
2K
Member Avatar for VBNick

hi, I have used LoadImage() to load a bitmap as HBITMAP. If I use SelectObject() to attach it to an HDC, and then BitBlt() it to the screen, that works fine. I need an array that would be compatible with the one produced by CreateDIBSection(). I have tried GetBitmapBits(), and …

Member Avatar for VBNick
0
475
Member Avatar for tomtetlaw

Im testing out blit() and i ran into this error: [code=python] Traceback (most recent call last): File "/home/tom/Desktop/pygame/test/main.py", line 15, in <module> screen.blit('image.jpg', (10,10)) TypeError: argument 1 must be pygame.Surface, not str this is my code: import pygame pygame.init() running = 1 while running == 1: screen = pygame.display.set_mode((800, 600)) …

Member Avatar for tomtetlaw
0
2K
Member Avatar for koa636

error message cannot find constructor `lottery(int[])` import java.util.Random; public class Lottery { private final int NUM_DIGITS = 5; private int[] lotteryNumbers = new int[NUM_DIGITS]; private int[] userNumbers; private int matches; public int[] getLottery(int[] l) { // Create an array the length of l. lotteryNumbers = new int[5]; // Random object. …

Member Avatar for Ezzaral
0
115
Member Avatar for gothicmisery85

I am working on a program, and I can't figure out what I'm doing wrong. Any help would be appreciated. Here is what I have to do: [b] Write a procedure named St_concat that concatenates a source string to the end of a target string. Sufficient space must exist in …

Member Avatar for crunchy_frog
0
3K
Member Avatar for idontexist

I am trying to update my roguelike game, 'Get Out!!'. I have one simple question. How do I print an int at an xy coordinate using pdcurses and c++. i only know how to print char and const char[]. Thank you

Member Avatar for Salem
0
83
Member Avatar for cVz

Hey can anyone give me the query to retrieve a list of databases on a server rather than this query [code]SELECT NAME FROM sysobjects[/code] which gives me a list of tables ???? Thank you

Member Avatar for cVz
0
175
Member Avatar for meistrizy

Hello. Thanks in advance for helping a newbie. I am supposed to add a bottom loop (which I assume is a do while) that asks the user if he/she wishes to compute another series and as long as the answer is 'Y' or 'y' to iterate the loop until 'n' …

Member Avatar for meistrizy
0
59
Member Avatar for gm999

Hi guys, I'm quite new to C++ and I'm having problems with a simple operation. I have to resize an array of structs, but seeing as I am having a problem with the concept, i'll post an example with a simple array of integers. Please bear in mind that this …

Member Avatar for gm999
0
88
Member Avatar for stephen lowry

hi guys i have fairly good knowledge of vb6 but cant for some reason get my head around this i want to develop program where you can add multiple names (text string) then press generate and a name is randomly selected for quiz purpose , the name or string dos'nt …

Member Avatar for stephen lowry
0
79
Member Avatar for karang

Hi I have a virtual function setStartupDirectory() virtual bool setStartupDirectory(const SysString &sStartupDirectory) = 0; When I am calling this function setStartupDirectory((const SysString &)m_pApplicationFolderNarrow); I am getting this error Error 2 error C2664: 'setStartupDirectory' : cannot convert parameter 1 from 'const SysString' to 'const SysString &' Am I missing something

Member Avatar for sweeya
0
129
Member Avatar for murderotica

Hello there, I've been working with threads right and I'm kinda stuck with how to implement the BackgroundWorker while I drop a lot of files in my form. I'm having a hard time how to arrange my code, specially on how to deal with the DoWork event of the BackgroundWorker …

Member Avatar for LizR
0
110
Member Avatar for justted

Hello everyone, I am setting up a section of coding in which I need to add and subtract certain values to a mysql field. However ...the code only seems to add negative numbers (-13.0) as a postive number to the database and its really confusing me now! :( What I …

Member Avatar for justted
0
2K
Member Avatar for Jwhispers

I had to write a program to add two angles together. I've got the meat done, but i'm having a hard time figuring out how to code the program when i add the angles together so that when say Seconds is more than 60 it adds 1 to minutes. example: …

Member Avatar for Jwhispers
0
265
Member Avatar for namehere05

Ah right! Im on my first steps on c++, What Im trying to do is have this "basic node" class wich just take an id and from there usign inheritance make "linked list node" and "binary tree node" classes my code so far looks like this [CODE]void main() { sLink* …

Member Avatar for namehere05
0
113
Member Avatar for Awebb999

I just learned about bubble sort and still don't know how to make it work in my program I hope someone can help me. This is my task I should use parallel arrays (of size 20) for student name, student number, test score, and letter grade. The list must be …

Member Avatar for Awebb999
0
152
Member Avatar for cherryteresa

Hi there. I had to make a code to print out a Pascal Triangle. But I'm not getting it to display properly. For example, if the user types in 4, then it will print: 1 1 1 2 1 3 3 But it should print 1 1 1 1 2 …

Member Avatar for cherryteresa
0
293
Member Avatar for teddybouch

This one's got me really confused, but hopefully y'all will see something I can't for lack of experience and expertise. The following segment of code is part of a larger function that performs a Hough Transform on a series of coordinates to find lines described by the points. I'm looking …

Member Avatar for teddybouch
0
122
Member Avatar for VirusTalker

[ICODE] public static boolean member(Integer obj,SimpleList<Integer> l); // returns true if obj is a member of l, false otherwise { }[/ICODE] the question is how could I use recursion to show that there is a member of a list? I thought that maybe if (l.isEmpty()) {return false} else ? thanks

Member Avatar for VirusTalker
0
108
Member Avatar for Martin88

Hey hi I have a problem with to C++ programs for my final project, the problem is that i tried to make the code but first the C++ program say general protection exception i read some of this but i still think that the structure of my program is not …

Member Avatar for Martin88
0
201
Member Avatar for Freaky_Chris

Hi, i'm doing some work with double atm and i have what appears to be a simple expression. When i work this out in my head i get the answer to be 0. However running the code gives me a very obscure value -5.77338e-017 Any help as to what i …

Member Avatar for StuXYZ
0
263
Member Avatar for teddybouch

I'm having trouble with passing a linked list between functions. I did some research online and found a few things, one of which was here, that led to the conclusion that I am not passing my linked list by reference. However, I have tried numerous different syntaxes to do this, …

Member Avatar for teddybouch
0
116
Member Avatar for Dewey1040

I know there are multiple threads on Matrix Multiplication but all of them are either different from what i need, or are unanswered. I am trying to multiply two N x N matrices. The two matrices and N are all found in a file via argv[1]. I have spent hours …

Member Avatar for Dewey1040
0
151
Member Avatar for NinjaLink

Hello all, My objective is simple. I have to take in 2 positive integers and multiply them by using addition. This is a recursive problem. Example of Output: [B]Please enter 2 positive integers to multiply: 4 2 4 * 2 = 8[/B] The problem is whenever the user types in …

Member Avatar for mrboolf
0
756
Member Avatar for lmastex

Hi. Can you guys help me out with this link list method. The method issuppose to say if a list is in ascendent order or descendent order. I have this right now: [CODE] template <typename ListElement> int List <ListElement>::order() { NodePtr temp1; NodePtr temp2; temp1 = Head; temp2 = temp1->Next; …

Member Avatar for lmastex
0
136
Member Avatar for acperson

[B]*When I compile the program it works. However, when I try to run the program, it outputs the first message then gives me the following error-*[/B] CSCI112LAB2.exe has encountered a problem and needs to close. We are sorry for the inconvenience. [B]*And when I tried to debug it*[/B] Unhandled exception …

Member Avatar for acperson
0
2K
Member Avatar for StarZ

i have just been learning python(tuple) at school. And this is my first assignment. I can't seem to figure it out. The assignment is on this website: [url]http://schools.tdsb.on.ca/danforthcti/python/main.html[/url] Go to lesson 8>scroll down>its called programming Assignment 9. Can someone help me out? It's simple enough right? thank you!

Member Avatar for vegaseat
0
162
Member Avatar for Dewey1040

I have searched google and the forums here and I couldn't find what i need, if there is a thread somewhere just forward me to it. I am attempting to create a program that will prompt a user for a string. The program will not recognize this string to be …

Member Avatar for Dewey1040
0
206
Member Avatar for kiddo39

I have a small image with a black background and red lines in it and I need to count the red pixels. I know I need PIL, but I'm not sure which method to use. Then once I have the counts I need to equate them to a character, so …

Member Avatar for vegaseat
0
2K
Member Avatar for Kavitha Butchi

Hello all, For creating dynamic title tags, I tried using [code=php] <title>welcome<?php echo '$pagetitle';?></title> </head> <body> : : <?php : $pagetitle = '$row[2]'; ?> //closing rest of the tags. [/code] I get nothing displayed on title ! So i changed the code to, [code=php] <html> <head> </head> <body> : : …

Member Avatar for Kavitha Butchi
0
210
Member Avatar for acperson

I wrote a program for a class assignment that is supposed to use random number generator to produce sentences. The program has to use four arrays of (pointers to char) and each chosen word must be concatenated to the previous words in an array that has to be able to …

Member Avatar for acperson
0
3K
Member Avatar for ITlang007

Hi everybody, I'm really new to java and I'm not sure how to do this, //Create an ArrayList of String type to hold first names of the students I created mine like this.... ArrayList<String> first = new ArrayList<String>();

Member Avatar for ITlang007
0
145
Member Avatar for ctaroz

can somebody help an old man? I started to study Python and I'm OK with IDLE. But I cannot understand how to use it as a server language with my local server Xitami (that I use very well with PHP). Please help me: I need very clear instructions Thank you, …

Member Avatar for ctaroz
0
171
Member Avatar for dr.eu

Hi! I have to write program, who print Triangle made with numbers from 1 to 9,like this: 1 21 321 4321 54321 654321 7654321 87654321 987654321 I wrote code: [code] #include <iostream.h> #include <stdlib.h> int main() { int first, last; cout << endl; for (first = 1 ; first <= …

Member Avatar for dr.eu
0
181
Member Avatar for polo_coins

I discovered that there is a such class like StringBuilder but I don't find any thing that convince me to use it. Explain me it's advantage and disadvantage and if you gave some examples I like to see them thanks a lot Sergey

Member Avatar for polo_coins
0
85
Member Avatar for wad

[CODE]<script> function asd(){ var msg = document.getElementById('email'); alert(msg); } </script> <form> <input type='text' id="email"/> <input type='button' onclick='asd()' value='<' /> </form>[/CODE] onclike return that message Object HTML Input Element

Member Avatar for freeonlinedatin
0
91
Member Avatar for Demonisya

Hello..... I want to ask you something..... My teacher gave us our final exam last October 16 & 17.... I want to ask you about this question: Create a program that could show this output * *** **** ****** using while or for..... what I put in my answer sheet …

Member Avatar for Demonisya
0
174
Member Avatar for pochacco

#include <iostream> using namespace std; int main() { double num_one, num_two, num_three, num_four, num_five, num_six, num_seven, num_eight, sum, product, average; char ans; cout << "Please enter eight numbers: "<< end; cin >> num_one >> num_two >> num_three >> num_four>> num_five >> num_six >> num_seven >> num_eight; cout << "The sum …

Member Avatar for Salem
0
127
Member Avatar for benji_k

Help! I'm trying to solve a quadratic equation I keep getting the error : term does not evaluate to a function taking 1 arguments Heres the program. I highlighted the problem line // Macros 3 - finding the root of a quadratic equation // ax^2 + bx + c --> …

Member Avatar for benji_k
0
145
Member Avatar for sid78669

This one is really crazy cause i think my professor screwed it up. I have to write a class Bank. It contains objects savings of class Account. now say i have a savings array and a savings object has [code=cplusplus] Account savings = new Account[5]; //How do i return the …

Member Avatar for sid78669
0
213
Member Avatar for MattEvans

If I add default arguments to the end of my copy constructor, is it still considered a copy constructor? E.g. will it still be used in the places where a copy constructor would normally be used (or automatically generated). I can verify that it works on one compiler (g++). That …

Member Avatar for MattEvans
0
222
Member Avatar for christiangirl

I'm having trouble making this program with linked lists work. Where I am having a problem is in printarea() [code] //**************************************************************** // This program tests creating dynamic linked list of // several Dynamic (descendents) // It uses: shape1.h header file // Filename: prtshape.cpp //**************************************************************** #include <iomanip> #include <iostream> #include "shape1.h" …

Member Avatar for christiangirl
0
155
Member Avatar for Nanz

Hello all. I want to craete a empty double dimensional array. Later i will get the row and column length. But row length varies each time program. But i will be having the lenght of the row. So hoe to write a generic code for creating a empty 2D array …

Member Avatar for jlm699
0
63K

The End.