How long did it take to write the whole Mahabharata?

Question: Mahabharata is longest version consists of over 100,000 Sloka or over 200,000 individual verse lines,so such big lines of epic how much time it has taken to write ?
Answer: As per Mahabharata: Adi Parva: Chapter 62, Krishna-Dwaipayana Vyasa took three years to compose the Mahabharata:

The history of the exalted birth of the Bharata princes is called the Mahabharata. He who knoweth this etymology of the name is cleansed of all his sins. And as this history of the Bharata race is so wonderful, that, when recited, it assuredly purifieth mortals from all sins. The sage Krishna-Dwaipayana completed his work in three years. Rising daily and purifying himself and performing his ascetic devotions, he composed this Mahabharata.
Answer: The original version of Mahabharata composed by Sage Vyasa by name Jaya, contains 8,800 Slokas only. Later it was expanded to 24,000 Slokas Bharata. Still yet a later period it was expanded to Mahabharata containing 1,00,000 Slokas.

I am (continued Sauti) acquainted with eight thousand and eight
  hundred verses, and so is Suka, and perhaps Sanjaya. From the
  mysteriousness of their meaning, O Muni, no one is able, to this day,
  to penetrate those closely knit difficult slokas.
Vyasa executed the compilation of the Bharata, exclusive of the
  episodes originally in twenty-four thousand verses; and so much only
  is called by the learned as the Bharata
After that he executed another compilation, consisting of one hundred
  thousand in the regions of mankind.

So coming to the aspect of time taken for composing the Mahabharata, we have to remember that it depends on which version We are talking about.


Why does the dollar seem weak?

Question: 2:00 (GMT+8) - The FED raised interest rates at 0.75-percentage-point (75 basis points I believe, not sure with terminology but definitely now at 1.75%). But even so, why does the USD seem weaker? I understand that there are other macroeconomic factors to consider, perhaps that of the other currency against the dollar, but what am I missing, because the other 7 currencies seem stronger (AUD, NZD, CAD, JPY, EUR, GBP, CHF).
4H Chart:

Daily Chart:
Answer: FX is essentially a random walk, especially USD. You can look here for a lot more details. In essence, you can always tell stories afterwards, like people expected that move and it was already priced in, but they focused on expected future hikes from the ECB, CNB or whatever.
Macroeconomics, A European Perspective 3rd edition has a good Focus box that relates to this on P.300. It focuses on the stock market, but the underlying idea is exactly the same.

Edit
I never claimed that it is theoretically impossible to predict FX rates. I did claim that it is very hard to explain why FX rates move(d) the way they did (do). In my opinion the best quick explanation for this observation is that FX rates are essentially (very close to) a random walk. That's why I wrote it as my first sentence.
IMHO it's misguided to focus on whether FX can (theoretically) be predicted or not or if FX is a true random walk. The question is very generic (it has an implicit assumption that a rise in interest rates will lead to an appreciation in that currency). I tried to provide an equally generic answer, believing to convey the message that it's impossible to say what happens to the FX rate by simply looking at an interest rate change.
Comment: The fact that there is no model of FX rates that beats a random walk doesn't mean FX rates themselves are a random walk.
Comment: @BrsG, that's why I wrote essentially (very close to being statistically indistinguishable). It does mean that you cannot simply explain a change in the FX rate due to a single event like a rise in interest rates though. All outcomes are possible (little change, [large] move up, [large] move down) and it all depends on the reaction and past expectations.
Comment: Well, you start your answer by claiming that FX rates are essentially random walks. My point was that this cannot be concluded by the fact the model prediction of FX rates do not outperform random walk predictions. There might be a way of predicting FX rates better than a random walk, but we just haven't found it yet. Or am I missing something? Is there a proof somewhere that FX rates can NOT be predicted in principle?

Why does the dollar seem weak?


How to remove standard New Opportunity button shown on Opportunity related list from Account object

Question: I would like to replace the New Opportunity button with a custom button so I can copy information from the Account into the non-editable required opportunity fields.
I've tried reviewing search layouts, custom buttons for each object but can't seem to figure it out..
Has anyone been able to remove the standard button and replace with a custom one?
Comment: What do you mean by "non-editable required opportunity fields"?  Please post a screenshot showing those fields.
Answer: Step 1: Open respective Account page layout
Step 2: Open Opportunity Related list properties
Step 3: Open Button section
Step 4: uncheck New checkbox


Getting Started

Question: Since my Vista is no longer being supported, I want to replace it with Ubuntu.  I had it once before on a different computer, but I'm not sure how to install Ubuntu without deleting my current Operating System. I use my desktop a lot but am not a technician.
Answer: It is completely possible to install Ubuntu in a "side-by-side" mode when installing. Because you're installing the desktop version of Ubuntu (just guessing here) you will be prompted during the installation as to how you would like to install Ubuntu. One of the options available will be to installing it along side Vista (if its not listed click more options). After you get past that window it will take you to a window that looks like this:

With the top saying Vista instead of windows 7. Here you can select how much space you would like Windows Vista to have and how much you would like Ubuntu to have. From here you can just continue the installation like normal. On your next boot it will prompt you for which operating system you would like to boot into (and it should do this everytime).
Note: The following instructions are if you have one hard drive/SSD only. If you have multiple and you'd like to install Ubuntu on one of them and keep windows on the other then that is a different set of directions.

Getting Started


Converting Matter To Antimatter And Vice Versa

