Is there any way to bracket shutter speed rather than exposure on a Nikon D200?

Question: I'll be shooting the 2017 eclipse on August 21st with my D200 through a Leica spotting scope as my fixed aperture lens. I was wondering, is there any way to set up shutter speed bracketing rather than exposure bracketing or do I just need a more up-to-date camera? Is there a firmware fix for this?
Comment: Which mode did you have the camera in? (P/S/A/M etc?)
Comment: The camera is set to M.
Answer: Yes you can perform shutter speed bracketing, no fix needed. Your camera supports this.
But first, a clarification: exposure bracketing can be accomplished by varying any of the exposure variables (aperture, shutter speed, or ISO). Depending on what exposure mode your camera is in, different parameters will be varied to create the exposure bracket.
According to the D200 User Manual, page 74,

The camera modifies exposure by varying shutter speed and aperture (programmed auto), aperture (shutter-priority auto), or shutter speed (aperture-priority auto, manual exposure mode). When On is selected for Custom Setting b1 (ISO Auto), the camera will automatically vary ISO sensitivity for optimum exposure when the limits of the camera exposure system are exceeded. If Custom Setting e5 (Auto BKT Set) is set AE Only or to AE & Flash and On is selected for Custom Setting b1 (ISO Auto), the camera will vary ISO sensitivity without varying shutter speed or aperture, regardless of the setting chosen for Custom Setting e6.

Thus, set your camera to either aperture priority (A) or manual exposure (M) modes, and the shutter speed will be bracketed. For the eclipse, you're probably following one of the many eclipse exposure guides on the internet, so you'll be in manual (M) mode, and will be manually setting your aperture, ISO, and desired "nominal" shutter speed. Then you can bracket above and below that shutter speed.
Custom setting e6 (Auto Bracketing in M Exposure Mode) is described on page 167:

Flash/Speed (default): Camera varies shutter speed (Custom Setting e5 set to AE Only) or shutter speed and flash level (Custom Setting e5 set to AE & Flash).
Flash/Speed/Aperture: Camera varies shutter speed and aperture (Custom Setting e5 set to AE Only) or shutter speed, aperture, and flash level (Custom Setting e5 set to AE & Flash).
Flash/Aperture: Camera varies aperture (Custom Setting e5 set to AE Only) or aperture and flash level (Custom Setting e5 set to AE & Flash).
Flash Only: Camera varies flash level only (Custom Setting e5 set to AE & Flash).
If no flash is attached when Custom Setting b1 (ISO Auto) is on, camera will vary ISO sensitivity only, regardless of setting selected.

Therefore, you need to make the following settings:

