- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
51 Posted Topics
Re: The sorting method you are using now is Bubble Sort. You can use another popular sorting methods like Insertion Sort, Selection Sort, Merge Sort and Quick Sort. Actually these sorting are a lot more efficient than Bubble sort. ;) | |
Re: To do that, you can declare another 2 variable name total_ticket_sold and total_revenue. Then assign them with value 0. In the while loop, add another 2 lines of code: [CODE=cplusplus] total_ticket += noOfTicketSold; total_revenue += (ticketPrice * noOfTicketSold); [/CODE] Lastly, cout both outside the while loop. This should work fine. … | |
Re: [CODE=Perl] #!/usr/bin/perl #declare a variable named line and assign value 'abcd' to it $line="abcd"; #split the variable line ("abcd") into 1 char part @arr=split("",$line); #show/print the 1st character, which is 'a' print $arr[$0]; #declare a variable named line and assign value 'x' to it $x="x"; #if the 1st character for … | |
Re: Yup... Type in your address here. We'll send out a programmer to take the exam on behalf of you... | |
Re: Huh... Reading the whole post makes me dizzy..... x_x... You can use [code=vb.net]WriteLine("testing1\n\n\n\n")[/code] to enter multiple line break though instead of keep calling the WriteLine()... :) Anyway, the word "condition" is wrongly spell as well... it's "condition" not "condetion"... | |
Re: To browse through multiple folders to get the files names, pls view this [URL="http://www.daniweb.com/forums/thread129876-2.html"]thread[/URL]. | |
Re: Do it in web app instead of standalone binary?? I guess may be when one user is using the file, other user can't access it??? | |
| |
Hi, I have a problem here. I have a project running on localhost. Whenever I made some changes on a .aspx file, the changes can be seen immediately when I access my localhost. But when I made changes in aspx.vb file, the localhost still showing old info. * I have … | |
Hi, If i need to use many same components in a window form (let say 20 picture boxes or 20 text boxes), which of the method below is more efficient?? 1. Drag and drop the component 20 times. Configure their properties one by one. 2. Declare array of that component … | |
This may sounds stupid. I'm new to VB.net. My problem is that all the size of my picture box kept running. 1. I'm not sure is it because i set the form's backbgroundimagelayout to "Stretch" and all Picturebox's sizemode to "Stretch Image". 2. When i start my app on another … | |
Hi, I'm trying to save some images into my Database of my application. Can I know which of the method below is [B]better [/B]and [B]why[/B]? 1. Store only the picture path into the database. Retrieve Picture according to its path. 2. Store the Picture in Database as bytes. Thanks. | |
Re: Perhaps you can create another function to check whether it exists or not? [code= VB.net] Dim conn As SqlConnection Dim strConn As String = "Data Source=ANX134\SQLEXPRESS;Initial Catalog=Dyslexia_Begin;Integrated Security=True" conn = New SqlConnection(strConn) conn.Open() SQLcmd = "select * FROM UserDetails where username = '" & txt_username.Text.Trim & "' and password = … | |
Hi, I need to reset all the values of elements in my form to empty string. But the problem is that the form can be reset but the variable still holding the value of y previous input. For exp, Input 5 value at first time. Input 2 value at second … | |
Hi, I have problem to terminate the process EXCEL.EXE after I write into it. After the program finish execute. The EXCEL.EXE is still in the proceses list in the task manager. Anyway to terminate it? Below is my coding: [CODE=csharp] SaveFileDialog s_Lvl_Max = new SaveFileDialog(); s_Lvl_Max.Filter = "xls files (*.xls)|*.xls|All … | |
Hi, I'm wondering is there any build-in function or component that I can use to create a multi-select dropdown combobox. I try to google for this but most of the solution I found is for web based software. I'm not asking for the whole program. At least something for me … | |
Hi, I'm newbie in ASP. I am trying to view multiple pages by using a single file. For example, I have a few pages of product.asp (products.asp, products1.asp and so on). Now I want to create a single single (products.asp) but can view multiple pages. Try to search through google … | |
Hi, I'm new to C#. Can any one help with extracting info from a few .csv files and insert them into DIFFERENT sheet in excel(not necessary .xls format. .csv is fine). I'm not asking for the whole piece of coding. Just need some idea on where to start. :-/ Thanks! | |
Hi, first of all sorry if I post this in the wrong section. Cant find where is the VBScript Section. I'm new to VBScripting. What I need is the VBScript to count the number of record in my MSAccess table. I tried [ICODE] total = "SELECT COUNT(*) FROM Product" [/ICODE] … | |
Hi, first of all sorry if I post this in the wrong section. Cant find where is the VBScript Section. I'm new to VBScripting. What I need is the VBScript to count the number of record in my MSAccess table. I tried [ICODE] total = "SELECT COUNT(*) FROM Product" [/ICODE] … | |
Re: [QUOTE=nizbit;696163]Well class should not be in there. I thought I would have to make an instance so I could add a race car to the linked list.[/QUOTE] Yeah.. You can do that... You just declare the List and the class (for eg. Class car) as usual. The only thing special … | |
Re: At least put in some effort and try write something before posting your problem??:-/ | |
Re: Put in some effort and try at least do write a simple program??? :) | |
Re: Or may be convert the double into string. Then split the string using "." as the delimiter?? | |
Re: Hi, I edited some of your code. Here it is. The reason it won't come out from while loop is because isspace() included the newline ("\n") as a kind of "space". See [URL="http://www.cplusplus.com/reference/clibrary/cctype/isspace.html"]this[/URL]. Anyway, it's a good practice to put return 0 at the end of int main(). :) [CODE=cplusplus] … | |
Re: If you want to randomly generate number between certain range you can use : rand()% x, where x is the maximum number. Exp: rand()% 50, means range is 1-50. Is this what you want?? | |
Re: jhonnyboy, it will be better if you can try to write a program first then post your coding. mahlerfive is right but another alternative way is to store the number the user input in string then you can get each digit in the string a lot more easier. After you … | |
Re: Use switch() may be? Do you need the number to be shuffled?? Put in some effort. Try writing at least a simple program and post it. :) | |
Re: You definitely have to work on your alignment of your coding. The alignment and programming style should be consistent. The reason why you program is not working when you choose option 2 is because you miss ".txt" in line 292. Other suggestions: 1. If the Constructor have quite a few … | |
Re: [QUOTE] Just out of curiosity: You do know that void main() doesn't exist right? I'm referring to your signature... [/QUOTE] Good... Even signature is checked! :twisted: | |
I have this problem. This program runs well except that it skip the value of the first item in list. I think it is because of the cin.ignore(). But if I don't use the cin.ignore(). The cin will only read the first input and none after that. Help? [CODE=cplusplus] #include … | |
Re: Well.... If you want to use the getline function, here's a simple program to test that: [CODE=cplusplus] #include <iostream> #include <fstream> #include <string> using namespace std; int main() { int line_number = 1; string line; ifstream myfile("test.txt"); if(myfile.is_open()) { while (!myfile.eof()) { getline(myfile, line); cout << "line " << line_number … | |
Re: Use string or character array as data type. Then use cin.getline() to get input from user. [CODE=cplusplus] while (choice == 'y'); [/CODE] It would be better to change this line to: [CODE=cplusplus] while (tolower(choice) != 'n'); [/CODE] | |
Re: [QUOTE=VernonDozier;682512]I have no idea what this means.[/QUOTE] The first line is in Malay. It means that: [QUOTE] I can do whatever I like!!! (The second line I think you understand.... ;) ) [/QUOTE] | |
Re: Yeah. Other than cin.get(), you can use getchar() or system("pause"). Other than clear_screen you can use system("CLS"). | |
Re: Can we use multiple regular expression like this?? [CODE=Perl] #!/usr/bin/perl/ #matching.pl use warnings; use strict; my $temp_string = "The quick brown fox jumps over the lazy dog"; my $true = 0; if ($temp_string =~ /\bbrown\b/ || /\bfox\b/) { if($temp_string =~ /\bquick\b/) { $true = 1; } } if($true == 1) … | |
Re: Just to make it clearer.... 1. Add another statement at the end of your coding. Prompt User to enter a certain character to exit from the program. 2. iamthwee is right. Use a do-while loop to do that. Last hint, the while statement you can write something like this: while … | |
Re: It'll be better for you to post your coding and tell us what's your problem... : ) | |
Hi, I'm new in Visual Basic. Here's a few questions: 1. What is the difference between VB and VB.net 2. Any good ebook you guys recommend for VB and VB.net?? (I've learned Perl, C++ and Java) 3. If I want to learn VB.net do i need to learn ASP.net first? … | |
![]() | Re: Give me you email will you? I send you a ebook. Takes me 2weeks to learn all the basics. Quite simple. |
Re: [code=cplusplus] #include <stdlib.h> #include <iostream> using namespace std; int main() { const int MAX_SIZE = 10; int numbers[MAX_SIZE]; int numElements; cout << "Enter number of elements (2 - 10): "; cin >> numElements; for (int i = 0; i < numElements; i++) { cout << "Enter number " << i … | |
Hi, I'm new in VB.net. I have background in C++, Java and Perl. 1. Is there any book you guys would recommend? 2. Can I use VB6 book? (I know there some major changes from VB6 to VB.net) Thanks......... | |
Hi, I try to compare items in two different arrays. This loop works well in another program of mine. But not in the current program i'm working on. Weird.... The output of the program shows [ICODE] Nested quantifiers in regex; marked by <-- HERE........ [/ICODE] [CODE=PERL] for $3 (@obsolete_class_declare) { … | |
Hi, I'm having problem with the usage of File::Find Module. What i'm trying to do is to browse through two directories and put all the files into two arrays respectively (each array for each dir). I just cant use the "find" twice... An error message will be shown: [icode] Use … | |
Re: Well, I would suggest you to move the app.exe to the same folder in which you save your .cpp files. Then you can just use type: [icode] system ("app.exe -vb \C:\\Documents and Settings\\myUser\\file.txt\"); [/icode] I'm not sure about the -vb command because i havent use it before. | |
Hi, Does anyone know how to browse through a folder to find all the files contains in it? I know how to use the opendir function but: 1. I'm having problem with looping in which i can use to browse through ALL the folders and ALL the files contained in … | |
Hi, I'm a beginner for Perl. Just want to ask a few simple question: 1. Which Text Editor tools is the best for Perl? 2. Some recommend JEditor. I installed it but having problem with the Exuberant CTags. After i downloaded it I cant seem to install and apply it. … | |
Hi, I'm trying to write a perl program for a simple phone book. Means when the user enter a name, the phone book will search and display the name and the phone number of that person. Below is my code: [CODE=syntax] #!/usr/bin/perl; #playplay.pl use warnings; use strict; my %phonebook = … | |
Re: Well, I suppose this would solve your problem. You can merge the sort() into the insert(). Here's the code: [CODE=C++] #include <iostream> #include <fstream> using namespace std; class List { private: struct ListN { char item; ListN* next; }; ListN* head; ListN* tail; int size; public: List(); ~List(); void insert … |
The End.