199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for P!th

I heard this forum was a wonderful place to ask programming related questions. So here I am, I'd like to know if anybody has a solution to a problem I'm having. I'm currently planning on creating a game on Python, and I've decided to make use of a joystick in …

Member Avatar for P!th
0
234
Member Avatar for daudiam

I downloaded data from google.com/favicon.ico and saved it in a file "icon.png" using the following: [CODE]URL url=new URL("http://www.google.com/favicon.ico"); InputStream ss=url.openStream(); byte bytes[]=new byte[100000]; int offset = 0; int numRead = 0; while (offset < bytes.length && (numRead=ss.read(bytes, offset, bytes.length-offset)) >= 0) { offset += numRead; } FileOutputStream out=new FileOutputStream("icon.png"); out.write(bytes);[/CODE] …

Member Avatar for daudiam
0
199
Member Avatar for modaslam

Can any one help me to optimize this code. Or possible to alter and make it more simple The out put i need to get is [CODE] 1 212 32123 ....... [/CODE] this is the code [CODE] main() { int i,j,k,n=4,val,flag=0; for(i=0;i<n;i++) { for(j=1;j<n-i;j++) putchar(' '); val=i+1; flag=0; for(k=0;k<2*i+1;k++) { …

Member Avatar for heznenkiah
0
110
Member Avatar for nix_xin

Create a program that will accept 20 numbers and arrange them in ascending order. The program should determine the distinct numbers and the number of occurrences for each number (or the frequency). Display the supplied values, the distinct numbers and the frequency of each distinct numbers. Your program should use …

Member Avatar for Xufyan
0
177
Member Avatar for totalwar235

currently i am writing a text based RPG but, when i call for the fight my rand() either does not seed each time or it glitches to continuously gets the "Boar". if you could please take a look at it and see if the problem is in the coding, i …

Member Avatar for totalwar235
0
146
Member Avatar for Viji

Hello everyone, I have a little bit problem here.I have installed PHP version 4.4.1 and it's working well. I want to connect PHP with MySQl . I have also installed MySQL and it installed successfully. Inorder to configure PHP to work with Mysql, I did the following changes in the …

Member Avatar for kwesiaryee
0
701
Member Avatar for nobodycool

Hey folks, plugging away at a new program for class and I have run into a little snag, or rather a fairly major one for my pea sized brain. We are working on constructing a sorted linked listed that will store author names as well as a sorted book list …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for Puster

Hello! I am working on a website, and this is a gaming clan webiste, and I want to have userprofile. Taht means that the admin can add players to the database, and set them on a team etc. But how can i do this? I will alsow have the ability …

Member Avatar for Puster
0
105
Member Avatar for ilyons

Hey guys, I was hoping that someone might have some experience with less-powerful CMSs. I'm looking for an education industry-specific CMS that has integrated supported for course pages/scheduling; a student database for grades, classes, and the like; and, ideally, a setup for students in the States to register for classes …

Member Avatar for Ghostt0
0
138
Member Avatar for softbrianes

[CODE]def egcd(a,b): u, u1 = 1, 0 v, v1 = 0, 1 while b: q = a // b u, u1 = u1, u - q * u1 v, v1 = v1, v - q * v1 a, b = b, a - q * b return u, v, a …

Member Avatar for Schol-R-LEA
0
103
Member Avatar for Duke Nukem

Duke SNIPPED Nukem will only allow 18 and above on his site. It seems like my html page is correct and my php is the problem. Anyone have any answers they would like to share with me? MAY JUSTICE REIGN SUPREME!!!!! [code] <?php $month = $_REQUEST['bmonth']; $day = $_REQUEST['day']; $year …

Member Avatar for Ghostt0
0
1K
Member Avatar for simransuri

[code]import java.util.*; public class Account { int choice,initbal,amt,total,withdraw; int ch; void Initbal() { Scanner sc=new Scanner(System.in); System.out.println("Enter Initial Balance (>200) : "); initbal=Integer.parseInt(sc.nextLine()); while(initbal<200) { System.out.println("LOW BALANCE!!!Balance should be greater than Rs.200"); System.out.println("Enter again : "); initbal=Integer.parseInt(sc.nextLine()); } } void Detail() { Scanner sc=new Scanner(System.in); System.out.println("***************MENU***************"); System.out.println("1. Deposit"); System.out.println("2. Withdrawl"); …

Member Avatar for JamesCherrill
0
177
Member Avatar for yamini222

Hi, I'm trying to execute this but it says "cannot implicitly convert int to bool". [CODE]for (i = 0; i < k; i++) { for (j = 0; j < m; j++) { c[i][j] = counts[i] ? c1[i][j] / counts[i] : c1[i][j]; } }[/CODE] Is there anyway that I can …

Member Avatar for ddanbe
0
97
Member Avatar for usep

INPUT's: 1) Name 2) Current date (month, day, year) 3) Birthday (month, day, year) The output will be the person's age in years, months, and days. See example below: Input name: shane Input current date: Month (1-12): 9 Day (1-31): 25 Year (yyyy): 2010 Input birthday: Month (1-12): 9 Day …

Member Avatar for usep
0
128
Member Avatar for RickSMO

I'm having a horrible issue with this exercise in this book. It sees no errors unless I try to run it or go into debug mode. in Debug mode it says " line 39 Input string was not in a correct format." If I run it without debugging, it crashes …

Member Avatar for RickSMO
0
137
Member Avatar for Nidhi S.

i want to retrieve images from access database and display in grid layout. i have displayed 1 image successfully but how can i do this for all images together.i have stored images as BLOB

Member Avatar for Nidhi S.
0
98
Member Avatar for phpboy

Hello. I have a linux VPS which is running ubuntu 8.04 I want to execute some command to the terminal, for doing that i use system() or exec() function. The functions are working properly at localhost, but aren't working properly on the VPS. Let's say, i have a command :- …

Member Avatar for lipo
0
391
Member Avatar for zachattack05

Not sure if this actually qualifies for this forum so please by all means move this topic to the appropriate place if it isn't. I'm writing a C# Windows Application (not a web app) and it uses either an SQL or Access database to store its data for multiple network …

Member Avatar for Ramy Mahrous
0
207
Member Avatar for Triztian

Hello all, hope you can help me understand, here's the general description: I have a form, 'frmData' that has a hidden field, that when submitted it sends the info to process.php, which checks if the hidden field has been submitted, if so it redirects the user to a page "energy.php" …

Member Avatar for Triztian
0
205
Member Avatar for rowley4

This code generates all permutations of the numbers 0, 1, 2,...., n-1. I am trying to get it to use recursion to do this. I am not compiling. I do not show errors, but I am not getting it to work. Can anyone see where I am going wrong? [CODE]import …

Member Avatar for JamesCherrill
0
99
Member Avatar for Ee Juan

Question: Each year the HSE Unit receives accident count reports from a 10 departments across the university. To summarize these reports, the department provides a frequency distribution printout that gives the number of departments reporting accident counts in the following ranges: 0 - 19 20 - 39 40 - 59 …

Member Avatar for Ee Juan
0
163
Member Avatar for JBD2

Has anybody here made a progarm like VNC, or A remote access program? Because I'm trying to make one, and I was wondering if somebody had some code or something that I could work with. Thanks. JBD2

Member Avatar for McDedz
0
947
Member Avatar for ManishS

I want to view the contents of a table in my database using while loop i.e. whenever i add database into the database and open view.php i want to see all the data of the database...so i want to use while loop so that whenever i add new data into …

Member Avatar for jogesh_p
0
115
Member Avatar for jay_el_em

Hi all I am a beginner programmer, and I think I might have bitten off more than I can chew.I've done some small projects, and then decided to do a simple banking app, just as a learning exercise. Problem is I don't know where to begin, and I've not created …

Member Avatar for Mitja Bonca
0
108
Member Avatar for bee90

I am practicing the inheritance concept od oop in c++. It seems like a simple program but the linking error my compiler Dev C++ 4.9.9.2 version is giving me, makes it look sooo annoyingly difficult. Error is: [CODE] [Linker error] undefined reference to `vtable for Cd' [Linker error] undefined reference …

Member Avatar for bee90
0
188
Member Avatar for bigwhiteegg

This is the main part of a project I assume all other header and cpp file are correct cuz most of them are copy from books n the professor when I run it, "right after the input" the program sort of stopped, pop out a error message, then keep running …

Member Avatar for bigwhiteegg
0
107
Member Avatar for neoraghav

Hi, Need help to know, how to diaplay a count down timer in the dialog box using MFC. and when the timer ends the dialog should colse........ Please provide suggestion......

Member Avatar for neoraghav
0
282
Member Avatar for shibin09

i created a program in c# with database sql server 2005.it worked in windows xp.but i don't know how to install my software in windows 7 .i coudn't install sql server2005 or sql servr 2005 64 bit in windows 7. help me plz ..very urgent

Member Avatar for Mitja Bonca
0
102
Member Avatar for pacers10

I think i have the function for mean but i also need to figure out below mean. This what i have so far.[CODE]import math def mean(alist): belowMean = alist mean = sum(alist) / len(alist) if mean <= alist: belowMean = item return belowMean [/CODE]

Member Avatar for Schol-R-LEA
0
95
Member Avatar for sasucker

For my assignment this week, I was supposed to create a program that would read in names from a file, sort them, then output the names sorted. I attempted to do it as a insertion sort, and seemed to have failed miserably... if anybody could point me in the right …

Member Avatar for llk
0
2K
Member Avatar for Danny_501

Hi all, I'm making a client server program in Linux. I use fork() to create a child process of the server to handle a new client. When a client disconnects it should kill the child process. At the moment the program is able to kill the fist client(server) that connects, …

Member Avatar for Danny_501
0
114
Member Avatar for aram25

Hello All I'm new to VB and i need help on how to rename text file with textbox contents. I have a textbox and i would like to make it so once a button is clicked the text file is renamed according to the contents in the textbox. I am …

Member Avatar for aram25
0
665
Member Avatar for burcin erek

the program is running well but concept is wrong. you should find number 0-100 until 10 trials. if failed, and want to play again unfortunately program is terminated why ? [CODE]#include <cstdlib> #include <iostream> #include <windows.h> using namespace std; int sayiturev (int aralik) // generating number 1-100 { srand(GetTickCount()); int …

Member Avatar for burcin erek
0
289
Member Avatar for ghingghing

i am new fr this site and i guess i will get some help fr here we have a project on our finals and we need to make a program of payroll using menu with the output of employee name, update employee record. display employee record, delet record and exit …

Member Avatar for ghingghing
0
131
Member Avatar for beatenbob

This is my school's assignments and I'm a beginner in C++.. I'm trying to write a program which prompts strings input from user. Say if user enters "My name is blabla", the program should print the exact same thing without ignoring the characters after the whitespace. I tried using a …

Member Avatar for WaltP
0
163
Member Avatar for aviavyne

I'm a beginner at c++ and i was given a certain assignment. A person enters a digit, and then this digit is multiplied by 4, but if the multiplied number is greater than 9 then we add its digits, and if the addition still give you greater than nine, then …

Member Avatar for WaltP
0
139
Member Avatar for fuston05

OK, im trying to develope an event calendar. So, far i have used only php. I am new to programming and thats the only language i have learned atm. anyway, when i click the next or prev month buttons it sets cookies for new months etc.. to a cookie.php from …

Member Avatar for kylegetson
0
382
Member Avatar for dfaulted

I cannot figure out what I'm missing in order to stop these errors from showing. [quote]PHP Warning: strpos() expects parameter 1 to be string, array given in /home/public_html/includes/classes/shipping.php on line 26[/quote] Line 26: [code]if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($phpself, (strrpos($phpself, '.')+1)), $this->modules)) ) {[/code] …

Member Avatar for kylegetson
0
3K
Member Avatar for lightningrod66

I have tried and tried and looked and looked, but I still can'y get this to work.... I am trying to (a)check form data on-the-fly, (b)once all required data is entered, then CLEAN the data and insert into MySQL database, and ONLY IF (a) and (b) have completed, then (c)send …

Member Avatar for lightningrod66
0
133
Member Avatar for yowsh

Please help me translate this nested for loop to assembly [CODE]for(int i=0, k=0; i<8; i=i+4, k++){ for(int j=i; j<=i+4; j++){ temp[j-(4*k)]=binary[j]; } }[/CODE]

Member Avatar for Schol-R-LEA
0
178
Member Avatar for dschuett

I have created a script that lets you upload multiple pictures, but the down side is that I have to browse to each and every picture to select it. - Which is very inefficient, especially because I am putting this all together for a photographer to allow her to upload …

Member Avatar for dschuett
0
165
Member Avatar for Mittwaffen

I'm in a rough situation, i'm currently re-reading all of my textbooks to assist me with this work, however I am really in a rough spot being time limited I really want to get somewhere from what I have (and fix what I have). What I need to correct/add. -I …

Member Avatar for Schol-R-LEA
0
113
Member Avatar for Protoroll

I am writing a toString method for my Nursery class but am having trouble getting everything working properly. I have to go through the ArrayList and call the toString method for each individual tree and then the sum for all of the trees prices. Here is what I got so …

Member Avatar for NormR1
0
91
Member Avatar for Coder98

[code]using System; public class BonusProduction { public static void Main() { int FName, LNAME; double LastYearProduction; double ThisYearProduction; Console.WriteLine("Enter your first name"); FName = Convert.ToInt32(Console.ReadLine()); Console.ReadLine("Enter your last name"); LNAME = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter Last Year's Production"); LastYearProduction = Convert.ToInt32(Console.ReadLine()); if(LastYearProduction < 0) Console.WriteLine("Invalid"); { Console.WriteLine("Enter This Year's Production"); ThisYearProduction = …

Member Avatar for Schol-R-LEA
0
149
Member Avatar for pacers10

I am having trouble trouble figuring out this problem any help would be appreciated. The problem wants you to change english into pirate language. Using the string split and join methods. This is what i have so far. [CODE]import copy def wordReplace (wordText): wordDict = { "hello" : "avast" , …

Member Avatar for Schol-R-LEA
0
81
Member Avatar for Qabane

Hey Guys I don't get what I need to add Im fairly new in Java. this is my code but it gives me these below the line errors below [code]import javax.swing.*; public class Movies { private String name; private double price; private int year; public Movies { name=""; price=0.0; year=0; …

Member Avatar for Akill10
0
178
Member Avatar for eijei

please help.. how can i restart my game , whenever my timer ends . it'll prompt "time expired!".. and then after , when the user clicks OK.. the game will stop .. and the user can no longer continue the game .. PLEASE HELP US : heres my code : …

Member Avatar for Airshow
0
239
Member Avatar for el33t

Hi, Please consider the below code. [CODE=php]<html> <body> <?php $time1 = localtime(); echo $time1[0]; echo("<br /><br />"); /* HERE SOME CODES RELATED TO CERTAIN FUNCTIONS LIKE DISPLAYING OF SOME IMAGE ETC. IS EXECUTED. APPROXIMATELY IT TAKES 10 SECONDS FOR THE COMPLETE EXECUTION OF THESE FUNCTIONS. SINCE IT IS IRRELEVANT TO …

Member Avatar for el33t
0
121
Member Avatar for dfaulted

I know most undefined index notices are the result of not initializing variables. However, what causes them in arrays and such? I have a few that I cannot wrap my head around: [quote][E_NOTICE] Undefined offset: 1 On line 27[/quote] Line 27: [code]list($file,$extension) = explode('.', basename($path));[/code] [quote][E_NOTICE] Undefined offset: 1 On …

Member Avatar for mschroeder
0
281
Member Avatar for amittal2089

Hi After posting the form i dont see anything in STDIN however if i submit the form as GET request then i can see the value in $ENV{QUERY_STRING}. I will really appreciate if anybody can help me in this issue. Thanks Arun Mittal

Member Avatar for richieking
0
49

The End.