Custom Setting b1 (ISO Sensitivity Auto Control): Off
Custom Setting e5 (Auto Bracketing Set): AE Only. AE & Flash (the default) is also fine, since you won't be using flash anyways.
Custom Setting e6 (Auto Bracketing in M Exposure Mode): Flash/Speed (the default)
Exposure mode set to Manual (M).
Comment: @MichaelClark that's a really good question, especially in light of OP mounting the camera with a T-mount. I'm pretty sure there won't be a problem (I don't have anything to T-mount at the moment, but I have T-mounted my Nikon before, and had no problems with setting manual exposure). This discussion, [Nikon -t mount on D200?](https://www.photo.net/discuss/threads/nikon-t-mount-on-d200.320212/), seems relevant, and the conclusion there is that it shouldn't be a problem.
Comment: Question for clarification: Will Auto bracketing in **M** mode work even when the camera can not detect, much less communicate with, the lens? Will it accept the manually entered Av value or will it display the dreaded *fee* error?


Creating a Custom Post as a repository for theme constants

Question: I was wondering if it would be possible to create a custom post with different custom fields so that if a download document used in many pages changes the user can come here to update the name.
In other words, if the document sitting in www.web.com/uploads/catalog2012.pdf is upgraded to catalog2013.pdf, the user would be able to change the document name here.
Thanks in Advance,
Mauro
Answer: Post meta data are for posts only. You should not create a new post type to use custom options.
There is a dedicated Options API for that use case. Create an options page and let the user update the option there.


Does VirtualBox permanently affect performance?

Question: I would like to install VirtualBox as an Ubuntu testing environment. Must I permanently sacrifice system resources such as RAM? Or only when the environment is running?
Answer:
You must sacrifice some disk space when you install it.
And a minor part of RAM, as it loads additional kernel modules.

Nothing more, as long as the app is not running.
The ressources you assign to a virtual machine are different:

of course its virtual disks/storages will be there until you delete that VM and its files
the RAM assigned to the VM will only be used when you fire up the VM and should be freed once you power it down.
Same for the RAM VirtualBox itself uses to run, which should be freed when you exit the VirtualBox application itself.
Answer: The most common bottleneck, in my experience, is the HDD and/or the memory controller.
There will be more space allocated in the RAM, that's for sure, but the big problem is that your HDD and your memory controller have to work double times for 2 OS, doesn't matter if the 1 OS is virtualized, it still have to access a phisical device somewhere to read and write data.
If you have a chance to install and use another HDD, use this one to store all the data about your VM, having 2 HDD will make everything run smoother.
Answer: If the guest is Linux, there is one option not mentioned often that may improve speed a lot if meet the requirements.
You can tell VirtualBox to use a USB disk inside the guest, and if the guest is a Linux system, it can use such a disk for root, though maybe not for boot (VBox refuses to boot from USB).
Also you can tell VBox to use such a disk as RAW (warning: with host accessing the disk at same time, if host is Windows you had better set disk as offline). I dislike this a lot; I prefer to pass a USB drive.
But ensure the USB drive is fast (better if an SSD) and USB is 3.x (better if 3.1 Gen2), USB 2.0 is a real bottle neck.
In this way the Linux guest will control the real hardware (through USB pass) and that can make the guest really smooth.
Also think about using Linux Live systems (that run full in RAM), but have plenty of RAM (like 32GiB/64GiB/128GiB/256GiB/.../1TiB of RAM on Host).
Nothing actually beats RAM speed.

My configuration is a 128GiB AMD ThreadRipper 1950X (16 cores/32 threads) with 128GiB of DDR4 and eigth 120GiB SSD (each 500MiB/s) in LVM2 (stripped).
On boot the Linux system copies its 2GiB Host Linux into RAM (from an SSD like RAID 0 in less than two seconds), then host is running fully from RAM, then I copy the Guest disks to RAM drive (64GiB copied on less than nine seconds) and then I run VBox and start the Guest, and the guest disks are fully on RAM.
So all (host and guest) runs with all disk storages on RAM (faster disk access while running is impossible with any physical disk).
I know, I allow only 30GiB for host and guest as RAM, for host I give 6GiB and guest 24 GiB.
So my 128GiB are used as this (number with * indicate approximated):

2GiB* of RAM Drive for Linux host (disk to ram boot)
6GiB of RAM as host RAM (for host system and apps)
64GIB of RAM Drive for Guest virtual (fised size) disk
128MiB of RAM for guest video memory
24GiB of RAM for guest RAM
Total: 128GiB

I know having 128GiB lets me do good things.
I should mention that using this setup my Guest is immutable unless I save from RAM drive the disk image back to the SSDs.
Also note SSDs are used only at boot time, and only at shutdown if I want to save changes, while on boot they are used for only around 12 seconds (yes, you read correctly, less than a quarter of a minute), and if I want to save the changes on powerdown they are used for only nine seconds.
Since I have it on powerdown each night, my SSDs are used on read only 12 seconds per day, and on write only 9 seconds per day (not all days).
Also note that all reads/writes are for files with sizes (near 2GiB host Linux .ISO, like a small LiveDVD)+(64GiB of guest virtual fixed size disk), except Grub2 boot files, kernel and initramfs. So my main use of SSDs are for two non-fragmented files, one of near 2GiB, one of 64GiB.
Having a lot of RAM is really great (and such processor is brilliant), but expensive (near $3000).
I could do it better if I were rich... use a Quad socket main board for AMD Epyc processors (each one costs $4000, so only the processors are $16000). I cannot afford such huge prices, but such a mainboard allows up to 1 TeraByte of DDR4 RAM... think what could I do with such a beast!


How can a fly be in the space of a roofless car, get out of the car space and get back in while the car is driving at the speed of 80mph?

Question: I was driving in a cabriolet car at the speed of 80mph, while a fly flew in and out of the frame of the car. My question is, How can the fly leave the frame and get back in? Is it possible that it flies at 80mph?
Comment: Maybe relevant. My cousin is a long-time pilot. He has heard of people who wished to have their ashes spread from an airplane. What a mess! The dust blows everywhere and they have a big cleanup job.
Comment: This question appears to be off-topic because it is about biology.
Answer: The fly is carried away within the turbulent motion of the air the moving car generates. Therefore, it stays close to the car (for a short while) and returns without actually having to fly at 80 mph. -> Answer to your second question: No!
A google search for "turbulence around car/obstacle/plane" gives colourful pictures of the wind field around moving objects.


Can we deploy a private blockchain on ethereum without using smart contract

Question: I'm recently trying to investigate whether we can deploy a private blockchain without using the functionality of the smart contract, or in that case can we deploy it on quorum without the functionality of smart contract
Comment: Your question is not clear , maybe you looking for something similar to plasma chains
Answer: A private blockchain is independent from a smart contract. You can run your own private Ethereum network (for example using ganache, geth or parity). To ensure (others) that you don't randomly rollback in a network based on Proof-of-Authority  or a low computation power Proof-of-Work consensus mechanism (for example), you can send a transaction to a strong network like Ethereum every N blocks, including the latest block hash of your private chain in the transaction data.


AngularJS incorrect order of link functions

Question: If I include a directive inside another directive's template and transclude the contents into it then its link function gets called before any of the transcluded directives.
For example (also on JSFiddle):
I have the following HTML composed of directives and templates.

    <reel>
        <asset></asset>
    </reel>

And set up my directives like so.
var app = angular.module('showcase', []);

app.directive('reel', function() {
  return {
    restrict: 'E',
    replace: true,
    transclude: true,
    templateUrl:'reel.html',
    link: function() { console.log('reel'); }
  };
});

app.directive('scrollable', function() {
  return {
    terminal: true,
    restrict: 'A',
    link: function() { console.log("scrollable"); }
  };
});

app.directive('asset', function() {
  return {
    restrict: 'E',
    replace: true,
    transclude: true,
    templateUrl: 'asset.html',
    link: function() { console.log('asset'); }
  };
});

The expected output into the console would be:
asset
scrollable
reel

Because asset is a child of scrollable, however I get:
scrollable
asset
reel

Does anyone know how I can get my order back but still define the additional directive within the reel template?
Comment: If you are using directives on the same element you need to set the priority.  By default user defined directives are priority of 0.  Try setting asset to priority: 10.
Comment: @CorySilva I used the `terminal` attribute to state its priority is always last. `ngTransclude` had a priority of 0 apparently.
Comment: @CorySilva Actually that worked... but it's weird the terminal property didn't. Do you want to make an answer and I will accept?
Comment: @CorySilva Sorry comment overload... I misunderstood the terminal property... it means any later priorities won't run. I thought it meant make it of latest priority no matter what.
Comment: Oops, I did not even notice you had the terminal property; I had the same first impressions of that property as well.  Glad you got it to work!
Answer: If you are using directives on the same element you need to set the priority. By default user defined directives are priority of 0. Try setting asset to priority: 10.
Taken from AngularJS Code Comments:
/** ### Directive Definition Object
 *
 * The directive definition object provides instructions to the {@link ng.$compile
 * compiler}. The attributes are:
 *
 * #### `priority`
 * When there are multiple directives defined on a single DOM element, sometimes it
 * is necessary to specify the order in which the directives are applied. The `priority` is used
 * to sort the directives before their `compile` functions get called. Priority is defined as a
 * number. Directives with greater numerical `priority` are compiled first. Pre-link functions
 * are also run in priority order, but post-link functions are run in reverse order. The order
 * of directives with the same priority is undefined. The default priority is `0`.
 *
 * #### `terminal`
 * If set to true then the current `priority` will be the last set of directives
 * which will execute (any directives at the current priority will still execute
 * as the order of execution on same `priority` is undefined).
 */


What town or towns will Aela not complain in with children?

Question: Ok so I was able to marry Aela and get her as a companion. I did a little research and found out that if she gets a child or children, then she will complain about living in Whiterun, Riften and out of towns if the DLC is owned. For whiterun she says the house is too small for you, her and the children. For Riften she complains that the kid(s) will grow up to be thieves. Living outside of town she complains about the kids' safety and about the wolves and bears. (Despite the fact that we are both werewolves so the kids should be more than safe in the wild but whatever). Is there any town or towns that she won't complain about if she were to have children there?
Comment: Would you mess with a child whose parents can turn themselves into werewolves at any given moment? 'Cause I definitely won't.
Comment: How does the two of you being werewolves ensure your children's safety?
Comment: "Living outside of town she complains about the kids' safety and about the wolves and bears." Make sure you inform all the wolves and bears. Also, if the townsfolk knew you were werewolves they would show up with pitchforks and probably try to kill your children.
Answer: Ok so I just did a little experiment. Used up the past 12 hours of my life to find out this information so I hope everyone finds it helpful. In whiterun Aela will complain that the house is too small for her and the children and you. In Riften she fears that the kids will become thieves (even if you are the guildmaster for the thieves guild but whatever). In Markarth she fears that the children will easily get hurt or wind up in the mines. In windhelm she claims the streets are crawling with filth and unsafe for the kids. In the heartfire home she gets mad at the dragonborn for moving them into the wilderness to get attacked by wolves, bears and giant spiders (AELA YOU ARE A FREAKING WEREWOLF WHY ARE A FEW PESTS SUCH A BIG DEAL FOR YOU?!). Solitude however she is completely fine with.
Comment: Yea she does. It gets a little old for a while.
Comment: So she complains in all of the Hearthfire homes? Also, +1 for your 12-hour quest for answers.
Comment: I do not regret it though. Found some pretty cool stuff and I got the nightingale armor, blade and bow. Totally worth it. I now look like a jet black scorpion from mortal combat. Lol
Answer: Try to do it with safe homes like in Solitude. That house seems like nothing will both Alea. The house in Markarth also seems fine, though it might not be safe (because of elevation).
(Next time, don't have Alea as a spouse in the DLC, for she always complains, other spouses won't complain)
Comment: Did you try these houses? Did she complain?
Comment: I only have whiterun right now. I'm in the thieves guild and the companions if that helps any.
Comment: @ChronosMyth the thieves' guild doesn't seem to affect anything. You do have to be a Compainion to have Alea though.


Sort Wordpress Archive by multiple oderby arguments in pre_get_posts action

Question: Actually this private function in my function.php works, BUT: i often get Error 500 by the Server on the first load, often it renders AFTER reloading the page.
## change the sorting order on archive pages: order archive by title
add_action( 'pre_get_posts', 'gpsp_change_sort_order');
function gpsp_change_sort_order($query) {
  if(is_archive() && $query->is_main_query()) :
    $query->set(
      'meta_query',
      array(
        'relation' => 'OR',
        array( 'key' => 'ausgabe',  'value' => '', 'compare' => 'EXISTS', 'type' => 'NUMERIC' ),
        array( 'key' => 'position', 'value' => '', 'compare' => 'EXISTS', 'type' => 'NUMERIC' )
      ));
    $query->set( 'orderby', 'meta_value position' );
    $query->set( 'meta_key', 'ausgabe' );
    $query->set( 'order', 'ASC' );
  endif;
};

Is anyone expert enought to explain me that error?
Answer: I am not an expert, but you have a couple of issues here
Firstly, is_archive() should be an object of $query. You should also just target the front end with your function. Remember, pre_get_posts alters all instances of WP_Query, front end and backend.
So this line
if(is_archive() && $query->is_main_query()) :

should look something like this
if( !is_admin() && $query->is_archive() && $query->is_main_query()) :

I can't figure out your logic with your meta_query and your ordering. I'm really not to sure if your ordering will really work. You should have a real look at that as you are specifying one key and sorting by another
One other possible issue I can see here is, you are using the OR relation in your meta_query. You are retrieving post which have one meta_key or the other meta_key. What happens when there are no posts having one or the other meta_key. How will this influence your ordering and what errors if any will be triggered. Frankly I have not tested scenarions like this yet, so this might be a grab at nothing, but still useful to keep in mind
You might need to work in some check to make sure that a key exists before you try to orderby by it.


Freeze screen before regional screenshot capture

Question: I'm looking to imitate ShareX's behaviour in Gnome. I want the screen to freeze before I take a regional screenshot. It would also be nice to get other features of ShareX too, however, I'm not sure if that's easily achievable.
Answer: A little late to the party, but switching from windows I missed that feature a lot. I just recently discovered flameshot which does exactly that (with additional features like making some small edits on the fly).
You can install it via: sudo apt install flameshot
and then invoking it on the command line via flameshot gui
However, that seemed annoying to me so I also created a shortcut with the print button (you need to disable the standard screenshot first though). See Ubuntu 18 how to change screenshot application to Flameshot?
Answer: KDE has an awesome screenshot tool that does exactly what I want called "Spectacle". It works (perhaps surprisingly) well on Gnome too.
To install Spectacle: sudo apt install kde-spectacle


Is there a way quantify beer flavour characteristics?

Question: I saw a graph online that seems to be used for quantifying flavour characteristics of an alchoholic drink (sake).

Source here and here.
Is this graphing system used for quantifying beer flavors too? If not, is a different system used?
Answer: Wikipedia has an entire article on beer measurements. The main truely quantitative measure of taste I'm aware of is the International Bitterness Unit or IBU. Wikipedia has a section which describes the IBU. Of course there are other quantitative measures like alcohol by volume that while not exactly taste give some value in assessing a beer. I've also seen specific gravity reported, but this isn't very common in my experience.
Beer Advocate provides user reviews of beers where the beers are assessed numerically based on look, smell, taste and mouthfeel on a 1 to 5 scale. Although these are based on opinion, with enough reviews a useful amount of user feedback is obtained and quantified (to two significant figures).
Answer: Is there a way quantify beer flavour characteristics?
I tried to find a site that could standardize this question and this is what I came up with the following. If it does not truly answer your question, it is definitely helpful. Please remember to follow the links.

Beer Tasting 101
It can be as easy as taking the time to notice the flavours in every beer you drink. Here are a few general rules to keep in mind:

Make sure your beer isn't too cold.

If a beer is very cold, it is a lot harder to taste. It's a good idea to pull your beer out of the fridge 15 minutes early (or you can always take your time drinking it!)

Always pour the beer into a glass.

This releases the aromas, as well as the CO2, and will make it a lot easier to taste the full flavour of the beer.

Relax and Enjoy:

Taking a moment to smell your beer and linger on your first sip will make every beer a rewarding experience.
Taste and Savour
This section outlines basic beer-tasting technique, and what to look for. The Beerology™beer evaluation sheet provides some helpful guidelines and terminology, and can be downloaded to have beer-tasting sessions at home, at the pub, or to record personal impressions.
Appearance
Raise your glass, and take a moment to appreciate the appearance of the beer in front of you. Although colour and clarity aren't necessarily an indication of the beer's quality, the look of any given beer was crafted intentionally and is an integral part of the drinking experience. The colour chart on the Beerology™beer evaluation sheet provides common beer colour descriptors. The clarity of a beer can vary from brilliant to cloudy. Head can tell you a bit more about the beer. Beers that aren't extreme in their alcohol content should have good head retention (the foam doesn't collapse immediately). Head retention often indicates a well-crafted beer, made with quality ingredients. As you drink your beer, look for lace-like pattern (left by the foam) on the sides of your glass. This is known as Belgian lace and is another indication of good quality.
Aroma
Smelling your beer is one of the most important steps in beer tasting. Our sense of smell informs the way we taste things, opening up a complexity of flavours to the palate. If the beer has no discernable aroma, agitate it by swirling it around in your glass. This will release some carbonation, which will carry the aroma up to your nose. It is always easiest to start with a general impression: how intense is the aroma? Is it sweet (malt aroma), sharp (hop aroma), or a balance of different notes? If you like, you can then take the time to identify more specific aromas in the beer. The Beerology™beer evaluation sheet provides some common aroma descriptors. Of course, it is always important to note whether you like the aroma of the beer or not!
Flavour
The flavour of a beer should be a natural continuation of the aroma. There are a few added dimensions that will appear, most notably bitterness. Swirl the beer around in your mouth before swallowing it. Take a note of any flavours you taste, compare these flavours to other flavours you know. Does this beer remind you of anything? If you like, take a look at the Beerology™beer evaluation sheet and see if the beer contains any of the common beer characters listed. Again, it is helpful to note the intensity of the flavour, the balance between sweetness and bitterness, and your general impressions.
Mouthfeel
Another component of flavour is mouthfeel. Mouthfeel refers to the texture and weight of the beer, as opposed to the actual taste. High alcohol beer can have a warming quality, not unlike hard alcohol, while bitter beers can sometimes be astringent. The weight, or body, of beer can also vary from being light and watery, to being full and heavy. Another interesting thing to notice is the carbonation level, since it varies between different beers. Ask yourself: is this carbonation level pleasant or distracting?
Finish
The final component of flavour is finish. Take a moment to pause between sips. Does the flavour of the beer linger, or is the finish short? The after-taste can be sweet or bitter, and can take on many flavours, either in succession or all at once. Also notice the intensity of the finish. The finish of a beer depends greatly on the style in which it is brewed. The most important thing to note is: do you want to take another sip?
General Impression
Having taken a few moments to appreciate the various aspects of the beer in front of you, it is always a good idea to summarize your impressions of the beer. Were the flavours really lively and well balanced, or did they fall flat? Did the beer have a very fresh quality to it, or do you suspect that it was stale? Finally, take a moment to decide how much you liked the beer. Just because it was very flavourful and fresh, doesn't mean that it was to your taste! Feel free to take more notes and share your impressions with friends.
Comment: I somehow thing this is the right answer to the wrong question. Perhaps you should post your own question like "How should I do a beer tasting" and then answer it with the above. This would make an excellent answer more findable.


