DaniWeb Community Feedback
Member Avatar

The recently active list for admins and mods (team) appears broken, at least regarding myself. Currently it says I was last active 4 days ago, yet I've been on and …

Topic by happygeek

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 …
Web Development
Member Avatar
<!-- example -->

<html>
    <head></head>
    <body>
        /* Lots of contents, header, etc.
        <?php
            if (isset($_GET["id"])) {
                echo $anexample[$_GET["id"]]["test"];
            }
        ?>
    </body>
</html>

There would be links that would say example.php?id=1

Topic by Aeonix

I think you might interest in SPFJS, that's used by Youtube. It is still using Javascript.

Software Development
Member Avatar

Hello guys, I am Toni Hacker, i browsed through this forum and I saw you guys really talk more about programming. i wanna make an operating system but i need …

Topic by Tomas_3

What a scary project you are aimming? Anyway, if you want to build a toy OS, you can try Cosmos. Cosmos is like a OS lego.

Programming
Member Avatar

I'm looking for an algorithm, pseudocode or any langauge, to generate random numbers with the following characteristics:

integer values in the range 0-n
lower values much more likely to happen …

Topic by JamesCherrill

Let examine how good is square random number as random number. The easiest and simplest way to do so would be using chi-squared test. First, to calculate the chi-squared test, …

Programming
Member Avatar

I'm looking for an algorithm, pseudocode or any langauge, to generate random numbers with the following characteristics:

integer values in the range 0-n
lower values much more likely to happen …

Topic by JamesCherrill

There is another way which is even simpler than my last approach. Since random.random() generates number between 0 to 1. If we square it, it will getting smaller. Hence, the …

Programming
Member Avatar

I'm looking for an algorithm, pseudocode or any langauge, to generate random numbers with the following characteristics:

integer values in the range 0-n
lower values much more likely to happen …

Topic by JamesCherrill

I believe that computer can quickly calculate square root. Just using Taylor Series or Newton Raphson. These two method is cheap if you don't want too accurate result of the …

Programming
Member Avatar

I'm looking for an algorithm, pseudocode or any langauge, to generate random numbers with the following characteristics:

integer values in the range 0-n
lower values much more likely to happen …

Topic by JamesCherrill

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 …

Computer Science
Member Avatar

make 100 with just required digit is ..you can used four 7 digit and only one 1 digit ...
7,7,7,7 and 1;
now for making 100 with them you can …

Topic by hadisur_rahman

177 - 77 = 100

Programming
Member Avatar

I'm a noob at C++ and this is the first assignment in my class. I'm not sure If I did it right. Can someone please check and correct it please? …

Topic by whaleflipper

> 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 …

Software Development
Member Avatar

Design a java program that generates 100 random numbers, and keeps a count of how many of those random numbers are even and how many are odd.
This is what …

Topic by Jamie_10

You don't even need condition or mod operator. odd += number & 1; even less CO2 emissions. The world is greener.

Mobile Development
Member Avatar

Why can't I use || or && with double as in sample below?

 if (((mDiameter = 1 || mDiameter = 1.2) && mPitch = 0.25) || (mDiameter = 1.6 && …
Topic by Centorpe

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 …

Software Development
Member Avatar

Hello everyone,

I am posting this more generically in the software development section to see what might be available and to increase a possible success rate. But enough of that …

Topic by JOSheaIV

> However, seeing that there is a chance it can fail, I will need to continue to research ways around this.

To be clear, there is no fast way to …

Community Center
Member Avatar

Hi All,

I'm looking for some advice. After having to take about two years off from university due to suffering from viral meningitis, I have finally gone back and finished …

Topic by Stuugie

To make you feel better. You should read Why Can't Programmers.. Program?. It shows that a lot of people is worser than you. The most important skill is self-learning. Since, …

Computer Science
Member Avatar

Hello everybody im thinking about how AI works and actualy im really confuzed and scared at the same time, so me as low programmer i know how the computers work, …

Topic by Stefan_1

> Thats because we are humans we have a perspective what is good and what is bad for us, how the computer will know what is punishment for him and …

Computer Science
Member Avatar

Hello everybody im thinking about how AI works and actualy im really confuzed and scared at the same time, so me as low programmer i know how the computers work, …

Topic by Stefan_1

> 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 …

DaniWeb Community Feedback
Member Avatar

My apologies for being so silent recently. I think this has actually been the longest I've gone without making any big changes to DaniWeb in as long as I can …

Topic by Dani

> web hosting costs are over $5000/mo

Are you sure you spend $5000 per month for hosting? I am running a website with as much as traffic as Daniweb (if …

Software Development
Member Avatar

Hello everyone,

I am posting this more generically in the software development section to see what might be available and to increase a possible success rate. But enough of that …

Topic by JOSheaIV

You can use Fermat Test. It has high probability of getting the right answer. We know that if a^(n-1) mod n != 1, then n must be a composite number. …

Software Development
Member Avatar

Hello everyone,

I am posting this more generically in the software development section to see what might be available and to increase a possible success rate. But enough of that …

Topic by JOSheaIV

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 …

DaniWeb Community Feedback
Member Avatar

My apologies for being so silent recently. I think this has actually been the longest I've gone without making any big changes to DaniWeb in as long as I can …

Topic by Dani

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 …

Software Development
Member Avatar

I am trying to use a hash set to do a Monte Carlo analysis of the Birthday Paradox.

Here is my pseudo code:
Set number of collisions to zero
Loop …

Topic by kayleigh0411

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 …
Software Development
Member Avatar

Hi,

I'm trying to write code that will allow me to assign values to lists of strings. I then want to compare user input to the lists and create a …

Topic by bryann

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": …
Web Development
Member Avatar

There is a lot of people who thinking that one day PHP will die then Why Maximum web development is going in PHP ?

Topic by vikasmca2k11

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
Software Development
Member Avatar

Hi, could somebody help me how to write a function that sort elements in two dynamic stacks(contained in an external file) by the quicksort method?I think I have written the …

Topic by Ivan_9

> @Ivan_9. Quicksort and bsearch are two parts of the same whole. Quicksort uses bsearch algorithms to determine where to put the next element in the array.

@rubberman
To be …

Linux and Unix
Member Avatar

why linux?

Topic by kombi-tamiri

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 …

Software Development
Member Avatar

Hi, could somebody help me how to write a function that sort elements in two dynamic stacks(contained in an external file) by the quicksort method?I think I have written the …

Topic by Ivan_9

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 …

Search Engine Strategies
Member Avatar

May i know how to implement content delivery network for a website.

Topic by Piers Rollins

You can use Cloudflare. 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. …

DaniWeb Community Feedback
Member Avatar

As the title says, anyone else noticing the activity on DaniWeb suddenly dropping?

I usually check the Database and Software Developing sections in the morning. The Database one for awhile …

Topic by JOSheaIV

How come this discuss turn into a flame war. First of all, there is no different between the sub-forum and tag system based. A single tag equals to a sub-forum. …

DaniWeb Community Feedback
Member Avatar

I like to see a button to move to the next page in a thread on top of the thread. Now, if a thread spans more pages I have to …

Topic by Minimalist

I agree with this one. It is annoying to scroll down and check the latest reply.

Software Development
Member Avatar

Hello, I am making a tictactoe project for my 1st year college and I am wondering how can I use 1d array for tictactoe?

for example) is it like

int …
Topic by studyemail

A year ago, I also wrote an article about using only bits to representing the TicTacToe. It might be irrelevant to this question, but I think it is nice to …

Software Development
Member Avatar

Hello, I am making a tictactoe project for my 1st year college and I am wondering how can I use 1d array for tictactoe?

for example) is it like

int …
Topic by studyemail

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 …