How do those who understand Noah's Flood to be a global flood explain what the carnivorous animals ate after disembarking?

Question: How do those who understand Noah's Flood to be a global flood explain what the carnivorous animals ate after disembarking, if there were only 2 of all the other species left? Eating 1 would stop those species' reproductive lines, so what happened here?
Comment: Is there any evidence that there were _any_ 'carnivorous' animals on the Ark ? (And omnivores are not 'carnivorous'.)
Comment: "*there were only 2 of all the other species left*" — Actually there were 14 of each kosher species. So we know that at least Noah and family could survive for a while.
Comment: https://answersingenesis.org/noahs-ark/feeding-carnivores-noahs-ark/
Comment: @Lige Yes, that might be the wisest response for those who hold to a literal account including a global flood. "We trust God's word, so this must be so. We don't know how it's so."
Comment: "We don't know how it's so"... bah. Christians should not stop investigation because we don't have an answer. That's the exact sort of anti-science of which scoffers accuse Creationists. That's exactly opposite to how science *started*, when it was started *by Christians*. Scripture tells us to have a *reason* for our beliefs. Do we have all the answers? Of course not. What we *do* know coincides beautifully with Scripture, however.
Comment: @Matthew I'm not saying don't investigate. I'm saying admit when one doesn't have a clear answer yet.
Comment: Seafood was abundant
Comment: @NigelJ Good point - for part of the question, it doesn't really matter, as long as there was predation upon the other sorts of animals, whether the animal doing the hunting is an omnivore or carnivore.
Answer: This is probably best answered by this article, but for the sake of having an Answer here...
First off, I want to take an aside to address a point that unbelievers often raise; namely, that there's no way Noah could take two of each of thousands of species of animal and have enough food for them.
That isn't what Scripture actually says, though it's easy to see where a layperson might be confused. There were not two of every species of animal on the Ark; there were two of every kind of animal. "Species" is a relatively recent, and very poorly defined delineation. Scripturally speaking, animals reproduce according to their kind. Lions and housecats can interbreed (at least through intermediaries), and are therefore the same kind (some Creation scientists like to use the term baramin). Same with wolves and dingoes, horses and zebras, and many others. Therefore, Noah only needed two of the cat kind (and likely those would have been closer to the size of servals than tigers). Conservative but realistic estimates place the number of animals (many of which were likely quite small) at less than ten thousand. Some calculations have estimated that the Ark could hold hundreds of thousands of animals the size of sheep (which are well above median size). Even with this latter figure likely assuming fairly crowded conditions with no food storage, it's easy to see that the problem is nowhere near as difficult as scoffers try to make it out to be. This article goes into further detail.
The above is not totally irrelevant to the original question. Having established that feeding the animals on the Ark was nowhere near so difficult as scoffers suppose, one immediate possible solution is that the Ark carried enough supplies to last for some time after. (Keep in mind that Noah et al were in the Ark for a little over a year; if, in that time, they used three quarters of their original supplies, the leftovers might still last for months.)
Another critical point is that most Creationists believe that no animals were created to be carnivorous. The ark was no opened until after a dove had brought back an olive branch, and subsequently left and not returned. This shows not only that plants were again growing, but suggests that the dove felt it could survive without relying on Noah to feed it. If we also suppose that the disembarking animals could still subsist, at least for a while, on a plant-based diet, we have substantially mitigated the food concerns. On top of that, one needs to bear in mind that aquatic animals were not wiped out.
The assumption that dozens of animals would immediately need to kill other land animals in order to survive is just that; an assumption. One should also keep in mind that it's hard to make a kill when there's perhaps only a hundred or so potential prey animals in the entire world.
On the other hand... the fossil record reveals any number of animals that are now extinct. While historic records of some of these persist until as recently as a few centuries ago, it may also be the case that some species were almost immediately killed off.
Comment: @Lige, if Noah only had a couple years (and no help), you might be right . Keep in mind, however, that Noah had as much as 120 *years* of warning, and may have had (older) family to help until shortly before the Flood started. You really ought to check out the Ark Encounter and/or related resources. Can we definitely say no miracles were involved? Of course not! But we have a 1:1 replica that suggests we don't *need* miracles, at least for the animal husbandry.
Comment: Thanks for the edification on my comments, they were certainly too flippant.  I've deleted them now.  My point remains that, even in the ideal scenario you have described, building a boat large enough to hold thousands of animals and their food, then feeding them, still seems pretty out of reach for Noah and company.  While it is certainly possible, I still imagine that a miraculous loaves-and-fishes event was more likely.  You've given me a lot of food for thought (pun unintended), though, so thanks for helping me to mull over the way I read about Noah.  :)
Comment: I just looked up the Ark Encounter, very interesting!  Thanks for the reference. :)


Where were the Straits dollars printed?

