I have a very simple model. This model uses data that are not given as continuous distributions, but are described by percentiles. What is the best way to sample these percentile bins, when the bins are of unequal size?

So, for example, to select the body weight for a given individual, I pick a random number between 0-100, then match this value to the nearest percentile. I don't interpolate or extrapolate, I just match the value I draw to the nearest bin. (Extrapolating isn't a good idea given the data.) Let's say, for body weight, the percentiles I have are 25, 50 and 75. But this gives bin sizes of 37.5 (0-37.5), 25 (37.5-62.5), and 37.5 (62.5-100). So because of the unequal bin sizes, I'm going to be sampling both the 25% and 75% bins much more than I'll be sampling the median, 50%, bin. This is the opposite of what I'd like to happen.

I could weight the bins, but that seems arbitrary. Or, instead of drawing my random number from a uniform distribution 0-100, I could draw it from a normal distribution centered at the median, but that also seems arbitrary. Or, alternatively, I'd love to be convinced that I don't actually have a problem here.

Any ideas on how I could better set this up? Thanks!

I'm trying to regulate a single AA battery to 5V for charging a USB device.

I know even at perfect efficiency, it won't provide much juice (1.5v * 1500 / 5v). But what is the expected efficiency for stepping up to 5v from 1.5v? Is 80pc achievable?

Are there other issues one should worry about in designing application?

How long does it take for a cited paper to show up online? I can see a couple of papers that were cited very recently and the papers containing those citations are currently online since a week or two. How long should I expect it to take before those citations show up as citations through Google Scholar or other indexing services?

In my native language, Norwegian, one uses hyphens when stating two or more copulated compound words that has common parts (words). In a thesis I'm working on, should I write

test specimens, test setups and test results

or could I write (like in Norwegian)

test specimens, -setups and -results?

I'm currently working on a c# online multiplayer game in real-time. The aim is to have client/server based connection using the UDP protocol. So far I've used UDP for players' movements and TCP for events (a player shooting, a player losing life) because I need to be sure such data will arrive to all players connected to the server. I know that UDP is said 'unreliable' and some packets may be lost. But I've read everywhere to never mix TCP and UDP because it can affect the connection.

The main question is how should I organize my network?

UDP is connectionless, how should I save who's is who? Should I save ip adresses of the clients in a list?

Should I use TCP for important events or use UDP? If I need to use UDP, how can I make sure that data will not be lost?

By using both TCP and UDP, I need to save for each player their IP in a list (for UDP) and the TcpClient which is connected in another list (for the UDP). How could I change that to be more effective?

I have downloaded Eclipse Mars2.0 on two systems. On one system's Eclipse, I am getting the option to select individual fields and on another system's Eclipse, I am not getting the option to select individual fields (here i am getting the option to select object only).

Can anyone explain the reason why?

enter image description here

Есть два способа записать перевод строки - std::endl и \n. В чем разница? Когда что использовать?

I'm doing a little bit of research and I'm hoping you can help me track down any games, other than Diplomacy (online version here), that employ all or some of the mechanics in Diplomacy (rules, short form). Examples I'm looking for:

  • Simultaneous orders given prior to execution of orders
    • In Diplomacy, players "write down" their moves and execute them "at the same time"
  • Support, in terms of supporting an attacker or defender "take" a territory.
    • In Diplomacy, no one unit is stronger than another you need to combine the strength of multiple units to attack other territories.
  • Rules for how move conflicts are resolved
    • Example, 2 units move into a space, but only one is allowed, what happens.

I may add to this list later, but these are the primary things I'm looking for. If you need clarification on anything just let me know.

Note: I tried asking this on GamingSE, but it was shot down. So, I am unsure where else I could post this. Since I am researching this for game development purposes, I assume this post is on topic. Please let me know if this is not the case. Please also feel free to re-categorize this. Thanks!

I'm a Mathematica newbie and I have the following problem: I connect to a Oracle DB and read out a set of variables, further on I want to histogram some of the variables. A Dataset seems to be the right tool, but I produce only datasets without a key via:

DBtest = SQLSelect[db, "TABLE1", {"ID", "VAR_1"}]


Result is a Dataset with one column containing ID and the other containing VAR_1 (sorry for the generic names - I can't copy my real work, since it contains sensitive data).

Then I can't use the DBtest[Histogram, "key"] functionality, since there is no "key" available.

Is there anyway to add keys after filling the dataset from the DB? Or shouldn't I use the Dataset class?

I have a set of starting and ending times that I need to store in an Oracle database. I need to store them in a manner that makes them easily searchable (i.e. a typical search is find all rows where a time value, such as 9:30AM, falls in between the start time and end time). In SQL Server I would just use a TIME datatype field, but Oracle does not appear to have an equivalent.

I have seen a number of blogs and forums that recommend just using a DATE field and doing conversions with TO_CHAR then comparing, or to store the time values as varchar(4 / HHMM) or varchar(6 / HHMMSS) fields. Both of these seem needlessly inefficient.

Is there a better or more efficient way to accomplish this in Oracle?