199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Chargerfan

I have written code in wpf that when the user presses a button on the grid, several rectangles of equal size will be displayed and have equal margins around them. I have also written code that when the user resizes the window, the rectangles will grow as the user makes …

0
130
Member Avatar for Spiffy P Mcgee

What I have to do: I have to read numbers from a file input from the keyboard into an array, sort the numbers, and write the sorted numbers to a file. My problems are twofold: First, I don't know how big to make the array. When I try to write …

Member Avatar for Clinton Portis
0
276
Member Avatar for nickles

Hi, I'm getting the error Warning: mysql_numrows() expects parameter 1 to be resource, boolean given in C:\wamp\www\******\include\Database.php on line 294 when I try to run this [CODE]function calcNumActiveUsers() { $query = "SELECT * FROM ".TBL_ACTIVE_USERS; $result = $this->query($query); //just uses mysql_query var_dump($result); $this->num_active_users = mysql_numrows($result); }[/CODE] As far as I …

Member Avatar for nickles
0
107
Member Avatar for flyingcurry

The below method is for my database assignment, and we are supposed to check if the "username" the user adds is already in the database. Somehow "newRecord.username = sc.nextLine();" this line does not work, the second time through the do-while loop It seems like it just ignores the line or …

0
173
Member Avatar for smeghead007

Hey guys I could really use some help here. In my program I need to ask the user for two 4 bit binary numbers . Then if they select add then add or if multiply then multiply. my problem is that I got the addition to work but the multiply …

Member Avatar for smeghead007
0
97
Member Avatar for newbee3

I'm fairly new to C++. Can someone help me with a problem I'm stuck on? Below is a data file that has 3 fields in each record. I have to read the fields into a structure one record at a time. Any suggestions would be greatly appreciated. amazon.com 9250000 250 …

Member Avatar for C++Challenged
0
237
Member Avatar for xCrusade

I am having issues with this program. I am confused on how and what functions to use, how to get my program to get the information from a file, and I am extremely confused on arrays. I've been reading this chapter relevant to the problem through and through and I …

Member Avatar for Chris911
0
3K
Member Avatar for lotrsimp12345

I am trying to implement a hopfield net to learn patterns. This is what I current have.... I am current having it create a random number of patterns based on the number of neurons Next I am trying to make a weight matrix Should I have a seperate weight matrix …

Member Avatar for lotrsimp12345
0
500
Member Avatar for lockhaim

OK, so I'm new to programming and trying to better understand it. Here is the assignment: * You must hold all of the student data in an array. * You must hold all of the course data in an array. * You must hold all of the scheduling information in …

Member Avatar for lockhaim
0
122
Member Avatar for mommabear

I finished the lab, and everything works, but I just don't like the way it looks...a bit disjointed to my eye. I'm happy that it works, but I want to write robust, readable code as well as functional. So, if you're interested (have spare time) would you take a look …

Member Avatar for Clinton Portis
0
337
Member Avatar for vuhailuyen

I am working on a Dictionary project based on AVL tree. The Dictionary can add words from the input.txt. Here is the input example: 0 3 sheep,con cuu mother, me water, nuoc 0 : the code to show that you are about to add words to the Dictionary 3 : …

Member Avatar for vuhailuyen
0
127
Member Avatar for optikali

Hello all! I am starting to write a little roulette game and while trying to print out my arrays to make sure they contain the correct values the compiler keeps screaming this at me: "non-static method .... cannot be referenced from a static context" Any pointers would be greatly appreciated! …

Member Avatar for optikali
0
90
Member Avatar for james6754

If I have a variable in a try catch block the variable is only in scope within that try block...how can I then refer to this variable from the next try catch block?

Member Avatar for everhett.raman
0
206
Member Avatar for thahir