Question: From the information I gathered, the banknotes of the Straits dollar were printed by Thomas De La Rue & Company, Limited, a firm based in London. Were the banknotes of the Straits dollar printed in Britain, in India, or in the Straits Settlements?
Comment: The Wikipedia entry for [De La Rue](https://en.wikipedia.org/wiki/De_La_Rue) only mentions manufacturing locations in the UK, so I'd imagine they were printed in Britain.
Comment: @SteveBird The modern day De La Rue has manufacturing locations in the UK, Kenya, and Sri Lanka. It may have been different in the past (i.e. 100+ years ago).
Answer: They were printed in the UK.
The Straits Dollar was initially printed by Thomas de la Rue of London at their UK plants from 1901 until 1930:

and later, from 1931 to 1935, by Bradbury Wilkinson at their plant in New Malden in Surrey:

The Straits Dollar was replaced by the Malayan dollar in 1939, at an exchange rate of 1:1

In fact, even after independence, Singapore  currency notes  continued  to be  printed in the UK right up until 1984:

Singapore's currency notes were initially printed in the British plants of Bradbury Wilkinson & Co Ltd and Thomas De La Rue Ltd. In 1984, Thomas De La Rue established a plant in Jurong for the printing of Singapore currency notes

History of Singapore currency

Where were the Straits dollars printed?


Need help with a test hypothesis involving an exponential distribution

Question:
You may ignore the questions $a$, $b$ and $c$ as they are relatively easy. I know how to test hypotheses for a sample data but question $d$ is confusing me. How do I know what type of test statistic I should be using for this and what quantile distribution I should be comparing this with? We've only really dealt with testing hypotheses for sample distributions. Thanks in advance for any help.
Comment: It seems to me that this can be rephrased as: give a rule such that if $\theta=2$ then you reject the null hypothesis $\theta=2$ with probability 0.05. So this would amount to finding a symmetric interval centered around 2 whose complement has probability 0.05 under a Exp (2) distribution. This is easy enough to do...
Comment: I found this interval to be -2log(0.05) to infinity. Is this correct? Although I'm not entirely sure what this interval means.
Comment: I said a symmetric one: so you're looking for $a$ such that $\int_{2-a}^{2+a} \frac{1}{2} e^{-t/2} dt = 0.95$. So $e^{-(2-a)/2}-e^{-(2+a)/2}=0.95$ so $\sinh(a/2)=\frac{0.95e}{2}$, $a=2\sinh^{-1}(0.95e/2)$. This breaks down because actually this $a$ is greater than $2$; so you're really looking for $1-e^{-x/2}=0.95$ so $x=-2\log(0.05)$. Then the relevant interval is $[0,-2\log(0.05)]$.
Comment: To clarify what this means: if you have the null hypothesis $H_0 : \theta=2$, you will accept the null hypothesis if your result is in $[0,-2\log(0.05)]$ and you will reject it otherwise, with the overall level of significance of the test being 0.95 (i.e. the probability of rejecting the null when it holds is at most $0.05$).
Comment: Thank you a lot, I understand it now
Answer: If you draw a single observation attempting to test $H_0 : \theta=2$, then the standard test is the same as it usually is for the mean: you reject this null hypothesis with level of significance $1-\alpha$ if your result falls outside of an interval $[2-\delta,2+\delta]$ which has probability $1-\alpha$ when $\theta=2$. The probability of such an interval is $\int_{2-\delta}^{2+\delta} \frac{1}{2} e^{-t/2} dt=e^{-(2+\delta)/2}-e^{-(2-\delta)/2}=2e^{-1}\sinh(\delta/2)$ if $0 \leq \delta<2$ and $\int_0^{2+\delta} \frac{1}{2} e^{-t/2} dt = 1-e^{-(2+\delta)/2}$ if $\delta \geq 2$. If $\alpha=0.05$, you note that $2e^{-1}\sinh(1)<0.95$, so that you look at the second case. This gives the interval as $[0,-2\log(0.05)] \approx [0,6]$. You accept this null hypothesis given a result in this interval and reject it otherwise.


JavaScript backtick multiline string not working in Internet Explorer

Question: I have a large HTML string contained in a var. I'm using it to write to innerHTML.
The first example (with backtick syntax), which is the simplest, does not work in Internet Explorer 11.
Is there a way to get the first example to work in Internet Explorer 11 without having to use an array or newline characters?
Does not work in Internet Explorer
Backtick `
https://jsfiddle.net/qLm02vks/

var message = `

this

is

a

multiline

string

`;

// Write Message
var display = document.getElementById('display');
display.innerHTML = message;

Works in Internet Explorer
Array Join
https://jsfiddle.net/3aytojjf/
var message =
   ['
this
',
    '
is
',
    '
a
',
    '
multiline
',
    '
string
'
   ].join('\n');

Works in Internet Explorer
Single quote ' with linebreak \
https://jsfiddle.net/5qzLL4j5/
var message =
'
this
 \

is
 \

a
 \

multiline
 \

string
'
 ;

Comment: you can use multi-line comments and `Function.toString()`...
Comment: [No support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Browser_compatibility)
Comment: see this answer with the idea to keep the HTML block in an invisible `
Answer: Problem
The backtick syntax for a string is a Template Literal, which allows for interpolation of variables within a string and multiline strings. They are not supported by Internet Explorer 11 (see more here: ECMAScript 6 compatibility table).
Solution

You can use a transpiler, such as the ever-popular Babel. This will convert the template literal into the ECMAScript 5 syntax that Internet Explorer 11 understands.
You could opt-out of supporting Internet Explorer 11, and stick with support for Edge and other browsers that have native ECMAScript 6 support, though this is usually not an option.
Answer: It is not the most elegant solution, but I solved this myself by minifying my multiline template (Vue) string, and encompassing it within single quotes instead of back ticks. This can be automated as part of the build step, so your code still looks legible for development.
Also ensure that any inner strings (like classNames, etc.) are double quoted so you don't accidentally terminate the string, thereby causing template errors.


A good RGB formulae in gnuplot for colored and gray 2d contour prints

Question: I have a question about a handsome colorpalette for 2d contour plots in gnuplot. Based on the gnuplot manual and help function, I figured out that there are some pre-defined colors palettes like:
<code>Some nice schemes in RGB color space
7,5,15   ... traditional pm3d (black-blue-red-yellow)
3,11,6   ... green-red-violet
23,28,3  ... ocean (green-blue-white); try also all other permutations
21,22,23 ... hot (black-red-yellow-white)
30,31,32 ... color printable on gray (black-blue-violet-yellow-white)
33,13,10 ... rainbow (blue-green-yellow-red)
34,35,36 ... AFM hot (black-red-yellow-white)
</code>
Before I will try to figure out some arbitrary combinations I want to ask you, if you have experience of a nice color map that can be printed in color scale and also be readable for black/white prints. For a lot of color scales, the problem occur that in gray scale, we get the  same gray color twice  for two different values (example the traditional rainbow palette).
Just for completeness, the color combination mentioned in the help function can be used but I am searching for another color combination like -> red and green or some answer about how to figure out a good color combination that can be used for color and gray scale plots.
Thanks in advance and I hope the question is understandable, with all informations and not too simple.
Answer: The sequential color schemes from the colorbrewer project would work:
https://github.com/aschn/gnuplot-colorbrewer


Delete records in report object

Question: I have 100 records in report object.tried multiple options like data loader, work bench and developer console to delete those 100 records but unable to delete those records.Could someone help??
Comment: Do you know the reports you want to delete?
Answer: The Report sObject is read-only because Reports are metadata. You cannot delete them with the REST API or with DML statements.
You will need to use a client of the Metadata API to perform a destructive deployment. This can be achieved with Workbench, Salesforce DX, Ant, or your client of choice.
Comment: also vendor devops products like Gearset, Blue Canvas, Copado can do this with nice UX

Delete records in report object


Character set mismatch in database migration

Question: I have an old database (MySQL 5.1.58) that I want to migrate to a new installation (MySQL 8.0.26). When I just use
oldserver ~$ mysqldump mydatabase > file.sql
newserver ~$ mysql mydatabase < file.sql

This works fine, except for the character set. I have some records with non-ASCII characters, and I think the old server is on iso-8859-1 (how can I know for sure). The new server is UTF-8, because I have set .my.cnf to:
[mysqld]
character-set-server = utf8

I tried to convert the resulting file before import using
~$ iconv -f iso-8859-1 -t utf-8 file.sql -o file.utf8.sql

But that didn't seem to work (I only get more À characters). I can hexdump the dumpfile, and I see hex characters c3 a2 e2 82 ac cb 9c being rendered as ' on my terminal.
How can I correctly dump this database into a new UTF-8 based server?
I am in full control of the target database server, but (as it is still in use) I do not want to touch the source.
Update I dumped my database with
oldserver ~$ mysqldump --default-character-set=latin1 mydatabase > file.sql

and it now dumps correctly. When inspecting the file, I see valid UTF-8 characters in the dump.
Importing it still fails though.
Answer: Specify the default character set on both commands.  For flexibility, use utf8mb4, not latin1.
Probably you also changed versions in the process.  At some point MySQL changed the default from latin1 to utf8mb4.  Were those two commands done on different servers?  Or were they done across the wire?  I ask because my version comment applies to both mysqldump and mysql.


Xcode 4: Framework localization not working

Question: I am developing my own framework using Xcode 4, and I'm using it in two sample apps (a console one, and a Mac OS X Cocoa application).
I'm trying to add localization to the framework, so I've created two versions of a Localizable.strings file (en and fr versions), but every time I'm trying to print a localized string from the sample apps, I only get its technical name. For example, with the following line inside the framework's code:
NSLog(NSLocalizedString(@"LOC_TEST", nil));

I only get "LOC_TEST" displayed in the output...
Localization works fine with the Cocoa app itself however (meaning the Cocoa app's localized strings are shown appropriately).
Following this article, I have tried to add localizations in the framework's plist file:
<key>CFBundleLocalizations</key>
<array>
    <string>en</string>
    <string>fr</string>
</array>

But it didn't change anything...
What am I missing?
Answer: The cause for not picking a right .strings file by framework is in NSLocalizedString macro:
#define NSLocalizedString(key, comment) [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]

Framework's location of .strings file is not [NSBundle mainBundle] as specified in macro.
From what I see, you'd need to use NSLocalizedStringFromTableInBundle instead and specify your framework's bundle location.
Answer: The accepted answer is correct,  NSLocalizedString  will not work as it using [NSBundle mainBundle] so I am using this macro in my framework
#define LOCALIZED_STRING(key) [[NSBundle bundleForClass:[self class]] localizedStringForKey:(key) value:@"" table:nil]

Answer: The "technical name" as you call it is actually a Key. Your .strings files will look something like:
/* no comment */
"LOC_TEST" = "LOC_TEST";
In en.lproj/Localizable.strings, replace the second LOC_TEST (the one after the =) with your English string. Do the same in fr.lproj with your French text.
Comment: Thanks for your help, but it seems like Console apps do not support localization at all.
I posted this question one year ago, and I replaced that Console app with a regular Cocoa app since. Now everything works fine!
Answer: example:
put it in your .m file:
#ifndef NSFrameworkLocalizedStrings
#define NSFrameworkLocalizedStrings(key) \
NSLocalizedStringFromTableInBundle(key, @"YOUR_BUNDLE_NAME", [NSBundle bundleWithPath:[[[NSBundle frameworkBundle] resourcePath] stringByAppendingPathComponent:@"YOUR_BUNDLE_NAME.bundle"]], nil)
#endif

and use this method:
+ (NSBundle *)frameworkBundle   {
    static NSBundle* frameworkBundle = nil;
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        frameworkBundle = [NSBundle bundleForClass:[self class]];
    });

    //NSLog(@"frameworkBundle %@",frameworkBundle);
    return frameworkBundle;
}

Enjoy √ http://www.LegoTechApps.com
(Download Framework that will save your time)


How should I handle edits suggested before a question was closed?

Question: Occasionally, some <2k users may suggest valid edits to questions fixing typos/grammar/formatting before they are closed. However, sometimes, a question is closed when the edit is still pending. Is it fair to reject those edits as they would bump the post to reopen queue with no reason (although this wouldn't be the editor's intention)?
Comment: This is sometimes referred as _polishing turds_, and is rarely seen as a worthwhile occupation.
Comment: Rejecting is fairly standard at least. Not sure if that's the official stance though
Comment: I think it should be rejected with a custom message, so the suggesters understand what went wrong, and why they shouldn't edit closable posts in the first place (unless it makes a substantial change that allows for reopening, but that's rare).
Comment: @zoe standard for some, but it doesn't help if one person rejects and two others approve. Seen this often enough, because I also reject edits on closed questions with a custom message and when I check later, I often see the edit approved anyway.
Answer:
Is it fair to reject those edits as they would bump the post to reopen
queue with no reason?

YES. If they don't actually make the question re-openable.
I too sometimes encounter edits such as capitalizing is on a closed question. While this edit is questionable in regular circumstances, it surely doesn't make a question re-openable.
The problem with editing closed questions is the following: after editing, the question will enter the reopen queue. It gets only one chance at that! So assuming you approve such non-substantial edit, it will probably be voted to be left closed. Then, a substantial edit comes along and it won't push the question to the queue again, giving the question less chances to get reopened...
In most cases, only the OP can salvage a closed question by editing. In any case you have to carefully review edits to a closed question. If you feel bad simply rejecting, you can reject with causes harm (which is just a confusing way to say custom message) and explain to the editor the reason above.

The fact that the edit was proposed before the question was closed is unfortunate, but irrelevant. The edit should be reviewed according to the current state at the time of the review.

