How many ways can 10 people be split into groups of 2 and 3?

Question: How many ways can 10 people be split into groups of 2 and 3? the answer says ${5 \choose 2}$... But isn't it the answer if the question were: "How many ways can 5 people be split into groups of 2 and 3?"
Answer: We can have the groups assigned with the following number of people:
$$(1)\,\{2,2,2,2,2\}\\(2)\,\{2,2,3,3\}$$
Case 1: Choose groups of $2$ from $10, 8, 6, 4$ in succession until we reach our final pair. Our $5$ sets of groups are the same irrespective of the order in which they are chosen, so the number of ways here would be: $$\binom{10}{2}\binom{8}{2}\binom{6}{2}\binom{4}{2}\frac{1}{5!}$$
Case 2:

Choose $3$ people from $10$.
Choose $3$ people from the remaining $7$.
Choose $2$ people from the remaining $4$, leaving the remainder to form the final pair.

In summary, we have $2$ different types of groups, each containing $2$ groups. Eliminating repeats by accounting for the order in which such groups can be chosen, the number of ways here is: $$\binom{10}{3}\binom{7}{3}\binom{4}{2}\left(\frac{4!}{2!\,2!}\right)^{-1}$$
Add the cases together and you have your result.
Comment: The factor $\left(\frac{4!}{2!\,2!}\right)^{−1}=\frac{1}{6}$ is not right. There are four repeats of each partition, not six. For example consider selecting from the set $\{A,B,C,D,E,F,G,H,I,J\}.$ The selection $$(\{A,B,C\},\,\{D,E,F\},\,\{G,H\},\,\{I,J\})$$ gives the same partition as the selection $$(\{A,B,C\},\,\{D,E,F\},\,\{I,J\},\,\{G,H\}),$$ the selection $$(\{D,E,F\},\,\{A,B,C\},\,\{G,H\},\,\{I,J\}),$$ and the selection $$(\{D,E,F\},\,\{A,B,C\},\,\{I,J\},\,\{G,H\}).$$
Comment: The multinomial coefficient $$\binom{10}{3}\binom{7}{3}\binom{4}{2}=\binom{10}{3,\,3,\,2,\,2}$$ is not counting the ways of choosing two groups of $3$ and two groups of $2$ in any order; it's counting the ways of choosing a group of $3,$ than another group of $3,$ then a group of $2,$ then another group of $2,$ in that order.  The overcounting results from the possibility that one selection may have the same groups of $3$ as another, but in the opposite order, and likewise for the groups of $2.$
Comment: I gave a slight variation of your answer. Hope you do not mind.
Answer: We can have the groups assigned with the following number of people:
$$(1)\,\{2,2,2,2,2\}\\(2)\,\{2,2,3,3\}$$
Case 1: Choose groups of $2$ from $10, 8, 6, 4$ in succession until we reach our final pair. Our $5$ sets of groups are the same irrespective of the order in which they are chosen, so the number of ways here would be: $$\binom{10}{2}\binom{8}{2}\binom{6}{2}\binom{4}{2}\frac{1}{5!} = 945$$
Notice we can do this in another way.
$10/2 = 5$ Therefore there are $5$ groups.
We can arrange 10 people in 10! Ways.
If we pick the $n,n+1$ persons of that arrangement Then we picked 5 times groeps of size $2$.
The order of the 5 groups needs to be removed So we correct $10!$ to $\frac{10!}{5!}$.
The order of the 2 members in every group needs to be removed too , So we correct $\frac{10!}{5!}$ to
$$ \frac{10!}{5! 2^5} = 945 $$.
This method gives the same result ($945$).
Case 2 can be done in a similar way.
This answer is similar to the accepted one , but I Just wanted to show an alternative way.
Since this alternative way is also an answer and this whole is too long for a comment I made it into an answer.
Answer: This is equivalent to splitting a group of 10 people into a group of 5, a group of 3, and a group of 2. There are $10!/(5!3!2!)$ ways to do this. Equivalently, you could think of first choosing five people out of the $10$, and then choosing two people out of the $5$. There are $\binom{10}{5}\cdot\binom{5}{2}$ ways to do this. If you compute both methods give you $2520$.
Comment: thank you!  Is this mean the provided answer (by me )was wrong?
Comment: Aha perhaps I interpreted the question incorrectly - this solution is for choosing a group of $2$ and a group of $3$ from the $10$, whereas perhaps you are asking how to split the entire group of $10$ into pairs and triplets as the other answer indicates.


Difference between econometrics and time series analysis

Question: I'd like to know the difference between time series analysis and econometrics except the fact that the observations using in TSE are in time
Comment: Econometrics overlaps with time series analysis in so far as econometrics often deals with time series. Note that there many kinds of time series analysis that see little or no application in econometrics. If you spelled out what is puzzling you, there might be a more penetrating answer. I don't think there is very much more unity to time series analysis than the name implies, e.g. people divide sharply on whether it's a series of small variations on themes by Box and Jenkins or there are much better approaches.
Comment: It's like the difference between aspirin and medicine.
Comment: everything above is true and insightful but I believe that a key difference arises when econometrics uses a "structural" relationship and the time-series approach uses a reduced form relationship. I don't want to try get into the difference between the two here but, to me, that's a key difference. There are others also of course. such as focus on error terms, instrumental variables, simultaneous equations, the use of expectations such as RE and others that I'm forgetting..
Comment: Or the difference between singing and opera.
Answer: Time series analysis refers to any analysis performed on a time series dataset (as opposed to on cross-sections, panels, and pooled cross sections). These analyses  can be univariate (one time series) or multivariate (many time series).
Econometrics is the statistical analysis performed by economists, who - given the nature of the discipline - are interested in both causal and predictive applications. Econometrics analysis of time series data is both econometrics and time series analysis.
Time series analysis is very different from cross-sectional analysis and more challenging mainly because the independence assumption commonly made in cross-sections does not hold in time series. Time series analysis is different and in many ways more challenging than panel data or pooled cross-section analysis because we work with only 1 observation at a point in time per time series and thus have to make the most assumptions about the process that may have generated our time series.
Answer: Econometrics make use of a wide range of statistical tools in an attempt to study or uncover relationships between key macro indicators as well as more frequently observed data, such as stock market close or open. Having said the above, it is evident that data structures here have the form of a time-series.
However, not all time-series data-sets have the same degree of difficulty. Econometics or Financial time-series often exhibit some seasonality and periodicity, however, a more rigorous statistical analysis would be required due to their random and chaotic nature.
You would certainly expect that the time-series of the temperature variation of a city during a 24h day over one year to exhibit some key structural characteristics. This is not always the case with economics or finance data sets.
So, to answer the question, time-series analysis is required to analyze econometric data-sets. I hope that this covers it. Happy to discuss further.


No option on App Store to update High Sierra to Mojave

Question: Well, I have MacBook Air (early 2014) with High Sierra 10.13.6 OS and there is no option in AppStore to update to Mojave. I tried downloading directly from App Store and it stoped after every 500-800 MB, although it resumed from where it was stopped. but, after 100% download nothing happened, it didn't ask me to restart neither any error. So, is there any problem or is it not compatible with my machine.?
Answer: Based on your post, your MacBook should be compatible with the Mojave update.

Once the App Store app finishes downloading and installing you should see a installer in the Launchpad (it should automatically open, otherwise try double clicking on it to manually start the installer).

