Is there some hardware that can be used to upload sketch source code via USB flash disk (Automatically By plugging it in)

Question: Well am asking this basically to know if it is possible to create a bootable flash drive that automatically uploads any source code onto the arduino just like creating a bootable flash drive when installing windows operating system on a computer. I will be happy to get some cool responses that would be helpful thanks.
Answer: There is a solution with SD card and SD bootloader. You put a bin file on SD card, insert it into the SD adapter and power up the Arduino. The bootloader loads the bin file to flash memory.
I use 'avr_boot' SD bootloader by Zevero. It reads a file named firmware.bin from SD card if present and loads it into flash.
To generate a bin file for Arduino AVR boards add to platform.txt
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" -O binary {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"

I use this with the ArduinoOTA library which uploads the bin file from IDE to the SD card over network and then resets the MCU for the bootloader to apply the bin.
btw: the ArduinoOTA library can use the upper half of the flash memory too to store the uploaded bin and then activate a modified Optiboot to copy the bin to run location and reset the MCU.
UPDATE 2022: new advanced example for my ArduinoOTA library: load hex from SD card
Comment: Could you please provide a link were i could get more information about how it can be done with ease or if possible please
Comment: @Sigma, sorry, I forgot to link the Zevero bootloader. fixed. the link is in answer.
Answer: There is no specific piece of hardware that does what you ask.
There are various options though:

Write a new bootloader that uses the USB Host Shield to load data from a USB MSD device then flash it to the internal flash of the MCU (hard to do if you don't know low-level programming)
Use an embedded Linux computer (Raspberry Pi, etc) to run avrdude and flash your Arduino like it's a connected to a computer
Use an Arduino that has a Linux portion to it (such as the venerable Arduino Yun) or a shield that provides a similar function (Dragino Yun Shield) to flash the AVR chip from Linux
Don't use an Arduino at all, but use an embedded Linux computer for everything.
Comment: Thanks for the comment though it really seems tough to me its like I have a lot of reading and practice that I have to do. Isn't there any easier way that can by pass Linux some how?
Comment: Not without writing lots of software and learning how the USB host shield works, how flashing the chip works, and other such low-level functionality.


Is every space group realized by some mineral?

Question: Every mineral has it's own internal building scheme, a lattice on which it's atoms lie. Mathematically, this can be described by the space group of the mineral. From mathematical considerations it's known that there are exactly 230 symmetry groups which can occur as the space group of a mineral. Now my question is: Is each of the 230 space groups realized as the symmetry group of a mineral?
Comment: My guess is probably not but I don't have any hard evidence.
Comment: A similar question on physics.SE: https://physics.stackexchange.com/questions/127716/how-many-of-the-230-crystallographic-groups-are-realized-in-nature
Answer: Now all of the 230 space groups are realized by a natural occurring mineral.
I found this blog: crystalsymmetry.wordpress.com where space groups are listed with at least one chemical compound is listed for each space group. Minerals are listed for all of the space groups.
For example, Benitoite has fairly unusual crystal symmetry. I think it was first mineral found for P-6c2 space group.
188 P-6c2 Example – Benitoite, BaTi(Si3O9)
From Crystal Structure of Benitoite.
From a crystallographical point of view this compound (Benitoite)
is especially interesting, being the only known member of the ditrigonalbipyramidal
symmetry class.
Comment: "Not all..." It looks like the blog/poster claims all 230, or am I misunderstanding the intent of the poster? Is there at least proof-of-incompleteness space group that has no known mineral?
Answer: Quoting a mineralogist friend of mine:

I think there are mineral representatives of all 230 known by now - some of the groups are much rarer than others, but there is nothing specifically prohibiting...

This shouldn't be too hard to figure out. There are databases that contain this information, webmineral is one of them. Here an example mineral called lewisite where you can see: Space Group: F d3m . Unfortunately, that website does not aggregate space group data. Maybe it's possible to contact the people who run the website to see if it's possible to add this feature.
Answer: Well, one way would be to look through The rock forming minerals and see how many are represented.  I strongly suspect that not all would be, so from that perspective the answer would be No.
But from an inspection perspective..  For any given mineral structure, we can make changes by simply substituting various cations and anions as in pyroxene; for example, we can substitute Mg(2+) for Fe(2+). Or SiO4(4-) for AlO4(5-) - requiring other changes. So, assuming you had suitable equipment, you could find a naturally occurring crystal that was close to the desired symmetry group and tweak it with substitutions until it matched that group.  Or more simply, adjust the pressure and temperature until the symmetry changed. There is a lot of phase space to explore.
So from that perspective, the answer would be probably yes, we just haven't synthesized them all yet.
Comment: The rock forming minerals are only a small section of all 4000-something minerals described. Limiting your search to only those would miss quite a lot. Also, taking known minerals (like pyroxenes) and "tweaking" in pressure-temperature-composition space is a really labour-intensive and inefficient way of trying to make new minerals with other space groups. I know - this is what I do for a living at the moment.


Why does voice dictation not always appear on the new iPad?

Question: The new iPad supports voice dictation for voice input, but apparently only sometimes. I understand that some things should not support it, such as password inputs and URLs, for example. What dictates (excuse the pun) where this functionality is offered, and where it is not?
Comment: Are you always connected to the internet? http://apple.stackexchange.com/q/44174/12285
Comment: @TimothyMueller-Harder - Yup, Verizon LTE. I know the answer, btw. See the FAQ about asking then answering your own questions.
Answer: The following conditions must be met in order for dictation to work:

You must be connected to the Internet for dictation to work.
You shouldn't be using audio on your device (e.g. if you are on a FaceTime call, the button will not appear.)
You must be focused in an text field which is formatted for normal text (more about this below.)

Developers (and even Web Developers) can choose which keyboard layout will be visible to the user, via the UIKeyboardType property. Here's an example of several different keyboard layouts and what they look like on an iPhone (without dictation).
The dictation button is available in the following keyboard types:

Standard (UIKeyboardTypeASCIICapable)

But is not available in the following:

Telephone (UIKeyboardTypePhonePad)
URL (UIKeyboardTypeURL)
Email (UIKeyboardTypeEmailAddress)
Zipcode (UIKeyboardTypeNumberPad)


How can one reset Arduino Nano from NodeMCU?

Question: If one connects the RESET pin on an Arduino Nano to a digital pin on a NodeMCU, will the NodeMCU be able to reset the Nano by setting said pin to LOW?
Answer: Yes, you can reset a 5 V Arduino with esp8266. I did it many times. The esp8266 doesn't have a problem with pull-up level current at 5 V.
On my picture io 0 of the esp-12F is wired to reset pin of Nano. The esp-12F runs WiFiLink firmware which can OTA upload sketch to ATmega328p and of course before flashing it must reset the ATmega.
Answer: Yes - grounding the reset pin over-rides the pullup resistor on the Atmega 328's reset pin. You may not be able to prevent the NodeMCU from resetting the Nano when it (NodeMCU) is reset, if that matters.
Comment: esp8266 doesn't set pins LOW at startup
Comment: Good to know - thanks.
Comment: that matters.  tks for the headsup, UPVOTED.
Answer: yes it can.
and to make this answer a little longer...

you don't need a level shifter as the pins are 5v tolerant. pullups aren't a problem
you may use an optocoupler for isolation :)
Comment: interesting, UPVOTED


How to search for exact phase with punctuation?