Table name = Contacts. Table attributes = first_name,last_name,email_address,other_email,address,phone,notes. I want to retrieve without repetition(DISTINCT) first_name and address. But, when retrieving these 2 data, i want all the other data(notes,last_name,etc..) associated to this the DISTINCT data to show. Is there any SQL data for this kind of situation?

Member Avatar for huangzhi
0
203
Member Avatar for xuexue

could you give me a very simple example of autocomplete in php? this should have a connection to the database.. having the keydown() function and highlights the letters which are similar to the one being typed. best regards and thanks in advance..^^

Member Avatar for xuexue
0
143
Member Avatar for jpaterson2525

im trying to read a website and i keep getting the exception "underlying connection was closed" [CODE] ... WebClient w = new WebClient(); Stream s = w.openRead(addr); ... [/CODE] and yes addr has a 'http://' prefix why am i getting this exception every time?

Member Avatar for jpaterson2525
0
87
Member Avatar for balrogf

i'm almost done with my video poker game. i need help finding the if the winning hand is a straight(a straight is five continous cards e.g. 3,4,5,6,7, ive made J,Q,K,A 11-14) HERE'S A CODE SNIPPET: [code] int[] arraydeck = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", …

Member Avatar for balrogf
0
159
Member Avatar for pgmarco

My JavaScript code works in all browsers except ie, I am not sure why. Any help is appreciated, Thank you. Website is [URL="http://illcomputers.comyr.com/custom.php"]http://illcomputers.comyr.com/custom.php[/URL] Javascript File[URL="http://illcomputers.comyr.com/scripts/lowendcost.js"]http://illcomputers.comyr.com/scripts/lowendcost.js[/URL] JavaScript Code [CODE] function updatecost1() { const keymouse = 40; const Case = 55; var data = document.getElementById("data"); var seldata = data.selectedIndex; var cpu = …

Member Avatar for Airshow
0
1K
Member Avatar for Kirielson

Here's my problem, I am getting a bad access on a shared memory line on my producer/consumer program: [CODE]Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xffffffff 0x00001db0 in main () at Project3.c:120 120 memset(buf, 0, BUFFER_SIZE); [/CODE] [CODE] int BUFFER_SIZE = 200; int *buf; [I]Some …

Member Avatar for Kirielson
0
161
Member Avatar for Cqinzx

Hi I have an assignment where I was given a data file and put it in an array. The file looks somthing like this: [CODE]Smith John 78 70 76 72 82 84 Doe Jane 72 76 77 90 76 45 Weathers April 64 93 95 83 66 56 Brown James …

Member Avatar for Clinton Portis
0
217
Member Avatar for FreddieBambino

Hi. I was wondering, is there any way for php to automatically check if links are valid. For example, lets say I have 10 links and I want a cronjob to check if they are valid or not, and if they are invalid I would throw a query statement to …

Member Avatar for FreddieBambino
0
155
Member Avatar for vbprogrammer1

Hi, Can anyone tell me how to remove spaces in a line which contains more spaces in vb.net. Eg 12 25.53 35 It should be read as 12 25.53 35 Thanks VRP

Member Avatar for vbprogrammer1
0
139
Member Avatar for BimBam

Hi guys, I'm trying to use a function which returns a pointer to a vector element, but it doesn't really work - and since I'm not so experienced in C++ and especially pointers, hoped that someone could help me out. The function is defined as [CODE]Obj* MyClass::FindObj(std::vector<Obj*>&, string Label_){ ... …

Member Avatar for jonsca
0
178
Member Avatar for atramposch