If this doesn't work out you might want to look at making a bootable USB installer, and proceed with the installation after booting from the USB stick. See here (Apple Support Documentation)
Comment: In my case, after 100% download, the icon just vanished (can't find it on launchpad even no .app/.dmg file), and pressing the download button again (from AppStore), started downloading from zero.
Comment: I need help please.


Installing debian package through Synaptic

Question: I want to install a .deb file. After going through various questions, I came across these three options: dpkg, GDebi and Ubuntu Software Center. However, I want to install the. Deb file via Synaptic Package Manager only. Is there any method by which I can install. Deb file as well as all it's dependencies via Synaptic Package Manager?
Comment: Yes, he wants dependencies to be installed (USC does that; dpkg and gdebit do not). Is there a reason why not using USC (this IS basically the same as using synaptic but with a frontend)
Comment: Is there any particular reason why you must use Synaptic? Anything installed on your system will still show in Synaptic no matter what method of installation was used.
Comment: Well that's a personal opinion of not using USC!I won't debate over USC vs Synaptic but one thing that goes against USC(atleast in my case) is that I cann't change the proxy settings of my network,which Synaptic allows me to do.
Comment: Like anyone else: if you want that software either use USC or you need to install all dependencies yourself when using dpkg. Nothing else in between :+
Comment: I don't know guys. I use gdebi-gtk all the time and it installs dependencies for me. The only time it doesn't is if the necessary dependency is not in the repos.
Answer: Well actually you can't install .deb files through Synaptic.
Comment: Here you go: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327329 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=47379
Comment: my reference: man apt-get
Comment: Is there any reference to your statement,where I can read about it more?
Answer: You have to install it by command-line:

sudo dpkg -i filename.deb

Command-line is faster and easier as you can know the problem (if there is any) by the debugging information it provides.
Comment: dpkg does not resolve dependencies,as was mentioned in earlier comments.


Should I use Concrete dissolver or Muratic acid to remove splatter?

Question: Concrete splattered all over the siding on my shed while I was mixing a batch for my patio.  I have done a light google search and seen there is muriatic acid and some kind of concrete dissolvers. What is the best procedure to do this?
muriatic acid
concrete dissolver
Answer: I used muriatic acid to clean boats and to clear urinal drains.  I have seen it used to clean a cement mixer on youtube.  It is very strong stuff.  You just spray it on for a few minutes and then scrub with a brush or sponge.  Wear gloves and eye protection.  There are a few videos on youtube.
Comment: You will not like it at all if you inhale the vapors. Be careful about that.


Max SPI data rate supported

Question: This is probably relevant for all SPI compatible chips but I'm asking for the DRV8711 in particular. The data sheet lists the SPI timing requirements and I was wondering how to get the maximum data rate supported by the device. The host MCU is STM32F103C6 and it needs to set a prescaler value to set the data rate.
Comment: Min clock cycle time = 1/max frequency
Comment: Yes. The maximum data rate.
Comment: @Eugene As short as it is, it is an answer.
Comment: Um.. ok, will refine and post..
Comment: Right, so the max frequency is 4MHz. So data rate is 4Mbits/s?
Comment: There's just one piece of missing information to verify that 4 MHz will work, and that is how SDATO delay increases with the external load.
Answer: In SPI each bit is transmitted on a clock edge, therefore the data rate (in bits) is the same as the clock frequency. Your datasheet is not providing the maximum frequency, but it is providing the minimum cycle time, which is \$250ns\$. As we know the relation between frequency and period time is \$f=1/T\$, we can calculate the maximum frequency as
$$ f_{max}=\frac{1}{T_{min}}=\frac{1}{250ns}=4MHz$$
So the data rate is 4Mbits/s.
Note, this is including any protocol overhead bits transmitted, such as framing information, parity bits and idle cycles. So the actual data encoded will have a lower rate.
Answer: From your question I assume that you are new to low level inter chip communication protocols in general and SPI in particular, so I'll try to explain some basic stuff that is not directly apparent from reading the datasheet.
The simple
The SPI protocol does not actually define clock rates - this is always left to the chip designer.
But although the formula \$ f= 1/T \$ is always true in the case of SPI you should look at the broader picture: $$ \frac{1}{t_{CYC,MAX}} < f_{clock} < \frac{1}{t_{CYC,MIN}}$$
But notice how the datasheet only defines the minimum clock cycle and leaves the maximum blank. This goes to mean that you can put any value higher than the minimum in there, and it will still hold.
It should have had the value of \$ \infty \$, but since you can not normally divide by infinity they choose to not break the math.
What this means for you is the above formula, approximately, translates to $$ \frac{1}{\infty} < f_{clock} < \frac{1}{250 ns}$$ with the final result being $$ DC < f_{clock} < 4 MHz$$
The strange
Now, unless you really, really know what you are doing and that you absolutely need this you should never run your clocks at the maximum specified frequency.
I will assume you are deriving your clock from a regular, non-ovenized and non-temperature compensated crystal. If you, for some reason, are using an RC circuit for this then the effect described are even worse. If you have a good atomic clock as your reference than you can ignore the below two paragraphs...
The clock source you use is not accurate, nor stable. It changes its operating frequency with age, due to temperature changes and your supply voltage being unstable and noisy. Even worse, Quartz crystals can react to speach, a truck passing by or you tapping on the table.
What this means at the end of the day is that if you design for \$ f_{max} \$ then even the slightest disturbance in the environment can cause your system to go out of spec. In your case: \$ f_{clock} > 4 MHz \$ !
At this point funky things start to happen, ranging from your system working as expected or even better and up to it creating a small black hole and eating all the money you spent on the project.
So always keep a hefty safety margin!
Now regarding this specific devices' (albeit the next trait is shared among most SPI devies) communication protocol. You should note section 7.5.1 on page 25 and figure 17 on page 26: "To complete the read or write transaction, SCS must be set to a logic 0". And looking at item 6,7 & 8 from section 6.6 it seems you need to add another clock cycle with the CS being low. I would add at least two if I were you.
The slow
But now comes the most interesting part: are you sure you need all that speed? The table at section 6.7 tells us that the maximum step frequency is 250 kHz. That is, not matter what you do you can not change the position of your motor faster than 250,000 times per second.
Moreover, if you consider that the SPI clock is a bit clock, and you need to send 16 bits of data plus an extra clock when the CS is low, you will see that you can not write to the configuration registers faster than \$ 4 MHz / 17 \approx 235 KHz < 250 KHz\$.
At this point you might have one of several reasons to still want to run your SPI at maximum speed:

You want to read the status register to detects stalls and other problems ASAP.
You want to do an "extra-smooth motion profile" (section 7.1 page 10) by constantly changing some configuration.
You need really fast start times

If you do not need to do any of the above I would just set the SPI clock to a value of several KHz, since you will only be using it once after power-up to do some settings.
The unknown
Regarding the pre-scaler setting in the micro controller: Since you did not write what is the frequency of your clock source and how your clock tree is configured I can help you with that one.
P.S.
Whatch out for the SPI mode!

Max SPI data rate supported


how to make BindingNavigatorAddNewItem to ask primary key in a dialog?

Question: how to make BindingNavigatorAddNewItem to ask primary key in a dialog while new row is created after button  is clicked?
currently its adding blank row to end of DATAGRIDVIEW that is a big confusing for end user , if user forgets to enter primary key exception occurs.
Answer: In most cases users should not be aware of primary keys. Instead of having to enter a primary key, let the database auto-generate one for you by setting the key as an identity column.
You tagged this asp.net but the question is a win-forms question.


Can the word 'aggregation' be used to mean a collection of people?

Question: I'm wondering if one can use the word "aggregation" to mean a team or a collaboration of sorts, or even a certain collection of individuals in general, not just objects. Any thoughts?
Comment: **Cohort** can be a useful word here, particularly in statistical discussions.
Answer: In a word, yes.
Here's one of the definitions according to the OED:

4. concr. A whole composed of many particulars; a mass formed by the
  union of distinct particles; a
  gathering, assemblage, collection.

And from the quotations:

1638 Chillingworth Relig. Prot. i. ii. §142. 107 The Church being nothing else but an aggregation of Believers.
Answer: Aggregation can certainly be used to mean a collection of individuals.
I will note that, in my mind at least, aggregation tends to imply a level of disorganization or heterogeneity that I think somewhat conflicts with the idea of a formalized team.  So, while it works well for an ad hoc collaboration working towards a particular end, I probably wouldn't use it for a group that is otherwise already entangled.
Answer: In a word, no.
While aggregation can technically be used to describe a group of individuals, in common modern usage it only describes a group of objects.
Simon Jester's second example shows a usage of the word that has generally gone out of style.
Language is an ever-evolving animal, and majority usage rules – even if the dictionary tells you otherwise.  Dictionaries are outdated almost the moment they are published, especially in this day and age. (Opinion)
If you must use aggregation to describe a group of individuals, try focusing on a quality (i.e. object) that the group shares, e.g.

... an aggregation of the writers' skills.


Moving grid instead of model problem

Question: I use A to select all my model parts, but when I hit G to move it only the grid moves. How do I correct this?
Answer: Are you currently looking through your camera? If so, by selecting everything in the scene you also select the camera. By then using GKey to move, you're moving all your parts and the camera as well, so it'll appear that only the scene grid is moving.
Try locking the camera in place (the X, Y, and Z locations on the N Panel) and see if that helps.
Comment: Thanks, but it did not solve the problem.
Answer: You have the view locked to an object. Press N to show the 3dview properties region and find the View panel, in there you will find the Lock to Object option.
Click the little X to the right to disable the lock view to object.
Answer: If I got your question right you probably enabled the snap during transform option. Disable the magnet button and it'll work as you need.

Moving grid instead of model problem


Blender EEVEE render engine not working

Question: The material shader is not showing or not able to change. Only blank black shader is visible. blender 2.8 test release.
Answer: Blender 2.8 is still under development and until the official release is made there are many things that will not work correctly.
Information about reporting bugs in Blender can be found here:
https://wiki.blender.org/index.php/Dev:Doc/Process/Bug_Reports

Blender EEVEE render engine not working


訓読み for 歳: とせ vs. とし

Question: There are two 訓読み readings of 歳: とし and とせ. Looking at はたち (二十歳), a reasonable hypothesis would be "ち is a contraction of とし". I know very little about sound shifting in Japanese. Is とせ more recent than とし? Is /si/ -> /se/ (or /i/ -> /e/) a common phenomenon?
Answer: Classical Japanese is not necessarily my forte but here is what I do know.
I would say that the two readings are just as old as each other because they both appear in Classical Japanese.  As far as I know, the reading depends on the positioning of 「歳」 in a word. Needless to say, I am only talking about [大和言葉]{やまとことば}, not loanwords from Chinese.
When 「歳」 appears at the beginning of a word or it is used by itself, it is read 「とし」.

「[歳]{とし}」= "year"
「[歳返]{としかへ}る」= "the year changes" or "the new year comes"
「[歳長]{とした}く」= "to get old"

When 「歳」 appears in another place in a word, it is read 「とせ」.

The examples that @Kaji listed
「[幾年]{いくとせ}」= "(how) many years"
「[千歳飴]{ちとせあめ}」= "a candy for kids that people buy to pray for longevity"

There might be exceptions out there that I am not aware of.  I ask the experts here to feel free to correct me.
Answer: I know I've seen とし in classical Japanese texts before; don't know about とせ offhand.  That said, the few examples I can find in the dictionary using とせ all pair it with native Japanese numbers (一年【ひととせ】, 百歳【ももとせ】, 千歳【ちとせ】, etc.), which suggests that its history is close to as long.  As such, my hypothesis would be that it's something of a counter variant for it, kind of like how Chinese numbers would use 年【ねん】 or 歳【さい】.
Comment: @Earthliŋ 旺文社古語辞典 agrees that ち in this word is a suffix like つ (and it gives the same kanji for both suffixes, `箇・個`).  It lists two meanings, にじゅう and 二十歳, which suggests it was not contracted from とし.  Also, I suppose it would have been とせ rather than とし if that were the case, since とせ was the suffix that attached to numbers.
Comment: But はたち looks like a contraction of はたと*し*, or is that just me?
Comment: Found it: http://www.sf.airnet.ne.jp/ts/language/number/ancient_japanesej.html

If you look at the second chart in the column marked 個数, it appears there.  So in other words, while it's written as 二十歳 since it deals with age, it's actually an extension of 〜つ, it seems.

訓読み for 歳: とせ vs. とし


How much air ventilation required for oil burner in a closet?

Question: We are redoing our basement and closeting off the boiler and hot water heater. With our layout, it makes most sense to vent it out of the chimney. However, I want to make sure we are getting enough air draw. Does anyone know if slated doors are enough? Is there a better system I'm not thinking of?
Comment: That's a fairly loaded question for a potentially dangerous situation and with very little information. Perhaps update your question with a model number or accurate description of the unit?
Answer: According to NFPA 31, you'll need two openings. One near the top, and one near the bottom. Each of which must be 1 in.² per 1000 Btu/h of the input rating of all the appliances in the confined space.

NFPA 31 Standard for Installation of Oil Burning Equipment.
Chapter 5 Air for Combustion and Ventilation.
5.4 Appliances Located in Confined Spaces.
5.4.1 All Air Taken from Inside the Building.
126.96.36.199 The confined space shall be provided with two permanent openings as shown in figure 184.108.40.206, one near the top of the space and one near the bottom.
18.104.22.168 Each opening shall have a free area of not less than 1 in.² per 1000 Btu/h (140 in.² per gal/h) (22 cm²/kw), based on the total input rating of all appliances in the space.


Whats a good way to protect a link database from automatic scrapers?

Question: I have a large link database, that I would want to protect against others who would want to copy them. Is there anything I can do other than force people to enter a CAPTCHA before each link?
Answer: you can output the links using ROT13, and then use javascript to put them back to normal.
this way, the scrapers must support javascript in order to steal your links, which should cut down on the number of eligible scrapers
bonus points: replace ROT13 with something harder, and obfuscate your 'decode' javascript.
Comment: what would make it really hard to crack is when you alternate between several encode/decode algorithms. So sometimes, the URL would be ROT13, other times just base64 or something else still. Unpredictable encodings are hard to recognize, while you always know which method you are using.
Answer: The javascript suggestion could work, but you would render your page inaccessible to those using assistive technologies like screen readers as well as anyone without javascript.
Another possible option would be to generate a cryptographic nonce. This technique is currently used to protect against CSRF attacks, but could also be used to ensure that the scraper would have to request a page from your site before accessing a link. This approach may not be appropriate if you support hotlinking, but if you just want to make sure that someone went to your site first, it could work.
Another somewhat ghetto option would be use referrers. These can be easily faked, but it might prevent some of the dumber scrapers. This also requires that you know where your users came from before they hit your site.
Can you let us know if you are hotlinking or if the user comes to your site before going to the protected link? We might be able to provide better advice that way.
Comment: Users will always come from my site before going a link.


What is/are the advantage(s) of running applications in backgound?

Question: I really don't know what are the advantages of running applications in the background.
Something like Application & via command line.
Why exactly do we run applications in background and when should I decide to do so?
Answer: Generally applications that take too long to execute and does not require user interaction are sent to background so that we can continue our work in terminal.
Jobs running in background are treated same as jobs running in foreground except that their STDOUT, STDIN and STDERR varry.
If you have a job that take too long, like file compression or backup you can send those jobs to background.
You can  list the jobs that are running in background using jobs command.
$ ./job1.sh &
[1] 9747
$ ./job2.sh &
[2] 9749
$ ./job3.sh &
[3] 9751
$ jobs
[1]   Running                 ./job1.sh &
[2]-  Running                 ./job2.sh &
[3]+  Running                 ./job3.sh &

Here whenever a job is sent to background shell displays the job id and pid of the process. In case if we want the process to get back to foreground we can use fg command to bring it back.
$ fg 1
./job1.sh

But be aware that when you close the terminal (shell) SIGHUP will be sent to all background process that are spawned from the shell causing those processes to die. To prevent this you can use disown command to remove those process from the job table and thus preventing the process from getting killed.
one best way is to start the background process with nohup command so that SIGHUP signals will not kill the process and it will run safe in background.
Preventing SIGHUP to be sent to child processes (bg jobs) can also be prevented by setting huponexit option of the bash shell.
$ shopt -s huponexit

This option is set by default in latest versions of Bash, but in case if its not set, we can add this to ~/.bashrc to make it a default behaviour.
Answer: If you execute an application that needs - let's say 5 minutes to end, for example a copy job - the shell is blocked while the program is running, the whole 5 minutes. The copy job is then in the so called foreground process group, indicated by a + sign in ps. You may need to do some other work during that 5 minutes, but the shell is blocked.
On the other hand, when you execute the copy job in the background (cp source target &) you job executes in the background without blocking the current shell. You can continue with other things. You can bring the process back to foreground with fg if you wish.
Comment: In other words, it provides more or less the same mechanism a thread does in high level programming languages (so as not to block current thread)


Looking for feedback on an audio rework I made on Elder Scrolls Online -trailer

Question: Greetings!
Would love some feedback on my first "demo reel", an audio rework I made on the first minute of Elder Scrolls Online -trailer. What do you think? Does it "work"?
I was asked to keep the music side on a small scale.
http://www.youtube.com/watch?v=AqGSyjH_8CQ
Answer: The detail work is really nice - especially the armour Foley. Though I think you could exaggerate the footfalls on the big guy in the helment - give him some weight. He sounds pretty like on his feet.
Though the monster growls are really nice - it's not obvious that it's coming from the creatures at the end of the cave. I actually thought it was the language of the band of warriors because 1) you have the noises occur when we couldn't see their mouths and 2) the noises were occurring dead centre of the stereo field. You need to pan those to the right - and adjust the reverb so it starts distant - then as we get closer we can hear the monster calls more and more clearly. It's about giving a sense of travel. The characters visual perspective should match the audio perspective.
Oh and crash through the wall at the start is mad distorted. Remember a loud noise isn't about how much it peaks, but the change in the dynamic range and the frequency range it occupies. Maybe play with having a build up - either a ramp or maybe a couple of softer slams before the wall completely falls apart. It's good you've got a bit of after debris in there though.
I think there's a good opportunity to exaggerate some the drama a bit more - when the hand goes up to tell the party to wait, give it a nice heavy leather whoosh or something. Maybe some soft bass booms on the titles too.
Also the end makes no sense to me. There's all these eyes around being perfectly still, but the roar makes it sound like a monster is jumping out...but it's not. It feels like the sound is trying to oversell something that the visuals aren't even doing. Maybe go for a creeping tension rather than jump horror for the end bit? Not sure - just play around with some different ideas and see how they play.
Phew! Good news is that you've got the most difficult parts already sorted. It's super atmospheric and there's all these awesome details in there that make the world feel real.
Comment: Thanks for the detailed reply!