Magento site note loading all sections/blocks after moving it to amazon AWS

Question: I have moved my local magento site to Amazon AWS. After moving, my site is not loading with all sections/blocks(Products listing and slider/banner) in site front end. I am using themevast theme. Can any one help me to solve this? What could be the reason for this?
Comment: did you empty cache, recompile and so on ?
Comment: Thanks@ChristopheFerreboeuf,I've cleared cache but not recompiled.Let me recompile.
Comment: @ChristopheFerreboeuf, i have compiled but still problem exists.
Answer: I found solution to this problem.
I was getting errors like future time stamp in and Exiting with failure status because of previous errors. This is may be because of file permissions(read/write/execute).
I was trying to extract filename.tar.gz. It was having these issues. Later i created filename.zip and unzip using unzip command. Now everything is working.
Answer: Out of caching and compilation there can be many different issues :

some files or folder were not copied correctly (maybe /media/ in your case)
the theme is not correctly set in back-office
some links were provided with full address instead of relative
the new server has its own fpc that was filled partially before the complete copy
some things were still compiled on the old server and were deleted
many other site specific reasons (can you provide the address ?)
Comment: Please check this `morascala.com`
Comment: I'm getting 500 error when i try to start compilation process and same error when i try to edit product or create product from admin panel. I think one issue causing all problems. I'm suspecting that this is because of directory/file permission issue.
Comment: @Christoohe Ferreboeuf Found solution to this.
Comment: so ? was it permission problem ?
Comment: No, it was not extracted fully and failed in middle.


How can I set cron job through PHP script

Question: How can I set cron job through PHP script.
Comment: Are you asking about creating a cron job programatically in php? Or about creating a cron job that runs your php script?
Comment: My PHP script would run on Linux.
Answer: This will add a script that runs every day at 9:30am.
exec('echo -e "`crontab -l`\n30 9 * * * /path/to/script" | crontab -');

