199,114 Archived Topics
Remove Filter ![]() | |
Hey, How can I terminate a server after some number of connections (don't want it to keep on running forever). I've written in it C, using the select system call, and an array to store the connections made in.. [CODE] while (1) { FD_ZERO(&rdset); FD_SET(clients[fd], &rdset); ( select(max+1, &rdset, NULL, … | |
I'm trying to code the game of Minesweeper. I haven't put in graphics just yet, only text labels on the buttons. Here is my create_widgets method: [code] def create_widgets(self): #Create the grid. self.square = [] self.isAMine = [] for i in range(self.y): row = [] mineRow = [] for j … | |
Can someone please explain why this function will not compile. [CODE]#include <stdio.h> #include <string.h> #include <ctype.h> // This function determines if a string is a palindrome. /* This function reverses the characters in the string * passed by the caller. */ void is_palindrome (char* string) { int i; int length … | |
Hi. I haven't been able to figure out how to allow names with apostrophes such as mine, O'Connor , to POST. Also someone tried to post a smiley face like :) and that also threw an error. I have tried adding this :: mysql_query("SET NAMES 'utf8'"); // UTF 8 support!! … | |
for many times when i debuge defferent programs i found this error. I think no error in my code because when i degun the same program in ma freids computer no wrong happen. Any idea. the errors: 1- fatal error LNK1120: 1 unresolved external. 2- error LNK2019: unresolved external symbol … | |
hi how to give hyper link to inside of the gridview columns......... here my code is given below but it was not working properly..... please give me the correct code......... [CODE] Private Sub fillgrid() Dim Hyper_Column adp1 = New SqlDataAdapter(" select vendorcode , vendorname as 'Vendor_Name' from vendor_master", con) adp1.Fill(ds, … | |
I noticed typing in shell like man printf shows a man page entry. Usually there are man pages for each command. I mean man pages are supposed to be for APIs and external interfaces (like g++, etc). How did the internals of say the c standard library functions end up … | |
My goal in this program is to solve for the 12 unique solutions for the 8 queens problem. All the below posted is my code. I believe that my findSolutions function is capable of finding the first solution but I have a couple issues from that point. If the user … | |
Hi everyone and thank you for helping me... again :icon_neutral: I am trying to perform a MATCH AGAINST sql query on one of my table called "what". [ICODE]id (int 11) PRIMARY org-id (int 11) keyword (varchar 100) FULLTEXT bid (DECIMAL 4,2)[/ICODE] I want to perform a search on the column … | |
I am hoping someone here can help me with a little bit of trouble using the execve() call. I have some code that needs to call an external script under CNL (Compute Node Linux, [I]i.e.[/I] - Cray XT4/XT5). CNL is [B]extremely[/B] lean and is missing enough libraries to make using … | |
Hi, i am relatively new to mysql just learning the basics really. i have googled this but there is so many discussions on it. Could someone just give a simplified answer to what is the difference between using Union or Join and when would you use one or the other? … | |
Although I've read about it it still doesn't sink in when you will need to pass in a variable. I think I know how i just don't know for what reason. If someone could provide that information for me i would appreciate it. Also, is PHP variable passing more efficient … | |
[code] void main() { int a = 5 , b =6, c=0; c = a++ + b++ + ++b + ++ a + a++; printf("c = %d \n", c); getch(); } [/code] the result of the code is c = 32 while if we write the following code the result … | |
[B]1.[/B] I want to put javascript in webpage that shows gif image on moving cursor anywhere on the page and [B]2.[/B]I want to get the value of one textbox and put this value to another textbox. | |
hiii....i done some graphics programming on a turbo c compiler & i would like to link it to a front end...& may be even develop a gui out of it....please tell me the procedure to link a turbo c code to a front end | |
it is strange that my code was working before I modified some variable name/ type. i didn't make any major changes except for changing from double to int, and from double to String. the change was involved a bit sql code change as well though. i got (does anyone have … | |
Maybe I am missing something that is clearly obvious but I have fiddled with this printHelper and print function for a while and cant seem to figure it out. The rest of the program works and gets the correct code, but this does not. It should print out 1 -> … | |
Hi guys. I have an observer/observable structure set up in my code that changes a bunch of TextField values with updated data, no big problem here. However, in my update(Observable obs, Object arg) method, I am trying to call another method to insert the new values into my database. I … | |
hey guys , I would like to read info from a file e.g [inline] 10 999990 Gerry Boudens $1000.00 999991 Jimmy Chow $1500.00 [/inline] it is a credit card program, so the user would input their name and the program searches for it, if found it should show their credit … | |
In the following program, why there is no delete in the destructor? is it because there is no pointer involved, so no memory needs to be released? How about the memory allocated when constructing M,P,S,N, the memory will be release automatically when the program ends? Thanks [CODE]#include<iostream.h> class point { … | |
i am writing a program that is delcaring an array of 100 intger numbers and filling the array with random numbers us rand(). all i have so far is. #include <iostream> using namespace std; int main() { int random_integer = rand(); | |
Hi, this is the first time i have ever used Delphi and was wondering if you could help me; i understand how to writeln etc. but I'm having trouble with programs such as making a program that requires the user to write a message, and how many times they would … | |
hello there im sorry i can not help you with your problem and like i said i am very sorry i am looking for some help myself first i do not know how to post a question on here second i need help with a program it is in pascal … | |
Hi everybody, I just started learning PHP and was asked to write a BMI calculator. I did all that but now I'm stuck with an if ... elseif that doesn't seem to want to work. I'm sure it's just a syntax error but could somebody look over it and see … | |
I have a compass that connects to my PC through RS232 @ 38400 BAUD. the compass outputs different "sentences" to send different kinds of data. Each sentence is a string that begins with a special header and ends with <CR><LF>. The string that I'm looking for is "$IIHDG,A,B,C,D,E*hh<CR><LF> where A, … | |
Hi guys, I'm trying to implement Karatsuba multiplication in c++ using stl vectors. I have some problems with multiplication (addition and subtraction are ok, I've checked). I need to read data from the file, when the file looks like that: 3 // tells me how many pairs I have to … | |
[CODE]Public Class Form1 Private Sub btnCompute_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCompute.Click Dim percent, calories As Double Dim grams As Double Dim allow_amount As Double = 30 grams = txtGrams.Text calories = txtCalories.Text percent = (grams * 9) / calories * 100 Dim fmtstr As String = … | |
This program compiles and lets me select a letter from the menu, but then it just repeats the menu, it never outputs the statements that correspond with the letter chosen. Any ideas why? [CODE] #include <iostream> #include <iomanip> #include <fstream> #include <cstdlib> using namespace std; //Function Prototypes void accept (); … | |
Hello all and thanks in advance for any help you can provide. I'm new to programming in Python and am looking to put todays date parameter passed into a URL string...how would I go about accomplishing this. This is some code I've sort of been messing around with: [start code] … | |
Hi all, I am tryin to differentate an equation and solve using C or C++. I need a start, n i m not getting much information from web even..I am curous hw MATLAB does that...i m positive that LAPACK has a no subroutine for differentiation. Appriciate your response Thank you | |
Greetings, I just want to know how to split a string using values of dictionary: dic = {'': '000', ' ': '011', 'e': '1111', 'g': '10', 'h': '010', 'o': '00', 'p': '1101', 's': '1110', 'r': '1100'} word = '1000011100001110001101010111111001110000' for items in dic.values(): [INDENT]word.split(items)[/INDENT] .... and when i do this … | |
I'm currently learning how to read through large groups of text files to scan for key words for some research work I'm doing. I came across an example that I don't fully understand, mostly because my Perl knowledge is a little piecemeal and it's been tough trying to find a … | |
hi, i was wondering of a simple way to generate a pdf & excel spreadsheet from a php form and mysql table with data in it? any help would be great. many thanks | |
I have a program that takes an object, turns it into an array of bytes and then sends it to another program using sockets (a la [url]http://www.java2s.com/Tutorial/CSharp/0580__Network/Catalog0580__Network.htm[/url] Socket Client & Socket Server GUI). My problem is that when the object arrives at the second program, I cannot turn the byte[] … | |
program p; var a,b:integer; c:real; forward p2; {for procedure p1 to call procedure p2} procedure p1 (x:integer; var y:integer); var c:integer; pt:^integer; {pointer declaration} begin { (1) } writeln(a,b,x,y); new (pt); if (x<2) and (y<2) then if x>y then begin y:=x; writeln(a,b,x,y); p2(x,b) end; dispose(pt); end; procedure p2 (x:integer; var … | |
working on a system with 2 tables both have the exact same fields - the tables are past_participant and course_participant - CP table has all current students whilst the PP has only past students. after a course concluded, that set of students is transferred from CP to the PP table. … | |
My problem is related to printing.I have a database table named billing from which I need to print the bill for a particular client. Now each client has a fixed auto generated client id but a multiple number of entries are present for each client. I am using crystal reporting … | |
Hey! I need to program a simple arithmetic calculator. I've done the parser, infix to postfix, etc. Everything's working with no problems except that it only works with one-digit numbers. For example: 10+2 evaluates to 2 instead of 12. Here's the code of the parser: [CODE] package calculator; public class … | |
HAI FRNDS..... daniweb site does not open on my p.c. but all sites are opening. i tryed to know where is the problem....but i can't. plz tell me how to open this site. where is the problem on my p.c. thnks. | |
hello i am trying to make a program for prime numbers but facing some problem can any one can help me in making this program | |
Hi!, I have a bit of a problem here. I am looking into a few options. First of all, I have a program that was written in GWBASIC and it runs great on a DOS machine. It will even run in Windows 2000 under QBasic if you run it from … | |
fatal error C1075: end of file found before the left brace '{' ANY IDEA WHAT MAY BE MY PROBLEM?? | |
Hi all, i want to ask u guys what else i need to do to run this code? i have JDK. i have these file in my c:/program files/java/jdk1.6.0_16 c:/program files/java/jdk1.6.0_18 c:/program files/java/jre6. if i want to run this code,what do i need to do? [CODE] import java.awt.graphics; class HelloWorldApplet … | |
[CODE] <asp:TemplateField HeaderText="Grabbelpas"> <ItemTemplate> <asp:CheckBox id="lblGrabbelpas" Enabled="false" runat="server" Checked='<%# DataBinder.Eval(Container, "DataItem.Grabbelpas") %>' ></asp:CheckBox> </ItemTemplate> <EditItemTemplate> <asp:CheckBox id="txtEditGrabbelpas" runat="server" Checked='<%# DataBinder.Eval(Container, "DataItem.Grabbelpas") %>' /> </EditItemTemplate> </asp:TemplateField>[/CODE] [CODE]CheckBox txtGrabbelpas = (CheckBox)(myDetailsView.FindControl("txtEditGrabbelpas")); strSQL = "UPDATE leden SET LidID = "Grabbelpas = '" + txtGrabbelpas.Checked + "' " + " WHERE LidID = '" … | |
Hi, Im very new to java (about a month) with a useless lecturer who has taught us nothing. Everything I have learnt so far as been on my own at home trying things. I did a question, but I wanted to try adding things to it to learn so started … | |
Hello, In the following code below i have 1 method that fills a array with 11 random value's.(wich works as intended). My question is how do i take each generated random value created in the array, and perform a calculation with each of those values? (preffered in a new method). … | |
Hello, Firstly, i am not at my computer atm so i will not be able to show you my code (i will post it later). I am creating a program for my dad which is sort of like a stock control program. I have a form with two comboboxes and … | |
Hi, I have certain data stored in tamil font (TAM-TTValluvar) I am creating a text file using PRINT #1,<fieldname> through VB6. The output in the text file looks like a bunch of junk characters and I could not able to take the printout from my dot matrix printer either by … | |
Hi, I am facing a strange problem here, I am using a webservice to send emails through my website. Strangly when I run the application through VS2008 web development server only one email is sent which is normal, but when I publish the website on IIS then two copies of … |
The End.