There's actually -3dB headroom or something from the highest peak of the audio track. For some ridiculous reason the people behind Youtube decided that it would be a great idea adding a volume bar, that allows you to set volume up to 250% or something (like in VLC Player). When you have volume at 33% or something, you are at "normal 100%". There's no overlay to point this even out, which is absolutely terrible.

The most confusing part is, not all the videos on Youtube have this "lovely feature" enabled. Why on earth would they add that?!

Thanks again!
Comment: I have never seen this feature? Do you have a link for it in action?


Better alternative to WAF path whitelisting?

Question: We are managing a WAF which is being used by some applications. Recently I tried to use a Valid URL module to whitelist all the APIs and static resources of an application. Although from the security perspective it is good, I have to deal with the development team every day for opening new paths for them. It is kind of frustrating and needs a new changes to all environment every day.
I was thinking maybe it is not the best approach for using a WAF.
Do you now any best practice for this issue?
Answer: Not sure there is a 'best practice' as every organisation is different, however a very common practice in large enterprises is to use a combination of white and black-listing.

For Dev environments you may just want to blacklist, because changes are very frequent.
For Prod environments whitelist and lock down as much as you can. And blacklist known bad sites.

Where you have different applications in different DMZ's you can work on a risk-based and change-based mechanism and have some combination of the above, so that every firewall has a setup based on the profile needed.


feature selection in decision tree classifier

Question: i want to build decision tree classifier, and i have no idea how to extract feature from text (my file is text) can anyone help me? is BOW, N-gram orTF-IDF useful?
Comment: This seems a bit under-specified. Without knowing what sort of text you want to process, we won't have a better idea that you on what sort of method is suitable.
Answer: This depends on your application but the trend is to use Deep Learning.  That is, allow the algorithm to learn the features as opposed to do feature engineering (e.g. choose between BOW, n-gram etc).
See for example this paper (Gender Classification with Deep Learning by Aric Bartle, Jim Zheng) where they compare the performance of BOW/n-gram/vs Deep Learning via Recurrent Convolutional Networks.   Deep Learning generally outperforms classic feature engineering.
https://cs224d.stanford.edu/reports/BartleAric.pdf


Why is consing in Lisp slow?

Question: I read in the book 'On Lisp' that one should avoid excessive use of cons in the body of expanded macros.  Why is cons considered to be an inefficient operation?  Does Lisp not do structure sharing with the cons cells?
Comment: Section 7.8, Macro Style, pg 101, Graham writes "Macros are often used to implement general-purpose utilities, which are then called everywhere in a program. Something used so often can't afford to be
inefficient. What looks like a harmless little macro could, after the expansion of all the calls to it, amount to a significant proportion of your program. Such a macro should receive more attention than its length would seem to demand. Avoid consing especially. A utility which conses unnecessarily can ruin the performance of an otherwise efficient program.
Comment: Can you give a section reference in the On Lisp book? Perhaps we could help explain what that statement means given its context.
Answer: You need to understand the jargon first.
CONS is a primitive operation to create a fresh cons cell.
Consing means allocation of memory on the heap in general, not only cons cells: Consing of numbers, Consing of arrays, Consing of CLOS objects, ...
The definition from the 'memory management glossary' says:

cons(1) In Lisp, cons is a primitive operation creating a list element (from English "CONStruct"). By extension, a cons is the element created.
cons(2) (for full details, see allocate) Allocation is the process
of assigning resources. When
requested to by the program, an
application memory manager or
allocator allocates a block of
memory(2) for the program to store
its data in. Allocation is also
known as consing, from cons(1).

So, Graham uses the second meaning.
If Graham says 'Avoid consing especially. A utility which conses unnecessarily can ruin the performance of an otherwise efficient program.' - that means: avoid unnecessary memory allocation on the heap. But this can be true for any code - macro, function, whatever.
That was particular true when computers had less memory and Garbage Collection was more costly (especially when it needed to scan swapped out memory in virtual memory systems, where the physical memory is smaller than the virtual memory).
Today consing is less an issue, but can still be relevant.
Take for example a the function READ-LINE, it reads a line from a stream and 'conses' a new string. Note that the string is not built out of conses, but it is a vector. We mean here 'allocates a string on the heap'. If you have a large file with lots of lines, it can be faster to have a routine that gets a buffer and which fills the buffer with the line characters (there are vectors in Common Lisp with a fill pointer for this). That way the line buffer is just one object and can potentially be reused for calls to this line reading function.
See this example in the Allegro CL documentation: Some techniques for reducing consing when processing very large text files.
Answer: I don't think cons is slow. It doesn't create a new copy of the entire list, it just appends a new element onto the front of a linked list.
If anything is slow, it's that it has to allocate some memory for the new node. If you're creating lots and lots of nodes it might be better to create them all in one go instead of one-by-one.
Comment: and this is what confused me - cons should be a constant time operation.  In this case, I'm a little fuzzy about just why I wouldn't want to cons often in the expanded macro code
Answer: Actually consing is quite fast in good implementations, but you can gain better performance by avoiding it. You can safely use destructive operations if the things you alter have been freshly created by yourself, as in this example:
CL-USER> (defun non-destructive ()
           (progn
             (reverse (loop for x from 1 to 100000 collecting x))
             nil))
