A population is a complete set of items that share at least one common characteristic.
Questions tagged [population]
183 questions
3
votes
3 answers
why the input argument on population count must be unsigned
int pcount_r (unsigned x) {
if(x==0)
return 0;
else
return ((x & 1) + pcount_r(x >> 1));
}
just wondering why the input argument is unsigned.
best regards!

Daniel Gómez Jurado
- 33
- 3
3
votes
2 answers
Population genetics modelling in python
so I need to make a program that generates generations of random equally fit alleles of a theoretical organism with a single gene.
I start with a list containing one mutated allele 2, and then I choose 3 alleles for the next generation, and append…

Alexander Zamani
- 33
- 1
- 5
2
votes
1 answer
How do get city population by name with SPARQL
I need to get city population by its name. I'm sure SPARQL could provide this, but I'm not sure how to write the query. I have a query which provides COuntry's capital and coordinates by it's name, so I assume it should be something similar.…

Vytautas Krutulis
- 109
- 1
- 5
2
votes
2 answers
Population Pyramid with Gender surplus in R
On Wikipedia, there is a fantastic population pyramid that shows gender surplus.
How could I recreate this in R using ggplot2, &/or plotly?
It's essentially a dual-stacked bar plot, which has been oriented by 90 degrees.
# Here is some population…

Brad
- 580
- 4
- 19
2
votes
2 answers
Pandas: how to calculate percentage of a population from elsewhere
I found this data file on covid vaccinations, and I'd like to see the vaccination coverage in (parts of) the population. It'll probably become more clear with the actual example, so bear with me.
If I read the csv using df =…

ast
- 23
- 4
2
votes
2 answers
How do I modify my SQL Statement so each Project has (x) Judges and each Judge participates evenly among their population?
Question
How do I modify my SQL Statement so each Project has 4 unique judges and each Judge evenly judges the same number of projects for their assigned division and category?
Requirements
Population Project needs to be reviewed by Population Judge…

Daniel Aistrop
- 51
- 4
2
votes
5 answers
Hamming weight/population count in T-SQL
I'm looking for a fast way to calculate the hamming weight/population count/"the number of 1 bits" of a BINARY(1024) field. MySQL has a BIT_COUNT function that does something like that. I couldn't find a similar function in T-SQL?
Or would you…

Simon
- 1,814
- 20
- 37
2
votes
1 answer
Very small populations/state variables to zero in differential equation solutions
I'm posting because I am numerically solving ordinary differential equations and would like to constrain the state variables. In sum, I'm a biologist modeling populations and would like for the populations to go extinct when they become really…

Chris Moore
- 151
- 6
2
votes
1 answer
How to add different legends to a multiple plot?
Okay so I have used the par function to combine multiple plots.
I added legends and it's all fun and games until some plots need different legends than others and I can't figure out the programming gymnastics required to make it work.
I've included…

Sam Duncan
- 23
- 4
2
votes
1 answer
Populate inside JSON object Mongoose
i want to populate inside JSON object, but it doesnt work. Here is the code. The response i still get is the objectId when i log the response of the Group variable
population
var Groups = await GroupModel.find({ownerUser :…

kokoto13
- 57
- 1
- 9
2
votes
2 answers
JQGrid Dynamic Select Data
I have utilised the example code at Example Code at this link
and I have got my grid to show a dynamically constructed select dropdown on add and edit. However when it is just showing the data in the grid it shows the dropdown index instead of its…

EnterpriseMonkey
- 76
- 1
- 6
2
votes
1 answer
MATLAB: Generating a population randomly starting from some parameters
I am quite a beginner and I am sorry if my question seems trivial, but I hope somebody will help me.
Let's assume I have a quantity Q which is function of n inputs Xi:
Q = f(X1, X2, ... Xn)
Now, let's assume that some of these inputs are…

Paul
- 57
- 1
- 6
2
votes
2 answers
Given an initial population x, what is the least steps to get to desired population y
Given an initial population x and an exact desired population y,
what is the least number of steps to get to y
using three functions A{x+1}, B{x+2}, C{x+x}
My approach
#include
using namespace std;
int fA (int x)
{
return x+1;
}
int…

user3439497
- 23
- 2
2
votes
1 answer
Why do they use an ObjectId and a Number in the Mongoose Population example?
In this example, they create personSchema using ObjectId to reference the Story and this I understand. But then in storySchema why don't they do the same to reference the person?
Or the inverse: why using ObjectId instead of Number in Person?
var…

fusio
- 3,595
- 6
- 33
- 47
2
votes
1 answer
DIfference between sub docs and population in Mongoose and doubts about database schema
I am new to MongoDB and MongooseJS. I am also quite inept at creating databases, sorry.
First question
what is the difference between sub docs and population?
Looking at the docs example, a Parent-Children subdoc seems very similar to a…

fusio
- 3,595
- 6
- 33
- 47