Question: I was trying to find text in StackOverflow and web that contain "using:" exactly that way with colon. No way. Search engines simply discard it and return using results only. How to search for that exact phrase?
Comment: I wish there were a search engine that did this, but it seems that there isn't. Some of the reasons are given in the answers and discussion for [this question](http://stackoverflow.com/questions/11119065/is-there-a-search-engine-that-support-regular-expression-search).
Comment: Searching a search engine for a search engine that allows punctuation lead me to [`SymbolHound`](http://symbolhound.com/?q=using%3A)
Comment: @txtechhelp : thank you, post it as an answer.
Answer: While it might come off as a possible opinion (due to it's suggestive nature), searching around for an engine (or a way) to search with symbols included lead me to SymbolHound .. the other engines usually exclude punctuation as it's mostly irrelevant to the casual searcher and can speed up search queries, while right on the front page of SymbolHound they state:

We hope SymbolHound will help programmers find information about their chosen languages and frameworks more easily.

So it might help those in need of specific queries like using:
Answer: Going off their search guidelines at:
https://stackoverflow.com/help/searching
It appears that to do what you want would be under an "Exact search".
An exact search is done by using quotes around your entire criteria.
In this case the exact search for your criteria would be "Using:".
However, if you try searching this you do not get the : you want as desired.  Instead you only get "using" - although, it works for other ASCII symbols.  Thus, if read through all of the guidelines you will begin to realize that the : in search results is a dedicated special operator by stackoverflow.  It is typically used to establish a range such as "created:2012".
With that in mind, it is not possible to do this using stackexchange's search engine as this operator is strictly dedicated for other purposes; however, that is not to say that you could use a third party searching tool - while being cautious of stackoverflow's Terms of Service.


Need machine learning algorithm to fill in time-series data

Question: I am currently dealing with a time-series data set with cyclical gaps every 30 minutes (30 minutes of data, 30 minutes of no data). Is there a relatively simple way of using scikit-learn (or some other Python library) to predict the missing data using the available data to train it? I assume this would involve a 'supervised training' approach? I have provided a graph for visual reference, the orange line is a 20-minute centralized moving average of the gap data set, and I want to fill in the data to look more like the green 60-minute centralized moving average from a separate complete data set. Thanks!
Comment: Can you plot the raw data (rather than a moving average of it)?  The orange lines don't seem to be the raw data; they are only about 10 minutes out of every hour.  Also, what makes you think the green line is the right way to fit that data?  It seems to match very poorly all of the orange lines in the middle and only match the endpoints; it's not clear what error model would lead to this behavior.
Answer: You can approximate a time series with a polynomial of degree n_degree by using ridge regression. You can try different degree numbers (e.g. [2,3,4,5,6]) and choose the best one. Keep in mind that higher degree models, always get lower error values. So you should somehow penalize higher degrees.
from sklearn.linear_model import Ridge
from sklearn.preprocessing import PolynomialFeatures
from sklearn.pipeline import make_pipeline

for count, degree in enumerate([2, 3, 4, 5, 6]):
    model = make_pipeline(PolynomialFeatures(degree), Ridge())
    model.fit(Time, y)

More details here.
Answer: What you are trying to do is called imputing (i.e. filling gaps) in the time-series.
A guide to imputing time-series using python is available here:
https://medium.com/@drnesr/filling-gaps-of-a-time-series-using-python-d4bfddd8c460
The guide uses a few algorithms to impute data, but a more extensive list of algorithms can be found here:
https://otexts.com/fpp2/regression.html


How do I find out which repository a package comes from?

Question: Is there a method or command which can tell from which repository a package is coming from?
Comment: This is ambiguous. Do you mean: which currently enabled repositories provide a package with the given name, or: which repository was used to install the package with that name that is currently installed?  (Both are useful. I'm looking for the latter, not the former.)
Comment: @ReinierPost If you know which enabled repositories provide the package, you can determine which one was used based on the version of the package that is provided by each repository. If you are unsure which version is installed, run `dpkg -l  | awk '/^ii/{print $3}'`
Answer: Use following command. It has better output:
apt policy <Package Name>

Before Ubuntu 16.04 the command was:
apt-cache policy <Package Name>

Comment: This is the correct answer! The commands in the answer by mac9416 need tedious interpretation + guessing based on their output. For more information about ``apt-cache policy`` see also http://superuser.com/a/236605/61370
Comment: `apt-cache policy` is good but some times you need `apt-cache showpkg` to compare MD5 sums from package. See also `debsums --changed`
Comment: this `policy` option  is the most useful when comparing with `sources.list`
Comment: Sorry, the output is better than what? The accepted answer?
Answer: Edit:
Check out SuB's answer. Looks a bit simpler!
Original:
Commands Needed:

dpkg -s <package> - allows you to
find the version of  that
you have installed. (source)
apt-cache showpkg <package> - will
show a list of Versions of the
package available. For each version,
the source of the package, in the
form of an index file name, will be
given.

If you want to find the source of the package that's currently installed, you'll need the output of dpkg -s <package>. Otherwise, you can simply look at the newest version output by apt-cache showpkg <package>.
Example:
$ dpkg -s liferea
Package: liferea
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 760
Maintainer: Ubuntu Developers <firstname.lastname@example.com>
Architecture: i386
Version: 1.6.2-1ubuntu6
...

$ apt-cache showpkg liferea
Package: liferea
Versions:
1.6.2-1ubuntu6.1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid-updates_main_binary-i386_Packages)
 Description Language:
                 File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid-updates_main_binary-i386_Packages
                  MD5: 557b0b803b7ed864e6d14df4b02e3d26

1.6.2-1ubuntu6 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid_main_binary-i386_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid_main_binary-i386_Packages
                  MD5: 557b0b803b7ed864e6d14df4b02e3d26
...

From the first command, I can see that Liferea version 1.6.2-1ubuntu6 is installed. From the second command, I can see that that version is listed in /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid_main_binary-i386_Packages.
Without too much effort, I can deduce that the source line contains archive.ubuntu.com, ubuntu, lucid, and main.
And, sure enough, my /etc/apt/sources.list contains the following line.
deb http://archive.ubuntu.com/ubuntu lucid main universe restricted multiverse

Comment: `apt-cache policy ` (from: http://superuser.com/a/236605/37279)
Comment: This tells you where the package will be installed/upgraded from, should you attempt to do so. It won't tell you where the currently installed version came from. It can be different, e.g. after adding/removing a PPA.
Comment: mac, thanks for your detailed answer! Unfortunately it doesn't help me with my initial issue of an unmet dependency problem :-( I'm trying to install libqt4-opengl and it says:
The following packages have unmet dependencies:
  libqt4-opengl: Depends: libqtcore4 (= 4:4.6.2-0ubuntu5.1) but 4:4.7.0~beta1+git20100522-0ubuntu1~lucid1~ppa1+appmenu20100624 is to be installed
                 Depends: libqtgui4 (= 4:4.6.2-0ubuntu5.1) but 4:4.7.0~beta1+git20100522-0ubuntu1~lucid1~ppa1+appmenu20100624 is to be installed
Comment: It's difficult to see from that just what the problem is. You should open a new question so you can provide full details. If you do, leave a link in a comment.  :-)
Comment: The latter. If I generally use Ubuntu `trusty` package sources, then temporarily add `utopic` to my `sources.list` in order to install version 1.20ubuntu3 of `init-system-helpers` and then remove the repo again from my `sources.list`, `apt-cache showpkg init-system-helpers` will just lie about the original package list and `apt-cache policy init-system-helpers` will just state the obvious.
Comment: Do apt-cache {showpkg,policy} actually show where an installed package *was installed from*, or just where it *would be installed from* at the time it is queried?
Comment: This needs a proper GUI. Memorizing these commands and spending all this time reading output is ridiculous. I can't memorize all this crap. Scriptable text interfaces are great but that is not where things should stop.
Comment: @Ryan this isn't exactly a super common use case for non-technical users. Check out `apt policy ` for more readable output. Pretty memorable command as well.
Answer: apt on Ubuntu 16.04+
Beside apt-cache policy, showpkg and show, now we have a more simple, with easy to remember subcommands: apt[1] [2] (don't get confused with classic apt-*):
apt policy <package>

Or the alternative with more info apt show <package>, line starting with "APT-Sources:".
Description: This package provides command line tools for searching and managing as well as querying information about packages as low-level access to all features of the libapt-pkg library. This includes:apt-get, apt-cache, apt-cdrom, apt-config, apt-key.
Warning: apt does not have a stable CLI interface. Use with caution in scripts.
Basic commands from apt --help
Other also easy to remember subcommands:

apt list – list packages based on package names

apt search – search in package descriptions

apt show – show package details

apt update – update list of available packages

apt install – install packages

apt remove – remove packages

apt purge – remove packages and configuration files:

Removing a package removes all packaged data, but leaves usually small (modified) user configuration files behind, in case the remove was an accident. Just issuing an installation request for the accidentally removed package will restore its function as before in that case. On the other hand you can get rid of these leftovers by calling purge even on already removed packages. Note that this does not affect any data or configuration stored in your home directory.

To remove residual packages:
sudo apt purge $(dpkg -l | grep "^rc" | awk '{print $2}')

apt upgrade – upgrade the system by installing/upgrading packages

apt full-upgrade – upgrade the system by removing/installing/upgrading packages

apt edit-sources – edit the source information file
Comment: @ReinierPost That's just a warning not an error and this isn't a script.
Comment: `apt policy xxx` appears identical to `apt-cache policy xxx`, maybe this should've been a comment instead. Or at least mention that `apt show` seems to need the `-a` switch to see "additional records" from other sources
Comment: `WARNING: apt does not have a stable CLI interface. Use with caution in scripts.`
Comment: @ReinierPost The comment or an edit suggestion is better than a downvote
Answer: Sadly, this information is not recorded during package installation. You can make a decent guess if the repository is still in the source list and the repository still has the package:
grep -l PKG /var/lib/apt/lists/*

Even synaptic cannot tell if you disable the repository and update.
Answer: sudo grep *packagename* /var/lib/apt/lists/* | grep "Filename:"

source
Answer: Another useful command is "apt-cache policy". It will show something like this:
$ apt-cache policy
Package files:
 # The default https://wiki.debian.org/DebianStable repository with a priority of 500
 500 https://deb.debian.org/debian stable/main amd64 Packages
     o=Debian,n=stable,l=Debian,c=main,b=amd64
     origin deb.debian.org

 # The repository for Debian https://wiki.debian.org/PointReleases (security and grave bug fixes ~every 2 months)
 500 https://deb.debian.org/debian stable-updates/main amd64 Packages
     release o=Debian,a=oldstable-updates,n=stable-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org

Ref: https://wiki.debian.org/AptConfiguration
Answer: When upgrading from one ubuntu version to the next one, I like to use the opportunity to do some spring cleaning.
This is a combination of the above answers.
To generate a filterable list from which repositories a package was installed we can use apt policy and remove the newlines:
dpkg -l | grep "ii" | awk '{print $2}' | xargs -n 1 -IX sh -c "apt policy X 2>/dev/null | tr '\n' ' '" | tee all_packages.txt

Then we can inspect the all_packages.txt file and filter for packages which are not from the ubuntu repositories.
cat all_packages.txt | grep -v "ubuntu.com"

We can now inspect this list and decide which ones to remove and which ones to keep.
To only get the package names we can use:
cat all_packages.txt | grep -v "ubuntu.com" | sed 's/:.*//g'

Answer: #!/usr/bin/env bash

# List of packages to check
packages=(
    package_name package_name package_name
    package_name package_name package_name
)

# File to store the list of unavailable packages
unavailable_packages_file="unavailable_packages.txt"

# Clear or create the file
> "$unavailable_packages_file"

clear
printf "%s\n\n" 'Testing the packages please be patient...'
# Check each package with apt-cache
for pkg in "${packages[@]}"
do
    if ! apt-cache show "$pkg" > /dev/null 2>&1; then
        echo "$pkg" | tee -a "$unavailable_packages_file"
    fi
done

clear

# Check if the file has content and display the result
if [ -s "$unavailable_packages_file" ]; then
    printf "%s\n\n" "The following packages are not available in the APT repositories:"
    cat "$unavailable_packages_file"
    printf "\n%s\n\n" "A list of the missing packages has been saved in the current directory."
else
    printf "%s\n\n" "All packages are available in the APT repositories."
fi


Why can an elf never become overweight?

Question: Elves and human share many similarities, from body type to the ability to perform magic. However, elves retain a slim, lean build throughout their life, and are incapable of becoming obese. The biggest they could get would be that of a swimmer's body, toned and lightly muscled. This is true regardless of how much they consume. My original hypothesis for this was "because magic", but humans are able to match them in this regard. What biological reason would there be for elves not being able to become fat?
Comment: I don't think this deserves to be a full answer, but a high metabolism would be the simplest explanation. Some people, myself included, metabolize everything they consume and never gain weight.  I know, because I have tried and I get tired of eating before I gain any weight.  The only issue with settling for simply "high metabolism" is genetic variation, but perhaps you could begin with some basic differences in metabolism between humans and elves and go from there.
Comment: Most creatures in the world never become fat.  Only a tiny fraction of humans ever succeed, plus a tiny fraction of the other species.  When you say "incapable of becoming obese," how determined of an effort do you want their body to styme?  If they decided to eat several dozen doughnuts every day, and lie in bed all day without working, do they still need to remain thin?  Or are you trying for the "I've never seen a fat elf" sort of thinking where any *reasonable* environment will result in 0 obesity?
Comment: Because they're stuck in a forest eating roots and leaves?
Comment: In the Monster Hunter series, the Queen of the Elves (and other members of the race) are morbidly obese.  This question should not assume all elves in all fantasy series are the same.  Unless the question really was, "elves in my setting aren't fat; how do I justify it?" in which case it might need a rewording.
Comment: Well, they might have an EXTREMELY big metabolism, and so they just never get obese. It's a possibility. Oh, I didn't realize the comment two before mine said that...
Comment: in what technological level? humans have a hard time becoming fat prior to the industrial revolution.
Comment: @John Still many of them did ...
Answer: From a genetic heritage standpoint, the Elves evolved in Underhill, which is an ideal garden-like environment, free from both harsh winters and famine-inducing dry months.
As a result, their bodies never developed the ability to store calories for times when food was scarce.  Food was always abundant, so fat elves had no survival advantage over thin elves.
and in the end, Shakespeare was right...
Let me have men about me that are fat,
 Sleek-headed men and such as sleep a-nights.
 Yon Cassius has a lean and hungry look,
 He thinks too much; such men are dangerous.
Comment: Why don't all elves have that genetic?
Comment: I would say that they do all have that gene.  After all, I've never seen a fat elf.  Have you?
Answer: The long eared folk have a metabolism just like that of humans. They don't usually get obese not because of faster metabolism, but because of a combination of factors:

They have less adipose tissue. Meaning that they don't store fat as efficiently as we do.
Their bowels naturally produce tetrahydrolipstatin. Trust me,.you don't want to see a chamber pot that has been used by an ellf.
On top of that, they willingly and ritually eat tapeworm infested food. They insist that as part of nature, those tapeworms are symbiotes and not parasites.

And that's how they stay slim without making any exercise.
Answer: Hyperthyroidism
It is a pathological condition caused by over-activity of the thyroid gland. The symptoms include Weight loss, sometimes significant, may occur despite a good appetite.
There is a number of known causes for this condition in humans, several of which are genetic. However, simple inflammation due, perhaps, to the habitat is also a possible cause, suggesting that elves may gain weight if they abandon their forests rich in thyroid-irritating spores.
Comment: For a moment I thought I found an interesting publication linking between Stahl's ear syndrome and thyroid disfunction...
Comment: This will certainly not prevent being overweight under any circumstances
Comment: @Raditz_35  could you clarify?
Comment: Well, for starters, you can't have an entire species have their thyroid hormones at the wrong level.  And let's say they survive this for some reason, it would mean that they need slightly more calories. This would only "help" in a very small range
Comment: @Raditz_35 That sounds quite dogmatic. First, Re "wrong level". What may be wrong for a species, may be quite right for another. For instance, the concentration of urea in shark blood may be the "wrong" concentration for other fish, but it is correct for sharks.  Second, Re "if they survive". Hyperthyroidism is not necessarily lethal in humans, and even less so in elves, for whom it is a natural condition. Third, Re "Help in a small range". Nothing forbids a feedback mechanism to regulate thyroidal activity with the amount of food intake. This is quite common in many biological systems.
Comment: You didn't state anything in your comment that I believe is wrong, maybe not always really related, anyhow - but I still think this wouldn't work without changing a lot more to the organism. Please note my last comment: This might increase calory needs, but not by very much.
Answer: I don't think its a matter of biology and more just lifestyle and oversight by the creators. After all, how many fat people do you find in fantasy stories with elves outside of corrupt despots? It just doesn't happen.
Elves also tend to live a very healthy lifestyle. Being physically active and eating lots of organic healthy foods(cause thats whats readily available to them). Many writers make their elves vegetarian even although its still possible to get fat with that diet.
Answer: The human body stores fat becuase it burns carbohydrates first. If their diets have low carbs then their bodies burn fat first and they dont store it. So its just their meat and veggie diet.
Or maybe theres an internal mechanism in elves bodies where they burn fat first instead of carbs.
High metabolism helps too.
Comment: Technically, the body converts surplus carbohydrates to fat.  Most fat consumed is ... ahem ... excreted. Atkins diet works because in the absence of carbs the body draws on its fat stores, converting the fat to the carbs needed to supply energy.
Comment: This is just wrong
Comment: @Raditz_35, how so? Im basically describing a low, or no, carb diet. I´ve been on the Atkins Diet myself and know it works. I dont reccomend it cuz it sucks, but it works. And the basic principle is that if your body does not have carbs to burn it will instead burn fat.
Comment: @pojo-guy, OK, so maybe I got some of the details wrong, but couldn't that diet over the course of a lifetime account for why a person, or elf, is slim? I don't see why not.
Comment: @Len I admit my CDO is showing here (like OCD, but alphabetical, the way it SHOULD be). OP implied that elves are physiologically almost identical to humans. If a person tries to invoke science but gets basic high school biology wrong, they lose suspension of disbelief necessary to engage the audience of their world.
Answer: I'm not sure why an elf couldn't become obese. It depends entirely on what kind of elves and what universe you're setting it in - some worlds might give more detailed answers or reasons, but I'm assuming since it's in the Worldbuilding StackExchange that you have some control over how things work.
In that case, make elves fat if you want it. Alternatively, the spirit of the planet changes the individual's appetite when it begins to consume more calories than necessary to the point that they aren't interested in eating. Without knowing the rules in your specific story, it's hard to give any sort of satisfactory answer (especially since you'd need to wonder how many of the readers would really think twice about it).
Answer: Elves have a smart digestive system that only absorbs calories when they're needed.  If they eat more than they need, the excess is simply passed through, undigested.
Note that this really isn't so far-fetched.  Many animals do much the same, passing through a good part of the food they consume because they lack the means to digest it.  But that material still contains plenty of calories, and other creatures - dung beetles are the archetypical example - make a good living off it.
Answer: I'd go back to magic as the solution. People seem to think of fat as a bad thing but it really is not. It is just a way to store excess energy so you do not starve later, which is a very god thing. A secondary function is to work as thermal insulator. It also helps absorb damage without serious injury but other than gladiators that is probably incidental and can be ignored.
So you need to provide the elves with some other form of storing energy and insulating themselves. It also needs to be significantly more efficient than fat to have replaced fat entirely despite elves being rather similar to humans. You could say that you need something magically good. Best way to provide magical solutions is to use literal magic.
The elves can store excess energy as mana in their personal magical field. When short of food or when needing energy rapidly for combat or magic they draw from that field. They probably have ability to interact with ambient mana as well. They can eat ridiculous amounts and it will just make local mana richer. They can go without eating for a long time but that risks depleting local mana. This is more convenient and flexible than fat, so it would probably replace fat based storage fairly fast, if available. In fantasy it would probably be a gift from the gods creating the elves, though.
Such innate magic field could reasonably protect elves from cold and heat. So they would not need fat for insulation either. It would probably also give protection from hostile magic and maybe even physical damage. Elves would also have superior ability to sense the surrounding magic. It might boost kinaesthetic sense as well.
This all fits common fantasy elves fairly well.
Answer: The simple answer is that in Tolkien's mythology (which seems to be really what you are talking about, at least in the sense that JRRT was the updater of the Old Tales for the modern age, and gave them a sort of list of canonical ideas, such as "there are elves, and they tend to be thin") there are several races of "little people." Elves, dwarves, hobbits, and orcs. They are interfertile, and interfertile with humans. In fact, orcs were said to have been produced by miscegenation, i.e. breeding with other races. In Tolkien's own works, there are three races of hobbits, who share characteristics of men, elves, and dwarves. They appeared in the Wild, in an area between two large orc-settlements, somewhere between prehistory and the distant past.
The obvious conclusion for me is that hobbits are orcs. To be specific, they are not pure orcs (double twist), but orc-slaves bred from captured members of other races, and at some point a large group of them escaped. That is the logical situation in Tolkien's paradigm. In the traditional (fairy-tale) paradigm, a more logical conclusion is that the little people (including kobolds, brownies, goblins, leprechauns, etc.) are all variations on the same race. Tolkien introduced his own ideas about higher and lesser races, and he imagined that there would be a corrupt race of orcs bred from a pure race of elves. Thus he made them tall and thin. Peter Jackson had to cast them from a pool of New Zealanders who would have made good clothing models. That idea is handy for creating heroes and villains in an adventure story. But in real life, things go in a much more circular fashion, and we all have pretty much the same DNA.
Though Tolkien himself was careful to separate elves from magic, especially in the LOTR stories. Only wizards (Istari) did actual magic. Sauron was of the same race as the wizards, and he made the magic rings that non-magical creatures later used. I think he was trying to make a helpful distinction, because in our world, only spirit beings do or claim to do magic. If an elf has powers, it's not an elf.

Why can an elf never become overweight?


How can one invoke a keyboard shortcut from within an AppleScript?

Question: I need to invoke a keyboard shortcut from within an AppleScript code, later to be used as a startup item (i.e. the alternative to having to press something at every log in).
Answer: For example, you can do :
tell application "System Events"
    keystroke "c" using command down
    keystroke "v" using {option down, command down}
end tell

To press : cmd+C and then cmd+alt+V
Answer: I get the impression that what you're trying to do is a copy command (i.e., ⌘C)—am I right?
Here's an example from one of my scripts:
tell application "System Events"
    tell application "Microsoft Entourage" to activate
    tell menu "Edit" of menu bar item "Edit" of menu bar 1 of process "Microsoft Entourage"
        click menu item "Select All"
        click menu item "Copy"
    end tell
    key code 123
end tell

That is, I script the menu command instead of scripting shortcuts.
You might also take a look and see if you have /Library/Scripts/UI Element Scripts/Key Down-Up.applescript, which should give you alternate ideas of how to emulate keyboard actions.
And of course, there are a lot of examples in /Library/Scripts/ and ~/Library/Scripts/, many of which are worth a look in general.


File Processing with Akka?

Question: This is rather a design problem. I don't know how to achieve this in Akka
User Story
 -  I need to parse big files (> 10 million lines) which look like
2013-05-09 11:09:01 Local4.Debug    220.127.116.11    %MMT-7-715036: Group = 188.8.131.52, IP = 126.96.36.199, Sending keep-alive of type DPD R-U-THERE (seq number 0x7db7a2f3)
2013-05-09 11:09:01 Local4.Debug    188.8.131.52    %MMT-7-715046: Group = 18.104.22.168, IP = 18.104.22.168, constructing blank hash payload
2013-05-09 11:09:01 Local4.Debug    22.214.171.124    %MMT-7-715046: Group = 220.127.116.11, IP = 22.214.171.124, constructing qm hash payload
2013-05-09 11:09:01 Local4.Debug    188.8.131.52    %ASA-7-713236: IP = 188.8.131.52, IKE_DECODE SENDING Message (msgid=61216d3e) with payloads : HDR + HASH (8) + NOTIFY (11) + NONE (0) total length : 84
2013-05-09 11:09:01 Local4.Debug    172.22.10.111   %MMT-7-713236: IP = 188.8.131.52, IKE_DECODE RECEIVED Message (msgid=867466fe) with payloads : HDR + HASH (8) + NOTIFY (11) + NONE (0) total length : 84

For each line I need to generate some Event that will be sent to server.

Question
- How can I read this log file efficiently in Akka model? I read that reading a file synchronously is better because of less magnetic tape movement.
- In that case, there could be FileReaderActor per file, that would read each line and send them for processing to lets say EventProcessorRouter and Router may have many actors working on line (from file) and creating Event.  There would be 1 Event per line
- I was also thinking of sending Events in batch to avoid too much data transfer in network. In such cases, where shall I keep accumulating these Events? and How would I know if I all Events are generated from inputFile?
Thanks
Comment: hi did you manage to do this. Can you shares some cues or code
Answer: I think I know what your asking, your basically saying that if you read and proccess a file in the mannor you are describing you risk having a massive amount of messages if the proccessing takes significantly longer than the reading. Also if you are messaging over the network ideally you would want to minimize the amount of messages to send. If your lines don't take long to process then I wouldn't send them to be processed over the network.
Have you considered using futures instead?
Don't know if you case is as simple as Parallel File Processing: What are recommended ways? in that case you should use streams. But I think the thing is with actors although they are good for throttling their main purpose is to wrap up state, and you don't have that so much with proccessing a file. Maybe you would be better off with futures, I show an example of that here Executing Dependent tasks in parallel in Java. But you could use actors like you say and have the processing actors communicate with the reader actor and tell it to stop reading for lets say a second as soon as the number of messages waiting to be processed exceeds 1000000 or however many you decide.

File Processing with Akka?


Latency difference between texture copy on GPU vs CPU?

Question: Does anyone happen to know the latency difference between copying a texture on cpu (using, say, memcpy) compared to gpu (using, say, CopyResource)? I would do a perf test myself, but I'm not actually sure how to do the trace for the CopyResource. A rule of thumb would be fine, it doesn't have to be exact, I just figure that the GPU is faster than the cpu for this but am just curious how expensive a copy of, say, a 1920x1080 texture is.
Comment: do you mean copy from RAM to RAM vs. copy from VRAM to VRAM?
Answer: You are talking apples and oranges here. Copying memory to memory on the CPU is using completely different hardware then memory to memory copies on the GPU, even in a unified memory architecture GPU's tend to have specialized memory.
The actual difference is going to depend heavily on the model of the GPU, a high end gddr5 gpu will easily beat DDR4 dual channel memory on the CPU.
Also, the driver implementation is going to have an effect on the gpu copy since you are really asking the driver for the copy on the gpu, which it then translates into code that does the actual copy.
The size of the chunk of memory also plays a major role in how fast the copy happens, as well as how large the cache on the cpu vs gpu is.
You should generally expect copies that are GPU to GPU to be much faster then CPU to CPU copies. CPU to GPU along with GPU to CPU copies have to cross the AGP bus on the PC while unified architecture systems have an advantage they still have synchronization issues and all systems have to synchronize access and flush cache's.
What are the actual differences?(very roughly) DDR4 runs from 1600 to 3200 MB per second and DDR5 run's at roughly 3200 to 6400 MB per second. So very roughly, a poorly balanced system will have up to 4x performance diffence, but you should expect about a 2x performance differnce with the GPU being faster. This difference fades somewhat(mostly) with unified systems. (But the gpu will probably still have memory set aside so it can work with framebuffers and what not in an efficient manner)
Answer: You can use Query for mesuring time on GPU. Idea is follow:
Create buffer with two int64 values. Write time stamp before and after CopyResource() on GPU to this buffer. Then retrive values on CPU and substract them. Substraction is time on GPU.
Answer: For anyone wondering how to deal with it, please refer to mjp (Matt Pettineo) github - https://github.com/TheRealMJP/DXRPathTracer/blob/master/SampleFramework12/v1.02/Graphics/Profiler.cpp
MJP's code is DX12. For DX11, you can refer to my github - https://github.com/komilll/dxFramework/blob/master/dxFramework/Profiler.cpp
In both DX11 and DX12, you basically just creates timestamps at the beginning and at the end of some portion of code. Then you have to resolve it, based on GPU speed. GPU might work with different clock frequency based on current workload. When you have a full PBR engine with shadow or SSAO, you should already have no problem with changing clock. However, if you're just starting creating your engine/framework, keep in mind that time to execute might not be precise, because you're not using full GPU power.
In DX12 there is ID3D12Device::SetStablePowerState but I've seen multiple times that people are recommending not to use it. Maybe there are some use cases, but for typical hobby usage, I won't bother with that.


Is external code review re-distribution of software

Question: I have heavily modified GPLv3 software running on my system. If hire someone external for code-reviewed, will this be automatically a re-distribution of software? Hence I would need to provide the external code-reviewer the software under GPLv3 or are there any contracts which would avoid this. What if make this guy an employee (for a month)?
Comment: ...so sorta like the opposite point of view on http://opensource.stackexchange.com/questions/4648/can-i-use-my-clients-gpl-software
Answer:
Say that some folks wrote some app1 and released it under the GPL-3.0.
Say this app1 further embeds a GPL-3.0-licensed third-party library lib1.
Say that I further take the code of this app1 and lib1 and create a new enhanced app2.
Say that I contact or contract one of the folks that authored app1 and send them code of app2 for review.

What happens then?
There is a complex interplay between open source licensing and private contract terms.
This is such a complicated situation and this is unlikely to be resolved without proper legal advice.
There are surely GPL terms in play. In all cases, the terms of the GPL will surely apply to the app1 and lib1 code. In most cases the terms of the GPL would likely apply to the app2 code and I have to meet these obligations especially if I already redistributed app2 on some app store.
On the specific topic of whether sending code for review constitutes redistribution under the GPL 3.0 this article (page 118 Does Outsourcing Trigger Copyleft?) provides some detailed commentary:

It is unclear whether outsourcing triggers copyleft, although the answer is  likely  no.

In particular in section 2 of the GPL:

You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

In contrast the GPL FAQ talks about contractors differently:

In particular, providing copies to contractors for use off-site is distribution.

So it boils down to interpreting use vs. convey and whether I have whole control over the copyrights of app2 which I have not and the nature of the contractual relationship between me and the app1 folk which is private.
I surely need to get legal advice but the GPL likely applies in may ways.
Answer: If we believe this answer from the GNU FAQ:

Is making and using multiple copies within one organization or company "distribution"? (#InternalDistribution)
No, in that case the organization is just making the copies for itself. As a consequence, a company or other organization can develop a modified version and install that version through its own facilities, without giving the staff permission to release that modified version to outsiders.
However, when the organization transfers copies to other organizations or individuals, that is distribution. In particular, providing copies to contractors for use off-site is distribution.

Then yes, giving a copy to a contractor is considered distribution but if you hire the person to make them a short-period employee, then it is not distribution anymore.
I don't know if a court would follow this logic though. It could be considered that in some specific cases, hiring a contractor is equivalent to employing them. You could check what your lawyers think about that or, to be on the safe-side, you could just employ the person.


Enableing unknown sources installation from 2nd user on android 6.0

Question: I have a regular, Un changed Samsung Tab A running the unchanged version of marshmallow OS  (6.0). I have enabled installation from unknown sources in the "owner" user of the device, but still can't enable it in the second user (guest). I would like to install a .apk file which I have already tested in the owner user. In settings the "allow installation from unknown sources" is greyed out so I can't change it. Is there any way that I can install the APP?
Comment: I think you need to set a pattern or password for the second user then you will be able to enable unknown sources installation.
Answer: Enable USB debugging as the first user(owner) and run,
<code>adb install -r filename.apk
</code>
This will install the app for all users.
Hope it helps


Why is The Power of Fables, in Book VIII of Fables by La Fontaine, addressed to Paul Barillon, the French ambassador to England?

Question: The Power of Fables (Le pouvoir des Fables), fable 4 of Book VIII of Fables written by La Fontaine, is addressed to Paul Barillon, the French ambassador to England under Louis XIV. I know that La Fontaine was a critic of French society to say the least, why address his thoughts on the literary importance of the fable to him in particular, or more importantly, to the position?
Answer: The OP writes that "La Fontaine was a critic of French society to say the least". Sweetser describes him as "a loyal but lucid subject of a king eager to concentrate the power and the glory in his own person" (page 135).
Sweetser goes on to say that

The individual men and women praised by free spirits like Théophile and La Fontaine were patrons with whom they felt a personal bond, (...). Always aware of the taste of his public, the poet managed to renew a genre often very circumscribed by its conventions by seeking subtle correspondence between his topic and the traits and qualities of his dedicatees. Thus, when he dedicated "Le Pouvoir des Fables" to his friend, Paul de Barillon, French ambassador to the court of Charles II of England, he links the power of the fables that can influence people through the spell they cast on their listeners to the power of persuasion that a skillful envoy can exert on a sovereign whose friendship and support are necessary to the French king in order to ensure peace. He avoids an emphatic and pompous encomium, invoking M. de Barillon's modesty, characteristic of the perfect gentleman, to stress what is vital in his view for the good of France and its people: war should be avoided at all costs, peace should be saved through diplomacy.

Regnier does not say why La Fontaine dedicated "Le Pouvoir des Fable" to Barillon but notes that the ambassador did not foresee the Glorious Revolution of 1688 even though the count d'Avaux, ambassador in Holland, had predicted it every day.  However, "Le Pouvoir des Fable" was published in 1678, ten years before the Glorious Revolution, so Barillon's lack of political foresight does not appear to be relevant here.
Regnier identifies several connections between the dedication and the fables, i.e.

between line 11 ("Toute l'Europe sur les bras") and Fable XIV in Book VII, "L'ingratitude & l'injustice des hommes envers la Fortune" (Fable XIII on Wikisource but Fable XIV in Wright's translation and in Regnier's edition);
between line 11 ("Toute l'Europe sur les bras") and the epilogue Fable XVIII in book VII, "Un animal dans la lune" (Fable XVII on Wikisource but Fable XVIII in Elizur Wright's translation) and in Regnier's edition);
between lines 31-32 ("Sur les éloges que l'envie / Doit avouer qui vous sont dus") and lines Fable II in Book VII, "Le mal marié" (Fable II on Wikisource and in Wright's translation); this is merely a grammatical similarity, however.

Louis XIV needed an ambassador at the court of Charles II. Charles Athanase Walckenaer notes in Histoire de la vie et des ouvrages de J. De La Fontaine. Tome Premier,

Pour ces négociations délicates, Louis XIV choisit Barillon, homme d'un esprit vis, aimable, ami intime de madama de Sévigné, de madame de Grignan, sa fille, de madame de Coulanges, et de toute la société que la Fontaine fréquentait le plus habituellement, et où il se plaisait davantage.

Jean-Marc Bassetti notes in a footnote on his website that regularly visited the salons in Paris, including Mme de la Sablière's, where La Fontaine met him.
(There are plenty of sources that mention in a footnote that La Fontaine dedicated "Le Pouvoir des Fables" to Barillon without mentioning why; see for example in the letters of Madame de Sévigné, the letters of Madame de Maintenon and the Memoirs of de La Rochefoucauld.)

References:

Oeuvres de Jean de la Fontaine. Volume 2. Edited by Henri Regnier. Hachette, 1884.
Sweetser, Marie-Odile: "The Art of Praise from Malherbe to La Fontaine". In: Birberick, Anne Lynn; Ganim, Russell (editors): The Shape of Change: Essays in Early Modern Literature and La Fontaine in Honor of David Lee Rubin. Rodopi, 2002.
Walckenaer; Charles Athanase: Histoire de la vie et des ouvrages de J. De La Fontaine. Tome Premier. Librairie de Firmin Didot Freres, Fils et Cie, 1858.


1955 Chrysler No Crank No start

Question: Hello everyone I have a 1955 Chrysler Windsor which does not run, the lights and horn work but when I crank the key the starter does NOT turn over but the lights do dim. I've replaced all the fuses cleaned the battery terminals etc... I've connected the starter cable to the battery and it did turn over so the starter should be fine. Any ideas of why it doesn't start?
Comment: Welcome to Motor Vehicle Maintenance & Repair! Can you turn the engine over by hand?
Comment: Yes it is Not Seized
Answer: The starter solenoid should engage/push the starter gear into the flywheel , apparently it is not working. When you remove the solenoid , also cleanup/sand the large copper washer that makes contact between the battery cable and starter motor; it will be in rough condition at this age. For what it is worth ; the only ignition coil that ever failed for me was on a 1959 Chrysler . They were pretty cheap , I carried a spare after that - it is  still in the garage.
Comment: Yah, I misread it the first time ... it's most likely the solenoid.

1955 Chrysler No Crank No start


Should I down-vote an answer that works but promotes bad practices?

Question: Should an answer be down-voted even if it works but it promotes bad practices? Bad practices means it should never be done.
Comment: @ColeJohnson - over in _"this answer"_ it's good that you soon gave a link to a great explainer why that was bad practice.  @ pllee - along that line, agreeing with the two immediate answers below - I'd say down voting due for reasons of 'malpractice' :) should be a learning moment for both the bad answerer and those who follow.  For instance, even here, by reading the post Cole Johnson linked to, I learned something about REGEX that I didn't know despite decades of using it.  We learn by mistakes - the more mistakes people show us, the better we get at the trade, yes ?
Comment: If you downvote an answer because you perceive some deficiency in that answer, then I'd say yes it's a legitimate reason for downvoting.
Comment: \*looks at [this answer](http://stackoverflow.com/a/18360587/1350209) that encourages HTML parsing with regex\* I downvoted and people asked why. I said it was because regex should _never_ be used with HTML. I even linked to Zalgo, yet the people there still think it's good practice.
Comment: Does this mean it is legitimate to downvote every answer that uses `mysql_*` functions?
Comment: Who should decide something should never be done?
Comment: Is it legitimate to downvote every answer that uses DOM parser because I think it is better to use SAX parser?
Answer: This is one of those rare occasions where, if you do downvote, it's probably worthwhile to take a moment and explain in a comment why you are downvoting.  Otherwise, your downvote will make no sense on an otherwise perfectly good solution to a problem.
Regardless, votes are yours to do with what you wish, so long as you don't use them for abusive practices like serial or sock voting.  In general, a good rule of thumb to follow is this: use your vote to express your opinion of an answer's usefulness.
Comment: Explaining the downvotes is always good. I hate unexplained downvotes.
Answer: YES!
Downvotes are for wrong answers. If the answer you speak of might work correctly, but should never be used, it is wrong, and should be downvoted. (-3 dims a post so people are less inclined to take notice of it.)
Do leave a comment to explain the problem, though.
Answer:
Should I down-vote an answer that works but promotes bad practices?

Yes, definitely.
"It works" is not enough. (Often, it only appears to be working; something I often encounter when reviewing C or C++ answers is printf("%d", sizeof(TYPE)), which is undefined behavior, but sometimes it seems to work correctly.) An answer should not mislead people. If something "works" in some cases, but due to bad practices in it it won't work in a more general case, it deserves a downvote for sure.
But: the downvote is not for punishment. It would be good to comment as to why you downvoted, i. e. what is wrong with the answer. The ultimate goal is to have the author of the answer fix his code so that it no longer suggests the use of bad practice. If the answer is fixed, remove your downvote.
Comment: Personally, I think it would be better just to edit the answer to fix the problem. You want `printf("%zu", sizeof(TYPE));` That's way more effective than just downvoting because it actually makes the *correct* answer available to everyone and prevents perpetuating misinformation. Sure, you could hide the correct solution in a comment, but there's no guarantee people will see it. The only possible benefit in a comment is to educate the person who posted the answer. But since people are notified of edits made to their posts, they can still be educated. It also saves bellyaching about downvotes.
Comment: That goes for *small* problems like the one you mention, of course. I'm all for downvoting answers that are massively or irreparably wrong.
Comment: @CodyGray Definitely right - we are not even permitted to make edits that radically change contents.
Comment: Permitted by whom? That's a case-by-case judgment. I've made many such edits that I think were worthwhile. The goal of collaborative editing is to improve the contents of questions and answers. The reason we have a canned "too radical" rejection reason for suggested edits is so that we can reject edits that change the meaning of posts in an inappropriate way. Adding additional information, links, examples, etc., or fixing mistakes in code samples is all fine. There is no restriction on users with edit privileges doing this.
Comment: @CodyGray Recently I've edited an answer that was wrong. It said that "doing XY thing does Z" (or was it "XY thing is right"?) but it was very obviously wrong (it asserted the very opposite of the truth), so I've edited so it said the opposite and now it was correct. Then, the author of the answer rolled my edit back, and told me off arrogantly, stating that "feel free to downvote you f*cktard, but don't change my answer to the exact opposite" (or something like this).
Answer: It would be more helpful to provide a separate, correct answer.
Comment: Agreed, but those two activities aren't mutually exclusive, so this is a non-answer.
Comment: @Asad pllee didn't answer the question which he referenced in the OP, so I was giving him specific advice.
Comment: @ChrisW I referenced the other answer in my comment. I do agree that it is bad to not offer an explain on the better alternative.
Comment: @pllee You did reference the 'other' answer, but you didn't answer the question yourself, and neither did you up-vote the 'other other' accepted answer (which has received no votes in either direction). It's one thing to criticize (and I won't tell you not to) but it would be more constructive if you explained, somewhere, what the better alternative is.
Comment: I didn't answer the question outright I did say this: `Overriding the initComponent on the child instance isn't pretty but it is much better` .  To me that clearly states the better alternative.
Answer: There's a great risk of flame wars with such approach. Consider 2 groups of people, one thinks that A is bad practice and B is good practice, and the second thinks opposite.
In my opinion, it's better to upvote answer you think is better and reserve downvoting for the situations, when the answer doesn't asnwer the question or is not working.


What do quotation marks in a mid-name signify?

Question: Source
As clear from source,I wonder what's the need to use that in the mid name of Steven "Steve" Barry Smith.I have pretty much seen these on Wikipedia website.
Answer: Quotes in this way between a person's given and family names generally indicates a nickname (a name they are informally referred to)

John "JJ" Smith

Would be referred to as "JJ" in informal situations (as by close friends or family
The nickname also might be used for musicians, athletes, et alii.

James "Left-Hand" Robinson

might be the name of a baseball player known for his skill with his left hand and is thus referred to as "Left-Hand"
Answer: The quotes will signify a nickname. The person in your example has the legal name of Steven Barry Smith. "Steve" is a shortened, informal "nickname" for the name Steven.
In a formal setting, he would be addressed as Steven Barry Smith. In a more casual or friendly setting, people would call him Steve Smith.


Grouping Channel Fields

Question: Is there a way to group Channel fields when displaying it in the Content section in EE's CP? A way to visually group related fields might be a usability improvement when there are a lot of Channel fields. Possible in EE?
Answer: You can create custom tabs on the publish page and choose which fields they contain. Just click the 'show toolbar' link on the upper right hand side of the publish page and you'll see these controls:

Individual fields can be hidden by clicking on the little eye icons. Tabs can be created via the Add Tab link and populated by dragging and dropping field names from the field list to the main content area. You can also remove the default tabs if they're not relevant to the content you're working with (e.g. I often delete the Categories tab).
Once you've got everything arranged as you want it select the usergroups that should see this layout (different usergroups can have different layouts assigned) and hit 'Save Layout'.
Answer: Yes, using EE's native "custom publish layouts" (accessed by clicking the "show toolbar" link in the top right of a given channel's publish screen).  How well this works for you though depends on the degree of grouping you are looking for.
One option would be if you just want a bunch of related fields moved around to be in proximity to one another, you can use custom publish layout to "collect" them together in a single publish/edit screen.
If you need to segment them (like with a heading for each group or something) the closest you can get is adding tabs and moving the appropriate custom fields into each tab.
Answer: ...To edit the third paragraph of Jean St-Armand's answer above for anyone else who comes along and finds this question, you could try using Red Carrot Notes both with or without EE native tabs to build on the native functionality. It's not full of features, but the one that it has works well, allowing you to color-code headings as well as position them amongst any other fields in the control panel.

Grouping Channel Fields


Milk alternative in pancake batter

Question: What could I use in place of milk in pancake batter?  Would rice milk or soya milk work?  What about in scotch pancakes?
Answer: Soy milk works great in pancakes. My basic recipe for pancakes is about a cup of flour, about a cup of soy milk, a tablespoon or two of sugar and veg oil, and a few teaspoons of baking powder. Works great, makes nice, fluffy pancakes. (I know, not a "recipe" so much as list of ingredients with approximate proportions, but that's how I tend to cook, experimenting and learning from experience as I go...)
Edit: I don't know about scotch pancakes; I've never made them, but upon looking up a couple recipes, I don't see why it wouldn't... Soy milk behaves much like milk in these kinds of recipes, the only difference being that soya adds a bit of binding that dairy milk doesn't (and perhaps a smidge of a taste difference?)
Edit2: Haha, ok, so my "pancakes" are much more like your "scotch pancakes" -- there is such a wide spectrum of "pancakes", from crepe-y types to big, fluffy types... So then, yes, I'd say soya'd certainly work fine for scotch pancakes; for your "pancakes", I still suspect it'd be alright. With crepes mainly you just need liquid (hence the mixing with water in your posted recipe) -- the milk is mainly for some added flavour; I'd conjure that soya would work just fine.
Answer: I often use coconut milk or cream in my pancakes and it's delicious. Sometimes rice milk, but it does have a bit of a tendancy to stick. Ok if you're using teflon I suppose.
Answer: Just use water... it's that simple.
Comment: This only works if you are prepared to take large differences in taste and texture from traditional pancakes, and if you use a backing-powder-only recipe
Comment: This would work if making pancakes from a boxed mix, actually. But since the OP linked to a from-scratch pancake recipe, this _wouldn't_ work for their application.

Milk alternative in pancake batter


If this world is the only possible world, what does that mean for validity in logical arguments?

Question: Validity is usually defined in terms of possible worlds. More specifically, an argument with premise set S and conclusion C is said to be valid if and only if there is no possible world with all the members of S true but C false. But, what if this world, the actual world, is the only possible world, as I and many others believe? Then all sorts of arguments that are intuitively invalid would be valid. In fact, all arguments with a true conclusion would be valid, since there is no other world where the conclusion is false. So, does this mean that actualism implies that validity is "trivialized" in this way? And have any philosophy books or papers argued for this analysis?
Comment: Nothing. One can describe validity in terms of "possible worlds" (more commonly called models), but has to be very careful with selecting the class of "possible worlds" to match the standard notion. It makes no difference what they believe exists, validity is not tied to that. [Shapiro in Logical consequence: Models and modality](https://www.academia.edu/1576018/Logical_consequence_Models_and_modality) discusses what happens when the class of models is badly selected, it is related to Etchemendy's criticisms of Tarski's semantic validity.
Comment: There's also a whole competing school of thought that proposes a proof-theory-centric view of logical consequence (and its associated validity notions), which would seem to circumvent this "possible worlds" objection even if it could be made substantial.  See e.g. https://plato.stanford.edu/entries/logical-consequence/#ProoTheoAccoLogiCons
Comment: Your understanding of validity is incorrect from the philosophy point of view. What you are referring to is the Mathematical logic or Computer Science context of validity.  You can find logical arguments that are valid but actually false in this world. Validity doesn't guarantee truth in this world. For example, this is valid:  All snakes are cats. All dogs are snakes. Therefore all dogs are cats. If you understand logical form you will see this is an AAA syllogism in the first figure which must be valid. Soundness  means the premises must be true & the conclusion must be true plus being valid
Answer: Firstly, I would say that understanding validity in terms of possible worlds is only one way of doing so, and it wouldn't really be correct to say it is the usual way. There are about a dozen different ways of characterising validity: however that is a subject for another question. You are asking about how validity relates to 'actualism', which is the position that the way the world actually is, is the only possible way it could be.
The two don't conflict, or at least not in any simple way. It helps to focus on what we mean by 'possible'. To say of something that it is possible or impossible may be to say one of many different things. E.g., we might say that something is physically possible to mean that its existence or occurrence would not violate any known laws of nature. That something is epistemically possible means that its truth would not contradict anything we know. That something is legally possible (or permissible) means that it does not conflict with any laws or regulations. Some philosophers also make use of the concept of metaphysical possibility, which relates to theories of what is necessarily, as opposed to contingently, true. And we have logical possibility, which is perhaps the weakest kind, and says of something that it does not conflict with our understanding of logic, or more concretely, with some system of logic to which we subscribe. There are also other kinds of possibility.
To hold that the actual world is the only world that exists does not conflict with other kinds of possibility. It would not be inconsistent to form descriptions of worlds that are not actual, as we do in fiction, and to say of such worlds that what holds there does not conflict with logic. Such worlds would then be logically possible, but not actual. It would also not be inconsistent to say of the actual world that some proposition is epistemically possible, meaning that it might be true for all we know. Indeed, one of the typical uses of logic is to examine the space of what is epistemically possible in order to deduce what is actually true.
The upshot for validity is that we can still choose to think of validity as there being no possible world in which the premises of an argument hold and the conclusion does not, but we need to understand that the range of possible worlds extends to all logically possible worlds, and not merely those that exist. In fact, actualists often do refer to possible worlds, because they are a useful device for thinking about logic, but they understand them as sets of descriptions, or as sets of states of affairs, but without ontological commitment.
Comment: Great, interesting question which made sense to me and is even similar to some of my past ponderings. And great answer. That was a pleasure. Thanks all   @user107952


Might a diamond with impurities (doped) be less brittle than a pure diamond?

Question: Diamonds are extremely hard (resistant to pressure) but quite brittle (susceptible to shock). Sufficient impurity will compromise hardness, but I am finding it difficult to find out the effect on brittleness. Are synthetically-produced diamonds as hard as natural diamonds? is a related question.
Answer: Diamonds tend to be naturally brittle and adding impurities generally doesn't help since they usually significantly increase the internal stresses in the diamond lattice. There has been one group that has reported growing "Ultra-tough" single crystal diamond synthesized from a methane/hydrogen/nitrogen gas mixture using chemical vapor deposition (CVD) ("Ultra-tough CVD diamond", see last paragraph). However, I don't believe that this claim has yet been studied and confirmed by any other CVD diamond group.
For your information, there are many forms of "diamond". There is, for example, single-crystal diamond, nano-diamond (polycrystalline diamond with nanometer-sized diamond grains), and "amorphous diamond" (which is amorphous carbon that is "diamond-like" in that it has a high fraction of sp3 bonds and also has somewhat "diamond-like" hardness, compressibility, and strength).
You didn't mention why you were interested in the brittleness/toughness of diamond, but if your interest or application isn't limited to pure diamond but also includes the possibility of diamond-based composite materials, I should mention that my own research involves fabricating tiny electrical and magnetic sensors in single-crystal diamonds for high pressure experiments ("Designer Diamond Anvils", LLNL). This line of work could lead to the development of diamond/metal composites which have diamond-like physical properties but much higher toughness or impact strength than pure diamond crystals owing to the presence of a network of tiny metal wires inside the diamond crystal which would act to distribute impact stresses and hinder the propagation of cracks in the composite.
Comment: With a H2/CH4/N2 environment, I would expect either H entrainment in voids, N substituting for C in the lattice, or both. Either of these could possibly provide  scattering of shear waves w/o weakening the lattice much.


how install Batch Transform in v 2.76b?

Question: I've downloaded the zip folder from here, unziped but there are a lot of py files? which of them I have to select in order to install all its functionalities?. I've tried to pick one by one, but nothing new appears in the addons list of blender 3D view.
Comment: See if this Question helps: [Installing an addon](http://blender.stackexchange.com/q/1688/2217)
Comment: thanks. Now, I deleted the addon and I've followed the suggestion in the acepted answer http://blender.stackexchange.com/questions/19168 and effectively the addon (py filed plus dairin0d folder) are in the config/blender/2.76/scripts/addons  directory BUT it doesn't appear in the addon list in the testing category for 3D View yet , sh***
Answer: Ok, I just installed this particular addon to make certain of the correct process. The issue is the way the addon was packaged (blender's "install from file" is looking for the files to be in a set hierarchy and order). You can delete any files you have from previous attempts at installing the addon, as blender will never even look for them.
However getting the addon to run is not hard.

Manually unzip the download (which you already have), found on the wiki page or on the releases page, into a folder called exactly "space_view3d_transform_utils" without the quotes. (windows will by default unzip to a new folder with this name.)
Copy that new folder "space_view3d_transform_utils" into blender's addon directory. Here is the correct path to the user addon folder on windows and linux.
Windows:

%APPDATA%\Blender Foundation\Blender\2.76\scripts\addons

Linux:

$HOME/.config/blender/2.76/scripts/addons

Open up blender and go to the Addons tab of the User Preferences. Search for "batch" and enable the addon called "3D View: Batch Transforms (Transform Utils)."

This question elaborates on why some zipped addons do not install.

how install Batch Transform in v 2.76b?


Six-hundred-sixty-six or six-six-six or six-one-six

Question: Regarding the passage of Revelation 13:18, which is likely the most proper way to present the Beast's number?

600+60+6 (six hundred and sixty six)
6-6-6 (six six six)
600+10+6 (six hundred and sixteen)
6-1-6 (six one six)
Answer: The Greek spells out each word:

ἑξακόσιοι (six hundred) ἑξήκοντα (sixty) ἕξ (six).

At the time the NT was written, place holders were unknown. It was simply not possible to write ἕξ ἕξ ἕξ (or to use the single letters for six which would be three stigmas) and it be understood as six hundred sixty-six. To write out 666 using the letter equivalents would be chi xi stigma (χξϛ). Chi being used for six hundred, xi representing sixty, and stigma being 6 (stigma was used in antiquity only as a numeral). If you did write out ἕξ ἕξ ἕξ or ϛϛϛ, the reader would understand it as "18" because you add up the letters to make the total.
The translator's notes for Revelation 13:18 from the NET Bible concludes that 666 is to be preferred over 616:

A few mss (Ì115 C, along with a few mss known to Irenaeus {and two minuscule mss, 5 and 11, no longer extant}), read 616 here, and several other witnesses have other variations. Irenaeus' mention of mss that have 616 is balanced by his rejection of such witnesses in this case. As intriguing as the reading 616 is (since the conversion of Nero Caesar's name in Latin by way of gematria would come out to 616), it must remain suspect because such a reading seems motivated in that it conforms more neatly to Nero's gematria.
Answer: From the King James:

Here is wisdom. Let him that hath understanding count the number of
  the beast: for it is the number of a man; and his number is Six
  hundred threescore and six.

Six hundred is obvious..
Threescore - A "Score" is twenty, so that's sixty
And sis
So, the correct answer, according to that version, is your first:

600+60+6 (six hundred and sixty six)

Also agrees to by the New American Standard version:

Here is wisdom. Let him who has understanding calculate the number of
  the beast, for the number is that of a man; and his number is six
  hundred and sixty-six.

However in some earlier versions, it was translated as 616.

616 is believed by some to have been the original Number of the Beast
  in the Book of Revelation in the Christian Bible.1 Different early
  versions of the Book of Revelation gave different numbers, and 666 had
  been widely accepted as the original number. In 2005, however, a
  fragment of papyrus 115 was revealed, containing the earliest known
  version of that part of the Book of Revelation discussing the Number
  of the Beast. It gave the number as 616, suggesting that this may have
  been the original.2 Apparently the two different numbers reflect two
  different spellings of Emperor Nero/Neron's name, for which this
  number is believed to be a code.

So, either 666 or 616 could be the result of a copyist error.
If you're really interested in the opinion of someone who's taken the time to research this, I'd recommend this article from EscapeAllThings.com.
The conclusion leans strongly toward 666  as in "six hundred and sixty six".
Comment: Can you show some evidence that the KJV is an accurate translation of this verse?
Comment: @curiousdannii -  No, I cannot.  I did include a paragraph that discusses that the difference is not a matter of translation, but rather a discrepancy between the widely accepted manuscripts and a fragment of papyrus discovered in 2005.  It's not a translation issue, it's a "Which source manuscript is correct?" issue.  Which can't be answered definitively, but for which we can address what is widely accepted.
Comment: If it's a manuscript issue, why even mention the KJV or NASB? The Greeks used letters to write out their numbers, similar to the Romans. This isn't a case of merely swapping a 1 with a 6.
Comment: 666 vs 616 is a source issue, but six hundred and sixty six vs six six six is a translation issue.


How does a helicopter rudder work?

Question: So occasionally I will be flying my rc helicopter and I turn it left to right (rudder) but see nothing moving on the helicopter. On an aircraft there is a vertical stabilizer that has a moving rudder. So how does a helicopter work? The same thing occurs with my quadcopter.
Comment: See also [alternatives to tail rotors](http://aviation.stackexchange.com/q/8642/1696), [specifically the coaxial design](http://aviation.stackexchange.com/q/21188/1696), and [hover](http://aviation.stackexchange.com/q/19415/1696).
Answer: In helicopter, the yaw control is usually obtained by adjusting the pitch of the tail rotor, that changes the 'thrust' produced by the tail rotor; this rotates the helicopter about its yaw axis.

Source: cfidarren.com
In case of helicopters without a tail rotor, the yaw control is obtained in different ways. The NOTAR used a method similar to the tail rotor, by varying the thrust. In case of tandem rotors (like Chinook) , the yaw control is obtained by differential lateral cyclic.

Source: tech-mp.com
The quadcopters obtain yaw control by adjsuting the speed of the rotors. In quadcopter, two rotors (say 1 and 3) rotate in one direction, while the other two (2 and 4) move in the other. By slowing down 1 and 3 while speeding up 2 and 4, you can make the quadicopter yaw to the left. The torque of 2 and 4 spinning to the right makes the body spin to the left. Conversely, by slowing down 2 and 4 while speeding up 1 and 3, the quadcopter yaws to the right.

Source: safaribooksonline.com
In case of coaxial helicopters like the Kamon Ka-25, the yaw control is obtained by varying the torques (i.e. by varying the pitch) of both the main rotors simultaneously in opposite direction.

Source: simhq.com
Coaxial helicopters (like Kamov Ka-25) do have movable rudders like aircraft for use in forward flight as it reduces the main rotor adjustment required and is more effective.

Ka-25 rudder, image from travelforaircraft.wordpress.com
The image below shows the control methods used in different types of helicopters.

Image from unicopter.com, credited to Rotary-Wing Aerodynamics.
Comment: @Ethan No!  The blades don't "lean".  The rotor disk is titled, so the thrust vector now has a horizontal component.  It's the horizontal component which causes movement in the Y-axis or rotation around the Z-axis.  This has been explained several times in questions you have asked.  If there is anything in this comment that you do not understand, ask, since if you do not understand this comment, then you do not understand how helicopters fly.
Comment: So basically the blades lean to the right side and the helicopter turns to the right side like a rudder
Answer: Helicopters do not have rudders.
They have tail rotors.  You yaw left and right by varying the pitch of the blades, therefore varying the thrust they generate to counter the torque from the main rotor.
From Wikipedia.

Some helicopters use "NOTAR" (NO TAil Rotor) or ducted fans.  The duct is rotated with the anti-torque pedals which varies the horizontal component of the thrust.

Quadcopters yaw by changing the speed, and therefore the thrust, of the rotors individually to "bend" the quadcopter.

http://uav-society.blogspot.co.uk/2014/06/quadcopter-mechanics.html
Comment: Do you know of any picture that could show this
Comment: @Ethan Have you moved the rudder stick when your helicopter is on the ground and the rotor isn't spinning? Isn't there a servo somewhere connected to the tail rotor with a linkage on your helicopter?
Comment: There are a few helicopter designs I've seen that do have moving rudder surfaces. These tend to be twinrotor designs with no tail rotor, like the Ka-50 Hokum (which has an all-moving rudder). At high forward speed, it's more efficient to use a rudder surface to yaw than to alter relative torque of the main rotors. For the same reason, the AH-64 Apache has an all-moving stabilator, which helps to pitch the aircraft in combination with blade pitch to avoid stressing the rotor blades or hub at speed. None of these would apply to most RC helicopters.

How does a helicopter rudder work?


Do manually added contacts stay in a smart group forever?

Question: If a contact is manually added to a smart group (so has the status of 'Added') do they stay there for ever (until manually removed)? I am about 99.9% certain that this is the case. I've had some questions about contacts that shouldn't have been in a group (and so got an email in error) - and the reason is that they were manually added to the smart group.  If true this makes manually adding contacts to a smart group a very bad idea - which I hadn't quite appreciated before.  It makes the case for this feature to be optional so it could be turned off.
Answer: It is answered here: https://docs.civicrm.org/user/en/latest/organising-your-data/smart-groups/#adding-and-removing-smart-group-members-manually
"You can override the criteria by manually adding or removing contacts from the group". So, unless the group is deleted or you remove them, my assumption is yes they will stay 'forever'.


Software for cutting out something from a frame sequence?

Question: Let's say I have video where I need to cut out background. I can convert video to many frames and then edit each frame. But it's a lot of job, so would be convenient to have opportunity to copy shape of selection and slightly edit it, so it would fit next frame.
It seems there no easy way to do it in GIMP.
It should be at least cheap. Preferably for Linux or Android. But Windows is acceptable.
Answer: The free video editor Kdenlive for Linux (and Windows) appears to have the ability to accomplish your goal.
A tutorial of sorts, perhaps more a guideline-type entry suggests to use GIMP to create a mask for your video project. You would import a frame of the video to GIMP, select and delete/adjust transparency of that frame and save it in the appropriate format for Kdenlive (.pgm) which is then used to mask the video.
Obviously, with video, there is likely to be movement in the video that would require targeted masks. Perhaps you would find that you can "block mask" sections of the video to reduce the workload.


Bicycle Helmets with Bike Rental in Amsterdam?

Question: We will visit Amsterdam next March and I plan to rent a bike for day. Do they include helmets with the rental? I watched several videos of bicycles in Amsterdam and I saw nobody wearing a helmet.
Answer: There are people who cycle with helmets in the Netherlands. But they are rare and rental bikes do not come with helmets at all.
(And to prove the rule, I found an exception, a site where with a bike you can rent a helmet, not in the city though.)
When we see a group of more than three people with helmets who are not on racing bikes, we say to each other 'tourists'. But people who race or ride mountain bikes off road often wear helmets and slowly more commuters also use helmets.
If you own helmets, nothing stops you bringing them and using them in the Netherlands. You will look like tourists but hey, that is what you are.
A quick internet search did show no adult helmet rent, I did find child size helmets for rent with special bike seats and child carrying bikes.
There are helmets for rent for events, like triathlons, rental prices may be more than the rent of a bike for a day. Site 1, Site 2, I found these sites online and do not know anything about their quality (and certainly have no link with them.)
For a longer stay/rental you can buy a helmet locally, but I think for a one day rental that is unlikely.
To search for a helmet to rent, with or without a bike, search on the Dutch name: fietshelm huren (name of city)
I would do like the locals do, forget the helmet.
(I am Dutch, I do not wear a helmet but I do cycle daily and have done so most of my life.)
PS, out of personal experience:
Leave the city for the best cycling. You can rent bicycles all over the country and riding in the countryside is more enjoyable than in Amsterdam. While it is the worlds best cycling capital city, it is below standard for the country. And it gets very crowded on the cycle lanes in peak hour.
Comment: We are back from our trip. I only saw three riders in Amsterdam wearing helmets. There were also the only bikers wearing lycra riding clothing. Two were on racing bikes but the third was riding a cargo delivery bike. He looked out of place.I did not rent a bike after all. The bicycle traffic was fast and heavy. The worst part were the motor scooters zipping around the bicycles in the bicycle lanes. I saw several close calls including two where the bikers screamed out in fear. Too intense for this tourist.
Comment: Good answer. Your best bet for finding a helmet is a place that rents racebikes or mountainbikes as well. Why do we Dutch dislike helmets, it is much safer after all?!
Comment: People all over the world dislike helmets, many still wear them due to be told it is safer. (But I am not convinced yet.)


Is US 4,915,276 A still owned by Ermin Devito?

Question: In reference to the patent: US 4,915,276 A
Is this patent still owned by Ermin Devito or somebody else?
If it is, how can it be re-claimed by him or his family?
Comment: Just out of curiosity, is there something specific that prompted this question (a recent article or something) that gave you the idea to attempt to revive the patent? There have been several cases of this type of question lately (at least three or four in the last two months), and I'm just trying to figure out if there is a reason for the sudden increase in these questions here.
Answer: This patent was originally assigned to Ermin Devito of Green Brook, New Jersey, and was never reassigned (see USPTO Assignment database). However, a note from the USPTO database:

Disclaimer: Assignment information on the assignment database reflects
  assignment documents that have been actually recorded. If the
  assignment for a patent was not recorded, the name of the assignee on
  the patent application publication or patent may be different. If you
  have any comments or questions concerning the data displayed, contact
  OPR / Assignments at 571-272-3350

If you check the Legal Status (via Google Patents or USPTO Public Pair), you will find:
<code>Date           Code  Event Description
Apr 27, 1993   FPAY  Fee payment
                     Year of fee payment: 4
Feb 13, 1998   REMI  Maintenance fee reminder mailed
Apr 12, 1998   LAPS  Lapse for failure to pay maintenance fees
Jun 23, 1998   FP    Expired due to failure to pay maintenance fee
                     Effective date: 19980415
</code>
This patent expire on April 15, 1998 because the second maintenance fee was not paid. Occasionally, (in very limited circumstances) it is possible to revive a patent by paying the back maintenance fees, but it has been far too long, and the patent would have expired on April 10, 2004 anyway. Any attempt to revive it would need to be done as a petition directly to the USPTO.
I suppose that, if infringement were found during the enforceable period of the patent (September 22, 1988 to April 15, 1998), then some action could have been taken. However, it has been almost 20 years since then, and the assignee would have had (maybe) up to a few years after expiration to enforce it. This is just speculation though, because the invention is now considered to be Public Domain due to the amount of time that has passed.
If you are interested in the history of this patent, you can find additional information in the USPTO Public Pair database.


Add new picklist value for salesforce standard field programmatically

Question: In my application i have a custom field called Column__c, what i want is when i create a new Column__c record, the Column__c Name will be added automatically in the status picklist field in Task Standard object. By default status field has (Not Started, In Progress, Completed, Waiting on, someone else, Deferred). is it possible to add new picklist value for status field via trigger/programmatically? anyone is willing to help will be appreciated , thanks.
Answer: Not without using the Metadata API, such as FinancialForce's Metadata API. However, it really shouldn't matter, since you can store whatever value you want in a pick list, so long as "enforce pick list values" is not enabled. Simply have your trigger assign whatever value you choose, and that record will retain that record, even if it's not on the list of accepted values.
Comment: yes.. you are correct but why is it my custom status value inserted was deleted automatically in a period of time ? "For the picklist Task Status on object Task, the value hhaha was deleted." (salesforce emailed me that message recently)
Comment: @DanrylTigolCarpio That's new. I might need to do some research on that.
Comment: thanks i will make a research too .. please beep me if you find an answer.. thanks
Comment: by the way.. how will we create a task object to a custom object.. For my custom object , i want to create a lookup field for task standard object..
Comment: oh don't worry .. salesforce emailed that it was deleted. but when i query the status in task .. the "hhaha" value i inserted was there..


What are the odds of drawing a seven card straight flush

Question: I had the unbelievable experience of drawing a seven-card straight flush while playing with five other players with one deck.  The hand started with the ace of spades and ended with the seven of spades (all spades).  Has anyone calculated the odds of that occurring?
PS. The hand was not dealt in order.
PPS. Unfortunately, it was nickel-dime.
Answer: Was it seven cards drawn from the deck with no replacements?  There are 52 choose 7 different 7-card combinations from a standard deck.  In one suit, there are 8 different 7-card straights possible.  So 32 different seven-card straight flushes are possible.
That makes the odds of drawing this mostly 32 / 52C7 for each hand (not quite, because hands drawn in a single round aren't independent, but it's pretty close).  That's 2.39 x 10^-7 or close to 1 in 4.2 million.


Non woven geotextile fabric for french drain clogging in heavy clay

Question: I did a lot of research on french drains before I hired a landscaper to put one in a month ago.  Followed advice of the French Drain Man and used 4oz non woven geo textile fabric.  I also had standing water in a low spot 15 ft away from french drain so I installed catch basin, shoveled a ditch, laid non perf corrugated pipe and laid it perpendicular to the ditch of the Fr drain burrito wrapping fabric thinking it would percolate thru the fabric and into the fr drain pipe. I left the intersection area open so I could look down and see if it was working. During Heavy rain last night I checked and found the both catch basin area and the intersection open hole flooded with water.  This morning I baled out the hole and found water is pooling/standing on top of the fabric and not moving thru it. Pricked fabric with T pin multiple times but the flow is very slow when I subsequently tested it.  Does heavy Kentucky clay when wet form a non permeable layer of mud on the fabric?  If so then the whole Fr drain is not working!  Not from KY so I am amazed at the type of clay here.  Bad stuff!. Originally installed Fr drain due to water in crawl space.  Some water did come in after this storm but it appears to be less than before.  Anyone ever see slow to no percolation in non woven geo tex fabric in heavy clay?  Also need advice on what to do. Additional info: Drain installation: ditch lined with fabric all sides and bottom, laid in perf corrugated pipe, filled ditch with #57 rock up to 8 inches below ground level, burrito wrapped fabric over the top of rock/pipe and covered with fresh topsoil.
Comment: Water will percolate very slowly through heavy clay if at all. It is not at all surprising that clay accumulation on the fabric cuts off any flow through the fabric. All this is one reason that french drain structures often have large perimeter area around the drain made of something like crushed rock. Such rock material can then be surrounded by a much larger covering of membrane to increase surface area and allow more percolation to occur. May or maynot work in heavy clay. If your heavy clay has limited depth you may need to build a french drain that extends much deeper into less dense soil.
Comment: Why are you putting a french drain in clay?
Comment: Hard clay is the composition of the soil below the surface here.  When you dig beyond about 6 inches you hit it. French drain was recommended to remedy water entering crawl space.
Comment: Did you ever get this resolved? If so, please give a check-mark to the answer that helped you the most, or write up your own answer explaining what you did to get it fixed and give yourself a check mark. That will help others with this kind of problem know that this has a resolution and is a good place to look for their answer.
Answer: You want water away from your basement wall and your solution, which often works, is indirect, you're attempting to drain all the water away, rather than the water you care about.
A solution is to keep the water away from the exterior of the basement wall using a waterproof coating on the exterior of the wall, and then a drainage board over the coating. Then, set up your foundation drain to drain the water AFTER it gets through the filter covering which is outside the drainage board. This eliminates the clogging issue. If the filter clogs, you're happy because the water isn't getting to the basement wall.
For the other issue, treat it separately by continuing the non-perf pile the entire distance.
Answer: I would think non woven would be only good for vapor. I say this as my hunting gear is fabric it will allow moisture to exit but not allow rain in.
 I use woven socks on my French drains I want to keep some dirt out but allow flow,
If you keep all the dirt and silt out the drain will plug faster than some dirt and silt entering the pipe, in areas with high clay like the north Bay Area of San Francisco we usually had a clean out so we could flush the drain in the summer.
My suggestion would be to retrench I use landscaping fabric as a "liner put some rock in the bottom then the pipe in a sock more rock within a few 6-8" of surface now you have a foot or more of rock above the pipe fold the land scape fabric over the gravel hopefully at least 2 layers 1 from each side but if there is more don't cut it fold it back and forth 2 or 3 times slight longer than the trench is wide (making a pocket to hold the dirt) fill with the native topsoil.
This method will create drainage from below the surface and the surface even in heavy clay , 6-8" of top soil will hold grass and only in late summer shows if not watered. We probably put hundreds of this style French drains up to 6' deep and septic fields are not much different or we're not prior to the requirements for pumped systems.
Comment: Ed: I updated my question with details on the particulars of the drain installation.  This relates to what you said.
Comment: The fabric is probably the issue. It sounds like you have enough rock but the clay is plugging the pours of the fabric. The landscape fabric I use has holes  ~ every 1/4" closer to a nail hole from a 16 penny nail.  At that intersection where the hole is I would probably slice the fabric with a razor knife. Don't remove the fabric but a couple of slices will allow the water to get into your drain pipe and eliminate the standing water in that area. On shallow areas like this I have used just landscape fabric (lots of holes) and rock to make mini drains this may help after slicing the fabric.


Preserving appeal process

Question: If a motion to dismiss is granted on one of several defendnats 'with prejudice' is there anything that must be done to preserve an appeal of the order granting dismissal whether or not it was done 'with prejudice?
Answer: Generally not. Unless the judge certifies the right to make a separate appeal with regard to those parties, the judgment is not final.

Preserving appeal process