NON-DESTRUCTIVE
CL-USER> (defun destructive ()
           (progn
             (nreverse (loop for x from 1 to 100000 collecting x))
             nil))
DESTRUCTIVE
CL-USER> (time (non-destructive))
(NON-DESTRUCTIVE) took 140 milliseconds (0.140 seconds) to run
                    with 2 available CPU cores.
During that period, 156 milliseconds (0.156 seconds) were spent in user mode
                    0 milliseconds (0.000 seconds) were spent in system mode
94 milliseconds (0.094 seconds) was spent in GC.
 1,600,024 bytes of memory allocated.
NIL
CL-USER> (time (destructive))
(DESTRUCTIVE) took 93 milliseconds (0.093 seconds) to run
                    with 2 available CPU cores.
During that period, 93 milliseconds (0.093 seconds) were spent in user mode
                    0 milliseconds (0.000 seconds) were spent in system mode
63 milliseconds (0.063 seconds) was spent in GC.
 800,024 bytes of memory allocated.
NIL

So: Yes, avoiding consing can improve performance, but you should only use destructive modification if you know what you're doing. I would not say that consing is "slow" per se, but nonetheless avoiding it can be beneficial. If you compare the difference in allocated memory (which takes its time), it should be clear why the second version is faster than the first one.
Comment: I am no expert about whats going on under the hood of Lisp implementations, but I'd say: Yes, allocation and GCing is what it boils down to.
Comment: On Lisp was published in 1993. The GCs of today are light years beyond what was in actual implementations back then. consing now is much cheaper than then. (although still not free, as danlei shows)
Comment: I'm still curious to know why this is the case. Does it just come down to memory allocation - as Mark Byers suggested above?
Answer: Consing, which is Lisp jargon for dynamic memory allocation, isn't slow. But it adds overhead to the program. You cannot just look at the cost of allocating the object, but at the full cost of the lifecycle, from creating the object to reclaiming it when it has become garbage.
Unnecessary consing "exerts pressure" against the garbage collector; it makes garbage collection work more often.
(It's not a Lisp issue. For example, C programs that make lots of calls to malloc and free, or C++ programs that use new and delete a lot will also not perform as well as similar programs which are better organized to avoid many of these calls.)
You don't have to be paranoid about avoid consing in Lisp, because that will make programming inconvenient, and some of the tricks for avoiding consing, involving destructive re-use of existing objects, are prone to bugs.
But it can pay to watch out for in consing that happens in inner loops that are executed a large number of times, and in low-level code like utility functions that are intended for wide reuse. For instance suppose that mapcar internally built up the result list in reverse, and then put it in the correct order by calling reverse instead of nreverse. Then, everything that calls mapcar would suffer from unnecessary consing.

Why is consing in Lisp slow?


developing an app together

Question: I'm using google-app-engine on Java to develop a web application with a friend. Every time we make changes in the code, we have to manually send each other the fixed .java file through email and tell each other what changes have been made. I would love to see if there is a more convenient way for us to make changes in our code and share. thank you in advance!
Answer: Use source control.
Subversion is popular, though GIT is gaining popularity these days.
There are many other SCM tools out there and many hosted services.
There are many benefits to using a SCM apart from being able to easily share code (you have a history of your codebase and can revert changes, see who changed what and more).
I wouldn't consider a programmer to be a professional if they do not use SCM.
Answer: Use a source code version control system like git or subversion.
For comparison see: http://en.wikipedia.org/wiki/Comparison_of_revision_control_software
The best solution will be to host in on a server accessible by all developers, so that any of you of you can access the repository without notifying the other.
Answer: You can use a project hosting site. like
http://www.code.google.com/
Comment: But only if your project is intended to be open source.

developing an app together


What is the difference between a model and algorithm?

Question: I would say that an algorithm is a private case of model because it describes how something generally works --- just mathematically.
Comment: Questions about meaning of words are more suitable for English SE. [Algorithm](https://www.merriam-webster.com/dictionary/algorithm) is not a model, it is an instruction for performing calculations, and it does not have to be private.
Comment: A model is a mathematical representation of an object or phenomenon, usually a formula or a set of formulas. An algorithm is a step by step systematic (it does not require reflexion at any step) way to compute a solution to a problem. An algorithm can be based on a model, like a game of chess represented as a series of numbers, but those are two very different things.
Comment: In mathematics a "model" is a collection of "objects" with their properties that satisfy a theory: natural numbers are a model of arithmetic.
Comment: An algorithm is a "procedure" to solve a problem/produce a result,like the rules for addition that can be applied to a pair of natural numbers to compute their sum.
Comment: Just as an observation, as well as what these words mean in mathematics, there is also a colloquial AI usage of "Model" meaning something like "a system of weighted bayesian decision networks after having been updated with training data".  In this respect, sophisticated AI algorithms sometimes rely on an underlying bayesian model as part of their process of making unsupervised decisions, but the concept of Algorithm is broader than those that use Bayesian learning systems.
Answer: Formally, an algorithm is "a specific set of instructions for carrying out a procedure". Bread is not an algorithm, but a set of instructions on how to bake bread is an algorithm. A formula is not an algorithm, but a set of instructions on how to solve a formula (such as PEMDAS) is an algorithm. Pi is not an algorithm, but a set of instructions on how to calculate pi is an algorithm. None of these algorithms are models.
A model is a known system which has been claimed to behavior similarly to an unknown system. An algorithm can be developed which then becomes a model, or a model can be proposed which is then tested by an algorithm. Conway's Game of Life is an algorithm about how to change a grid of 0's and 1's; it became a model when someone claimed that the 0's and 1's behave similarly to organisms. The Combined Gas Law is a model; an experiment designed to compare the predictions of this law to actual gasses is an algorithm. There are very few model that have no corresponding algorithms because when someone creates a model they usually propose a algorithm that would allow testing of the model. In principle, they can exist though.
When Democritus first proposed his theory of atoms, he was proposing a model. However, an algorithm that would allow comparison of this model to the actual world did not exist at the time. Eventually such algorithms were developed, but for a while there was a model that did not correspond to any algorithms.


Relation between Ramanujan Theta Function and Jacobi Theta Function

Question: In the theory of $q-$series,
we have Ramanujan Theta function
\begin{align}\label{rama-theta}
        f(a,b):=\sum_{n=-\infty}^{\infty}
        a^{\frac{n(n+1)}{2}}b^{\frac{n(n-1)}{2}}
        ,\qquad |ab|<1.
\end{align}
And we also have Jacobi Theta function in complex analysis defined by
\begin{align}
          \Theta(z|\tau)=
          \sum_{n=-\infty}^{\infty}e^{\pi i n^2 \tau}e^{2\pi i n z}.
\end{align}
We can also write it as
\begin{align}
          \Theta(z|\tau)=
          \sum_{n=-\infty}^{\infty}q^{n^2}\eta^n,
        \end{align}
where $\eta=e^{2\pi i z}$ and $q=e^{2\pi i \tau}.$
In wiki, https://en.wikipedia.org/wiki/Ramanujan_theta_function,
he says "…… the Ramanujan theta function generalizes the form of the Jacobi theta functions……".
I cannot understand why it can be regarded as a generalization.
In my opinion,
Jacobi triple product have the following two expression
\begin{align}
\Theta(z|\tau)=\prod_{m=1}^{\infty}(1-e^{2\pi m i\tau})\left[1+e^{(2m-1)\pi i \tau+2\pi i z}\right]\left[1+e^{(2m-1)\pi i \tau-2\pi i z}\right].
\end{align}
But in the notation of Ramanujan,
we have
\begin{align}
          f(a,b)=(-a;ab)_\infty(-b;ab)(ab;ab)_\infty.
\end{align}
This is more beautiful.
However,
I still don't know what's the relation between the two kinds of "Theta function".
Anybody can help me?
Answer: It is easy to see that the theta functions of Ramanujan and Jacobi are equivalent if we have $$ab=e^{2\pi i\tau}, a/b=e^{4\pi i z} $$ or $$a=e^{\pi i\tau+2\pi i z}, b=e^{\pi i\tau-2\pi i z} $$ Thus given any complex numbers $a, b$ with $|ab|<1$ gives us values of $\tau, z$ such that $\tau$ has positive imaginary part. The equations given above on the other hand express $a, b$ in terms of $\tau, z$.


Differences between jsf with and without jboss

Question: It has been almost a month since i started working with jsf and jboss. I've worked with jsf before. But i didn't use jboss, just apache with it.
I've done a bit of search and i found that JBOSS is:
WildFly, formerly known as JavaBeans Open Source Software Application Server is an application server that implements the Java Platform, Enterprise Edition. JBoss is written in Java and as such is cross-platform: usable on any operating system that supports Java.

And instead of managed beans, there are Action classes. As far as i know, the concept is the same, but some annotations are different.
Are these the only differences between jsf with and without jboss? What good does it do in a jsf application? Is jboss really required?
Comment: What do you mean by Action classes?I've never heard of them in context of JSF
Answer: No, you don't need specifically JBoss AS (now Wildfly, the name has been recently changed) but you obviously need some web container (de facto web server) which run JSF applications (for instance Tomcat, Jetty, Resin or Wildfly).
Difference between plain web container (Tomcat, Jetty) and application server (Wildfly, Glassfish) is that in AS you can use Java EE technologies like EJB or JMS. For JSF the difference is that JSF libraries are usually bundled with application server so you don't have to put them into your WAR file (or have scope provided in Maven).
Comment: Hmm..i see. In fact, my friend here told me that there are some parts in the project with hibernate. Oh yeah...what what is this "Seam" thing?
Comment: Seam was a framework created to ease using of Java EE technologies (like JSF) - nowadays is mostly replaced by Apache Delta Spike so it's not under active development anymore.


What do you do when the user interrupts the purchase process?

Question: If a user on an e-commerce site is in the middle of a purchase process when they leave to another part of the site, or perhaps leave the site completely, what information should be retained if they return to the checkout process? Should it keep their payment information? Should it ask for some sort of confirmation like "what are the last four digits of your payment card?" in order to retrieve that? Should it completely forget everything and just go back to a full cart as though no checkout attempt happened?
Comment: You also don't want it to reset too quickly as the user goes off to hunt out which jacket / coat has their wallet in so they can find their credit cards.
Answer: General rules of thumb:

it should not save any personal info unless I asked it too (such as credit card info--people don't trust a site that is storing their personal data without their permission)
it should save non-personal info for my convenience (such as my shopping cart--if it's saved, I'm more likely to finish my purchase)
Comment: Should it pop up a modal if they try to leave asking if they'd like to first save their payment info?
Comment: @JClaussFTW you should ask before saving--but should you save to begin with? I'd say if they are leaving on payment screen, they likely have good reason to and you asking to save their personal info might seem a tad over-the-top. But that's just a hunch/personal opinion.
Answer: I would absolutely save the users cart.
You could do this by checking to see when the cart was last updated in your database for example or cross-referencing the User ID with the Cart ID to check if the user has left the site but with a cart full of goodies.
Then - you have a few options:

Save the cart - and re-instantiate the cart when they come back / log in
Save the cart - and email them later to let them know that you saved the cart
Save the cart - and don't tell them anything (this is what you wouldn't do)

People, once they have left the site - just tend to forget completely that they even visited your site in the first place. It will absolutely help your business / shop if you at least remind them or let them know that if they abandon your cart, it will still be there when you get back. The best way, IMHO, is by email.
DA01's point about not retaining sensitive information is also valid, only retain their cart items.


Why only sarei chamishim for spies?

Question: The Baal HaTurim brings down that the spies were sarei chamishim (leaders of 50).
Why didn't Moshe send higher ranking officers as spies for such an important mission?
Comment: For some reason, this question reminded me of Stratego...
Answer: The Ostrovtzer Rav in Me'ir Eynei Chachamim explains that a leader is imbued with the power of the group that he leads, in this case 50 people. He further notes that the Jewish people were blessed that each one of them had the power of a thousand people based upon the pasuk in Haazinu (Devarim 32, 30) (he seems to follow the Ibn Ezra's second peshat). As there were 12 spies, together they represented the force of 600,000 men (12 x 50 x 1000) who were to fight to enter Eretz Yisrael.
Comment: interesting. but wouldn't it be more likely to succeed if higher ranked leaders were sent. Moshe knew there was a danger in this mission.
Comment: perhaps they wanted to do some hishtadut in a minimum way
Answer: Rabbeinu Yosef Bechor Shor (a talmid of Rabbeinu Tam) took a different view. He wrote that they were actually 'sarei alafim' - leaders of thousands.
I haven't seen much discussion of the Baal Haturim's opinion that they were 'sarei chamishim'. However, I don't think that had they been higher ranked judges that they would necessarily be better spies.
I would like to humbly suggest a few reasons why Moshe might not have sent more senior people. (As a side point, I should probably mention that the Emes LeYaakov held that the spies were chosen through the Urim VeTumim, and if so the question is not on Moshe personally.)
Usually, an army does not send the most senior people on high risk missions. Of course there is a need to send capable people, but not the 'top brass'. If really the top people should have been sent, why not include Moshe and Aharon themselves?
Outstanding people also attract a greater level of Ayin Hara. This is why we see in the Gemara (Berachot 31b) that when Chana prayed for a son, she asked that he should not be too tall nor too short, neither too thin nor too corpulent, neither too pale nor too red, neither overly clever nor stupid. Therefore it might not be best to send people at the very top.
In addition, we see from various commentaries (e.g. Kli Yakar and the Netziv) that the entire reason for sending the spies was that the Jewish people did not want, or did not feel worthy of a direct connection with Hashem. The level was too high for them. (The Netziv points out that they now knew that Yehoshua would lead them into Israel, and as they had seen in the war with Amalek, the war he fought was on a more physical level.) They wanted to conquer Eretz Yisrael in a more 'natural' way. Therefore, the slightly lower spiritual level of the spies would be more in line with the Jews' request.

Why only sarei chamishim for spies?


Are two states with the same measurement probabilities necessarily equal up to unitary equivalence?

Question: Let $\rho$ and $\rho'$ be $n\times n$ density matrices, and suppose that for every observable $A$ and every $\lambda$ in the spectrum of $A$ we have
$$
\text{tr}(\rho P_{\lambda})=\text{tr}(\rho' P_{\lambda}),
$$
where $P_{\lambda}$ is the orthogonal projection onto the $\lambda$-eigenspace of $A$. Does it then necessarily follow that $\rho'=U\rho U^{\dagger}$ for some unitary $U$?
Answer: Let $H$ denote a finite-dimensional complex Hilbert space, $\rho$ and $\rho^\prime$ be two density matrices, i.e. positive semi-definite operators with unit trace and $A$ an arbitrary hermitian operator. Its spectral representation reads
$$ A=\sum\limits_\lambda \lambda(A)\, P_\lambda (A) \quad .$$
If the equality in the question holds for all $A$, then $\rho^\prime = \rho$. To see this, multiply the equality with $\lambda(A)$ and sum over all $\lambda$. We then find
$$\mathrm{Tr}\rho A = \mathrm{Tr}\rho^\prime A \quad, $$
which we can write as
$$\mathrm{Tr} (\rho-\rho^\prime)A = 0 \quad  \forall A  \quad .$$
Now there are several ways to see that this implies $\rho-\rho^\prime =0$. For example, pick $A:=\rho-\rho^\prime$. Then $\mathrm{Tr} A^2 = 0$. But $A^2 \geq 0$ and thus $A=0$.
Answer: Actually $\rho=\rho'$. Indeed, specializing $A= P= |\psi\rangle \langle \psi|$ for $||\psi||=1$, the hypothesis implies $\langle\psi| (\rho-\rho')\psi\rangle =0$. Linearity permits to relax the requirment $||\psi||=1$. By polarization, in turn,  it implies $\langle\psi| (\rho-\rho')\phi\rangle =0$ for every pair of vectors $\psi,\phi$. Fixing $\phi$ and choosing $\psi:= (\rho-\rho')\phi$, we conclude that, for every vector $\phi$
$$|| (\rho-\rho')\phi||^2 =0 $$
which means $\rho-\rho'=0$.
The result is valid also for infinite dimensional Hilbert spaces.
Comment: A very stupid condition is that the states are both pure. So your question is maningful only for mixed states. A condition is that $\rho$ abd $\rho'$ have the same spectrum and each eigenspace is non-degenerated.
Comment: Thanks for the answer! Do you know of some weaker form of the hypotheses which yields equality up to unitary equivalence rather than equality?
Comment: So superposing two different  sequences of mutually orthogonal pure states with the same classical  probability distribution (and different ptobabilities for different pure states in each sequence) leads to a pair of  unitary equivalent mixed states.
Answer: The answers from Jason Funderberker and Valter Moretti are perfect at explaining mathematically how the equivalence of all possible measurements requires the two density matrices to be the same.
However, something I think is important to highlight is that this is not some kind of mathematical accident, it is an essential part of a good theroy. If two things are completely impossible to distinguish from one another in real life (with experimental measurements), then it is really bad if the theory says the two are in fact distinct. If the two could not be distinguished by the experimentalists, then why did the theorist trying to fit a model to there results insist that the two were in fact different? Its is a big no-no.
If density matrices did not have that property they would not be a good representation of the system (and our ignorance of the system), and they would need to be replaced with a different approach.
Comment: If nature has properties that are not distinguishable by any measurement then we (as human beings) would not know that those properites existed - so we could not put them in theory (except maybe by dumb luck). The entire point hidden variables is to explain why two states propared the same way are actually observed to be different in a real measurment. The POVMs is a very good point. A theory where to be indentical two states needed the stronger condition of fully matching on all POVMs would be very reasonable by my standards. I fully agree that the fact that PVMs are enough is a non-trivial.
Comment: But isn't it possible that nature may have properties which are not distinguishable by measurement (e.g. hidden variables)? Moreover, the question only addresses PVMs. A priori it could be the case that two states are equal if and only if they agree on all POVMs, but it turns out that being equal on PVMs is sufficient.


Explicit images sent by adults

Question: I know that distribution and possession of any explicit images of children are illegal as it is child pornography. On the other hand, is it illegal for an adult to send explicit images of them to children in Australia? I know many countries charge the adult for obscenity, but what laws apply in this situation  for Australia? Please include sources.
Comment: Related question: [Is it legal for a child to ask an adult for nudes?](https://law.stackexchange.com/questions/79345/is-it-legal-for-a-child-to-ask-an-adult-for-nudes)
Comment: Somewhat related: https://law.stackexchange.com/q/80095/35069 (and presumably by the same OP..?)
Comment: It depends on if it's done knowingly.
Answer: If you send explicit images of yourself to a child, then the answer is yes.
You would be committing several offences.
For Safeguarding purposes, please don't send photos of yourself to children.

If image is unsolicited you could be charged under Spam Act 2003.
You could also be charged under section 218A of the Criminal Code 1899 for online grooming (if found to have coerced child into receiving photographs).

Explicit images sent by adults


Using a USB controller as auxiliary keyboard for Visual Studio

Question: Our family no longer uses our Mixman DM2 USB controller for making music.  This frees it up for me to use as an auxiliary keyboard with 31 "keys" (and a few "sliders").  I had the crazy idea to use these buttons to send keyboard shortcuts to Visual Studio.  It just seems easier pressing one key than some of the finger-bending ctrl double-key combos.
I tried a couple utilities like JoyToKey and XPadder but they only recognize game controllers and the DM2 falls into the more generic "USB Controller" category.
Have you ever heard of such nonsense?
Clarify Question: Are you aware of a utility to read inputs from a generic USB Controller and map them to keyboard key presses? -OR- Are you aware of a Visual Studio add-in that will read from a generic USB Controller?
Comment: Ok, so this is a 3+ year old question, so I'm a little late to the game. I've got a Hercules MK2 DJ controller that I'm trying to do the same thing with. You can map midi signals to keystrokes with "Bome's Midi Translator". However, even though I see the midi signals are getting translated to signals (for example, if I have notepad open, I can see the characters getting typed), Visual Studio is ignoring them. Hope this helps someone.
Comment: No progress so far.  I played with some different ideas but I still have not found a proper solution...
Answer: Haven't heard of it before, but I can't wait to see if you can make it useful!
You can assign Visual Studio functions to "chords" of key combinations, right?  So maybe you could play shave-and-a-haircut to start a build.
Answer: Yeah, I was thinking about doing something similiar to that myself. I'm pretty sure you'd have to write your own driver for it though.


How does Descartes use god in his Meditations?

Question: How does Descartes use god to avoid answering certain questions directly?
Answer: Following John Cottingham, I would suggest the answer has to do with what is called the "Cartesian Circle." While Descartes is often associated with radical doubt, the reality is that his Meditations escape from doubt pretty quickly. And the key to that is God.
Meditation 1 ends roughly at the idea that he could be deceived by an evil demon and everything is scrambled.
In Meditation 2, Descartes proceeds Ex hypothesi to argue that he exists -- but this is with the caveat that there is no evil demon. Here, he speaks of what is "clear and distinct" as that which is indubitable and that he (not as a man but as a thinking thing) exists as he has this feature.
In Meditation 3, Descartes presents a cosmological argument based on the existence of the idea of God to the existence of God insofar as he maintains that the only possible origin of a perfect and infinite idea must be perfect and infinite.
The thing is that the argument in Meditation 2  hinges on a guarantee that his mind is not being scrambled. But the argument in Meditation 3 hinges on him being able to use ideas he has in his minds. The mutual need for each proof is the "Cartersian Circle" and this makes it so he's not facing radical doubt by himself but rather one could say "using god to avoid" the effects of his initial radical doubt.
Comment: Purely pursuing an inquiry of my own here. Tell me, didn't Descartes assert that _the idea of God in itself proved God's existence_? Because if that is the case, it would today be considered a fallacious and unsound argument.
Comment: That's somewhat a separate question so if you want to continue on that point, please ask it as a new question. The argument is that *my possession* of the idea of God proves God's existence (thus I'd say it's better categorized as cosmological since it's about the origination of  that idea rather than the mere content of the idea). For more, see https://philosophy.stackexchange.com/questions/24714/descartess-third-meditation .
Comment: @SamparkSharma that is the Ontological Argument, and numerous people have proposed it; St. Anselm is the most common name associated with this argument.
Comment: @virmaior Is there really a Cartesian circle? I understand the argumentation as follows: 1. The sceptical method shows the existence of me as a thinking being (res cogitans) 2. The concept of God in my mind proves the existence of God. 3. The existence of God ensures the truth of my clear and distintive conceptions. 4. My clear and distinctive conception of myself as a person with mind (res cogitans) and body (res extensa) is true. - Of course one can question nearly every single step. But is there a circle?
Comment: I think there is. Descartes cannot justify the escape from doubt he takes at the end of Med 1 / beginning of Med 2 that enables him to trust his thinking without pre-emptively accepting God as guaranteeing the evil demon is not scrambling his mind (which he grants is possible in the deep skepticism of Med 1). I take the circle in its simplest form to be: (1) I need God to justify my accepting my concepts and (2) my concepts include God in such a way that justifies my accepting God's existence. / I'm not sure how one explains the jump to accepting his mind is not scrambled otherwise.
Comment: @virmaior I read Descartes' argumentation as follows: Even when his mind is scrambled, it contains the idea of God. For his line of argumentation it is not relevant whether this idea relates to reality or not. The decisive point is that his mind has this idea, see III, 6, even when his mind is scrambled. But that special idea, the idea of God, implies its relation to reality. That's Descartes' proof for the existence of God, see III.16ff. Furthermore I do not see a circle. - Aside, I agree with Sampark that this proof of God is very similar to the ontological "proof" of Anselm.
Comment: I take meditation 1 to mean that Descartes accepts *every idea* he has can be planted by the evil demon if the evil demon gets that sort of access. Only because there is a good God is it otherwise. / I'm not quite sure what you mean by "relates to reality" with reference to the idea of God, Descartes' later argument with reference to the idea concludes the idea either was innate or adventitous but could only be generated by God. It doesn't need to relate to reality (at least how I would normally take the phrase).
Comment: As in my most recent comment, the circle is that Descartes' only justification for using any ideas he finds in his mind is that he doesn't think he's being super-scrambled, *because God wouldn't let that happen*. When he then uses those ideas to then prove God, that's a circle.
Comment: Scholars are split as to whether Descartes proof should be categorized as ontological or cosmological, if you want to ask about that make a separate question. It's not the primary focus of this question. I've stated in the briefest form my belief that it is better categorized as cosmological above but would rather not try to write such a lengthy explanation in comments
Answer: Before Meditation 4 he has already determined that God exists and that he is perfect.
In Meditation 4  he establishes that it is impossible that God is unfaithful to him, because God is perfect and being unfaithful is not perfect. Furthermore, he establishes that he has the ability to think, and that he has necessarily got the ability from God. Because God is perfect and thus faithful, he has not received the ability to think to mislead himself, as long as he uses the ability in the right way. Later in the Meditation, he tries to understand why he can make errors, and he concludes that it is because he has not only knowledge, but also the power of choice.
Comment: "he has not received the ability to wander" seems to be either poor English or a misreading. Meditation 4 largely is about his ability *to err* despite being created perfect (with the faculty of will and the faculty of understanding)
Comment: @virmaior I am referring to this: Deinde experior quandam in me esse judicandi facultatem, quam certe, ut & reliqua omnia quae in me [54] sunt, a Deo accepi; cùmque ille nolit me fallere, talem profecto non dedit, ut, dum eâ recte utor, possim unquam errare.
Comment: @virmaior I updated the answer.
Answer: Descartes answer the question of the OP at the end of his 5th meditation (V.16):

And so I very clearly recognise that the certainty and
  truth of all knowledge depends alone on the knowledge of the
  true God, in so much that, before I knew Him, I could not have
  a perfect knowledge of any other thing.  And now that I know
  Him I have the means of acquiring a perfect knowledge of an
  infinitude of things, not only of those which relate to God
  Himself and other intellectual matters, but also of those
  which pertain to corporeal nature in so far as it is the
  object of pure mathematics.

Before, Descartes had defined God - in accordance with the Scholastic tradition, the dominant philosophy and theology of his time (III.22):

By the name God I understand a substance that is infinite, independent, all-knowing, all-powerful, and by which I myself and everything else, if anything else does exist, have been created.

And in III.36 Descartes terminates his proof of the existence of God

[...] but we must of necessity conclude from the fact alone
  that I exist, or that the idea of a Being supremely
  perfect, i.e. that is the idea of God, is in me, that the proof of God's
  existence is grounded on the highest evidence.

Having obtained this result, Descartes in Meditation 5 draws his conclusions from the existence of God. Primarily, the existence of God ensures Descartes' truth-criterion and consequently justifies the whole epistemology of Descartes (V.15):

[I] have inferred that what I perceive clearly and distinctly cannot
  fail to be true.


Generate a URL for Google Drive publicly shared files and access them

Question: I have a collection of PDF files on a Google Drive. I have shared them and I want to be able to link to them from a list on a web site. What I'd like to be able to do is work out the file name of the PDF using information in the list. As a simple example, if my list contains items 1, 2 and 3 I'd like to be able to upload PDF files 1.PDF 2.PDF and 3.PDF to Google Drive then have the web site just link to those when a link is clicked and show the PDF files in the browser.
So, I guess I could do this just by uploading the PDF to Google Drive and manually adding a link to PDF on the web site. However, what I want to do is generate the link programmatically so that when I have, say, 50 PDF files I don't have to keep getting the link from Google Drive and adding it to the web site. The site should just work out that item 50, say, in the list will link to 50.PDF, for example.
I've tried to get the file id using the API but that requires the authorization token to be generated and manual intervention to take place, so that won't work. At least, not at the point where the file is viewed because the viewer is anonymous.
So my questions are:
Is it possible to work out what a file name will be on the drive using just something like an item number in a list?
I guess that there are maybe some other options - for example, when I add the items to the list on the web site programmatically, I could go and locate the google drive file manually using a web application and link it using the file id at that point. I could store the ID in a database - however, would any anonymous user then be able to just click on the file link on the web site and view the file?
Finally, can anyone think of another way to do this?
Any help would be appreciated! :)
Answer: Is it possible for you to use a service account? You can authorize the app with an account dedicated to your app and user doesn't need to authorize and authenticate. The files you will be uploading will be managed under the service account's Drive.
You can learn more about service accounts on https://developers.google.com/accounts/docs/OAuth2ServiceAccount
If you have implementation specific questions, please ask.
Comment: Fab! Thank you. I will have a go and might take you up on your kind offer of help... :)


UEFI bootable iso of own Linux distribution

Question: I have a Linux distribution that I want to create an ISO of, so I can put it onto a CD or USB. I have earlier used Remastersys and Relinux to create my own linux distributions, but the ISO they make are only bootable with legacy. Are there any software (payed or free) that's able to create an EFI bootable iso? Or how else can I make this ISO?
Comment: What about this? : http://code.google.com/p/pentoo/wiki/UEFI#UEFI_Creating_an_UEFI-bootable_ISO
Answer: Very much advised to read Rod Smith's excellent docs and if you still need help, ask again (I've implemented UEFI support in ALT Linux -- there's SecureBoot mini-HOWTO but I didn't think that writing UEFI Boot one would be worth the time a year and a half ago given that enough tools and implementations were out there already).
Speaking of tools, you want:

isohybrid-0.12 from syslinux-4.06 (GPT/UEFI support)
recent xorriso (1.2.6 will do, 1.3.4 works even better for me)
EFI toolchain (I use gnu-efi 3.0r/3.0u)
EFI bootloader (elilo, refind, grub 2.00 with patches...)
kernel with a few more options turned on (CONFIG_EFI, CONFIG_EFI_PARTITION, CONFIG_EFI_VARS, CONFIG_FB_EFI)
gdisk or parted

Just in case, my mkimage-profiles project explicitly supports building UEFI-bootable hybrid images and lightweight customization (one doesn't have to fork anything over but just choose a close enough base and tweak it).  It's mostly documented in Russian for a reason though and uses ALT Linux package base as of today, these starterkits are among its output.
Good luck :-)
Comment: Thanks, Rod Smith's docs was very useful indeed. I have installed and made available all the tools you listed, but I have some issues understanding syslinux. I need the isolinux.cfg file. Is this file located somewhere, or do I have to create one myself? If so, is it possible to just copy the folder called isolinux from the standard ubuntu distro onto my own /boot/isolinux folder? Also, xorriso is causing also causing a bit of a pain, and I tried to do as explained in this thread http://ubuntuforums.org/showthread.php?t=2176477 without any luck.


Plant identification?

Question: Can anyone identify the plant below? It's in a backyard in Pennsylvania, and the photo was taken today.
Comment: It would help if you provided more photos, such as a detail of the flower (where petals and other structural elements can be counted), the stem, the leaves, etc.
Comment: This question appears to be off-topic because it is about plant identification. These questions are usually asked on Gardening and Landscaping Stack Exchange. This topic is not found in the following appropriate topics listing in the Help center: 1) General questions about biological concepts 2) Questions about the biological mechanisms behind medical conditions 3) Questions about techniques in a biological or biochemical laboratory
Comment: Gardening and Landscaping only? what about the wild plants?
Comment: And when asker don't know whether it is cultivated or wild?
Answer: Those flowers don't come from the same plant as that big leaf in the front do they?  Cant help you with the leaves, but the flower looks like a daylily. source: I know nothing about plants, but happen to have a mom who got a degree in horticulture :)
Comment: And the big leaf could come from some kind of zucchini. Source: grandmas garden.
Answer: The flower is a Hemerocallis fulva (Hemerocallidaceae).
The leaf seems to be a Cucurbitaceae, as said above, the same family as the zucchini