I wrote this code to find the mode of an array of values. [CODE]double mode (double * array, int numItems) { int j, i, maxRepeats = 0; double mode; for(i = 0; i < numItems; i++) { j = 1; while(array[i] == array[i+j]) { ++j; } if(j > maxRepeats) { …

Member Avatar for Adak
0
109
Member Avatar for pjh1985

Hi, i found this image uploader in another post but i'm having a few problems with errors or upload confirmation not displaying at all and was wondering if someone could take a look. [URL="http://www.daniweb.com/forums/thread144647.html"]original thread,[/URL]the file is a zip near the bottom of the page It seems the database code …

Member Avatar for cossay
0
73
Member Avatar for sajohnson05

Below is my file read. I am trying to output it in a table form and also i am trying to read any length of tilde document. [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <?php $namefile = 'pilots.txt'; …

Member Avatar for sajohnson05
0
153
Member Avatar for CallumP93

Hi All, I am currently making a server monitoring application that pings the server to check its uplink, so far it creates all the picture boxes and labels for each server, and then pings the server, although I have a picture that I want to change dependant on the result. …

Member Avatar for CallumP93
0
229
Member Avatar for Jeddahforever

Hi guys i spend 3 weeks doing this project , but i don't know how to start implement the Delete and update , can u please help me guys .? here is my attachment and my code [CODE] #include <iostream> #include <fstream> #include <cstring> #include <cstdio> using namespace std; class …

Member Avatar for Ancient Dragon
0
126
Member Avatar for bigwhiteegg

PLEASE somebody help me I have QUESTIONS about pep/8 and 4 hours left to figure it out 1. in C++, global variable CHAR word[32] = "Backward"; is common but how do i initialize it in pep/8 ?? I need to write a simple program to flip it backward using stack …

Member Avatar for bigwhiteegg
0
660
Member Avatar for Safia Abdalla

I am working on this program in Python that would allow me to scan for a certain phrase in a certain text document. I used the finditer function in Python's re library.The certain line of code resembled the following: [CODE]phrase=regex.finditer(page)[/CODE] I also had a print statement at the end that …

Member Avatar for griswolf
0
12K
Member Avatar for Tcll

here's a little test I want to do: in the main html I simply want a text input, and a submit button... when I type something in the input and click 'submit', it calls a function that generates an html with: [CODE] <html> <head><title>JS Generated HTML</title></head> <body> //(text in input) …

Member Avatar for Tcll
0
148
Member Avatar for Mi-Dia

I am in the hard task of rewriting a template system, specificly to support repeating content of a forum script. I am currently tyring this with a dummy file at the moment and I am stuck on one part. What is basically does, is load the following html which has …

Member Avatar for Mi-Dia
0
127
Member Avatar for kerp

Hi, I've ran into a problem with pointers which I can't seem to get my head around. Here's some code that illustrates my problem. [CODE]void Reallocate(char* Source) { int NumberTest = 0; char* Buffer = new char[4]; memcpy(Buffer, Source, 4); delete[] Source; Source = Buffer; memcpy(&NumberTest, Source, 4);//This puts the …

Member Avatar for kerp
0
117
Member Avatar for acrocephalus

Hello! I'm just beginning to learn Python and I would like you to recommend me any good tutorial. I have started with the [URL="http://www.pythonlearn.com/"]http://www.pythonlearn.com/[/URL] and the [URL="http://hetland.org/writing/instant-python.html"]http://hetland.org/writing/instant-python.html[/URL]. I have found them very useful and I would like to continue learning. Furthermore, I would also like to start learning on programming …

Member Avatar for Dylan Solarsh
0
239
Member Avatar for ltp_lonestar

Well, I recently acquired Delphi for no apparent reason /shrug. And since I'm about to start learning a new programming language (haven't decided which one), I was wondering in Delphi uses Pascal. And if so, what can be done with Delphi/Pascal. What are some good resources for Pascal/Delphi. Online references …

Member Avatar for madtm
0
256
Member Avatar for piratesocrates

Hello, I'm still pretty new at this so all suggestions are much appreciated. When I set the button background image in properties, it looks great. When the button is clicked, the image needs to change. I tried to use an image list like this: [CODE]btnSample.BackgroundImage = ImlStimuli.Images.Item(0)[/CODE] and I tried …

Member Avatar for piratesocrates
0
10K
Member Avatar for james6754

Hi everyone.... [code] public void LoopGrades() { try//Start try block { //Start TextReader TextReader grades = new StreamReader("grades.dat"); ResultOfData = grades.ReadLine(); } catch (FileNotFoundException e) { MessageBox.Show("File Not Found!", "Error"); } //Loop through grades while (ResultOfData != null) { //ResultOfData is given the value that is read from grades.dat ResultOfData …

Member Avatar for james6754
0
130
Member Avatar for claudiordgz

Hi guys, I need help on getting the minimal scope on something. I am learning data structures, right now i'm figuring out how to insert my class information (strings, ints, floats) into my node class. Do i need to send data to my node each by each type? or is …

Member Avatar for thelamb
0
176
Member Avatar for Honeydew

I am having some trouble with swapping variables in an array can someone show me the format

Member Avatar for sirlink99
0
82
Member Avatar for flayer84

Could somebody help me? This function should call to [B]make_schedule(temp_lim)[/B] until the returned value "gap" satisfies me. I know for sure (same function in c++), that "gap < 1" takes up to 10k-15k runs, ... ,"gap < 5" takes ~fifty runs. But here in C# it goes to "not responding" …

Member Avatar for flayer84
0
193
Member Avatar for eltonpiko

hi does anybody know a good script that i can use to make client on different level like an mlm script but not to sell anything but to manage those people .example if you are a client you can log on to the site and see how many people you …

Member Avatar for eltonpiko
0
93
Member Avatar for judithSampathwa

hi, i have a problem in login in to the MS SQL server 2008, i installed the MS SQL with the authentivcation mode as Mixed mode and and for the SQL server administrator i added the current user and for the password i gave a different password, which is not …

Member Avatar for judithSampathwa
0
594
Member Avatar for Totaal

Hi every body i need you to help me to find the solution of exercise and review questions for (Thomas M connolly database systems practical approach to design implementation and management)four or five edition (chapter 9 - 10 - 13 - 14 - 19) or • Briefly, describe the main …

Member Avatar for Totaal
0
375
Member Avatar for coril

I'm trying to figure out how to set up a grid using a list of lists. I want the input to be x where the program will then setup a list of x lists, each containing x entries, in this case "0"s.

Member Avatar for Gribouillis
0
265
Member Avatar for glamourhits

write the header for a function named school which is public member of the class course, returns a string data type and includes 2 integer papameters named mark and grade.. i really don't know how to do that . any 1 please help .. thank you !!

Member Avatar for alaa sam
0
85
Member Avatar for Firo

Mhm, so, the problem I'm having here is that, once the "while (!boatList.eof())" cycle reads the first line (EDIT: I meant, how should I put it, the first "segment"), it goes on infinite (?) loop reading the other one. [QUOTE]AX 777 Valtis 0 4 500 2007 5.5 -1 50.2 6 …

Member Avatar for Fbody
0
177
Member Avatar for furret

Ok, so i've got one definition on my python code, that defines how to find the position of something in an array, then returns the list of all the places that those things are. Then I've got another definition to find the accurate centroid of a position. How do I …

Member Avatar for Gribouillis
0
137
Member Avatar for glamourhits

class cube; private; float s1, s2, s3; public; void print(); float area (float, float, float); } the following class in incorrect any know how to write it correctly .. thank you Very Much For Help ..

Member Avatar for alaa sam
0
89
Member Avatar for nosehat

I am working on a project where I need to parse a bunch of user text that comes in different fields. The problem is that the user input doesn't always come in on the same fields. One user might have a name in field 3 and a date in field …

Member Avatar for richieking
0
131
Member Avatar for sajohnson05

I have a code that needs to read in a file and has a parameter file. I need to know how to put in <=,<,=,>=,> operators that will be in my parameter file. I beleive that it needs to go in this line: $search=explode(':',strtoupper($params[0])); but not sure if it will …

Member Avatar for sajohnson05
0
99

The End.