199,112 Archived Topics
Remove Filter ![]() | |
Please be patient with me for this is my time posting and I am still in the primitive stages of programming. I am using C++ VS. Thus far, the code I have written will prompt for a users first name, last name and telephone number(without dashes or parenthesis). The output … | |
First off, yeah I know there are many codes out there for this, but how can one learn without doing. Ok So we need to write a code to see whether two words are anagrams of one another. Here is what I have, it compiles but does not work. The … | |
Hello ! I have a database that shows about 5 to 10 recorrds on a page that contain forms for the user to fill out. The number of rows is unknown and depends on the user query. On the page there can be 2 or 10 records displayed ..each containing … | |
I'm trying to get what I put in the value for the database to output, however whenever I use a cout statement with the a.name I get an error on line 21 which is the line with the cout statement. I've done it the way it is in the examples … | |
Below is my code [code] string str2 = "1, 2, 3, 4, 5, 6, 7, 8"; string output; typedef std::tr1::sregex_token_iterator sti; const sti end; for(sti i(str2.begin(), str2.end(), regex(",\\s"), -1); i != end; ++i) { //output += "\"" + *i + "\", "; output += "\""; output += *i; output += … | |
I have a script that is using the internet protocol 'Curl' I am sending a http _POST to a php file. To send a post with curl, I need to make a char variable with all my info. for example "name=andrew&country=usa" Here is where the problem comes in - One … | |
I have a array called 'data' which is used globally as it is being used in other functions. Each data[i] has array of values like data[i]= "United States,Tennessee,Anderson"; Could some one please help me how put these comma separated values in a table. I was trying this in javascript: [CODE]data=new … | |
My name is Dennis, currently im doing my final year project for a system called " Records Management System" I'm using xampplite localhost phpmyadmin as my database SQL server. i face a problem in my system that shown a message: "Warning: Unknown: Your script possibly relies on a session side-effect … | |
[CODE] class example { public static void main(string args []) { Sysytem.out.printIn (This is a simple Java program....); } } [/CODE] I am using Windows Vista Ultimate I tried to rum this program in DOS shell...... Error 1 :Exception in thread "main" java.land.NoClassDefFoundError : example I tried to remove it...by … | |
Is it possible to have stuff echo'd based on the address in the address bar of your browser ? So like... if address in the address bar = index.php?page=21 then echo the below [code] echo "Page " . number_format($page) . " of " . number_format($totalpages) . "<br />"; $starting_user = … | |
I'm currently creating a PNG image from a random sql statment. Its just outputting text, but I was to limit the number of chars per line. I have this working, but its repeating the text to the next line. Below is the code on how I'm doing this. [CODE] imagestring($image, … | |
hello, I'm kind of new to the PHP-scene and I'm having difficulties with my first php-site the situation: I'm making a website were people view newsitems, these newsitems are stored in a database ("postgresql") every newsitem is stored in a category. i would like to create a list of every … | |
I get the error " no match for 'operator=' in '* n->node::child = root' in the "insert" method and I don't know how to fix it. I know it has something to do with pointers and the way I initialized the array. What I want to do is is put … | |
Hi everyone, I'm Dee :) I'm new here so please excuse me if I'm asking this in the wrong area. I must admit that I also know very little about PHP and techie stuff :$ so I'm after some help and guidance if possible. I'm getting an enormous database driven … | |
Hello. I am relatively new to C++ programming, and I have a question about a program that I am supposed to write. The assignment reads... Prompt the user for a word; call it SEARCH. Then begin reading words from the user, counting them until SEARCH is entered. Display how many … | |
HEY GUYS I'M WORKING ON A CALCULATOR USING THE SCANNER CLASS. HOWEVER THERE IS A CATCH TO IT I CAN ONLY USE ADDITION AND SUBTRACTION TO CALCULATE ANSWERS. I HAVE TO MAKE IT INTERACTIVE AND ASK THE USER WHAT FUNCTION THEY WOULD LIKE TO DO(1.ADDITION,2.SUBTRACTION,3.DIVISION,4,MULTIPLICATION) I'M GOING TO USE A … | |
hi im new to programming and i was told to create a dice game where a player rolls and the dice rolled will added to the total score until the score is reached its maximum limit but i cant get it to work.. my problem is i cant keep hold … | |
I have made revisions to my program. I gave up on the idea of using functions that return arrays. That was far too complicated for the expected benefit. This latest version compiles and runs correctly with all of the provisions required by the exercise. What remains is feedback on the … | |
This is the sample code my proffessor posted online [CODE]import java.applet.*; import java.awt.*; public class AnAppletSubclass extends Applet { public void init() { System.err.println("Hello from AnAppletSubClass.init - the current value of n is " + n); color = Color.green; } public void paint(Graphics g) { setBackground(color); System.err.println("Hello from AnAppletSubClass.paint-- the … | |
[edit] This code was originally posted [URL="http://www.programmersheaven.com/dow...3/ZipView.aspx"]here [/URL][/edit] The problem is to find all ways of placing n non-taking queens on a n by n board. A queen attacks all cells in its same row, column, and either diagonal. Therefore, the objective is to place n queens on an n … | |
Good day all: I have a mysql insert statement inserting data to db. The value of one of the variables is: [code] ' $_POST[servicedesc]')[/code] I want to be able to append the current date and time in front of this value and then insert into the db. This value will … | |
hi everyone, i am trying to use php mailer to configure emails in my website. im doing this website as my project so im using local wamp server. since wamp is not mail server im trying to use gmail with it. can anyone help me as to why im getting … | |
I am creating a login system for a website, this code itself works fine until I include this login file on the index page. Then everytime It is run it displays the following errors, Warning: Cannot modify header information - headers already sent by (output started at /home/swap/public_html/login script/index.php:11) in … | |
Hello, I am having some problems with IE and Opera browsers not displaying all my form select boxes, for example: Firefox (Working): [img]http://img577.imageshack.us/img577/6810/firefoxk.png[/img] Internet Explorer: [img]http://img600.imageshack.us/img600/7190/72404597.png[/img] My upload page: [code]<?php session_start(); error_reporting(0); require '../includes/functions.php'; require '../includes/mysql.php'; require '../theme.fol.php'; loggedinorreturn(); stdheader(); block_begin("Upload Torrent"); if(isset($_POST['submit'])) { $target = "../files/"; $target = $target … | |
I'm getting a few error codes on this part of my lab. I showed it to another colleague and he said that it should work as written. Maybe one of you can see the error that I'm missing. I'd love to be done with it and get it turned in. … | |
Hi guys, basically here pull out the data from database then creating taxt field automatically and submit into anther table. everything works fine but data not inserting in to the table. could you guys check my code please? [CODE]<?php $con = mysql_connect("localhost","root",""); mysql_select_db("uni", $con)or trigger_error('MySQL error: ' . mysql_error()); ?> … | |
Hi, I am trying to do something like this: [CODE] function showContent(toPopulate) { document.getElementById(toPopulate).innerHTML = "<a href='javascript:showOtherContent(toPopulate);'>show</a>" } function showOtherContent(toPopulate) {...} [/CODE] I am not able to send the variable toPopulate as an argument of function showOtherContent() in line 2 Thanks, Blaise | |
Hi, I have following questions, 1. I want to know that what is the difference between tcp tunneling and regular tcp client server chat program. 2. If I live in Sri Lanka, and I want to connect and pass data to a pc with a dynamic ip (a standalone one, … | |
I'm trying to input numbers in a binary tree with an array of random integers. But all I get is two numbers, and they are always the same! From the main: [CODE] const int length= 10; // This is used several places, hence the const int array[length]; // One of … | |
hey guys, i have a little problem i have got a method that removes the line of text in a file. for example if i specify a name and the name is on one of the lines in the file.txt it would remove it. what i want is that once … | |
Hi there, i just joined this forum in hope improving my Programming skills. Currently i have a college assignmnt. It is to create a dice game "There is a little known dice game which is played with a pair of dice and has the following rules: the player keeps rolling … | |
I need to create a large integer array but I am not able to increase its size beyond max int value. How do I create larger arrays? | |
Hi! I'm trying to create String array from ArrayList. This task seems to be trivial, however I have a problem because of using "interface". The code and error message are shown below. Please, give me some advices to solve this problem. Thanks! [CODE]public class Class1 { public List<myInterface> getAllTasks() { … | |
hey everybody ... well im facing this difficulty .. i made one project .. and im not able to .. create a jar for it my project consists of the following files a package Prj that contains all the classes along with it i have 2 files.. with contain some … | |
take a look here [url]http://www.gfln.org/default4.aspx[/url] now when u click on radio button 1(from 1 to 7) it generate 3 <TD> (two have text name and telephone and other have textbox which is server side control)on run time now problem is whne u click on any other radio button say greater … | |
Hello i've got a problem with "else" it says unexpected T_ELSE but i have no idea what could be wrong here [CODE]if ($id == "funkcijos") { if($vardas != "" && $slaptazodis != "" && $el_pastas != "") { $query = "INSERT INTO vartotojai SET vardas = '$vardas', slaptazodis = '$slaptazodis', … | |
I get a Segmentation fault error and I cant find what's wrong with the program. programs fails when it tries to execute this line "delete [] this->courseList" in operator = overloading function. [CODE=c] #include <iostream> #include <string> using namespace std; class Student{ private: //A string that stores the name of … | |
hi i want ot ask if i can run a php script in the same page where i put it i mean i do a forum with a code in the action tag which allow the page to run in the same page or is it posible to run only … | |
Hi! Does somebody know how to get the total number of MenuItems in JPopupMenu? I'm searching for something like, popupmenu1.getNumberOfMenuItems(). I need it for the FOR statement [CODE](for int i=0; i<popupmenu1.getNumberOfMenuItems(); i++) { ... } [/CODE] Thanks! | |
[CODE] import javax.swing.*; import javax.swing.JFrame; public class Ejer1 { public static void main(String [] args){ JFrame frame = new JFrame (Box); frame.setVisible(true); frame.setSize(300,300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel label = new JLabel(); JPanel panel = new JPanel(); frame.add(panel); frame.add(label); System.out.println("*********"); System.out.printf("%s\n%s\n%s\n%s\n%s\n", "* *","* *","* *", "* *", "* *","*", "* *","* *","* *","* … | |
I need to write a program that generates a magic square of an odd number between 3 and 15. I have written out this much code, and when i type in 3 for the number it gives me the correct square. but any other odd number it gives me an … | |
Need idea for start this program.....? Consider the following Student class specification: public Student() //CONSTRUCTOR Initialized the attributes public String name () This Student’s name public String address() This Student’s address public String matric () This Student’s matric number public int creditHours () Number of credit hours this Student enrolled … | |
ok... so I've decided to start work on a model converter... I'm a lousy Py programmeer and I'm trying to understand a few things... but first off: I want to store vert XYZ data in 'verts' as a list... say we have 3 verts, the var would look like this: … | |
| |
Hello Members, How do I change the code below sothat I can have the JLabel at the center of the JFrame and the two JButtons directly below the JLabel? Thank you! [CODE]import java.awt.*; import javax.swing.*; public class Layout { public static void main (String args[]) { JFrame m = new … | |
I have two tables in my db. One table contains portfolio images with a primay key set to AI. The other table contains all of the thumbnails that need to be associated with each portfolio image with no primary key. I'm trying to grab the last inserted id of the … | |
Hi! Could someone please tell me how can I create an obejct of the Class1 shown below? Let's say I want initialize the List of subjects. I try the following code, but it doesn't work: [CODE] List<ClassInterface> myInterface; myInterface = Class1.getAllSubjects();[/CODE] Thanks! [CODE]public class Class1 { public List<ClassInteface> getAllSubjects() { … | |
Hello; I would like to compress an 1D array of arbitrary number of elements. For instance if a user inputs IN : 111122233331 OUT: 14233411 [it shrinks/increases the array and replaces all the identical consecutive elements with a number of how many times theyve appeared.] This task must be accomplished … | |
Hi! My question is about JFormDesigner plugin for Eclipse. So, I opened JFormDesigner in Eclipse, added the ActionListener to the JButton and defined a procedure to be runned after pressing this JButton. Then I pressed "Build All" and runned the form (*.jfd file) from Eclipse. However, it seems that the … | |
Hello!! I'm trying to upload images and text onto my database but i have a bit of a problem... [QUOTE]Error, query failed 1136-Column count doesn't match value count at row 1[/QUOTE] I dont know if the problem is the script or the actuall database, I google it but I couldn't … |
The End.