* The review of an edit to a closed question becomes a bit harder when the title was edited as well due to a bug in the review queue.
Comment: I think it should be rejected with a custom message to the reviewer, explaining why it was rejected. This way they understand next time to not make edits to posts that will likely get closed .
Comment: I really hope that someday only edits by the OP will push a question into the reopen queue, that would take a lot of pressure from the reopen queue and give the OP a real chance to get it reopened.
Comment: @bad_coder I brought the capitalization of `i`s just as an example. Whether it's a good edit or not is not the main point here. The point is that if the question is closed, this kind of edit doesn't advance the question towards reopening in any way, and therefore should be rejected to not "waste" the question's single pass to the reopen queue...
Comment: @bad_coder *thus you propose to block the entire editing process because of a single detail. (Meaning no one can edit, because we're waiting for the OP to make an edit that likely will never happen.)* - if it will never happen and the OP doesn't care for the post, why should we... Also this one single detail you mention is basically the whole point of the edit (to make the question reopenable), so if it doesn't achieve that goal - what's the point?


Problem with the film "The Martian"

Question: In the film how does NASA manage to accomplish the complex engineering task of getting a group of people to mars but are seemingly unable to to build a spacecraft that does not blow over in a strong wind? Seems like this might have been captured in some initial requirement for the mission given the atmospheric conditions on mars would have been known long in advance?
Comment: This is not a question, this is a rant posing as a question.
Comment: You're essentially asking "how could NASA have made a mistake?"  It was an extreme circumstance, and for the most part, it worked out.  Everyone except Watney made it back to the ship and was able to get off Mars.  Space exploration is dangerous, NASA can't account for literally everything
Comment: "for the most part, it worked out" .... not sure I agree with that
Comment: Putting aside the issue of the storm being unrealistic, but if the storm is strong enough to tip the vehicle then its strong enough to pick up debris which could cause damage to said vehicle even if it was securely tied down.  The storm did infact cause damage to the Hab, which nearly resulted in the death of one of the team.  In such circumstances, having a contingency plan of "abort the mission" is one that is perfectly acceptable to have, as otherwise you might end up with an ascent vehicle that can't go anywhere due to damage!
Answer: First problem with the entire movie and the book plot:

Are there any glaring scientific inaccuracies in the book or movie?
The biggest one is the sandstorm at the beginning. It's not realistic
  at all.
Mars does get 150 km/h winds, but the atmosphere is so thin
  that the inertia behind the wind is super gentle: it would feel like a
  slight breeze. It couldn't knock anything over or cause damage.
I knew
  this when I wrote it but I decided, screw it—this is more exciting.
  It's a man-versus-nature story, and I wanted to make sure nature got
  the first punch in. There are some things we now know are inaccurate
  which we didn't know when I wrote the book.
In the last six years
  we've actually learned a lot about Mars. There's a lot more water in
  the soil than we suspected. Every cubic meter of soil contains about
  35 litres of water as ice. So all Mark would've had to do was take the
  sand and heat it up to boil the water out. No need to do the dangerous
  hydrazine reduction.
Another issue that I kind of skirted is the
  radiation in space. On earth we're protected by the magnetosphere and
  the thick atmosphere. But on the surface of Mars there's a thin
  atmosphere and no magnetosphere. It would be a very serious dose of
  radiation for him to be on Mars for 500 days. The kind of dose where
  you definitely get cancer.
I have two paragraphs in the book where I
  was just like, everything is shielded somehow. Turns out there's no
  such thing as thin light flexible radiation shielding. It takes a
  centimeter of lead or 10 cm of water or a full meter of rock to
  protect you from galactic radiation. So I made up a fake material that
  doesn't really exist. I actually calculated the orbital trajectories
  that they needed to take to get from Earth to Mars. That's a real
  thing that would work. But the movie changed how long the crew spent
  on the planet for a funny reason.
In the book they left after sol six,
  but in the movie they leave after sol 18. Ridley wanted Mark to stir a
  nice big bucket of shit when he was creating the fertilizer for the
  crops. Ridley said, after only six days of six people shitting that's
  36 packets. He wanted them to stay longer, so that the bucket of shit
  could be full.

Says Andy Weir, the author of the book.
But if we are thinking in movie-verse, it was not just a simple storm. The storm was way too strong (and unexpected) for the mission and the equipment. They could leave immediately but they wait for Mark and the storm gets too strong for them to not surpass the tipping point.

Problem with the film "The Martian"


What does $m$ mean in the De Broglie equation?

Question: The equation is: $\lambda = \frac{h}{mv}$. m here means the mass of the object while moving or while stationary?
Comment: Possible duplicate of [De Broglie wavelength, frequency and velocity - interpretation](https://physics.stackexchange.com/q/62522/)
Comment: @Touhid it's usefull in principle to link similar questions in the comments. If your question were an exact duplicate or a duplicate to an extent that this forum discourages, the question would be closed, where having similar questions linked facilitates this process.
Comment: It is better to write the deBroglie equation as $\lambda=\frac{h}{p}$, where p is the momentum. If the motion is relativistic then $p=\gamma mv$ where m is the rest mass.
Comment: Why do people here are so sensitive about "duplicate"? my question and the question Masoud suggested as duplicate may have something in common but they are not the same. what is the problem in just answering the question instead of searching the lot to find a question that MAY BE duplicate!!  Two questions are asked from two different point of view. May their answer have something in common, but they are not the same question!!
Comment: That said, the question linked as a "possible duplicate" is not actually a duplicate of this particular question, as it doesn't deal with relativistic mass at all.
Comment: who the hell marked this question as possible duplicate? it's a completely different question!!
Answer: The de Broglie wavelength is given by:
$$ \lambda = \frac{h}{p} $$
where $p$ is the momentum. Under non-relativistic conditions the momentum is just:
$$ p = mv $$
which gives the equation you cited. At relativistic speeds the momentum is given by:
$$ p = \gamma mv $$
where $\gamma$ is the Lorentz factor given by:
$$ \gamma = \sqrt{1 - \frac{v^2}{c^2}} $$
In these equations $m$ is the rest mass and this is an invariant and not dependent on the speed.
Comment: how do we get p=γmv?
Comment: @Touhid: when you formulate mechanics in a relativistic way the momentum is replaced by a four-vector called the [four momentum](https://en.wikipedia.org/wiki/Four-momentum). The $\gamma mv$ is the spatial part of this four vector.


Fixing binary variables in an Binary Integer Program

Question: I have a Binary Integer Program with two binary decision variables and additionally have an expected solution. At the time of execution of this program I expect the parameters to change slightly. I am using the expected solution to fix the values of the decision variables according to it and utilize the model to compute the rest of the decisions at time of execution. I was curious whether this approach benefits the program in some way assuming most of the variables are fixed from the expected solution. Is there an alternative approach that is better?
Answer: Actually, it effectively depends on the problem you have at hand. Modern solvers have often been armed with dozen of (SOTA) heuristics, cutting plane approaches, powerful pre-solving phases, etc. Also, to inject a heuristic solution usually, there are two ways. First, by something like a MIP-Start, and the second by using the heuristic callback if the solver supports that. In many cases, there might be a situation in which the founded heuristic solution would be rejected by the solver process. By Googling or searching the community you definitely could find many useful notes. (e.g. this).
As a simple example, you can check the behavior of the solver again with a founded heuristic solution. Suppose, there is a bin-packing problem only with two items and one bin. (this is a tiny example that can be illustrated). The feasible solution of the problem is:

and the optimal solution, objective function, would be equal to one. (it is obviously!). Now, I am trying to inject a heuristic solution $\{1,1,0\}$. The solver's log shows that:
Processing 1 MIP starts.
MIP start 'm1' defined no solution.
Warning:  No solution found from 1 MIP starts.
Retaining values of one MIP start for possible repair.
Found incumbent of value 1.000000 after 0.00 sec.

and as the second try inject the solution $\{0,1,1\}$. Then the log file again shows:
Processing 1 MIP starts.
MIP start 'm1' defined solution with objective 1.0000.
1 of 1 MIP starts provided solutions.
MIP start 'm1' defined initial solution with objective 1.0000.
MIP emphasis: optimality.
MIP search method: dynamic search.
Parallel mode: none, using 1 thread.
Root relaxation solution time = 0.00 sec.

Once a wise man said to check a heuristic solution that obtained from an external program/function, it would be worth fixing the problem variables at this solution and investigating if it can provide at least a feasible solution. I hope it helps.
Answer: There are approaches like this, kind of heuristic you may say, where you can fix values of some variables like a warm start and allow the solver to start search from the given feasible candidate solution.
Other than that there's pre-solving and introduction of cuts/constraints like knapsack cover. Such techniques are followed for solving MILP models.
FICO has described one such heuristic where you start by solving LP relaxation, then fixing values of some of the binaries and then iteratively solvng the MILP using the best candidate solution as the bounds.


Why websites usually block the navigation interaction when under a full screen overlay?

Question: I'm working on a research project of web navigation. During research, I found that when there is a full screen overlay, websites tend to block the interaction of the navigation bar. Like web Twitter, when you click on a image, the site overlay block the whole page. I can no longer search or go to other page at this point. I was wondering if there is a purpose of this approach? Many thanks!
Comment: From [this other question](https://ux.stackexchange.com/a/12046/59321): "A modal dialog is a window that forces the user to interact with it before they can go back to using the parent application." Doesn't answer your question, necessarily, but that other answer might be worth a read.
Answer: Let's look at the example you cited: Twitter's tweet modal

The full-screen background overlay here serves two purposes:

It helps focus the user's attention on the modal by visually dimming non-essential content.
It blocks non-essential interactions.

The second purpose is what you're asking about specifically. Here Twitter has made a decision that clicking the "Tweet" button, navigating, or searching are not interactions the user should be concerned about right now. Instead they should focus on a specific set of actions: namely, Reply, Retweet, or Favorite.
Twitter's overall goal is for you to either create tweets or interact with other tweets. By focusing you on key actions, they've reduced your cognitive load by limiting your options. You're now able to more quickly discern what actions are available to you and then what you like to do next.
A person can achieve all of the previously actions (Reply, Retweet, Favorite) from the feed. Clicking on individual tweets allows users to focus on a certain action items and/or content. Previously Twitter used to take users to a stand-alone page if you visited a specific tweet link. They've changed that now to take to the user's profile and display the tweet there. It has the advantage of focusing your attention on a particular tweet, but then allowing you to quickly exit the modal and start viewing other tweets by that user. Their goal here, again, is continued engagement. A stand-alone page is a dead-end experience.
Answer: That´s a very common implication of modals - one task at a time.
-Background to understand the context for modals.-
Applications can be too overwhelming for users and guiding them to do one thing at a time reduces the amount of workload, hence the thinking process which reduces processing times and overall experience with the platform.
Hick's Law: "The law states that the more options users are exposed to, the longer it takes them to make a decision. This means that the more options you give to users, be it products to choose or pictures to look at, the more time and energy it takes to make a decision about the next step of interaction. The possible result here is that the users make the choices but get unpleasant feelings after using the product, or in the worst case, they may not want to take such a significant effort and just leave.
That's why designers are recommended to keep any options including buttons, pictures, pages to a minimum. Removing unnecessary choices, you make the usability of the product more effective."(1)
To understand the importance of darkening the background to highlight the active modal:
Gestalt Principles: "Figure/Ground. This principle demonstrates the eye's tendency to separate objects from their background. There are lots of examples of pictures that shows two faces depending on where your eye is focused the object or background." (1)
Now regarding the specific question:
Definition of Modal: "A modal dialog is a dialog that appears on top of the main content and moves the system into a special mode requiring user interaction. This dialog disables the main content until the user explicitly interacts with the modal dialog." (2)
On the other hand
Definition of nonmodal (or modeless): "Nonmodal dialogs and windows do not disable the main content: showing the dialog box doesn't change the functionality of the user interface. The user can continue interacting with the main content (and perhaps even move the window, minimize it, etc.) while the dialog is open." (2)
So by understanding the different elements available to present information, and taking into consideration best UX habits and design principles, the main purpose of a modal is to get the user´s attention on a specific window of the platform while disabling any kind of "distracting" or unrelated elements that could create confusion or increase the processing times to complete a certain task. It is important to mention that the background of the modal still allows you to see the main page in case you need some contextual information to understand where are you standing on the platform. (e.g. you are on your profile but editing a specific element and unable to interact with other elements of your profile)
(1)https://uxplanet.org/psychology-in-design-principles-helping-to-understand-users-10bcf122f4b0
(2)https://www.nngroup.com/articles/modal-nonmodal-dialog/
Comment: **tl;dr:** Use a modal when you don't want the user thinking about anything else.
Comment: Would you mind expanding on this a bit? Why is this pattern common? How does it help the user? Do you have sources or examples? Your name indicates you might, @UXResearch ;)
Comment: @maxathousand Not sure if you get an update when I edit the question. Hope it helps :). Let me know if you would like more references or more detail.
Answer: The goal of overlays is to steer your attention towards whatever the website deems its primary action to be; e.g. sign-up for newsletter, view images, registering etc. Some sites use this as a way to block access to their content, like LinkedIn or Pinterest; you can see a glimpse of the content behind the overlay, but you are forced to do whatever the sites wants you to in order to actually start seeing the content. Other sites use similar overtaking overlays in order to fully divert your attention to the purpose of the overlay, like viewing images. The use of navigation in these cases is undesired, because they enable users to simply skip whatever is going on in the overlay.


Can I create an entirely new m-of-n multi-sig wallet with the same seed phrases as an existing one by increasing n and discarding the new seed phrase?

Question: If I were to create a 2-of-4 multi-sig wallet using the 3 seed phrases of an existing 2-of-3 wallet, plus a new seed phrase that I instantly destroy, would I then effectively have a new completely independent 2-of-3 (technically 2-of-4) multi-sig wallet that uses the same seed phrases as the existing wallet?
Answer: You would have to transfer any funds from the 2-of-3 multisig address to the 2-of-4 multisig address on the blockchain. But yes you could do this. I don't know why you would do this! Assuming the 2-of-3 can be spent using 2 of the 3 private keys (A, B and C) the 2-of-4 can also be spent using 2 of the 3 private keys because you threw away the fourth. Maybe to obfuscate the fact you are using a 2-of-3 on the blockchain? The potential benefits of doing this are minimal if not zero.
Comment: One possible reason would be if you had securely created, stored and backed up your existing seeds for a wallet containing bitcoin from a KYC exchange, but wanted to start accumulating non-KYC bitcoin in a new wallet while avoiding having to manage new seeds..
Comment: @evo_race: Ah ok, fair enough. Yeah it would be a different address but function exactly the same. If you spent from both addresses you would leak the fact that they were both using the same public keys. I don't know if a KYC exchange would notice. But while you haven't spent from the 2-of-4 address the public keys wouldn't be visible on the blockchain.
Comment: Thanks - I didn't appreciate that the wallets could be linked on the blockchain through their public keys.
Comment: Addresses can be linked once you've spent from them. Kinda fits into the address reuse thing. It isn't clear it is a multisig, it is a 2-of-4 multisig or what pubkeys it is using until you spend from that address when all of that is revealed.
Comment: Taproot and things like MuSig2, FROST improves on this.


ClassifierMeasurements Indeterminate Examples

Question: I like to use ClassifierMeasurements. It's nice and doesn't make me think too hard.  One of the features I like a lot is the Examples which lets me easily inspect misclassified examples.  Another feature I really like is the IndeterminateThreshold option.  However, when using the IndeterminateThreshold option I can't seem to figure out how to extract "IndeterminateExamples".  For example I can get three 9's accuracy with IndeterminateThreshold -> 0.89774 and there are 43 samples in each class that are Indeterminate.  If I wanted to know which sample was misclassified as 0 I could enter something like cm["Examples" -> {1, 0}].
So then, is there a way to ask a ClassifierMeasurement object for "IndeterminateExamples"?

P.S. I realize I can calculate this directly but the question is if it is possible to ask ClassifierMeasurements for this info.  It is clear from the confusion matrix plot that ClassifierMeasurements figured out which samples where Indeterminate so how do I access that information?
Answer: While Indeterminate is not a class per se, looks like it can be used with the Examples option just like a class label.  I was able to get the indeterminate samples using
cm["Examples" -> {1, Indeterminate}]


Good use of wrapper functions?

Question: What do you consider good use of wrapper functions? When are they useful abstractions and in what cases harmful and unnecessary complexity?
Answer: Good uses for wrapper functions:

Hiding the complexity of a horribly complex or unsafe, low-level API, for example, the Win32 API.  However, your wrapper must actually reduce complexity and/or increase safety for the common cases.
Making something cross-platform when you are writing a generic library or have a good reason to believe it needs to be cross-platform.

Bad uses:

Because we can.
Because maybe, at some point, we might switch to a new database in our quick n' dirty app we're writing.
Because I personally don't like the API for some bikeshed reason even though the wrapper isn't actually hiding any complexity.
Comment: I've added some examples (using C++ STL as a base case) of cases where wrapping can makes sense in my answer http://programmers.stackexchange.com/questions/71181/good-use-of-wrapper-functions/71485#71485 feel free to pick some up if you so wish.
Answer: To expand on @dsimcha answer (just giving examples) I usually wrap a number of C++ STL algorithms, simply because they are all designed in term of iterators, but I find myself calling them over whole collection most of the time.
Therefore:
template <typename RndIt>
void sort(RndIt begin, RndIt end);

Becomes:
template <typename Container>
void sort(Container& c) { std::sort(c.begin(), c.end()); }

Small gain, but still:

I cannot mess up and pass end first and begin second
It makes caller code more readable

It can also help introducing sanity checks, for example the includes algorithm can only be called if both collection are sorted...
template <typename Big, typename Small>
bool includes(Big const& big, Small const& small) {
  assert(std::is_sorted(big.begin(), big.end()) && "big not sorted");
  assert(std::is_sorted(small.begin(), small.end()) && "small not sorted");
  return std::includes(big.begin(), big.end(), small.begin(), small.end());
}

Of course using the STL in debug mode would probably perform this check, depending on the implementation... or so I can hope... but I'd rather make sure :)
And there is, finally, the embodiement of simple idioms. For example, erasing elements according to a predicate in C++ can be done using:
c.erase(std::remove_if(c.begin(), c.end(), pred), c.end());

This can be wrapped up in:
template <typename Container, typename Pred>
void erase_if(Container& c, Pred pred);

to simply caller code, and once again make sure it does not mess up the arguments/idiom.
Comment: With your fancy wrappers you seem to just duplicate what is already in boost::range.
Comment: @honk: Which I guess support my propos: wrapping is useful ;) I like Boost.Range, however it does not add the "debug" guarantees.
Answer: Just look at any template from the Spring framework
That is good wrapping in action.
They have taken all the common use cases for a wide variety of standard JEE technologies (JPA, JMS, JAX-RS, JAXB etc) and made a neat set of templates that act as simple base classes to extend from. These template classes greatly simplify the simple use cases of the libraries and allow developers to get the basics done really easily. Once you've found your feet with the required technology, then you can explore the other base classes provided which wrap the more sophisticated classes.
What makes them so good is that they all follow a very similar approach which means that once you've got the hang of one template then you have a good head start on the next.

Good use of wrapper functions?


Spring Batch Passing list of values as a parameter

Question: I want to pass list of id's as one of parameter to Spring batch. Is this possible to achieve?
Thanks in advance.
Answer: What you are trying to do is not possible.
From the JobParameter doc:

Domain representation of a parameter to a batch job. Only the
  following types can be parameters: String, Long, Date, and Double. The
  identifying flag is used to indicate if the parameter is to be used as
  part of the identification of a job instance.

You might be tempted write your list of of id's to a comma delimited string and pass that as a single parameter but beware that when stored in the DB it has a length of at most 250 bytes. You'll either have to increase that limit or use another way.
Perhaps you can explain what why you need to pass that list of ids.
Answer: If you want to pass the list from ItemReader, then you have to get JobParameters first (you have to declare your reader to be step scoped for that, see this thread also).
You will have to put your list as a parameter to the JobParameters. As JobParameters is immutable, you will have to create a new object then
List yourList = ....
JobParameters jp = (JobParameters) fac.getBean("params");
Map map=params.getParameters();
map.put("yourList", list);
params=new JobParameters(map);
launcher.run(job, params);

Answer: You cannot use the List<T> concept itself in spring-batch, but I think you can implement your intentions(listOf(a, b, c, d..)) in the following way.
The job parameter itself receives a comma-separated string of items.
@Nonnull
private List<String> someList = Collections.emptyList();

@Value("#{jobParameters['someList']}")
public void setTableNames(@Nullable final String someList) {
    if (StringUtils.isNotBlank(tableNames)) {
        this.someList = Arrays.stream(StringUtils.split(someList, ","))
                .map(String::trim)
                .filter(StringUtils::isNotBlank)
                .collect(Collectors.toList());
    }
}

Hope it was helpful for using list-type parameters in spring-batch!
Thanks.


i want to override file vendor/magento/module-theme/view/frontend/layout/default.xml in magento 2.3 porto theme

Question: I am using smartwave porto theme in magneto 2.3.2.I am new in magento.How to override this above title file.
But I checked in app/design/frontend/Smartwave/porto/Smartwave_Porto/
In above path module-theme/view/frontend/layout/default.xml  there is nothing like this.
Please not clear to me how to override this.
Answer: To override module-theme::default.xml in your current theme :
app/design/frontend/Smartwave/porto/Magento_Theme/layout/default.xml

Comment: in this case, just update the code that you need in path note above
Comment: allready i have app/design/frontend/Smartwave/porto/Magento_Theme/layout/default.xml  default.xml on this location.And this default.xml is diffrent..them how to merge on this .
Comment: vendor/magento/module-sales/view/frontend/templates/reorder/sidebar.phtml
Now i want to overright this file
but app/design/frontend/Smartwave/porto/Magento_Sales on this pathonly web and css path is exist...Then how to create and overright it..I thanks for above help
Comment: Pls can you share your mail id..I am very new to magento.If I need help then i will mail you..If your are free and willing to help .Thanks


Confusion with using product rule with partial derivatives and chain rule (multi-variable)

Question: I want to find an expression for $f''(x_1)$ from the equation below. Note that the partial derivative of the first slot and second slot of $u(x_1, f(x_1))$ are denoted $u_1, u_2$. Also, for clarification:$u : \mathbb{R^2 \rightarrow \mathbb{R}}, f : \mathbb{R} \rightarrow \mathbb{R}$ and $x_1 \in \mathbb{R}$
Given:
$\frac{\partial u(x_1, f(x_1))}{\partial x_1} + \frac{\partial u(x_1, f(x_1))}{\partial x_2}f'(x_1) = 0$.
So, what I try to do is totally differentiate the expression to get (where I try to use the product rule on the second expression and the chain rule in both):
$\left[\frac{\partial^2 u(x_1, f(x_1))}{\partial x_1 \partial x_1} + \frac{\partial^2 u(x_1, f(x_1))}{\partial x_1 \partial x_2}f'(x_1)\right] + \left[\frac{\partial u(x_1, f(x_1))}{\partial x_2}f''(x_1) + f'(x_1) \left(\frac{\partial^2 u(x_1, f(x_1))}{\partial x_2 \partial x_1} + \frac{\partial^2 u(x_1, f(x_1))}{\partial x_2 \partial x_2}f'(x_1)\right)\right] = 0$
Writing with shorthand:
$u_{11} + u_{12}f'(x_1) + u_2f''(x_1) + f'(x_1)u_{21} + u_{22}(f'(x_1))^2 = 0$
Solving, and I know $u_2 > 0$:
$f''(x_1) = \frac{-u_{11} - u_{12}f'(x_1)-f'(x_1)u_{21} - u_{22}(f'(x_1))^2}{u_2}$
I am really rusty and uncertain about how I took the derivative, can anyone confirm this is correct or have I completely butchered the operation. I am unsure about my application of total differentiation, multi-variable product rule, and chain rule.
My understanding is if you have $u(x, y)$ the total derivative w.r.t $x$ is $\frac{du(x,y)}{dx} = u_1\frac{dx}{dx} + u_2 \frac{dy}{dx}$.
Answer: As long as $u$ and $f$ are real-valued and $x_1\in\mathbb R$, this should be okay (as opposed to, say, vector fields and a vector, respectively).
Comment: Yes, sorry I should have clarified. $u : \mathbb{R^{2}_+ \rightarrow \mathbb{R_+}}, f : \mathbb{R_+} \rightarrow \mathbb{R_+}$ and $x_1 \in \mathbb{R_+}$.


Derivation of bayesian confidence interval

Question: How do you derive the expression for the $100(1-\alpha)$% bayesian confidence interval when working with the uniform distribution in the interval $[-\theta,\theta]$?
Comment: 1. Do you have a sample set of data $\{ X_i \}$?  2. When you say "the improper prior is used", which one?  Perhaps the one with density proportional to $1/\theta$? Or perhaps something else? 3. Which *credible interval* (not *confidence interval*) do you want?  [Wikipedia offers three](http://en.wikipedia.org/wiki/Credible_interval), though I don't think the third is particularly useful.
Comment: This question needs more information: what exactly do you mean by "working with" a distribution?  Confidence interval for what parameter?  Based on what data?  What prior distribution?
Comment: X follows a uniform distribution
Comment: find the CI for theta
Comment: the improper prior is used
Answer: So you have a density of:
$$p(X_i|\theta)=\frac{1}{2\theta}\;\;\;\; X_i\in[-\theta,\theta]$$
Now this is what is called a scale density, and $\theta$ is a scale parameter, just like the standard deviation in a normal distribution.
Now to do a Bayesian CI you require a prior distribution for $\theta$.  Because $\theta$ is a scale parameter, the prior describing complete initial ignorance is given by:
$$p(\theta|\theta_L,\theta_U) = \frac{1}{\theta [log(\frac{\theta_U}{\theta_L})]} \;\;\; \theta\in[\theta_L,\theta_U]$$
In your comment, you state that "the improper prior is to be used" so this means that you take the upper limit $\theta_U\rightarrow \infty$ and the lower limit $\theta_L\rightarrow 0$.  But this is in principle, to be done at the end of the calculation, and not at the start.  This is to ensure that you don't have an "infinity" floating around in your results, making them arbitrary.  If the limit does not exist, then "probability theory" is "telling you" that the actual bounds are important to your conclusion.
I assume you want to work this out for yourself, so the remainder just goes:

calculate the posterior (Note: I have used $s$ as a dummy variable to indicate that the denominator is independent of $\theta$). $$p(\theta|D,\theta_L,\theta_U)=\frac{p(\theta|\theta_L,\theta_U)\prod_{i=1}^{n}p(X_i|\theta)}{\int_{\theta_L}^{\theta_U}p(s|\theta_L,\theta_U)\prod_{i=1}^{n}p(X_i|s)ds}$$
Calculate calculate the lower bound $C_L$ and upper bound $C_U$ such that there is a $100(1-\alpha)$% probability that $C_L<\theta<C_U$.  You can do this by solving for general limits
$$\int_{C_L}^{C_U}p(\theta|D,L,U)d\theta=1-\alpha$$

This should give you enough of the "machinery" to go and solve the problem.  However, if you need more details, I can post them.
Answer: The question is not totally clear, but I am going to assume that that you have an improper prior for $\theta$ proportional to $1/\theta$ and $n$ observed points $\{X_i\}$.
A sufficient statistic is $Y=\max_i |X_i|$, and you will have
$$Pr(Y \le y|\theta) = (y/\theta)^n \textrm{ if } 0 \le y \le \theta $$
so with density $p(y|\theta) = ny^{n-1}/\theta^n$.
So using Bayes' theorem you get
$$p(\theta|y) = \frac{ny^{n-1}/\theta^{n+1}}{\int_{\phi=y}^{\infty}ny^{n-1}/\phi^{n+1} \; d\phi} =\frac{n y^{n}}{\theta^{n+1}} \textrm{ if } \theta \ge y.$$
This is a decreasing function of $\theta$ and has an integral $Pr(\theta \le \theta_0|Y=y) = 1-(y/\theta_0)^{n}$.
So there are several credible intervals for $\theta$ given $Y=\max_i |X_i|$.  The narrowest (highest density) $1-\alpha$ interval is $$\left[Y, \frac{Y}{\sqrt[n]{\alpha}}\right]$$ while the quantile centred interval is $$\left[\frac{Y}{\sqrt[n]{1-\frac{\alpha}{2}}}, \frac{Y}{\sqrt[n]{\frac{\alpha}{2}}}\right] .$$
Comment: you forgot to multiply the likelihood by the prior (or you multiplied by $\frac{1}{y}$ instead), and your likelihood has $n\frac{y^{n-2}}{\theta^n}$, when you have just written the density as $n\frac{y^{n-1}}{\theta^{n}}$.  your CI is based on $n-1$ observations, should replace $n-1\rightarrow n$ in your answer. (posterior should be $n\frac{y^n}{\theta^{n+1}}$ )
Comment: @probabilityislogic: thank you - I had indeed used $\frac{1}{y}$ rather than $\frac{1}{\theta}$.  Better now I hope.


Does deleting an answer remove the negative points to your reputation?

Question: I answered a question, but it doesn't follow with the majority's conjecture and is being downvoted.  Should I just delete my answer?  And if I do, will that reverse the negative reputation points?
Comment: Why do you assume that it's being downvoted just because it "doesn't follow with the majority's conjecture"? Maybe it's not well-supported by evidence, or needs sources, or is too short or confusingly written. When I downvote answers, it's usually through the review queues; I don't even see the other answers, so I downvote for one of those reasons, not because it's out of sync with the other answers.
Comment: If you want to try improving your answer instead of deleting it, you can make another meta post with a link to your answer and ask for advice. Since we're a small site, asking for advice and making improvements usually gets enough attention that people will come and reverse their downvotes.
Comment: I'm basically with Dimitri's answer, but it would require more work to improve your answer and to backup your claim. (I can see another detail in the pictures that hasn't been mentioned yet, which supports the other answers.) Even though I liked parts of your answer and I can see that you put considerable effort into it I will be downvoting your answer as it currently is and thus giving you a chance to earn a badge. I would be happier though to see more structure in your answer and understanding that it's not subjective bias why you received negative votes.
Comment: Thank you very much for commenting on my question.  I have gone back to the episode in question and reviewed it several times and I am now ready to edit my previous answer.  After I have done so, I will follow Torisuda's advice and post it to the Meta asking for advice.  @LiveWireBT - what did you mean when you said you were 'giving me a chance to earn a badge'?
Comment: @Jinoshio http://anime.stackexchange.com/help/badges/38/peer-pressure
Comment: @LiveWireBT - lol, thanks!  But, that's not a badge to strive for...I think.  :)
Answer: Yes reputation is restored if you delete the question How is reputation archived
But much rather than deleting, you should try to improve your answer if possible instead. You can ask for a clarification in the comments from the down voters, in the chat, or even on meta.
So while we are at it. lets review your answer a bit
The answer on it self is not that bad, but it lacks sources. A theory is good and all, but try to back it up using source materials, statements they made, visuals or even the statements the author himself has give.
If you are unsure how you could do this, then take an example on the other given answers. Whom base it on the characters hair color/length, physical traits, introduced characters and the likes.
Don't let a few down-votes get to you. Just keep on answering, and try to improve your answers as you go.


split the objects in cocos2d

Question: am having cocos2d game. in this, when player touches the screen, i want to split the sprite object in to three object.
Answer: This is a very generic question. So I'll answer it generically:
You know how to create one bucket sprite, right?
When the player touches the bucket, you just create two more (or three and remove the existing one) and set their position to the existing bucket, plus or minus some random factor or whatever you need.
Answer: The question is too ambiguous, but, from what i understand:
You should try making the sprite formed from several pieces (others sprites), when the event occurs you should just change the position of all the pieces, with some physics or something like it, depending of what do you want exectly to do.

split the objects in cocos2d


User profile accounts not being removed after filter and full sync

Question: Trying to get rid of some accounts, and the filter IS working in FIM..showing 160+ deletes.  But when I perform a search in SharePoint, these accounts still show up.  Any thoughts on what other rocks we may need to turn over?
Answer: You may also need to kick off the "User Profile Service - User Profile to SharePoint Full Synchronization" timer job. I think it runs hourly by default.
Answer: Perform full profile sync n in some cases multiple incremental run required. Also run search crawl as well to update the index...did you see the profile from central admin page?
Comment: It apparently fixed itself, so Im going with running additional incrementals.


no fine_tune_checkpoint field in pipeline.config

Question: I want to fine tune CenterNet MobileNetV2 FPN Keypoints 512x512 for object detection from: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md .
I dowloaded the tar and extracted.
The pipeline.config doen not have fine_tune_checkpoint field, so I am not able to fine tune on pretrained model.
I have two questions:-
Is there any way to add the field for fine tuning?
Is it because the output of this model is keypoints?
Answer: That field is defined as an optional in train.proto, so you can still use it.
In this case, it would be written as follows.(path of the folder should match your environment)

fine_tune_checkpoint: "centernet_mobilenetv2_fpn_kpts/checkpoint/ckpt-301"


View filter on created by me doesn't work

Question: I try to create a view in a document library which must display to the user only his documents, when I filter the view on created by= [me] it gives nothing, I have no document displayed knowing that I use sharepoint in French and so I used created by [moi] I also tried in English [me] but the same
Comment: Hi, have you tried the value as [Me] ('M' upper case)?
Comment: Check if you have any other filters on the view, that is, start with "AlItems". I have just verified in SP-online, "Created By=[Me] or Created By =[me] and found out either should work
Comment: I try it, but it doesn't work, i don't understand why
Answer: When you want to display your own documents in the view, Created By = [Me] and Created By = [me] both work.
When you want to create a view in a document library to display the document created by himself, you should use Created by = his account name.
The formula Created By = [Me] only works on filter a column based on the current user of the site.
Comment: I want that each user see only his document, so i should use Create By= [Me] i don't undurstand  why it doesn't work
Comment: Create By = [Me] only works for the current user.
For example, when you login SharePoint Online with your account, Create By = [Me] has the effect on displaying the files you have created and it has no effect on other users.
Answer: finally i found solution, in reality i should use [Utilisateur actif]  instead of [Me], now it's work


When should animation animate when scrolling?

Question: I like using animations that happen whilst visitors are scrolling down my site. In order to do this, I need to set a height for at what stage of how far down they have scrolled, to create an action to start this animation.
Currently I make it occur about 2-300px above the element to animate. I am not sure if this is really the best. Is there a set practice?
E.g. I was thinking perhaps it should be as soon as the full animation container is in view, which is a bit harder to code. Also would likely need something different for responsive.
Can anyone suggest at what stage of scrolling should an animation begin whilst moving down the page?
Answer: Maybe you could try this: http://mynameismatthieu.com/WOW/index.html
It's a .js library that works together with animate.css
Animation starts when user scrolls to the animated element. For me it's an easy solution, also works smooth.


Completely different inputs to a neural network

Question: I'm looking to train a recurrent neural network model with several different types of input vector. The data includes the input vector of an image (307200x1), an input vector of the position/orientation of one object (7x1), and another input vector of the position/orientation of another object. These vectors have nothing to do with each other, so encoding is not really applicable here. I am trying to figure out if I just concatenate these vectors and feed that as an input for the RCNN, or if I should combine 3 RCNNs, one for each vector, somehow. Each of these three vectors are capable of accurately predicting the correct output of the model, but I would like to combine this information to get even more accurate. Thank you for your time.
Answer: I assume by RCNN you're talking about a recurrent convolutional neural network.
I don't have direct experience with this type on neural network so take my advice with a grain of salt...
The 'convolutional' part of a convolutional NN is to help process the visual data. In a regular NN, there's no reason the system would suspect each entry in the 307200 x 1 vector to be related to each other, let alone be adjacent (or nearby) pixels in a 640x480 grid.
Since the locational data of the two objects has nothing to do with machine seeing and only a little bit to do with which pixels are highlighted, it makes no sense to run them through convolutional layers, so I suspect neither of your proposed solutions would be what you're after.
As to how to construct your neural network, I don't have the experience to say how it would best be done. I'm imagining a NN with a large block of convoluted nodes where the location/orientation data comes in unaltered as a second set of neurons after the convolutional layer but before the layers used for deep learning. Having said that, I have no idea how you'd do that using any of the neural network tools I've worked with.
I know this doesn't fully answer the question, but I hope it helps.
Comment: Thank you! It actually really helped. I just have to find a way to map the input of the object positions to the output of the convolutional layers, into the layer that assumes full connectivity of the neurons. I'm wondering if I would use an RCNN to output the fully connected neurons (with input to RCNN being image) and feed that output into a RNN, adding the position of the object vector on top of the output of the RCNN.


How to calculate $E[X\mid \{X>a\}]$ without measure theory?

Question: In our probability course we defined for a continuous random variable $X$ with $E[X^2]<+\infty$ and an event $F\subset\Omega$ with $P(F)>0$ that $E[X\mid F]:=\frac{1}{P(F)}E[X\mathbb{1}_{F}]$. I'm comfortable with the notion of conditional expectation and I understand that this definition is inspired by the case where $X$ is discrete, but we only defined expectation for either continuous, either discrete variables, and not for mixed variables. Is there a way to calculate $E[X\mid \{X>a\}]$ where $a\in\mathbb{R}$ and $f$ the everywhere positive density-function of $X$ without having to define expectation for non-continuous, non-discrete random variables via measure theory (its a quite elementary course)?
Comment: I would say it is impossible if you want to  exclude measure theroy as a whole. You can use as little measure theory as possible, for example you can decompose $X$ into a continuous part $X^c$ and a discrete part $X^d$.
Answer: Let the cdf of $X$ be denoted by
$$F_X(x)=P(X<x)$$
and assume that $f_X$, the derivative of $F_X$ exists.
Then the conditional cdf given that $X>a$ is
$$F_{X\mid X>a}(x)=
\begin{cases}
P(X<x\mid X>a),&\text{ if } x>a\\
0,&\text{ otherwise}
\end{cases}=$$
$$=
\begin{cases}
\frac{P(a<X<x)}{P(X>a)},&\text{ if } x>a\\
0,&\text{ otherwise}
\end{cases}=
$$
$$=
\begin{cases}
\frac{F_X(x)-F_X(a)}{1-F_X(a)},&\text{ if } x>a\\
0,&\text{ otherwise.}
\end{cases}
$$
Then the corresponding conditional density is
$$f_{X\mid X>a}(x)=\frac{d F_{X\mid X>a}}{dx}=$$
$$=
\begin{cases}
\frac{f_X(x)}{1-F_X(a)},&\text{ if } x>a\\
0,&\text{ otherwise.}
\end{cases}
$$
Finally, the conditional expectation is
$$E[X\mid X>a]=\frac1{1-F_X(a)}\int_a^{\infty}xf_X(x)\  dx.$$


Pesukim/Sayings/Thoughts for Hizuk

Question: I have a new philosophy (of course Beli Neder): never Daven before you have Hizuk. Now, sometimes I like to sing a Niggun (Shifchi by Reb Shlomo) or say some Bakashot (specifically Agadelcha by Iben Ezra). Does anyone have any special Tefilot/Bakashot/Pesukim/Sayings/Thoughts that bring Kawana in the Tefila?
Answer: Mishnah Berurah (98:1) cites Eliyah Rabbah, who in turn cites Kitzur Shaloh, that "a segulah for removing extraneous thoughts is, before praying, to pass one's right hand three times across his forehead, and each time, say the verse לב טהור ברא לי אלקים ורוח נכון חדש בקרבי (Ps. 51:12)."
However, kavanah involves more than just removing distracting thoughts; as Rema there states, one should contemplate, before praying, the greatness of Hashem and the lowliness of man. The Chabad approach to this is to study Chassidus before prayer, since these (particularly the first) are major themes developed extensively in that literature. In one of his talks (excerpted here), the Lubavitcher Rebbe zt"l indeed points out that putting oneself in this frame of mind is a vital necessity in order to be able to approach Hashem and speak to Him.
Comment: Thank you. What Chassidus are you talking about specifically? Can you specify and sources?
Comment: @HachamGabriel: I was talking specifically about Chabad Chassidus (I'm not really familiar enough with the writings of other branches of Chassidus to speak with any authority about them). There is an enormous literature of it, but some good ones to start with include: parts of Tanya (notably chs. 26-28, practical advice for overcoming negative thoughts in prayer, and 46-49, ways to develop love of Hashem), and several discourses (maamarim) by R. Schneur Zalman of Liadi, which have been recently republished with commentary and explanations as חסידות מבוארת - עבודת התפילה.
Comment: True story, the day before and yesterday I believe I did this thing correctly, and it worked. Today, I forgot to do it, my mind wasn't as settled as the days before.
Answer: Personally speaking I find several things helpful in inspiring oneself before tefilla:

Poetry often works, if one concentrates on its simultaneous meaning and eloquence. My favorites are Adon Olam by Ibn Gabirol (found at the beginning of almost any siddur), and Odeh La'El by R' Shemayahu (found in some siddurim in the "Seudah Shlishit" section). To each his own.
Many siddurim include the composition "...לעולם יהא אדם ירא שמים" or some variant of it, which I find very helpful if there is time to have extra kavanna during its recitation.
Someone else told me they like to say the "תפילות קודם התפלה" found in the beginning of many Chassidic siddurim.
Comment: Tefilot kodem ha-tefilah are very good to say.
Answer: The book:  A call to the Infinite is full of many quotes that one might want to read,say before davening to inspire them to daven.
Also, the book Kuzari, is said by R. Kook to be the essence of learning true Emunah in Hashem. (Completely unrelated to the "Kuzari proof")  The book likely has many passages that one can read regarding the special connection Jews have to Hashem and prayer. For example there is a shiur here based on the Kuzari that focuses specifically on the structured nature of prayer
Something, I think about myself sometimes, is how many things we pray for have come to fruition, and many things which we pray for have come and gone and come again.
Channa's prayer, used as the Haftorah for Rosh Hashana, the source for the way we behave in the Amida can also be of inspiration.
Comment: @HachamGabriel no problem. I just saw the link I linked to, and as a warning, the book is only quotes. There is no "analysis" or "commentary" other than the chapter headings and order the quotes are put in. It was published after his death.
Comment: Sefer ha-Kuzari, according to R' Zvi Yuda ha-Kohen Kuk (iirc), is kodesh kodashim.

Pesukim/Sayings/Thoughts for Hizuk


What tense should I use past simple or past continuous?

Question: He_____ (ride) a horse when he was a child.
She ______ (sing) in a school choir many years ago.
Answer: Past simple is used to express habitual actions, whereas past continuous is used to describe something that was in progress at the time something else happened.

He rode a horse when he was a child - habitual
He was riding a horse when he first saw her - in progress

You can also use the expression "used to" to describe a habitual action

He used to ride a horse when he was a child - habitual


An elegant way to throw global errors from a Symfony custom validator?

Question: I'm using Symfony 1.4 to allow users to import various types of CSV files, and I've decided to consolidate validation and sanitizing of the actual contents of uploaded files into a custom validator - The custom validator would extend sfValidatorFile.
Also, when a file contains errors, I'd like to throw global errors on forms, rather than displaying them as field/local errors - and - have the ability to show many validation errors at the same time for a given import file.
I'm pretty sure I can make this work by using a Post Validator, but this doesn't seem like a great fit for a Post Validator (since I really only need knowledge of one form field in order to perform my custom validation), but more importantly, I'd like something a bit more elegant that packages all of the extra validation work into a single custom file validator.
For example, instead of:
<code>$this->validatorSchema['file'] = new sfValidatorFile( … );
$this->validatorSchema->setPostValidator(new myFancyValidator( … ));
</code>
I'd just like to do something like:
<code>$this->validatorSchema['file'] = new myFancyValidator( … );
</code>
...and have validation errors encountered inside myFancyValidator added to the form's collection of global errors.
I've tried a few different approaches to push errors onto the form's globalErrors from within my custom validator, but I'm missing something regarding how the various pieces of the validation puzzle fit/scope together. Any thoughts as to how to accomplish this? Dependency injection?
Answer: Throw a sfValidatorError object in your custom validator, e.g. :
<code>if(!$isValid){
    // throw global error
    throw new sfValidatorError($this, "invalid");
}
else {
    return true;
}
</code>


How to install Emoji on linux?

Question: I am using Fedora 17. I want to view Emoji icons on my computer. Currently I am seeing square tiles on most of the symbols in this Wikipedia page. Not sure if this has got to do with Character Map and how to get the required font.
Answer: Install the gdouros-symbola-fonts package: pkcon install gdouros-symbola-fonts. Then restart your browser and that Wikipedia page should look much more interesting.
For anyone else not using Fedora, visit the Unicode Fonts for Ancient Scripts page to download these and other fonts directly from their creator, George Douros.
Comment: Though it didn't state that it contains Emoji, but it does. Thanks!

How to install Emoji on linux?


Is it possible to use multiple 3g dongles simultaneously?

Question: Im going to move to Africa and needs fast connection. Several providers have 3g. I wondered if I could buy 2 or 3 3G dongles to get the speed up? Is it possible to set this up in any software or router?
Comment: directly to your pc, yes.  I havent seen a router with USB support, with more than 1 port
Answer: You could, but it will not be as straightforward as it seems. Each USB dongles creates its own network, and it will have its own external IP address. You would then need to route calls to one interface or to the other, according to some rules, which you would need to create.
For simple cases, it could be OK: you could route everything that goes to your company via dongle 1, and all public internet through dongle 2. This can be done at operating system level without further requirements.
However, if you want to achieve load balancing, it will require some dedicated component which would route traffic through one dongle to the other. It would need to be smart enough to keep each "session" on the same dongle, because visiting a site from two different IPs, especially if you are logged in, will not work.
I found this: http://www.peplink.com/max-mobile-router/compare/ which may help you as a starting point.
Also this is an interesting project: http://arstechnica.com/information-technology/2013/10/new-router-combines-your-home-and-mobile-networks-into-one-faster-pipe/
Comment: That was very very helpful. I think a couple of powerful modems with great antennas and this product: Peplink Balance 30 Multi-WAN Gigabit Router, will make an excellent solution :-)
Comment: Hi, look at this: http://arstechnica.com/information-technology/2013/10/new-router-combines-your-home-and-mobile-networks-into-one-faster-pipe/
Comment: "visiting a site from two different IPs, especially if you are logged in, will not work." <-- this is incorrect.  Browser cookies eliminate this hurdle.
Answer: I have managed to successfully do this using two 3g broadband routers and 2 3g broadband dongles.
1. setup both routers to use the 3G dongles as normal.
2. On one router setup the wireless for bridging. This extends your wireless connect throughout your home but as a consequence it doubled my broadband speed from 1.5MB to 3Mb.
Only problem with this is its using twice as much of my metered data connection.
Answer: I'm currently on a similar situation, after some research, the best approaches I have seen so far are zeroshell https://community.spiceworks.com/topic/141349-zeroshell-foss-networking-appliance and http://speedify.com/.
I'm doing this because I live on a rural area where only mobile internet is available and I run a small business, so I need a channel to connect to my router and provide internet to my home network. Now i'm testing speedify (time constraints to go through the config of zeroshell now), basically I took and old computer, connected two usb modems and installed speedify and shared internet through RJ45 between the laptop and the router.
I just finished this set up this morning and been testing, but so far general internet works nicely (good connection for 4 laptops on normal browsing), so far the only problem seems related to "direct" connections like skype, or screen sharing, for those, the connection actually improved when we turned of speedify and connected just by on usb modem. Will add more info as I get more results.


c# Crystal reports wait cursor

Question: Using vs2008, WinForms C#.
I am using the crystal reports version that comes with vs2008.
I can create and load a crystal report. But because it can take a few minutes to load, I want to bring up a wait cursor, but am having trouble with that.
I have tried setting the
this.crystalReportViewer1.Cursor = Cursors.WaitCursor;

and tried the parent form
this.cursor = cursors.waitcursor;

The cursor changes briefly to wait mode, then changes back before the report has finished loading.
How can I best set the wait cursor before the report starts to load, force it to stay in wait mode then change it back to the arrow, only after the report has finished loading.
Answer: You would think so wouldnt you. It does seem like it should work.
But what i have found is using the "UseWaitCursor" property on the crystal report viewer results in

when loading large data amounts cursor =  arrow, screen is blank, looks like lockup
data finish loading
cursor goes hourglass
report view shows 1 sec later
cursor goes to arrow.

Basicly the busy cursor stays busy for 1 brief second before the report displays, but only after all the data has been loaded.
I found another option that finally worked for me
in summary
this.Cursor = Cursors.WaitCursor;
Load Data();
this.crystalReportViewer1.ReportSource = Rpt;
this.crystalReportViewer1.ShowFirstPage();
this.Cursor = Cursors.Default;
this process worked for me finally

c# Crystal reports wait cursor


Free-fall path into a black hole in Kruskal Coordinates

Question: If an object at t=0 begins to free-fall into a black hole from X in Kruskal coordinates (https://en.wikipedia.org/wiki/Kruskal%E2%80%93Szekeres_coordinates), what does its path on the Kruskal-Szekeres diagram look like?  Is it a hyperbola, or a straight line, or something else?
Answer: It looks like this picture on the right from Misner-Thorne-Wheeler:

It's almost a straight line.
But can I add this: I don't like Kruskal-Szekeres coordinates at all. Take a look at the picture on the left. That shows the object's path on the Schwarzschild diagram. Note how it's truncated vertically? The vertical axis is the time axis. In order to cross the event horizon at r=2M, the infalling body allegedly goes to the end of time and back$^*$. The horizontal axis is the spatial axis. Look across from right to left near where it says τ=33.3M. The infalling body is in two places at once, just like the elephant and the event horizon. Also note where the Wikipedia Kruskal-Szekeres article says this: "Note GM is the gravitational constant multiplied by the Schwarzschild mass parameter, and this article is using units where c = 1". That just doesn't square with what Einstein said: "As a simple geometric consideration shows, the curvature of light rays occurs only in spaces where the speed of light is spatially variable". You'll be aware that the coordinate speed of light at the event horizon is zero? So a light clock stops? IMHO Kruskal-Szekeres airbrush over this by effectively putting a stopped observer in front of a stopped light-clock and claiming he still sees it ticking normally.
$*$ Seriously. You can even read about this in the mathspages Formation and Growth of Black Holes: "the infalling object traverses through infinite coordinate time in order to reach the event horizon, and then traverses back through an infinite range of coordinate times until reaching r = 0 (in the interior) in a net coordinate time that is not too different from the elapsed proper time".
Answer: If we allow Hawking radiation, we can see that this time-journey cannot happen way at the boundary of a (hypothetical) developing Schwarzschild hole: the particle pairs of Hawking radiation are developed outside the event horizon; in this reference frame the particles are still just outside any possible horizon.  Hawking radiation can therefore interact with what are still 'real' particles*.  The particle is destroyed in finite time.  Schrodinger-type feline arguments that the particle indeterminately proceed through both time-frames cannot apply here, because the outcome is already known.  (That is, even if quantum jumps past infinite time or infinite energy barriers were allowed).
This argument seems to me to be robust and unfalsifiable for Schwarzschild holes.  Kerr holes are more complex, but I cannot see any reason that the argument could not be extended.  Does anyone know anything to the contrary?
asymptopitically
*Their time-development may be slowing asymptotically towards zero, but it's still progressing.


What kind of engine could the 14-15th century world create?

Question: If someone in the 14-15th century world had the knowledge required to build an engine for use in locomotives and ships, what kind of engine could be made using technology that already existed back then?
Comment: I edited your question to make it more direct and added some tags.  I will say that, while adding an engine to a ship could be a great invention in the right circumstances, building a locomotive makes no sense in a world without train tracks.  Maybe you meant something more general instead of "a powered rail vehicle used for pulling trains"?  A land vehicle?  An electric carriage?
Answer: Steam engines
Edward Somerset had a patent for one in the 1600's and Thomas Savery (1650–1715) was the inventor of the first commercially used one, which is only 100–200 years past your time frame.
But the first recorded steam engine was as early as the 1st century Egypt so the principles were known 1500–1600 years before your time-frame which means it's far from a great stretch for you to say development of steam engines that entered common usage was a little earlier in your world.
The propeller didn't come along for a while longer than that of course but paddle steamers are simply a reverse water wheel (which the Romans had) and Archimedes' screw also existed then, so that gives you two potential methods of transferring power from the engine to propel your ships.
Paddle steamers are your most likely ships, especially as the Romans already had ox powered paddle boats (there's a reference to them in the link).
A simple vertical single cylinder engine used to drive a wheel or paddle is probably most likely.
Though this horizontal design is a touch more elegant to my eye.

They'd probably be wood burning rather than coal.
Comment: Referencing the aelopile is misleading. Until you can develop *much* better materials, it's a dead end. And the working principles used are not easily applied to other approaches.
Comment: Note that Somerset's/Savery's engine isn't a steam engine as we think of it.  It's a steam *pump*, using steam acting directly on water to move the water.  If you replace the water with a piston, you now need much higher manufacturing tolerances to keep the steam from blowing past the piston.  Further, early 1700s' metallurgy was just barely capable of making parts that wouldn't blow up under pressure; I doubt that 1400s metallurgy could do the job.
Comment: @Mark a pump capable of moving water is enough for ships. In fact I am actively annoyed about how alternate history fiction insists on building complex steam engines and paddle wheels or propellers when the first step for a ship probably should be a pump working directly on the water. Historically this did not happen because our steam ships are just ships with steam engines developed for another purpose but if you write a story about using "future technology" to build superior warships in a few years... And yet everybody does what our history did but faster.
Comment: +1, but note that "the 14-15th century world" means the period from 1301 to 1500 (and presumably closer to the center of that range than the edges). So some of your figures (describing 1698 as "only 100–200 years past your time frame" and the first century CE as "1500–1600 years before your time-frame") seem a bit off.
Comment: @Mark And no, this does not really have anything to do with you or the topic. It just happens to be a pet peeve of mine so I could not resist the temptation. Sorry.
Comment: @VilleNiemi - I would like to read more about a pump used this way.  Links?  Or if this is your idea maybe chat?  It would be my first time for chat so go easy.
Comment: @VilleNiemi Would efficiency be enough anyway? And what about power per mass?
Comment: One of the problems of the earliest steam engines was their lack of power. It was James Watt idea to wrap a cooling jacket around the cylinders that increased its usability.
Answer: in the 1300s the only sources of power that could be mobile were people and animals. Using animals on ships was almost never done because it was wildly impractical to have treadmills taking up needed cargo space and food to keep them well enough fed to be able to work.
The metallurgy needed for harnessing steam was not available in this time period, now were the machining tools needed. Lathes were not invented until the late 1700s and even an expert blacksmith would not be able to make a piston using hand tools
Steam engines can be made of brass or bronze, both horribly expensive in the 13-1400s, but only in small scale, like in model engines. These materials cannot handle the sort of pressure needed to drive pistons well enough to overcome the friction of a propeller in water, and they cannot be made powerful enough for a land vehicle able to transport any great weight. Turbines .. well no .. just no.
The Conneticut Yankee in King Arthurs court took years to build the infrastructure that allowed him to build 19th century weapons and electrical equipment .. but building the entire tool chain took him decades.
so if someone with all of the needed branches of knowledge, and a wide ranging practical experience of manufacturing, does wind up in the 1350 wanting to build a ship bigger than the Santa Maria (19 m x 9 m ) he would have to be an expert negotiator and manipulator to make it happen.


Make sure package can not be deleted

Question: I have some PCs running various types of debian testing to have the latest version of a number of packages. Usually this works great for my usage, but occasionally, an apt-get dist-upgrade wants to remove packages I will keep on my PC due to some incompabilities with some upgraded packages. Can I somehow in apt.conf tell apt that a certain package should not be removed. I know about the version pinning, but I do want the package to be upgraded, if appliciable, I just do not want the package to be removed to have another package upgraded.
Answer: One solution would be to create a dummy package using equivs. See How to make apt recognize an installed tar package? for a quick how-to. Give your package the required priority and the Essential status so that apt will never ever think of uninstalling it, and declare the packages you never ever want to uninstall as dependencies of it.

Section: local
Priority: required
Essential: yes
Package: mortensickel-dependencies
Depends: package1, package2, package3-1 | package3-2
Description: Depend on my absolutely required packages
Comment: A bit more difficult that I thought - I hoped I had overlooked some settings in apt.conf - but it works, thanks.

Make sure package can not be deleted


Trouble listening to polyphonic music

Question: I heard that Mozart heard Gregorio Allegri's Misere Mei Deus once at a concert and copied it down note for note from his head. I can copy down a piece note for note if I have it in my head, but I'm really frustrated because I'm having trouble listening to more than three or four voices at a time when listening to dense polyphonic music (5-15 voices). Is still enjoy listening it to an extent, but it feels increasingly more like a reminder of my ear's incompetence than anything else. How did composers in the Renaissance listen to 8 simultaneous, independent voices? I'm wondering if there's anything that I can do to help me improve this skill.
Comment: I think that was a special talent of Mozart's. You shouldn't feel bad in any way if you can't also do that.
Comment: Agreed. I had a friend (not seen him in years) who could listen to 4 bars of any orchestral piece & immediately write it out - vertically down the pages - then another 4 bars, on an old piano-key cassette player (inc tinny speaker). I've always imagined that was rather something of a special talent. I've never met anyone else who dealt with that kind of task truly polyphonically, most will concentrate on one instrument or section, then go back to get the next.
Comment: I read one report that Mozart actually listened to that piece twice, not once, although he might not have heard the same vocal solo both times.
Comment: Relax, you're not that special. Music isn't made for parsing out, it's made for listening to and getting lost in. If you can't enjoy a piece of music without deciphering everything that's going on, I feel badly for you. It's like saying you don't enjoy eating a dish if you can't figure out every ingredient. Or focusing on every brush stroke instead of the whole painting. The artist didn't create the piece to be a puzzle for us to figure out and replicate, they created it to be taken as an expression in its entirety.
Comment: @wabisabied - I find myself unable to enjoy sandwiches at catering due to my dread - or certainty upon further observation - that the sandwich contains mayo or some other unpleasant sauce. Only if the sandwich contains no such unpleasant sauce do I enjoy it more, but I swear my dread detracts from my enjoyment and replaces it with stress.
Comment: @dekkadeci I don't like mayo, either. Kind of like I don't like autotune; its mere presence ruins any song for me. But that's different than not being able to enjoy a tune because we can't figure out how it works. The OP would be saying "I like the taste of this sandwich, but it makes me feel incompetent that my palette can't discern every ingredient, and that makes me like the sandwich less."
Comment: @Dekkadeci someone has to point out that the piece is a repetitive setting of a psalm.  There is a small amount of musical material that is applied to a large number of verses.  So hearing it twice is actually more like hearing it 20 times.
Answer: This type of instantaneous recognition and notation is really something only possible for individuals with absolute ("perfect") pitch. And acquiring that is typically only possible for young children that are surrounded my music and musical instruction from such an early age (like Mozart was) that these skills are as natural to or I speaking, hearing, and writing in our native languages.
So don't fret if you can't do this. I have a PhD in music theory, and with a single hearing I could probably get, at best, only eight measures or so of only the highest and lowest voices. (Note that I don't have absolute pitch.)
With that said, there are common stylistic patterns that composers use that could help you with this. The opening chord progression of Mozart 40 is the exact same as the opening chord progression of the opening prelude of Bach's Well-Tempered Clavier (only the Mozart is in minor), and recognizing this can quickly help you fill in outer voices even if they aren't literally what was written in the score.
A similar question could be how these composers conceptualized writing these 8 voices (not to mention 40!), which may be more in line with what you were thinking.
Comment: I have met more than one person (two, to be precise) who had perfect pitch and no musical instruction or ability.  And the capacity to transcribe music accurately by ear does not depend on perfect pitch unless you want to say that someone who can transcribe a piece in the wrong key, but otherwise accurately, has failed to transcribe the piece.  Mozart's feat was more an impressive demonstration of memory than of ear training, and the fact that the _Miserere_ is so very repetitive makes it somewhat less impressive than most people assume.
Comment: @phoog - I'd say that anyone who transcribes a piece in the wrong key has failed to transcribe it (correctly). Different remixes of the same theme in a video game series can be in different keys, for example, amplifying the need to transcribe each version correctly. An extreme example is *Mario Kart: Double Dash!!* track themes, which strongly tend to have their final lap versions be one semitone above usual, be sped up, and otherwise sound the same, including instrumentation. Transcribe them a whole tone down from in-game and those transcriptions are wrong, though.
Comment: @phoog - Granted, I've heard that people who transcribe music accurately in the correct key without absolute pitch often use an instrument and their pitch-matching skills to help out.
Answer: " How did composers in the Renaissance listen to 8 simultaneous, independent voices?"
They didn't, or at least not any better than you or I can.  The Mozart anecdote is supposed to demonstrate his unique talent.   Not to show the general level at his time.

Trouble listening to polyphonic music