You may run into problems with permissions if you are running this script from a web server. To get around this, I would suggest a different approach.
Here is one possible solution. Create a list of scripts that need to be run. You can save this in a text file or in a database. Create a script to read this list and run it every minute or every 5 minutes (using a cronjob). Your script will need to be smart enough to decide when to run the list of scripts and when to simply exit.
Answer: Do you know how to set a cron job normally?  (outside of PHP, i.e. from a bash script or the command line).
If so, you just need to use the php function exec to issue the same commands you would have to create the cron job at the command line.  One caveat is that there may be permission issues and you have to be really careful about what you put in that exec function (you don't want to pass input from the end user to that function).
Answer: You can't set a CRON job through PHP script, you have to set it one the server side. Unless you want to do it via system function, you can't set a CRON through php.
If you're not running on your own server and use hosting service, ask your hosting provider how to set up a CRON script (if the provider allows it).
Comment: @Marc B, yes but it's usually the server that takes care of the CRON scripts, not php _itself_. Maybe I didn't explain myself clear enough.


How to merge 2 YouTube channels?

Question: I have 2 channels with the same first and last name. I own both of them. I want to put all my subscribers and videos together. Any idea how I can do this or request this?
Answer: You can't actually merge YouTube Channels according to Google.
They do point out:

However, you can download your videos from your own channel. Once you've downloaded your video, you can re-upload it to a different channel. View count and other statistics will start over for the new upload.

How to merge 2 YouTube channels?


Spritz cookies not sticking to pan when pressed from cookie press

Question: We're having a good deal of trouble getting our spritz cookies from our cookie press to separate from the cookie press and stick to the cookie sheet. Is there something we can add to the cookie batter to make them separate from the cookie press and attach to the pan more easily?
Comment: I've noticed that different cookie presses place more/less batter per press, and have different sized openings.  I've had bad luck using recipes that weren't specifically from the manufacturer of that press.  You might compare the manufacturer's included recipes to see if the proportions of the recipie you're using are similar.
Answer: As I understand your question, the problem is really that you can't get it out of the cookie press, and not an issue of the dough "flattening" once it hits the baking sheet.  If that's correct, then there are a few different factors that could be contributing:

You might not be using a strong enough flour.  I've always used a 1:1 mix of bread flour and pastry flour.  All-purpose flour isn't great for spritz cookies and many home baking recipes do odd things to try to strengthen the dough to compensate, such as increasing the quantity of egg.  Not much more I can say without knowing the specific recipe, but try to find a recipe that doesn't use AP flour.
You might not be using enough flour, or you might have added too much water or milk.  The dough should feel relatively firm once it's well-blended, not soggy or watery.  The preparation I use also contains a good quantity of icing sugar, which has its own starch; if you're using regular granulated sugar instead then that will be a contributing factor to sogginess/stickiness.  Also don't forget to sift the flour.
Home baking recipes often make wild guesses as to the quantity of eggs, based on assumptions about the size and age of eggs you'll have.  The ratio I use is 20:13:8:6:3 (flour:fat:sugar:eggs:milk/water), by weight obviously.  If you use too much egg then you'll end up with a slimy texture that's hard to separate while raw.
You may have added the eggs all at once, which makes it difficult to incorporate without overmixing the dough (or not incorporating well enough, which again will give you that slimy texture).  Make sure you're only adding one at a time.
If your recipe calls for oil as a fat, or you're substituting oil for something else, that could be a problem.  Typically you'll want to use a mixture of about half shortening and half butter.  You don't necessarily have to use shortening, but butter has a low melting point and melting will, again, cause your dough to become too wet.
Did you cream the fat(s) together with the sugar?  That's another important step to getting the right consistency of dough.  You should have a mixture that's light and fluffy before you add the flour, eggs, or milk.
Make sure you're adding the flour last, otherwise you risk overmixing.

As far as sticking to the baking pan itself is concerned, just line it with parchment paper and don't grease it.  If you've made the dough properly then it will "set" and not sink.
FWIW, I also find it easier to pipe spritz cookies than to use a cookie press.
Answer: Chill the cookie sheets in between batches. Stick them in the freezer or outside (depending on the outdoor temperature). I was having the same problem and this was my mother's solution.
Answer: maybe you need to chill the cookies, they might be too liquidy from the room temperature
Answer: I just discovered that the disc in my press was in upside down. It had nothing to do with the temperature of the dough or the pan. Now it is working perfectly.  So check your disc if your Spritz dough is not sticking to your pan.
Answer: You must use cooled off cookie sheets so the cookies will stick to pan and come out of the press with no problem.  Cookie sheets can not be warm.
That is the answer.
Answer: Place the cookie sheets in the fridge before using. Also wash the cookie sheets after each use to remove butter and then place in the fridge. I've also noticed, if I press the cookie press and then lift up from the cookie sheet real quick, it seems to help too.
Answer: I just made 9 dozen tonight, tinted the dough pastel colors and dipped cooled cookies in melted white chocolate and sprinkled w different colors of sanding sugar. No Probs! The last time I made them I had a HOLY MESS!! Dough wouldn't come out of wilton press, (I had chilled the dough. Make it, then use it) and then wouldn't stick to the pans. Do not spray or grease the pan, don't use hot pans, don't use nonstick pans or line them w parchment or pan liners! My dough is nothing special. I follow the Wilton Recipe that is on the Wilton website, under recipe tab. And I mean no problem!
Comment: A lot of good points about temperature -- don't chill the dough or it'll be too stiff, and that you need to let your pans cool down sufficiently between batches or it'll melt the dough right at the surface and prevent it from sticking to the pan so it releases from the gun.


Is there a way to get a happy home without streetpass or spotpass?

Question: My friend said one of her villagers just moved in and said she came from another town and she had a best friend. She said the next day the villagers best friend had a house in the happy home showcase. The villager that moved in and had the best friend was Uchi and was named Mira. Any way to have this happen to me?
Answer: You can do all of the Happy Home tasks without streetpass/spotpass. Happy Home is about building out your house so that you get a high Happy Home score, and that is more about what items you place and where you place them. The only thing the Showcase affords you is an ability to view other peoples homes and potentially buy copies of items from their homes as available instead of waiting for the item to show up in the Nooklings shop.
Comment: Wait so if someone just joins my game and becomes my best friend or something their happy home house would be there?
Comment: Hmm... No, that's not quite how it works. Having someone visit your town or listing them as a best friend doesn't count as a streetpass. Streetpass happens when you are in physical proximity of the other player (within about 200 feet/70 meters) and the systems connect and share player info. If they have a home in the showcase, their home will streetpass to your showcase and vice versa,
Comment: Don't forget about the QR codes that can mod your save. That helps a lot too.


Can one individual (not a dealer) give or sell a firearm to another individual without reporting the transaction?

Question: Can one individual give a gun to another individual without filing any paperwork or doing a background check in Oregon?
What if the recipient is a minor?
What about selling the gun?
Comment: I am not familiar with Oregon. In some states, it's not allowed in the general case, but is allowed in specific circumstances, such as the giver and the recipient being closely related.
Answer: I assume that "in Oregon" means that the donor (transferor) and recipient (transferee) are both in Oregon, also that neither party happens to be a licensed gun dealer. You turn to ORS 166.435. The answer (reflecting the logic of the statute) is "No", with some exceptions. There are conditions (subsections 2 and 3) where it is allowed if certain restrictions are satisfied. But you don't have to abide by those restrictions if subsection 4 is the case. Apart from transfers to and from the government, you can freely transfer a firearm under subsection (4)c to a spouse, domestic partner, parent, stepparent, child, stepchild, sibling, grandparent, grandchild, aunt, uncle, first cousin, niece, nephew, or spouse or domestic partner any of the above. And under (4d), because of the death of firearm owner if "conducted or facilitated by a personal representative" (probate) or trustee as created in a will and transferee is one of those relatives. Not a friend, not a second cousin, not an ex-spouse, definitely not a stranger.
Otherwise, you have to comply with subsection (2-3). That means, you do the transfer through a licensed dealer and you must request a background check (you do not have to ascertain that the check was done). Under federal law (Firearm Owners' Protection Act of 1986), you tell the police, they check if you are precluded by law from gun ownership, then they forget that you asked, they don't keep a record of transfers.
It is illegal for a minor to possess a firearm ([ORS 166.250])3, but there is no prohibition against a minor owning a firearm. There are also specific exemptions where a minor can possess a firearm (e.g. temporarily for hunting or target practice).
Comment: So giving a gun to my second cousin wouldn't be allowed, but could I give it to my father who gives it to his cousin who gives it to his daughter, and thus it legally ends up with my second cousin anyway?
Comment: If the police always forget that they were asked, how can the requirement that the police be asked ever be enforced?
Comment: @Harper Clearly in the example the second cousin is allowed to possess the firearm. However, Showsni cannot _give_ a firearm directly to the second cousin. Thus, the chain that gets around this.
Comment: @Harper-ReinstateMonica how does Showsni's scenario necessarily involve a minor?
Comment: What about gun shows? Wasn't there usually an exception for those? Did it get removed at some point?
Comment: @cjs Sorry, I got confused.
Answer: User6726 gave a thorough and correct answer for Oregon state law, but residents of Oregon are also subject to federal law. It would be unlawful to knowingly transfer a firearm to a "prohibited person", even if that person is a close relative. The relevant federal law follows:
18 USC 922(d) It shall be unlawful for any person to sell or otherwise dispose of any firearm or ammunition to any person knowing or having reasonable cause to believe that such person, including as a juvenile—
(1) is under indictment for, or has been convicted in any court of, a crime punishable by imprisonment for a term exceeding one year;
(2) is a fugitive from justice;
(3) is an unlawful user of or addicted to any controlled substance (as defined in section 102 of the Controlled Substances Act (21 U.S.C. 802));
(4) has been adjudicated as a mental defective or has been committed to any mental institution at 16 years of age or older;
(5) who, being an alien— (A) is illegally or unlawfully in the United States; or
(B) except as provided in subsection (y)(2), has been admitted to the United States under a nonimmigrant visa (as that term is defined in section 101(a)(26) of the Immigration and Nationality Act (8 U.S.C. 1101(a)(26)));
(6) who has been discharged from the Armed Forces under dishonorable conditions;
(7) who, having been a citizen of the United States, has renounced his citizenship;
(8) is subject to a court order that restrains such person from harassing, stalking, or threatening an intimate partner of such person or child of such intimate partner or person, or engaging in other conduct that would place an intimate partner in reasonable fear of bodily injury to the partner or child, except that this paragraph shall only apply to a court order that— (A) was issued after a hearing of which such person received actual notice, and at which such person had the opportunity to participate; and (B) (i) includes a finding that such person represents a credible threat to the physical safety of such intimate partner or child; or (ii) by its terms explicitly prohibits the use, attempted use, or threatened use of physical force against such intimate partner or child that would reasonably be expected to cause bodily injury;
(9) has been convicted in any court of a misdemeanor crime of domestic violence;
(10) intends to sell or otherwise dispose of the firearm or ammunition in furtherance of a felony, a Federal crime of terrorism, or a drug trafficking offense (as such terms are defined in section 932(a)); or
(11) intends to sell or otherwise dispose of the firearm or ammunition to a person described in any of paragraphs (1) through (10).
Comment: @Someone Under federal law, yes, illegal if the person is a "user of or addicted to" any federally listed controlled substance. For an in-depth discussion of what constitutes a "user" see the ATF's opinion on the matter (PDF) https://www.atf.gov/file/84311/download
Comment: That's interesting! Thank you! So it's illegal to give a gun to a marijuana user?


Schengen visa overstay

Question: I got a Schengen visa for 25 days with a duration of stay of only 10 days, which I did not see on my passport. And I stayed there for 23 days. Now they are not giving me a visa again. What should I do? Will it affect my application for a UK visa?
Answer: Unfortunately, there is not much you can do to overcome this easily. Among the possibilities:

Waiting. You did not get a lifetime ban or anything, this minor infringement is just one of the factors going into the decision. As time passes and especially if you are able to document a stable situation in your country of residence (buying a house, founding a family…), you will be more likely to get a visa.
Travel to other countries. A history of travel to other countries will look reassuring to consular officers. If you are someone who travels a lot and had many occasion to (over)stay in a (rich) country but did not do it, you will appear less likely to abuse a visa. On the other hand, a recent overstay in the Schengen area might very well adversely impact other visa applications, including to the UK.
Move to Europe. If you have a good reason to move to a Schengen country (family, sponsored job…) and manage to get a residence permit (not easy, obviously!), the short-stay rules become essentially irrelevant. You will be able to leave and enter the area without worrying about your earlier violation of the rules.
Change citizenship. Not really a practical strategy or something you should consider just to overcome this but acquiring the nationality of a country whose citizens do not need a visa would make it much easier to enter.
Comment: why was this downvoted? Looks like a reasonable solution.

Schengen visa overstay


Is there any other way to secure ftp connection?

Question: Is there any secure method to establish an ftp connection except for SFTP or FTPS (explicit/implicit encryption)? The remote server does not support either. I tried VPN (TunnelBear) but got stuck at listing up the remote directory. Is there any way to hide the username and password that are sent over network?
Comment: No. If your remote endpoint does not support encryption, you cannot use encryption. Simple as that. Even if you use a VPN, the connection between the VPN server and the FTP server would be unencrypted (and raises more questions about who owns the VPN server and can therefore see the traffic there).
Answer: If the server doesn't support FTPS or SFTP it's probably unlikely it supports SSH either... but in the case it does, you can use an SSH tunnel. The tunnel will be invisible to the FTP server and the connection will be secure. The principle is that you create the FTP connection against a port on localhost, and your SSH client picks it up and forwards it to the server. The actual setup will be different depending on the SSH client, so I won't cover them all here – make a web search on "ssh tunnel ftp (your ssh client)" and I'm sure you'll find some helpful guides.
Comment: Just noticed that the question is tagged "Windows" – here's a guide for the most common (I believe) tools there, WinSCP and PuTTY: https://winscp.net/eng/docs/guide_tunnel#ftp_putty
Comment: Instead of leaving a comment which likely will be deleted or keeping your answer in a state which doesn't apply to the question you should edit your answer so it's applicable to the question
Comment: @Ramhound The answer **is** in a state that applies to the question. I have no idea if OP uses WinSCP or PuTTY. I'm not comfortable making a software recommendation either based solely on a random guide I haven't tested myself.


Flying hexapod with three wings

Question: Let's say I was working on the evolution of hexapod creatures that are like a combination of a starfish and an octopus. If they climbed the local trees, would it be possible for every other arm to evolve into a wing and for them to fly in a spinning motion like a maple seed?
Comment: Do you want them to be able to steer and remain in the air, or do they just fall to the ground like a spinning seed?
Comment: a combination starfish octopus will need a lot a clarification if you want to ask biomechanical questions about them, they are very different both biomechanically and structurally. A starfish has more in common with YOU than it does an octopus.
Comment: Valid point. I just meant that it would look like one from the outside
Answer: Unlikely

there is no reason to give up functional limbs for poor gliding.

Spinning is not something that helps flight it wastes a lot of energy that could go into actual propulsion. it helps maple leaves because they are parachuting and wasting energy is what you want.
Answer: I'm sure that it would be biochemically possible for your creature to develop the characteristics you describe, the main issue would be why? What evolutionary advantage would it gain from this?
The other issues to consider are the weight of the creature and its environment. If gravitation was less than on Earth it would help a lot otherwise something the size of an octopus would need a large wing to prevent it falling too quickly.
Any detailed look at this would need to know more about the creature. Is it a carnivore or herbivore? Why is it evolving flight? Does it help it to catch it's prey or does it help it to escape predators?
Answer: They could surely glide extending their appendices.
I am not sure they could actively keep themselves spinning to have a more active flight. While it is possible to turn on oneself without external torque with an appropriate motion (what cats do when falling and turning midair) I am not so sure that it can be done while keeping a flight favorable attitude.

Flying hexapod with three wings


Where is color information stored in android apps ?

Question: This might not be the correct place to post this, so please tell me if it isn't. As the title says, I'm trying to find the color palette for android apps while they're installed. I can't decompile the apps, but I can access the apk file. Is there a universal standard file or at least a string of text in a file that I can search for ?
Comment: This information is usually stored (in source) in the appropriate themes.xml files. These files are then packed into the resources of an app. The only way to get the theme information (color, parents, gradients, shapes etc.) is by decompiling said app. Some apps even change their colors at runtime, again requiring you to decompile them.
Answer: Under
values > color.xml
Your themes file ( values > styles.xml ) can link specific colors from this file like follows..
Style Script ..

color script ....
 <resources>
 <color name="primary_dark">#F28000</color>
 <color name="primary">#FF8700</color>
 <color name="accent">#FF8700</color>

Notice that color can link to itself
<color name="accent_text">@color/accent</color>


What can we learn from Matrix video games?

Question: So far I only watched Animatrix and the Matrix series and I heard that the video games also carry a lot of information about Matrix's inner workings. What are the key facts that one wouldn't know about the series without playing the games?
Comment: "What can we learn from Matrix video games?" — Mainly, we learn to buy other, better games instead.
Comment: If I narrowed it down to only information directly related to the movies, would this question be eligible for reopening?
Comment: Hello. I've VTC because I think this is too broad. You could for example tell us what games you're including or not in your question.
Comment: If you want a broad outline, just read the Matrix wiki articles about the individual games listed at http://matrix.wikia.com/wiki/Matrix_Video_Games (The Matrix Online in particular)
Comment: @d33tah imagine this: even if you were asking for the 'top 5' elements to be learned from "the games", their order of importance would be open to interpretation to some degree. That said, I'd attempt to reword it as something like "On what points the games extend the Matrix franchise's storyline?" and/or "What character development in the Matrix games contribute to the plot?", etc. (focusing on themes by your current point of interest). Aside from that, take note that arguably only Enter the Matrix would suitably meet one's expectations of considerable added information.
Answer: It has been a number of years since I played the game. But it was meant to be played during the two movies to interlink the story, along with the animatrix.
The problem was if you hadn't seen the movies then a lot of it didn't make sense.
As for the parts that were described in more detail in the game.

Starts off where the end of the Animatrix (related to the Osiris ship).
Why the heads of the ships were in the Matrix for a meeting.
How Agent Smith managed to infect a human.
Who blew up the power plant in the movie.
More details on who the Key maker is.
Who the Merovingian actually is.
More details on Matrix v1 + v2 and why they failed.
Why the Oracle changed into a new person (Original actress died between movies, so reason had to be written in).

May be more.
Comment: nitpick: it's actually the "`Keymaker`", *not* the "`Key master`"
Comment: @naxa fixed. For future reference, I have no issue people correcting my answers. :)


How the tube of a tire get puncture?

Question: How the tube of a tire(cycle) get puncture? I mean, the inner tube is protected by an outer tube, so how is it possible to make a hole in the inner tube? And in general the puncture hole is very small. Why?
Comment: Because of nails and glass.
Answer: When a nail is driven into a tire, it is safe to assume that it happens
in the first contact. The reason for this assumption is that the surface
of the tire is compliant (bouncy like a spring) so as soon as contact has
been made and the nail is lodged in the thread, if no puncture exists,
repeatedly pushing on the nail will not make any progress, rather it will
push against the compliant surface of the tire (which makes a "tent"
around the nail") with no energy being transfered to the tire (no
puncture). The part of the nail that sticks out will simply be polished
flush over time against the surface of the thread. Remember that pushing
on an elastic object (like a spring) causes energy to be absorbed by the
spring, only to be released once the force is relieved. And energy would
have be spent in the puncture. Also, the hardness of the tire is unlikely
to suddenly be reduced to allow the nail to penetrate in a subsequent
rotation. Finally, the force driving the nail can be assumed to be about
the same on each rotation (a fraction of the car's weight, as distributed
according to its dimensions, acceleration rate and grade of pavement, all
of these are parameters that change slowly from one tire rotation to
another during normal driving, and can be assumed to be about the same)

How the tube of a tire get puncture?


What is the significance of $\sigma$-fields in probability theory?

Question: I'm an undergraduate level maths student and I've just done a number of exercises on elementary set theory and sigma fields. We've just started the courses and are discussing probability events as sets. I can't see the link between sigma fields and probability theory. Can anyone explain this intuitively at an undergrad level?
Comment: Sigma fields are the class of sets called events. So all the events that you will be dealing with in probability theory are sets which are in a sigma field.
Answer: $\sigma$-fields, also known as $\sigma$-algebras, are used to model "events we can assign a probability to". We want some properties from these sort of events:

If we can assign a probability to two events, then we can assign a probability that both events happen.
If we can assign a probability to two events, then we can assign a probability that at least one of them happens.
If we can assign a probability to an event, then we can assign a probability that it doesn't happen.

These three effectively describe intersection, union and complements. So if we want to think of events as "sets of possible outcomes" this means that a collection of sets that models events should be closed under intersection, union and complements.
But why countable unions (or equally, countable intersections, or countable disjoint unions)? Well. Modern probability doesn't limit itself just to something which has four, or five, or seven, or eighty million possible outcomes. Even if you are interested in a finite object, you are not usually interested in limiting its size right from the start.
So even if you are not interested in the infinite case, asking what happens when your probability space grows larger and larger, and whether or not there is some "uniform behavior", that it eventually has a predictable behavior, is a good question that is worth asking and worth answering. And for that purpose, infinite sets become so very useful.
Closure under countable unions/disjoint unions/intersections ensures that if we have a sequence of events, then its union, or intersection, is still an event itself. So we can talk about the limit of events (as a limit of sets) as an event of its own rights, and therefore assign probability to that event.
Comment: Because groups are probably the least workable structure in some sense. You have just one "nicely behaving operation". So it turns out as a lot of the structure in a lot of the places. It's like asking whey sets appear everywhere. Mathematics, generally, is **very** intertwined, you just don't see it very well for the better part of the undergrad studies.
Comment: Awesome. That' helped me fill in the gaps. The lecturer said that infinite sample spaces are beyond our course scope. Why are they difficult to understand?
Comment: Because everything infinite is harder to grasp. Also because for infinite spaces you start having to keep track of continuity, topology (or rather Borel structure) and so on. It's not much harder if you studied calculus; but if you haven't or if the course wasn't designed for that, then it will require a lot more work. Finite sample spaces is really just combinatorics.
Comment: Also when you say above "closed under intersection...", is this similar to the idea in group theory when we say something is closed under a certain operator? But in this case the operators are $\cap, \cup,$ and complement and the operands are sets?
Comment: Yes. Closure under an operation $*$ means if $x,y$ are in the collection, then so is $x*y$ (and similarly for a single variable operation).
Comment: Why is group theory so pervasive? The last place I thought I'd see it is on a probability course. Sorry if I am going off on a tangent here, but it seems I can't study a subject without it popping up everywhere. It's my worst subject area.


In 0-based indexing system, do people call the element at index 0 the "first" or the "zeroth" element?

Question: In Java/C++, for example, do you casually say that 'a' is the first character of "abc", or the zeroth?
Do people say both and it's always going to be ambiguous, or is there an actual convention?

A quote from wikipedia on Zeroth article:

In computer science, array references also often start at 0, so computer programmers might use zeroth in situations where others might use first, and so forth.

This would seem support the hypothesis that it's always going to be ambiguous.

Thanks to Alexandros Gezerlis (see his answer below) for finding this quote, from How to Think Like a Computer Scientist: Learning with Python by Allen B. Downey, Jeffrey Elkner and Chris Meyers, chapter 7:

The first letter of "banana" is not a. Unless you are a computer scientist. For perverse reasons, computer scientists always start counting from zero. The 0th letter (zero-eth) of "banana" is b. The 1th letter (one-eth) is a, and the 2th (two-eth) letter is n.

This seems to suggest that we as computer scientists should reject the natural semantics of "first", "second", etc when dealing with 0-based indexing systems.
This quote suggests that perhaps there ARE official rulings for certain languages, so I've made this question [language-agnostic].
Answer: It is the first character or element in the array, but it is at index zero.
Answer: The term "first" has nothing to do with the absolute index of the array, but simply it's relative position as the lowest indexed element.  Turbo Pascal, for example, allows arbitrary indexes in arrays (say from 5 to 15).  The element located at array[5] would still be referred to as the first element.
Comment: Not **Turbo** Pascal, just Pascal :)
Answer: To quote from this wikipedia article:

