199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for brycematheson

I'm creating a Sudoku game, and according to the rules of Sudoku, there cannot be the same number in any row or column. My question is this: How do I compare a value with an entire row or column in an array? For example: I have a 9x9 array that …

Member Avatar for Fbody
0
132
Member Avatar for mikesr

Hi! I'm wondering how to perform: "To read and write call interrupts using instruction int (e.g. int 10h)." (in nasm x86) for example: [CODE] bits 32 extern _printf, _scanf global _main section .data message db "Hello!", 10, 0 section .text _main: pushad push dword message call _printf <--- how to? …

Member Avatar for Tight_Coder_Ex
0
870
Member Avatar for flasp

Hello this problem is from the beginner book C++ Primer Plus 5th edition.. The problem sounds something like this: Write a short program that asks for your height in feet and inches and your weight in pounds(Use three variables to store the information). Have the program report your body mass …

Member Avatar for flasp
0
1K
Member Avatar for notmasteryet

I am suppose to use arrays where i read in data from a text file and i have to set these functions to it. any clues on how i would approach it. my main concern is how to read data from a file using class while using arrays. i know …

Member Avatar for muze
0
149
Member Avatar for gouzou

Hi to everyone! I have a problem with the following code. Can someone please point to me the error? #include <stdio.h> struct network{ char *name; }network1; int counter=0; main() { void add_network(); add_network(); printf("You typed: %s\n", network1.name); printf("counter is %d\n", counter); } void add_network() { char network_name[150]; puts("Give me the …

Member Avatar for gouzou
0
155
Member Avatar for akinfemi

