199,114 Archived Topics
Remove Filter ![]() | |
Hi all, i am not an experienced Java GUI programmer and its the first time i'm asking for help in programming on a forum. I have this simple GUI which allows people to mark text with different categories. I use JTextPane and DefaultStyledDocument. Basically, i took most of the code … | |
I'm programming my own game at the moment, its connecting to a server and the server sends some spawn info and eventual other players who are connected. When a player moves, and an other player is also connected, the client of Player2 crashes. I don't know what is causing this, … | |
I am trying to put the results of my query into a table on my webpage that i have made however, i am having problems as it prints some of the code out onto the webpage & doesn't display the table. [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html … | |
[CODE] $result = mysql_query("SELECT * FROM Users") or die("could not select ".mysql_error()); if (!$result) { echo 'Could not run query: ' . mysql_error(); } $rows = mysql_num_rows($result) or die("no rows" . mysql_error()); if ($rows > 0) { $row = mysql_fetch_assoc($result); while ($row = mysql_fetch_assoc($result)) { print_r($row); }[/CODE] Every time I … | |
Hi , my program connect to old machine , the program received data but with many symbols and unnecessary characters any suggestion thanks this pic is the differnce between old program (VB) that receive with arranged characters : [IMG]http://i42.tinypic.com/2z9ch1d.jpg[/IMG] | |
How do I make system calls in Java? I could do it in C but I'm not sure how to do it in Java. Thanks!! | |
I'm new to Assembly and trying to write a program that requires a simple graphic display: a 10x10 grid of "|##|" . I need to make changes to it and redisplay it every so often. I can get it to display perfectly once but the second time I call the … | |
When a user logs in, the user is directed to a page called accountsummary.php. I have sessions enabled. I can successfully echo the inputed username, and echo the ENTIRE column of firstname and lastname for the entire table. The problem is that I do not want to echo the entire … | |
Hi guy, i have this little program: [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <unistd.h> //Obtem o nome do buffer de trade baseado na hora char *btfile() { char *fname; fname = malloc(14); time_t t = time(NULL); struct tm *lt; lt = localtime(&t); strftime(fname, 14, "%m%d%H%M.tbf", lt); … | |
Example: [CODE] class foo { public: void DoNothing() { cfee.AddNothing(); } }; class fee { public: void AddNothing() { int a = 0; a += 1; } }cfee;[/CODE] Is there a way to call a function in a instance of a class that was declared after the creation of the … | |
Hi, I have really weird layout problem. I have a class VerticalGridPanel, which uses GridBagLayout to place components top to bottom, left to right, nothing special. Then I have a List of components, which i want to add a part of to a VerticalGridPanel. I then want to add another … | |
Hi Everyone, I'm really fed up of working on C in Windows Vista. First and foremost, the window of C occupies only half the screen which is very annoying. I've heard that there is a distinct C that is used with Vista but I have failed to attain any more … | |
I have the following AJAX script: [code=javascript] function callAHAH(url, pageElement, errorMessage) { document.getElementById(pageElement).innerHTML; try { req = new XMLHttpRequest(); /* e.g. Firefox */ } catch(e) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); /* some versions IE */ } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); /* some versions … | |
I habitually compile after every change I make, i had all of 5 minutes to start a project and this will not compile!!: [CODE] public class Battleship{ public static void main(String[] args){ int boardInput = parseInt(args[0]); } }[/CODE] I get this error: Battleship.java:19: cannot find symbol symbol : method parseInt(java.lang.String) … | |
[code] private void button1_Click(object sender, EventArgs e) { n = Convert.ToInt32(textBox1.Text); for (; i < n; i = i + 2) { textBox2.Text = textBox2.Text + " " + Convert.ToString(i); ; } } [/code] I an mentioning that i,n=0; is located in the declarations zone of InitializeComponent(); I get the … | |
syntax error, unexpected T_STRING in /home/earning1/public_html/wordpress/wp-content/themes/DavidGoldSmith_Theme/sidebar.php on line 40 Don't see the error???[code]<div id="cat_top"></div> <div id="sidebar"> <div class="rsidebar"> <div class="blog"> </div> <div id="photo" class="picture"> </div> <p> <?php wp_list_pages('title_li=<h2>David's Links</h2>' ); ?> <ul style="line-height:18px;"> <li ><div ><!-- SiteSearch Google --> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> <a href='http://davidgoldsmith.com/wordpress'>Home for David's Blog</a> </td> … | |
Can someone please tell me what im doing wrong in this program..im gettin a compiler error saying: C:\Dev-Cpp\projects\proto.cpp In function `int main(int, char**)': 46 C:\Dev-Cpp\projects\proto.cpp a function-definition is not allowed here before '{' token 46 C:\Dev-Cpp\projects\proto.cpp expected `,' or `;' before '{' token C:\Dev-Cpp\projects\Makefile.win [Build Error] [proto.o] Error 1 The … | |
This program I thought was working fine. It reads something I type in then it's supposed to break up the words (or random letters) separated by a " " and pop them into array [B]arr[/B]. It works, well sometimes... I don't know what's stopping it and them other times allowing … | |
So what im doing is actually in php, but just wanted to know whats the working logic of what im trying to do. I currently have 2 servers(virtual machines). i have a php file in ubuntu server that calls some other files on the windows server and vice versa. as … | |
hello guys, i need ur help in converting NFA to DFA DFA Algorithm : s <- s0 { start from the initial state } c <- nextchar { get the next character from the input string } while (c != eos) do { do until the end of the string … | |
Hello. I am asking for help. I have 2 input files containing sorted integers. These 2 have to be concatenated into a third file and now all the integers must be sorted. (Example: file1 contains 1 5 8, file2 - 2 3 6 and file3 must contain 1 2 3 … | |
I have a C# console program that generates Excel files and writes extracted data from SQL tables into them. Program is scheduled by Windows Scheduler to run periodically. Problem is that when scheduler fires up the program, it goes through the steps and logs that completes successfully. However, no file … | |
Hi all, I'm really not at all experienced with C++, but I have some changes to make in code that used to be maintained by someone else. The code that exists may not be the best, but I'm not looking to totally re-write the widget because it works for us … | |
We have an assignment to convert infix to postfix. And I have made this initial code. When this program is executed, I'd type any word that is not an operator or '(' or ')'. For example my input is "asd" my output should be "asd" also. But in this code … | |
![]() | I am kind of new to php. However, I created a form in html and the form action is linked to a php which all on the localhost. When I run the html file enter in information and hit submit. A window pops up and asks me if I want … ![]() |
7. Write a simple C++ program that performs addition, subtraction, multiplication, division, exponentiation, base-10 logarithm, and factorial operations. The program should start with a menu letting the user to choose one of the eight operations the user wants to perform. A sample menu is given below (hint: use loop to … | |
hi every body....... here i want to ask something about base64 algorithm which is used for the encryption of passwords.........i just want to know that how it works ?????what are the functions used in this algorithm?????any type help.....any link...???? | |
hi i have used three classes to make link list in java lean list as interface, Basic list got the constructor etc , and Demo basic test i need the function to be added in the demo basic list to complete the program. the following code for classes are as … | |
i am using a GridBagLayout and it works fine when i take my coordinates to place an asterisk on the frame but if i try to extract the coordinates from an sql table then it just displays one single asterisk and which would be in the center.. and if i … | |
hi guys......can you please give me the full working code of the program, because i also encountered the same problem.....but i don't know where to put clientsocket.close() and the other corresponding code. i new to vb.net AIM:1. when the user click on a disconnect button, the communication stop and user … | |
Hi, i have error in line: "student.Add(info);" Error 1 Use of unassigned local variable 'info' [code="C#"] public struct Students { public string Name; public int ID; public string Date; }; static void Main(string[] args) { ArrayList student = new ArrayList(); Students info; info.Name = "Marko"; info.ID = 12; student.Add(info); foreach … | |
my program cannot update the value,but it can show the value of the database Thank you [code] <?php require_once('../Connections/connection.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) … | |
is it possible to get values from a asp.net to a php script? | |
i have the next string array {10100100, 11010000, 01000001, 11011000, 00000000, 10111100} how can i convert it to byte[]. i tried bitconverter and some encoding options it didnt work. Any ideas? | |
Hey guys. Can anybody tell me what is wrong with this line of SQL? I keep getting a syntax error message. Here is the line: [CODE]prepStat = connection.prepareStatement("INSERT INTO WeatherHistory (Date, Location, Overview, Temperature, WindDirection, WindSpeed, Pressure) VALUES ('"+date+"','"+location+"','"+temp+"','"+windDir+"','"+windSpd+"','"+pressure+"')");[/CODE] All the field names and variables exist correctly, so I really … | |
Here I have a program called Connect4Model. Basically what the problem is that I have successfully compiled the program in TextPad. However when I run the program it throws up an Exception in thread "main" error. I fully understand what this error is, and it basically means that I'm missing … | |
hi all, i need to display only date in the createddate column and updateddate column. but iam getting 0000-00-00 00:00:002010-03-26 in the browser and in backend like 0000-00-00 00:00:00 so i need a help. [CODE]<?php ob_start(); @session_start(); require_once ("check.php"); createsessions($username,$password); $con=mysql_connect("10.70.1.50","invensis","invensis"); if(!$con) { die('Could not connect: ' . mysql_error()); } … ![]() | |
I'm a programming noobie, been programming for only a couple months. The other day I had the idea to write a small application where it would minimize Skype automatically after a call was terminated or over. I have no experience using API so I've been doing my research on the … | |
I've been working on something with alot of iteration (foreach) and now that everything is working I'd like to optimize it by changing it to link. Currently I am trying to translate this foreach code to LINQ [CODE] int count = 0; foreach( string file in Directory.GetFiles( path )) { … | |
i want to develop a c++ program that may take a visual input like a graph and then manipulate it to find whether its a planar graph or not....i am well versed with the algorithm to do this...just want to know that how can I read the input from a … | |
hey guys... Thanks for your help in my previous post. Havin another problem in my stack assignment this time.. Have done how much i could but there is a lil error in it.. Possible in the [B]convertip[/B] function... Hope i can get the help needed.. Thanks in advance...=) [CODE]#include <stdio.h> … | |
public class Connect4Model { Connect4Column [] columns; // Cannot find symbol private int NUM_COLUMNS; private int NUM_ROWS; private int playerToGoNext = Connect4Column.RED_COUNTER; // cannot find symbol Connect4Model(int numCols, int numRows); // Missing method body...Is this because I'm missing a curly braces just above { columns = new Connect4Column[NUM_COLUMNS]; for (int … | |
Hi so I wanted to make a little quiz in php [CODE]if(isset($_POST['City'])) { echo "<strong>Answer nr1:<BR></strong>"; $cities= $_REQUEST["City"]; $odp = "Madrid" || "madrid"; //$odp = "Madrid" && "madrid"; //neither of OR/AND works here if($cities== $odp){ echo "Your answer is <Font Color=#009900>correct</font> <P>"; } elseif($cities== ""){ echo "Please fill in this … | |
I've written a few simple C++ programs in Dev-cpp... Now i want to run the second program inside the first in case it satisfies a condition. It then geneerates a text file from which new values are got. Is it possible to do that ? I'm just a beginner and … | |
To be honest...I am horrible at java. I just got a job and have missed class a few times because of it and im supposed to create a project that can read the number of lines, words, characters, average words length, and letters in a file. I am trying to … | |
Hi i was wondering if it was possible, in java, to save a session/state of an application and then reloading the data (all automatically)when re-opening?? I have a GUI with some textarea, a jtree with filesystem hierarchy and a jpanel with buttons. I can create many buttons and within these … | |
Hi there, Could someone give me a simple of example of how to write code in a c++ class library file? I made this to include through a reference in a c# app file. This is what Ive tried but Ive gotten all sorts of build errors: [CODE]// CClass.h #pragma … | |
Hi everyone, I've got a shopping cart with a total amount label, this works perfect with the products, if a product quantity is changed the label also changes. I have a shipping type drop down list determined by which region the user is, I would like the total amount label … | |
I have an Employee form that displays data about the employee, on that form I have a button that launches an Employee Job form that shows data about the employee job. My question is how do I show the relevant data on the Employee Jobs form when I click the … | |
Hello. I want to copy a file from a UNC path (ex: \\comname\dirname\filename.txt) to a local destination (c:\outputdir) I have no compile errors, but when I run it, it throws an exception (System.IO.DirectoryNotFoundException). I'm absolutely sure the destination existst (it's referencing the destination directory). I've tried doing it with system.io.file.copy(source,dest) … |
The End.