- Strength to Increase Rep
- +11
- Strength to Decrease Rep
- -2
- Upvotes Received
- 108
- Posts with Upvotes
- 75
- Upvoting Members
- 70
- Downvotes Received
- 11
- Posts with Downvotes
- 10
- Downvoting Members
- 11
381 Posted Topics
Re: Insanity: doing the same thing over and over again and expecting different results. -- Albert Einstein | |
Re: It is impossible to develop a Operating System by using Visual Basic 5. Anyway, welcome to Daniweb! | |
Re: [QUOTE=moparman426;1663230]alright here is my issue i dont know how to even start this problem iam still new to vb so i need lil guidance and help in the right direction. here is the problem : Use a one-dimensional array to solve the following problem: Read in 20 numbers, each of … | |
Re: .NET provide a flexible way to organize your data and print by using [URL="http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx"]PrintDocument[/URL]. The following is the "Hello World" example of using PrintDocument. [CODE] Dim WithEvents pd As New System.Drawing.Printing.PrintDocument Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load pd.Print() End Sub Private Sub pd_PrintPage(ByVal sender … | |
Re: Would it be clearer to use this SQL instead? UPDATE members INNER JOIN articles_read ON members.member_id = articles_read.member_id AND members.last_visit_timestamp < articles_read.timestamp SET members.last_visit_timestamp = articles_read.timestamp; UPDATE members INNER JOIN forums_read ON members.member_id = forums_read.member_id AND members.last_visit_timestamp < forums_read.timestamp SET members.last_visit_timestamp = forums_read.timestamp; | |
Re: I think you might interest in [SPFJS](https://github.com/youtube/spfjs), that's used by Youtube. It is still using Javascript. | |
Re: [I][INDENT]An [B]n-digit[/B] number that is the sum of the [B]nth powers[/B] of its [B]digits[/B] is called an n-narcissistic number. It is also sometimes known as an Armstrong number, perfect digital invariant [B][URL="http://mathworld.wolfram.com/NarcissisticNumber.html"](Wolfram MathWorld)[/URL][/B][/INDENT][/I] To me, the reason that you fail to produce those numbers is because you have defined the … | |
![]() | Re: What a scary project you are aimming? Anyway, if you want to build a toy OS, you can try [Cosmos](https://github.com/CosmosOS/Cosmos). Cosmos is like a OS lego. |
Re: I have to agree with rubberman, this is ugly code. Besides, you need to use `==` instead of `=` here. `=` is assignment and `==` is used for comparison. When work with float-point, we don't usually use `==` as well because float-point cannot represent certain number. Usually, when compare float … | |
Re: You don't even need condition or mod operator. `odd += number & 1;` even less CO2 emissions. The world is greener. | |
Re: Your probability doesn't seem to be correct. Let rework it a bit. We want to random from 0 to n. Let `a` be the value between 0 to n. The probability of `P(a) = 2 * (a + 1) / (n + 1)(n + 2)`. This way, the sum of … | |
Re: > Suppose a loan has a face value of $1000, the interest rate is 15%, and the duration is 18 months. The interest is computed by multiplying the face value of $1000 by 0.15 yielding $150.0. That figure is then multiplied by the loan period of 1.5 years to yield … | |
Re: How large is your prime number? The fastest way (if not the fastest) to determine if *N* is a prime number is to have a pre-calculated of all prime number below *sqrt(N)*. Then, it takes only O(*sqrt(N)/ln(sqrt(N))*) to determine the prime by mod with all prime below *sqrt(N)*. For example, … | |
Re: To make you feel better. You should read [Why Can't Programmers.. Program?](http://blog.codinghorror.com/why-cant-programmers-program/). It shows that a lot of people is worser than you. The most important skill is self-learning. Since, you are here helping and learning, you are better than most people already. In short, you are not under qualified. … | |
Re: I work on both Windows server and Ubuntu server. First of all, both of them are secure and reliable. I ran a website with more than 15 million pageview per month on a single Windows server using IIS 7 and PHP via FastCGI. It is fast and stable. No downtime. … | |
Re: You can use [Cloudflare](https://www.cloudflare.com/). It is free and easy to deploy. Just let it manage your DNS and it will act as a wall between your website server and visitors. Visitors will access to Cloudflare nearest server and Cloudflare will fetch the content of your website and cache (static content). | |
Re: > what programming language they are using You can use any programming language. AI is no different from other program. > when learning it self on something new for him and for humans too AI is trying to replicate how human learn. Human learn based on obversation. Here is how … | |
Re: Not a good way :( but it works fine. [code=cplusplus] int sum(int num1, int num2) { int total, temp, temptotal; total = num1 ^ num2; for(temp = num1 & num2; temp != 0; temp = temptotal & temp) { temptotal = total; total = total ^ (temp = temp << … | |
Re: In my company, we are developing our own lightweight framework. Far lightweight than CodeIgniter but more modern than CodeIgniter (our framework size in total is around 20kb). The framework learning curve is at most 2 hours to 3 hours which is great because the less feature the framework, the less … | |
Re: Okay, let me share some of a suggestions: - Remove the tiny Javascript that block the content when your mouse hover on the ads. It is unneccessary. - Combine Shoutout, Inbox, Finder, and "username" into one menu. Make it a tiny icon at the right side of the menu. Why? … | |
Re: Not entirely suprirsed that you got this result. You skip the loop as soon as found a collision if(birthdays.contains(randomBirthday)) { collisionCount++; break; // break from the test as soon as you found the collision } and to be honest, your logic is a mess. Even after you fix this bug, … | |
Re: I don't get this question. Do you want to do a QuickSort on Linked List or Stack? Because based on your example, it is a linked list. Although you can use linked list to implement stack, but you must obey the stack properly. In Stack, you can either do pop() … | |
Re: You can use dictionary to simplify your code a bit dict = { "t": 1, "f": 1, "c": 1, "b": 2, "h": 2, "y": 2, "q": 3, "w": 3, "z": 3 } value = 0 word1 = input("Please enter a word:") for letter in word1: value += dict.get(letter, 0) print(value) … | |
Re: It is not easy to kill a language with such a big community and large code base such as PHP. Because with large code base, there is large demand for PHP programmer and with large demand, there come the large supply. PHP is not a bad language. It is easy … | |
Re: I agree with this one. It is annoying to scroll down and check the latest reply. | |
Re: Or you can use a single 1d array for TicTacToe. int rows[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 } 0 means empty. 1 means player 1, and 2 means player 2. For example, if a player 2 want to make move on row number 2 … | |
Re: Why don't you do something like this? for($i = 0; $i < count($response); $i++) { $ph[$response[$i]] = array('quantity' => $iteminfo[$i][1]); } | |
Re: It is better to understand how the HTTP Cookie works. When your browser open a website, you send a HTTP request to the server. The HTTP request looks like this. GET /index.php HTTP/1.1 Host: www.example.org The request message tell server that you are requesting www.example.org (in case, a single server … | |
Re: Nice try. The reason that your code does not properly work is because when you delete a item in the list, you are decreasing the index of all the higher index by one then you increase the searching index by one also. So, you will skip some elements. To solve … | |
Re: Let focus on this line and its error message $response[] = array('quantity' => $itemsinfo['qty']); // [] operator cannot be applied to string First of all, there are two [] in this line. The `$response[]` and `$itemsinfo['qty']`. However, I don't think it is `$itemsinfo` because even if `$itemsinfo` is a string, … | |
 It would be nice to allow user to resize the height of the editor. It is terrible experience to write a long post with current editor height. | |
![]() | Re: > .... in a constant loop ... Do you mean you want to put all of those code in an infinite loop? You can use `while True:`. First, you indent all of your code `print('What would you like to do?')` and below. Then add the while loop above it. So … ![]() |
Re: > First question, is there any difference between binary search and recursive binary search? Iterative binary search and recursive binary search are same algorithm with different choice of implementation. > so does it mean for 2nd function it will be low of 4, high of 9 and then mid of … | |
![]() | Re: Change it to import os answer = raw_input('Ready for shutdown, continue?') if answer == 'Yes': os.system("shutdown -s -t 0") First of all, you are trying to ask for two inputs and check whether the two input are the same. What you want to do is getting only one input and … ![]() |
Re: Like @JamesCherril has stated that the multiplication can easily be expressed with continuous of addition. So basically `a x b = b + b .... b` (continously add `b`, `a` times). For example: 3 x 1002 = 1002 + 1002 + 1002. unsigned int multiply(unsigned int a, unsigned int b) … | |
Re: Welcome to Daniweb, let me completely guide you to creating the most basic HangMan game using VB.NET in Console Application. Then, you can apply the basic principle to your Hangman project in WinForm. First of all, we started with the empty VB.NET console project. Sub Main() End Sub ## GameLoop … | |
Re: For me, I would rather choose the career that I like than the career that yield a high chance of getting a job. I chose programming and currently co-found eCommerce company in my country. So, which area do you interest more? | |
Re: I joined DaniWeb ten years ago when I was just a beginner programmer and it was probably the golden age of DaniWeb. In that time, I felt that DaniWeb was the most modern and most innovative forum among all the forums on the internet. The design was top-notch (the current … | |
Re: [B]Text-based Role-Playing Game Project [COLOR="Green"](For Beginners)[/COLOR][/B] [INDENT]Firstly, this game will start with an introductatory storyline of the game to attract player interest. Then, it asks a player to enter his or her name and which class the player want to choose. There are going to be 3 classes for player: … | |
Re: [QUOTE=Jx_Man;507133][COLOR="Green"]To be a winner, all you need is to give all you have[/COLOR][/QUOTE] I disagree with this one. [B]To be a winner, all you need is to obtain as much as you can.[/B] | |
Re: If one number divisible by 2 and 3, it is also divisible by 6. [code=cplusplus] for(i = 1; i <= 100; i++) { if (i % 6) // this condition is true whenever i is not divisible by number 2 and 3. } [/code] ![]() | |
Re: Basically, you want to know the **average of prime per thousand number below 50,000** and **total number of prime below 50,000**. Your **primeCount** is a little mess up. From my understadning primeCount(x, y) should return the number of prime between **x** to **y**. long primeCount (long x, long y) { … | |
Re: What have you tried so far? You need to show as some effort first. | |
| |
1. For developing productive software 2. For learning (learning C++ language, implementing algorithms and data structures) or solving fun programming problem. 3. I don't use it ___________________________________________________________________________ **NOTE** I haven't been in Daniweb for years and there are so many changes that I don't even know how to create a … | |
Re: May I add another algorithm that does not use log and power function; yet still run relatively fast. This function makes use of [URL="http://en.wikipedia.org/wiki/Fast_inverse_square_root"]fast inverse square root algorithm[/URL] which works only with 32-bits unsigned float number as input. [code=cplusplus] float sqrt (float x) { float xhalf = 0.5f*x; int i … | |
Re: A wife was making a breakfast of fried eggs for her husband. Suddenly, her husband burst into the kitchen. "Careful," he said, "CAREFUL! Put in some more butter! Oh my GOD! You're cooking too many at once. TOO MANY! Turn them! TURN THEM NOW! We need more butter. Oh my … |
The End.