Plant identification?


renderman not installing

Question: So, I've got the renderman engine from GitHub and, when I install it and enable it (as an add-on), it doesn't show up with the render engines. Why? (The add-on said it required a 2.8 blender update so the add-on is 2.8 ready)
Also, I'm trying it in blender 2.81 and blender 2.82a
Answer: Yeah, that is just not going to work. It is actually not compatible with 2.8 or many of the previous versions. Even though it may say. There are forums all over the place that say the same thing. No one has gotten it to work. But, it is probably for the best. Renderman is not near as capable in clarity of pixelization as cycles. 1080p in Cycles vs Rman is a pretty big difference. Plus, I would guess that alot of the modifiers in Blender would not work in Renderman. It also takes alot more time to Render especially in Windows. And a huge bug with Renderman that comes from what people like about it overcasting light, is that you will get pitch black shadows sometimes that you cannot get rid of.
Comment: Thanks!!!!!!!!!
Answer: The rendering addon space for Blender version 2.83 and higher is a confusing mess of outdated information and equally outdated addons. Renderman addon appears to be abandoned on Github and doesn't work for Blender 2.83 or higher. The only renderer addon other than the built-in Cycles that seems to be actively updating is Luxcore @ https://github.com/LuxCoreRender/BlendLuxCore, but that only officially supports Blender versions up to 2.83, so if you have anything higher like 2.90, you may have issues and must wait on updates.
Comment: Just your opinion... *In fact:* Renderman add-on development was on-hold as of Blender 2.8x release for many reasons: (1) Renderman's core is in heavy development in order to support GPU and CPU (2) OSL adaptation (3) Blender API changes, etc... Good news is that they are working on it, preview -> https://app.livestorm.co/pixar-animation-studios/new-bridge-tool?utm_source=Livestorm+company+page and it should be released soon (when stable). Also note, there are add-ons for other popular engines like Redshift or Octane too... and Luxcore should work on 2.9.

