199,114 Archived Topics
Remove Filter ![]() | |
I have a ajax function implementation: when the user is on one site, the ajax call keeps checking the server every 5 seconds if there is a server url change. If there is, there will be a message displayed to direct the user to go to another site. when the … | |
I am trying to make a single player connect four game in C++. With the specifications being: [LIST] [*]7x6 [*]In order to win, the player must match four games pieces either horizontally, vertically, or diagonally. [*]One player, playing against a computer that makes random inputs. [/LIST] I'm confused on how … | |
My code is : [CODE] public final class Pixels{ BufferedImage img=null; public int w,h; public Pixels(){ try { // Read from a file File file = new File("1.jpg"); img = javax.imageio.ImageIO.read(file); } catch (IOException e) { } } public void checkfunction(){ h=img.getHeight(); // errorpoint w=img.getWidth(); } [/CODE] Errors: Exception in … | |
[code]def main(): splash() wordTotal = 0 longestWord = 0 fin = open("constitu.txt") for line in fin: #n = fin.readline() wordLine = line.split() #word = wordLine.split() wordTotal += len(wordLine) #if len(word) >= 15: #longestWord += 1 #print word print "This constitution has ",wordTotal, " words." def splash(): print "This program is … | |
I am very new to c# and i want to learn it......is there is a good tutorial to learn visual c# 2010 express for desktop apllication. And I wanted to to create a code(c#)to display total elasped time as a label when the user clicks an evaluate button (add or … | |
My first post on this forum, long time lurker though. I'm running into a problem trying to search through an N-ary tree. I'm tasked with having the user input pairs of job titles and from there putting them into an N-ary tree, with the higher job titles at higher levels. … | |
Hi, I am using c# to update and view the student_Teacher simple database in sql. I used textboxes with binding navigator to view and update the teachers info and datagridview for the students, so 1 teacher per many students is the output. I have no problem for searching, editing and … | |
I am having a problem sending my form to MySQL on my application page (when you click GameTime! it should send the data to a MySQL table.)- [url]http://www.facebook.com/apps/applicatio[/url] … 6347603790 It sends the form data here: [url]http://bit.ly/91oi88[/url] however, it just won't seem to work in facebook. Obviously there is something … | |
I have python 2.5.2 on my Debian system n want to upgrade it to python 2.6. Got to know that apt-get install package searches for package in /etc/apt/sources.list I have downloaded python 2.6.2. How to add an entry to the file /etc/apt/sources.list ? :( | |
For some reason i cant get my GCD function to return anything in my main function someone help? [code] #include<iostream> using namespace std; int firstanswer; int secondanswer; int a; int b; int gcd (int a,int b) { int t; while ( b != 0); { t = b; b = … | |
Ira Banks // CS 171-02 //10/29/2010 // This program will to simulate the following activity. He has 25 chips numbered 1 through 25 in a bag. // He thinks of a number from 1 to 25. Then he draws numbers from the bag, recording each and returning it to the … | |
Hi everyone, I am trying to create a list of objects in python. I get the listing of all of the files from the directory that I want. Then I open each file and read it into an appropriate object and append it to the list. For some reason when … | |
Hi all, I've written the code to create a digital clock using a label and it's all working dandy. Now though, I want to take it to the next level and use images for each of the digits instead of a simple label to make the clock fit more with … | |
i'm planning to put an image before the name of the file. how to do that? for example i have IMAGE1.jpg filename i want to put an JPG image before the filename. | |
I have been all over the web (and through several books) in an attempt to get an answer to my problem. Briefly, I am trying to get the contents of a string array expressed as the header text for datagridview columns by the calling that array from a listbox. There … | |
Im sure this has been posted a billion times, but ive followed steps on other threads and still no look. What im wanting to do is to be able to delete a record from a form that is echoed..get me? Heres the steps: - Post update news, insterts it into … | |
Hi all, I have a grid view I am trying to use, and it displays a large number of pill codes, (thousands) that I would like to be able to filter down. I have set up a dropdown list that gives the different options to filter on, basically every letter … | |
Hello, I am new to posting, but have searched these wonderful forums for a couple years. I am programming a game as a hobby. And I have been searching for a way to read what the user types. e.g. User types in "hello" and I can take that and send … | |
I have a query like: [code] select * from tableA where id in (1,2,3,..) [/code] List of ids ids very long about 200 000 ids. There is an clustered index on id colums. The same query on mysql rus fast but on MS it cant take about 20 minuts (on … | |
I'm trying to make a deck of cards; I want it to keep track of the cards that have been drawn. Will this code delete the card that is displayed? [code] void Deck::draw_card() { int random_card = (rand() % cards.size()) - 1; cout << "\n" << cards[random_card].name << "\n"; cards.erase(cards.begin() … | |
[code] #include <iostream> using namespace std; class X { public: X(int) { cout << "X()" << endl; } void f() { cout << "f()" << endl; } }; class Y: public X { public: Y(int): X(1) { cout << "Y()" << endl; } }; class Z: public X { public: … | |
Hi, all I'm searching for an idea regarding AI term project. I've researched a lot about AI areas, but not able to decide/come up with reasonable project that can be implemented within 2 months (approx. 5-10 hours a week) and easy to test&document, but at the same time be non-trivial … | |
Im getting the folowing error while trying to implement a friend function between two classes. "Board.C: In member function ‘void Board::input(bool)’: Board.C:227: error: ‘class Piece’ has no member named ‘castSpell’ make: *** [Board.o] Error 1" Piece's Header file [CODE] #ifndef PIECE_H #define PIECE_H # include "Spellcaster.h" # include <iostream> #include … | |
I have a question that I can't seem to find a satisfactory answer to by searching the site, and I'm not entirely sure I am searching with the correct keywords. Anyway, here goes. I am working on a free membership script, and would like to use the members username as … | |
struct list_link { int key; // identifies the data double value; // the data stored struct list_link* next; // a pointer to the next data }; struct list_link* create(int key, double value, struct list_link* next) { return 0; } the "struct list_link" contains two variables and a pointer. what exactly … | |
Hi all, Thanks for reading my post! So up until now I've been using Emacs (or Aquamacs on my Mac - essentially the same thing) for software development and I really do find that I can work very quickly with it. Recently, I've been thinking that maybe there is something … | |
Dear DANIWEB community members, I am a newbie with Windoze programming, and I hope you could help me going with my project as I have a really just a technical question: I have a simple GUI with some buttons and text boxes defined in a form .h file, and I … | |
I am developing an application that based on when a user has last entered a payroll, my program tells them the next available Sunday that is available to them based on 1. The date that the last time payroll was entered 2. If payroll ran = "yes" or "no" I … | |
can anyone help me out with these errors i'm getting please? and if they can explain why im getting them and how i can avoid them in future thanks :) Notice: Undefined index: prod_name in C:\wamp\www\uniwork\update_database.php on line 17 Notice: Undefined index: prod_price in C:\wamp\www\uniwork\update_database.php on line 24 Notice: Undefined … | |
im doing this project to work it prints out all information except the radius it just gives 0,0 but needs to give locations provided in code. [CODE]#ifndef SHAPE_H #define SHAPE_H #include <iostream> using std::ostream; class Shape { friend ostream& operator<<(ostream &out,Shape &s); public: Shape(double = 0.0,double = 0.0);//default constructor double … | |
I am very very new to perl and am not even sure if awk is what I should be using instead. Hopefully someone out there can help me put together a script for this problem. Here is some sample data (it is tab delineated in my file): 20 scaffold189_125 13634 … | |
[CODE]def exportTextList(fileInput, wordList): fileOpen = open(fileInput) for line in fileOpen: line = line.rstrip("\n\r") lineList = line.split() wordList = wordList + lineList return wordList def main(): fileInput = 'PlayerNames.txt' wordList=[] exportTextList(fileInput, wordList) print wordList[/CODE] My code summary: I'm taking a txt file, playernames, and i'm stripping all of the line breaks … | |
I am having trouble with this problem, I need to enhance the red intensity of each pixel This is what i have [CODE]import cImage def makeRedScale(imageFile): myImageWindow = ImageWin("Image Processing",600,300) oldImage = fileImage(imageFile) oldImage.draw(myImageWindow) width = oldImage.getWidth() height = oldImage.getHeight() newImage = emptyImage (width,height) for row in range(height): for col … | |
![]() | Hi I wrote a litle code to calculate factorial, but when I compile it, it says " ';' expected " (In the " for ") Here is my code : [CODE] /** * A class to calculate factorial of a number * * @author Barth * @version 10/29/10 */ public … ![]() |
I am currently trying to write a C++ program. The intent of the program is to guess what side a coin is going to fall on, heads or tails. I feel like I am very close to making it work. But I can not seem to figure out how to … | |
![]() | Hey, For a while know i have been using Microsoft components and look and feel. I want to change that i want to be able to build my own components in c#. I thought i would start with something simple like a label and then move up to a text … ![]() |
HTTP Status 500 - -------------------------------------------------------------------------------- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: File "/WEB-INF/struts-html.tld" not found org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116) org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:160) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:430) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:499) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1558) org.apache.jasper.compiler.Parser.parse(Parser.java:130) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245) org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:176) org.apache.jasper.compiler.Compiler.compile(Compiler.java:317) org.apache.jasper.compiler.Compiler.compile(Compiler.java:298) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) note … | |
I am needing help with programming challenge problem 12. It will compile, however, its does not make the array twice the size of the argument array. The problem says: Write a function that accepts an int array and the array's size as arguments. The function should create a new array … | |
Hi! Sorry for may bad english! How to add a function that will add some text in textarea, when someone clicks on button, where the cursor is? (Like here, on daniweb textareas!) eg. There is bold button! The user clicks on it, and the text "[BOLD][/BOLD]" writes where curser/caret is. … | |
Hi! Sorry for my bad english! How to delete some text with javascript? Example: I have this in textarea: [LINK=http://www.someurl.com]Link - click[/LINK]. I want that the text between "[LINK=" and "[/LINK]" deletes (output will be "[LINK=[/LINK]"). How to do that? | |
Hi there, ok, im fairly new to c++ and have been trying to figure this out for ages: I have a text file i want to read in that contains lines and lines of lat long points; N50 42.22 W002 55.33 N50 42.22 W002 55.33 N50 42.22 W002 55.33 i … | |
There's a query where I want to get the: - Username of the user attached to the current opportunity record - Sales Stage associated with each opportunity record - Dollar amount associated with opportunity record I want to: - Take the current SELECT IF STATEMENT result, and collapse it based … | |
I want to write and read a Student struct to/from a file. The program works weird . Sometimes reads 52 elements, sometimes 1 element. I couuld not see what the problem is. Help please. [CODE]int main() { FILE *deneme = openBinaryFile("C:\\text\\text.txt"); Student me = {"Mert","Akcakaya",200611004, 0}; Student you = {"Default", … | |
Hi, How do I find the frequency of each item in a list in Python? For example if there are five 'apple', two 'banana', and so on in the list, how do I write a program so that it displays the item as well as the number of times it … | |
I am trying to write a program that will take a text file and parse the words into a linke dlist that will be then printed to the screen with a user defined number of characters per line and I am running into some runtime issues with opening and procesing … | |
Hey folks, i have a problem with a vector im attempting to program. There are no compile errors but during run time i get an error saying: "Debug Assertion Failed! Program:...filepath\GA.exe File:...include\vector Line: 779 Expression: vector subscript out of range" etc... I have tried stepping throught the program to no … | |
Hello all, I am having a problem with a c++ assignment. The basic problem is that I have two functions -- one to compute the mean and and one to compute the variance of a subarray from a main array -- arraym.I keep getting an extra parameter in call error … | |
Good Afternoon, I am looking to create a page where I can enter data into a form and use INSERT to enter into the database. In the code example below, I have shown only 3 fields, but my page will have 13 fields and I want to designate 8 of … | |
For my program I am supposed to implement an encryption and decryption algorithm. You will read the input from a file, “plaintext.txt” The file will contain plaintext strings that are all lowercase, and be of the format: 3 hello world 2 how are you Each line contains an integer as … | |
Hello, I created a linked list and implemented a deep copy function. However, the copied list skips the head node in the source list for some reason. So assume source list contains the following data in their respective nodes: 1 3 6 7 10 312 The copied linked list will … |
The End.