199,114 Archived Topics
Remove Filter ![]() | |
so I'm using code from [url]http://schmidt.devlib.org/java/file-download.html[/url] in the hopes of inputting a URL and getting the file that URL points to. It works, sometimes. 90% of the time it doesn't work. Also, it seems a lot of the pages I want to download do not end in html, although I'm … | |
need to replace all occurences if substring by new string. below code replace first occurence but not other substrings present in input string. | |
Hi to all, I have table student in which I inserting first name,middle name, last name in 3 different columns. but when i want to show it in gridview I want to join three columns into only one heading "Name". Is it possible...? or any other way to show it..? | |
hey, can any one tell me whether i can write methods other than getxm or put xml in restful web services.If yes then which will be the first function to be called | |
Hello, all: I'm trying to sanitize/secure my query, and it all seems ok when I test it with most special-characters... but when I try to test the single quote (') like this... [url]www.mysite.com/page.php?category=[/url]' Then it gives me this error: "You have an error in your SQL syntax; check the manual … | |
Hi all, I am rather new to PHP, but have a fairly ok grasp of software design. My question arises from the fact that I'm getting ready to deploy some scripts etc. to my website which is hosted on a *nix type server. My home / work computer that I'm … | |
How to handle UTF-8 characters in HTML, JavaScript, PHP and MySQL ... | |
hi everyone. Just out of curiosity more than anything; does anyone know of a library that can grab microphone input (on windows)? I'm looking into how to write a kind of VoIP (voice ip) program. I know how to use sockets for sending/receiving data, but I just need the microphone … | |
Could anyone tell me what is wrong this code please. I'm trying to do this. Add a static method Account consolidate(Account acct1, Account acct2) to your Account class that creates a new account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. … | |
Hi, I am trying to write strings to a file line by line and trying to format the output so that the alignment is proper. output should be it should appear in the output file as david 10 15 16 sam 11 15 16 but appears as david 10 15 … | |
How can I draw text in a glut window with the keyboard; I have tried doing cin with [CODE] void TextBox::Keys(unsigned char key,int x,int y){ switch(key){ case 13://enter key cin >> String; DrawString = true; break; case 27: exit(0); break; } [/CODE] and then in the draw function [CODE] fontx … | |
I created some data files with 'outfile ' command. The files are created in the mysql folder.{I use WAMP} I want to create those files in another directory. How can I do that? Thankx in advance. | |
I'm trying to do some consolidation but I'm not sure on the specific rules of consolidation so I'm having A LOT of difficulty on it. Here's what I'm trying to do. Write a program that prompts for and reads in three names and creates an account with an initial balance … | |
Hello Guys I am working on a website I am not getting the forget password can u please help me in solving problem please Thanks in advance | |
What is the difference between following declarations: [CODE=C#] WebUserService.Service.IUserService userService = new WebUserService.Service.UserService(); WebUserService.Service.UserService userService = new WebUserService.Service.UserService(); [/CODE] I want to know the difference in usage and the the one that is most efficient in terms of programming in C#. | |
I have to create a program that accepts 3 user inputs (hours, minutes, seconds) and then asks the user whether they want it to show in standard or military time. The main program should make 2 calls to the function DisplayTime, whether its true if they want standard time or … | |
What is wrong with my code? [code] String[] movieString = {"movie1", "movie2", "movie3", "movie4"}; JComboBox movieList = new JComboBox(movieString); movieList.addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent e) { JComboBox a = (JComboBox) e.getSource(); //String movies = (String)a.getSelectedItem(); if (e.isSelected()); return subpanel; } }); }[/code] | |
Hey guys, I justs started this code to make a diamond with stars (*), but I get confused how to print the spaces that I need, I don't know if you understant what I'm trying to say. It is something like this: Prompt the user to enter (odd) height (of … | |
First of all, I'M reading the book "Microsoft XNA Game Studio 2.0". I understand the error I'M getting but I don't know what to do about it. The error says I can't use backgroundColor before it has been declared. I'M following along with the book so I don't see why … | |
Hello everyone! So as my first post, I would like to say I am in no way unfamiliar with Visual Basic or programming in general, but this Database integration is giving me quite a problem! lol So basically I have a VB 2008 Project with a single form that displays … | |
I have a problem with alignment of the child form in a parent form. I would like to have this Form3 in the upper right corner of the Form1 - always - even when user changes the size of the form1. Form3 it has to be located there. The location … | |
Hello everyone, I need help with this code, which does not work properly. It prints fine at the first instant and when I convert it into a double it prints some unknown value. I am trying to get the maximum of all the values in the row. First: I cant … | |
can someone help me figure out why my output is incorrect any help would be apprecaited [code]#include<iostream> using namespace std; class fractions { public: fractions fractions :: operator+(fractions f); fractions fractions :: operator-(fractions f); fractions fractions :: operator*(fractions f); fractions fractions :: operator/(fractions f); fractions addFraction(fractions); fractions subFraction(fractions); fractions multiFraction(fractions); … | |
im new with C++ . i was in java but now im learning C++ and i am not very good at it . i am making a program about spam and ham emails . i have all the files in the same directory . i created Ergasia1.cpp , Ergasia1.h , … | |
This is an example program that I am studying so that i can make my own mixed mode assembly/C program. I am having trouble understanding on the assembly code, why I have to push SI twice at different times and only pop it out once. Also why push and pop … | |
How do I reinitialize array to null or zero when reprompted to renter data. Tried this but still computes average for previous entry. Student[] students1 = new Student[studentCount]; here is a snippet of code [CODE]float totalscore = 0.0f; boolean isValid = false; String lastName = ""; String firstName = ""; … | |
can someone help me figure out why the output of my program is coming out wrong [code] #include<iostream> using namespace std; class fractions { public: fractions fractions :: operator+(fractions f); fractions fractions :: operator-(fractions f); fractions fractions :: operator*(fractions f); fractions fractions :: operator/(fractions f); fractions addFraction(fractions); fractions subFraction(fractions); fractions … | |
I've noticed there is at least 1 thread regarding to artificial intelligence. I assume most people new and old to python would be interested in artificial intelligence and the even greater goal of artificial life. I personally do not know anything about them. If you have ever had any experience … | |
basically i have created a program which reads integers from a txt file and works out the averages etc. now the below code i wrote to simply state which month has the highest or lowest rainfall. below i have created the code but on compiling says there an error....can someone … | |
Hey. I'm importing an array in a text file via [icode]array=numpy.loadtxt("testdata.txt")[/icode]. Is there an easy way to count the number of rows and columns? Maybe something like [icode]x=numpy.countrow(array)[/icode]? I've had a look around and couldn't find anything suitable. Thanks, Alex | |
this is my function [CODE]double area (int side_a, int side_b, int side_c) { double semi; double area_ans; semi = semi_peri (side_a, side_b, side_c); [COLOR="Red"]area_ans = (sqrt(semi * (semi - side_a)(semi - side_b) (semi- side_c)));[/COLOR] return area_ans; } double semi_peri (int side_a, int side_b, int side_c) { double semi_ans; semi_ans = … | |
I get this gcc warning with [I]-Wwrite-strings[/I] flag. I want to return a string of chars correctly but I also do not want to use [I]malloc[/I]. I've read other posts but can somebody explain how to acheive this in layman wording? [QUOTE]a.c:14: warning: passing argument 1 of ‘VAR1’ discards qualifiers … | |
I am trying to get two numbers to overflow and print an error message stating this. it works for some numbers, but other numbers for example adding the numbers 1073741824 and 1073741825 results in a negative number -2147483647 which is clearly overflow. However, I cannot get these negative numbers to … | |
Hey, can anyone tell me what's wrong with this method? I keep getting <identifier> expected error on line 1. [CODE]public static void FaultHandler (DatagramSocket aSocket, InetAddress aHost, int proxyPort, byte[] requestArray, rec_bytes) { int faultCount = 0; while ( faultCount < 4 ) { DatagramPacket request = new DatagramPacket(requestArray, requestArray.length, … | |
As the title says please. The issue I'm having is I've got a class which holds the vector. When I create a new instance of the class I assume a new vector is also created which results in the vector losing all its contents? | |
This is graphics.py from the zelle book. The following code seemed to be working but when i added the parameters to the function def drawEye(win, centre, radius): i get an error when i try to execute it Traceback (most recent call last): File "C:\Documents and Settings\Compaq_Owner\Desktop\t.py", line 22, in <module> … | |
I am having problems with my reverse polish calculator code. The code is as follows: [CODE]import operator OPERATORS = { '+': operator.add, '-': operator.sub, '*': operator.mul, '/': operator.div, } class Stack(object): "Creates a stack to enter numbers or operators into" def __init__(self): self.storage = [0,0,0,0] self.sptn = -1 def push(self, … | |
Assume I have a file of the following format: a,1 b,2 c,3 d,4 Here is my code: [CODE]def junk(f): d1 = {} d2 = {} for line in f: columns = line.split(",") letters = columns[0] numbers = columns[1] d1[letters] = numbers d2[numbers] = letters return (d1, d2) def something(): print … | |
Hi, I am trying to build a linked list, I have the following, and I get 4 error messages, ListNode, NumberList, and head undeclared, and then syntax error, please help. #include <iostream> #include <fstream> #include <ctime> #include <string> #include <cstdlib> //#include "input_data.h" using namespace std; class Node { public: int … | |
I am new to c programming. I am trying to write a parking garage program that uses arrays to find the charge for each car and the total charge. Here is what I have so far. Please help me in any way that you can. [code=c]#include <stdio.h> #include <math.h> float … | |
Hello all. I have a problem that seems like it should be relatively simple to fix but I have been scouring the internet and can't find an answer =( I am trying to add a keylistener to this code, but it doesn't recognize the method addKeyListener(this); I am working with … | |
So i have to do a school project for next year and i was thinking about doing something like a Pokemon game. i don't know were to start, what software should i use and if you can give me any tips that would be great. | |
Could someone show me how to compile this [URL="http://sourceforge.net/projects/torrentsearcher/files/"]source code[/URL]? I dont know much about C++ but I want to edit the file that contains the homepage so the homepage is google. [url]http://sourceforge.net/projects/torrentsearcher/files/[/url] I think the program contains 3 different peoples source code that work together in the actual torrent … | |
I need to only allow integers and the letters "d" and "r" from raw input otherwise I need to run an exception. For example: [I]You entered 's' this is invalid[/I] I have tried to use try/except statements but can't work it out. Is this the best way? Can someone help? … | |
i have a program which displays a certain menu, after the menu it askes for the selection from the menu....now when an integer is used it works perfectly. but when you input a character(letter) in the menu it goes into an infinite loop. anything to use to stop this behavior … | |
Hi all, Please I'm a newbie in PHP and MySQL, I have results from a GROUP BY (grouped by col2) query in the format. col1 | col2 ----------- a1 | a a2 | a a3 | a a4 | a b1 | b b2 | b b3 | b I … | |
Assume I have a file of the following format: a,1 b,2 c,3 d,4 Here is my code: [CODE] def junk(f): d1 = {} d2 = {} for line in f: columns = line.split(":") letters = columns[1] numbers = columns[2] d1[letters] = numbers d2[numbers] = letters return (d1, d2) def something(): … | |
I have to get pthagaros to get the distance between 2 points. so the function distanceBetweenPoints(Point(1, 2), Point(4, 6)) should result in 5.0. the parameters are supposed to be P1, P2, which i think i have done?. The get an error when i try to execute this?.. help please def … | |
Hello ! I'm New to ASP.NET, I want to use it with C++. I installed Microsoft Visual C++ 2008 Express Edition, And installed IIS ,When i've Written my First code to Test, I got this message: [QUOTE]An unhandled exception was generated during the execution of the current web request. Information … | |
Hello everyone, I'm currently having some problems with this code. I am getting many compiling errors and i was wondering if you guys could help get rid of them. [CODE]#pragma once #define CAPACITY 128; typedef int QueueElement; class Queue { public: Queue(); int empty(); void enqueue(const QueueElement & value); void … |
The End.