renderman not installing


Will 5V to input pin damage the Arduino board?

Question: I am fairly new to Arduino. When I am experimenting with circuits, do i need to worry about shorting out a pin if I accidentally connect the +5V pin on Arduino to an input pin on Arduino without a resistor? I just want to make sure I avoid destroying the board when learning how to create circuits.
Answer: No, no short. Arduino (Atmega) pins default to inputs. Pins configured this way are said to be in a high-impedance state. Input pins make extremely small demands on the circuit that they are sampling, equivalent to a series resistor of 100 megohm in front of the pin.
Answer provided by Look Alterno and converted from a comment.
Comment: However be careful that your code does not set any such pins to outputs.
Answer: Apply 5V directly, without any resistor:

5 V socket
it is directly connected to the regulator's output, thus the 5 V to power external loads to Arduino can be drawn from it. In the case voltages are not applied to the USB Port or to the JACK socket, the 5 V socket can be even used to power Arduino directly, if having an external stabilized 5 V source. One has to consider that, in general, regulators do not like voltages being applied to their output, but in this particular case this situation turns out to happen even when powering Arduino from the USB port, therefore we may assume that the designers judged this problem as harmless. Even in this case there is no form of protection, since both the diode and the PTC fuse are found above this socket and thus they do not have any active function. As in the case of the Vin socket, the voltage negative pole can be found on the board's GND sockets.
NOTE: regardless of the input used, Arduino has a 3.3 V output socket to power loads operating at this voltage; in fact a second regulator, right for the purpose of generating 3.3 V, is directly connected to the 5 V. This socket cannot be used as input.
Comment: So if I were to connect the +5V pin to an input pin (Say pin 7 just as an example) and the board is powered through a USB connection to a computer, would this short out the board?
Comment: No, no short. Arduino (Atmega) pins default to inputs. Pins configured this way are said to be in a high-impedance state. Input pins make extremely small demands on the circuit that they are sampling, equivalent to a series resistor of 100 megohm in front of the pin
Comment: My suggestion use resistors (220 ohm or higher) in series with the inputs this will help protect you from mistooks. A 220 Ohm resistor will limit the current to about 31mA with a fault to +12. A higher value will be ok. Once you get comfortable with this you will no longer use need resistors. The current path is in the pin, through the "protection diode" to Plus supply (VCC) pin. Depending on your design this can cause the VCC on the board to rise.