While the term "zeroth" is not itself
  ambiguous, it creates ambiguity for
  all subsequent elements of the
  sequence when lacking context, since
  they are called "first", "second",
  etc. in conflict with the normal
  everyday meanings of those words.

So I would say "first".
Comment: Damn good point! Also, "zeroth" is awkward and sounds like a speech impediment.
Answer: Probably subjective but I call it the first element or element zero. It is the first and, Isaac Asimov's laws of robotics aside, I'm not even confident that zeroth is a real word :-)
By definition, anything preceding the first becomes the first, and pushes everything else out by one.
Comment: It is `[subjective]` until someone points to an authoritative recommendation that rules one way or the other. Then it becomes `[best-practices]`.
Answer: Definitely first, never heard zeroth until today!
Answer: I would agree with most answers here, which say first character which is at zero index, but just for the record, the following is from Allen Downey's book "Python for Software Design":

So b is the 0th letter ("zero-eth") of
  'banana', a is the 1th letter
  ("one-eth"), and n is the 2th
  ("two-eth") letter.

Thus, he removes the ambiguity by either using:
a) a number and then "th", or
b) a word and then "-eth".
Comment: +1 for the quote. Let's get more ruling one way or another from if not authoritative, at least credible sources.
Answer: The C and C++ standards say "initial element" and "first element", meaning the same thing. If I remember to be unambiguous, I say "initial", "zeroth", or "first counting from zero". But normally I say "first". That banana stuff is either a humorous exaggeration or a bit bonkers (I suspect the former - it's just a way to explain 0-indexing). I don't think I know anyone who would actually say "first" to mean "index 1 of a 0-indexed array" unless they had first said "zeroth" in the same paragraph in order to make it clear what they mean.
Comment: Do note that the quote uses "one-th" and "1th" instead of "first" and "1st". I actually like this system; anything that moves toward mathematical precision and away from natural language ambiguities/irregularities is a good thing for me.
Comment: Sure, but I don't know anybody who says "one-th" either. I think they're just presenting it hypothetically, as a characterisation of what 0-based array indexing *would* be, if it was used as a set of ordinals in speech.
Comment: @ Steve Jessop -- Regarding the question of humorous exaggeration or it being hypothetical: perhaps. On the other hand, on a different page the author uses the same notation matter-of-factly, so this suggests that he considers it to be terminology (possibly of his own invention): "The operator [n:m] returns the part of the string from the 'n-eth' character to the 'm-eth' character, including the first but excluding the last.".
Comment: OK, defining terminology makes sense too. I'm surprised they present it as "to a computer scientist, the first letter of 'banana' is 'a'", since that's *not* the terminology they're defining, and it's also not true in my experience. "one-eth", "two-eth", "1th", "2th", "3th" don't show relevant Google hits.
Comment: Agreed (a.k.a. +1), though they're not defining the first letter of banana to be a, only the 1th letter. That's why I quoted from the next edition of the book (with only one author) which does not contain the "to a computer scientist" part.
Comment: Ah yes, your later version of the quote is more business-like, not mentioning "first" at all, just defining terms.
Comment: I just realized I was wrong: the later version also contains the discussion of computer scientists and first (but in a separate paragraph): "For most people, the first letter of 'banana' is b, not a. But for computer scientists, the index is an offset from the beginning of the string, and the offset of the first letter is zero."
Answer: It depends of whether or not you are a fan of Isaac Asimov's robot series.


Best way to run Shell commands on VirtualBox Guest

Question: What's the best way to run shell commands on a MacOS guest VM? Can't seem to run it through VirtualBox's guestcontrol, only lets you launch apps, not run commands directly. Saw some people suggest SSH, but wanted to see if there's a more direct way before I start down that path. Thanks!
Comment: Can you clarify your question a bit? Are you running macOS inside a VirtualBox or running a guest VM on macOS?
Comment: I'm running a MacOS High Sierra guest on a Windows 10 host.
Answer: Finally got it working after about 8 hours of trying different things:
<code>VBoxManage guestcontrol "vmname" run /bin/sh --username usr --password pass --verbose --wait-stdout --wait-stderr -- -c "echo test"
</code>
Hope this helps someone else!
Answer: If your guest OS is macOS, try having VBoxManage guestcontrol /bin/bash -c "commandToExecute"
SSH is a perfectly fine solution as long as you have a reliable way to get the IP address and your guest VM exposes SSH, has a key setup, etc.
Comment: Hmm... when I try to run /bin/bash (VBoxManage guestcontrol "MacOS High Sierra New" /bin/bash -c "echo test" --username usr --password ps) I keep getting this error: `Syntax error: Unknown sub-command: '/bin/bash'`
If I try to include run in the command  (VBoxManage guestcontrol "MacOS High Sierra New" run "/bin/bash" "echo test" --username usr --password ps), I get this error: `No such file or directory`


Cricket DLS method

Question: In DLS method whether the target will  be fixed against balls? Or the target will be fixed for overs? when play interrupted by rain.
Whether the target will be fixed against breaking an over? OR will be fixed against full overs?
Answer: The DLS par score is calculated as so many runs off so many overs.  For example 200 runs in 29 overs.  In almost all matches using DLS there will be an official responsible for the DLS, and the umpires are solely responsible for deciding how many overs have been lost as a result of the delay.
The DLS manager then uses either the computer software or the manual tables to calculate the DLS par score based on the number of overs gone and number of wickets lost.  This is usually provided to the umpires and captains and displayed on the scoreboard.  It is convention on the scoreboard to show the DLS par score at the end of the current over assuming no wickets fall and to adjust the score as soon as a wicket does fall.
I am an umpire in the UK and my match on Saturday was reduced to 41 overs a team, and we thought we might get rain delays in the second innings so we had a DLS chart provided by the scorers from the start of the second innings.
The regulations will usually specify a minimum number of overs that constitutes a match.  These must have been bowled for a side to have won by DLS even if they have passed the par score.
Additionally it should be noted the par score is not the score to win, that is always 1 more than the par.
Answer: D/L par score is calculated based upon the number of balls that can be bowled before the end of the Match time considering the moderate rate of Overs per Hour. But the target is always given for a full quota of overs. For example 200 runs in 29 Overs. Not 200 in 29.3 overs. So target is always fixed for full overs.
Although, to enforce a result from D/L a certain number of overs have to be played. like 20 overs in 50 overs and 5 overs in T20 Cricket.

Cricket DLS method


How to tell if you have reached peak cardio

Question: I'm a 47yo male who has been stair climbing for 3 years. (Fairly sedentary life prior)
My cardio sessions go for about 45 minutes ,20 minutes of which are around the 165-175 bpm mark which is about as hard as I can go.
I do these 3 times a week
I recover from 170b to 120 in 2 mins but from 140-100 in 2 mins also
Morning hr is 55
I don't seem to make any gains if my HR is lower than this, in fact even if I take it easy I still achieve 150-160bpm.
I'm disappointed with my fitness, there are older people than me who kick my butt up the same course. I'm torn between training at a lower heart rate where I can talk (140bpm) which frankly would see me take all day to finish the course, or stick with what I'm doing and push harder.
I guess my max heart rate might be 180 my chest hurts (tightness)when I get up past 170 but I think this is just breathing. If I breath aggressively at home I get the same pain so I doubt it heart related. I want to push harder but I want to make gains and I wonder if I've reached the limit. If so how can I be sure?
Answer: Switch activity...you didn't reach a limit but your body stopped to adapt and started to accommodate to stress. This is called the biological law of accommodation.  The only way to reverse it is to switch activity for a while like going from stair climbing to swimming or biking.
This applies to all types of fitness, unless you are a complete beginner you will stagnate when you keep doing the same thing over and over again.
After 3 years you are no more a beginner so obviously you won't see any progress anymore if you keep doing the same things, you have to switch things up to overcome it and progress.
Comment: Variety is also helpful in more balanced overall strength and fitness and avoiding injuries, as well.


Restricting block changes

Question: How can you let an editor edit the text in a block, but not make other configuration changes, as moving the block from one region to another?
Comment: Perhaps change it to node. There are a bunch of modules to put node content in block. http://drupal.org/project/nodesinblock http://drupal.org/project/nodeblock http://drupal.org/project/nodeasblock
Answer: In Drupal, only the users with the permission to administer blocks can change the block settings, including which region the block is assigned.
As far as I know, there aren't modules that allow to assign to users a more granular permission. You should write your own custom module that shows only the fields that a user is allowed to edit.
For example, the following code would alter the form build from block_admin_configure(), the function that build the configuration form for any block, to permit to users with the "edit block titles" permission to edit the block title.
function mymodule_form_block_admin_configure_alter(&$form, &$form_state, $form_id) {
  if (isset($form['settings']['title'])) {
    $form['settings']['title']['#access'] = user_access('edit block titles');
  }
}

The function is the implementation of hook_form_FORM_ID_alter() made for a module named mymodule.module.
The fields for the region settings (the theme regions a block is output) are contained in $form['regions']; The field set contains a select field for each enabled them.
To show the field set only to users with the "edit block regions" permission, you can use the following code, for example.
function mymodule_form_block_admin_configure_alter(&$form, &$form_state, $form_id) {
  if (isset($form['regions'])) {
    $form['regions']['#access'] = user_access('edit block regions');
  }
}

Users with the permission to administer blocks could alter the region assigned to blocks from http://example.com/admin/structure/block. To not allow the user without the "edit block regions" permission to access that page, you should alter the access handler of that menu, and replace the default access handler with a custom one that would return FALSE when users don't have that permission.
For more information, see hook_menu and hook_menu_alter().
Answer: See the Block Access module.

This module adds a set of global permissions for creating, viewing, moving, enabling, disabling and configuring blocks as well as permissions at the individual block level.
Answer: One simple solution I would recommend is checking out the Boxes module. This module is going to provide a nice inline editing options (via AJAX) for blocks, which would make it super easy for editors to change the text in the blocks. The permissions would still need to be "administer blocks" for the editors, but since they will now be able to edit blocks inline there's really no need for them to ever get to the block configuration page.
Now if you still insist on removing access to that block configuration page you can just do a simple menu alter that changes the permission required for the block configuration page such as the following code.
function hook_menu_alter(&$items) {
  //Example Use Case, switching permission from "administer block" to "administer site configuration"
  $items['admin/structure/block']['access arguments'] = array('administer site configuration');
}

Answer: After coming back to this question after a year or so, there are two methods that are very simple.
Create a block and put the following code in the block body:
<?php
$node = node_load(77);//77 is the nid of the node I want to put in the block.
$node_content = node_view($node,"full");
print render($node_content);
?>

Or you can create a view block and filter on the node id.
Now you give someone permission to edit the content type but not permission to create or delete it.
Answer: The Bean module is a possible alternative to answer this question. Here is a quote about its project page:

Think of a Bean as a method to provide new types (compared to node this would be a content type) which then provides an add content interface to create as many blocks as you require (see screenshot below). The bean content can then be placed around the site just like any other block.

Combined with the options available for granting the appropriate Bean permissions, it should give you a lot of flexibility about how exactly you want to use this (great) module in your specific case: for each individual block created with the BEAN module, you can use the typical Permissions page (at admin/people/permissions) to grant Add/Edit/View/Delete access to selected roles.
This module also works great in combination with the UUID and UUID Features Integration modules. And after you become familiar with the Bean module, you might find other cases in your site where you also want to use this module (which somehow compensates the fact that you need to add another module).
The video tutorial Drupal Bean module tutorial - using Bean Admin UI provides a great introduction to really understand the power of this module, and the kind of things you can do with it (by only using site building techniques, no custom coding involved). It also shows how the Bean module transforms Drupal blocks into fieldable entities.
This module only started as of D7 (because of the "entities" of course that were only introduced in D7), and already has over 22K reported installs. Those who don't use it yet should definitely start looking at it in preparation of some day upgrading to D8. Because this is what is currently shown on its project page (I added the bold markup here):

This module has been included with Drupal 8 core. Refer to this issue for more information.

Restricting block changes


Who uses the term Hail the King?

Question: Looking for information on who or what time in history the phrase "Hail the King" was used, not hail to the king. When this phrase was said it was followed by what sounds like a foot stomping on the floor, almost ceremonially.
Comment: Related: [What does *Hail to the King* mean?](http://english.stackexchange.com/questions/26982/meaning-of-hail-to-the-king?rq=1)  Where did you 'hear' this phrase?
Comment: Only in the Marvel Universe, I suspect.
Comment: Hail the king with praises = rain praises upon the king = to pour praises upon the king.
Comment: @BlessedGeek: FYI, no, the "hail" in "Hail to the Chief," "Hail and Farewell," and "Hail Caesar" comes from the same root as _health_ and _wassail_; it has nothing to do with the icy precipitation. (The precipitation likely comes from the same root meaning "pebble" that gave us _calculate_ and _calculus_.)
Answer: The earliest Google Books match for "Hail the King" is from an ode marking the 75th anniversary of the birth of King George II, in The Gentleman's and London Magazine (November 1757). The chorus of the ode runs as follows:

Triumphant strike the loudest string!
Hail the HERO! Hail the KING!

In contrast, the first instance of "Hail to the King" in a Google Books search is from 1849. Still, neither expression is at all common until the middle of the nineteenth century, when "Hail to the King" enjoys an upsurge in usage (six matches from 1850 alone). The most significant instance of "Hail the king" before 1850 is an instance in Edward Bulwer Lytton, The Pilgrim of the Rhine (1834):

"Behold," cried Morven in a loud voice, "behold your king!"
"Hail, all hail the king!" shouted the people; "All hail the chosen of the Stars!"

Th record of usage that the Google Books database presents suggests that the expression "Hail the King!" was never a common English phrase in writing of any kind at least through the first half of the nineteenth century. Note that the famous lines spoken by the witches in Macbeth are somewhat different:

1 Witch. All hail, Macbeth! hail to thee, thane of Glamis!
2 Witch. All hail, Macbeth! hail to thee, thane of Cawdor!
3 Witch. All hail, Macbeth! that shalt be king hereafter.

Here, Witch 1 and Witch 2 are saying "Hail to thee, thane," not "Hail to the thane."
Comment: Yeah, I climbed through the Google/Ngram references for awhile, and all I found were biblical references plus some poems/song lyrics where "to" was omitted for poetic reasons.  No evidence that "Hail the King!" was ever a normal acclamation.  Of course, if you go back to Chaucer's time (or before) the language was quite different -- there could have been something, but it would be unintelligible to the modern ear.

Who uses the term Hail the King?


Why electrical switches are rated lower for led than incadescent lights?

Question: I bought a dimmer that supports ic, halogen, led and cfl lights.
It says 600w for incadescent and halogen and 150w for led and cfl.
Why is the difference?
What happens if I put it in a circuit with 8 led lights rated at 25w?
Comment: This question is probably best answered on http://electronics.stackexchange.com/ as it is the electronic behavior of LEDs which challenges the dimmer.
Answer: It's not a switch, for one thing. It's a dimmer - a switch, in the same circumstances, would be just fine with full rated amperage of LED or CFL. Unless you have a great deal of interest in dimming, your best option if you have 200W of LEDs on the circuit would be to use a switch.
The limit comes from the interaction of the power supply circuits internal to "dimmable" LEDs/CFLs and the dimmers that can be used with them. Overloading the dimmer will probably cost you at least a new dimmer, and depending what fails, perhaps one or more of the attached lights.
Look at the bottom of page 15:
Comment: Thanks for the reference. So They say that leds take lot more current at startup and at peaks. Hopefully I can stick with 13W bulbs.


Setting final orientation of polygons in CityGML model

Question: I am converting shapefile model of buildings in LoD2 to CityGML. In CityGML really matter about poylgon orientation(Countercloskwise can be seen from outside, Clockwise from inside). I have problem with orientation of some polygons.  Althought I've set almost every polygon to right direction, there still remain some of them to orientate. I know that in 2D it's pretty much easy task, but it changes by going to 3D (polygonZ). Is there some kind of tool, which can solve this task straight forward?
Answer: For most closed surfaces, you can work out the center (or some point that falls "inside") and use that to determine what is "outside", and what the final direction the normal should take.
For irregular solids that have surfaces within their convex hull (like an "E" shape), they need to be broken down into combination of smaller objects (like cubes) for the basic approach to work.


How to query a specific changeset build on TFS by GUI?

Question: I need to build a specific changeset on TFS, but the "Query new build" dialog let me choose only "Latest sources" or shelveset...
Running TFS 2010.
Answer: I have not tried it, but it could work.
When you queue a new build, you can go to the Parameters tab. When you expand the Advanced group, you have the Get Version property. See http://readcommit.blogspot.com/2008/06/building-specific-version-with-team.html for how you can enter the values in there.


What is the difference between this two Google Maps Geocoding API URL?

Question: i have a requirement where i just need to fetch the Latitude and Longitude by giving address here is the two different versions of Google Maps Geocoding API URL i used which outputs almost the same result.
<code>http://maps.google.com/maps/geo?output=xml&key=MyApiKey&oe=utf-8&q=Bhatkal,%2CKarnataka,%2CIndia

http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=Bhatkal,%2CKarnataka%2C,India
</code>
the first one is with API Key and the Second one without the API Key. i would like to know

a) Why do i need to use the API key
  when i could fetch the result without
  defining the key.
b) Which one is more feasible API for
  my Purpose of just fetching latitude
  and longitude..
