64,152 Solved Topics
Remove Filter ![]() | |
hey there guys, just starting to learn java and i'm having a little trouble putting code to paper. don't really want to ask the teacher because hes a perv but lets not get into that. okay, i am supposed to make a GUI for electronic voting ballot paper thingy and … | |
Hi all, Does anybody know what this "WSaction" is? What it does and most importantly how it works? I've tried googling this but hardly found ANYTHING.. I'm busy working with Servlets and as far as I can tell it checks what button was pressed in the HTML form.. But I'm … | |
Hi everybody, Is it possible to give a property default value without using constructor? | |
i m using dev c++ for opencv i got problems in displaying image here is the code #include "cv.h" #include “highgui.h” int main( int argc, char** argv ) { IplImage* img = cvLoadImage( "M.jpg"); cvNamedWindow( “Example1”, CV_WINDOW_AUTOSIZE ); cvShowImage( “Example1”, img ); cvWaitKey(0); cvReleaseImage( &img ); cvDestroyWindow( “Example1” ); } … | |
Hi Guys I wonder if you can help me with this I have built an application that reads my forum and grades responses and things and adds them to a database,. When the application is searching my forum the gui is hanging until the search is complete. The front page … | |
So, I have been working on some code with a group of people/organisations etc. and I've hit a small bump in the road that I thought someone on here may be able to help me with :) I have developed some code that draws 3D towers to represent the amount … | |
public static double average( double... numbers ) { double total = 0.0; [B][I][COLOR="Red"]for (double d : numbers)[/[/COLOR]I][/B] { total += d; } return total / numbers.length; } can any one explain the line bold if posseble d program too... | |
Hi. I thought I posted topic to an inappropriate forum. Please see the topic (and reply) here: [URL="http://www.daniweb.com/forums/thread307178.html"]http://www.daniweb.com/forums/thread307178.html[/URL] Thanks | |
Hi everyone, I have been playing with a piece of code that is to simulate "shortest job scheduler" for almost 2 days and there is a runtime bug which it's seems I am not able to find. Any help is really appreciated. Here is the code: [CODE] int sjf_scheduler(int number_of_jobs, … | |
I've got a running and working database that's storing data into a *.sdf sql compact database. it's a fairly simple program and that's all i needed to store the data. is there a preferred report generator that i can run to query compiled data for reports? i've looked at a … | |
Help please I think there is Copy.to function but i cant find it :( I'm using VS2008 Thanks | |
Hi everyone, I've been debugging my program all night and I just can't quite come up with how to make my counter work. I keep feeling like I'm putting it, or maybe just part of it, in the wrong place so I've been moving it all over the place but … | |
Greetings, I installed MySQL 5.1.48-2 on Fedora 13 64bit. Whenever I tried to connect using the terminal by typing : [B][user@work ~]$ mysql[/B] I get the following error: [B]ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)[/B] I also installed MySQL on Red Hat Enterprise 5 … | |
Does anyone know any example of source codes that can receive a string(SCPI String) and send it to a SCPI library/module/commands? For example to those who know, GPIB has their own specific module that can be used in VB and what i need is somewhat that same specific module that … | |
I'm working on a program to save and load character files for a text-based RPG. There are three slots to save to. I'm having the user enter whichever slot he wants to save to through inputting an integer. If the number is lower than 1 or higher than 3 I … | |
Here is a simple program which gives me unexpected results: [code=c]int main() { printf("\nTo calculate a^b, enter value a now.\n"); int a = getchar() - '0'; printf("\nEnter b now.\n"); int b = getchar() - '0'; printf("a = %d, b = %d\n\n", a, b); return 0; }[/code] if i hit a … | |
Ok I feel like this may be a dumb question, but I'm putting it out there anyway. It's been a while since I've worked with C++. What characters does C++ print for negative values of char? Positive values seem to follow ASCII, but ASCII is only 128 characters. So where … | |
Hi, this is a very strange problem for me. I'm writing an app that uses the BouncyCastle API. I downloaded the jar file from their website and I put it in my project build path so as to use it, and it works. However, when I try to run the … | |
I am using the Direct2D API to draw some graphics for my program. I have a function that I call every time the Window redraws that draws the frame. I can't hardcode every object to be drawn into the function, if I want it to be dynamic. What is the … | |
Hello everyone, I'm working on a random text generator -without using Markov chains- and currently it works without too many problems. Firstly, here is my code flow: 1-Enter a sentence as input -this is called trigger string, is assigned to a variable- 2-Get longest word in trigger string 3-Search all … | |
can anyone explain to me about what actually is a constructor? | |
I am trying to create a music web player that changes song automatically, however the song is instead repeated and whenever next is click, and some codes are executed to stop the current song and start the next, the current song pauses for about 1 sec instead... can some please … | |
i know what an interface is. but i dont understand what the use of connecting the objective reference to the interface method and then use it to implement.. could someone explain to me the code..whats going on/ [CODE] interface TextReceiver { void receiveText( String text ); } class TickerTape implements … | |
First of all, please check out my other post. [url]http://www.daniweb.com/forums/post1318472.html#post1318472[/url] Ok, hello everybody! I have a question that should be pretty simple. I have a php page that will send an email. I got that all working fine. [CODE] <?php $to = "reciever@example.com"; $subject = "Test Subject"; $body = "Test … | |
Hi, I am currently trying to do a website with both chinese and englis text, and I have problems displaying chinese text. I uploaded a set of identical website files to 2 different servers and domains, and one displays chinese character but has messed up layout, the other does not … | |
Ok, I'm really confused here. I know that the only way to transfer objects via input/output streams is if they are serialised. If i wanted to transfer objects of my Person class from my client to server, I would have to implement "serializable" in my Person class. That's all well … | |
hi all, i have a little issue with SUM query from this table UNIQUEID Date Production engine1 01/12/1999 1440 engine1 01/01/2000 6061 engine1 01/02/2000 5152 engine1 01/03/2000 5347 engine1 01/04/2000 4642 engine1 01/05/2000 5264 engine1 01/06/2000 5247 engine2 01/07/1995 561 engine2 01/08/1995 3066 engine2 01/09/1995 2133 engine2 01/10/1995 2282 engine2 … | |
As you can see from this page: [url]http://www.cornwallfantasyhockey.com/cfhl/schedule3/[/url] I have created an output table of 11 players. I would now like to total the GP and PTS column. Here is what I have so far: any thoughts? [code] <?php $result = mysql_query("SELECT * FROM stats1011 where 1A = 'BULL' OR … | |
Hello, In OOP PHP, i got 2 classes: Database and News. In News class i call DB function and get result (multidimensional 2D array). Now i have to display that array in index.php. I call News class (lets say get_news() function) from index.php but cant retrieve data and always get … | |
I've created an algorithm that draws a 2D grid in the most efficient way I could think of. Suggestions to improve it are encouraged though :) [CODE] public void DrawWireGrid(int xDivisions, int yDivisions, int cellSize, Color color) { Vector3 a = new Vector3(); Vector3 b = new Vector3(); for (int … | |
The point of this script, is to take the user input (a website) and turn it into it's IP address. This then is turned into a file, readable later in the script. This is my attempt at having these sites available theoretically forever. A collection of what everyone has searched … | |
Few days ago I finished making my own (quite primitive) chat server with SocketServer. I haven't had any problems with it apart from the designing of the chat protocol: I made a very sketchy protocol for messaging. The client just sent unix-like commands to the server to do certain opperations: … | |
[code] #include <iostream> #include <fstream> #include <string.h> #include <ctype.h> const int SIZE=100; using namespace std; class Person { private: char name[30],address[50],phone[11]; public: friend ostream &operator << (ostream &os, Person &p); friend istream &operator >> (istream &is, Person &p); friend ofstream &operator << (ofstream &fos, Person &p); friend ifstream &operator >>(ifstream … | |
Hi All, I am new to C++. I am practicing loops and i need some help. This one behaves strangely. What i want is for this loop to accept numbers from 1 to 4 for options (strictly numbers) and no other characters. When executed and run, if the input is … | |
Hi. I'm no expert here, and I need some help. This form does not update the database. I know it is accessing the database because the checkbox and radio buttons variables are good, but there is no result posted. Can anyone tell me what is wrong here. [code=php]<?php session_start(); // … | |
![]() | hi!! I installed TurboC++ version 3.0 in my computer, which runs a WindowsXP OS.... the problem is... the turboc++ window opens in my screen but i am not able to use my keyboard as well as my mouse within its window, hence i am not able to work with it … |
Hi, I am trying to generate a list of random numbers where each number in the list is a individual string. This is my code so far: [CODE]import random def make_secret(numdigits): a=[] secret = random.sample(range(0, 10), numdigits) for i in secret: a.append(str(secret)) return a[/CODE] An example of what i'm trying … | |
Hi all. I've tried to make a simple hover effect about small images but it won't work. I also tried to make the following script: 2 seconds after page loading image1 changes 2 seconds after that image1 returns to back state and image2 changes and etc. Can someone help? Best … | |
Okay i'm really sorry to have basically bombarded this forum but this is my last cry for help on this project I swear! I guess many of you are intimately familiar with what's happening so far, and thank you all so much for putting up with me =) I've got … | |
hey , my question is that suppose we have an application runnig . it has a jlabel with some text and now in some function i change the text by using setText()func and continue with some other stuff in the function , now the text that i changed is not … | |
okay, I'm trying to create a new instance of SimpleCanvas through the FlagDrawer object. I need the SimpleCanvas to be scalable. I can only use the two instance variables and one constructor given to me. What I'm trying to do now is take the class instance variable (int) size and … | |
I was studying Instruction cycle from "Computer System Architecture" by Morris Mano .Under timing and control topic,fetching cycle is explained like this: [b]T0: AR<--PC T1:IR<--M[AR],PC<--PC+1[/b] IR-Instruction Register AR-Address Register PC-Program Counter However, according to my understanding of previous topics PC can be incremented with T0 control signal.Please explain is it … | |
Hi everyone. Today i have been playing with templates and decided to make a generic question and answer function using templates to allow you to choose the return type for each call. Code below. [code] template< class T > T qAndA(const std::string Question,const T retType) { T retVar; std::cout<<Question<<std::endl; //ask … | |
Yet another thread showing how awful I am at programming... I've got a list called week_pattern It contains a list of 52-character strings which represent whether something occurs in a certain week. The list is below: [CODE]['0000000000111111111100000000000000000000000000000000', '0000000001000000000000000000000000000000000000000000', '0000000000000000000000000011111111000011100000000000', '0000000000000101111100000000000000000000000000000000', '0000000001111111111100000000000000000000000000000000', '0000000000111111111100000000000000000000000000000000', '0000000000000000000000000001111111000001100000000000', '0000000000111000000000000000000000000000000000000000', '0000000001111111111100000000000000000000000000000000', '0000000000000000000000000011111111000011100000000000', '0000000000000000000000000011111111000011100000000000', '0000000000000111111100000000000000000000000000000000', '0000000000000000000000000000000000000000001000000000', '0000000000000000000000000001111111000001100000000000', … | |
[CODE]int main() { int ival=12 , ival2 = 14; int &ref=ival; ref = ival2; cout<<ref; return 0; }[/CODE] That code shows an o/p as 14? How is it possible ? i thought references were not reassignable ? 1 more thing- do references occupy seperate spaces in memory like pointers ? … | |
MY question is, like we do for integer and float, Integer.parseInt(args[0]) Float.parseFloat(args[1]) How do we take character input from command line ? | |
Hi I have a database which has a table named [B]main[/B] and a field named [B]description[/B] typ of [B]description[/B] is [B]longtext[/B] I can insert more than 100 word through phpmyadmin. but can't insert through form submit by post method. but Here i can insert 10 word through same form submit. … | |
I have the following code: [CODE]import java.util.*; public class Final{ private double guess = 1; public Final(double x){ root(x); } public double root(double b){ double rez = -1; if(Math.abs(guess*guess - b) < 0.001){ rez = guess; } else{ guess = (2/guess + guess)/2; rez = root(b); } return rez; } … | |
I was wondering if anybody would be able to help me insert a confirm delete popup window that closes after submit. here is what i have so far [B]index.php[/B] [CODE]} //delete tool button actions if (isset($_GET['deletetool'])) { $id = mysqli_real_escape_string($link, $_POST['id']); $sql = "DELETE FROM tools WHERE id='$id'"; if (!mysqli_query($link, … | |
I would like to set and display a score that varies on how fast the correct answer was made. For example..a question would be answered for only a minute..and the score would be 20points for answering in the range of 1-10 seconds, 15points for answering in the range of 11-30 … |
The End.