199,114 Archived Topics
Remove Filter ![]() | |
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 … | |
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] … | |
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++) { … | |
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 … | |
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 … | |
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 … | |
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 … | |
![]() | 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 … ![]() |
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 … | |
[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 … | |
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 … | |
[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"); … | |
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 … | |
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 … | |
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 … | |
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 | |
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 :- … | |
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 … | |
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" … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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...... | |
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 | |
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] | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] … | |
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 … | |
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] | |
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 … | |
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 … | |
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 … | |
[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 = … | |
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" , … | |
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; … | |
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 : … | |
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 … | |
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 … | |
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 |
The End.