Answer: The first URL is for v2 of the Geocoding API, the second is for v3.
v2

is now deprecated
requires an API key
has (undocumented) support for JSONP

Which one to use depends (at least in part) on what environment you're going to use it in - if you want to use it in a webpage with JavaScript, you'll have to use v2 since it has JSONP support (unless you want to add a server-side component to get around cross-domain issues). An alternative for JavaScript is the JavaScript API Geocoder service.
If you're using the API in a desktop app or on the server-side, you can use either but v3 would be recommended.
v3 also has a higher query limit (2500 requests per day) as compared to v2 (1500 requests per day)
Comment: Just a heads-up: "The V2 API will continue to work until Mar 8, 2013" - see https://developers.google.com/maps/documentation/geocoding/v2/
Answer: The first URL is of Google Maps v2 and the second of Google Maps v3 .
v2 is deprecated , but that doesn't mean you can't it use it , it only
indicates that "Google will continue fix bugs for 3 yrs if any ,but no
new features will be added . You can continue using it even after that
period ."
1)Google Maps v3 doesn't support JSONP
2)Google Maps v2 has higher geocoding limit 15000 and not (1500)
while Google Maps v3 has 2500 geocoding limit .
3) Google Maps v2 supports 4 output formats
https://code.google.com/apis/maps/documentation/geocoding/v2/index.html
4)Google Maps v3 supports only 2 formats json and kml


