199,114 Archived Topics
Remove Filter ![]() | |
Hi, I am starting out with python coding and was looking for some feedback. Constructive Criticism please. Here is my code for game "Word Guess". [CODE] # Word Guess # # Word guess, is a game where the user has five chances to ask # the computer if a certain … | |
![]() | Is there a way to improve the below Selection Sort code to make it more efficient? [ICODE] int a, b, smallest, temp; for(a = 0; a < numIntegers - 1; a++) { smallest = a;; numComp++; for(b = a+1; b < numIntegers; b++) { if(Integer.parseInt(list[b].toString()) < Integer.parseInt(list[smallest].toString())) { smallest = … ![]() |
Hi all, I try to find the average of colum with perl. I find in forum that have the question [url]http://www.daniweb.com/software-development/perl/threads/328723[/url]. [CODE]use 5.010; my (@arr, %arr, $row); while(<DATA>){ @arr=split(/\s+/, $_); for (my $i=1; $i<=$#arr; $i++){ $arr{$i}+=$arr[$i]; } $row++; } say ("total of column $_ is $arr{$_} and average is \t", … | |
Theres this thing that i dont fully understand. Im using this tutorial: [url]http://lazyfoo.net/SDL_tutorials/lesson08/index.php[/url] and i in here we first set up some surfaces with text and then asign their value to the message and then for some reason we have to reset the message value to 0 in order for … | |
Hi folks! I'm trying to wire simple code and so far I'm stuck on ActionListener. My program should contain (JMenu) Menu called SELECT and two options InnerFrame 1 and InnerFrame 2. To debug it I've started using System.EXIT , unfortunately I cant compile my program, I'm receiving an error: "java:48: … | |
hi all, Is there simple example out there where image is made by drawing lines on the panel ,and then print it on paper thank you denny | |
Here's what I have so far.. [CODE] // The "AddingPrefixes" class. import hsa.*; import javax.swing.JOptionPane; public class AddingPrefixes { static Console c; // The output console static char proc; static String prefix; static String word; static String sentences; private void title () { c.print (' ', 32); c.println ("Adding a … | |
I'm finding myself stuck trying to simply get a userInfo class's sets to work, but every time I try and compile with simple code like this in my application file: userInfo stuff; stuff.setId("test"); It gives me one of those 'undefined symbol' errors and references to the userInfo::setId function: Undefined first … | |
[CODE]class point { private double pi; public double PI { get{ return pi; } set{ pi = value;} } } class Program { static void Main(string[] args) { point p1=new point(); p1.PI = 3.14; Console.WriteLine("The value is {0}",p1.PI); Console.ReadLine(); } }[/CODE] Actually i couldn't understand the use of PROPERTIES concept.... … | |
Hi everyone: I am building a dictionary(translator) . My dictionary is completed, now I want to add some feature to it. I want to add a feature that once the user highlight a word in any application, afte 2 seconds which the mouse is IDLE my dictionary automatically COPY and … | |
please any professional out there can suggest me with project ideas . . for my final year project work . . plz. .plz. . | |
I know its bad to wait last minute ,but I have been working on the code the last couple of days with no result ,and now I'm finally starting to panic.I am having trouble with my program. I have been working on it for the last couple of days. I … | |
Hi, First post here. I need to scan a file (NC milling output) with, potentially, tens of thousands of lines of text, looking for keywords. Every time I find a keyword, say, a tool change command, I want to print out twenty lines - the ten lines above this line, … | |
Alright, let me start by saying that I know zero PHP or SQL code, myself. I have a SQL guy creating tables, and I've been using what I've found on W3C Schools. So far it's been ok, but I have a problem I need solved. I have created an HTML … | |
First of all, I don't know if I should put this thread on HTML/CSS or here since this thread is kinda about both of them, so I'll try it here. Hi! I've need some help/advices for my problem; I'm doing a project at school, were we're going to develope a … | |
A certain system includes 4 Gigabytes of central memory and also employs a 768 Kbyte instruction cache each of whose lines can hold 128 instructions. How many bits would be required for the set number if this instruction cache is organized as a 4-way set associative cache? | |
I have a Java Desktop Application I made and I am now on the process of deploying the application. I tried to use Java Web Start but came up with certain problems. My application is fully working when I start it locally or inside my IDE. But when I try … | |
Ok so i have a little problem which i cant seem to figure out this is what i have: The constructor loads my method that loads a list of employee to show in jTable, but when i place that method in my button it doesn't do anything This is my … | |
WHT!!!! [u][b]i dont know whats wrong but i tried to to Merge both codes the if - statement dont show ...[/b][/u] [code] #include <iostream> #include<cstdlib> #include<stdio.h> using namespace std; /** Showing the introduction screen and the user maual... */ void splash(void) { cout << " ********************************************************\n"; cout << " * … | |
Can somebody please help me figure out where I went wrong? This is the problem and I have attached my code. Write a class with a main() method and two static methods. Your program should prompt the user for a single-digit integer. Your program should print out to the screen … | |
A co-worker and I are trying to compile a VB.Net / ASP.Net application on another machine. We are getting two different sets of errors. One set of errors lists 103 undefined statements with no library missing. The other error is, " It is an error to use a section registered … | |
Hello everybody. I have a question/problem. I have a select tag with several options. Sometimes the text of the option becomes very large. So I tried something like this for example: [CODE] <select> <option>A Very Big <br/> sentence</option> </select> [/CODE] But it didn't work. What I was trying is to … | |
i have a formview which show the data from a database.. in another page, i have a datalist that also display data from the database.. in the datalist, i have a hyperlink that when click will navigate to the page that have the formview which display data that suppose to … | |
Design and implement a stringed musical instrument class using the following guidelines: a. Data fields for your instrument should include number of strings, variables for string names (e.g. E, A, D, G), and boolean fields to determine if the instrument is tuned, and if the instrument is currently playing. You … | |
First the gui question Right now I have: [CODE]class ExportGUI extends JFrame implements ActionListener{ JTextField fileIN; //Text Field Bull //JLabel fInHelp;//Labels time JFileChooser BpsFile = new JFileChooser(); //File Chooser JCheckBox Check; JButton expButton; //reference button object JButton opnButton; JButton reset; JButton all; //Panels List<JCheckBox> checkList = new ArrayList<JCheckBox>(); JPanel inOut … | |
Hi all, I have a problem with my code. I use in a struct variable type time_t with name tt like [CODE] typedef struct{ time_t tt; } [/CODE] then I initialise in the main function of my server [CODE] time_t timer; timer=time(NULL); [/CODE] I pass the timer in my shared … | |
Hi, i am trying to write some data into the text file using PERL . In that file ^M is appeared on each line . Since i am new to PERL , i couldn't figure it out . Guys please help me to fix this problem. | |
Hello! I need code that will allow the user to do the following: 1. Select a browse button and choose the folder they want to save a file once the exe file at the end of the program runs 2. Display the folder location the user selected in the textbox … | |
In this .cpp i have an error saying member function cannot be redeclared. I dont know what it needs to get rid of the error obviously it needs a declaration somewhere but where? [CODE]#include <iostream> #include <ctime> using namespace std; Monster::Monster(std::string Name, int health, int hitPoints, int miss, int damage,const … | |
Hi everyone, we have constructed a content management system that gets updated quite frequently and is used by many clients for their day to day opperations for their websites. We have decided to build a section of the CMS with additional modules that we will host on our cloud and … | |
Hi every one, Can you please help me to figure out how I can use PHP to print out contents of a div element as pdf file? I would like to create a button which let page viewers to save a specific div(let's say students Mark in a html table … | |
I have an array that looks like this: [CODE]array 0 => array 'Time Stamp' => string '11/22/2011 00:05:00' (length=19) 'Name' => string 'CAPITL' (length=6) 'PTID' => string '61757' (length=5) 'LBMP ($/MWHr)' => string '48.24' (length=5) 'Marginal Cost Losses ($/MWHr)' => string '1.13' (length=4) 'Marginal Cost Congestion ($/MWHr)' => string '0.00' … | |
Hi everybody, I have a project to do for the college, which has to insert, read, delete and modify records in a binary file (a address book or something else). I don't know yet how I'll do to alter the records. Let's suppose the I have the program below: program … | |
I have a difficulty for saving a file in C++. I have an existing file which is opened by my program. The program should save the changes to the existing file (Example: D:\A4.txt) when I select 4 (as known as the menu). However, the program does not save the changes. … | |
Hi all. I have this problem within the form. I take data from a DB and pass it on using POST. Considering that I fetched array correctly, the following code has the following output: echo $value[0]; //echoes [B]Hello World[/B] echo "<input type=hidden name=value value=".$value[0].">"; //when echoed in the form action … | |
Can someone tell me what's wrong: Imports MySql.Data.MySqlClient Public Class Login Dim server As String = "Server=localhost;Database=escola_musica;Uid=root;Pwd=;" Dim con As New MySqlConnection Dim da As New MySqlDataAdapter Dim sql As String Dim cmd As New MySqlCommand(sql, con) Dim dr As MySqlDataReader Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As … | |
Hi Friends, I am working on Project(Window Application in VB.NET) and unfortunately i am getting out of time,Need ur help. Theres one situation in which application to accept Five Email Address but the condtion is that during form load only one textbox need to display first and a button adjacent … | |
I am working on a web application that builds a KML file using a list of coordinates and is supposed to display them on Google maps when you click a button. When I'm testing it on desktop it works, as it brings up google earth with no problem. However, when … | |
Hi, In my website, Blog is a small portion. I have managed to make and insert the blog. In manage blog area I am giving a user this a authority to manage their written blogs. At this point I am getting a problem. When I am logged as 'A' (A … | |
So Umm.. I'm working on right now to make a website for our game clan in Special Force... Then want a part of their website to be viewed directly on my website.. The link to what i'm talking about is bit.ly/vUNUCi .. maybe I can get that html codes then … | |
I have a sample page with three tabs (tabs.html). Tabs are displayed as follows: [CODE]<ul class="tabs"> <li><a href="javascript:tabSwitch('tab_1', 'content_1');" id="tab_1" class="active">Tab 1</a></li> <li><a href="javascript:tabSwitch('tab_2', 'content_2');" id="tab_2">Tab 2</a></li> <li><a href="javascript:tabSwitch('tab_3', 'content_3');" id="tab_3">Tab 3</a></li> </ul>[/CODE] The JavaScript used to switch tabs is: [CODE]function tabSwitch(active, number, tab_prefix, content_prefix) { for (var i = … ![]() | |
Hi, I have a form for registration and i would like to make Phone Number and other textboxes numeric and don't accept letters, i mean, if you write a letter 'p', for exemple it doesn'te write. Can someone help me? Thank You, PF2G ![]() | |
Can anyone see the problem with my method ATTACK [CODE]#include "Monster.h" #include "Player.h" #include "Weapon.h" #include <iostream> using namespace std; Monster::Monster(std::string Name, int health, int hitPoints, int miss, int damage,const std::string& weaponName) { Name = Name; hitPoints = hitPoints; Weapon weapon; miss = miss; damage = damage; weapon.Name = weaponName; … | |
Ok, so I'm trying to fix this.. [CODE]# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> # include <omp.h> using namespace std; int main ( void ); void jacobi ( int n, double a[], double b[], double x[], double x_old[] ); void r8vec_uniform_01 ( int n, int … | |
Hello, I'm doing a website about a music school, in this moment i'm working the list of instruments: [CODE] <?php $username = "root"; $password = ""; $hostname = "localhost"; $database = "esola_musica"; $connect = mysql_connect($hostname, $username, $password) or die("Erro na ligação à BD."); mysql_select_db($database,$connect) or die(mysql_error()); $sql_imagem = "SELECT cod_curso, … | |
Hello, I've created a simple menu that will execute some commands, and display them on the screen. However, when I try to execute them in the menu, nothing appears. I was not sure if I went about this the right way. Any help is appreciated. [code] trap "rm ./f 2> … | |
Hello! I want to split a string, say : "I have a dog" of string data type to an array of strings. I want to save that array. i.e I want an array like: array[0]="I" , array[1]="have" , array[2]= "a" , array[3]= "dog" Please help me out. Thanks, | |
#include <iostream> #include <windows.h> #include <cstdlib> #include <ctime> #include <cstdlib> #include <mmsystem.h> #include <vector> #include <conio.h> #include <functional> #include <stdio.h> using namespace std; char option; int answer; string theQues; string theAns; string ans; void Start(); void Level1(); void Level2(); //oid Level3(); int point=4; int main() { // system("color CE"); cout<<"\t** … | |
I am doing an ATL Project in VC++ 2005 to use as ActiveX in VB6. I added methods, properties and events following the steps in this tutorial: [URL="http://www.codeproject.com/KB/atl/SimpleATLComWithDotNet.aspx"]http://www.codeproject.com/KB/atl/SimpleATLComWithDotNet.aspx[/URL]. Everything is working fine while I'm working inside the class. But now I need to call an event or method of the … | |
hello guys ... i have a problem with my code here its basically to ask the user to input the time as HH:MM:SS then i calcluate the time as time=hh+mm/60+ss/3600 so first i used string so i will be able to store ':'.. now how to convert this string into … |
The End.