Cure #1 in Brine for Brisket

Question: I'm trying for the first time to cure a second cut brisket (1.8 lbs.) to make pastrami (after curing the meat I will smoke it and then steam it). I followed a recipe from the Stanley Marianski book for a wet brine which calls for 453g (1 lb) of salt and 136g (4.8 oz) of cure #1 per gallon of water. Since I have a relatively small piece of meat, I reduced the amounts to 500 ml water, 60g of salt and 18g of cure #1. However, after I brined the meat, I started looking on line for other recipes and they all call for an amount of cure#1 much smaller than the amount recommended in the book. I understand that the amount of cure in wet brines is not the same as in dry cures as only part of the nitrates make to the meat, but I'm very concerned about safety. I have not cooked the meat yet. Can you please let me know if the recipe that I followed is safe? I didn't pump the meat but just submerged it in brine (today is day 4). Thank you!
Answer: Your question is ...did I use too much cure1...which is sodium nitrate? I dont think there is a safe and not safe limit for this..the more, the less healthy, but there is no poisoning within large margins...
Wikipedia:
Health concerns
Studies have shown a link between increased levels of nitrates and increased deaths from certain diseases including Alzheimer's, diabetes mellitus and Parkinson's, possibly through the damaging effect of nitrosamines on DNA, however, little is done to control for other possible causes in the epidemiological results.[10] Nitrosamines, formed in cured meats containing sodium nitrate and nitrite, have been linked to gastric cancer and oesophageal cancer.[11] Sodium nitrate and nitrite are associated with a higher risk of colorectal cancer.[12] World Cancer Research Fund UK,[13] states that one of the reasons that processed meat increases the risk of colon cancer is its content of nitrate. A small amount of the nitrate added to meat as a preservative breaks down into nitrite, in addition to any nitrite that may also be added. The nitrite then reacts with protein-rich foods (such as meat) to produce NOCs (nitroso compounds). NOCs can be formed either when meat is cured or in the body as meat is digested. For most people, the highest dietary source of nitrates is from fruits and vegetables and no studies have conclusively linked nitrates and nitrites to cancer or any other form of diseases. On the contrary, some research has hinted to beneficial properties of nitrites such as lowering blood pressure by slightly expanding arteries. [14] The only reason nitrates and nitrites came under such legal scrutiny is when the US Food and Drug Administration presented a brief report which stated that some adverse effect was observed on mice ("depression of growth") when their intake of nitrites was up to 90% of daily diet.[15]
Comment: Yes, I'm concerned that I used too much cure. The article from WP is about the long term effect on people of safe small amounts of nitrates assumption. This is a matter of debate. But no one argues that large amounts of nitrates assumption are poisonous and potentially lethal. With dry cures is fairly easy to calculate the amount of cure to use, as it is based on the meat weight. But when it comes to brines, things get more complicated as you don't know how much of the nitrates dissolved in the brine made it to the meat. I need some help understanding if the amount of cure I used is safe. Ty
Comment: yes, I understand you are talking about acute nitrate poisoning. You are well, well, well within limits with twice the amount of the recipe. There are no human cases of nitrate (well, nitrite) poisoning.  But nitrite is just never healthy, at any level. You clearly used more than necessary. Your choice, you wont kill anyone short term.

Cure #1 in Brine for Brisket


Seeing mode of file without listing all files

Question: I want to see the mode of file/folder foo, in the form drwxrwxrwx. I would normally do ls -lah | grep foo, but in this case the folder had so many subfolders, that it took a long time for ls to run. Is there an alternative way that would run quickly? Also I'm a bit annoyed by the use of grep, because maybe my file is called May and then every file that has a creation date in the month of May would show up? Is there a way to avoid that?
Comment: Why not just `ls -lh foo`?
Comment: You can add the `-d` flag to prevent it from descending into subdirectories
Answer: just use the stat tool:
stat filename

with this you can see all options, so with -f you could specify an own format:
man stat

Answer: As steeldriver commented, the easiest way is to use ls's -d flag:

-d, --directory list directory entries instead of contents, and do not dereference symbolic links
Answer: Call ls -l on the file/directory itself.
ls -lhd foo

If it's got a name you're not 100% sure of, use expandable terms:
ls -lhd foo*


How to get hard disk information on linux terminal?

Question: We can get CPU information using lscpu command, is there any command to get hard disk information on Linux terminal, in a similar way?
Comment: What kind of information are you looking for? Edit your question to be more specific.
Answer: If you are looking for partitioning information you can use fdisk or parted.
If you are more interested into how the various partitions are associated with the mount points try lsblk which I often use as:
lsblk -o "NAME,MAJ:MIN,RM,SIZE,RO,FSTYPE,MOUNTPOINT,UUID"

to include UUID info.
And finally smartctl -a /dev/yourdrive gives you detailed info like:
=== START OF INFORMATION SECTION ===
Device Model:     WDC WD40EFRX-68WT0N0
Serial Number:    WD-WCC4E4LA4965
LU WWN Device Id: 5 0014ee 261ca5a3f
Firmware Version: 82.00A82
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Apr  3 10:59:55 2016 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

and more.
Some of these commands need to be run sudo to get all info.
Comment: Use gdisk for GPT partitioned diska
Comment: `smartctl` does NOT work on every storage device... specially old ones
Answer: You can use lshw:
sudo lshw -c disk