How to edit AutoCad coordinate drawing boundaries

Question: How can I edit the Autodesk-AutoCad x and y coordinate surface? I would like it to have a larger coordinate boundary than the default...
Comment: 'limits' is the command in AutoCAD. Not sure if that's what you are looking for.
Answer: Older versions of CAD often would give you errors of drawing outside the limits. I found the LIMCHECK command would allow me to extend the limits of the drawing area. In newer versions of CAD though, this is not required.
Answer: there is no limit to the coordinate boundary in autocad.
Just draw from here to infinity (and beyond).
Comment: At least with modern versions.  There might have been restrictions in the 80's or so.


Can combined contributions to tax advantaged accounts exceed gross income?

Question: If I am eligible to contribute to several IRS-recognized tax advantaged accounts that have separate limits (HSA, 401K, 457, IRA, etc) can I fund the contributions with prior savings when my gross income is less than the combined contributions, but greater than each individual account yearly limits?
Comment: As answered, your contributions can't exceed payroll income (1040 line 7) or compensation (roughly lines 7,11,12,18) depending on type. However, if you have 'negative income' on lines 12-14,17,18 then your gross income as computed for tax purposes (line 22) might be less than the total of your positive income items.
Answer: Well, many of the tax-advantaged plans that you are planning on investing in are funded via payroll deductions and not by cash contributions, and so you are certainly limited in all these contributions by the individual gross incomes from each payroll activity; your employer is not going to send more money to your 401(k) as an employee contribution than what the employer is paying you. With the IRA contribution which must be paid in cash to the IRA custodian, you are limited to $5500 or your total compensation (earnings such as wages), whichever is less, and so you could contribute your entire compensation (taking money from your savings to cover the SS and Medicare tax, Federal and State income tax etc deducted from your wages before you got your hands on the rest a.k.a. your take-home pay), but then, what are you going to live on?  That being said, I know of several teenagers who contributed their entire compensation of $5500 or less from mowing lawns etc to their IRAs with their parents gifting them the money to cover the shortfall due to tax withholding, and of course, providing support for daily needs.
Comment: Re "what are you going to live on?", what about income from investments?  Say I make enough from them to live on, with $5500 left over: can I contribute that $5500 to an IRA to reduce my tax bill?
Comment: @jamesqf As my answer states, **you are limited to $5500 or your total compensation (earnings such as wages), whichever is less** and so in the scenario you propose -- investor with sufficient investment income to live on plus an extra $5500 -- **and no earned income**, _none_ of that $5500 can be contributed to an IRA.  The taxpayer must have _compensation_ (earned income such as salary or wages, self-employment income, commissions on sales, etc) in order to contribute to an IRA. For example, a student on a fellowship cannot contribute to an IRA, a student graduate assistant earns a salary.
Comment: @DilipSarwate Minor nitpick, but if filing jointly, only one spouse need have sufficient compensation for an IRA contribution.


miller effect - What circuits have miller effect?

Question: I have an exam tomorrow and I have a theoretical question. Just have Miller effect common source (FET) / common emitter (BJT)? Or common drain (FET) / common collector (BJT) also have? Is there some kind of circuit I did not mention that has Miller effect?
Comment: https://en.wikipedia.org/wiki/Miller_effect <-- clearly explains how the Miller effect is derived and that it applies to *amplifieres*, not to specific types of semiconductor devices.
Comment: @MarcusMüller But could you answer the question? It is a very concrete question. It seems to me to have heard that the miller effect only existed on the common source or common emitter amplifiers. But does it occur in common drain or common sink?
Comment: This is an extremely vague question because there are multiple (amplifier) circuits that the Miller Effect applies to. For example, the two-stage operational amplifier.
Answer: Miller effect only occurs on amplifiers. Inverting amplifiers to be specific.
https://en.wikipedia.org/wiki/Miller_effect
Common collector transistor circuit has a gain of 1, ie it does not amplify. In this case, Cgd or Cbc is a simple capacitor, and it is not multiplied by Miller effect.
Common emitter amplifier circuit has negative gain, and thus Miller effect applies to Cbc/Cgd.


is there a javascript/jquery selector for text selected by mouse cursor?

Question: is there a jquery selector for text that is highlighted after its dragged over by the mouse cursor? For example, I want to select text that I've typed into my textarea field, click a button, which puts
 tags around the text I've highlighted with my mouse cursor. A non-plugin solution would be preferred, thanks.
