64,152 Solved Topics
Remove Filter ![]() | |
Hi everyone, I need some help with identifying real world entities and their attributes for a hospital scenario. I have listed below the entities and attributes that I could think of. Please comment or give suggestions on how I can improve it. [CODE]EMPLOYEE ([U][B]Employee_SSN[/B][/U], Address_ID, Contact_ID, Employee_Name, Designation, Salary) PATIENT … | |
Hello, I made the following code based on the following physics problem: "A sphere of metal has a radius of 6.7 cm and a density of 9.27 g/cm^3. What's the mass of the sphere?". The program runs error-free, except that it gives me a result (mass) of 8758.99 grams. The … | |
I need yo draw a shape as attached in the image using Java graphics. I am struggling with the curve part. The curve part is a arc of an circle whose radius and center is known. But I have to paint the region out side of that arc. How will … | |
Hey, For some reason the numericUpDown is a decimal or a double or one of those ;) I find that annoying, but whatever. So how do I use it as an int? Int32.Parse(); only works for strings. | |
Hello all. I am new to programming, taking my first class in college. Im enjoying it a lot so far, and much of the info on daniweb has been a huge help. Due to some unforeseen circumstances, I had to miss class and am now having some troubles with a … | |
Hi, I have a quick question. Why would I be getting this: Ljava.lang.String;@24c21495 instead of the information at that address? I have println as my system.out. I am not sure how to format a String[] to make sure I get the information rather than the address. Thank you, lynnajoe | |
Hi, I'm building a site where users can connect with each other. I'm trying to let users post comments like one would on Twitter or Facebook. Currently, I have it so the user has to update there comments but I would rather them post new ones. Basically, how is this … | |
Hey guys! I'm making an app that allows user to select some files. But, I want it to be made inside the app, without the need of a 'OpenFileDialog' or so. My first thought was a ListView control, but I really don't know how to use it or even how … | |
Hey, I am starting to work with SDL and I had it all set up correctly etc. The thing that does not seem to be working correctly is the SDL_ttf. Now, As far as I am aware, linux builds don't use truetype, which is why I am at a loss … | |
I am wondering does anyone know how to help me with a pvp script. Nothing major just something simple. I want it something like: Player1 Attacks and hits X Damage. Player2 Has X hp Left. Player2 Back Hits and does X Damage Player1 Has X hp Left. Player2 Attacks and … ![]() | |
[CODE] public static void main(String[] args) { Scanner scan = new Scanner(System.in); String word, end; int length = 1; //length of int is determined here so it can be incremented in loop System.out.println("Enter a word: "); word = scan.next(); while (1 == 1) { end = word.substring (word.length()-length); System.out.print (end … | |
I am passing a message using text area in html file. In the message file, let say there are three lines. when I pass it to jsp page. All three lines appear as a single line. How can I separate this single line into original three lines please? thanks in … | |
Hello, I have some code that passes arguments between functions, though I am failing to understand why my code isn't working. This is the relevant section of my Dijkstra's algorithm code: [CODE]def network(): f = open ('network.txt', 'r') network = [[int(node) for node in line.split(',')] for line in f.readlines()] print … | |
I'm trying to display the same image several times using javascript. It can range anywhere from 0 to about 50. I'll also have its' location determined by the user click and each image will timeout after a short period of time. I figure i'll have to create a new object … | |
In my project I tried to use boost RNG in such manner [CODE] inline int rand(const int m){ uniform_smallint<> us(0,m-1); variate_generator<rnggen_t&,uniform_smallint<> > vg(rng,us); return vg(); }[/CODE] where rnggen_t is type of random number generator (rng). But using this (for every generator) instead of rand()%m, is slowing my program at least … | |
Hello, I would like to filter Gridview1 with, control checkbox, and code as "If GridView1 rows of column FirstName have value 'John' then show only this rows." I have somehow with network help write this code. But code is not working as it should, and also I do not know … | |
I'm getting errors when I try to compile this code: [CODE]public class EmployeePayRoll { /*** Class Constants ***/ /*** Defaults ***/ public static final String DEFAULT_EMPLOYEE_NAME = "Employee"; public static final double DEFAULT_PAY_RATE = 10.00; public static final double DEFAULT_HOURS_WORKED = 40.0; /*** Minimums/Maximums ***/ public static final double MINIMUM_PAY_RATE … | |
I am using Visual Studio .net 2008, which has a Crystal Reports builder. I have gotten to the point of building the report from a view I have setup on my SQL server. Instead of using a table on the server, can I use a table from my DataSet? I … | |
hey there. I have the following code. I am trying to build an applet that displays all possible (92) ways of arranging eight queens on a chess board with no two of them on the same column, row, or diagonal. I built this as an application and it ran fine. … | |
In C++ I'm able to do something like this [CODE](some_condition)? function1():function2();[/CODE] When i tried the same thing in Java it's not possible. It wants some variable to hold the result even though the return type of function1 and function2 are void. Is there any other way to do it other … | |
Ok, so I pretty much have my program up and running, but it's not the best looking program aesthetically, and I am trying to do a couple of things to make it look better, and none of them are working. Here is what I want to do. 1) change the … | |
So lets say I want to make a script that adds credits into a database when customer pays money using some gateway like paypal. What if there comes an error while updating the database row? For example the conection is lost. Then I could do some logging to a text … | |
Hey everyone. I would really appreciate some help. I'm currently building a program in Python 2.6 for an introductory Comp Sci class. The program is supposed to use functions to read a text file from a URL, parse the data into tokens, and use the data to calculate a sort … | |
I'm working on a small game in my free time as a proof-of-concept to myself that I'm capable of learning Java, but I've been stumped on an issue for the last week or two involving the instance of KeyListener I created for my project. Basically, the game has a player … | |
Hi, Yes, I am sure you can tell that I am new. I have a few question and hope someone will answer them. 1)I am a little confused as to where to put certain code. If I am doing inventory and I need to have an array does it go … | |
1. any problem if i dynamically allocate memory and use only a small part of it? 2. can i free the dynamic memory after each time the function is executed? | |
Hi, I am doing a C++ self-study and I got stuck with this problem. I want to have a code that asks the suer to enter two numbers and then it lists the numbers between these two numbers. It has also to print a message if these two numbers are … | |
I have tried having a look around on the web at different forums and can't decipher how to do this. This is my Link class: [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LinkedListGen { class LinkGen<T> { private T data; private LinkGen<T> next; public LinkGen(T item) { … | |
Dear Sir/Madam, I have used Pop Up menu to show the list_Item of a list box on Up and Down Arrow KeyPressed event. But here i can't see the list item continuously by pressing up or down keys, either i have to click/enter on that pop up menu or in … | |
i have a database, i want to make it connected in vb.. tell me the coding for editing any record. | |
Hey everyone! After some research I have found that I need some javescript help to process a users click from a html drop down select list.. I am trying to create an admin area for a website in php and using mysql database. In my admin home page, I have … | |
hello all i am using a query [ICODE]select 'hour','filename','tot_sent_count','tot_success','tot_prm_fail','tot_switchedoff','tot_other_error' UNION select hour,filename,sum(tot_sent_count),sum(tot_success),sum(tot_prm_fail),sum(tot_switchedoff),sum(tot_other_error) INTO OUTFILE '/tmp/hourlyFileMis(2011-03-09)' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n' from tbl_mis where date_format(date_time,'%Y-%m-%d')='2011-03-09' group by hour,filename order by hour;[/ICODE] output is ok but one thing is not coming properly that header fields are coming at the … | |
As the title says i am trying to click this button... [URL="http://gyazo.com/5776f257d554f0b590944bc6474e1db3.png"]Pic[/URL] (The save one) on this webpage... [url]http://upload.youtube.com/my_videos_upload?restrict=html_form[/url] I have been trying various permutatuons of this [CODE]Dim j As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("BUTTON") For Each elem As HtmlElement In i elem.InvokeMember("click") Next[/CODE] With little luck, i also tried to find … | |
Hey guys, i`m experiencing weird problem with an visual activeX control. I`ve created simple test winforms application on .NET 3.5 using that 3rd party activeX control. It works fine on my dev PC having VS 2008 installed... But when copy it on a machine without having VS installed on it, … | |
I have to draw a Circular gauge using Java Graphics. Somewhat similar to the attached image, the circular gauge without the black border as in image. I tried to use two methodologies but none of them is working perfectly Firstly, I tried to draw everything using Java Graphics and then … | |
Hi everybody, i cant seem to make my program to pass the first user input. I know i have to put it inside a do while loop, but everyone of my attempts results in an infinite loop. I'm also aware that i should use a bool to make it work, … | |
Hi, i'm trying to get something to work. I want to do a query with multiples "if not" conditions in a mysql query. This is working : SELECT * FROM table WHERE column!='value' This is not working : SELECT * FROM table WHERE column!='value' OR column2!='value' I've tried all kind … | |
Hi, I don't undestarnd what I did wrong. When I go to joomla home, I mean [url]http://localhost/joomla15/[/url] (joomla wenbsite is placed in joomla15 folder) I get an error 404 - Component not found Yeah, I played around with components, and made some component to home menu, but now don't know … | |
Hey, I have a class called Greyhounds. In the variable declarations, I have: [CODE]public Random randomizer = new Random();[/CODE] I know how to use random.next and everything. Here's where the problem is. The greyhounds class has a method Run(). [CODE]public bool Run() { int moveForward = randomizer.Next(4) + 1; currentLocation … | |
What happens when an exception is thrown from within a new thread of execution? How do I catch it? Must it be within the same thread? Also, what is the proper way to update a control residing on a form, from within a new thread? I think it would be … | |
Hi, I am doing Question 4 of the Project Euler puzzles. I wrote some code which is supposed to find the biggest palindrome from the product of 2 numbers. However, this always prints out 900099. I cannot really find any errors in this code, but if you do, please let … | |
How do you pass an unknown object into a function and save it? I'm trying to have a set and get function in a class I'm creating that can hold and return any object. Here are my attempts so far: [CODE] void* holder; void setHolder(void* object) { holder = object; … | |
What am i missing in my code. Because it is not working. According to visual studio, the istartd and iendd are unassigned local variable. [CODE] Console.WriteLine("{0, 40}", "Sphere Surface Area Evaluator"); Console.Write("\nEvaluates Surface areas of spheres of various diameter"); do { try { bError = false; Console.Write("\nEnter the starting diameter … | |
Hey guys, I am building a page where I will have five links and each one will open a different image inside a div, but i need this image to be an image map, I created the image maps and the links, but I am having great difficulty in getting … | |
Hey guys, I'm doing a class called "Greyhound" (I need to do a greyhound race for a book) Each greyhound has a corresponding picture box because they race along a horizontal track. So, my question is, let's say you have an instance of PictureBox: [CODE]PictureBox MyPictureBox = new PictureBox();[/CODE] What … | |
[CODE] template <class T> class Llist //.... //Iterates to position and sets pointers to node at position-1 and position. template <class T> void LList<T>::iterate(Node<T>*& previous, Node<T>*& next, unsigned short pos) { //some code } //Start Iterator template <class T> inline Iterator<T> LList<T>::start() { //some code } template <class T> class … | |
Hi I'm having real problems getting one dropdown to populate a second dropdown based on different options being selected in the first. For it to work in a form. And for the dropdowns to take their data from mysql table. In the code enclosed I've hard-coded the categories, but obviously … | |
Hey, I am doing a 'Helicopter'-style game for a project where the player holds the spacebar for the main sprite to go up, releases to go down. Objects come from the right side of the screen at random y-cords moving until they hit 0 on the x-cord. The player must … | |
In a unix pthreads based app I'm working on, I have objects of a particular class (call it class foo) being created in multiple threads. I need a specific public method of class foo invoked at or after 60 seconds of the object coming into existence (it is not imperative … | |
Hi All if anyone could help me that would be great! currently i have an array which enables a user to input: Student Name Maths Mark English Mark Science Mark Array: StudentArray(25,3) i have this array output the data to a listview box. Column 1: Student Name Column 2: Maths … |
The End.