How can I connect 2 headset microphones to my Macbook Pro so that we can both speak AND hear sound effects from the Macbook Pro?

Question: This is for podcasting purposes. I just can't seem to figure it out. We both need to be able to speak and hear whatever noises/sound effects coming from the computer as all of it is being recorded. Any help would be greatly appreciated.
Answer: It sounds like you have three sources - two mics and the computer which is also doing the recording.
What you need is a mixer like the PreSonus 4x4 (I don't know of a 3 channel mixer).  This will give you control over the sound levels and profile of each source as well as a way to record them all on your computer.

I personally have used these in courtrooms (the 16 channel versions) to record from all microphones and audio sources.  They worked flawlessly.
The way it will work is like this:

The two mics can go into the "instrument/mic" inputs
The computer audio out can go to one of inputs
The headphones connected to the headphone port (you can use a splitter here)
Comment: Got it. Sounds good. What if we were to use USB Mic/Headset all in one. Is there something out there that will work for us?
Comment: Typically, I haven't seen a system (PC or Mac) that could use two inputs at a time.  When you choose an input, it is limited to one selection.  2 USB microphones would be two different inputs so you would be switching.  At minimum you would need software to mix the two, but I am not familiar with any.  Remember, the USB mic/headset would show up as an input/output audio device.
Answer: You should be able to plug an "iPhone-style" headset into the audio jack and then use a headset with a USB connector for the other person. Just search for "USB headset with microphone." There are quite literally thousands to choose from.
The only question that remains is will you be able to use both microphones at the same time. That may require special software. I am not sure as I have never tried this specific setup.


What is the optimal time that performance/load tests should take when building an application?

Question: So I'm on this project where we re-build our application on one of our environments on each merge to repository. I'm a Automation Tester, and have been doing functional and REST Api tests so far, no previous experience in performance/load testing.
I was asked to prepare a performance test, that checks response times on each of our endpoints. A load and throughput tests that have about 7 scenarios 5-7 requests each, same scenarios for both. With the difference that the load test should reach a fixed throughput at peak time, and the throughput test increases the number of concurrent users until application becomes unstable, both start at 10 concurrent users.
I was told by one of our senior devs that all three tests should complete in no more than 5 minutes, is this realistic and achievable?
Comment: Is your question regarding what is the acceptable performance if your application under these circumstances? Isn't it highly contextual to your project?
Answer: There are lots of unknowns in your question to give an answer and thus to define a proper experiment.
Instability point. You said you want to find maximum throughput until the application becomes unstable. How do you define instability of your application?

When error rate increases to 20%, 40%, 50%? What makes an error? HTTP 500 response? Connection drop down?
Or when response time for 99.99, 99 or 75 percentile of responses goes below certain threshold? What is your threshold?

The answer will depend on requirements of your specific application. For instance, 3 seconds for 75 percentile of your responses might be satisfactory for a batch process but not necessarily for online banking application (imagine those 25% of users waiting longer than 3 seconds to get a transaction done).
Experiment duration. You said you want to find maximum throughput until the application becomes unstable. But on the other hand that all three tests should complete in no longer than 5 minutes. What if your applications becomes unstable after 10 minutes of increased load? Or after 1 hour? We really don't know the specific of your application. Why is there requirement for completing in 5 minutes? Are you going to run those tests as a part of regression?
Throughput at peak time. You said that
"load test should reach a fixed throughput at peak time". What is a peak time? What is the expected value of fixed throughput? Do you intend to replicate situation from production for its peak times? E.g. your application is for stock transactions where peak happens twice a day: when stock session starts in the morning and when it's about to get closed at 4pm. and you want to apply same number of concurrent users that happens on production at those times?
Deployment architecture. Is deployment architecture of an application in your test environment the same as in production? For instance, you have the same number of application servers, load balancers, etc. Usually, test environments are reduced in size and complexity comparing to production and thus application may behave differently. For instance, the application may saturate faster than in production and crash in time shorter than 5 minutes.
You see, there are many variables that impact the length of your experiment: expected throughput, expected error rate, expected response time, peak time, error definition, deployment architecture. What I would do if I were in your shoes would be to start from small experiment and design it iteratively to understand your application and expectations better:

Prepare the simplest throughput scenario, with just one type of a request and slowly increase number of concurrent users until the application stops responding at all, i.e., the number of 500 HTTP responses will be 100%.
Then look at the throughput graph to see how the application behaved.
Share your findings with devs and ask them for feedback.

More reading:

Why Averages Suck and Percentiles are Great


Relay for Multiple Camera Streams

Question: Is there any open source software available for a Raspberry Pi that will read multiple camera streams on the local network and rebroadcast, keeping them as separate streams?
Comment: please ask at a Linux site since you are asking about a Linux computer
Comment: Requests for software suggestions are probably better asked on [Software Recomendations](https://softwarerecs.stackexchange.com/). You also need to include more details about what protocols you want to use.
Comment: Please revise the question: are multiple camera streams coming as one muxed data stream? The same as Digital Video Broadcast (DVB) data? So you want to demux and split into separate streams?
Answer: This will very much depend on what cameras you are using and what protocols they support and where you want to send the collection of streams.
For example I have 2 camera's that support ONVIF which means they have RTSP feeds. I can then use something like ffmpeg to restream as RTMP to NGINX which in turn converts them to HLS/DASH that can be viewed in a browser or streamed to something like a Chromecast.
The depending which video codex the cameras use will determine how hard ffmpeg needs to work and this is likely to be the limiting factor on a Raspberry Pi.
The cameras are both on my private lan and the NGINX machine is exposed to the Internet so I can check on them when away.
The following post on my blog has some more of the technical details: https://www.hardill.me.uk/wordpress/2020/05/03/streaming-camera-to-chromecast/

Relay for Multiple Camera Streams


How to display window titles in Unity Super+W mode?

Question: GNOME 3 displays window titles in the spread, it helps if we can't identify the window by it's thumbnail, such as many Terminal windows open. Any way to display window titles in the Super+W screen?
Answer: It has gotten a bit more difficult. The new procedure is:

Install compizconfig-settings-manager    and compiz-plugins    via the Sotware Center icons next to the package links or in a terminal:
sudo apt-get install compizconfig-settings-manager compiz-plugins

Open CompizConfig Settings Manager

Search for "Text" and enable the plugin

Search for "Scale", enable and open the plugin

In the Appearance Tab under Window Title select All Windows in the Dropdown
Comment: Thanks for the update, that it's getting more difficult.  It appears that another hurdle has been added.  Is there a new trick to getting this behavior to work with Ubuntu 16.04 LTS?  Both `Scale Addons` and `Text` has been enabled.  None of the Window Title Display options affect the way the titles are displayed.
Answer: Install the package compizconfig-settings-manager, activate the plugin Scale Addons, go to the Appearance tab in the Scale Addons settings, open the Window Title area and change Window title display to All windows
Comment: Is there a way to activate this in **Ubuntu 16.04**?  The menu configuration exist in CCSM, but changing the title display between  `No display`, `Hightlighted window only` and `All windows` doesn't afect the behavior.  It only shows in the `Highlighted window`.  I have also enabled both the `Scale Addons` and the `Text` as mentioned in the second answer.  I tried it on two different computers.


How does focus work on mobile phone cameras?

Question: How does focusing work on mobile phone cameras?
Aren't their optics simple enough to not have any moving parts whatsoever?
If so, how come most smartphones have an auto-focus, and with various Android releases it always wastes huge amount of time and causes huge shutter lags, plus sometimes you end up with pictures of objects at focal infinity that clearly appear out-of-focus?
Comment: Related: [How does the iPhone Auto Focus work?](http://apple.stackexchange.com/q/28740/5844)
Comment: Cool question. I had always assumed it was an electromagnetic stage like in a CD player.
Answer:
How does focusing work on mobile phone cameras?

Tiny AF motor, in the case of iPhone. Probably the same for other phones with adjustable focus cameras. I've read about the possibility of using liquid lenses and other whizzy technology, but I'm not aware of any devices on the market that use them.

Aren't their optics simple enough to not have any moving parts whatsoever?

Many phones do have cameras with such tiny apertures that they have nearly infinite depth of field, so focusing isn't necessary. But starting with the iPhone 4, iPhones and iPads have had adjustable focus. Same for other brands.

If so, how come most smartphones have an auto-focus, and with various
  Android releases it always wastes huge amount of time and causes huge
  shutter lags, plus sometimes you end up with pictures of objects at
  focal infinity that clearly appear out-of-focus?

Tradeoffs, limitations of current technology, and user error:

Tradeoffs: it'd probably be possible to design a phone with a really fast and accurate AF system and no shutter lag, but it might not be a very good phone (or game machine, surrogate for your computer, etc.)
Limitations: part of the lag in both AF and shutter may be due to the capabilities of the cameras built into these devices. The distance that the lens can move to focus must be very small -- perhaps that necessitates slower movements to find focus.
User error: there's no reason that a distant object should be in focus if you're telling the camera to focus on something close. Like any camera, you've got to learn to control the one in your phone appropriately. Many smartphones use taps on the screen to choose the area to focus on and adjust exposure for. Learn when the shutter fires -- is it when you touch the button, or when you lift your finger?
Comment: @cnst Inadequate compared to what? The cameras in the iPhone 5 cost [$18](http://www.isuppli.com/Teardowns/News/pages/iPhone5-Carries-$199-BOM-Virtual-Teardown-Reveals.aspx) (for both), I expect other top-of-the-line smartphones are similar. Even in an age of mass production there are limits to how much engineering $18 will buy :)
Comment: In non-daylight conditions, the shutter on my Galaxy Nexus fires 3 seconds after I touch the shutter button or lift the finger (how do I determine which one?).  That's usually 3 seconds after I already touch to focus, or after I've already taken a picture and haven't physically moved the phone at all prior to taking another one.  If your answer emphasises user error, and doesn't include inadequate engineering, design, testing and QA, I won't +1! :-)
Comment: @cnst I'm not at all saying that a 3 second lag is user error. Crappy implementation may well deserve to be a 4th point above, but I was trying to stick to reasons not related to the quality of any specific product. If your question is "why does my Nexus 3 work poorly?", that's something different.
Comment: @j-g-faustus, the specific problem with Galaxy Nexus is poor software engineering and lack of regression testing; the phone is supposed to have zero shutter lag according to all the docs (both the hardware and the initial 4.0 software), but OTA updates to 4.1 and 4.2 seem to have broken it, and never fixed it back (e.g. see http://android.stackexchange.com/questions/37032/is-continuous-focus-a-4-0-only-feature).
Answer: Regarding "always wastes huge amount of time", this is not unlike many compact cameras using the contrast-based AF, the focusing algorithm has to blindly try various lens positions and compare the results, because it has no other way to know what the correct focus distance could be.
Some smartphones, having specialized focusing hardware, can also use faster methods, that often give near zero shutter lag:

laser-based rangefinder in LG G3 http://www.anandtech.com/show/8062/a-closer-look-at-the-g3s-ir-laser-auto-focus-system
phase detection in iPhone 6 (dubbed "Focus Pixels") http://www.techradar.com/news/phone-and-communications/mobile-phones/iphone-6-isight-cameras-packs-new-sensor-and-features-1264772

More about auto focusing methods: How does autofocus work?
Comment: no, my Canon PowerShot SD1000 wastes no time on autofocus -- it's default focus is on infinity, and i effectively was getting the zero shutter lag on it; if i need microfocus, there's a simple setting for that -- use it only when needed, provides for much-much better results than the broken autofocus in Nexus and PowerShot 300HS that only ensures that everything is delayed by a whole lot


How do I find exchange rates for a day in the past?

Question: For tax purpose I want to calculate exchange rates for a given day in the past. I've done a look and cannot find a calculator that includes dates and is intended as and end consumer rate.
Answer: It depends on the country.
For US, the IRS publishes annual exchange rates and a list of daily/monthly sources:
https://www.irs.gov/individuals/international-taxpayers/foreign-currency-and-currency-exchange-rates
For Canada, the CRA references the daily/monthly/anunual exchange rates published by the Central Bank:
https://www.canada.ca/en/revenue-agency/services/tax/individuals/frequently-asked-questions-individuals/what-average-exchange-rates.html
For Australia, The Australian tax offices(ATO) publishes daily / monthly / annual exchange rates:
https://www.ato.gov.au/Rates/Foreign-exchange-rates/
Answer: My go-to site is O&A (oanda.com).
They have a free tool on their site that will give you historical exchange rates between almost any pair of currencies, with bid/ask/avg and high/low /avg figures by day back to 1990.
O&A Currency Converter


Sulley - Logic behind primitives

Question: Are sulley's primitives used to build a description of the protocol or to specify what kind of data we want to generate?
Let's take for instance the following primitive s_string("ok", encoding="ascii")
In the first case, it would mean, the protocol expects ascii strings, so I would expect sulley to generate ascii strings as well as non-ascii strings.
In the second case, it would mean, sulley must only generate ascii strings.
Which one is correct?
Thanks.
Answer: From the Sulley manual,  it is the
Encoding to use for string

I think that's your second case.

Sulley - Logic behind primitives