Comment: http://mark.koli.ch/2009/09/use-javascript-and-jquery-to-get-user-selected-text.html
Comment: There isn't simply a jQuery selector for selected text, you'll need to bind an event handler and jump through a few JavaScript hoops to get to the selection and modify the textarea.
Comment: you want that selected text should be highlighted!! m i getting u right??
Answer: There's a straight up javascript solution that's pretty nice... just use inputElement.selectionStart and inputElement.selectionEnd .
It's helpful to note that this is just on Dom elements, so you'll have to take your jQuery selector for your textarea and add [0] to get the element itself, ie. $("#myTextArea")[0].selectionStart.
From there you can do some string work and add in your
 tags at the appropriate indexes.
I haven't tested this, but it should work...
var selStart = $("#myTextArea")[0].selectionStart;
var selEnd = $("#myTextArea")[0].selectionEnd;

var originalString = $("#myTextArea").val();

var segment_1 = originalString.substr(0,selStart);
var segment_2 = originalString.substr(selStart,selEnd);
var segment_3 = originalString.substr(selEnd,originalString.length);

var finalString = segment_1 + "
" + segment_2 + "
" + segment_3;

$("#myTextArea").val(finalString);

Answer: Why dont you use php for this? PHP + jQuery will help you.
Example form:
<form action="highlight.php" method="post">
My textarea:

<textarea cols="10" rows="10" name="textarea"></textarea>
<input type="submit" value="Wrap
 around" />
</form>

PHP to process the form and wrap  around it:
<?php
$text = $_POST[''];
$wrap = '
'.$text.'
';

echo '<textarea cols="10" rows="10">'.$wrap.'
';
?>

You can remove echo $wrap, but i prefer you learn jQuery and how you can use it to execute a php script.
I Dont have that much jQuery experience to tell you how, but learn it or google "How to execute php script with jquery" and im sure you will find something =)


Headlights at Light Speed

Question: If you are driving at the speed of light in a car and turn on your headlights, would anything happen? I thought that the light would come out but pool up in the headlights themselves. Any truth to that?
Comment: I think this is better suited for Physics SE
Comment: I also suspect that this would be a duplicate of [If I am travelling on a car at around 60 km/h, and I shine a light, does that mean that the light is travelling faster than the speed of light?](https://physics.stackexchange.com/q/79331/14091) over on [physics.se]. That question isn't *exactly* the same, but I very strongly suspect that the *answer* will be the same.
Comment: Since you've already violated special and general relativity to begin with, and those have worked pretty solidly for the last century, what happens next would seem to be entirely up to you... See the denominator in the [special relativity velocity addition formula](https://en.wikipedia.org/wiki/Velocity-addition_formula#Special_relativity); in our universe, as your velocity approaches the speed of light, the marginal utility of your efforts decrease. Compare [my answer to *Science-based FTL drive*](https://worldbuilding.stackexchange.com/a/46678/29) which shows the math.
Comment: I believe the bigger problem is all the stresses to your car. See also https://what-if.xkcd.com/1/
Comment: I'd like to point out that the operative "then turn on your headlights" will never come to pass, due to the relativistic time dilation involved.
Comment: If you want an analogy, *which does not work in our universe*, then compare what happens to aircraft operating in the transsonic region (the range of speeds close to, both above and below, the speed of sound).
Comment: I don't know maybe the car turns into a black hole so light cannot escape it's clutch...
Comment: As enpaul said, it can't happen.  He was showing you can't reach lightspeed--but if you wave a magic wand and boost your car to lightspeed time will stop--light won't pile up because it's not being emitted in the first place because time isn't passing.
Comment: What has been sid is quite true, but in an attempt to help you, if you were moving at 99.999% the speed of light and turned on the headlights the light would still stream out at the speed of light if you measured it. You need to read up on relativity to understand more.
Answer: Assuming a relativistic physics system...
This can't happen.
No, wait, hear me out.
I understand that the point of this site is "Well what if this did happen", but this is a fundamental exception. What you are asking is either physically not possible or assumes a completely different system of physics, which means that inherently we cannot answer it realistically.
The speed of light is a fundamental limit. Everyone knows that this means that nothing can go faster than it. However there is another limitation that few people think about because of a common misnomer about what the speed of light actually is:
The speed of light in a vacuum is not 299,792 km/s.
That number represents the the speed of a massless particle in a vacuum. This means that this speed is not an inherent property of photons specifically, but rather an inherent property of any particle with m = 0. This is a very important distinction with two very important implications:

Photons have a mass of zero
Any particle with a mass greater than zero cannot reach this speed

As of now, we have only really discovered one particle with a mass of zero (photons) but that doesn't guarantee they are the only ones. But this certainly guarantees that the particles that comprise your vehicle are not capable of reaching the speed of light.
So the answer to your question is that it can't happen. At least not in a relativistic physics system anyway. I wish I could give you a hypothetical answer to your question, but it just is impossible within the realm of known physics.
Oustide of the realm of known physics, yes your guess that photons might just 'pool up' on the headlights seems a good bet.
Comment: Strip the Higgs boson from a particle and it is therefore massless. At least, it would not have the properties of having mass. Is that the same thing around here?
Comment: @JustinThyme that goes beyond my understanding of physics. I've read more about relativity than I have about particle/quantum physics.
Comment: See my extended answer.
Answer: Several issues ... it is unlikely to get your car accelerated to light speed for a variety of reasons, but let's say you're going really, really fast.
Per comments above, you'll get more detailed answers here:  https://physics.stackexchange.com/questions/79331/if-i-am-travelling-on-a-car-at-around-60-km-h-and-i-shine-a-light-does-that-me
But the short-short is that light always goes at the same speed in a given medium.  What will happen is that the light will be blue-shifted (w.r.t someone in front of you); that is, instead of a visible light beam your headlights will emit at higher frequency, xray or gamma ray depending on your velocity.
There are ... easier ways to mount an x-ray laser on your car.  Which is in itself a laudable goal.
Comment: +1 Love the blue shift!  I swear that I mounted the headlights on my ship for in-atmosphere use and at atmospheric speeds.  How was I to know what would happen when I tried to illuminate the hull number on your patrol ship as you pulled up ahead of me at light speed?
Comment: @HenryTaylor If they match (your absurd) velocity when you shine the light it arrives as light, only if you happen to clip their planet (going only tens of km/s) while swiveling to the ship it blue shifts to gamma rays and kills people. Think of it as blue shifting since it comes from the front of something moving fast but red shifts as it arrives at the back of something going fast.
Answer: c (as in e=mc^2) is not the speed of light. It is not the speed of anything. it is the speed limit of the universe. it is a constant. Constants have no speed. But it does have the units of distance/time, which makes it look like speed to the uninitiated.
It is like saying the gravitational constant has, or is, gravity.
However, sometimes light does travel as fast as this speed limit, but no faster. Apparently, physics has a much better method of enforcing speed limits than us humans, on our highways.
Since the theory is that nothing with mass, (or to be more precise, exhibits the properties associated with mass, since we really didn't know what mass was until Professor Higgs came along) can travel faster than this speed limit, then the maximum speed of anything that was on something going the speed of c would be the speed it is going at (the speed of c). In that sense, then in your thought experiment, the light would just pile up in the headlight. However, a massless particle (a tachion?) which it seems can not travel slower than c, if ejected from such a vehicle, would be able to travel faster than the 'car'. Since a tachion is hypothesized to be a 'photon on the other side', would it be called 'light' on the other side?
But if c is independent of the relativistic framework, and is constant no matter how fast the object is going that it is measured on, then obviously something in the physics equations breaks down at this speed limit. That is why it is the speed limit. You end up with situations where you are dividing by zero. Or you are dealing with infinity. Or you are dealing with cases that two numbers are the same number, akin to the fact that, for instance, 10=9.99999999...
But more deeply into the thought experiment, the problem is not necessarily 'if you shine headlights in a car going the speed of c, but closer to the point, can you even create light when you are going that speed? What would exist that could emit it? A photon emitting another photon? The photons would both be traveling at the same speed. In which case they would probably just be the same photon.

Headlights at Light Speed


Only one monitor usable with dual monitor setup (Displayport MST setup)

Question: I am running a desktop computer with a Radeon HD6870 video card. The card is attached to a Dell U2515H monitor, to which another Dell U2515H monitor is attached (the displays are daisy chained together for a MST setup). This setup works in Windows.
In Ubuntu 15.10, however, the second monitor is not detected at all and it displays the same content as the first monitor.
The old Ask Ubuntu question Displayport 1.2 MST/daisy chain - Dual Monitor setup - Intel graphics contains some promising replies, and I would assume that the current kernel supports MST. However, not out of the box, apparently. How can I get extend the desktop to the second monitor using MST in Ubuntu 15.10?
Update: I have found a news article Radeon DisplayPort MST Queued For Linux 4.1. As Ubuntu 15.10 uses kernel 4.20, it should theoretically work. The article says that "While the open-source Radeon DP MST support will appear in Linux 4.1, it's disabled by default." I'll continue my research and update this question if I find out a solution.
Update 2: Apparently the support is not just there yet, as of November 25th, 2015. I updated my kernel to 4.2.6 and set the kernel parameter "radeon_mst=1", which should have enabled MST support for Radeon according to various instructions in the Internet. However, this resulted in a black screen after boot-up. Researching some more, I found out the following open bugs describing this phenomenon:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/1509997
https://bugs.freedesktop.org/show_bug.cgi?id=92790
Apparently the only viable option is to wait for this bug to be fixed. Or use a hardware-based workaround: purchasing a graphic card with two DisplayPort outputs.
Update 3:
Possibly the problem could be solved by using the proprietary binary driver from AMD, fglrx. For me it's not a viable solution, as I have upgraded to Ubuntu 16.04, and the fglrx is not available for that version. I saw some hints of Radeon MST-related changes in Linux kernel 4.6 change logs, so I'm hoping that brings some improvement (with Ubuntu 16.10).
Answer: The kernel parameter is "radeon.mst=1" according to other sources. Not sure if both are supported in the end.
Answer: This works out of the box using kernel 4.15.2 (maybe earlier) with the open-source drivers, and no kernel command-line parameters needed. A new kernel can be installed easily using ukuu, assuming you aren't using any proprietary drivers.