Question: Okay, I would like to know if there is a safe way of converting matter into antimatter, in the theoretical case of say, an manned expedition to a planet made of antimatter. How would I be able to turn an object or organism into antimatter without it or them annihilating, and convert them back for the voyage home? Say, for a plot point or something?
Comment: The only know way to convert matter into antimatter and vice versa is through the energy (and total annihilation is a necessary step in between).
Comment: No, there isn't. As far as our understanding of physics goes, the question doesn't even make sense. But, of course, you can always introduce a magic gate, the nature of which is that anything going through it gets transformed into its antimatter equivalent.
Comment: :-) Hi, Tyson. If you think about it, anyone who could provide a serious real-world answer to this question probably wouldn't post it here - they'd be too busy running to the patent office.
Comment: Matter might be "rotated" through a higher dimension, such that when it visibly returns to us it would be made out of antimatter.It would need to be free-floating in space and touching nothing else when this occurs. Of course, with all the particles flying through space, it wouldn't be so safe for that person... they'd be fried by radiation (a single proton won't cause them to annihilate, but when it hits one of their anti-protons, it'd release a bunch of gamma right inside them).
Answer: There is exactly this situation (not too scientifically handled) in an old episode of Space:1999 ("Matter of Life and Death"), where the transformation was caused by "an unknown form of radiation".
More to the point, this is also done in Anvil of Stars by Greg Bear, where alien technology allows to "reprogram" particles - alter their quantum state at a distance, changing their very nature. In the book, quarks and leptons are mostly always the same particle, their difference in charge and Higgs mass arising only by their state vector (this is a real thing in physics, you may want to look up Bohm's hypotheses). While it does take energy to flip a particle's vector state's bit by hijacking its entanglement channel (the book calls it no-ach), if you do so, you change that particle into something else - if you change a particle into a particle that existed elsewhere, that's the "classic" quantum teleportation. This solution could work for you.
(Of course, not only the general form of quantum manipulation is completely hypothetical; even the classic quantum teleportation hasn't been conclusively proven, and even if it was, it wouldn't be exactly what you need. But the description does come close).
Comment: Greg Bear does the same thing in Moving Mars, I think. And Anvil of Stars is his, not Ben Bova.You might be getting things confused... the people who are anti-mattered in Anvil don't know how it was accomplished, and they aren't able to reverse the process before they die of radiation poisoning. Maybe Bova had another similar book? I've only read a few of his.
Comment: @JohnO You're absolutely correct. I was mis-remembering and confusing the authors.
Answer: 4D printing and some satanism
This is cheating a bit, but if you have antimatter available, you could rearrange it the same way as the matter in your base object is. Antimatter seems to follow all the same physics and chemistry as vanilla matter, it's just got opposite charges.
The requisite satanism is that you will need to employ the services of Laplace's demon. You need him in order to bypass Heisenberg's principle, so as to properly place every particle. Once you've made an antimatter copy of something, you can dispose of the original if you wish.
The whole process should work to convert antimatter into vanilla matter too.
Comment: Do you need to purchase the full version of Laplace's demo to perform more than one conversion a day?
Comment: Figured you did. I would have edited it myself, but it was just too good an opportunity to pass up!
Comment: @JoeBloggs Oh no! I meant DEMON, not demo XD fixed that!
Answer: There is no known way to do this.
If your work of fiction is following the laws of physics as we know them today then this cant happen.
But for fun let's imagine you could.
I'd propose build an "inertial dampening device", like what's used in sci fi to allow ships to manoeuvre better by scaling the ships mass by a factor suitable to the current plot. If you dial it up, your object gains mass, if you dial it down, it loses mass.
If you disable the safety and dial it down to -1, you'll have negative mass. Which with a cursory glance of physics is equivalent to antimatter. And negative mass times -1 is positive mass. Allowing you to convert back and forward. But Is the physics valid?
Nope. Its totally wrong by 2020s limit knowledge of the universe. Just state the device works in your work and move on, you're going to have to with inertial dampeners so might as well allow the technology to  be used in fringe configurations. 2020 knowledge is going to be looked back on and laughed at as uninformed at some point in the future - perhaps this may be possible. Who knows? Aristotle would scoff at relativity and quantum physics, anything we write off as wrong with our puny 2020 minds might be equally right.
Make sure your interface has an "apply" button, rather than just a dial. If you dial it down from 1 to -1 and cross 0 for even the briefest of moments the object may cease to exist.
Comment: I really like this answer,  however the claim that having mass of "-1" is equivalent to anti-matter is contrary to current 2020 physics. Anti-particles have the opposite charge to their partner particle, and all sorts of other opposite traits. But they have the same mass, positive in all cases. Its controversial whether you can get negative mass, but if you can it will be some strange Casimir effect thing probably, not anit-matter.
Comment: Antimatter **does not** have negative mass. As far as we know, nothing has negative mass.
Answer: Traversable, Non-orientable Wormholes
https://en.m.wikipedia.org/wiki/Non-orientable_wormhole
These wormholes reverse the chirality and electromagnetic charge of objects that pass through them. Left-handed, normal-matter gloves pushed through the wormhole become right-handed, antimatter gloves. From the Wikipedia page:

if a positron can be considered as a time-reversed electron, it can also be considered as an electron aging conventionally, but with one spatial dimension reversed. The existence of a traversable nonorientable wormhole would seem to allow the conversion of matter to antimatter, and vice versa


Unable to post video preview for iOS app

Question: I am unable to submit the video preview of my app.  Length is ok and the upload is accepted followed by the message "Your file could not be loaded.  Try again"
Answer: Video upload is broken in iTunes Connect right now, due to mixed content issues, enforced in Safari 9. Either use Safari 8, or try a different browser and choose to allow mixed content.


Wordpress plugin stats

Question: I have released a wordpress plugin recently and I wonder if there is a way to see how many people actually use it.
Answer: What some developers do is add a ping-back or include a 1 pixel gif file with full url to the developers website. Then when the plugin is used you can track the websites that load your gif file. This is not appreciated by people and is a bad idea in my opinion, but it is something you can do to track things. You can even go a step further and add JS of analytics software. But please be aware that the community will not like this.
Answer: There is a tab called "stats" in the plugin directory that shows you how many that has downloaded you plugin, but you can't see anywhere how many that has the plugin installed right now, unless you code it so that it "calls home" on activation. Which is a bad idea in my opinion.
Answer: Here are basic stats of Wordpress.org
https://wordpress.org/plugins/YOUR-PLUGIN-SLUG/advanced/
for more stats, you can create functional when someone activate/deactivate your plugin (send requests to your own server via custom API) or smth like that

Wordpress plugin stats


Does Adblock slow down Firefox?

Question: You might have heard of the Adblock extension that has a massive list of URL filters to block out adverts from most websites. Does this slow down Firefox, considering that for every little image and flash it has to consult that massive URL whitelist?
Comment: Images take longer to download than does a lookup...
Answer: Most of the blocked content is made up of flash files, images and scripts.
These are quite large and require time to download.
So, by blocking them Adblock actually improves the loading time, sometimes by a lot.
Answer: Yes, it does slow Fx down. It's a fact. For sure, you save the bandwith of non loaded graphics, banners etc. The negative aspect is, that ABP needs to check every URL (yes, resource locator) if it's on one blocking rule.
I recently installed one big big filterlist and it really slowed Fx down.
But: If you only use a small filter subscription, you can be sure there's no effect you'll notice.
Comment: On a page with no adverts at all, it'll be slowed down. But seriously, we live in 2009, checking 100 URLs against a filter of 1000 blocks shouldn't take more than a second, especially if it's done intelligently. On a website full of ads it'll be speeded up, but more importantly, **there will be no ads on the page**. This is worth potential speed losses to me.
Comment: Phoshi: Of course it's a big advantage if there're no ads anymore. You save rendering time and bandwith so it will increase speed. But the more complex your filter rules and the page structure (with lots of different urls to different servers), the more ABP will slow down the page.
Comment: Do you have a reference for this?
Comment: It's logical. If every ressource that has to be loaded must be checked if blocked, it consumes time. I don't have statistics on this, but try for yourself. Firebug will help you to measure.
Comment: I also think it's logical, and it's probably what happens. But implementations vary.
Answer: It doesn't seem to slow Firefox down. If anything the impression I get is that sites load faster as they don't have to fetch so much data.
You could do some timings with Adblock turned on and off, but there are so many variables (caches, network latency etc.) that the numbers you get wouldn't be particularly useful.
Answer: Time for matching against a large list of items is generally not proportional to the size of the list (technical term is O(n)). If it were, each Google query would take many years.
As others pointed out, the time saved by not fetching and displaying the blocked elements probably far exceeds time spend matching against the list.
Comment: Can the performance matching URLs of this addon be really compared to that of Google's search infrastructure?
Comment: Didn't mean to compare matching URLs to Google, just to point out matching is not necessarily slow (misconception I see in the question). Of course, there is a variety of algorithms and variations of the problem (exact match, wildcards, regex etc.). Not sure exactly what Adblock does -- it must a bit more than a linear search since they do support wildcards.
Comment: Adblock tries to extract a static substring out of the filter, which is then tested before wildcards. (For example, it will skip `*/banners/*` if the URL doesn't contain `/banners` or something similar.)
Comment: Assuming they're using similar algorithms, yes. They won't be, it'll just be a linear search, the quantities aren't worth implementing anything more complex/

Does Adblock slow down Firefox?


How is a Masters different from the first two years of a PhD in the same field?

Question: I'm interested in Neuroscience research but haven't quite made up my mind about what sub-field I want to specialize in. I think taking courses from various sub-fields will help me take a decision. Should I go for a Masters first or a PhD directly? If I go for a PhD, will I have enough time at the beginning of my PhD to explore different areas and then choose a supervisor, say after around 2 years into the program?
Comment: I agree with @EnergyNumbers. The merit of that question is exactly the same as this one.
Comment: possibly, but there people gave quite generalized answers, whereas I think warmzombie is looking for a more specialized answer in Neuroscience
Answer: There are two different types of Masters - taught masters and research masters.
In England, a research masters allows you to work, on rotation, around 3 labs in the year, and you can pick and choose from different sub-fields. This is hugely beneficial because it exposes you to different sub-fields, but more importantly because it exposes you to different work dynamics and environments, allow you to cope better in your PhD; furthermore, you'll make more contacts (which is all that matters in research - reputation and recommendations) and learn from different people. It'll give you the confidence to know, during your PhD, whether you are right or wrong.
The downside is that it takes you one more year and there is no guarantee you'll get a PhD after, and there is also the extra cost - most funding bodies do not fund a one year masters. However, if you apply for a 4-year Masters with PhD, funding options are more generous.
I can only speak for England, unsure about other countries, but the same principles apply. (my own opinion is that MRes is good if you can afford it)
Comment: Correct me if I am wrong, but I always imagine different fields having different course structures, and all I tried to do is answer it in the life sciences perspective, rather than say, computer science. If you don't like the answer, just vote it down.
Comment: The question on the other page asks about Mathematics, and this is on life sciences?

Anyways, I've answered it and if the question is a duplicate, not my problem.
Comment: My answer is pretty much specific to life sciences, if it turns out that it isn't and other fields share the same structure (the lab rotations) then I've learnt something new today. (I would appreciate it if you can tell me other fields that have lab rotations - because I honestly wouldn't have a clue)
Comment: In UK, would PhD students have lab rotation opportunity?
Comment: No, in the UK, you stick with one lab. There might be collaborations between labs, but there is no rotations.


Wrath of the Machine Raid question: Activating Monitors after unlocking Outbreak Prime

Question: Once my clan has unlocked the Outbreak Prime quest chain from turning on the 5 monitors during Wrath of the Machine, is there any point in searching out the monitors on subsequent runs? Or is this all they accomplish?
Answer: The only reason to activate the monitors in the raid other than to start the Outbreak Prime quest is to get to the chest that is in the same area as fourth monitor. This chest is guaranteed to contain an exotic engram once per character.
So it makes sense to activate the monitors (or at least the fourth one) until all of your characters have opened the chest with the fourth monitor.
Answer: Once you have gotten the Outbreak Prime quest from the chest underneath the Aksis room, there isn't really anything to be gained from doing the monitors again.  Unless you want to do the entire quest over again on each character.
The fourth monitor inside the cube has a chest that grants an exotic engram ONCE per character.  But other than that, why not just take the Outbreak Prime out of your exotic kiosk if you have already gotten it and just infuse it up?


Bing maps Android SDK crashes on 4.0

Question: after downloading the SDK from codeplex I installed BingMapsAndroidSPK.apk under bin/ folder. It freezes at earth and building logo (using both emulator and USB the handheld)
and it works fine on 2.x. (emulator ),  and already updated the BingMapsAndroid.js and map.html asset files as it says here but it didn't work. any ideas to run it on ice cream sandwich ?
Answer: follow this link , yu'll be able to solve the issue...
https://bingmapsandroidsdk.codeplex.com/discussions/439647
you have to change map.html file and remove the splash screen from the code ...
Comment: The link inside that link (that has the *real* answer) seems dead.

Bing maps Android SDK crashes on 4.0


what sensors to use in touch sensitive furniture

Question: I'm trying to make a wooden table with a touch-sensitive top, made up of a mosaic of small wooden pieces resembling scrabble playing pieces separated by thin glass separations. each wooden piece would be connected to its own sensor(s) and also to LED lights that would glow through the glass around the wooden piece touched. What would be the appropriate sensor to use? I want the table to be as rigid as possible, and i don't want that clicking feel when you press any wooden block...
Answer: You can use a capacitive touch sensor for this sort of thing -- no pressing of any buttons is required.
You need to create 3 things for this to work:

A sensor PCB which has two metal pads. Mount this inside each of your wooden pieces near the surface.  When the user's finger gets close enough, it changes the capacitance between the pads.  See this application note for some tips on how to design the sensor.
A sensor IC wired to these two metal pads which senses the changes in capacitance.  Something like the AD7147 could work as the measurement chip.
A controller of some sort to communicate with the sensor IC and light up the appropriate LEDs.


Dimmer for Nth-Light Narrow LED Flexible Strip Light

Question: I wish to dim a Nth-Light Narrow LED Flexible Strip Light (https://www.adafruit.com/product/3683), will the LED Strip Lights PWM Dimming Controller For LED Lights or Ribbon, 12 Volt 8/10 Amp, 3301 (https://www.amazon.com/dp/B003L4KKF2) will be suitable?
Comment: yes, that will work. make sure your power supply is capable as well.
Answer: One strip specs are :
12V DC @ 65mA    = 800 milliwatts
LEDs/ ft.: ~1,200  ( lots of tiny Leds )  that seem to be arranged in 96 clusters of 24P4S
Luminous Efficacy: ~30 lm/Watt  ( not great )
CRI: ~73 CRI  typical
Color Temp: ~5000 K  neutral
So the 8A dimmer is overkill for one strip but shud work.
Any 12 supply can handle this low current but the voltage affects the current used so it is rated for 12.0V
The web specs could be wrong and it recommends a 1A supply, so watch out for voltage tolerance.
Comment: Thanks a lot. Can you please explain what you mean in "Any 12 supply can handle this low current but the voltage affects the current used so it is rated for 12.0V"
Comment: 65mA is pretty low current but they arrange 4 clusters 3V each to get 12V with the internal resistance and tighter Voltage supply tolerance to limit the current, unlike Stripleds which use repeating 3LED strings + R to limit current  3x3.x +If*R= 12V with a wider tolerance to supply voltage so many can be used on cars from 12 to 14.2V, but not these.


Does the electric field of a charged particle really contribute to its mass?

Question: An electron at rest creates a static distribution of an electric field around it. Wherever the particle moves, it carries or drags the field with itself. Does this electric field contribute to the mass/inertia of the particle? A particle can have mass even if it does not have any electric charge. Does the presence of a field modifies its mass or inertia? Please do not give mechanical analogies.
Comment: Relevant Q & A: [Is the electromagnetic mass real?](https://physics.stackexchange.com/q/160264/140996)
Answer: For bodies composed of several charged parts, yes, EM interaction between those parts leads to increase of effective inertial mass, proportional to EM energy of the body.
For electron, no such parts were ever found, so we do not know whether and how big part of its mass is due to this effect. Electron's mass could be in part electromagnetic, but it could also be completely non-electromagnetic.


Odds ratio and P-value in logistics regression

Question: In logistics regression, can I still rely on the odds ratio even if the P-value is not significant? For example, p = 0.140 and OR = 2.834.
Comment: for what purpose?
Answer: Presumably by rely on you are thinking about the accuracy of the odds ratio?
To give you a better idea of the precision of your estimate, it can often be useful to calculate the confidence interval for your estimate at a given level of significance. This is calculated as:
$$\hat\beta_j\pm c\bullet se(\hat\beta_j)$$
where $\hat\beta_j$ is the odds ratio for the $j$th independent variable, $c$ is the critical value for your given level of significance (approximately 1.96 for a confidence level 95% given a large sample), and $se(\hat\beta_j)$ is the standard error for the $j$th independent variable. If you are getting your odds ratio by exponentiating your point estimate, you can do the same with the bounds of your confidence interval to translate it to the odds ratio scale.
This will produce a lower and upper bound, and assuming you selected a significance level of 95% can be interpreted as:
"If we were to repeat the study many times with different samples, then 95% of the 95% confidence intervals calculated would contain the true value". (Webb et al, 2017)
If your confidence interval is very wide the odds ratio will likely be imprecise (read unreliable), potentially as a result of insufficient power or some other feature of the analysis. As the confidence interval helps with visualising these aspects of an analysis, it is always encouraged to calculate and report them along with p.values.
One final important caveat, the accuracy of the estimate should not be confused with an unbiased estimate. If you have bias from outliers, omitted variables, misspecified models or other sources your estimate may be unreliable even if it is accurate. So if in doubt always check the underlying assumptions of your model, and consider techniques for assessing the model such as cross-validation, checking for non-linearity, and so on.
For further reading:
Webb, P., C. Bain, and A. Page., 2017. Essential Epidemiology. Cambridge, UK.
Wooldridge, J. M. 2006. Introductory econometrics: a modern approach. Mason, OH, Thomson/South-Western.
Answer: Regardless of p value, the given OR will be the best estimate from the sample.
How reliable is it? It depends on what you mean by "reliable". Do you mean is it a good estimate of the population value? That depends on its standard error (and not the size of the OR itself or the p value associated with it).
For instance, if you got an OR of 1.01428 with a SE of 0.04 then you have what seems to me to be a very reliable estimate (although what "very reliable" means is somewhat field dependent). It's just that it is close to 1.
Also, as @Wes pointed out, it also depends on your sample being unbiased and so on.


Forecasting of Images using ConvLSTM2D

Question: I am working on a problem of seq2seq modelling using ConvLSTM2D layer in keras. Implementation of convLSTM in keras allows user to control over output sequence using 'return_sequence' option. When True, the size of output sequence would be same as input sequence and when False, the output sequence would be a single frame. My question is how can I control on size of output sequence when it is neither same as input sequence nor a single frame (next frame)? For example, forecasting next 6 images from past 20 images using convLSTM2D. Any help in this regard would be helpful.
Answer: One solution would be to predict the next one, and now, based on 21 images you predict the second one, and so on and so forth.

Forecasting of Images using ConvLSTM2D


Probability with combinatorics

Question: Question:
A school consists of 7 teachers of whom 4 are males and 3 are females .A committee of 2 teachers is to be formed . What is the probability that no male teachers will be in the committee ?
Why the answer is $\frac{3C2}{7C2}$ (All committee members are female) not $\frac{4C0}{7C2}$ (No committee member is male) ?
Comment: Well, it's very good that no males are chosen. But then, you still have to make a choice among the females, right? In truth, in the first formula, the fact that no males are chosen is hidden, indeed it should also be included there, as the answers below  point out. Because no males are chosen, there's no need to make a choice amongst males as well.
Comment: How did you get the second answer? Are you thinking that since no males are chosen, the answer is four choose zero?
Comment: Yes I was thinking that.
Answer: The answer is properly ${{^4C_0}\,{^3C_2}}/{^7C_2}$, the probability for selecting none from four and two from three when selecting two from seven.    However, since $^4C_0$ equals $1$ that simplifies to just: $$\dfrac{^3C_2}{^7C_2}$$
Answer: If you have to choose $2$ our of $4$ female teachers, then you have to choose $0$ out of $4$ males, namely, $\binom{4}{0}$ males. And then multiply it by the total number of possible $2$ out of $3$ females, namely $\binom{3}{2}$, i.e.,
$$
\frac{\binom{4}{0} \binom{3}{2}}{\binom{7}{2}}
$$

Probability with combinatorics


Why is Microsoft.Z3 assembly not signed?

Question: I would like to put the Z3 (V3.2) assembly into the GAC, but it is not signed.
Is there a reason for that ?
Answer: The 64 bit managed DLL is built with a self-signed key, the 32-bit DLL is not. This looks like a bug and I will check if we can add a workable delay signing to the 32-bit version as well. We don't build already signed assemblies, but components that use Z3 have so far been able to integrate delay signed assemplies that we provide per requests.


What can be done about unusual toilet noise?

Question: Our toilet makes a sound after it has filled.  This is at a beach house and the water is turned off when no one is there.  Last weekend it sounded like someone was outside with a weed-eater (high pitched hum).  Ran water in tub, sink, and flushed.  Seemed to help but then sound came back.  Any one else ever have this problem or have any ideas?
Thanks
GL
Answer: It may be possible to clean the fill valve. Some models have a removable cap with the water to the toilet turned off remove the cap. then put a cup or jar over the valve and turn the water on water rocks & rust scale will usually flush out with a cycle of the float fully opening. Then turn off the water and replace the cap. If your cap is not removable replacement is the next option.
Answer: It sounds like (pun intended) your fill valve isn't completely closing, and the water squeezing through is causing the valve surfaces to oscillate (like blowing through compressed lips into a trumpet mouthpiece). To test, take off the tank cover and push down on the float; you'll probably hear the sound change or disappear as you push down, and return as you release it.
The fix is clear: replace the fill valve.


Mobile broadband via USB modem not connecting any more

Question: My USB modem is properly set and it used to work fine with Ubuntu 17.10.  I tried it several times and it worked just fine.  Now it suddenly decided not to work any more!  It's working fine on other devices that have Windows but Ubuntu won't let it work.  Anyone here knows how to address this issue?
Answer: Your question doesn't have enough information to go by or provide any help.
What's the make, model and type of your modem?
What type of software you have used?
What's your distribution? `lsb-release -a`
What is the kernel version?

And many more such things. Also check lsusb recognises your device. Perhaps replace cables and see if it works.
Comment: Ok, sorry I'm still very new with linux.  Been a Windows user my whole life and only just started using Ubuntu a few days ago.  I will gather all the information you asked for and post it here for you.  Can us kindly explain how I can check "lsusb" in more details?  Thanks.
Comment: It is a MF636DB USB 3G modem from Orange.

I'm not sure of the Kernel version, how do I know it pls?


Jean-Paul Sartre freedom question

Question: Jean-Paul Sartre claimed we are totally free. This might lead some people to think they can show no concern for others and do whatever they want. He warned, however, if everything is based on free choice, we are responsible for the consequences of our actions on ourselves and others. How might this responsibility limit our total freedom? Give examples.
Comment: I edited the question to hopefully clarify it.  You may roll this back or continue editing.
Comment: You may find this helpful. Paul Vincent Spade's Jean Paul Sartre page, on the Internet:   http://pvspade.com/Sartre/sartre.html
Answer: Here are some key terms regarding Jean-Paul Sartre's concept of freedom: existence precedes essence,  being for itself (one's own self), being for others (others' existence), and being in itself (all the unconscious things), anguish, bad faith (fleeing from oneself or responsibility).
He considers that there are many things which we can't choose. We have to accept them, such as, the environment, our neighbors, etc, like 'man is being thrown into the world'.
But despite all these things he claims the importance of responsibility. When someone chooses something, they are not only choosing for themselves but they are also setting a path for others. So I think only this might affect one's freedom, because it is hard to take responsibility without knowing the consequences, due to which either fear or anxiety influences our thinking.
We want to escape from our responsibility of taking action, but we can't claim that our freedom is bound to follow the essence which has been set forth. We can choose freely. Here we can say we need to follow soft-determinism and amor fati (love of fate). So NO metaphysical entity, or other external thing exists to stop us from thinking and taking action. We just have to be soft determinists and lovers of our fate.
Comment: I made an edit which you may roll back or continue editing if I did not represent your position correctly.
Comment: This answer is simply incorrect. Especially that being-for-itself as self and being-in-itself as unconscious stuff.

Jean-Paul Sartre freedom question


Git rebasing - can another person rebase remote branch for me?

Question: The Scenario:
I'm working on a remote git repository with a team of say 20+.  Branches are made, committed to and merged to master frequently.
One colleague and I worked together on a branch for a couple of days.  He rebased the branch, resolved all conflicts and pushed.
When I attempt a pull, I get "automatic merge failed" and a prompt to resolve all conflicts.
When I "git status", I find that I have diverged origin/branch and have over 100 different commits each.
The problem:
He had all of my commits to date, had just rebased then pushed, and if I continue with merge, I'm likely redoing the conflict resolution that he already completed.
The Question
What is going on here?
What to do?  Why?
Asides
I've read a good amount on git, am still learning, and am hoping for a direct answer, pertaining to the git logic, and less to do with the commands associated.
Thank you in advance.
Comment: I'm tempted to say "yes, they can make their local copy of the branch, rebase it to anything they want and push it back under the same name" ... But that's when I realize that the answer is No, because by any stretch.of the word, it wouldn't be the same branch anymore!
Answer: No, that cannot be done (answer to question in the title of the question).
Rebasing should be done before sharing the changesets with others through pushing, pulling, or cloning.
Example of problem, one programmer commits 5 changesets:
(1)---(2)---(3)---(4)---(5)

Those changesets are shared with another developer, that originally had a clone containing only the first changeset, so he has his own changesets in his repository. Once he has pulled or you pushed, here's what he has:
(1)---(2)---(3)---(4)---(5)
  \
   \
    (A)---(B)---(C)

Since he wants a linear history, he rebases your changesets on top of his, getting this:
(1)---(A)---(B)---(C)---(2')---(3')---(4')---(5')

Note that I marked your changesets in his repository with a tick now to indicate that they're "your" changesets, but now affected by his earlier changes, and are thus no longer identical (hashwise or otherwise) with yours.
Then you pull, and here's what you get:
(1)---(A)---(B)---(C)---(2')---(3')---(4')---(5')
  \
   \
    (2)---(3)---(4)---(5)

Now you have two "copies" of those changesets.
If you haven't done anything after the 5th changeset in your repository, you can probably just strip them out of your repository, but mark that word, "probably", it carries with it strong requirements that you know the state of your repository, and you need to know about each and every clone of the repository.
It doesn't take more than one pull-merge-push before everything is back in a bad state.
Conclusion: Do not rebase changesets unless you know what you're doing, and almost certainly don't rebase changesets that are shared.
Actually: That warning should be against all forms of history rewriting. Anything that rewrites history must be done in isolation, and all clones must be invalidated, otherwise you will have diverging histories and multiple "copies" of the affected changesets. You do not want to be here!
Answer: What LasseV. Karlsen said is all right. Since he rebased the branch, you can't really pull it and remerge everything.
If you have no more "new" commits, just remove the branch you're trying to pull and pull it. Since all your changeset are present, just reset your branch to be exactly like the one on the server and continue from there. If you have new commits then it will be a bit harder.
First create a copy of your branch:
git checkout [branch]
git checkout -b branchCopy

Delete the branch (use -f if it doesn't want to delete it because of unmerged)
git checkout -d branch

Fetch what's on the server (origin could be a different remote) and recreate the branch with what's on the server
git fetch [origin]
git checkout origin/branch
git checkout -b branch

Now you'll have branch and branchCopy
Using git log, check which commits you want to add to your branch. and use cherry-pick to add them
git checkout branch
git cherry-pick "commit"

Once all the unmerged commits are added, just push to the server. and delete the "branchCopy"
If you have a lot of diverging changesets between branchCopy and branch. I guess there is a way to rebase a set of commits from branchCopy onto branch but If you just rebase it. It will add every changes because copied commits have a different hash.
So yes, don't rebase unless you know what you're doing. If you want to rebase and work with many people. The best thing to do is to make sure everyone is aware that you're rebasing.
I guess the first rule for any good time traveler is "Don't change history"
Tip
Here's a tip to make time traveling safer than ever. At work, I used that flow:
Work on my feature branch and merge in master when its done.
When you're working on your branch, it almost assure you that you won't rebase commits that are present on the master branch. When done, you have to choices. You can merge your branch in master or rebase your branch on master.
If you're rebasing your branch, you'll have to fetch the last master commit and rebase on it and push it as fast as you can. When people will pull it, it should be still fast forward because you didn't change the history of master but the history of your branch.
But to be honest, after using bitbucket, (can't say much about github). I worked with pull requests. It does a merge commit even though the branches are fastforward it might be just easier to just avoid rebasing most of the time. Pullrequest is a wonderful creation that should be used if you use a system that has it.
It might create a merge commit, but it leaves an history of the commits that were merged, by who and you can comment them. People can work on features to be merged and someone may used the pull request to review code when needed and merge the code into master.
Comment: this is exactly what I did after reading Lasse's post.  I saw my previous commits in the log, so I did a hard checkout (using -f which always bugs me to use).  thank you.
Comment: what bugs me is doing `git push -f` when I know that my push isn't fast forward.
Comment: @loic well I must say there is at least one workflow when it's of no fear to use -f: when working *on your very own private branch that no one in the whole wide world has any business basing work on unless they are specifically asking for The Big Trouble*
Comment: @loic ..which is where I personally do this: commit to dev machine, push, pull to test machine, test, fix stupid errors at the dev machine, *amend*, **push -f**, rinse, repeat.


Smooth linestring shapefile

Question: Is there an algorithm to perform a smoothing of a linestring and maintain the original points?
Comment: smoothing and maintaining the original points is impossible, the act of smoothing must move the points?
Comment: All the nodes of the original line or just the start and end node?
Answer: If you use shapely, you can try the simplify(tolerance) method on LineString objects, which is based on the Ramer–Douglas–Peucker algorithm.
It's more of a simplifying algorithm than a smoothing one; but sometimes simpler linestrings happen to be smoother. Give it a try.

Smooth linestring shapefile


Storage space used by records based on the number of fields completed

Question: I'd like to know if there is a difference on storage usage if all the fields on a record have data in them (to the max characters) vs. a record where only a couple of fields have data in them?
Comment: @AdrianLarson you meanie ;-) ... surely a friendly warning would suffice. my excused it that I am crazy busy today, and this was a non critical piece of information to learn, so I didn't have time to look. In hindsight, I should have done a cursory Google first. My bad.
Comment: @AdrianLarson Aye aye captain! Thank you for your leniency :)
Comment: You are normally good about researching basic topics before posting here. When googling the title will yield an answer to the question, however, it is hard to not vote down for lack of research.
Comment: That is the warning. :) It's just 2 internet points, it doesn't seem too harsh in the grand scheme of things. I have a lot of data points that you are a solid, productive member of this community and one post certainly won't change that. My reaction may have been stronger for someone who has a bad track record already.
Answer: No a record will take 2KB space irrespective of whether you fill one field or all fields.
Read Salesforce record size overview on how salesforce calculates record storage space.
Estimated storage for records by object type:

Leads -- 2KB
Contacts -- 2KB
Accounts -- 2KB
Person Accounts - 4KB
Opportunities -- 2KB
Forecasts -- 2KB
Events -- 2KB
Tasks -- 2KB
Cases -- 2KB
Case Team Member -- 2KB
Solutions -- 2KB
Notes -- 2KB
Custom Reports -- 2KB
Campaigns -- 8KB
Campaign Members -- 1KB
Contracts -- 2KB
Google Docs -- 2KB
Quotes -- 2KB
Tags: unique tags -- 2KB
Custom Objects -- 2KB
Quote Template Rich Text Data -- 2KB
Articles -- 4KB*
Email Message -- 2KB**
Person Accounts -- 4KB***

*May vary based on the content of rich text area (RTA) fields. Images from (RTA) are stored in file storage area.
**May vary dependent on whether the email message is HTML. For example, a 100KB email message will consume 100KB of data storage
  space. Text only emails will take less than HTML due to only being the
  body text and not the html code and text version as well.
***Person Accounts consume roughly 4KB. They are a junction of two individual records, an Account and a Contact. For example, 500,000
  person accounts will require around 2GB of storage. Storage needed =
  (500000 X 4KB)/1024 = 1953.125 MB which when further divided by 1024 =
  1.9073 GB which is around 2GB.


Catch Apex Assertion Exception

Question: I'm looking to see if there is a way to catch an assertion exception in apex and handle it gracefully. For instance, I have some number fields with a default value as 0. However, I'm hoping to use an assertion exception to ensure those values will never be null. I've done some searches so far and one post suggests creating a custom exception to handle this, but 'm not quite sure how this would resolve the issue. Is this even possible?
Comment: I'm voting to reopen because, while the text of the question itself is a duplicate, there is another question that can be asked here. That question being "Are assertions or exceptions the right tool for this job?"
Comment: @DerekF I recommend you edit the question to reflect the reason you suggest this question be reopened which I support on that basis. I'll add that just because a question has been asked before, that doesn't mean it isn't worthy of more than one answer, esp if the answer provides additional insight.
Comment: Exceptions to handle mundane logic are generally considered bad practice. Is there a reason why you don't want to use validation rule(s) here?
Answer: No. A failed assertion is an automatic transaction abortion, just as if you'd violated a governor limit. You cannot try-catch AssertionException; if you must use an exception, throw a custom exception, but be aware that throwing an exception is a costly CPU operation (relatively, anyways), so it should only be used as a last resort.
Answer: No, AssertException is not catchable and should never be used in production code. If you need to throw an exception in your code, define a custom exception type:
class MyException extends Exception { }
...
    if (/*errorCondition*/) throw new MyException('error message');

And you can actually now throw standard exception types as well, so you could forego defining your own:
if (/*invalid inputs*/) throw new InvalidParameterValueException('Some informative message');

Catch Apex Assertion Exception


Elements with most commonly occurring isotope being different from the most stable one

Question: Usually, stable isotopes have highest abundances, often much higher than radioactive ones. Are there any elements having most commonly occurring isotope different from the most stable isotope?
Comment: What is "most stable"?
Comment: Fe-56 is the most stable iron isotope and the most abundant. Ni-62 has the highest binding energy of all  but is not the most abundant Ni isotope. Nuclide formation in stars is complex as is radioactive decay and artificial element manufacture.  There is a lot in Wikipedia.
Comment: When isotopes are stable (resistence to spontaneous decay) enough , observationally stable or assumed as stable, their relative abundance is not determined by their stability, but by probability of the path of the nucleogenesis, leading to the considered isotope. If there is formed about 10 times more isotope A than isotope B, that there is about 10 times more of isotope A than B, even if B is more stable.
Comment: How about $\ce{^{79}Br}$ and $\ce{^{81}Br}$ $(1:1)$?
Answer: Yes.
You're probably thinking about comparing nuclear stability by comparing radioactive decay half-lives, which is a reasonable and intuitive (though somewhat limited) criterion. Already here there are multiple examples which fit the requirement.
For instance, rhenium has two isotopes naturally found on Earth. 62.6% of all rhenium is rhenium-187, which beta-decays to osmium-187 with a measured half-life of 41.2 billion years (about four times the current age of the universe). Meanwhile, the remaining 37.4% of rhenium is "observationally stable" rhenium-185, which is to say it is theoretically expected to undergo spontaneous nuclear decay, but no such decay has yet been measured, suggesting its half-life is likely far higher.
An even more lopsided case is indium. 95.7% of all indium is radioactive indium-115 with a double beta-decays with a half-life of 441 trillion years, compared to 4.3% of observationally-stable indium-113.
Another interesting example is tellurium, which has eight naturally occurring isotopes. Two of these, tellurium-128 and tellurium-130, compose 65.8% of all tellurium, and both have staggeringly huge measured half-lives, greater than a billion times the age of the universe.
There are also a number of other close cases such as rubidium, neodymium, samarium and cadmium, where radioactive isotopes compose >10% of natural abundance, but not enough to beat the predominant observationally-stable isotope.
It's possible to adopt other definitions of stability, such as comparing the nuclear binding energies per nucleon. Under this criterion, then it turns out that for the majority of elements the most stable isotope is not the most naturally abundant. You can conveniently check using this Wolfram applet. If you scroll though the elements, you'll notice that the peaks in the two charts very often don't match perfectly, though they're usually close.
One may ask an interesting question - why do these mismatches exist in the first place? I suspect the answer ultimately comes down to the fact that most naturally-occurring isotopes are generated in violent astrophysical processes which are far from equilibrium, combined with the fact that nuclear processes only allow a limited variety of discrete steps up/down in proton and neutron numbers to be made, and sometimes isotopes get trapped because there is no good combination of steps to change them.
Comment: Just as in Chemistry thermodynamics says what can happen, but kinetics controls which of those possibilities actually does.
Answer: Tantalum-180 famously has an isomer, $_{73}^{180m}\ce{Ta}$, which isn't the lowest energy (nuclear) isomer having that combination of mass number and atomic number. But it has a long half-life ($\ge 4.5×10^{16}$ years). This isomer is only about $\sim 0.01$% of naturally occurring tantalum, the rest being tantalum-181; but it far exceeds the ground-state tantalum-180 isomer which is known only synthetically.


Transaction Nonce deterring Re-entrancy Attack?

Question: Why doesn't the use of transaction nonce deter re-entrancy attack?
Answer: The transaction nonce applies to the entire transaction, including all internal calls made by different contracts to each other as part of that transaction. So it has no relevance to reentrancy, which involves inserting unexpected calls into the control flow within a single transaction.


How are all these crypto tokens ICO's legal?

Question: I started noticing lately a lot of crypto meme tokens being generated and sold online in a variety of ways. Basically everyone can generate ERC20 BNB based tokens, sell them in a pre-sale, and put them on a decentralized exchange. I was wondering how is that even legal, having in mind that crpyto ICO's are actually regulated and you can't actually buy a token from a serious company in a ICO unless you pass KYC details. So what is that all about ?
Answer: I doubt most of the creators are considering legality when they launch those. On the other hand, some ICOs have a bunch of lawyers behind them and everything is legal (at least in the target countries), but that kind of preparation takes a lot of money and time.
So, most of the ICOs are probably launched simply because it's easy to launch one, and hoping to get some easy money. Only afterwards people realize that they should probably considers legality and taxation aspects as well.
Comment: That's something what I've thought as well...but then again, could it be also that because these token are obtained by "swapping" existing crypto(BNB), it's not under anyone's
jurisdiction, since there's no fiat involvement ?
Comment: No idea, I'm not a lawyer.


Is it valid to use the distribution of individual tree predictions in a Random Forest to approximate predictive uncertainty?

Question: Methods of estimating the uncertainty associated with a specific prediction from a Random Forest (Let's say Regression) by looking for a distribution to construct a CI from are quite involved/complex (jackknife and all that magic). I assume that since those methods exist, simply taking the individual predictions of trees and using that as a distribution is somehow invalid? Is this due to how the trees are constructed and the fact that they are not independent? I feel like I am missing something very obvious.
Comment: Question is not so clear to me. What does CI stand for? The bottom line is that you want some method to estimate the uncertainty of the prediction of RFR, correct?
Comment: confidence interval. To the second part, yes but not what I am asking. I am aware there are methods/papers on estimating uncertainty in the prediction of RFR/RFC, however I am inquiring as to the validity of the approach outlined in the question.
Answer: No, this is probably not a good idea. The concept behind a RFR is to average a lot of "bad" predictions in order to get a good one. This does not necessarily entail that the individual predictions are realistic. This is something that you would need to construct a valid uncertainty range. For example, If you have many bad predictions that are too high, but equally many predictions that are too low (by a similar magnitude as the ones that tare too high), then they will cancel each other out, and the mean prediction can make sense. But if you use the individual predictions as distribution, then the distribution would be much too broad.
However, there is a technique called quantile regression forest that extends the concept of a RFR to probabilistic predictions. (https://www.jmlr.org/papers/volume7/meinshausen06a/meinshausen06a.pdf). In a RFR, each forest outputs an expectation value, and the individual expectation values are then averaged. The expectation value of a single tree is the mean value of all the training samples in the target leaf (the y-values of all training samples that end up in that leaf). In a QFR, each tree outputs a quantile (e.g. the 0.9 quantile), and this is computed as the quantile of all the training y-values in that leaf. The quantiles of the individual trees are then averaged (as a weighted average) and give a final quantile. If you predict different quantiles (e.g. 0.1 and 0.9) you can construct a quantile-range, which can be used as a measure of uncertainty of the prediction. This is different from what Asker is proposing. They propose to use the distribution of the expectations values of the single trees, but a QFR uses the distribution of y-values in the target leaf.
Comment: Instead of looking at individual trees' predictions; what about looking at sampled groups of m<<n individual trees for a more robust notion of uncertainty?


How to use the Dell PowerEdge as a normal server?

Question: I have a Dell PowerEdge 2950. How do I set it up to be a normal computer?
When I try to install ubuntu it does not see any of the harddrives.
I read somewhere that I have to set up RAID before I can install an OS.
Is this a must?
Is it possible to set this machine up as a normal desktop?
Answer: Yes, it is possible. Enter into BIOS, reset all settings to default and reboot. The RAID setup prompt should pop up for you upon first boot.
Comment: If it's anything like the 2500 you can press Ctrl-A at the boot BIOS screen when indicated to configure arrays.
Answer: It can be setup as a normal desktop, but why would you want to?  It is going to be like having a hairdryer running next to your desk.  You could easily build a computer for cheap that will outperform the 2950's.


Cat REALLY wants to leave his "safe" room after 1 day at our house

Question: We got a Birman cat a day ago and he just sits at the door of his safe room at meows a majority of the time I'm sitting in his room. He will also come to me and wait for me to notice him and then walk to the door and start meowing. The afternoon that he came home with us he seemed incredibly inquisitive and we decided to let him out, 10 minutes later he was cowering in the dark corner of our bathroom so we put him back in the safe room. I am wondering if I should let him out or keep him in here?
Comment: Is the safe room acutally safe? How often are you in there? Are there hiding spots? Preferably high up, as cats like to be able to see what's coming from below.
Comment: There's no one definite answer to this question. I would close all doors and only let him out into the hall and the safe room to avoid overwhelming him. If he manages that well, you could open the door to one more room tomorrow or in a few days.
Comment: @Christian yes there are many hiding spots nd high ledges in the room and I am in there watching Netflix for hours each day
Comment: The only time this is a question is if you're introducing another cat, or they're misbehaving somehow. Otherwise you are to be a good host and to accommodate your guest with w/e they want, whenever they want it. Also, "cowering in the dark corner of our bathroom" may have been mistaken for them thinking it's a good spot to hunt from.
Answer: If your cat wants to explore the area you should let him do so, but leave the door to his safe spot open so he can hide there if or when he gets scared.
Every cat is different and some are brave and face changes head on while others are shy and need more time to feel comfortable in a new place.
Unless you have other pets there is no reason to put him in a separate room, but you should make a few safe resting places for him like a cat tree or other elevated places where he can observe the area in safety.
Comment: I'd disagree that there's no reason to keep him in a separate room; cats can get overwhelmed with changes to their "territory," so limiting the area and opening it up in stages as Elmy suggests is helpful even if he's the only pet in the house. Otherwise, this has good advice!
Comment: @trondhansen we let him out of the room today and he seems to be going splendidly. Although he does seem quite a bit overwhelmed unlike last time (although he's sleeping right now) when he is awake he seems to understand that he can explore for a bit and than come right back to the safe room when he feels stressed.
Comment: @AllisonC thank you for the edit.when i say no reason to put him in a separate room what i mean is a room where the door is closed and that should not be needed if one give the cat some safe hiding places.
Answer: You just need to leave everything open (except main door).
He will do what he feels best, no need to tell him what to do or not to do.
I received an adult cat that was hiding most of the time in dark corners or under the furniture. So I just let him do it, he himself started progressively going out and after two weeks or so he was like a normal cat.
And now he sleeps in the bed along with my other cat.
You just need to give him time, food, water, and that's it, don't push.


Possible to play HEVC(x265) files on ipad?

Question: I tried playing some HEVC videos on my iPad 3 running iOS 9.2.1, but was unable to do so using any player(I tried Infuse,VLC and some others), only audio plays and video is like stuck. I was wondering if there was any way I could play such videos on my iPad without reencoding them to h.264.
Comment: Have you tried the app [H265](https://itunes.apple.com/us/app/h265/id768692434?mt=8)?
Comment: Sorry for the late reply.. Yes, I have, it doesn't work
Comment: Can you post more details about the file?
Answer: Don't forget that HEVC (H.265) has higher playback requirements than H.264, and you are attempting playback on a fairly old iPad.  It is not going to be able to keep up with what is playable on the latest iPad or iPhone.  Don't despair over your older hardware, every computer has its limits, if you encoded a 12-bits-per-pixel 4K 60fps video in HEVC, it wouldn't play smoothly on any iOS hardware Apple has out now.
So ...  Find the limits of your hardware.   Encode something small, get it playing, then encode larger and larger samples until you hit your iPad's limit.
First, HEVC on an iPad using VLC Player is possible - I am successfully encoding HEVC videos to play with VLC player on my iPhone and iPad.  I am using and recommend ffmpeg, which is downloadable as a binary (so you don't have to learn how to compile stuff) here:  https://ffmpeg.org/download.html
Encode a small 120-pixel-wide video in H.265 with this ffmpeg command:
ffmpeg -i Input.avi -c:v libx265 -preset medium -x265-params crf=24 -r 24 -vf scale=-2:'if(gt(ih,120),120,ih)' -c:a aac -strict -2 -b:a 64k -ss 00:02:00 -t 10 Output.mp4

This will create a small, ten-second video that is 120xsomething that would play easily on your iPad3.  If this doesn't work, then it's not a weak cpu issue, perhaps its your transfer mechanism.  Delete the h265 media from VLC player, and try copying the h265 media to the VLC player three different ways: copy to VLC app via iTunes, use VLC app itself to download the h265 media file, and use a third-party file manager, such as Documents by Readdle, to download the media and then send it to VLC via "Open in".  Hopefully you will find it playing with one method.
Once you find a way to get H265 to play in your VLC Player app, encode the video in larger sizes by replacing the "120" in the above command with larger sizes, I recommend going 120 -> 240 -> 360 -> 480.   Once you hit a limit that stutters, then go back down one size, and that's what your iPad 3 can handle.
Remove the 10-second limitation and encode your entire media with ffmpeg using this command:
ffmpeg -i Input.avi -c:v libx265 -preset medium -x265-params crf=24 -r 24 -vf scale=-2:'if(gt(ih,120),120,ih)' -c:a aac -strict -2 -b:a 64k Output.mp4

Finally, if you want slightly better compression, you can change the "-preset medium" to "-preset slow" or even "-preset slower" to have it spend more CPU and time squeezing out another 5%-10% out of the file size for the same video quality.
Good luck!!
Answer: I don't think Apple supports native HVEC just yet, although I believe the newer AX processors support hardware decoding of it. But you can download an app like VLC and it should have no problem playing it
https://itunes.apple.com/ca/app/vlc-for-mobile/id650377962?mt=8
Answer: nPlayer from Newin Inc. supports x265, as well as any other format. I just tested it on iPhone 7 Plus iOS 10.1.1. You can easily copy the clips to your phone using drag and drop and a web browser. No jaibreak required. There is a free version.
Answer: The best way to play hi-res video is to jailbreak it and use XBMC. But videos still get stuck on iPad 3 (I don't have latest version of XBMC, so it may work if video resolution is not very high). And I don't think it will work on 1080p.
Infuse should have no problem playing it, though.
Answer: I have an iPad mini 2 and I had trouble viewing hevc 1080p files with infuse: freezes, lags... so I tried 720p hevc and... wow, no problems! so I suggest u to convert ur files to 720p or download them with this quality!
Answer: On my iPad 2 running iOS 6.2.1 using VLC, I can play H.265 HEVC videos at 480p (720x480) with no lags, audio is fine. Note that overall bit rate is just 537 Kbps. Still, for an iPad 2 in 2017, I am impressed.
Answer: Air Video Pro will play these on iPad.
Comment: Welcome to Ask Different!  Please don't provide 1-sentence answers.  We're looking for answers that provide explanations as to why it answers the question as well as why it's the best answer.  See [answer] for info on what makes up a good answer.  - From Review -


Text Not Appearing?

Question: I'm designing a logo and I'm almost finished but I'm trying to add text to the logo to finish it off but the text won't appear. No matter what color I make the text it just doesn't appear. Anyone know why this could be? I'm using Photoshop CS5.1 extended by the way.
Comment: Hi there, and welcome to GD. Can you please provide us with screenshots and tell us what you have tried? It would make it a lot easier to help you.
Answer: Here are a few thoughts. Are you sure you have chosen the text-tool, and with a font-size that is actually big enough to see?
Maybe:
You are using the text-tool on a layer where text is "not allowed".
or
the layer you are putting text in, is behind something else. Go an look in your layers-panel and see if the sorting of layers are wrong.
Comment: I am happy to help.
Answer: I've had the same problem and I had such frustrating time trying to solve it only to find that the presets when I create a new file were all wrong. The resolution was some 9.2 pixels. I've no idea how the presets got messed up. But I set it back to 72 pixels, and it's now alright. Hope that helps. :)

Text Not Appearing?


How to fix Dokan to implement a Virtual Drive?

Question: Dokan currently does not create a virtual hard disk for its filesystem (i.e. in Device manager, you dont see another disk drive). Anyone have any idea on how to start to correct that?
Answer: Dokany is the active fork of Dokan and bring the ability to create virtual drive.
Dokany have made big progress by implementing the mount manager of dokan. There is only the PnP part that is not totally implemented. When this will be added, you will see the dokan device in the device manager.
Answer: Representation in device manager requires a plug-n-play device driver. so you need to write one. Or use our Callback File System


Announcing the November–December 2023 topic challenge: Alberto Moravia

Question: In accordance with our meta agreement to have topic challenges
and a later meta agreement to have topic challenges lasting for two months and overlapping by one month,
it is (long past) time to announce the November–December 2023 topic challenge.
Based on the number of votes (+5/-1), the last topic challenge fully in 2023 will be:

Alberto Moravia

What's a topic challenge?
See the meta posts linked above, and also this main meta post. In short, during November and December 2023 you are invited to try to read at least one work by Alberto Moravia and ask questions about it.
Participation is not obligatory in any sense, and questions on other works are more than welcome during November and December too; they just won't count as part of this topic challenge.
How can I take part?
By getting hold of some works of Alberto Moravia and asking (or answering!) good questions about them. Questions about these works should be tagged with alberto-moravia and italian-literature and other tags as appropriate. We'll keep a list of all such questions in an answer to this meta post.
Below is the
presentation (largely written by Charo although the original suggestion was from user37920):

Alberto Moravia, pseudonym of Alberto Pincherle (born 28 Nov 1907, died 26 Sep 1990, both in Rome, Italy). His works are available online.
This Italian journalist, short-story writer, and novelist is known for his fictional portrayal of social alienation and loveless sexuality. He was a major figure in 20th-century Italian literature. He has won numerous literary awards, including Strega and  Viareggio Prizes, some of the most prestigious Italian literary awards. His work has received several nominations for the Nobel Prize in Literature.
Translated from the 2014 Bompiani's edition of the short novel Agostino:

In the course of sixty years of uninterrupted activity, Moravia has built up an immense and coherent production in its developments - novels and short stories, theatre, travel reportages, writings on literature, art and cinema, writings on politics, current affairs and costume, autobiographies and interviews  – which represents one of the most significant testimonies of the past century.  Numerous films have been made from his novels and short stories, including La ciociara by Vittorio De Sica, Le Mépris (Il disprezzo) by Jean-Luc Godard and Il conformista by Bernardo Bertolucci.  Also from Agostino Mauro Bolognini made a film in 1962.

His major works are:

The Time of Indifference (Gli indifferenti, 1929)
Agostino (1943)
The Woman of Rome (La romana, 1947)
The Conformist (Il conformista, 1947)
Contempt (Il disprezzo, 1954)
Roman tales (Racconti romani, 1954)
Two Women (La ciociara, 1957)
Boredom (La noia, 1960)
Journey to Rome (Il viaggio a Roma, 1988)

Translated from the abstract of the 2014 Bompiani's edition of the short novel Agostino:

The short novel Agostino was the masterpiece that allowed Moravia to win critical and public recognition.  Agostino is the story of a sexual initiation.  On the one hand, a thirteen-year-old boy who is still a child;  on the other his mother, a widow, but still thriving and eager to live.
During a beach holiday, the relationship between the son and the mother deteriorates, becomes corrupted by restlessness.  For the boy it will be necessary to arrive at an authentic crisis, a laceration that will allow him to start again and then to recompose the world, to get a reason for life.
With Agostino, a return to actual fiction after evasions and surrealist and satirical outbursts, Moravia won his first literary prize.

In The Woman of Rome (La romana), the protagonist, Adriana, is a beautiful and very naive young peasant girl who, to get out of the condition of poverty, begins a modeling career for some low-grade painters. Adriana thus finds herself immersed in a mediocre and hypocritical world, which ends up leading her to prostitution and increasingly complicated situations. We find then a picture of the intersecting lives of many characters, including a fascist official and a young law student with anti-fascist ideas, the prototype of the intellectual in Moravia's works.  This young man is incarcerated for political ideas, but, after an interrogation by the Fascist forces, betrays his colleagues. This leads him to suicide.
It's a novel with a suspended tone between realistic portrayal and existential investigation, which questions the hypocrisy and inauthenticity of bourgeois values.
The following text is translated from the abstract of the 2017 Bompiani's edition of Racconti romani (Roman tales):

Alberto Moravia's Roman tales are linked to a tradition begun by Belli with his monumental work and then continued by Roman poets and narrators such as Pascarella, Trilussa and others. Here we also find an anonymous character from the Roman common people or small bourgeoisie, who speaks in the first person, recounting their own cases and those of their people. The language is no longer the narrow dialect of Belli or the tempered one of Trilussa, but an Italian sprinkled here and there with Romanesco words and expressions. The city and the people of Rome have naturally changed a lot over the past century: here is described the modern and somewhat eccentric Rome of the first decade after World War II; a Rome that is both free and alienated; diverse, vibrant, and yet marred, full of encounters, unexpected events, and adventures, but also of resignations and anxieties. An incredibly rich book, a significant act from the human comedy of our not-so-distant past.

Romanesco is the regional language around Rome.
At Internet Archive, you can find some of the Moravia's books in original Italian and translated to English, French, Spanish, Chinese, Vietnamese, German and Polish, for instance:

A selection of Roman tales translated to English by Angus Davidson.
A translation to Vietnamese of Racconti romani by Thanh Gương.
The short novel Agostino translated to English by Michael F. Moore.
L'ennui, a translation to French of La noia by Claude Poncet.
Contempt, a translation to English of Il disprezzo by Angus Davidson.
Le mépris, a translation to French of Il disprezzo by Claude Poncet.
Two women, a translation to English of La ciociara by Angus Davidson.
La campesina, a translation to Spanish of La ciociara by Domingo Pruna.
La romana translated to Spanish by Francisco Ayala.
A translation to Chinese of  La romana.
Journey to Rome, a translation to English of Il viaggio a Roma by Tim Parks.

What's next?

Vote for the next topic challenge (December–January), or propose your own topic!
Answer: List of all questions posted in this topic challenge

Has complete Moravia's "Racconti romani" been translated to English? by Charo, 01/11/2023.
Censorship reaction to Moravia's "La mascherata" by Charo, 12/11/2023.
What's the significance of this sentence in the tale "Ladri in chiesa" by Alberto Moravia? by Charo, 03/12/2023.
Was the feeling of attraction towards a lower social class present in Moravia's "Agostino" discussed by critics?, by Charo, 04/12/2023.

The highest-voted of these are What's the significance of this sentence in the tale "Ladri in chiesa" by Alberto Moravia? and Censorship reaction to Moravia's "La mascherata", with a score of 3 at the end of December.
The most viewed is Has complete Moravia's "Racconti romani" been translated to English?, with approximately 100 views during the months of November and December.
1 question received at least one answer.

Reviews submitted to our Tumblr blog: TBD.


All URLs redirect to mod_rewrite error page

Question: I have a few platforms (domain.com/omeka, domain.com/wordpress, domain.com/omeka-s) living alongside each other on an Azure cloud server running Ubuntu 14.04.4 and Apache 2.4. A few days ago, I tried installing an additional platform, but doing so seemed to break everything else on the server, so I removed it and reinstalled Apache. After editing the .htaccess file to remove a typo, everything worked. I left for the weekend, came back to work this morning, and everything is broken again.
By broken, I mean every URL on the server redirects to a mod_rewrite installation error page for Omeka (domain.com/install). Omeka has already been installed and running for months. MR needs to be enabled for Omeka to be installed and function properly. MR is definitely enabled.
$ sudo a2enmod rewrite
Module rewrite already enabled

I'm assuming this is a problem with either the /var/www/.htaccess file or the /etc/apache2/apache2.conf file. Here's the relevant .htaccess code that is default for Omeka:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule !\.php$ - [C]
RewriteRule .* - [L]

RewriteRule ^install/.*$ install/install.php [L]
RewriteRule ^admin/.*$ admin/index.php [L]
RewriteRule .* index.php

And here's the relevant(?) apache2.conf code:
<Directory />
    Options FollowSymLinks
    AllowOverride All
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
</Directory>

AccessFileName .htaccess

If I remove the .htaccess file, or if I just remove some of RewriteRules, everything on the server is inaccessible (including Wordpress & Omeka-S). I'm clearly missing something. Any ideas?
Answer: Figured out the problem. Very simple, stupid stuff.
Problem 1: When I reinstalled Apache, the /etc/apache2/sites-available/000-default.conf file reverted the DocumentRoot to /var/www, when it was supposed to be /var/www/html.
Problem 2: There was an additional and nearly identical .htaccess file in /var/www/html/omeka that had a typo. It was missing the ^ before install/.*$
Also, the IT department who set up the cloud server for me installed 2 instances of Omeka (who knows why), one under /var/www and one under /var/www/html, so this whole problem most likely would have been averted (or at least easier to solve) if that wasn't the case.


Methods for batch populating PCBs without a pick and place

Question: What are some good methods to populate moderate numbers of pcbs (20-100), without the aid of a pick and place machine?
Comment: Can you tell us a bit more about the PCB? Does it have solder mask? surface mount? through hole?

How big/complex is the PCB?
Comment: I have to agree, can you tell us what kind of board, if it is all through hole, a stencil is worthless, but if it has all surface mount components then you will save years of your life.

Are they 0603 footprint, or 1206, another big difference. And solder mask is always a big deal.
Comment: do you have a stencil for solder paste?
Answer: Avoid through hole parts. Don't put components on both sides of the PCB.
Apply solder paste with a stencil, arrange components, bake/reflow.
(update)
Here's a great video series from a guy who built 100 little dev boards in 10 days.
http://fletchtronics.net/blog/100-bumble-bs-10-days
Comment: You can get a stencil from stencilsunlimited.com or integratedideas.com.

Of course, as Kellenjb pointed out, this works only if you have a limited set of conditions: soldermask, smt, and pitch are all important in making this work.

If you only have to do 20-100, and they're only a couple inches square, you'll get it done by hand with a good iron long before the stencils come in the mail.  If you're doing this as a business, plan for stencils, or look into a cheap (relatively) pick-n-place for small jobs. (ex. http://www.manncorp.com/pick-and-place/mc384)
Comment: Are Stencils useful for single pcbs or are they only useful when you have multiple un-panelized pcbs?
Comment: You can use a stencil for a single board, but it takes about the same time to stencil and reflow a panel of several. Manual placing is also quicker as you can place all instances of each part, reducing time swapping between different tapes etc. The combination of tapes stuck down and a foot-operated vacuum pickup can save a lot of time (hint - it's hard to pick parts from tape with tweezers) - with  practice you can get down to a couple of secs per part for repetitive placements of the same part type.
Comment: Just watched that video - this really isn't the way to do it efficiently. For a board that size you want to panelise them in a v-scored panel (v-score rather than routed so you can snap out easily) maybe 4x8 boards (hand reach when placing is the first limitation on size), and reflow the whole panel in a toaster oven.
Answer: If your board is reasonably small, use the soda can method to make a stencil. It's always good to panelize your boards but once the panelized board is over a certain size, i.e. bigger than a soda can, then this doesn't work anymore. Of course, you could always buy a similar thickness sheet of aluminum from McMaster-Carr, then you're only limited by the sheet of paper your laser printer can handle.
For populating boards, save your wrists and your sanity and invest in a cheap manual pick and place. I found that suction pens are ok but nowhere near as handy as a full fledged x-y-z (plus rotation) stage with foot switch for vacuum. There are a few options out there but I found this one to be the best bang for your buck by far. Here's my setup... note the footswitch should be on the floor :)


Can I still capture a territory if I lose all my land units in combat?

Question: My friend and I had the following battle: I had 3 fighters and 5 infantry, and he had 3 infantry. At the end of the battle, all of my infantry got destroyed and all I had left was the 3 fighters. He lost all of his infantry. He said I couldn't take the territory because I didn't have any land units. I started the battle with land units but at the end of the battle, I didn't have any. What is the rule on this specific situation?
Answer: The rulebook clearly covers this situation. On page 17 under Step 8: Capture Territory

If you win a combat as the attacker in a territory, and you have one or more surviving land units there, you take control of it.
Sea units cannot take control of a territory....
Air units can never capture a territory.
Answer: You need to capture a territory with a land unit.
You have your choice of which units to sacrifice. Meaning that if you want the territory, you need to sacrifice more expensive sea and/or air units to preserve the last land unit.
Usually, the territory is not worth it. Then what you have achieved is destroying your opponent's units on the territory for the future.
The purpose of the so-called "infantry push mechanic" is to attack a territory with enough infantry so that you will have infantry left to take it over AFTER absorbing battle losses.


If a governor or senator is chosen as a running mate (VP) to a president candidate, and that candidate loses, what happens?

Question: If a governor or senator is chosen as a running mate (VP) to a president candidate, and that candidate loses, do they go back to their post as governor or senator?
Answer: Nothing happens until the member resigns.
In 2008, for example, both candidates, Barack Obama and John McCain, were sitting U.S. Senators (incidentally, it was the first such time this ever happened).

After the election, Barack Obama, the victor, constitutionally prohibited from holding both offices, resigned as Senator (causing Blagoveich to have 'F**n gold!'), and John McCain resumed his duties.
Indeed, Obama scored some points off of McCain in October because of this.  During the midst of the economic "meltdown," McCain thought it would score him some points to announce to the world that he was going to stop campaigning for a few days to return to the Senate, due to the seriousness of the event.  He called on Obama to do the same - but Obama did not.  Instead, Obama ridiculed McCain for "being unable to juggle" multiple hot button items.  He claimed that as President, there wouldn't be the chance to let things cool down, insinuating that McCain would be an ineffective multi-tasker.

As a second example, Paul Ryan, in 2012, ran two campaigns.  In the first, he ran for vice-president, in the second, as a Congressman from Wisconsin.  He won the latter, but not the former.
About the only time this was an issue was in 1996, when the Senate Majority Leader, Bob Dole, decided he needed to tell people that he really, really wanted to be President.  So, he resigned his Senate seat early in order to campaign.  In the end, he lost the vote for the Presidency, and because he had resigned his seat, just had to go home.
Running for office has no bearing on your current office in any way.  It's only if you win that adjustments need to be made.
Comment: @AffableGeek good answer, but don't forget that for state offices, there are a handful of states that require you to [resign to run for another office](http://ballotpedia.org/wiki/index.php/Resign-to-run_law).
Comment: I have a feeling he made more from bananas that you grow in the field, first. :)  I promise not to go any further with the banana line, however....
Comment: I have a suspicion that Dole made more on drug commercials than as a Senator, so he didn't lose out that much :)
Comment: Even more amusing imho: both Obama and McCain were senators who had two years remaining on their term when they contested the presidential election. Which brings me to another point: one might be running for president at the end of one's term (or, like Ryan, as a representative who is up for re-election every two years anyway) so a third outcome is: they lose their seat in the election.
Answer: Nothing happens. They don't "go back", they never leave. They're running the elections while continuing holding the job. Only if won, they resign from the previous position (sometimes not immediately, for example the current Lieutenant Governor of California stayed a couple of more days as the Mayor of San Francisco and had to be sworn in as Lt. Governor separately from Jerry Brown because of that).


Show If $\int_0^{\infty} f(x) dx$ is convergent, for $a \ge 0$, $\int_0^{\infty} \frac{f(x)}{e^{ax}}$ is convergent.

Question: $e^{ax} \ge 1$ so for $f(x) \ge 0$ we have $\frac{f(x)}{e^{ax}} \le f(x)$ and by comparison test it is convergent. But what about negative f(x)?
I also used integration by parts but it was confusing.
If $g(x) = e^{-ax}$ then $g'(x) = -ae^{-ax}$ and if F'(x) = f(x) then $$e^{-ax}F(x) = \int e^{-ax}f(x) + \int -ae^{-ax}F(x)$$ on the other hand $$\int_0^{\infty}f(x) = \lim_{T\to\infty}\int_0^{T}f(x) = \lim_{T\to\infty}F(T) - F(0)$$
But how can I use these informations?
Comment: Negative $f$ is basically an identical comparison to positive $f$, you just turn some of the inequality signs around. More interestingly, what about $f$ that oscillate between positive and negative?
Comment: If the integrals are in the  Lebesgue sense then the sign of $f$ is of no consequence.
Comment: You should not solve the question using what you suggested, try to compare the given integrals
Comment: Integration by parts with $F(x) = \int_x^\infty f(t) dt$ should do the trick.
Answer: Define $F(x) = -\int_x^\infty f(t) \, dt$. Then $F'(x) = f(x)$ and $\lim_{x \to \infty} F(x) = 0$.
Integration by parts gives for $0 < x < y$
$$
 \int_x^y e^{-at}f(t) \, dt = e^{-ay}F(y) - e^{-ax}F(x) +a \int_x^y e^{-at}F(t) \, dt \, .
$$
With $M(x) = \max \{ |F(t)| : t \ge x \}$ we can now estimate
$$
 \left| \int_x^y e^{-at}f(t) \, dt \right| \le M(x) \left( e^{-ay} + e^{-ax} +a \int_x^y e^{-at} \, dt \right) \\
 = 2 M(x) e^{-ax} \le 2 M(x) \to 0 \text{ for } x \to \infty
$$
and that implies the convergence of $\int_0^\infty e^{-at}f(t) \, dt$.
Answer: Claim: $$\left|\int_0^\infty \frac{f(x)}{e^{ax}}\right| \leq \sup_{b \geq 0} \left|\int_0^b f(x)\right|$$
Lemma: If $a_1, a_2, \cdots$ is a sequence of real numbers and $1 \geq b_1 \geq b_2 \geq \cdots$ is another sequence, then for every $n \geq 1$, $$\left|\sum_{k =1}^n a_kb_k \right| \leq \sup_{i \leq n} \left|\sum_{k = 1}^i a_k \right|$$
proof: Let $i$ be the smallest index such that $\left|\sum_{k =1}^i a_kb_k \right|$ is maximized. WLOG assume $$\sum_{k =1}^i a_kb_k \geq 0$$ We will show by induction that for every $0 \leq j \leq i$, $$\sum_{k = 1}^{j}a_kb_k + b_{j+1}\sum_{k = j+1}^i a_i \geq \sum_{k =1}^i a_kb_k$$ starting with $j = i$ and moving down.
The base case is given and the inductive step follows from inductive hypothesis and the fact that for every $j$, $\sum_{k = j+1}^ia_k \geq 0$ because otherwise we would have $$\sum_{k =1}^{j} a_kb_k > \sum_{k =1}^i a_kb_k$$ contradicting the definition of $i$.
Now, to prove the main claim it suffices to show for every, $C > 0$, $$\left|\int_0^C \frac{f(x)}{e^{ax}}\right| \leq \sup_{0 \leq b \leq C} \left|\int_0^b f(x)\right|$$ But this follows from the lemma and approximating the integral by Riemann Sums.
Comment: $|\int_0^C g(x)dx | \le M$ for all $C$ does not imply the existence of $\int_0^\infty g(x) dx$. Or am I misunderstanding your argument?
Comment: You have break it into two parts. So $\int_0^\infty \frac{f(x)}{e^{ax}} = \int_0^C \frac{f(x)}{e^{ax}} + \int_C^\infty \frac{f(x)}{e^{ax}}$. The second is bounded by the $\sup_{b \geq C} \int_C^b f(x)$ which goes to $0$ as $C \rightarrow \infty$ so you don't get oscillation.


Save and retrive data from a custom form to database

Question: I want to build a webapp using wordpress to manage the fornt-end templating and data input. the app will display a wizard, a map to locate the user and a for to insert some information about the location. I will also add a search form that will look from the data inserted by users and will display the results if found. My question is, how I can save some data to the wordpress database, is there any specific function to let wordpress manage the form inputs? I need to create a separate database table or I can rely on the existing wordpress database tables structure? Can anyone point me into the right direction? I don't have any code sample at the moment, this because I want to understand first how to proceed with the custom form that will be showed to the user to collect the data. Thank you.
Answer: It's totally depends on your sow. You can choose custom table to insert custom data and that's need so much code like mysql query to insert data and fetching data using the same approach. If you feel comfortable with those approach you can look for wordpress WPDB.
But to me if you want to build a system which store data from the custom form and stores on the table and display on the wordpress admin panel as well then you might need to go with wordpress default conventional tables. By using custom post type. In this way you can easily display the stored data in the admin dashboard as well as admin can easily change , delete it. And that's a default features.
Comment: Custom post type will not be useful in this case, I need to store personal information of an user so a traditional table will be better than a post that is accessible by anyone
Comment: Then you can check wpdb for interacting with mysql
Comment: I will read the documentation about it. For the data submit to the backend, is there any particular function I need to follow? I know that to submit data wordpress need some hidden fields
Comment: I didn't get your question properly. Could you explain so that I can guide you in a proper way.
Comment: Usually wordpress forms require an hidden field to set an action that needs to be associated with a function called by `add_action()`. I don't remember well the hook to call, but without it if I remember well, wordpress will not manage the data. `admin_action` or similar
Comment: There is a lot of things that you need to do for achieving your goal. But it is possible and here is not possible to tell you that much things.


travel writing recommendations - on or off topic?

Question: I like how many travel guides, specifically the Rough Guide and Lonely Planet series, give recommendations for travel writing about specific countries. I wish I'd read more of those books before I'd done my travelling. I also think it would be great to have a big-list style, ever expanding reference list of travel writing on a country-by-country basis, seeing as how that would theoretically be more up-to-date and comprehensive than your standard travel guide. Would people consider this on-topic?
Comment: I assume you mean specific books about countries? Like how the LP recommends 'The Great Game' for Uzbekistan, Tajikistan etc?
Answer: No, I would say this is not on-topic as it does not fit the standard Q&A format of StackExchange websites. It is a nice idea, but this is not the place for it. Perhaps a section for external links on Wikitravel pages would be helpful  but I'm assuming their community too would restrict the number of links for each entry.


What substance absorbs the most moisture in a given time?

Question: I have bought some damp traps. When it comes to refilling them, what substance would soak up the most moisture? Googling, dishwasher salt and cat litter have been suggested, but nobody seems to be able to say exactly what would, in principle, absorb the most moisture.
Comment: I neither know nor care what they put in those things, but in a long-term cost-effectiveness sense you want a material you can regenerate (dry, generally with oven heat), not discard - or you want a dehumidifier (refrigeration/electrical type) - those things are a cash cow for the makers of the filling no matter what you put in them. Your sources are dubious if they think that cat litter pulls water from the air.
Answer: Calcium Chloride.
They sell it as driveway ice-melt by the 5 or 10 pound bag so it is cheap. It is even used in pickling to make vegetables crisp.
It makes a great desiccant.
Comment: Yes, calcium chloride is the answer. The Safety Data Sheet for the DampRid refill says that's what is mostly in there too: Calcium chloride 60.0 -100.0 %, Sodium chloride 1.0 -5.0 %, Potassium chloride 1.0 -5.0 %
Answer: I'd wager that the granules they sell to refill the damp traps are going to absorb the most moisture of any commercially available product. If there was something that worked better, they would fill the damp traps with that instead.
Example: DampRid Refill


"Mold" vs. "Mould"

Question: While writing about a factory that produces pipes, I needed to refer to how the metal was melted and put into molds/moulds. Which one is it, and is there a correct spelling or are both acceptable?
Comment: There is also a town called Mold (like the American spelling) in Wales, UK. http://en.wikipedia.org/wiki/Mold,_Flintshire http://www.itraveluk.co.uk/content/752.html
Answer: "mold" is the US spelling, "mould" is the British English spelling. No other difference.
Same applies for other meanings of mould/mold, i.e the fungus that grows on rotting substances, for example.
Comment: We revolted because the Redcoats stole our 'u's.
Answer: I'm from upstate New York and was schooled that 'mold' is the stuff that causes spoilage. 'Mould' is to form or shape.  Moulding is the process of forming something or the formed piece itself, as in architectural moulding. A few years ago, our area finally got a Lowes store. I actually laughed out loud when I saw they had a sign claiming they had a 'molding' department!  Yikes!  Also a bit perplexed by all of the Spanish signage, especially since even our highway signs are written in English and French as we're only a few yards from Quebec.
Comment: In the UK, *mould* is the spelling for both meanings http://dictionary.cambridge.org/dictionary/british/mould_1?q=mould and http://dictionary.cambridge.org/dictionary/british/mould_2
Answer: Mould is to mold as colour is to color.
Answer: The Online Etymology Dictionary has "mould: see mold(2)", where 2 is the sense for fungus, however, mould is the accepted spelling in British English for all senses. Likewise mold in American English.
The three senses have interesting derivations, and I was not aware of the third one before now:
http://www.etymonline.com/index.php?term=mold
Comment: John Brown's body lies a-mold'ring in the grave.
Comment: @GEdgar ah! John Brown's body lies a-crumbling in the grave. I previously thought "a-mold'ring" meant there was fungus growing on it.
Comment: Sense 3 is presumably the one used in [*leaf mould*](http://apps.rhs.org.uk/advicesearch/profile.aspx?pid=478) which is more common than *mould*(3) on its own.  It's also called "leaf mulch" even though it can be used as potting compost as well as mulch, presumably to avoid the connotations of *mould*(2).  Apparently leaf mould is actually made by fungi (unlike normal compost which is mainly bacteria), giving a nice is coincidental link between 2 of the meanings
Answer: Personally I have always used, perhaps was taught, that mold is the organic nasty stuff that makes you throw out food or apply bleach to kill it in the shower. (1) Moulding is what trims the walls of your house or is (2) a process using a 'mould' to form Jello, plastic, bricks or anything into a permanent or semi-permanent shape. Moulding can also be used to describe the act of creating character. Much like gild vs guild, I imagine; which someday may be used interchangeably also, since guild is rarely used anymore. Conversely the English 'smoulder' and American 'smolder' are like 'colour' and 'color', just an easy way to identify the educational system of the writer.
Being an 'old' English Major I dislike the modern impreciseness of the language that (especially American) English has acquired over the years, in particular the acceptance of i.e. 'forwards' instead of 'forward' or 'afterwards' instead of 'afterward'. Either are deemed acceptable in modern usage but I find the usage of the plural 's' on either word superfluous.
Answer: There seems some need to distinguish a fungus from a thing you pour jello into. I like "mold" for the former and "mould" for the latter and some use the words that way. Dictionaries just codify what's being done. So, why not choose the usage that makes sense and know the dictionary will eventually catch up?
James (Jim) Minard PhD

"Mold" vs. "Mould"