But for newer kernels, i would suggest the portable and stable way of reading from sysfs:
/sys/block/sd*/device/*

Comment: Using sysfs is portable and stable??
Comment: @Otheus unless you are using archaic kernel..
Comment: I'm asking because I have no idea. There seems to be no requirement that `/sys` is actually mounted, and I don't recall seeing it on certain embedded flavors. I  also have no idea if it is declared "stable" by the linux kernel maintainers or if, as has been in the past, its interface might change from version to version.

BTW: You might want to note `/sys/block/sd*` will pick up only scsi disks. You'd have to do something more clever to figure out what block devices are actually disks, and some way to distinguish virtual from physical, eliminate loop, ram, and device mapper devices
Answer: Another one you can try in addition to what has already been suggested is:
hdparm -I /dev/sda

From the manpage:
DESCRIPTION

   hdparm provides a command line interface to various kernel interfaces
   supported by the Linux SATA/PATA/SAS "libata" subsystem and the older
   IDE driver subsystem.  Many newer (2008 and later) USB drive
   enclosures now also support "SAT" (SCSI-ATA Command Translation) and
   therefore may also work with hdparm.  E.g. recent WD "Passport"
   models and recent NexStar-3 enclosures.  Some options may work
   correctly only with the latest kernels.

Comment: By this command you can get disk's serial number even if it is connected via adapter to USB.
Answer: You can use the following command:
lshw -class disk -class storage

Comment: shows only controller info, not actual disk info


What's the difference between 早いほうがいい and 早いほどいい

Question: I know what they mean; however, I'm not sure what the difference is.
Does the difference have anything to do with formality?
Comment: I think「早いほどいい」 is 「 早ければ早いほどいい」, isn't it?
Answer: I assume that「早いほどいい」 is 「早ければ早いほどいい」, so:

早いほうがいい: it should be early/soon; if not early/soon, it's not really good.
(早ければ) 早いほどいい: as soon as possible, not early is OK.

For example:

「あなたは 歯医者へ行くのは 早いほうがいい。」: You should go to the dentist soon, if you not, your teeth will be more hurt.
「あなたは 歯医者へ行くのは 早ければ 早いほどいい。」: You booked a date to go to the dentist, the dentist says you should go as soon as possible (it depends on your schedule).
Answer: Thanks! I managed to figure it out myself tho. Both mean the same thing "The sooner, the better"
ほうが is used to compare nouns ほうが+いい which, in this case, translates lit. to sooner is better (doing sth sooner is better)
ほど can be used with different parts of speech (verbs, nouns, adjectives, etc.), and depending on what sounds natural in English it can be translated to "The sooner you do sth, the better" as well. However, there are other ways to translate it.
So, it was important to establish the context first. The person wanted to call the police, and, I believe, she said sth like "Calling the cops is our only choice" and then added 早いほうがいい which means "(Calling them) sooner (than later) is better." Omissions are quite common in spoken Japanese, right? :)
Comment: You should always add context


How to boot into emergency mode in LG ( L3 E400)

Question: How can I enter into emergency mode, using adb or command or any application, without pressing down volume button. Because, my device's volume down button is broken.
Comment: Related: [Enter recovery mode from command line](https://android.stackexchange.com/questions/21050/enter-recovery-mode-from-command-line)
Answer: After installing appropriate usb drivers, and enabling usb debugging in developer options in your device. Enter this code to reboot in recovery/emergency mode (don't know if that term is specific to your device):
adb reboot recovery you should boot into recovery mode.
If successful you should see  a number of options:

reboot system
apply update from SD card
apply update from cache
wipe data/factory reset

try navigating the options with the other vol button and power button as "enter"


what does "vertiginous game of chicken" mean and its origin

Question: Taking us behind the scenes, Paulson shows, day by day, how the U.S. government and Federal Reserve got sucked into a vertiginous game of chicken with Wall Street bankers (link)
Comment: I just want to note that the sentence you cite mixes its metaphors rather badly. First we have "behind the scenes" conjuring up acting, then we have "sucked into a vertiginous" giving us whirlpool imagery, then we have a "game of chicken" which invokes a teenage driving game from the 1950s (see http://www.imdb.com/title/tt0048545/). The editor should be chastised for not reining it all in.
Comment: Yes, George Orwell would include it in his index. http://www.mtholyoke.edu/acad/intrel/orwell46.htm
Answer: From Wikipedia:

The name "Chicken" has its origins in a game in which two drivers drive towards each other on a collision course: one must swerve, or both may die in the crash, but if one driver swerves and the other does not, the one who swerved will be called a "chicken," meaning a coward; this terminology is most prevalent in political science and economics.

Vertiginious comes from vertigo, so it's something that's whirling around, causing dizziness.
Comment: +RegDwight - why does being "chicken" mean being a coward?  It is also prevalent on the playground.  Maybe it should be its own question?
Answer: Building on the definitions cited by RegDwight, I would explain the sentence as follows.
The bankers' actions put them on a collision course with the government and the Fed.
The potential for disaster was so great that all involved got dizzy thinking about the worst possible results.


What means of publishing yields best reputation in scientific community?

Question: If a post-graduate student has three unpublished studies, one of which is expected to have a high impact index, and the rest low impact, what should the student reserve his/her best work for, in order to get best recognizement: either his/her monography, or a high impact symposium, or a high impact journal?
Answer: It is difficult to predict from where you - or any post-graduate student - might gain recognition for unpublished work, perhaps it might be useful to consider instead where the work might quite easily be published. The 'linkedin' website for professionals offers the facility to publish articles online that can be shared widely, or just to connections.
The style of write-up of studies, with findings, could be adapted to suit a larger audience without losing integrity, or confined to a chosen scientific group. I suppose whether or not this method is suitable depends on whether the concern to protect authorship of findings (quite understandable) is of more importance to the individual than the sharing of the information.
My writing on that platform differs in that I used a combination of personal professional experience and a literature search of related topics, and my absolute aim was to share information.
Good luck.
Answer: Get your best work published in the best journal you can manage.  The "best" journal will depend completely not just on your field but on your speciality and the school of thought you subscribe to.  Ask your colleagues if you're not sure.
Also apply to present your paper (published or not) at the best conferences you can get accepted to that you can manage to go to (again, "best" will differ depending on the specifics of your work).
You do not have to choose if your paper gets published or gets a talk.  Do both.  You can also do multiple talks.  If you can, get all 3 studies published (either as 3 separate papers, or as 1 or 2 papers, depending on how related they are and how your field handles it).  Even if they are 3 separate papers, it might make sense to put them together for your conference presentations (again, ask people in your field for guidance, as this varies a lot).
Remember too that, if there is a different in best journals/conferences between where you got your degree and where you want to get a job, aim for the latter.  Conferences are the best place to find contacts that will get you post-docs and other jobs.  Good luck!


How to cluster a large movie dataset ??

Question: I have to cluster a movie dataset of 10000 movies. A movie has attributes like Genres, Actors, Directors, Year. Earlier I thought that we can use a simple clustering algorithm like k-medoids and the distance can be pre-computed between two movies by subtracting genres & actors.
<code>Initialise
d(movie1, movie2) = 0

d(movie1, movie2) -= number of common genres
d(movie1, movie2) -= number of common actors
d(movie1, movie2) -= 1 (if they have a common director)
d(movie1, movie2) -= 1 (if they belong to same decade)
</code>
Is this approach correct ? Is k-medoids fast enough to cluster this dataset (I doubt it isn't) ? If it isn't fast enough any better clustering algorithm and strategy to cluster this dataset ?
Answer: Distances have to be non-negative.  Your distance metric leads to a negative distance value, which is not allowed.  A better distance metric would be "the number of genres where they don't agree, plus the number of actors where they don't agree".
As far as how well this will work, the only way to find out is to try it and see.

How to cluster a large movie dataset ??


I didnt received funds into my wallet

Question: Funds were sent from another wallet to my wallet, but i didnt received the funds, please help
Comment: Which wallet sent, and which wallet received?
Comment: You must be more specific to indicate which wallet you use to receive the transaction you can also see in the block browser the address that you have used
Answer: There are many possible explanations and many possible ways to investigate
Possible causes

The sender mis-typed the receiving address. This is hard to do if the
sender scanned a QR code. There are usually checksums built in that
make it hard to get a mis-typed address accepted. Nevertheless it is
possible

You gave the sender a different address than the one you think you did.
This can happen as many wallets issue a different receiving address
for each transaction.

You accidentally gave the sender the address of a wallet that uses
a different crypto-currency than the crypto-currency the sender sent.
This is fairly common. It is arguably too easy to confuse Bitcoin cash
for Bitcoin.

The sender didn't pay a sufficient mining fee

Your wallet is no longer synchronising

You didn't wait long enough

Fraud

If you are using a web-wallet where you depend on a third party, there are also a lot of other ways in which things can go wrong. Especially if the
provider of the service aggregates transactions. (This is one reason I would prefer to use a standalone wallet).
Ways to investigate.

Go to a blockchain explorer website and enter the transaction-ID.
Do the same for the receiving address. Check that your transaction appears.
Check that everything is as you would expect it to be.

Re-check the address you used, letter by letter. re-check the currency.

If your wallet is hosted by a third party, raise the issue with their
customer support service.

I didnt received funds into my wallet


Can Scotland secede without permission from London?

Question: Can Scotland secede without permission from London, from the standpoint of international law? There's a thing called "the right of a people for self-determination". I wonder whether it's applicable to Scotland. Could they carry out a new referendum regardless of what Boris thinks on the matter?
Comment: Why was my question downvoted?
Comment: "There's a thing called "the right of a people for self-determination"" Are you trying to refer to a specific law here?
Comment: How specific does the right of self-determination get?  Scotland already exercises that right as part of the Parliament of Westminster - if Scotland has the right to secede from the UK under that right, does Glasgow equally have that right to secede from Scotland?  How about a smaller town or village?
Comment: No, there is no Article 50 equivalent. Section 30 of the Scotland Act 1998 requires permission from the UK government for a referendum to be held. This was denied 2017 and 2019. [Could Scotland hold a referendum without UK permission?](https://theferret.scot/scotland-second-referendum-westminster-section-30/)
Answer: There are two major relevant judicial decisions: the International Court of Justice's advisory opinion on whether Kosovo's unilateral declaration was in accordance with international law, and the Supreme Court of Canada's opinion on whether Quebec had the right under international law to unilaterally secede.
Judicial opinions aren't terribly common, because questions of secession are usually handled through force of arms. Although the Canadian decision was made by a national court, it's considered a significant work of reasoning and is often cited on this issue (for instance, it was heavily cited in briefs before the ICJ).
The ICJ held that Kosovo's unilateral declaration of independence was in accordance with international law. However, this did not mean that Kosovo could unilaterally secede. As the ICJ noted, they were not asked what the legal consequences of the declaration were and they were not asked whether Kosovo was independent. They were only asked whether making the declaration violated international law. The ICJ found that in general international law does not prohibit unilateral declarations of independence. In particular situations they might violate other rules of international law (e.g. if they're tied to an unlawful use of force or violation of peremptory norms), but in general a unilateral declaration of independence is not illegal. Again, though, the ICJ took pains to emphasize that they were not making any decisions about the right to secede. The case was only about announcing that a country was seceding.
The Supreme Court of Canada's ruling, in contrast, was about whether actual secession was allowed. The court found that it was not, under either Canadian or international law. While international law creates a right to self-determination, that right typically only justifies secession in colonial empires. In general, a people is meant to achieve self-determination in the state they reside in. When a people is fully integrated into the life and governance of their state, they are not being denied self-determination. They might not always get what they want, but if two people disagree then someone is always going to be disappointed. The court held that

A state whose government represents the whole of the people or peoples resident within its territory, on a basis of equality and without discrimination, and respects the principles of self‑determination in its internal arrangements, is entitled to maintain its territorial integrity under international law and to have that territorial integrity recognized by other states.
Comment: Would you say that previous events in Catalonia also relate to this?
Answer: No; the UK Supreme Court, in its judgement on the reference by the Lord Advocate regarding whether the proposed Scottish Independence Referendum Bill would refer to reserved matters, specifically ruled on the self-determination argument put forward by the Scottish National Party, as intervener, at paras 88-90.
It first refers to the Supreme Court of Canada's judgement in the Reference re Secession of Quebec [1998] 2 SCR 217, where the court "explained that Canada was a sovereign and independent state conducting itself in compliance with the principle of equal rights and self-determination of peoples and thus possessed of a government representing the whole people belonging to the territory without distinction. It considered that the then current constitutional arrangements within Canada did not place Quebecers in a disadvantaged position within the scope of the international law rule." It continued:

In summary, the international law right to self-determination only
generates, at best, a right to external self-determination in
situations of former colonies; where a people is oppressed, as for
example under foreign military occupation; or where a definable group
is denied meaningful access to government to pursue their political,
economic, social and cultural development. In all three situations,
the people in question are entitled to a right to external
self-determination because they have been denied the ability to exert
internally their right to self-determination. Such exceptional
circumstances are manifestly inapplicable to Quebec under existing
conditions.

The UK Supreme Court took the position that this applied equally to the case of Scotland, saying:

[These observations] are also consistent with the United Kingdom's
submission to the International Court of Justice in the case of
Kosovo, adopted by the intervener as part of its submissions in the
present case: "To summarise, international law favours the territorial
integrity of States. Outside the context of self-determination,
normally limited to situations of colonial type or those involving
foreign occupation, it does not confer any 'right to secede'": Written
Proceedings in relation to UN General Assembly Resolution 63/3
(A/RES/63/3) (8 October 2008), Written Statement of the United Kingdom
in response to the Request for an Advisory Opinion of the
International Court of Justice on the Question, 'Is the unilateral
declaration of independence by the Provisional Institutions of
Self-Government of Kosovo in accordance with international law?", (17
April 2009), para 5.33. The submission went on to state that
international law does not, in general, prohibit secession; but the
relevant point, in relation to the intervener's submission based on a
right of self-determination under international law, is the absence of
recognition of any such right outside the contexts described by the
Supreme Court of Canada, none of which applies to Scotland.

It concluded by observing that the power delegated to Scotland under the Scotland Act "establishes and promotes a system of devolution founded on principles of subsidiarity", and does not constitute a breach of the principle of self-determination in international law.


Why "vacuum" in vacuum Rabi splitting (VRS)?

Question: What is the role of "vacuum" in vacuum Rabi splitting (VRS)?
Also, does VRS arise because of quantized nature of light?
If not, what is a semiclassical explanation for VRS?
Answer: Vacuum Rabi splitting is about an initially excited atom in a cavity which spontaneously emits a photon into the cavity. The photon's wave-function propogates to the end mirror(s) is reflected and then comes back and interacts back on the atom. Theoretically there are two parts of this process that requires (at least in principle) a quantized electric field.

An atom in an excited eigenstate is a stationary state (i.e. doesn't change in time). You only get spontaneous emission if the atom is coupled to a quantized EM field. Sometimes this is described with the picture that 'vacuum fluctuations cause the spontaneous decay.' A more complete description is that the energy states of the atom alone are not eigenstates of a quantum atom+field, and thus an excited atom won't stay that way.
If you describe the atom quantum mechanically (i.e. correctly), then a single excited atom will only emit a single quanta of energy or single photon, which is a non-classical state and thus requires (at least superficially) a quantum field description.

Now if you ignore these two essentially quantum aspects of the EM field, the rest can be described semi-classically. Specifically the propagation of the single photon wave-packet that is emitted by the atom can be fully described by classical EM theory (Maxwell's equations).
Comment: Does this mean, we won't see any VRS if the atom is in ground state? Also the probe beam for VRS can be a coherent laser beam (Not quantised). And also what if the solid angle subtended by the mirrors on the atom is very small, then the spontaneously emitted photon will be lost most of the times.
Comment: Rabi oscillations (RO) is about energy flowing coherently between atom & field. So no energy = no oscillation.
Coherent beam doesn't change things but details depend on what beam's for, e.g. driving normal RO w/1 atom leads to photon subtracted coherent state (which is still non-classical).
Details of cavity matter, but solid angle isn't most important factor. High Q cavity close to atom resonance gives strong coupling which greatly enhances spontaneous emission (SE) rate into that single mode via Purcell effect. The smaller SE rates into other modes is source of decoherence & damping of RO.
Comment: I still don't see the need for Vacuum. And even when the SE is not greatly enhanced there can be VRS.  For example, In this [article](http://journals.aps.org/pra/abstract/10.1103/PhysRevA.87.033832) . And we can have RO without cavity too.
Answer: Taken from Nature Physics 2, 81 - 90 (2006):

If the coupling strength between two same-energy oscillators exceeds the mean of their decay rates, then the coupled system has two eigenenergies — that is, their states split. VRS occurs when one of the oscillators consists of a two-level atom or QD, and the other is that of a small-volume high-quality (high-Q) cavity. The name comes about because the VRS is numerically equal to twice the product of the transition dipole moment and the vacuum field arising from the root-mean-square of the vacuum fluctuations (zero-point energy of half a photon energy in the cavity mode). The term VRS is also used when the matter involves more than a single oscillator; for example, there is VRS due to many atoms or to a quantum well (QW). A simple way to understand VRS is to insert the QD or QW absorption and refractive index into the formula for the transmission of a Fabry–Perot interferometer; the transmission becomes double-peaked if the absorption is strong and narrow enough.


How do I rectify a distorted aerial image in QGIS?

Question: When I place an aerial image in QGIS 3.4.15 it becomes distorted (in the attached the left image is correct, the right image is distorted).  How to I rectify this?
Answer: The image is being reprojected on-the-fly to the map Coordinate Reference System (CRS), which is not the same as the image CRS.
You can change the map CRS with the Project ~> Properties ~> CRS setting.
If you tick on No projection, all data will be displayed without being reprojected.
Or you can get the raster layer CRS by selecting it and checking the Layer ~> Layer Properties ~> Information ~> CRS data. Then you can set the same CRS to the map (project).


Multiple filter criteria in one exposed filter

Question: I'm trying to create a view with two exposed filters, one for category and one for time. I got the category done (read about it here), but I can't get the time filter to work.
My idea is to make an exposed filter with 4 different dates in (all, day, week and month).
At the moment I've made 4 different "Content: Post Date" with different times (<= +1 day and so on) that I want to put in an exposed filter so when I use it, I can only choose one of the 4 different filters from a list (like I've done with the categories).
So the question is: How do I put multiple filter criterias into one exposed filter?
or Is there a better way to do this?
Best regards,
Alexandberg
Edit:
Found this thread where someone got a similar problem to me, but the thing is that I don't really understand what to do with the code in the answer. It says that I need to put the hook_form_alter in a custom module, but some help with that would be great.
Answer: You should use the new Grouped Filter functionality in Views 3.5. It allows you to do exactly what you're looking for.


Can't find right LLVM in MacOS

Question: I use Lion, have the latest xcode installed. So I believe that I have llvm, clang, and gcc4.2(because in xcode I can use them). Then I installed eclipse for c++ developers, after that I installed plugins llvm4eclipsecdt, and a set of plugins for parallel applications development (ptp). Ok. I built my code in eclipse. When I try to run it, it returns error Launch failed. Binary not found, although I specified Match-O 64 Parser in options. Perhaps, I should have specified where to find llvm as well(?).
In the debug folder there are files *.bc. I suppose it means llvm binary codes. I try llv main.bc but llv is not found! However, clang is installed and there are some strange files in the same folder like llvm-gcc-4.2 (another front end for llvm), llvm-g++ and so on. So where can I find llvm which I can use in console and specify this path in LLVM's plugin options in eclipse?
Answer: I don't know about the rest of the eclipse specifics but you probably wanted 'llc' not 'llv'. You'll find the binaries under /Developer. You generally don't want to run llc by hand though.

Can't find right LLVM in MacOS


How to ensure if a MySQL backups are consistent?

Question: How can we ensure if MySQL backups are consistent when they are in full backups as well as in incremental backups using binlogs. According to me, I just take random count(*) tables after issuing flush logs on the database. And take binlogs generated until that flushed binary file and ensuring the table is not altered while doing select count(*) . And then restore the binary logs in different database server and cross check count(*) for the random tables are same or not against prod db and restored db. Any other thoughts other than this? Keep in mind that hits from application to tables can be paused only for few mins.
Answer: Take a look at pt-table-checksum. It's written for replication, but maybe you can adapt it for offline use with your master/restore server.
Comment: I don't think it can measure the Production live DB updating instance with restored silent DB instance in run time where it causes checksum differences always. Moreover I was looking for some options within mysql itself. I guess I will stand on my approach for the consistency check.


how to use upstart?

Question: I have a django app that i am looking to deploy. I would like to use upstart to run the app.
So far I have added the upstart.conf file to /etc/init
and tried to run it using
start upstart

but all i get is
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.90" (uid=1000 pid=5873 comm="start upstart ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")

the contents of the .conf file are:
# my upstart django script
# this script will start/stop my django development server
# optional stuff
description "start and stop the django development server"
version "1.0"
author "Calum"

# configuration variables.
# You'll want to change thse as needed
env DJANGO_HOME=/home/django/django-nexus7/nexus7
env DJANGO_PORT=8000
env DJANGO_HOST=0.0.0.0 # bind to all interfaces

# tell upstart we're creating a daemon
# upstart manages PID creation for you.
#expect fork

pre-start script
chdir $DJANGO_HOME
exec /usr/bin/python rm sqlite3.db
exec /usr/bin/python manage.py syncdb
exec /usr/bin/python manage.py loaddata fixtures/data.json
emit django_starting
end script

script
# My startup script, plain old shell scripting here.
chdir $DJANGO_HOME
exec /usr/bin/python manage.py run_gunicorn -c config/gunicorn
#exec /usr/bin/python manage.py runserver $DJANGO_HOST:$DJANGO_PORT &
# create a custom event in case we want to chain later
emit django_running
end script

i have also tried using a much simpler .conf file but have come up with more or less the same error.
Would really appreciate it if someone could give me an idea of what im doing wrong
Comment: What's with the `python rm`, is that valid and correct?
Answer: Upstart jobs can only be started by root, and that error appears if you try to start one as a normal user. Try this:
sudo start upstart

how to use upstart?


Scale camera to fit screen size unity

Question: My background and gameobjects are 2d sprites not UI images ,I want to know how to make my background scale with screen size and positions of 2d sprits on it don't change after building game (webGl) like scale canvas with screen size and anchor points in UI elements .
Before building the game
After building
Comment: It looks like your content has scaled perfectly to match the height of your display area. Would you like it to scale to match the width instead? Note that this will mean you show more area above and below the currentlt displayed content, which depending on your setup might reveal gaps or require letterboxing.
Comment: I want to make it to match  the width like it match the height of my display area. and don't display the blue area of the camera
Answer: You can adjust the camera's height so it scales with the width of the screen like so:
(Place this script on your Camera object)
<code>[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
public class MatchWidth : MonoBehaviour {

    // Set this to the in-world distance between the left & right edges of your scene.
    public float sceneWidth = 10;

    Camera _camera;
    void Start() {
        _camera = GetComponent<Camera>();
    }

    // Adjust the camera's height so the desired scene width fits in view
    // even if the screen/window size changes dynamically.
    void Update() {
        float unitsPerPixel = sceneWidth / Screen.width;

        float desiredHalfHeight = 0.5f * unitsPerPixel * Screen.height;

        _camera.orthographicSize = desiredHalfHeight;
    }
}
</code>
If you're using a perspective camera, then instead you'd use...
<code>public float horizontalFoV = 90.0f;

// ...

void Update() {
   float halfWidth = Mathf.Tan(0.5f * horizontalFoV * Mathf.Deg2Rad);

   float halfHeight = halfWidth * Screen.height / Screen.width;

   float verticalFoV = 2.0f * Mathf.Atan(halfHeight) * Mathf.Rad2Deg;

   _camera.fieldOfView = verticalFoV;
}
</code>
If you want to shrink your viewport to add letterboxes instead of showing additional height above/below, you can use the technique described in this answer.
Comment: I suspect you don't wanna do this in Update, but rather with every orientation change, window resize, etc.
Comment: Is there any drawback to using this script to always scale my camera rather than having to write flexible code all the time? I don't see why this isn't a built-in way to apply this technique in-engine.
Comment: I'd suspect it's not built-in because it's trivial to write for ourselves in the rare instances when we need it. An event-based approach would be a bit more efficient than the update polling I show above, but overall the cost of this script should be very minor.
Answer: Using 2D, you likely don't want to manipulate the camera. I recommend adjusting the scale of the background object (container or sprite).
<code>[SerializeField] private Camera mainCamera;
[SerializeField] private SpriteRenderer spriteRenderer;

private void Start() {
    var spriteBounds = spriteRenderer.bounds; // Sprite to fit viewport
    var worldScale = mainCamera.ViewportToWorldPoint(Vector3.one);
    var localScale = 2 * Math.Max(
        worldScale.x / spriteBounds.size.x * transform.localScale.x,
        worldScale.y / spriteBounds.size.y * transform.localScale.y);

    transform.localScale = new Vector3(localScale, localScale, 1);
}
</code>
You can apply this script to the background sprite itself or to a container which holds the background sprite.
Answer: I think if you decrease the scale size to 1x from above the Game view, it will fit.

Scale camera to fit screen size unity


Understanding as conceptual

Question: I am looking for references in the literature where people equate the process of understanding with conceptual activity. I will not be able to sketch it out exactly. My hunch is that there should be people who argue that understanding is a matter of finding the right concepts to apply to phenomena. I know that conceptual engineering people do this, but who else? Are there any references that you would be so kind as to give me which can serve as a reference for me to refer to when I discuss a stream in the literature who argue for this thesis?
Comment: See [Uunderstanding](https://plato.stanford.edu/entries/understanding/) and [Knowledge How](https://plato.stanford.edu/entries/knowledge-how/)
Comment: ^^^^^ -- a nice exposition of "know how" this is the classic https://en.wikipedia.org/wiki/What_Engineers_Know_and_How_They_Know_It
Answer: The basic sketch in philosophy goes like this:
There are minds that emerge from brains. Minds have intentionality which is best understood in terms of representations. Minds think, and thoughts are conceptual in nature. As someone speaks, concepts express propositions which have truth-conditional semantics and are metaphysically "translated" into utterances, sentences, or language. Philosophers claim the domain of expertise in concepts and particularly after Frege's Begriffsschrift and the linguistic turn, analytical philosophers are concerned with the philosophy of language itself. One seminal work in Continental philosophy on concepts is Deleuze and Guatari's What is Philosophy?
Right off the bat, if you're a computer guy like me, and you have an interest in philosophy of mind, you have some interrelations about how representations, understanding, and language inter-relate. Thought is imputed to be an activity of the mind which is generally conceived of as representational (SEP) and modular (SEP). If you take thought as primarily an activity of computation, then you are dealing with the Computational Theory of Mind (SEP). If you find that model agreeable, then you are probably amenable to the idea that computation has a physical aspect (SEP). So, if you read those articles, you'll have four sets of references from which to expand your reading list.
Besides the AI subdiscipline of knowledge representation and engineering, in computer science, the former discipline of computational linguistics has broadened into natural language processing. In NLP, a lot of work is being done in the spirit of the Montague Grammar. More contemporary is Ranta's type-theoretical grammar (GB) and that aligns with the idea there is type-theoretical semantics (GB). My current go-to for a conceptual model of conceptualization is the eminent Ray Jackendoff's Foundations of Language. He has a section in his book that deals with conceptualization from a physicalist perspective.
Of course, there are less linguistically rigorous approaches to understanding the mind and conceptualization, including those that don't lean heavily on physicalism. The big alternative is phenomenalism starting with the phenomenology of Husserl. He took what Kant produced and created, as far as I'm concerned, the Continental tradition that examines 'mind', 'language', and 'concept'. I'm clueless about those sorts of traditions. I know that I like philosophical anthropology as an approach, but I'm not sure how they deal with the concept 'concept'.
That should get you started.

Understanding as conceptual


Is it theoretically possible to burn fat without any training only based on diet?

Question: Suppose a person(who doesn't do any sports) changes a diet, so that it has a "right" ratio of protein, carbs and fats, and a small carbs deficit. What will happen next? will he lose fat or muscle or both?
Answer: What do you mean by carb deficit? There is no carb requirement level that you can be over or under. You can eat 80% carbs or 0% carbs and be fine.
If your total intake of calories is less than your total calorie use, you will burn fat, even if you lie in bed all day.
Wether you lose fat or muscle depends on your current amount of muscle, on your level of exercise, on your genes and on your calorie deficit. Having a lot of muscle mass makes it harder to maintain it, more exercise will tend to increase muscle mass, good genes gives you more muscle mass and if your calorie deficit is large enough, you will lose large amounts of muscle mass . You can only burn about 500-1000 kcal worth of fat per day, the rest of your deficit will be balanced by breaking down your muscles, and muscles are only about 700kcal/kg compared to 7000kcal/kg in fat, so you lose that mass fast!
Comment: then what will happen if you stay on small calories deficit for a long time and body fat reaches low percentage?
Comment: Well as you lose weight, your calorie need will decrease due to lower body weight and the bodies tendency to favour a certain weight. If you keep the calorie deficit constant, i.e. decrease your intake, your body fat will decrease (although slower and slower), you will get hungrier for the same deficit, making it harder, and eventually you die.
Comment: _You can eat 80% carbs or 0% carbs and be fine._ - I'm not sure this is accurate.  A diabetic may disagree with you.
Comment: Yeah but diabetics are not the standard case, they have a disrupted metabolism. Healthy people can eat large amounts of carbs without any problems. The traditional Okinawa diet was 85% carbs and they live to be a 100 years old! As long as we're talking glucose based carbs and not alcohol or fructose, carbs are fine.
Answer: You can check this outsanding things to make a perfect diet http://xs.gy/fatburningguide
Comment: But don't though...


Is it fard to recite dua ma'thur ( دعاء مأثور ) before finishing the prayer?

Question: Is it fard to recite dua ma'thur before finishing the prayer? The dua that is recited just before finishing the prayer. I once read it is optional.
Comment: I have no idea what du'a masura is, so it would be helpful to tell us the wording. it is always best to perform the prayer in the way our Prophet pbuh showed us. Note that he even taught us different wordings. But you can say what ever is called a du'a with some specifications in the schools of jurisprudence.
Answer: The Dua after the last tashahhud \ durood is a sunnah and is neither a rukn nor fard according to any of the four schools.
The Dua should be ma'thur (لدعاء المأثور) according to the Hanafis, but that is not necessary according to the others.
Ref: Al-Fiqh ala Al-Madhahib Al-Arbaah [En] , Fiqh al-Islami wa Adillatuhu [Ar]

Is it fard to recite dua ma’thur ( دعاء مأثور ) before finishing the prayer?


When was *sila* first interpreted/translated as ethics?

Question: I am curious about the idea of calling sila (all precepts and vows) as ethics. When did this translation appeared? Or who interpreted sila as ethics or something similar to ethics? This is not to say that it is incorrect or comprehensive, but ethics as a western category of thought has been used as an auxiliary concept to understand sila. Which scholar/s did this?
Answer: From the very little I know of history it was the Pali Text Society who made the earliest surviving translations into English and the earliest dictionary.
A copy of the PTS dictionary is online here -- https://dsal.uchicago.edu/dictionaries/pali/ -- though this seems to be the latest (2001) not the earliest (1874) version.
The dictionary's entry for sīla is here -- https://dsal.uchicago.edu/cgi-bin/app/pali_query.py?page=713 -- "ethics" is a part of the definition but only a part.
I think that's normal:

That any word has no exact translation -- which is why people try to learn to understand the original word or language

That a translator tries the convey the sense of it by giving several 'related' English words.
Often the several words (in a dictionary definition) give a better or closer explanation than any one single-word translation, which is part of why a dictionary can be interesting. When translating a text the translator usually needs to choose single-word translation to make the result read like English -- so different translators might translate a text differently, etc.

I don't know "the western category of thought": I never studied it academically, so I can't comment on that. If instead you translated sīla as "virtue" or "moral conduct", I'd say those means approximately the same thing, to me they're near-synonyms.
The word exists in Sanskrit -- https://www.wisdomlib.org/definition/shila -- I presume people began to translate that earlier than Pali, e.g. Thomas William Rhys Davids studied Sanskrit at a university in Germany, as a teenager.
Comment: A couple ideas to consider: (1) The volume of the teachings is such that they are probably sufficient to guide us to full liberation. The seeming absence of fully liberated beings in the world suggests mistranslation. (2) The intended meaning of terms can be more accurately ascertained by testing our hypotheses against the full contextualized usage of them by the Buddha. If the hypothesized meaning is inconsistent with the usage in a single instance, it is unlikely to be true and should be corrected to be consistent with all such usages. This might be a fun project to crowdsource.
Answer: Bit of a pedantic question I guess but morality, moral discipline, ethics, ethical conduct, these are all synonymous.
While in actual definition ethics is different from morality but the idea of the moral discipline, like not killing is a result on understanding ethics, and having ethics.
If one only does not kill simply because "Buddha said so" or "I practice the 5 precepts" or "I made a vow not to kill" that is just practising morality.
Being ethical, i.e having ethics that would not allow you to kill another being is a separate phenomena, and I would guess is the essential meaning of the moral discipline.
So the word ethics is better suited as a whole.
Still this is a triviality of semantics, understanding the concept is the more important thing.
Comment: Yes it's trivial, but perhaps it's the other way, morality is having concern (a conscience), while for example, following Buddha blindly for salvation is only an ethical framework...thus morality is more pure than ethics


Correlation, Scatter graph

Question: I have river flow rates for two separate rivers
The data produced this scatter graph for both rivers

https://i.stack.imgur.com/cj7MZ.png
What is the best type of correlation to use here?
Spearman, Pearson or Kendall?
Comment: Your various questions overlap mightily. See e.g. https://stats.stackexchange.com/questions/371994/pearson-spearman-or-kendall-correlation where you presented the same graph, there claimed to be for temperatures. Here correlations would make much more sense for logged "flow rates" (as commented earlier, that could mean discharge or velocity; it's best not to use ambiguous terms).
Comment: First, since both quantities shown here are non-negative, personally I'd logarithm both of the axes before computing any correlation.
Comment: @user2974951 Pearson correlation works, but is not especially meaningful without change of variables.
Comment: @NickCox The other link is missing.
Comment: @Carl It's now a deleted question, its visibility dependent on reputation.
Comment: Pearson should work fine.
Comment: It will be good to add labels on the axes.
Answer: For this particular problem, Spearman rho, apart from noise, will be larger than Pearson correlation until the logarithm of both the $x$ and $y$ values are taken. Since logarithms do not change ranking order, taking logarithms will not change the Spearman rho correlation (stet; zero change), but the Pearson correlation will improve markedly. Here is an example of improved Pearson correlation from log-log transformation of fan-type data from Wesolowski CA, Babyn PS, Puetter RC. An improved method for determining renal sufficiency using volume of distribution and weight from bolus Tc-99m-DTPA, two blood sample, paediatric data. Nucl Med Commun. 2006;27:963-70. doi:10.1097/01.mnm.0000237988.52572.2c.

That is, the Pearson correlation is higher for the linear case with homoscedastic residuals, and the Spearman rho correlation, in effect, converts the problem into the equivalent of a linear homoscedastic one.
The Kendall rank coefficient would be used in a slightly different, if not entirely different, context. The Kendall rank coefficient is often used as a test statistic in a statistical hypothesis test to establish whether two variables may be regarded as statistically dependent.
There are, however, other considerations. The example given in this answer is probably somewhat more deterministic than the river flow question, that is, it shows in semi-closed systems (pair-wise human bodies), how pair-wise volumes of distribution of a drug and subject masses covary. There are, however uncontrolled variables, e.g., subject to subject variable metabolic-scaled clearance of the drug, varying patient fluid disturbance pathophysiology, modeling error, etc. The river example in the question is clearly  moderated by external variables in a mostly open system; two rivers in separate geographic locations with different topography, rainfall and rainfall collection systems (e.g., ponds), cloud cover and possibly different snow melt, i.e., temperature and or climate considerations. Thus, the correlation obtained in the river correlation case is more clearly driven by unspecified causal, or linking variables such that the meaning of the correlation is at best indirect without also examining those factors.
This difference between the two problems can be stated more crisply as follows. In the first case, it is reasonable to postulate that increased body mass is roughly proportional (causally) to the fluid volume of distribution of drug. In the second case, the flow in one river does not cause the flow in the second river, that is, if the rivers are physically different (thus independent) the flow in them can only covary roughly proportionately if similar filling and emptying of those systems occurs simultaneously. The simultaneity requirement is also not an especially useful requirement, as a lag time, seasonal time series analysis and other processing may be more useful.
Note to OP: Although not strictly necessary, it would be nice to label the rivers 'A' and 'B' and put the units of flow in, e.g., cubic feet per minute or cubic meters per second, because one user requested this and because larger rivers may have more similar flows than smaller ones in similar geographic locations.
Comment: On hydrology: topology in the sense of network topology might have secondary importance, but in essence I think you mean _topography_. You are right on flow rate units,  and indeed scaling by area too might make sense.
Comment: Thanks @NickCox, indeed, the meaning is topography.  Changed it.

Correlation, Scatter graph


Current amplification for Raspberry PI4 powering

Question: I need to power the Raspberry PI4 from my embedded system so i used a DC/DC regulator(https://www.sparkfun.com/datasheets/Components/LM7805.pdf) from a bipolar power supply composed of two 9v batteries the DC/DC regulator gives as output 5V and 1A but for the raspberry PI4 I need 5V 3A.Can anyone propose for me a solution to amplify the current or its ok to give the raspberry PI 1A as input current.I am new in this field.Thank you for the help.
Comment: 1A is not enough. It might turn on but you'll run into problems. Usually Raspian will show a little lightning bolt on the top right corner to warn you if you're not supplying the Pi can't get enough current from the supply.
Answer: The common 9 volt rectangular batteries cannot supply 3 Amps - they are designed for low current applications - I think even 100 mA is a bit much for them.
The LM7805 is a linear regulator and will waste over a third of the power you draw from the battery as heat.
Four AA cells and a DC-DC converter (switching power supply) may work, but 3 Amps is really too much for an AA cell - C or D cells would be better.
Answer: The RPi4 standard psu is 5V 3A. As mentioned linear regulators are not going to be very efficient in voltage conversion so you will be losing a lot of power and therefore duration the battery could have provided. You want to look at a switching based converter and a higher capacity battery technology. Take a look at https://www.adafruit.com/product/1385 coupled with a LiPo battery example https://hobbyking.com/en_us/turnigy-2200mah-3s-25c-lipo-pack.html?___store=en_us. A solution like this should give you around an hour or two of runtime. If this is not sufficient just scale up the battery.


Any good tutorials / libaries for implementing TLS-SRP?

Question: In this thread, Tom Ptacek explains what Password-Authenticated Key Exchanges are, and it got me really interested in them. If I'd like to start learning about how to build them into real world software communication protocols, where can I find a starting point for information on understanding and implementing TLS-SRP? I'm ideally looking for a hierarchically-structured tutorial that couples the understanding with the implementing, but I'd appreciate any quality materials you can provide.
Comment: I'm not sure what other tags are appropriate, but feel free to add more.
Answer: As with most crypto stuff you shouldn't implement it yourself but use a well-known library instead.
OpenSSL has SRP-support since version 1.0.1. An example is contained in ssl/ssltest.c and there is also a file crypto/srp/srptest.c.
GnuTLS seems to support SRP since over a decade and the implementation has been constantly improved. Examples can be found under doc/examples/ex-client-srp.c and doc/examples/ex-serv-srp.c.


Show that P($A^c\cap B^c)\leq (1-\epsilon)^2$ for dependent distinct events A and B such that P(A)$\geq\epsilon$ and P(B)$\geq\epsilon$

Question: If two distinct events A and B are dependent such that P(A)$\geq\epsilon$ and  P(B)$\geq\epsilon$, we want to show that P($A^c\cap B^c)\leq (1-\epsilon)^2.$
Comment: Consider one flip of a fair coin and let both $A$ and $B$ be the event that a heads appears.  Thus, we may set $\epsilon=1/2.$ The event $A^c\cap B^c$ is the appearance of a tails, with probability $1/2.$ You are asking us, therefore, to show that $$1/2 = \Pr\left(A^c\cap B^c\right) \le (1-1/2)^2 = 1/4,$$ which obviously is not true.
Comment: @mathfear I think you misunderstood. In whuber's example, $A$ is the event that a coin flip shows heads, and $B$ is the event that the **same** coin flip shows heads. Whuber is writing about a single flip, not writing about the outcomes of 2 distinct flips.
Comment: In my example, $A$ and $B$ are anything but independent! They are identical and have probability strictly between $0$ and $1.$  Thus, $$\Pr(A)\Pr(B) = 1/4 \ne 1/2=\Pr(A\cap B)$$ shows lack of independence by definition.
Comment: In your example, A and B are independent. But in the question, two events are dependent.
Comment: @whuber these two events are distinct. I edited the question now.
Comment: I'm afraid that will be of no help: you should have little trouble coming up with comparable counterexamples--they only need to be slightly more complicated.  (For instance, let $B$ be the event that the coin lands heads or lands on its edge.) Are you sure this is the question you need to ask?
Answer: We have
\begin{align}
P(A^c \cap B^c) & = P((A \cup B)^c) \\
& = 1 - P(A \cup B) \\
& = 1 - P(A) - P(B) + P(A \cap B) \\
& \leq 1 - 2 \epsilon + P(A \cap B) \\
& = (1 - \epsilon)^2 - \epsilon^2 + P(A \cap B),
\end{align}
so a sufficient condition is that $P(A \cap B) \leq \epsilon^2$, i.e. the probability of the intersection must be small.  An extreme case is when $A$ and $B$ are disjoint so that $P(A \cap B) = 0$.  As whuber's comment shows, the result is not true in general and can fail when there is too much overlap between $A$ and $B$.


How important is music to mobile phone (smart PDA) games?

Question: Specifically iPhone/iTouch, Droids, and the new Windows Phone 7? I don't know how to quantify this, or if any research has been done. I am wondering how important the music is to the gaming and what % of games come with music at all, if good music at that.
Answer: I wouldn't say music is critical, but good music on any platform can greatly enhance the player's experience.  The most important consideration with respect to music is that the music be appropriate--it should fit the game, and it should be somewhat subtle; it should not be too distracting.  I would argue that poorly chosen music can easily be worse than no music at all, so it's worth investing time (and often money) to put together a good soundtrack.  Your soundtrack should be large enough that it does not become too repetitive, and there must be a way to adjust the volume and switch the music on/off entirely (this functionality is usually provided for you in mobile devices).
If securing a proper soundtrack is not a viable option for you, then consider subtle ambient background sounds instead (see Angry Birds for an example).
I have no meaningful figures about the percentage of mobile games shipping with music, but most of the games I've played do include music, or at least ambient background sounds.  There are some notable exceptions of excellent games without music, including Trainyard on the iPhone, which easily ranks in my Top 10 favorite mobile games.
Comment: I know as a player, the first thing I always do on a phone game is turn off any music.  But maybe I'm in the minority.
Comment: Nice answer, I think music is part of keeping the player in the Flow zone, which is important. If you don't know about the Flow, I suggest you read this paper writting by Jenova Chen, this guy actually wrote a thesis on the subject. http://www.jenovachen.com/flowingames/p31-chen.pdf
Comment: @Frédérick Great point, thanks for the link. @BBlake It definitely varies from player to player, and often depends on *where* a person is playing.  Someone playing mobile games in their cubicle at work will probably mute their device ;).
Comment: Maibe but you can think of well known Iphone games using music like Tap Tap Revolution. If this game works, it means players probably like music on their portable device ;)
Answer: The perception of audio quality usually is a plus or minus to overall game quality perceived. Generally most good audio is not spotted by the user, but their perception of game quality is increased.
Also consider that music themes and characterized sound effects are quickly recognized and can quickly become a symbol for a game. Music is a very strong IP like a strong character, and leaves its traces even hearing once. A good music, when switched off later, will continue playing in people's head while playing the game, and later also while not playing the game.
We recently published a puzzle game with minimal sound design with no music and received plenty of comments asking why the game has no music and should have one. In addition to that, although the sound design was minimal but careful, we have also seen people using headphones to play the game instead of turning the sound off.
Considering the fact that it is usually very hard to get feedback on audio (unless it is really bad or have great emotional songs), and experiencing people asking for music and preferring headphones even for minimal designs, music is quite important for all games. Game developers shouldn't underestimate its potential for mobile games.


What is the difference between 怖じける and 恐れる?

Question: I wanna ask you about the difference between [怖]{お}じける and [恐]{おそ}れる. Both mean to be scary right?

Which is more common?
How do I use each in a sentence?
Are they interchangeable?
Answer: I would define them as:

(~を)恐れる: to fear (something)
(~に)怖じける: to flinch or cower in fear (at something) ; get frightened

A1) I would say 恐れる is more common, in terms of the absolute number of uses, but since their meaning are slightly different, I don't think there's much of a point in comparing.
A2) Here's an example I made for each.「獣は火を恐れる。」: "Animals fear fire."「熊は炎に怖じけて、逃げて行った。」: "The bear flinched at the fire, and ran away."
A3) Some of the time, I guess.
Answer: I think the words are often interchangeable and hard to distinguish. So, the difference is subtle. My interpretation is the following:
怖{お}じける is used often when it is in an unknown situation such as jumping off from the cliff or going into a ruined building at midnight. You are testing your courage.
On the other hand, 恐{おそ}れる is used often when you are scared of the known/learned situation which had happened before.
If you are being bitten by the dog before, next time you might be afraid of touching it. Or getting food-poisoning by eating a raw oyster, you are afraid of having food-poisoning again by eating it. I think -phobia in English is close to 恐れる.


Rebol's DOM like library for Rebol's Block?

Question: I agree with Carl that XML is too much verbose compared to Rebol's Block but there is no equivalent of XML DOM library for Rebol's Block or am I mistaken ?
How can I iterate through a hierarchy of block ?
Comment: Do you just want to descend through a block structure, or do you need to go back up to parents etc?
Comment: Well I want everything of course ... if possible ;)
Answer: Rebol's runtime abstraction of block! is not adequate for getting coverage of the DOM.  One technical barrier is that you can't get the single unique "parent" of a block, as it may be aliased at several locations.  So for instance:

>> foo: [div id: "foo"]
== [div id: "foo"]

>> bar: [div id: "bar"]
== [div id: "bar"]

>> paragraph: [p ["Hello"]]
== [p ["Hello"]]

>> append foo append/only [contents:] paragraph
== [div id: "foo" contents: [p ["Hello"]]]

>> append bar append/only [contents:] paragraph
== [div id: "bar" contents: [p ["Hello"]]]

>> append second paragraph "World"
== ["Hello" "World"]

>> foo/contents
== [p ["Hello" "World"]]

>> bar/contents
== [p ["Hello" "World"]]

There's no way to write a function that can meaningfully answer questions like "get-parent bar/contents".  Although you've got something which has been parsed and brought into a structure you can manipulate, it isn't a structure with particular designs matching the DOM.
To climb around it freely as a tree you'd have to build a bunch of objects connected with references.  That's pretty much what every other language does, so no free lunch to be had here.  On the plus side, part of the parsing is taken care of for you and there's quite a bit of manipulation you can do without a DOM library.  It's a way better place to start than text!
On the downside, it can seem so freeform that you wonder what use cases it was optimized for.  The answer is that it specifically wasn't optimized for anything, other than dialecting Rebol.  :)  Circular reasoning, but it has given rise to the properties that make the language interesting to study and which makes it sort of "timeless".
You might find aspects of the extended tag proposal and the discussion it provoked to be illuminating.
Comment: Will think about all this and will come back to it one day thanks :)
Answer: Yes Rebol can be used for these purposes. It can mimic any language by way of  DSL's. Try %Rebol-DOM.r view with Mdlparser.


Change the default search engine for Firefox's address bar

Question: I love the ability to just type something into Firefox's address bar and do a Google search. But I was wondering if there was some way to customize what search engine Firefox used?
Comment: The user asking this question was last seen here Apr 5 '11 at 7:31... Can we say this his an "hit and run" question? :-/
Answer: In FireFox, in your address bar type
about:config

and press Enter. Now look for an entry that's titled "keyword.URL", this is the config key that contains which search URL to use when you search through your address bar. If you double click the entry, you can change the value.

By default it should be set to google, which uses this query URL: http://www.google.com/search?&q= It's possible it's a bit different but it should be similar.
Some examples for search engines' query URLs:
Google: http://www.google.com/search?&q=
Yahoo: http://search.yahoo.com/search?p=
Ask: http://www.ask.com/web?q=
Bing: http://www.bing.com/search?q=1
If you want an other search engine, and don't know the query URL, do the following:

Go to your preferred search engine (E.g. Google)

Perform a search with an easily recognisable keyword like "HELLOWORLD"

In your address bar, there should be an URL containing your keyword. For Google it would be something like http://www.google.nl/search?q=HELLOWORLD&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:nl:official&client=firefox-a

Now just delete everything after the "=" that's just before your chosen keyword. Your query URL for Google would be: http://www.google.nl/search?q=
Comment: THIS SOLUTION NO LONGER WORKS IN FIREFOX
Comment: On a related note, you can use the FireFox [DictionarySearch](https://addons.mozilla.org/en-US/firefox/addon/dictionarysearch/) add-on to set up a bunch of different searches that are accessible by selecting some text on a web page and right-clicking and selecting one of them from the menu that pops-up. I have a number of them for sites like Amazon, Netflix, and Wikipedia which I set-up using more-or-less the same technique described here for determining the URL to use. I highly recommend it.
Comment: Before doing the above, to save switching between tabs, do this: CTRL + T  which will give you a new tab, then drag this new tab outside of the browser window. Now you can do it side by side
Comment: Whatever you select using the dropdown menu to the left inside the search text box, such as "DuckDuckGo" becomes the default in the address bar and in about:home page.  Internally it changes browser.search.defaultenginename and browser.search.selectedEngine.
Answer: Starting with version 34.0.5, this can be changed by going to
Options Search

(source: mozilla.net)
It can also be changed programmatically, although this is more difficult.
The search engine setting is now kept in the Profile Folder, in a file called
search-metadata.json. Example
{
  "[global]": {
    "current": "Google",
    "hash": "fGiy1O53LgQtereW/4qUSlwFfagTNKGghURIbAFw8wY="
  }
}

The hash can be created by using this example Bash script
profile=default
provider=Google
disclaimer="By modifying this file, I agree that I am doing so only within \
Firefox itself, using official, user-driven search engine selection processes, \
and in a way which does not circumvent user consent. I acknowledge that any \
attempt to change this file from outside of Firefox is a malicious act, and \
will be responded to accordingly."
printf "$profile$provider$disclaimer" | openssl sha256 -binary | base64

This change was discussed at Bugzilla and can be found in
the source code.
Answer: I had this problem when the default search UI changed in the latest version of firefox. When I changed the default search in the search bar, the search from the address bar also changed.
For instance, this...

Results in this...

However if you want to choose which engine to use each time, then you should go with the solution from @harrymc
I hope this helps.
Answer: The option of Keyword.Url, as of FF23, has been removed.
The address bar (1) and the search bar (2) share the same settings. So, if the search bar is set to Yahoo, then so it will be when you search (see screen below)

To add a new provider to the list which affects both the 'awesome bar' (now called location bar I think) and the search bar, choose the engine from the search box drop down arrow (beside the Purple Y for Yahoo! (near to the number 2))
However, as it currently stands, it looks like the Keyword.Url parameter has been removed.
There is nothing which replaces it (in the same area).
I found a plugin https://addons.mozilla.org/en-US/firefox/addon/keywordurl-hack/ (instruction on setting up
and
https://addons.mozilla.org/en-US/firefox/addon/keyword-search/
This is speculation but I believe this functionality was removed to prevent search hijacking.
There is also additional search options with the latest Firefox, if you right click in any (most/some) search boxes, even the one at the top of this SU page, you can "Add keyword to this site". This will then let you choose the search engine from the 'location bar' (pictured as 1) and add your search phrase by typing in the bookmark name you gave.
And here is the reasons fully behind the decision https://bugzilla.mozilla.org/show_bug.cgi?id=873734
Answer: In Firefox 34 the search UI has been changed, but one can still use keyword search in the address bar,
even though the "Edit Keyword" option has disappeared from the "Manage Search Engine List" dialog.
One can, for example, open up http://www.bing.com/ and right-click the search-field to get :

Choose "Add a Keyword for this Search...", which will get this dialog :

Enter "bing" as the keyword. Now you can write in the address bar :

And get this :

For Google, one can use the same mechanism and maybe define the search keyword as "g" for brevity.
If you wish to delete such a keyword, this can be done from the Bookmarks menu.
Answer: I have confirmed this works on FireFox 34.0.5 on OS X. This is the latest stable release at the time of posting this answer.
In the default menu layout, there is a search box to the right of the address bar. On the left side of this search bar, is the logo of the current default search engine. To choose a new default search engine, click the logo, then select a new default search engine from the drop-down menu. The default search provider is then used for all searches made from the address bar.
New search engines can be added from the Mozilla Addons site, By clicking the 'Add "[Site Name]"' option in the menu (compatible sites only), and by using the method described in @harrymc's answer.


Game Engine Design for the LWJGL

Question: I'm about to begin on the engine for the game I am making. However, I am quite uncertain how I should design it. I have heard lots about threaded games, component and asynchronous systems. I'm wondering which design will give the best performance using the LWJGL with a 2D game. I know that how I build it will greatly impact the performance. I just want to know what direction I should go in for the engine based on what has worked for others.
Comment: This is a very vague "how do I get started" question.  Start writing your code and post here if you run into any concrete issues or questions.  "Best performance" is very hard to nail down if you have no previous metrics and have no clear definition of what you're trying to make or what hardware you're targetting.
Comment: "Which architecture is best" is quite subjective.  The answer for one type of game is going to be utterly different than for some other types of games.  LWJGL is not relevant to the decision; the game you're making is.
Comment: I'm not explicitly asking where to start. I just need to know what design is the most effect/most used/ect. with LWJGL.
Answer: LWJGL is a tight wrapper around OpenGL. This means that best-practices, techniques and designs are rougly the same as any other language.
You have 2 options here:

Write your own 2D engine with OpenGL
Use a library for LWJGL like Slick. It will give you the basics like simple texture loading, font drawing and more.

If you are new to Java in general, it's a good idea to use a library, as you can focus more on the general Java programming instead of the OpenGL syntax. If you are completely new to Java though it's probably a better idea to do some normal Java programming first. Making a game is not a simple thing, especially if you are going to make the engine yourself. You will need to use alot of OOP, and you definitely need programming experience.
A good video tutorial series about Slick 2D: EddieVanHalen98 (youtube).
The exact techniques and designs depend on the type of game, and the scale of it. Your question is too broad for this site. As Sean said, start with your code, profile your code, and come back here for more specific questions.
Comment: Slick has poor and old documentation so I was hoping to to just avoid trying to figure it out. I'm aware of how difficult this will be; i have java experience. Thanks for your feedback.

Game Engine Design for the LWJGL


Starcraft II Ladder Matches(How to get promoted)

Question: I recently started playing starcraft II and was originally placed in Silver League. After playing various matches winning half and losing half or so I got demoted to Bronze League, personally at the time I didn't mind because I wanted to learn the game the right way, etc. However, I only played 6 or so games before being demoted, I have been in Bronze league for a month or so now and have maintained a rank 3 or so during this period and I constantly play with Silver players, etc,(and won) and I have still not been promoted. I had a winning streak of 10 matches and no promotions, yet I was demoted in the first 10 games.
Comment: possible duplicate of [How do ladders work in StarCraft 2?](http://gaming.stackexchange.com/questions/6234/how-do-ladders-work-in-starcraft-2)
Answer: The most comprehansive guide about SC2 ladder is here (I belive)
As for your question "when will I be promoted": just keep playing and you'll get it. Especially if you constantly see opponents from higher league.

By outperforming the rest of your league, it is possible to get
  promoted into a higher league. If you are in Bronze but playing
  against Gold players, you would expect to be promoted to Gold, but
  that doesn't always happen immediately.
This is because the system requires a certain degree of confidence
  before players can be moved to a new league, otherwise they would
  bounce around from league to league too frequently for leagues to be
  meaningful.

FYI: Blizzard support will not answer you if you call them about ladder "issue".
Comment: Thanks, I have been constantly playing with Gold members for a while now hopefully I'll be promoted.
Comment: Moving up in leagues fast can prevent promotion, too. If you are bronze and get matched with golds while still winning most matches, the system gives you a low confidence on your position until you start hitting the "~50% winrate barrier". As soon as you start losing more, the confidence will rise and you might then skip silver league and go directly into gold league.
Answer: The exact mechanics of league placement are a secret held eagerly by Blizzard. However, folks have guessed parts of it rather accurately. You can read about what we know on Liquipedia.


Why does a step up transformer draw more current than a step down?

Question: I am trying to understand why a step up transformer draws more current than a step down transformer in the inverse configuration. The circuit below shows a 2:1 stepdown so I get 10V input, 5V output. Primary current is 2.5 mA and secondary is 5mA. I understand the concept where if voltage is halved, current is doubled. But let's say I inverse the circuit below and switch the ratio to a 1:2 step up transformer (1H to 4H). Now if I put in 10V I am getting out 20V. Primary current is 40 mA and secondary current is 20mA. Why is there a higher current draw with a step up transformer? I thought it might be because I'm increasing 10V instead of decreasing 5V so there's a higher difference but if I stepdown even more say 10V down to 1V I'm getting 100uA on primary 1mA on secondary so the current draw is even less with a higher turn ratio on a step down.
Comment: So if your input (source) and output (load resistor) do not change, what impact would 20V have on the resistor as compared to 5V?
Comment: Because you kept R2 constant.
Answer: A good way to understand physics issues is to look for a conservation law, in this case, Conservation of Energy.
When a system is lossless, or in the case of a transformer very nearly lossless so we can approximate it to lossless, then energy out equals energy in.
You are keeping the load on the secondary constant at 1 kΩ, and the input voltage to the primary constant at 10 V.
If a 2:1 transformer is configured to step up, you're supplying 20 V to the resistor, and it will consume 20^2/1k = 400 mW. The transformer primary will draw this from the 10 V supply, at 400m/10 = 40 mA.
If a 2:1 transformer is configured to step down, you're supplying 5 V to the resistor, and it will consume 5^2/1k = 25 mW. The transformer primary will draw this from the 10 V supply, at 25m/10 = 2.5 mA.
Answer: You have an impedance of 1k on the secondary at all times, and your current draw calculations are correct -- there is no inconsistency.
You may think of this situation as the transformer actually transforming the impedance. With an impedance of \$R\$ on the secondary, the transformer + its load "looks" like a \$R/N^2\$ impedance (where N is the step-up factor), assuming an ideal transformer.
In the step-down configuration  the (transformer + resistor on secondary) effectively looks like a 10 V / 2.5 mA = 4k Ohm. This matches the above formula.
On the other hand, in step-up, the combination of transformer and load looks like a 250 ohm load (i.e. 1kohm * 0.5^2), again consistent with the above formula.
In fact, this mechanism is used practically to adjust unequal impedances to match them,
Answer: A transformer passes power (voltage times current), not just voltage or just current.
In a step-up transformer, if the secondary voltage is twice the primary voltage, the primary current must be twice the secondary current for the primary power to equal the secondary power.  (In practice, the primary power will be a little greater than the secondary power due to losses in the transformer.)
Answer: Consider an ideal 1:1 transformer with a driving circuit and a fixed load. The voltage and current on the primary side of the transformer will have the same magnitudes as they have on the secondary side.
Now we replace the 1:1 transformer with an ideal 10:1 step down transformer, keeping the same fixed load. Both the output voltage and output current have dropped by a factor of 10 reducing the power in the load by a factor equal to the square of the turns ratio. To keep the input power equal to the output power the input current must also drop by a factor equal to the square of the turns ratio (100X) because the input voltage has remained unchanged. The impedance, as seen by the driving circuit, has gone up by a factor equal to the square of the turns ratio.
Next we replace the 10:1 step down transformer with an ideal 1:10 step up transformer, keeping the same fixed load. Both the output voltage and output current have increased by a factor of 10 (as compared to the outputs from the 1:1 transformer) increasing the power in the load by a factor equal to the square of the turns ratio (as compared to the case of the 1:1 transformer). To keep the input power equal to the output power the input current must also increase by a factor equal to the square of the turns ratio (100X) because the input voltage has remained unchanged. The impedance, as seen by the driving circuit, has gone down by a factor equal to the square of the turns ratio (as compared to the 1:1 transformer).
EDIT
If we want to drive an 8R load from an op amp which is supplying an 8V rms output signal then the op amp would be required to supply 8 Watts of power at a current of 1A rms which is obviously not within the capabilities of an ordinary op amp.
But, we could place a 12:1 step down transformer in between the op amp and the 8R load which, with the same amplitude of driving signal, would reduce the power in the load by a factor of 144 (turns ratio squared) to about 55mW and increase the impedance seen by the op amp also by a factor of 144 to 8*144= 1152R. The current drawn from the op amp would then be reduced by a factor of 144 to 6.9mA which is within the capabilities of a typical op amp.
By adding the transformer we are limiting the power in the load to a value which can reasonably supplied by a typical op amp. To increase the power above that which the op amp can supply we could remove the transformer and replace it with a class AB  push-pull driver stage which can take the required extra power direct from the power rails.
Answer: It's because energy is conserved, energy in must equal energy out.
Power is just "energy per second". Energy in per second is the same as energy out per second, and consequently power in equals power out.
Power is calculated as the product of current and voltage, \$P=I \times V\$, which means that the product of current and voltage on the primary side must equal the product of currrent and voltage on the secondary side:
$$ I_{PRIMARY} \times V_{PRIMARY} = I_{SECONDARY} \times V_{SECONDARY} $$
Physically, \$I \times V\$ energy delivered to the transformer from either side becomes a magnetic field in the transformer's core, but that field is shared by both coils, so circuitry on either side can then obtain energy from that field. However, neither side can draw more energy from the field than the field contains, and this is manifest in the above equation.
From that perspective, there really is no such thing as a primary or secondary coil, both sides can deliver energy to the shared magnetic field, and both can draw energy from it, like a joint bank account. The primary might deposit 10 1-dollar bills, and the secondary can then withdraw a single 10-dollar bill.
The accounting is perfect, and something is getting that energy when the field collapses. Usually we want that something to be the thing connected to the secondary, but the secondary can only receive whatever energy was delivered to the field in the first place.
Consequently \$I \times V\$ on both sides must be the same. If you are wondering what happens if there's nothing connected on the secondary side to receive the energy delivered via the primary side, think of the voltage/current source on the primary side as both depositing and withdrawing at the same time. Sure, it delivers energy, but it's immediately returned to the source as soon as the source stops pumping energy in.
Comment: Not that it's wrong, but I feel as though most people asking this question are searching for a more satisfying answer. i.e. What happens in the transformer on the secondary to determine the current on the primary.
Comment: @DKNguyen, I think that's probably true, and OP will find nothing useful here! I also think that from a perspective of conservation of energy, which I find deeply satisfying, it's a little piece of the puzzle that somebody could benefit from.
Answer: For an ideal transformer, power out equals power in. Do the math; compute the numbers.


Stolen phone samsung s9+

Question: Yesterday I lost my phone (s9+) in a coffee shop. After atleast 3 hours of not knowing I lost it. I immediately tried to find it via samsung find my phone unfortunately it has no sim card and was not connected to a wifi. so i just tried to lock it via samsung account. My question is is it still possible for the thief to reformat and all to use the phone. Thank you.
Comment: You may want to review other questions with with the "lost-phone" tag. You also made no mention of a Google account being on the device... So assuming not, and no SIM and no WiFi connected, then of course the device could just be factory reset and used by anyone or sold. If you have an active Google account on the device, then Factory Reset Protection may prevent any potential thief from using/profiting from your device.
Comment: Before I was able to logged in to my samsung account the lost phone has its usual lock set ups..my finger print and iris and facial recognition and a 13 digit password. Would that help?
Comment: if that's a Samsung specific thing maybe, I don't know...
Answer: Yes it is possible for that person to reformat the phone by going into the recovery or going through factory reset in settings, but if you report your phone stolen, the IMEI won't allow that person to access the network towers. They can however use WiFi to get on the internet though.

Stolen phone samsung s9+


Set weight for configurable product

Question: Is it possible at some point to have problems if I set attribute weight to be visible for Configurable products as well? I want to set the weight for a configurable product in order to display it on product listing and I don't want to add a new attribute. I am asking to be sure that shipping rate will not be influenced by this setting.
Answer: You can specify weight for each on simple products which is a part of configurable product. So make sure that those two values match and you should be fine.
Comment: so..if it is the same weight for configurable as for simple products associated, everything should be fine. Thanks
Comment: Yes, you can specify the weight for each simple product to account for the weight difference. E.g. size 6 and size 12 shoes of the same model can be different in weight. And in large quantities this can have significant impact on shipping price.

Set weight for configurable product


Fast convolution with very high order FIR

Question: I am investigating the overlap-add and overlap-save methods for processing an audio signal with a FIR. The FIR is a measured impulse response of a reverberant space and may be of order greater than 100,000. It appears that in order for O-A to work, the signal block length must be at least this length to keep the amount of overlap less than one block length. For example, if the signal block length is 100 ms of audio (L = 4410) and the IR is 3 s of reverb (M = 132300) then each block convolution produces 127890 outputs that must be added to subsequent block convolutions. Am I missing something?
Answer: you can split up your long impulse response into smaller segments and use multiple concurrent fast-convolutions that convolve each segment against your audio, align the delays correctly, and add up the result.
what must be the case for each segment (or one big segment if you don't split it up) is that if the FFT length is $N$ and the impulse response (or segment) length is $L$, the number of output samples you get for each frame is $N-L+1$.  that's the case whether it's overlap-add or overlap-save.  in either case, you pad your impulse response (or segment) with $N-L$ zeros (to bring it to length $N$) and FFT that.
Comment: Note that you will still end up with at least 132300 samples to add to subsequent block convolutions, but chopped up into a sequence of many block operations.
Comment: but @hotpaw2, you can do it with smaller FFTs.  while i don't think a 256K FFT is normally too big to do with double-precision floats and a modern processor, it *might* be a numerical problem for smaller words.
Comment: Yes.  I am agreeing with you.  You can build that long result with a large bunch of smaller block fast convolution operations, and also add it to the next data block result in a large bunch of smaller vector summings. Doing without thrashing the data caches is an interesting problem though.
Answer: Thanks for the responses. I have since found that my concerns were needless - you just need a long enough buffer. I wrote the following MATLAB function to process one block of input and tested it with a separate script on a large input stream. It worked just fine.
<code>function [y,outBuffer]=overlapAdd(x,h,inBuffer)
L=length(x);
% M=length(h); add for error check
N=length(inBuffer); %N >= L+M-1
inBuffer=inBuffer+ifft(fft(h,N).*fft(x,N));
y=inBuffer(1:L);
outBuffer=[inBuffer(L+1:N); zeros(L,1)];
</code>
In my test case the block size L was 4800, the impulse response length M was 240000 and the total signal length was 352257. The buffer size was L + M + 1 = 244799.


Do we need Unity questions?

Question: Don't get me wrong, I love Unity. I think it's a great engine. But surely we should refer people along to Unity's official QA website? That's a better place for their questions (even if it is terribly built compared to SE).
Answer: I think Unity questions are fine.
Unity Answers isn't part of the StackExchange network. We don't close questions on UDK, Ogre, or OpenGL, or Direct3D (et cetera) with a link to the appropriate support site or forums for the technology -- there's no reason to do to so unilaterally for Unity questions just because Unity's official support site is a StackExchange look-alike.
Comment: I agree with this, though there might be certain questions where directing the asker to the Unity Q&A site is a good idea (or at least mention the fact that there is a Unity Q&A site)
Comment: yeah I agree with this as well. Every engine/technology has it's own forum/QA site related to it, but if it's not part of SE it should be perfectly fine to use. Otherwise like Josh stated we would have to close OpenGL, Direct3D, C++ to other appropriate links
Answer: Maybe I'm biased (I am), but the moderation here is a lot better than the moderation over there.
I, for one, welcome good Unity questions.  If the questions help drive traffic to our site, they're on topic, and they "help make the internet a better place", all the better.
Comment: +1 for the moderators here :) - Unity's site was a *lot* worse in terms of bad questions, duplicate questions (and I mean the same person posting the same question three times in a row...), etc. Plus, they moved from using the SE 1.0 codebase to QATO, which isn't nearly as usable as the new SE 2.0 that all the SE sites now run on.
Answer: On Unity Answers you often have people that don't know how to handle the QA-system correctly.
Often people ask only one question and then disappear.
You get a lof of questions there, that could be answered with a look at the manual/reference.
For my part I'ts nice to know I could post a question here and might get an answer from someone that has a broader horizon (a not ONLY Unity user).
Answer: I was a unity answers member before I joined this site, but I always get higher quality answers here. Most of my questions have deeper CS requirements even if it's a Unity question, so that may account for my experience.
Answer: Unity questions belong on UnityAnswers or the Unity Forums. I think wherever possible, technology-specific questions should be asked on fora dedicated to that technology, so as to contribute to those individual resources. XNA to its own, Unity to its own, iPhone dev to its own, etc. etc.
The only time users should really opt for this site over those sites is when the question tends more toward technology-agnostic games or simulation-related problem-solving. The best questions on this site, and the best answers, rarely have to do with individual technologies, IMO.
Wouldn't you rather have one single go-to point for a technology you are learning about, than to have to hunt high and low on the web (much fun as that might seem)?
Comment: The way I see it, if somebody has a specific problem that isn't easily googleable, then a SE site that covers the topic should either 1) have a question on it or 2) be the place where somebody can ask it.

Do we need Unity questions?


Doppler effect of observer and source moving in different directions and at an angle

Question: While studying the classic Doppler effect equation, I was curious to how the traditional equation of the doppler effect for sound, where the observer and sources are facing each other, gets effected once the observer is stationary and the source moves at an angle from the horizontal?
Comment: I ran into this recently myself. Apparently the main change is that one substitutes the observer and source speeds with their components in the direction of the wave. In the case of a stationary source, see http://kirkmcd.princeton.edu/examples/wave_velocity.pdf. For the case of a stationary observer, see section 2 of https://scholar.harvard.edu/files/schwartz/files/lecture21-doppler.pdf. (For my own purposes I'd like to see a unified treatment of such, but haven't seen it yet...)
Answer: Here's a derivation of a general formula, which turns out to be just as simple as the commonly quoted formulas that work only in special cases.
Choose the rest frame of the medium as your reference frame. Let $c$ be the speed of sound. Say that an emitter with velocity $\def\v{\mathbf v} \v_e$ emits a wavefront at $\def\x{\mathbf x} t=0,\x=0$, and a second wavefront at $t=δt, \x = δt\,\v_e$, and a receiver with velocity $\v_r$ detects the first wavefront at $t=Δt, \x=Δ\x$ and the second at $t=Δt+k\,δt, \x=Δ\x+k\,δt\,\v_r$. The ratio of time intervals, $\frac{k\,δt}{δt} = k$, in the $δt\to 0$ limit, is the Doppler (red)shift factor. (I picked $k$ at random because, weirdly, there is no standard letter for this ratio.)
Both wavefronts travel at $c$, so
$$\begin{align}
Δ\x^2 &= c^2 Δt^2 \\
(Δ\x + k\,δt\,\v_r - δt\,\v_e)^2 &= c^2 (Δt + k\,δt - δt)^2
\end{align}$$
Subtracting the first equation from the second gives you
$$2 Δ\x \cdot (k\,δt\,\v_r - δt\,\v_e) + (k\,δt\,\v_r - δt\,\v_e)^2 = 2 c^2 Δt \, (k\,δt - δt) + c^2 (k\,δt - δt)^2$$
In the $δt\to 0$ limit, the second term on each side is negligible. If you drop those terms, it's easy to solve for $k$:
$$\boxed { k = \frac{c^2 - \mathbf c \cdot \v_e}{c^2 - \mathbf c \cdot \v_r} }$$
where $\mathbf c = Δ\x/Δt$ is the "velocity of sound": a vector of length $c$ pointing from the emitter toward the receiver.

You can derive the special-relativistic Doppler shift for light in a similar way. The result is even simpler:
$$k = \frac{\x \cdot \v_e}{\x \cdot \v_r}$$
where the $\v$s are four-velocities, and $\x$ is a null four-vector pointing from emitter to receiver.
Answer: The equation will change as the moving source/observer changes position. You will only get a constant frequency if the source and observer are both moving with the same velocity (unless $\theta=0$ or $\theta=\pi$).