64,152 Solved Topics
Remove Filter ![]() | |
If a constructor calls another class with another constructor and both constructors have methods that access the same class, which would be first? First constructor in a method separate from the class [CODE]{ Entry entry(" ", " ", " ", time.Hours(), time.Minutes()); return !(list.IsPresent(entry)); } [/CODE] Second constructor that it's … | |
Hello all!! i have to make a program for my university that generates 3000 random numbers and finds the one who are powerful! I have written all of the code but i don't know what condition is wrong! let me show you... :-P [CODE]for (l=4 ; l < COMPUTATIONS ; … | |
the header file: [code] #include<stdio.h> struct IntArray { int schedule[30000]; int nSize; }; struct IntArray getSchedule(int browsingTime[], int noOfPersons, int timeSlot); [/code] the implementation file: [code] #include"leastremainingtime.h" void sort(int *a,int n) { int i=0,j=0,temp=0; for(i=0; i<n;i++) { for(j=0;j<n-1;j++) { if(a[j] > a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } } … | |
I have, with the vast assistance of Bazzy on cplusplus as well as a few other programmers, made the code to input a file into a vector. Even after looking over the tutorials on algorithms, I still can't figure out how to sort the data. It's due in [U]4 hours … | |
Hello, I have a problem :icon_confused: which is: [CODE]public void caseUpper() { QTextCursor cursor(textCursor()); String selTxt(cursor.selectedText()); if(selTxt.isEmpty()) { return; } String txt = selTxt.toUpperCase(); insertPlainText(txt); } public void caseLower() { QTextCursor cursor(textCursor()); String selTxt(cursor.selectedText()); if(selTxt.isEmpty()) { return; } String txt = selTxt.toLowerCase(); insertPlainText(txt); }[/CODE] I think the problem is that … | |
I need help with my print function, so I can print the elements in a queue. The print function, that I have now is the last function in my header file. I tried to do a small simple program to see if it works, but it prints nothing to the … | |
I have a snippet of code, thus: [CODE]$match |= in_array($type, $types);[/CODE] but I am unfamiliar with the |= expression and have been unable to find it in the PHP manuals. | |
hello every1, pls am new to programming . doin my undergrad dissertation on cd database. cd is manually put into cd drive. cd contents like artist, song, etc, are copied off the cd and then put into a database. right now, am having problems with the copying of cd contents. … | |
hi everyone I'm trying to listing files/drives/folders in pc but I couldnt find anything. please help me .. --[ cryptacker ]-- | |
I have to write a code for generating random numbers without using random module and its function. How do I do it? I tried using the system time as it keeps on changing (importing milli seconds) but with tht I am able to get random nos in the range of … | |
I want use MD5 to compare both folder in Python. Following steps that i want to compare both folder by using MD5: 1. After all the files downloaded to folderA. 2. All the files inside folderA will copy to folderB. 3. Then MD5 will compare both folder is correct hash. … | |
Hello, and thank you for helping me today! I am working on a scheme procedure that takes a string as its input, capitalizes every letter in the string, and then prints out the result. This is a homework assignment, and we are supposed to use another procedure that we wrote … | |
Hello, I am unsure of a certain naming convention. Take for instance, I have a file that is called HelloPeople, and I would like to have a dll file. How should I name the dll file: HelloPeopleLib or HelloPeople.Lib? Thanks. | |
I have a table that is populated by php/mysql. I would like to have it were when you click on a row any where on the row the check box for that row gets checked. I have been searching the net for days looking for a way to do this … | |
I haven't ever messed with any webpages through java and I'm kind of curious as to how it would work. I have a specific question that perhaps someone will be able to answer. How would one go about pulling certain information from a forum? To better understand what I am … | |
Can someone help me store a string that has an apostrophe within it? I thought that using [B]mysql_real_escape_string[/B] was supposed to add a slash when retrieving, but remove the slash before storing. Here is a portion of my code and then also the result of the data after it is … | |
Why String comparison with '==' is illegal,eventhough it works fine.Kindly explain? | |
Anyone know the developers? Anyone else waiting for 3.x support? This is the only thing keeping me from upgrading to python 3.1 .... | |
Hi, I am undertaking a peice of work and may need a bit of help. The problem i need to find a solution for is as follows - I am requesting a Text based document through a http request, and currently have the document i want from the http request. … | |
I completed a test today that didn't go so well. The last question dealt with binary files. For the review, he told us we had to go over seekg, tellg, and read and write methods. On the test there was a class that could find a record (with a record … | |
hello ; here is a quastion . i understand it until the red senence , i do not know what dose it mean mathematically ? Write a program that prompts the user to input a positive integer. It should then output indicating whether the number is a prime. Note: an … | |
hi, i want to implement paging concept in php with mysql.i tried lot of code.....the page next,prev links at the bottom which is used to move to and fro is not working please do give a code for paging........ | |
I have a problem using Media Player to play a number of parts of .wav-files after each other. While one part is being played I don't want the program to wait. If I set Notify := true; and Wait := False; then Play; I get no sound at all. What's … | |
[B]good day ,[/B] [B]i am new to java ,[/B] [B]i am using two different databases and i want to insert data from one table to other empty table using jdbc .and it consists of null values in one table along with some data .when ever we add new data to … | |
hi.. im using file upload control to upload some files on my server. but the problem with the same is it uploads the files of specific size only. for ex, if i upload a file in KB's, it works perfectly...but when i try to upload files of more than 1 … | |
I got a query to calculate the percentage as , [CODE] Select votes, rating, votes/sum(votes) as percentage [/CODE] But I want to take the values from two different tables. I tried [CODE] Select elec.sum(votes) from elec, stat.sum(rating) from stat where year=2009, elec.sum(votes)/tat.sum(rating) as percentage; [/CODE] This doesn't work. plz help. | |
How can I use Mysql for JDBC connection.How to make data source? I can able to done with MS-SQL. | |
I am little bit confuse about this operator. Can any one tell me what does operator -> internally. And what are the importance of -> in pointer? Appreciated in advance for help (all daniweb group). | |
Hi, Can anyone provide a sample application that usses a login page, in which users can login and the login details will be checked from the oracle db. Thanks in advance.:) | |
Hello -- 1. Can you compile C code in Visual Studio.NET ? If so, can you please submit the proper steps in order to do this. Thank You :) | |
My subscription system is now running though with errors here and there.the error that concerns me a lot is a runtime error that says [QUOTE]multiple steps generated an error check value status[/QUOTE] and points to this code....[CODE]r.Fields("companyphone") = txtcphone.Text r.Fields("companywebsite") = txtcwebsite.Text[/CODE] and this code is in my save button. … | |
![]() | Hi, i currently have these 2 files: [code] #!C:\Python26\python.exe #index.py print 'Content-type: text/html\n\n' print '<html><head>' print '<title>My Page</title>' print '</head><body>' print '<h1>Powers of two</h1>\n<ol>' print '<form action="sqr.py" method="post">' print '<label>How many numbers?</label>' print '<input type="text" name="b"/>' print '</ol></body></html>' [/code] and [code] #!C:\Python26\python.exe #sqr.py import cgi a = cgi.FieldStorage() b = … ![]() |
I have managed to create a custom sized grid which prints correctly but when I try and print X or 0 a new line is started. Please see the "test" result below. [code] def createBoard(): global rows,columns,board rows = input("How many rows (more than 4)? ") columns = input("How many … | |
I need help on an assignment I have. The first part was to write a program that would declare an array with 150 elements, assign the "#" symbol to each element, then print the elements in such a way that it would spell a letter (in this case, "A") within … | |
I wrote this very small program that works fine until I remove the comments for the fprintf function. Basically the program will prompt the user for a numeric value, when the user guesses right(1234) the program exits. When I remove the comments the program never exits...Does anyone have any idea … | |
i have 2 forms..when i start my application..form1 loads...then i navigate to form2 and adds some data in database using controls on form2, which should also reflect on form1... My data is not getting reflected on form1, after i hide form2...before giving "form2.hide", i tried giving "form1.show" and "form1.refresh" but … | |
I'm new to this forum and to python in general, so be easy on me please. :icon_smile: I'm making a class to handle all events including mouse events. (I'm using pygame by the way) Heres how it looks so far: [CODE] class Event: #controlls all actions relating to events including … | |
[B]hello everybody, im venkat doing my b.e 3rd year... Im currently working on my project of college administration system using vb6. I need help on how to save an image in the access database...i have got the code on how to browse an image. but i'm not able to find … | |
int fun(int(*)()); int main() { fun(main); cout<<"in main"<<endl; return 0; } fun(int (*p)()) { cout<<"in fun"<<endl; return 0; } the output is.... in fun in main how and in which manner is "main" being passed in the fun function argument in main function. does this way of passing automatically mean … | |
Anyone who knows how to apply this in php scripting? the scripts in this site can be xecuted in mysql console but I can't get it working in php script in the website im studying. I want to create a tree like this: [URL="http://sitepointstatic.com/graphics/sitepoint_numbering.gif"]http://sitepointstatic.com/graphics/sitepoint_numbering.gif[/URL] | |
Hello everyone, I'm learning Python and I have a few questions about Dictionaries and sorting them by a value other than the key. Lets say, for example, I have a Dictionary full of data that needs to be sorted on the 3rd value instead of the key. How would I … | |
I was wondering if I can create an arraylist with info already in it... Ex... ArrayList playerinfo = [P0,[[1,2,3],[4,5,6]]] If that makes sense. The info I want in the arraylist will always be the same, as it will be what I am using to test my program. However I need … | |
I am making a PHP blog library. I am new to web development and only really programme in C++ or Python. So, I have probably done something really stupid, but this code doesn't work: [CODE] <?php class Blog { public $version = 1.0; public $mysql = NULL; public $servername = … | |
Hi, I am trying to match phone numbers, and want only having format xxx-xxxx. Here is what i have written so far : [CODE]sub OfficePhoneNumber { my @numbers = @_; my $number; my @results; foreach $number (@numbers) { if ($number =~ m/(^\d{3}-\d{4}$)/) { push @results, $number; } } return @results; … | |
I have a file of the following format: a 1 a 2 a 3 b 4 b 5 b 6 c 7 c 8 c 9 Here is my code: [CODE]def file_to_dict(fname): f = open("file.txt") d = {} for line in f: columns = line.split(" ") letters = columns[0] numbers … | |
I am trying to determine if a word is a palindrome or not using queues, but I am receiving the wrong results. I have tried several things to get it to work using the boolean variable isPalin. Will someone lead me to the right direction please? I have been trying … | |
Is it possible to overwrite internal javascript? I am working for a non profit as an internship and they want to escape a template that almost all of the non profits in that organization have to use, the catch is the template is written in Javascript if it is possible … | |
Hi all; I am so new in C.I have problem about array .I want to remove same element in array but i dont know how can i do. Can anyone help me example : 1,2,3,5,67,31,13,5,2,1,1,4, the program should produce -->>1,2,3,5,67,13,31 | |
i have to write a rock paper scissors program in python, but every time i run my code... [CODE]def rockPaperScissors(): import random computerIndex = random.randint(1,3) if computerIndex == 1: computer = "rock" elif computerIndex == 2: computer = "scissors" else: computer = "paper" player = raw_input("rock, paper or scissors :") … | |
Hi, I have a solution set up in .Net with a website. Each page is written in aspx and each code behind file are in the format of aspx.cs. For some reason when I build the solution it builds successfully although does not compile these code behind files to a … |
The End.