199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Sarcasm

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 …

Member Avatar for Sarcasm
0
214
Member Avatar for mrkm1188

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 = …

Member Avatar for mrkm1188
0
153
Member Avatar for biojet

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", …

Member Avatar for biojet
0
187
Member Avatar for nuclear

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 …

Member Avatar for raptr_dflo
0
489
Member Avatar for grako84

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: …

0
123
Member Avatar for dennysimon

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

Member Avatar for dennysimon
0
127
Member Avatar for Daigan

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 …

Member Avatar for NormR1
0
181
Member Avatar for fsefsef23

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 …

Member Avatar for Moschops
0
167
Member Avatar for Murugavel B

[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.... …

Member Avatar for skatamatic
0
111
Member Avatar for farshadak2004

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 …

Member Avatar for skatamatic
0
314
Member Avatar for sagar_wordlife

please any professional out there can suggest me with project ideas . . for my final year project work . . plz. .plz. .

Member Avatar for bluehangook629
0
249
Member Avatar for bwilson1

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 …

Member Avatar for Schol-R-LEA
0
183
Member Avatar for otreblag

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, …

Member Avatar for otreblag
0
132
Member Avatar for brandonpturner

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 …

Member Avatar for brandonpturner
0
938
Member Avatar for Stjerne

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 …

Member Avatar for Stjerne
0
198
Member Avatar for jeffrogers1113

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?

Member Avatar for gms7777
0
158
Member Avatar for jazz_vill

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 …

0
136
Member Avatar for pxndx

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 …

Member Avatar for jazz_vill
0
160
Member Avatar for IT FRESH

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 << " * …

Member Avatar for Schol-R-LEA
0
133
Member Avatar for javabeginner1

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 …

Member Avatar for javabeginner1
0
228
Member Avatar for Begginnerdev

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 …

0
84
Member Avatar for javaAddict

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 …

Member Avatar for javaAddict
0
107
Member Avatar for mrar85

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 …

Member Avatar for mrar85
0
138
Member Avatar for slim1_1

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 …

Member Avatar for thines01
0
90
Member Avatar for th3b3n

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 …

Member Avatar for stultuske
0
236
Member Avatar for peter20

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 …

Member Avatar for Narue
0
243
Member Avatar for cacofonix

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.

Member Avatar for thines01
0
181
Member Avatar for compulove

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 …

Member Avatar for thines01
0
207
Member Avatar for pendo826

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 …

Member Avatar for Moschops
0
117
Member Avatar for nameunknown

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 …

Member Avatar for BitBlt
0
231
Member Avatar for Behseini

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 …

Member Avatar for broj1
0
347
Member Avatar for tgr0ss83

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' …

Member Avatar for cereal
0
95
Member Avatar for modesto916

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 …

Member Avatar for thines01
0
504
Member Avatar for chuyauchi

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. …

Member Avatar for thines01
0
217
Member Avatar for martin11ph

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 …

Member Avatar for martin11ph
0
141
Member Avatar for PF2G

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 …

Member Avatar for bluehangook629
0
126
Member Avatar for jainjayesh1681

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 …

Member Avatar for Reverend Jim
0
172
Member Avatar for screwfacecapone

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 …

0
183
Member Avatar for BilalAKhan

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 …

Member Avatar for simplypixie
0
81
Member Avatar for bsiness

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 …

Member Avatar for pritaeas
0
155
Member Avatar for mkas

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 = …

Member Avatar for stbuchok
0
252
Member Avatar for PF2G

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

Member Avatar for stbuchok
0
127
Member Avatar for pendo826

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; …

Member Avatar for pendo826
0
138
Member Avatar for XodoX

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 …

Member Avatar for mrnutty
0
1K
Member Avatar for PF2G

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, …

Member Avatar for PF2G
0
162
Member Avatar for BTW8892

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> …

Member Avatar for JeoSaurus
0
563
Member Avatar for user543820

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,

Member Avatar for user543820
0
6K
Member Avatar for hardingC

#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** …

Member Avatar for hardingC
0
173
Member Avatar for luisborlido

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 …

Member Avatar for luisborlido
0
320
Member Avatar for IT FRESH

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 …

Member Avatar for Narue
0
193

The End.