string.indexOf(letter) checks for the first occurence. what can check for all occurences public class Hangman extends ConsoleProgram { private static final int MAX_NUMBER = 9; private RandomGenerator rgen = new RandomGenerator(); HangmanLexicon lexicon = new HangmanLexicon (); private static boolean end; private HangmanCanvas canvas; private static int x = 30; …

Member Avatar for JavaDad
0
233
Member Avatar for DallasFan3

[ICODE]Ok, I am typing up a program in which will play hangman with a user. I have done most of the program, but I have to let the program randomly choose a word from the list of words stored in your array. Afterwards, it should clear the screen and display …

Member Avatar for JavaDad
0
414
Member Avatar for Tiancailee

i am having errors when i compile this code such as: main_class.h(31) : error C2228: left of '.x' must have class/struct/union 1> type is 'float' main_class.h(31) : error C2228: left of '.y' must have class/struct/union 1> type is 'float' main_class.h(31) : error C2228: left of '.z' must have class/struct/union This …

Member Avatar for Tiancailee
0
135
Member Avatar for kdcorp87

i convert some opengl code from visual c++ 2006 to visual c++ 2010 i mean visual studio framework. problem is in visual studio 10 they r running but mainloop is not working, i mean windows r supposed to wait for key input but it shows and gone at instant. no …

Member Avatar for Fbody
0
409
Member Avatar for DallasFan3

Ok, Iam now doing my last assignment for my class. Thank god. lol Well I have to make a problem that will write an interactive Java program that allows the user to play the game of Hangman with words that are given to me from a file. Here is what …

Member Avatar for jon.kiparsky
0
618
Member Avatar for ajst

Hi, I'm trying to use JAVA GUI for first time. I've got a Jframe that when loaded adds a jpanel. the problem is it will not show any swing controls that get added to the jPanel. I'm using netbeans 6.9.1. any idea to why is happerning would be greatful [CODE] …

Member Avatar for JamesCherrill
0
3K
Member Avatar for hisan

Hi, I want to know how to use Python variables in My sql statement and below is the syntax i am using import MySQLdb name="XYZ" number="123456" db=MySQLdb.Connect("localhost","root","12345","phone") cursor=db.cursor() sql= ("""INSERT INTO phonebook(number, Mobile) VALUES(%s,%s)""" , name,number) cursor.execute(sql) db.commit() db.close() but this throws the error please refer the attached screen shot …

Member Avatar for hisan
0
6K
Member Avatar for careless_monkey

I'll try my best to explain what it is. I have two tables 'regularplanets' and 'moons'. Idea is, regularplanets can have many moons and moons can have 1 planet. I have included the required variables 'hasMany' and 'belongsTo' in regularplanets and moons model. What I want to do is this …

Member Avatar for careless_monkey
0
103
Member Avatar for shorty28

hi guys!! i'm just new in programing and i had a problem in c++ my prof give me a task... i need to make a program that looks like a casher system or restaurant system... i don't know howto start it..... so please HELP me!!!!! :((

Member Avatar for shorty28
0
95
Member Avatar for DaveTran

I would like to sort an array of objects by their distance. The problem is that the distance value is a floating point and IComparer only will accept an integer as a return value. [CODE] class SortDistanceAscending : IComparer<ObjectDistance> { static IComparer<ObjectDistance> comparer = new SortDistanceAscending(); public int Compare(ObjectDistance a, …

Member Avatar for DaveTran
0
2K
Member Avatar for erum

i have textbox in repeater and i want to validate it to accept numbers only i have code like this [CODE]<asp:Repeater ID="Repeater1" runat="server"> <HeaderTemplate> <table border="1" width="100%"> <tr> <th>id</th> <th align=left>Room Categories</th> <th>single</th> <th>Double</th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td width="5%"> <asp:Label ID="Label3" runat="server" Text= '<%# Container.DataItem("packageid")%>' /></td> <td> <asp:CheckBox ID="chk_packages" …

Member Avatar for croker10
0
180
Member Avatar for PhEnSciLaBu
Member Avatar for puvi

Hi, i have a registration form, where the user enters username, email, designation and organisation. on clicking register button, the data in this form should get saved into database. The code is as follows, when i executed it for the 1st time, data was saved properly, but when executed next …

Member Avatar for puvi
0
137
Member Avatar for mbarandao

Good day to all: Typically, when one pass variables via url, they are received and displayed in a input text box. I'm interested in passing two variables (firstname and lastname) via url; except, I want to be able to get them on another page [key point ], in a select …

Member Avatar for mbarandao
0
210
Member Avatar for doogidie

Im supposed to sort a file in decending order using bubble sort into an array. My code does all of that but it repeats the sorted array 50 times instead of just listing it once. This is a C ++ file on Dev. Thanks for your help, it's due midnight …

Member Avatar for alexchen
0
118
Member Avatar for zerocool123

All right this is easy and for some reason im having trouble. Im workng on a Pig Latin program but right now all I want help with is getting an entire sentence to print out. I first tried to do this [PHP]char pig_latin() { char sentence[100]; printf("Enter a sentence\n"); scanf("%s", …

Member Avatar for Narue
0
1K
Member Avatar for keltik

Hi there, at university i have to program OO-style in Python. What i got now is a "Point"-class and a "Triangle"-class. The "Triangle"-class has a method [ICODE]a()[/ICODE] that needs to return the length of the AB-edge, but it doesn't instead it concatenates the Point.__str__() methods return values together, which is …

Member Avatar for TrustyTony
0
153
Member Avatar for dmurder

it keeps looping over and over again no matter what i put in [CODE]def getScores(totalScores, number): score = input('Enter their score: ') while score <=0 or score >=100: print'You must enter a number between 0 and 100' score = input('Enter a number between 0 and 100:') for counter in range(0, …

Member Avatar for richieking
0
150
Member Avatar for mallak alrooh

Hello Friends I have This important question about implementing double link list I have done it but it dosenot work , please try to find what is wrong.. Thank you but I need this work queckly... [COLOR="red"]CLASS LINK LIST:-[/COLOR] [ICODE]public class LinkList { [I][/I] public class LinkedList<T> { private DoubleLinkList<T> …

Member Avatar for mallak alrooh
0
118
Member Avatar for divakar.it

Hi, Me again. Now the requirement is slightly changed now. Requiremetn: When I enter a employee id in a text box and click "Show calender", the code will run a query to fetch Allocation date and release date of the employee for a project and the dates between Allocation date …

Member Avatar for AndreRet
0
435
Member Avatar for moroccanplaya

after my program finishes i get this message and dont why, can anyone explain *** glibc detected *** ./tryp: double free or corruption (top): 0x089b8008 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(+0x6b591)[0xb7729591] /lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0xb772ade8] /lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xb772decd] /lib/tls/i686/cmov/libc.so.6(fclose+0x14a)[0xb7719aaa] ./tryp[0x804875c] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb76d4bd6] ./tryp[0x8048521] ======= Memory map: ======== 08048000-08049000 r-xp 00000000 07:00 1725249 /home/k/cprog/tryp 08049000-0804a000 r--p 00000000 07:00 …

Member Avatar for moroccanplaya
0
120
Member Avatar for kanuri1

hi frnds,,,, here i want to access the data base and showing in the grid view without help of datasourse it will shows the error, the error is "The IListSource does not contain any data sources"" here my coding is as follows..... Protected Sub Page_Load(ByVal sender As Object, ByVal e …

Member Avatar for jbisono
0
88
Member Avatar for divyakrishnan

Hi... I have an issue on project.I want to open a particular pdf page by specifying its page no using PHP script.Is it possible?please help me

Member Avatar for Borzoi
0
124
Member Avatar for AMetnik

Hey, im trying to get some information out of my database, which i have tableadapter and dataset. Both created with the VS2010. I have made 4 queries in the tableadapter taking different parameters, to make a WHERE clause in the sql sentence. But it simply doesnt work and i dont …

Member Avatar for AMetnik
0
111
Member Avatar for reyarita

guys good day!! i need ure help with this problem. we are going to make a program. 1. Store first memory location og program into base register (for memory protection). 2. Set program counter (it keeps track of memory space used by the program) equal to address of first memory …

Member Avatar for reyarita
0
92
Member Avatar for Brosa

I am making the products page for one of my sites, and firefox keeps giving me the error it can't find the ID I am requesting. Every other browser works fine except for firefox. [CODE] <form mehtod="post"> <input type="text" onclick="SelectAll(this.id)' onkeypress="return isNumber(event)" maxlength=2 style="width:3em; text-align:center;" id="quantity_ <?php echo $fetch['id']; ?>" …

Member Avatar for @developer
0
94
Member Avatar for hq1

A magic square is an N by N array of integers. The sum of the values of each row, each column, and the main diagonals are equal. Write a program that reads the size of a square, then each row, and verifies if the square is a magic square using …

Member Avatar for jonsca
0
3K
Member Avatar for Ajuddy

[CODE]/***save the user information to file***/ $first_name=$_POST['first_name']; $last_name=$_POST['last_name']; $mobile_number=$_POST['mobile_number']; $office_number=$_POST['office_number']; $addres=$_POST['address']; $post_code=$_POST['post_code']; $city=$_POST['city']; $file=$_POST['file']; /**data to file**/ $data='$first_name | $last_name | $mobile_number |$office_number |$addres | $post_code |city |$file\n';[/CODE]

Member Avatar for Dragonbaki
0
154
Member Avatar for urlstwohim

I have two classes.CyberLibraray and CyberBook These are the requirements: Design a CyberLibrary class which houses CyberBooks. Because of local laws, the CyberLibrary class has a limitation: the maximum number of books is 200. The CyberLibrary has the following constructors: Constructor #1: the default - Creates a CyberLibrary with the …

Member Avatar for urlstwohim
0
4K
Member Avatar for dreamer_lek91

Hi I have this form which works well when it is in list box. but when I change the list box to combo box, the form does not works and I will be stuck at "record does not exist" even though i choose the record from the combo box. this …

Member Avatar for AndreRet
0
713
Member Avatar for divakar.it

Hi, I have a requirement that when a user click on a record in the datagrid (the record holds Emp_id and his/her project allocation date and release date), then the dates from allocation date to release date in monthview should display bold. I have written the code but i dont …

Member Avatar for AndreRet
0
483
Member Avatar for MysticMan3000

hey guys, i was wondering if you could help me with my problem! i made a program that uses 3 arguments as inline commands: argv[0] is the name of the program) argv [1] is the name of the first file argv[2] is the name of the second file The purpose …

Member Avatar for vinitmittal2008
0
320
Member Avatar for xuexue

how could i add the onkeydown() function in jquery.. this is for the autocomplete.. regards, ^^

Member Avatar for Stefano Mtangoo
0
157
Member Avatar for inbarda

hi i have a class with a member which is a pointer to an object on the heap. (the object is created from outside the class and is passed to it as a reference in the constructor). when i try to access it from void functions, everything is ok. but …

Member Avatar for thelamb
0
66
Member Avatar for ceyesuma

Hello. I have search my app for all classes to implement java.io.Serializable. I think that the needed classes are covered.I create and serialize JInternalFrames. When I re-open a JInternalFrame some of the JMenuItems do not do thier job. Also when I right click the Tabs on the JTabbedPane to bring …

Member Avatar for ceyesuma
0
90
Member Avatar for Makailah

Is there a way to write a perl subroutine that can read in a file that contains 2 strings on each line and then can create a has with the first string as key and second string as value without using the use the Tie::File::AsHash module ?

Member Avatar for yuvanbala
0
123
Member Avatar for thunderwolf07

can someone explain me what is the meaning of the number after the modulo (%) EX. printf("the number is: %10.2f", number); please help me define and understand the number after the % and give example, thanks!

Member Avatar for thunderwolf07
0
79
Member Avatar for kiranbvsn

hi all, i've one problem with the jquery i am hiding a <div> using style=display:none; and when i clicked a button whose id is lnkbtnUnitAdd, i want to show the above div but i've written some code on OnClick event of the button, since the below function is returning false, …

Member Avatar for kiranbvsn
0
321
Member Avatar for dmurder

i get this error when i get to a certain part in the program Traceback (most recent call last): File "C:/Users/Family/Desktop/13.py", line 54, in <module> main() File "C:/Users/Family/Desktop/13.py", line 10, in main averageScores = getAverage(totalScores, averageScores, number) File "C:/Users/Family/Desktop/13.py", line 46, in getAverage averageScores = totalScores / number TypeError: unsupported …

Member Avatar for richieking
0
130
Member Avatar for novice20

hi all, can anyone tell me hoe to open a file from one machine, when the file is present on a remote machine, specifying it's IP address?

Member Avatar for richieking
0
640
Member Avatar for blknmld69

I am having a problem get my program to compile. [B]ERROR[/B] Stopwatch.java:35: cannot find symbol symbol : method start() location: class Timer timer.start(); ^ Stopwatch.java:44: cannot find symbol symbol : method stop() location: class Timer timer.stop(); ^ Stopwatch.java:52: cannot find symbol symbol : constructor Timer(int,Stopwatch) location: class Timer timer = …

Member Avatar for JamesCherrill
0
652
Member Avatar for rajshree13

I want source code for searching the data in our intranet website.. Please give me solution for search the data in JSP Language. Thanks

Member Avatar for peter_budo
0
198
Member Avatar for kanuri1

how to clear a textbox when enter incorrect than correctdata in integer format then at a time to disply validation in asp.net by using vb.net

Member Avatar for crishjeny
0
59
Member Avatar for incubus9x9

Please dont tell me to "google" it obviously I'v tried everything and this is my last resort. k thanks :) ok so I have to set a value to be restricted in the constructor ___________ Modify the constructor and set methods of the Shape class to verify the values of …

Member Avatar for seanbp
0
207
Member Avatar for neo.mn

Hi Everyone, I got a problem while creating a views in sql server 2005. In my database there are several tables which are accounts_transaction bill_info member_bill member_info relationship is exist between “member_info and accounts_transaction, member_info and member_bill, bill_info and member_bill” but there is not any relationship between bill_info and accounts_transaction. …

Member Avatar for huangzhi
0
137

The End.