What laws are there regarding being pulled over by an unmarked cop car/undercover cop?

Question: Although this has never happened to me, I've read and heard about people driving on the road and then being signaled (in some way, usually with reds and blues) to pull over for a ticket and the car doing this isn't the usual police car for that area but instead an unmarked car.
Are you legally required to pull over for this unmarked car just like you would for a regular police car? What laws mention or describe this situation (in any state)? If it is required, how are you to know if the police car is legitimate?
Comment: @cpast, contrary to what you say, California begs to differ -- unmarked traffic cars would constitute speed traps, and are expressly illegal in California for speed-related enforcement.  http://forums.officer.com/t99296/  http://www.metnews.com/articles/2008/dyer052308.htm
Comment: The Connecticut State Police have *only* unmarked cars (their cruisers are solid gray with a lightbar). The cop has to show you a badge or be in uniform, though. Also, unmarked cars are really, really common for traffic enforcement in a lot of the country.
Comment: @cnst The dictionary begs to differ with your definition of "a lot of." I am well aware that California doesn't allow unmarked vehicles for officers whose primary duty is traffic enforcement (however, it is *absolutely* valid for an officer on other duties to use an unmarked, and that officer is *absolutely* allowed to make stops for observed violations; you must stop for an unmarked car in California. Furthermore, not all stops are for traffic violations). But other states are not California (or Michigan), and don't do it that way.
Comment: @cpast are they all gray? They used to come in a range of dark colors like nation and dark blue. I think I once saw an ice cream truck with a lightbar that had pulled someone over. Also, in my experience, they don't always have a light bar; sometimes they just have lights on the dash and inside the (tinted) rear window. In my experience the drivers of these vehicles are invariably in uniform.
Comment: @cpast http://articles.courant.com/1999-03-28/news/9903280173_1_unmarked-new-cars-troopers
Answer: In most states you are required to pull over to the side of the road and come to a stop for any vehicle displaying flashing red and/or blue lights, whether oncoming or overtaking.  If you don't you are guilty of a moving violation.1
If the vehicle with the lights then pulls in behind you the same law forbids you from moving your vehicle.  So that's the law for being pulled over by an unmarked car.
If you are concerned that you were stopped in this manner by someone not authorized to do so (police impersonators have been known to do this) you should call 911 and get the dispatcher to confirm whether the apparent emergency vehicle is legitimate.  In general, if you fear for your safety, you can stay in your car and ask to be escorted to a known police station before exposing yourself.  E.g., here's the advice of one Ohio State Highway Patrolman:

If the area where you stop looks desolate, Miller said you don't have
  to stop there. In fact, he said, "Proceed to that well lit area or a
  public building, the fire department, hospital."  [B]efore you even
  stop, if you don't feel safe, "Use your cell phone to dial 9-1-1 and
  talk to the dispatcher, let her know what's going on, give your
  location and have her guide you as to what she wants you to do."

There are some jurisdictions that restrict the use of "unmarked" cars by police.
Comment: @PatrickConheady - Good points.  The problem with a question like this is that the applicable laws are typically enacted at the state level, and sometimes even lower jurisdictions.  *Examples* could be provided from particular states, and there might be some model code that is used by *many* states.  Citations of either such statutes would be helpful answers, as would examples of discordant statutes.
Comment: This answer doesn't refer to any legal authority. The hyperlinks are to advice about personal safety, not the law. People should not accept vague references to 'the law' requiring this, that or the other.
Answer: Washington state legislature states : " It is unlawful for any public officer having charge of any vehicle owned or controlled by any county, city, town, or public body in this state other than the state of Washington and used in public business to operate the same upon the public highways of this state unless and until there shall be displayed upon such automobile or other motor vehicle in letters of contrasting color not less than one and one-quarter inches in height in a conspicuous place on the right and left sides thereof, the name of such county, city, town, or other public body, together with the name of the department or office upon the business of which the said vehicle is used. This section shall not apply to vehicles of a sheriff's office, local police department, or any vehicles used by local peace officers under public authority for special undercover or confidential investigative purposes. ".
So, under the pretext of confidential investigative purposes, you can be pulled over by unmarked police vehicle, as interpret-ability of this law is very vague.
Comment: The statute you cite says that it is "unlawful" for the officer to use that type of car. That is a different question from whether that alleged technical defect makes it legal for you to ignore the officer's request to pull over.
Comment: Can you provide citation for the law you are quoting?
Comment: @chapka: Such a law *should* be interpreted as giving ordinary citizens reason to believe that anyone who is driving a car which is not marked in required fashion is not a police officer whom they would be required to obey.  Unfortunately, from what I recall, a court in at least one state has upheld a "resisting arrest" charge in a situation where a citizen expressed doubt that the person seeking to detain him was a cop, and the cop had made no effort to demonstrate his legitimacy.
Comment: @supercat sounds reasonable. An off-duty police officer in his private car is still a police officer and when noticing a crime in progress is allowed to intervene. The mere fact that he's out of uniform and not in an official car doesn't change that fact. Him being incapable or unwilling to identify himself is of concern however.
Comment: Any judge who would punish a citizen for refusing orders from someone who doesn't provide evidence of actually being a cop should be asked whether citizens should be expected to obey any random crook who claims to be a cop.  If the answer is yes, that needs to be made public.  If no, that should contradict punishment for people who refuse orders from people who claim to be cops but show no actual evidence of it.
Answer: In most jurisdictions, it is illegal for anyone but a police officer (or other classes of first responders) to operate lights and sirens.
In other words, if the car has a light bar, or even a magnetic snap-on dome light, it is not "unmarked" in any reasonable sense of the word.
I guess the question, for me, is: what legal authority requires you to pull over when an ordinary police car pulls you over? Does that statute say, "But only if the car is a certain color?" If it doesn't, then what difference could it possibly make?
Comment: The question asks for laws; this answer does not identify any laws.
Answer: Where I live you can call 911 and ask if the officer behind you is real before pulling over. The 911 operator will notify the officer of the situation and verify for you to pull over in a safe place out of traffic.
Answer: It seems that everyone, except a few are good little brain washed Americans that are willing to give up their rights as a citizen of a free nation. Nearly everyone says that if the vehicle has even one flashing light you are required to pull over. This is not farther from the truth. In the great democratic state of NY, we have courtesy lights. Be it red, blue or green, if you're a fireman or EMT you're permitted to use said light. No law says you need to stop, slow down or pullover for that vehicle. Assuming that a volunteer fireman has a blue 4dr Chevy Malibu with a red and blue bar light on his dash. Do you pullover? Which law says you need to? What happens if today it's a fireman and tomorrow an undercover officer? Law books need to be read in such a fashion as to protect the civilian. Because after all it's the government's responsibility to protect the average person.
Comment: NY law does *not* allow red courtesy lights, actually. Red lights (other than those required by law, like brake lights) are limited to authorized emergency vehicles. Chiefs and assistant chiefs of volunteer fire departments can put red lights on vehicles they ordinarily drive, but that's because those vehicles *are* emergency vehicles.
Comment: The question asks for laws; this answer does not identify any laws. If there is no relevant law in, for example, New York, then this should be illustrated by citing the laws that do exist in relation to road use, so that the non-existence of a relevant law can be readily verified.
Comment: I'm sorry that you got a bad welcome. I would never down vote a new user. Please try another question or SE site here. New policies have been made to be more friendly for new users.
Comment: @MuzethegoodTroll. I downvote almost never. I'm in NZ. I'd consider downvoting an answer which started by actively insulting most people here AND then gave a questionable at best  to likely spurious answer.  Others have given good answers that explain the nuances and likely special circumstances well enough to confirm this answer is of low merit and approaches "not useful". || No, I'm not downvoting it.


scheduled message feature removed?

Question: I've upgraded my Galaxy Note II to Android 4.3 and if I open the menu when writing an SMS there is no scheduled message option anymore. Where is it gone?
Answer: Samsung probably felt the "non-need" of this feature, hence removing it.
You could either use apps from the play store such as "Schemes" which allows you to schedule messaging, or contact Samsung support via email requesting the re-addition of the feature (I'd go with the former because, one mail mostly doesn't make a difference against a huge OEM).

scheduled message feature removed?


Why do pollen grains tend to remain in the 2 celled stage in most angiosperms?

Question: In over 60% of angiosperms, pollen grains are shed off at 2-celled stage (Vegetative cell and a generative cell) and in the other 40% it is shed off at 3-celled stage (Vegetative cell and 2 male gametes). During the pollen pistil interaction, if the pollen grain is 2- celled, it divides to form a 3-celled stage during the growth of pollen tube in the stigma, while as the 3-celled directly goes into the ovary/ovule. I don't understand the need for the pollen grains to remain in the 2-celled stage if, ultimately, they convert into a 3-celled stage. Why don't the pollen grains remain in the 3-celled stage from the very beginning? What is the advantage of being in the 2-celled stage before pollination?
Source
Comment: This is an interesting question and I've upvoted it. It would be better if you could provide a source for your claim, so that you don't send someone (like me) on a wild goose chase. Thanks!  :)  (I like to find the answers to interesting questions, as it's fun to learn new things, but I'd like to know I'm spending time on something that's a fact.)
Comment: @anongoodnurse Thank you for the upvote. As for the source of my claim, I read that in the textbook issued to me by my school, and you can find that [here](https://ncert.nic.in/textbook.php?lebo1=1-13). It is on page 7 and 17 (to save you some time :>).
Comment: Thanks for providing a link! As you're new here, you might not have understood that the source, a link and a quote should be edited into the question. That insures that the question is self-contained. Again, though, thanks! That chapter discusses things I never knew.
Comment: Thanks for letting me know. And, you're welcome. :)
Answer: Since, the topic itself is under research i would refrain from making bold assumptions but my hypothesis (based on evolutionary benefit; extra nutrient availability in pistil) is plausible enough and helpful for understanding your topic, but before that let me explain to you some prerequisites since you would need that understanding to think beyond as well. (Your answer is in last 2 paragraphs.)

PPI: Pollen Pistil Interaction:

As the pollen lands on the stigma (which is relatively moist) pollen absorbs some of moisture and it's metabolic activity is triggered resulting in pollen tube growth (obviously there are intermediate steps like reorientation of pollen, which in itself involves many extra cellular messengers (ECM) generaly sucrose gradient or some other peptide gradients and they trigger intra cellular signals which is the area of focus in your answer).

PT : Pollen Tube:

Consider it like a Big Long Tube (not hollow but contains actin filaments/shank actin filaments and its mechanism of extension in pollen tube is like reverse-fountain cytoplasmic streaming don't be afraid of the term it's simply like that - at axis/center of tubule its convoluted into itself while extending forward at the peripheral portion thus pushing ahead into the pistil.
Pollen tube isn't like shoot hair which is often misunderstood as similar (shoot hair is continuous projection of single cell with no blocking in between, but in PT there is callous deposit to prevent back flow) for images and further explanation refer this https://www.frontiersin.org/articles/10.3389/fpls.2020.589712/full

Progamic Phase: It is the phase between pollen landing on pistil and fertilisation. That is Period of Pollen Pistil Interaction & Pollen Tube Elongation.

Does cell while moving into pollen tube derives any nutrient from pistil? In my opinion it is very unlikely and there are rarely any conclusive research papers out there to confirm or discard that entirely BUT it might be dependent on some signaling molecules for his maneuvering and metabolic activities and it is strongly established.
Now, coming to your question

Your question is like that:
Why pollen's spermatic/generative cell divides in 'progamic phase' instead of already divided beforehand during the 'gametogenesis' phase itself.
Answer could be sought in Evolutionary benefits, why to spend so much of energy and resource in dividing all pollen cells into 3 celled stage when most of them are ultimately not going to succeed thus leaving this for the progamic phase to do so.
Also, to keep pollen 'effectively' light weighted this is beneficial, since loading pollen with vegetative cell will increase its survival time under outside environment we can not compromise on that part, thus if sperm cell is divided into the parent body itself it will lead to increase in overall weight. (Read last paragraph again).
Availability of nutrient in pistil - such hypothesis is dependent on point number 4 in prerequisites list. I could not conclude it immediately but it could be turning point to the answer.


How do I evaluate $\prod_{r=1}^{\infty }\left (1-\frac{1}{\sqrt {r+1}}\right)$?

Question: I am not being able to find the specific product $\prod_{r=1}^{k} \left(1-\frac{1}{\sqrt {r+1}}\right)$ so to evaluate the given problem when $k \to \infty $.
Comment: Why not use the usual approach? Each term is less than $e^{-1/\sqrt{r+1}}$ and the corresponding series diverges.
Comment: Presumably it "diverges to 0".
Comment: @almagest Yes you are right. But how?
Comment: @StubbornAtom One at least knows that the product is less than $1$, for every term is less than $1$.
Answer: The product is $0$ (therefore by the definition of a converging infinite product your product does not really converge). For every integer $n\geq 1$ we have
\begin{equation*}
0 \,<\, \prod_{r=1}^n\left(1-\frac{1}{\sqrt{r+1}}\right)
\,\leq\, \exp\left(-\sum_{r=1}^n\frac{1}{\sqrt{r+1}}\right)~.
\end{equation*}
The series $\sum_{r=1}^\infty 1/\sqrt{r+1}$ diverges, so the partial products of your infinite product tend to $0$.
Answer: If you know that, for $0<a_n<1$, we have
$$\prod_{i=1}^{\infty} (1-a_n) = 0 \text{ if and only if } \sum_{i=1}^{\infty} a_n = \infty$$
then it suffices if you show that
$$\sum_{r=1}^\infty \frac1{\sqrt{r+1}} = +\infty.$$
For the proof of the above general fact, see
How to prove $\prod_{i=1}^{\infty} (1-a_n) = 0$ iff $\sum_{i=1}^{\infty} a_n = \infty$?
For the series which you get see, for example, Is $\sum\frac{1}{\sqrt{n+1}}$ convergent or divergent?


DNS www & non-www + is it ok to have 2 A Records

Question: I wanted to ask if its ok to have 2 A Records for www and non-www (on the same IP address) and then direct non-www to www on Apache?
Or should this be 1 A Record and use a CNAME to redirect?
Or a different preferred solution?
Answer: It is OK to point www.[mydomain].com and [mydomain].com to the same IP address, by using an A record for each of them. Replace [mydomain] with your domain name of course.
You can use CNAMEs to allow one domain name to automatically get the DNS records of another domain name, but it can be tricky, and there are some unexepected restrictions. For example, you can't use a CNAME at the root of your zone file. In practical terms, you can use a CNAME to point ftp.[mydomain].com to the same IP address as www.[mydomain].com, but you can't define [mydomain].com using a CNAME. CNAMEs can't coexist with other records with the same domain name, and there are other records you'll need to have for [mydomain].com, like NS records, and SOA record, and if you want email, an MX record -- all of which would conflict with a CNAME. My advice, avoid CNAMEs -- they are complicated, hard to get right, and of very limited use.
One nice solution is to give each of these 2 domain names the same IP address in each of the A records, and then tell the web server to redirect [mydomain].com to www.[mydomain].com using what is known as a "301 redirect". You can put this in the .htaccess file for [mydomain].com:
<code>Redirect 301 / http://www.[mydomain].com/
</code>


How i can refresh wpf form or list view on click event performed on second form while performing updates on it?

Question: I have list view on first forms if i select a row and click edit button second form open their i do updates in selected row and click ok then database get updated but i don't know how to update list view display on first form according to updated database?
Comment: hope the question is clear ...Note: I am using Wpf in C#
Comment: i am not using any framework
Comment: instead of placing those in the comments use the `edit` button at the bottom of your post, to keep it easy to read.
Answer: I will bite the bullet and give you an answer... note that this will be all I offer, no long discussion!
Your ListView will be bound to an IEnumerable of data objects. You will be passing the selected data object to the second form, so any operation done on that data object in the second form will instantly show up in the first form - because you passed an object it is by reference, both forms are looking at the same thing.
As for updating after the database save - you can save yourself some trouble and only get a fresh copy of the data object if there was a problem with the save (so what is currently in the database doesn't match the contents of the data object), or if there is more than one concurrent user of the database. If this is the case then you know the identifier of the data, just fetch a new copy then replace the data row in the IEnumerable that the ListView is bound to.
Remember: data binding is your friend. And it is easy to insert and remove from a list.


How to use "date" command parameters

Question: I have read the date command manual. There are many format controls like %a, %b, %c, and so on. After reading through the manual I did echo $(date %s) to know the absolute time. It was not correct form. echo $(date +%s) is the correct one. This might be a stupid question, but how do people know there should be the + before the %s parameter?? In the manual there is no + instruction at all. Thanks for reading.
Comment: Although this doesn't directly address what you're asking here, you should run just `date +%s`, not `echo $(date +%s)`. You don't need [command substitution](https://www.gnu.org/software/bash/manual/bash.html#Command-Substitution) when your goal is [just to see the output](https://github.com/koalaman/shellcheck/wiki/SC2005) of a command.
Comment: Possible duplicate of [how to change default date output format in date command?](https://askubuntu.com/questions/144166/how-to-change-default-date-output-format-in-date-command)
Comment: The manual says `... date [OPTION]... [+FORMAT]` In my eyes it is a + instruction.
Comment: That's right. It is my mistake cause I was doing "sudo rtcwake -m no -t $(date +%s -d 'tomorrow 08:00')". Then I need to ask the part of command that I don't understand. I was confused. I should have asked it as a complete question.
Comment: @Soren You are late.
Answer: The first few lines of man date give:
NAME
       date - print or set the system date and time

SYNOPSIS
       date [OPTION]... [+FORMAT]

Comment: [SS64 Bash man page](https://ss64.com/bash/date.html) has more comments about each command. It's not a bad idea to search there. Even I get confused from time to time with bash parameters
Comment: @Smile [SS64](https://ss64.com/) is usually *less* detailed than [manpages](http://manpages.ubuntu.com/); its goal is to give useful summaries. But it sometimes has more examples. For *more* details, you can go to the end of a manpage (Shift+G if you're reading it in a terminal) to see what provides it, and some have a SEE ALSO section too. The end of the `date` manpage shows "GNU coreutils 8.25" and its SEE ALSO section suggests running `info '(coreutils) date invocation'`. For GNU software like Coreutils you can also [read the full docs online](https://www.gnu.org/manual/manual.en.html).
Comment: @Smile you can usually go to one of the last section of man pages, showing exemples
Comment: This is embarrassing and scary. I feel like I'm gonna make this kind of mistake a lot. Is there anything else I should be aware for this kind?? Thanks.
Comment: @Redbob Is it more detailed version of ubuntu manuals??
Answer:
TL;DR: When you don't see what you're looking for in a manpage, you can try searching its contents. Normally you search by pressing /, typing your search term, and pressing Enter. Some punctuation characters are treated specially, though, including +. To search for those, you can escape each with a backslash (\+) or you can instead press Ctrl+r after /. If you press h while viewing a manpage, you get interactive help that includes information on searching.

man in Ubuntu uses less, which has powerful searching features.
You've clarified that you already had a command that ran date and included +, and you were trying to figure out how that command worked and why the + was needed.
When you're looking in a manual page for how something you've seen works, and you don't notice anything for it, you can search inside the manual page for it. Having not initially seen the +, searching would have revealed it. Although it appeared near the top, it was somewhat difficult to see because it appeared inside [ ] and next to other text. I have personally often missed things in manpages that were even more prominent than that, but found them by searching ahead with /. Usually searching a manpage is very easy, but searching for characters like + is slightly more complicated.
By default, man in Ubuntu uses less as its pager. One way to learn about less is to read its own manpage, but ironically its manpage is quite long and complicated. I recommend instead using its built-in help, which you can access by running less --help or just by pressing h anytime you're already in less (including while viewing any manpage).
To search for text in less, press /. Normally you can just type the text in that you want to find and press Enter. However, this text is actually a regular expression, so characters that have special meaning in regular expressions--like +--do not automatically stand for themselves.
One way to search in less (including in manpages) for text that contains regular expression metacharacters like + is to escape each one with a backslash before it. That is, after pressing /, you would type \+ instead of just +, and press Enter. If you needed to search for ++, then you would type \+\+.
Another way is to tell less not to interpret your search pattern as a regular expression. This works for most text, including +. (It will only fail if you type something that less interprets as telling it to do something, rather than as part of the search pattern.) To do this, after pressing /, press Ctrl+R. The / displayed at the bottom of the terminal will turn into Regex-off / and you can type in text that will be matched literally.
General Information About Searching in less
Normally you don't have to type \ or press Ctrl+r. Normally all you have to do is press / and enter your search term. It is only when your search term contains regex metacharacters that you don't want interpreted as such, that you have to do more. Note also that if you do use Ctrl+r, then \ itself will no longer have its special meaning as the character that removes special meaning from the next character. So if you use Ctrl+r then you should not also type \ unless you are actually searching for a \ character.
If you're typing in text to search for but you decide not to search after all, just press Esc.
Searches in less are case-insensitive by default. You get the first match at or below your current position when you search. To move down to another match, press n. To move up to another match, press Shift+n. If you know you want to search backward in the first place, you can use ? (which is Shift+/ in some keyboard layouts) instead of /.
All matches are highlighted by default. Sometimes this makes reading difficult, so you may want to tell less to turn off the highlighting once you've found what you need. To do that, press Esc followed immediately by u.
I recommend reading the section in less's help about searching. After you run less --help or just press h anytime less is running, you can scroll down a couple pages to the section called SEARCHING. Or you can search for it! If you type /searching and press Enter, that will bring you to it, since searching works in less's help, too. Although the title is capitalized, that search will find it, because searching in less is case-insensitive.
It is handy to be able to refer back to that section while reading a manpage. I sometimes do this, when I need to use search features I don't regularly use. If you press h while reading a manpage, you can read about the search features you need, then press q, which brings you back to the manpage. Pressing q again quits less (and thus also man), as usual.
Comment: @Smile *"I didn't recognize manpage is actually derived from less command."* Usually what people mean when they say one program is *derived* from another is that it incorporates source code from the other. That's not the case with `man` and `less`, which are quite different kinds of programs. `man` looks up and formats manpages, then *uses* a pager like `less` to show them. The reason it defaults to using `less` for that in Ubuntu is that [the alternatives system](https://wiki.debian.org/DebianAlternatives) has `/usr/bin/pager` pointing to `/etc/alternatives/pager` which points to `/bin/less`.
Comment: @Smile *"I marked some part of man page"* I'm not sure I know what you mean. `less` has a feature called marking where you can type `m` and a letter, then later type `'` and that letter to go back to the "mark." But those markings aren't related to anything I talked about here, and they don't cause text to be highlighted. The closest thing to "marking" that I described was `less`'s behavior of highlighting text that matches your search terms. (I also described using Esc, then `u`, to turn off the highlighting.) *Neither* marks nor search result highlighting will persist after you quit `less`.
Comment: Thanks, this answer is very informative. I didn't recognize manpage is actually derived from less command. Now I'm kind of proficient with less for your help. Just one thing, though, I marked some part of man page, then I turned off my system. After coming back to the manpage, the mark is not there at all. What happened??
Comment: Alright. That is pointing. Okay. I'm gonna make another question for marking. Thanks for detailed answers. :)

How to use "date" command parameters


Linux based Operating System (distribution) for python, Maxima, C programming and jupyter notebook

Question: We are fairly new to Linux. We are looking for Suitable Linux based Operating System (distribution) for python, Maxima (computer algebra system), c programming and jupyter notebook. We want to install these on 30 computer systems. Which Linux based Operating System would be useful? Is there any distribution which comes pre-installed with one or more of these? We will prefer to have some good GUI as users are not acquainted with Linux but familiar with Windows operating system. Ours is educational institute. Any help will be highly appreciated. Thanks.
Comment: they are all suitable, but you should probably look into a long term distro, so you don't have to do major OS upgrades every six months.   ubuntu LTS, rhel  (or almalinux ) would be good.  anything else will require more upkeep.   Once you dip your toes and figure out what you need, you can always switch.  Dont forget backups and configuration management!
Comment: You should install a specific distro on all computers and check the necessary commands  for installing the software you want. Once you have those commands you should make a shell script (e.g. bash) that will execute the commands used for installing your software.
Comment: For **c programming** you can use `gcc` or `clang`.  **Python** is usually installed on all Linux distros (unless you want to install a specific version that is not installed). About **Maxima** and **Jupyter Notebook** you should check what are the commands used for installing.
Comment: Maybe ask in https://softwarerecs.stackexchange.com/
Answer: Just about Linux distributions (other than the ones whose entire purpose is minimalism) typically come with Python (amongst other things) pre-installed.  Your question is one of those where if you ask ten people, you're likely to get fifteen answers because the answer is primarily based in personal preference or opinion.  Any mainstream Linux distribution is quite likely to meet your needs.


How to *actually* exclude a directory in AWS S3 sync?

Question: The aws s3 sync command has an --exclude flag which lets you exclude a folder from the sync. However, even though the files are not uploaded from that directory, the command still looks at and processes all the files in that folder. The reason I wanted to exclude that folder in the first place was because it is a very large folder containing a lot of data, with the data I actually want to sync being just a few MB in the parent folder and a few other subfolders. However, it takes several minutes to sync those few MB, because of the several GB of data in that data subfolder. Is there a way I can actually exclude (e.g. from even being looked at or processed) that subfolder so that the sync command completes in a reasonable amount of time?
Answer: I think this may be a case of mismatched expectations regarding what functionality S3 provides.
S3 does not actually have any structure, the bucket just has a flat set of objects with the full string that might be seen as the "path" being the key of each object.
The ListObjectsV2 API action however provides features like specifying a prefix (only returns objects that have a key that starts with some particular string) and the option of specifying a delimiter (splits keys by the provided delimiter and groups repeating key segments) that allow you to present the contents of a bucket as if it had structure (like what the AWS Console does, for instance).
The aws s3 sync utility presumably also starts working from the normal ListObjectsV2 API action, but this API does not have any functionality equivalent to the --exclude (or --include) options in the sync utility, only the option of getting the list filtered by key prefix.
Hence it would appear that the sync utility has to do the processing of those more flexible filtering options on the client side as it processes the full list of objects for the specified prefix, which will never really be efficient if there is a high number of objects under the specified prefix which are supposed to be skipped.
What you want to do in your scenario is probably to instead specify the prefix or prefixes that you want instead of specifying a more generic prefix and filtering what you don't want. If what you want is not identifiable by prefix, you may want to consider changing your naming so that there is some known prefix that you can specify. (Or possibly even using separate buckets for different types of data, if that makes more senes for your situation.)
Comment: I see, that does make some sense in the context of a download from S3. It makes less sense in the context of an upload though: the filesystem I am uploading from does have an actual defined structure, even if S3 is just key-value pairs. I suppose perhaps in this situation it's just a lack of optimization for this use case?
Comment: @DMJ Right, if you are specifically looking at the "upload from local filesystem to s3" case, I suppose it doesn't matter that much that the opposite case is even more problematic to optimize.  An additional concern that also applies to the local case is how `--exclude` can be a pattern written to match any part of the path, so while using a pattern that matches essentially a leading directory seems like it could be optimized for the local filesystem, the general case still requires looking recursively at all the files locally. I can imagine that they have not optimized for that special case.
Answer: While the answer by Håkan Lindqvist appears to be the technically correct answer, it unfortunately did not solve the problem. Syncing (uploading) a few MB was taking as much as 30 minutes because of a large subfolder that was being excluded anyway. Since the AWS CLI doesn't appear to natively support the functionality I needed, I turned to another tool instead: a shell script.
#!/bin/sh

for localfile in /home/path/to/source/files/*.*
do
aws s3 cp "$localfile" s3://path/to/bucket/
done

aws s3 sync /home/path/to/source/files/subfolder1 s3://path/to/bucket/subfolder1
aws s3 sync /home/path/to/source/files/subfolder2 s3://path/to/bucket/subfolder2
aws s3 sync /home/path/to/source/files/subfolder3 s3://path/to/bucket/subfolder3
# Deliberately skipping subfolder4
aws s3 sync /home/path/to/source/files/subfolder5 s3://path/to/bucket/subfolder5
aws s3 sync /home/path/to/source/files/subfolder6 s3://path/to/bucket/subfolder6
aws s3 sync /home/path/to/source/files/subfolder7 s3://path/to/bucket/subfolder7
aws s3 sync /home/path/to/source/files/subfolder8 s3://path/to/bucket/subfolder8
aws s3 sync /home/path/to/source/files/subfolder9 s3://path/to/bucket/subfolder9
aws s3 sync /home/path/to/source/files/subfolder10 s3://path/to/bucket/subfolder10

Although this approach solved the issue I was having in my particular circumstance, it is not without downsides:

The aws s3 cp command always uploads the file, even if it hasn't changed since last time
Running the aws s3 cp command in a for loop seems noticeably slower to me than the aws s3 sync command generally is under normal circumstances.
Based on Håkan Lindqvist's answer, I'm not sure this approach would do anything to help someone who was downloading rather than uploading
Not cross platform (This woulnd't work on Windows. Fortunately for me I am on Linux.)

Despite the drawbacks, in my circumstances this is more than an order of magnitude faster than using aws s3 sync with the --exclude flag, so I'm content. I do hope Amazon provides a better option in the future though.


I have been asked for names of referees during signing offer letter

Question: I have recently signed an offer letter for a faculty position.This is not a permanent position. One of the required documents in the offer letter was the names of referees. As far as I know my referees have not been asked for letter of recommendations yet. I am confused about why they asked me to sign the offer letter, whereas they have not contacted my referees in advance.
Comment: I don't think we can help you unless you tell us what exactly was in the "offer letter". It may be that they offered you a position "conditional on something", and that that something included asking for letters of reference and getting positive results.
Comment: I'm confused. It seems to say you were offered a permanent position and accepted. Why would they want any additional information if you've already been hired. Can you clarify this? In particular what is intended here by "offer letter"?
Comment: @Buffy By offer letter I meant a letter from University like a contract to be signed by me. The position is not permanent. "Why would they want any additional information if you've already been hired. " This is my question I asked, and I have explained it in my question clearly.
Comment: @Buffy in my experience it is common to spend the first day at a new job filling out paperwork.  I have even filled out a job application on the first day.  At that point it is pro forma.  There was a 0% chance that any of the referees I listed would get contacted.  Still my first day tasks included filling out these reams of forms and I completed my tasks.
Comment: While I see a question mark, I don't see a question here.
Answer: I haven't seen it before in universities, but certain corporate firms use conditional offer letters where the terms of the offer may stipulate that it is subject to referee checks, security checks, work-history checks, checks of educational credentials, medical tests, drug tests, etc.  In such cases, the terms of the offer will usually specify that you agree to assist them with conducting these checks, and if the results of the checks come back unsatisfactory (or if you fail to provide them the required information/permissions to conduct the checks), your offer of employment never materialises.  Firms do this partly as a time-saver and partly to try to "lock in" favoured candidates while they conduct pre-employment checks.
I haven't seen this from a university before, since they usually take their sweet time with academic recruitment anyway, so they usually conduct referee checks prior to offer.  Nevertheless, universities have become highly corporatised, and it is not particularly surprising to see them using this mode of offer.  You should look at the exact terms of your offer letter to see what you are obligated to do and what obligations the university has.  (Ideally, you should have had a good look at the terms prior to signing!)
The legal status of conditional employment offers is quite a complicated field.  From a purely contractual point of view, firms can make conditional offers and if you fail to meet the conditions then the stipulated outcome does not occur.  However, these contracts are also impacted by employment law and principles of estoppel.  In particular, in some situations where the final offer of employment does not materialise, the offering firm can be liable if a prospective employee relies on a conditional offer to their detriment, such as by quitting their existing job or moving to a new location for their expected position.  Here is an introductory article about the legal status of conditional employment offers, though it pertains to the legal jurisdiction in New Jersey.  Employment law differs over different jurisdictions, so if you need legal assistance understanding the implications of your offer letter, you will need to consult a lawyer in your jurisdication.
Comment: I've also been asked for references in connection with employment in industry (as a visiting researcher), at the time of the offer, even though the offer was not conditional in any way. As far as I know, none of the references were ever contacted. My guess is that HR requires references but the research unit considers them irrelevant for visiting researchers.
Answer: I have seen this before. It meant, references were a formality. Basically, the offer stands as log as your referees don't tell something horrible about you.


What do the colors indicate on this KC135 tanker boom?

Question:
What do the colors represent and indicate on the refueling boom?
Comment: That looks like such a bad Photoshop, I thought that's what the answer was going to be!
Comment: [here's the same picture](https://airrefuelingarchive.wordpress.com/2010/03/07/kc-135-boom/), caption says "The colorful marking on the boom give the receiver crew a visual indication of the extension of the boom" and that it fluoresces in UV light at night.
Comment: @tedder42 I know, I was wanting some more information.
Answer: They represent the same thing they usually represent anywhere else (at least in Western culture, I am not that familiar with others):

Green = good
Orange = warning
Red = bad

Now, the more interesting question is not what they represent, but what situation could make it turn green, orange, or red?
The part of the boom that is on the right on the photo is the part that is attached to the tanker. The part on the left is the part that attaches to the receiving aircraft.
The left part slides inside of the right part, to give the two aircraft a little bit of room to maneuver. Remember, the boom is rigid, if this telescoping were not possible, the two aircraft would have to stay in exactly the same relative position, up to the millimeter!
So, if the receiving aircraft speeds up and gets closer to the tanker, the inner pipe gets pushed further into the boom, if the receiving aircraft slows down and gets farther away from the tanker, it pulls out the inner pipe from the boom.
The green part is where you normally want the pipe and boom to be. If you get too close to the tanker and risk crashing into it, you push the pipe in further to the orange part and ultimately to the red part. Usually, once you hit the red part, you abort the refueling, and the receiving aircraft breaks off.
Likewise, if you get too far away, you risk ripping off the boom. So, again, as you get further away, you get first to the orange part and then to the red part, at which point, you abort the fueling process.
Comment: Getting too far away, you *might* rip off the boom -- it has happened -- but if the system works as designed, the receptacle on the receiver should disconnect when the extension reaches a limit short of the physical limit.  The boom itself will sense the extension, and sends a signal telling the receptacle to, in essence, "let go of me!"  Works the same, as I recall, as the boom operator commanding a disconnect (which he'd probably also do, to avoid damage to the boom).  Of course, electrons don't always go where they're wanted, so things sometimes go wrong...
Comment: "...if the receiving aircraft speeds up and gets closer to the tanker..." Note this isn't always a matter of speed, as such--the boom is at an angle, so (especially if you go through some turbulence) it can deal with up and down motion (particularly common when refueling A-10's, since you have to do so at relatively low altitude).
Comment: The boom itself flies, almost like a separate aircraft in itself, hence the built in flight-surfaces on it.  The boom operator is sometimes even referred to as a pilot, and they can move the boom relative to the tanker as needed to try and keep up with the other plane.
Answer: The colors correspond with various fore/aft # of feet that define the limits of the extension and compression capacity of the boom. There is also a correlation between the lights on the underside of the KC-135 and the markings on the boom. All are ways of determining the fore/aft position as the receiver pilot during Air-Air Refueling.
Comment: I am glad you mentioned the lights on the KC-135. I thought I remembered those from flying the B-52 WST simulator back in the 80s. I did not remember the boom colors, but perhaps it was a limitation of the sim's visual system, or I just forgot.


What is the best architecture to run Oracle sucessfully run on VMWare?

Question: Due to a data center move we are mandated to migrate all servers to virtual machines. We currently have a 3 Node Oracle RAC running on physical servers. There seems to be a great debate about the suitability of running Oracle on virtual machines especially as RAC would not be part of the new system. What is the best architecture to run Oracle successfully run on VMWare?
Comment: Do you have Oracle Support? What version of Oracle are you running and do you need the platform to be [certified](http://blogs.oracle.com/UPGRADE/entry/is_oracle_certified_to_run_on)?
Answer: You can run Oracle under VMware just fine.  The big question is what is the current hardware spec and what VMware version and edition will be hosting the database?


What is the chance of getting a reset bag?

Question: When you get a punching bag it is randomly decided what bag you will get. What is the chance that it will be a Reset Bag?
Comment: Earn a bag?  Care to be more specific?
Comment: When ever a bag is earned, but I changed it so it is easier to understand what I am asking.
Comment: I can't find any information on the percentage chance of getting one. Some people say they get one first try, and some people say they try for 2 hours and never see one.
Answer: There is currently no known rate, and the exact rate will be unknown until the people who are currently working their way through the games code find it.
Reset bags are fairly uncommon however, if you assume that there is an equal rate of obtaining a bag:
6*3 (stats bags)  + 8 special bags = 26 bag types
That's a 3.4% chance.

Source: http://bulbapedia.bulbagarden.net/wiki/Super_Training


Do I Say morning blessing twice If I fell asleep again?

Question: If I washed my hands and did the morning blessing although later I went to sleep for like a couple hours 3-4 maybe less do I have to say the morning blessing of washing hands again after I wake up?
Comment: Which morning blessing are you referring to?
Comment: This sounds like what most people call "taking a nap", yes?
Comment: @JoelK blessing of washing hands
Comment: @DoubleAA yes although do I have to say the blessing of washing hands after I wake up
Answer: Although one washes his hands each time he awakens from a substantial sleep, he only says the blessing of al netillat yadayim once.
This is certainly true if he has a nap during the day (Shulchan Aruch Orach Chaim 4:15).
What about if one arises early (before dawn) washes his hands and says the blessing, and then goes back to sleep while it is still dark? In such a case, Mishnah Berurah 4:32 rules that although he must wash again when he wakes up a second time, he does not say the blessing again.


Python Scikit-image processing of Gel electrophoresis data

Question: I never used computer vision stuff before and thought I can use python for analysis of Gel Electrophoresis. Here is a video explaining what is happening if you are not familiar with the process.
So I took a pic from wikipedia of a gel then use a grayscale filter, then a bilateral filter to get rid of smudges and artifacts, and then I used a Otsu filter to separate out the prominent bands.
import numpy as np
import matplotlib.pyplot as plt

from skimage import data, io
from skimage.filter import threshold_otsu, denoise_bilateral
from skimage.morphology import closing, square
from skimage.measure import regionprops
from skimage.color import label2rgb, rgb2gray

image = io.imread('http://upload.wikimedia.org/wikipedia/commons/6/60/Gel_electrophoresis_2.jpg')

#grayscaling
gray_image = rgb2gray(image)

# bilateral filtering
bilat=denoise_bilateral(gray_image, sigma_range=0.05, sigma_spatial=20)

# apply threshold Otsu
thresh = threshold_otsu(bilat)
bw = closing(bilat > thresh, square(1))

#print process
def show_images(images,titles=None):
    """Display a list of images"""
    n_ims = len(images)
    if titles is None: titles = ['(%d)' % i for i in range(1,n_ims + 1)]
    fig = plt.figure()
    n = 1
    for image,title in zip(images,titles):
        a = fig.add_subplot(1,n_ims,n)
        if image.ndim == 2:
            plt.gray()
        plt.imshow(image)
        a.set_title(title)
        n += 1
    fig.set_size_inches(np.array(fig.get_size_inches()) * n_ims)
    plt.show()

#print data
show_images(images=[image, bilat, bw], titles=['Normal', 'Bilateral filter', 'Otsu Threshold'])

Here is what the results currently look like

I have 4 problems I got stuck on:

Using the otsu threshold causes some data loss from light color bands is there better way get the band data?
Is there a way to return the results from each row to a numpy/pandas array where the bands are displayed on a matrix? (ie 0 for no bands, 1 for light band, 2 for medium band, 3 for heavy band) This will allow detecting bands that are matching with the DNA Ladder(reference row).
What method can be used to calculate the distance from the wells to the bands.
If the picture is not taken straight would I need something called Image registration? If so where do I find it in scikit-image?

Last thing I am using python 3 and the last stable version of scikit-image if it matters.
Answer: Perhaps get in touch with the authors of https://github.com/hugadams/pyparty, which is built on top of scikit-image.

You may want to first equalize the image (see the "exposure" submodule)
You'll first have to do some kind of peak detection (see the "feature" submodule)
I'm not quite sure what you are asking here
Rather image warping (see the "transform" submodule)


Vinyl siding replacement and existing light fixtures

Question: I am thinking of getting the vinyl siding replaced for my house.  Currently there are three electric light fixtures and two outdoor power receptacles attached to the siding.  Is it the responsibility of the vinyl siding installer to take care of removing the fixtures and reattach them after the new siding installation, or I have to hire my own electrician?
Comment: This is borderline off-topic, as it's a matter of your contract with the builder. But maybe someone can speak to the typical practice here. However, this seems like a question you should definitely ask the siding installers - they'll have a preferred way to handle this very common situation. My guess is they have an electrical sub they use if needed, but in many cases can either work around or move fixtures themselves. In any case, you'll want to have explicit agreement on this topic with any installer before they start the work, so you might as well ask.
Comment: @ShimonRura Yes, my question was more about typical practice only.  With this information, now I am better prepared to negotiate.
Answer: Normally the contractor removes the fixtures and outlets. In most states you do not have to be a licensed electrician to remove replace existing fixtures and outlets, (I believe there are a couple that may require it from reading different forums). You do want the siding company to mount the fixtures or they may end up looking bad. The siding company has the trim and experiance where an electrician may have no experiance with the siding type.


splashdown time Dragon vs Soyuz

Question: Why did it take 3 days for dragon since detach from ISS till splashdown - while Soyuz would take 3 hours ?
Comment: Citation needed. A recent SpaceX Dragon departed ISS at 5:05 p.m. EST on 21 Dec 2023 and splashed down 19.42 hours later at 12:30 p.m. EST on Dec 22 2023.
Comment: The private Dragons might just want more floaty time.
Comment: @DavidHammen Axiom's AX-3 undocked Feb 7th at 9:20am EST and splashed down today (Feb 9th) at 8:30am EST.  Which is just over 47 hours, not three days, but I'm sure AX-3 is what they're talking about.
Comment: (For what it's worth, AX-2 back in May was right at 12 hours between undocking and reentry, and AX-1 was around 16 hours, so spending a day or two on orbit after leaving the station doesn't seem to be a *standard* part of the Axiom flight plan, unless it's a new thing they're trying out.)
Comment: I remember a Shuttle astronaut saying the nice thing about the two day trip to ISS was that it was a relatively quiet time compared to the very busy schedule once they arrive at ISS. And it gave them some time to adapt to weightlessness, since a pretty high percentage of astronauts experience varying degrees of space sickness for the first day or two. I remember Anousheh Ansari really appreciated having two days in Soyuz in 2007 as she had a severe case of space sickness and was practically immobilized for the entire two days, but started feeling much better just prior to docking with ISS.
Answer: Axiom's Ax-3 had a notably long post-undocking orbit time and no clear explanation has been given for why that would be. It was actually just under two days, not three -- undocking was February 7th at 9:20am EST, and splashdown was February 9th at about 8:30 EST, which is just short of 47 hours. It's possible the paying passengers simply wanted to have a little more time in the capsule and Axiom was willing, but if I had to make a bet, I would put my money on weather concerns. Ax-3's departure from the ISS was already delayed several days due to storms in the landing zone, so possibly there were ocean conditions they considered less than ideal and waiting an extra day gave it time to clear up entirely. Ax-1 and Ax-2 both took close to 12 hours to return, which is in line with other Crew Dragon missions.
Ax-3's unusual behavior aside, you are correct that Soyuz has a notably shorter undocked time on orbit than Dragon does. Soyuz makes the trip up and back down in about three hours each way, while Dragon routinely takes 12 hours or longer for both the pre-docking and post-undocking portion of the flight. Why is that?
We don't know all the details, but there are a few things we know, and a few things we can guess.
As a general thing, the fast intercept and return requires more trust in the capsule, and NASA is notably risk-averse. If you plan a three hour trip, you have to be pretty sure there won't be any problems. A more leisurely mission plan means a lot more time to make corrections, fix any issues that show up, and a generally slower pace to operations. Soyuz is an older technology with a huge number of flight hours, while Crew Dragon is still relatively new. So that's point number 1: Dragon may not yet be considered ready for the high-stress fast intercept and fast return tracks.
But second, Dragon is a more comfortable ride. Crew Dragon has a huge interior space compared to Soyuz. It's the difference between putting four people and all their stuff in an SUV, and cramming three large people with all their luggage into a Volkswagen Beetle. The crew in a Soyuz can barely move in the descent capsule, so staying in orbit for many hours or even days is just not feasible. I'm sure 48 hours in a Dragon is still pushing the bounds of comfort, but it's much more doable. (Technically, there can be more space provided by the Soyuz orbital module, but that's usually full of cargo on the way up, so there's not really anywhere to go that's less cramped than the descent module. I'm not sure if it's less cramped during descent or if they pack the orbital module with garbage so it can burn up on reentry.)
Third, a longer orbit time makes scheduling easier. The quick path requires a fairly narrow phase angle between the launch or landing site and the ISS, so your timing is critical (I believe it's a five-minute launch window that comes around every few days). That is to say, to get down from orbit in three hours, you have to release from the station at exactly the right time, with little margin for error. If you plan a twelve hour travel time, then there's more flexibility to launch or undock whenever it's most convenient for the people involved.
So putting that all together, a slower path might show less trust in the technology, but if it isn't a major imposition on the humans involved, it also makes for a more relaxed trip with a lighter workload on the crew, as they have more hours to spread out the tasks the need to do, and more flexible time windows.
Comment: "The quick path requires a fairly narrow phase angle between the launch or landing site and the ISS, so your timing is critical." – I read somewhere that the ISS actually has to actively maneuver to enable the short rendezvous. So, not only do you have a very narrow timing window, you are also using up propellant. Really, Soyuz does it because it needs to. The capsule is so cramped, you just can't do a two-day rendezvous. OTOH, Inspiration 4 was a 3-day mission and Polaris Dawn will probably be even longer, and in the on-orbit livestreams, they seemed to have plenty of room to move around.
Comment: @JörgWMittag Yes and no. The ISS does have to maneuver to adjust its arrival time over the launch site to be at the right time, but it's not a waste of fuel. It's generally done by doing a reboost a little earlier or a little later than usual -- the ISS has to reboost every month or so anyway, so varying that by a few days doesn't really represent spending fuel they weren't going to spend anyway.
Comment: Actually the first decade of Soyuz launches to ISS took took two days (as did launches to Mir). The first fast track launch was Soyuz TMA-08M in 2013 (with Chris Cassidy on board).  It docked to ISS in four orbits in just under six hours.  They had previously tested out the fast track method with Progress. They later refined it to the current three hours.  AFAIK they did not stuff the orbital module with cargo back in those days so it wasn't that bad to hang out for a couple of days, typically one in the descent module and two in the orbital module.

splashdown time Dragon vs Soyuz


What going to happen to Dulche De Leche during baking?

Question: Dulche De Leche is condensed milk that boiled already. But what if put it in something that going to be boiled or baked. How it's going to be, how it's going to taste like? Do people do it?
Answer: It will taste like dulce de leche.  It's already caramelized, so it's not going to change in most recipes.  If you cook it on high heat for long enough in a baking recipe, it will become a darker caramel, but that's it.
It will become more liquid at high heat, so you want to make sure you cook it "contained", like in an empanada or pie crust.  Otherwise it might drip onto the floor of the oven and burn.
Comment: I think the not changing is more because of the amount of heat, not because it's already caramelized. If you put condensed milk in a pie and bake it, there's not going to be enough heat over time to caramelize it. (On the other hand, if you did actually manage to subject it to enough heat that it'd have turned condensed milk to dulce de leche, you might actually burn the caramel.)
Comment: I believe every flan recipe I've seen has caramelized sugar syrup. In any case, the reason dulce de leche ends up caramelized is that it's basically held at boiling temperature for something like 1-3 hours. That's way longer at that temperature than basically anything baked.
Comment: I haven't looked into how much baking heat would be required to turn condensed milk into caramel in a baked dish.  It should be possible; flan depends on caramelizing the sugar on the bottom of the mold.
Comment: You don't like your biscotti in carbon black?
Comment: don't forget about adding water when making dulce de leche, especially if you have a popcorn ceiling. don't ask.


Generate breadcrumb based on a given Path

Question: How can I know the breadcrumb that will be generated in a page without visiting that page? Is this possible?
Comment: This similar question may help you on your quest: http://drupal.stackexchange.com/questions/11325/get-drupal-breadcrumb-by-providing-nid
Answer: It really depends on what module/configuration you are using to generate the breadcrumb, sometimes some basic configuration is set in the base theme you are using as well, you might wanna check that out in your page.tpl.php file. basically your question is so vague it's hard to answer.
but mostly in most of themes the breadcrumb is being generated like this:
Home > Node title

Home > Taxonomy Term > Node title

Answer: Not a direct answer, but if you want full control over your breadcrumbs (so that you can predict what the breadcrumb will be at a given path), take a look at Crumbs (https://www.drupal.org/project/crumbs) or Path Breadcrumbs (https://www.drupal.org/project/path_breadcrumbs)
Both modules will allow you to define rules/criteria that are used to construct the breadcrumbs you want on your site.
Comment: In addition, with Crumbs you can go to admin/structure/crumbs/debug, and see the breadcrumb generated with a path of your choice.


What is a "delegate" in Objective C's iPhone development?

Question: What is a "delegate" in Objective C's iPhone development?
Comment: This appears to be a duplicate of http://stackoverflow.com/questions/1349706/little-confused-on-delegates-in-objective-c and possibly http://stackoverflow.com/questions/1788032/what-is-delegate-and-delegate-methods
Comment: See also: http://stackoverflow.com/questions/645449/how-to-use-custom-delegates-in-objective-c , http://stackoverflow.com/questions/626898/how-do-i-create-delegates-in-objective-c , http://stackoverflow.com/questions/1015608/how-to-perform-callbacks-in-objective-c , and http://stackoverflow.com/questions/1408774/can-someone-explain-what-a-delegate-is-with-an-example
Answer: A delegate is a pointer to an object with a set of methods the delegate-holder knows how to call.  In other words, it's a mechanism to enable specific callbacks from a later-created object.
A good example is UIAlertView.  You create a UIAlertView object to show a short message box to users, possibly giving them a choice with two buttons like "OK" and "Cancel".  The UIAlertView needs a way to call you back, but it has no information of which object to call back and what method to call.
To solve this problem, you can send your self pointer to UIAlertView as a delegate object, and in exchange you agree (by declaring the UIAlertViewDelegate in your object's header file) to implement some methods that UIAlertView can call, such as alertView:clickedButtonAtIndex:.
Check out this post for a quick high-level intro to the delegate design pattern and other callback techniques.
References:

UIAlertView class reference
UIAlertViewDelegate class reference
Apple's guide to Delegates and Data sources
Answer: See this discussion
A delegate allows one object to send messages to another object when an event happens. For example, if you're downloading data from a web site asynchronously using the NSURLConnection class. NSURLConnection has three common delegates:
 - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
 - (void)connectionDidFinishLoading:(NSURLConnection *)connection
 - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response

One or more of these delegates will get called when NSURLConnection encounters a failure, finishes successfully, or received a response from the web site, respectively.
Comment: Is this kind of like a Listener in Android?
Comment: @JordanHochstetler looks like the delegate is EXACTLY the listener
Answer: Delegates are a design pattern; there is no special syntax or language support.
A delegate is just an object that another object sends messages to when certain things happen, so that the delegate can handle app-specific details the original object wasn't designed for. It's a way of customizing behavior without subclassing.
Comment: So essentially it's the OOP-way of implementing a callback?
Comment: @DanielSloof I was thinking the same...
Answer: I think this Wikipedia article describes it best: http://en.wikipedia.org/wiki/Delegation_pattern
It is "just" an implementation of a design pattern and very common in Objective-C
Answer: Please! check below simple step by step tutorial to understand how Delegates works in iOS.

Delegate in iOS

I have created two ViewControllers (for sending data from one to another)

FirstViewController implement delegate (which provides data).
SecondViewController declare the delegate (which will receive data).

Here is the sample code may help you.
AppDelegate.h

#import <UIKit/UIKit.h>

@class FirstViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) FirstViewController *firstViewController;

@end

AppDelegate.m

#import "AppDelegate.h"
#import "FirstViewController.h"

@implementation AppDelegate

@synthesize firstViewController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.

    //create instance of FirstViewController
    firstViewController = [[FirstViewController alloc] init];

    //create UINavigationController instance using firstViewController
    UINavigationController *firstView = [[UINavigationController alloc] initWithRootViewController:firstViewController];

    //added navigation controller to window as a rootViewController
    self.window.rootViewController = firstView;

    [self.window makeKeyAndVisible];
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end

FirstViewController.h

#import <UIKit/UIKit.h>
#import "SecondViewController.h"

@interface FirstViewController : UIViewController<MyDelegate>

@property (nonatomic, retain) NSString *mesasgeData;

@property (weak, nonatomic) IBOutlet UITextField *textField;
@property (weak, nonatomic) IBOutlet UIButton *nextButton;

- (IBAction)buttonPressed:(id)sender;

@property (nonatomic, strong) SecondViewController *secondViewController;

@end

FirstViewController.m

#import "FirstViewController.h"

@interface FirstViewController ()
@end

@implementation FirstViewController

@synthesize mesasgeData;
@synthesize textField;
@synthesize secondViewController;

#pragma mark - View Controller's Life Cycle methods

- (void)viewDidLoad
{
    [super viewDidLoad];

}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];

}

#pragma mark - Button Click event handling method

- (IBAction)buttonPressed:(id)sender {

    //get the input data from text feild and store into string
    mesasgeData = textField.text;

    //go keypad back when button clicked from textfield
    [textField resignFirstResponder];

    //crating instance of second view controller
    secondViewController = [[SecondViewController alloc]init];

    //it says SecondViewController is implementing MyDelegate
    secondViewController.myDelegate = self;

    //loading new view via navigation controller
    [self.navigationController pushViewController:secondViewController animated:YES];
}

#pragma mark - MyDelegate's method implementation

-(NSString *) getMessageString{
    return mesasgeData;
}

@end

SecondViewController.h

//declare our own delegate
@protocol MyDelegate <NSObject>

-(NSString *) getMessageString;

@end

#import <UIKit/UIKit.h>

@interface SecondViewController : UIViewController

@property (weak, nonatomic) IBOutlet UILabel *messageLabel;

@property (nonatomic, retain) id <MyDelegate> myDelegate;

@end

SecondViewController.m

#import "SecondViewController.h"

@interface SecondViewController ()
@end

@implementation SecondViewController

@synthesize messageLabel;
@synthesize myDelegate;

- (void)viewDidLoad
{
    [super viewDidLoad];
    messageLabel.text = [myDelegate getMessageString];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

@end

Comment: Hello RDC,  this code is not working, can you please have a try at your end.
Answer: I think all these answers make a lot of sense once you understand delegates. Personally I came from the land of C/C++ and before that procedural languages like Fortran etc so here is my 2 min take on finding similar analogues in C++ paradigm.
If I were to explain delegates to a C++/Java programmer I would say
What are delegates ? These are static pointers to classes within another class. Once you assign a pointer, you can call functions/methods in that class. Hence some functions of your class are "delegated" (In C++ world - pointer to by a class object pointer) to another class.
What are protocols ? Conceptually it serves as similar purpose as to the header file of the class you are assigning as a delegate class. A protocol is a explicit way of defining what methods needs to be implemented in the class who's pointer was set as a delegate within a class.
How can I do something similar in C++? If you tried to do this in C++, you would by defining pointers to classes (objects) in the class definition and then wiring them up to other classes that will provide additional functions as delegates to your base class. But this wiring needs to be maitained within the code and will be clumsy and error prone. Objective C just assumes that programmers are not best at maintaining this decipline and provides compiler restrictions to enforce a clean implementation.
Answer: I try to elaborate it through simple program
Two Classes
Student.h
#import <Foundation/Foundation.h>

@interface Student : NSObject
@property (weak) id  delegate;
- (void) studentInfo;
@end

Student.m
#import "Student.h"
@implementation Student
- (void) studentInfo
{
    NSString *teacherName;
    if ([self.delegate respondsToSelector:@selector(teacherName)]) {
        teacherName = [self.delegate performSelector:@selector(teacherName)];
    }
    NSLog(@"\n Student name is XYZ\n Teacher name is %@",teacherName);
}
@end

Teacher.h
#import <Foundation/Foundation.h>
#import "Student.h>

@interface Teacher: NSObject
@property (strong,nonatomic) Student *student;
- (NSString *) teacherName;
- (id) initWithStudent:(Student *)student;
@end

Teacher.m
#import "Teacher.h"

@implementation Teacher

- (NSString *) teacherName
{
    return @"ABC";
}
- (id) initWithStudent:(Student *)student
{
    self = [ super init];
    if (self) {
        self.student = student;
        self.student.delegate = self;
    }
    return self;
}
@end

main.m
#import <Foundation/Foundation.h>
#import "Teacher.h"
int main ( int argc, const char* argv[])
{
    @autoreleasepool {

        Student *student = [[Student alloc] init];
        Teacher *teacher = [[Teacher alloc] initWithStudent:student];

        [student studentInfo];

    }
    return 0;
}

EXPLANATION :::

From main method when initWithStudent:student will execute
1.1 Teacher's object's property 'student' will be assigned with student object.
1.2  self.student.delegate = self
    means student object's delegate will points to teacher object

From main method when [student studentInfo] will be called
2.1  [self.delegate respondToSelector:@selector(teacherName)]
         Here delegate already points to teacher object so it can invoke
         'teacherName' instance method.
2.2  so [self.delegate performSelector:@selector(teacherName)]
         will execute easily.

It looks like Teacher object assign delegate to student object to call it's own method.
It is a relative idea, where we see that student object called 'teacherName' method but it is basically done by teacher object itself.
Answer: The delegate fires the automatic events in Objects C. If you set the delegate to Object, it sends the message to another object through the delegate methods.
It's a way to modify the behavior of a class without requiring subclassing.
Each Objects having the delegate methods.These delegate methods fires, when the particular Objects take part in user interaction and Program flow cycle.
Simply stated: delegation is a way of allowing objects to interact with each other without creating strong interdependencies between them.
Answer: A delegate captures the taping actions of an user and performs particular Action according to the user Taping Action.
Answer: Delegate is nothing but instance of Object which we can call methods behalf of that Objects. and also helps to create methods in rumtime of that Objects.


Hand of the Mage with +2 Wisdom

Question: Ok,
I haven't been in touch with magic item creation in  a while.
So what would a hand of the mage further enchanted with +2 Wisdom cost?
Assuming I have an enchanter capable and willing to do the enchanting(he is an npc).
From what I remember it would have been 900 for the base item and 6000 (1.5 * 4000) with Dungeon Masters Guide - Rules, but I am not sure wether the Magic Item Compendium changed that.

Hand of the Mage can be found here for reference
Answer: Magic Item Compendium eliminated the cost-penalty associated with combining items for the following types of effects:

Deflection bonus to AC
Armor bonus to AC
Enhancement bonus to natural armor bonus to AC
Enhancement bonuses to ability scores
Resistance bonuses to saving throws
Resistance to energy

With that being the case, your +2 Wisdom hand of the mage would cost simply 900 gp for hand of the mage plus 4,000 gp for the periapt of wisdom +2, so 4,900 gp. Under the original rules, you would multiply the cheaper portion of the item (the hand of the mage) by 1½, so you' have 4,000 + 1½×900 = 5,350 gp.
Comment: does that mean, that I could add a deflection bonus to that hand of the mage in addition to the wisdom without paying any additional costs besides the base cost for the deflection bonus?
Comment: @Andy Yes, it does. The cost for doing so is in *Magic Item Compendium* but it's in line with what you see for items that do that in the DMG.

Hand of the Mage with +2 Wisdom


MySQL – BLObs Hitting Performance

Question: One of my tables contains seven BLObs. Six of these refer to raw data and are typically 1.0 – 1.5Mb each. The seventh is the result of processing this data and can be nearly equal in size to the sum of the other BLObs but may be significant less if some of the data has been rejected for various reasons. The raw data was originally kept in a directory structure but there were some issues with logical naming of directories and also with someone changing some directory names. Therefore keeping all the data in the database would appear the correct way to do it. The raw data is needed in case a different algorithm is developed and it needs to be reprocessed. The problem is that as information is added the performance is degrading. If a copy is put on another server and the six raw data BLObs are deleted performance improves significantly. Research on the web suggests that the raw data is read even if it is not used in the query. Creating two tables, one for the raw data and the other for the result of processing, seems to be a solution but this would mean repeating some of the meta data which seems bad design. Is there a better way of tacking this?
Comment: You would only "repeat" the primary key of your current table to ensure 1:1 association which should make much less than 1% of that table size. The BLOB data does not have to be read afaik, but it still has to be skipped. Do you use SSH or rotational HDD?
Comment: @jkavalik Current generation uses HDD. Next generation will be very different as we will be going to the cloud but that is 1 - 2 years off. Much against my instincts I have now split the table and started to amend all relevant code.
Answer: Do not use ENGINE=MyISAM, that will lead to blobs being costly for any operation on the table.  Instead, use InnoDB.
"Vertical partitioning" is generally not needed, because of the way InnoDB effectively does it for you....
With InnoDB, there are 4 ROW_FORMATs; let's try to pick the optimal one.  In all cases, some, or all, of each blob is stored away from the row itself.  More in a minute.
But first, let's check the queries.  Do not use SELECT *; always specify only the necessary columns.  This avoids reaching into other blocks to get the blobs.
The ROW_FORMATs are redundant, compact, dynamic, and compressed.  For your case, I recommend either DYNAMIC or COMPRESSED.  These store none of the blob in the record itself; instead they have a 20-byte pointer to where the blob is stored.  Only if you need to touch the blob does it run off to that location.
COMPRESSED is the same as DYNAMIC, except for a complicated block-level compression technique.  Most benchmarks I see say you get about 2x compression.  This is not as good as you might get by compressing the blobs in the client.  For example, most 'text' compresses 3x.  But most image formats are already compressed, so compression is a waste.
So, I leave it to you to decide between dynamic and compressed.  If in doubt, test with your data and your queries.
You should have innodb_file_per_table=1 when you CREATE the table.  You may need BARRACUDA and you do need at least version 5.6; 5.7 would be better.
Two tables, one for raw, one for combined?  Maybe.  Given the benefits described above, there may not be any benefit in having two table.  However, if there is a lot of activity in one column, it might be better to move it to a separate table (plus 1:1 id, etc).  (This is especially important for things like "like/unlike" counters.)
Since you are working with bulky things, be careful that you do not have long-running transactions.  Such can lead to timeouts, etc.  Still, use BEGIN...COMMIT where appropriate.

MySQL – BLObs Hitting Performance


Trying to determine if 2 DuroMax 12,500 watt dual fuel generators

Question: Trying to determine if 2 each DuroMax XP12000EH 12000 Watt generators can connect through a single "A510C Pro/Tran2 50-Amp 10-Circuit 2 Manual Transfer Switch". My home total current is 16,750 watts with stove and water heater and a spa is operating including ceiling fans, lights, Televisions, Internet equipment etc...I understand the issue of synchronization but that is not necessary with two gen's running on separate circuits as long as the grounds are separated and no feed back can occure, I am making this assumption based on theory not a fact I have ever done.
Comment: Unless living off grid, you can probably turn off the spa(except for medical reasons) and the water heater(will keep hot for hours). Unless making a turkey dinner, the stove probably will not need full power either. Generators should only be for essential power.  50 amp switch can only handle one of those generators at a time at max power.
Comment: **No**. But rethink this. You don't need to provide full power to everything when the utility power is out, unless you are living off-grid. (But if that were the case, you wouldn't be talking about a transfer switch.) 12,000 W is actually a lot of power. Most likely if you skip the spa and water heater and stove you will use a **lot** less. And very likely if you manage things carefully you can get any *one* of those 3 running at a time while still powering lights, fans, TV, internet, etc.
Comment: Why do you want to run *everything* in your house when the power's out?
Comment: And if you put in a generator interlock on your main panel then you will have the option to power any devices you want during an outage - as long as you stay within the generator capacity. As opposed to a 10-circuit transfer switch which limits you to 10 pre-selected circuits.
Answer:
Most generators cannot be connected in parallel because of synchronization issues, as you mention.
Connecting them to separate circuits would work, unless the circuits are effectively in series. In North America, most domestic electric service is 120 VAC split phase. That means that some appliances, such as stoves and dryers, use three wires: 120 VAC φ1, neutral and l20 VAC φ2 180° out of phase with φ1, so there is 240 VAC between φ1 and φ2. A 240 VAC appliance would place the two generators in series. Since the generators are not synchronized, there would not be 240 VAC across the two, and one generator could try to drive the other... a bad situation.

So, you might use two generators, but only if the circuits are completely separate, not connected to a 240 VAC appliance.
Answer: Not going to work. Don't waste your money on the transfer switch - they're costly and not very good, and actually create hazard in some situations.
It is impossible to make 2 generators feed equipment powered out of the same load center / panel.  It is not going to happen.
Since you're willing to install extra equipment and do a bunch of wiring, go ahead and install two subpanels.   In each subpanel, install a sliding plate interlock - the easiest way is to use Siemens 12-space or larger panels and the Siemens ECSBPK01 interlock.
Now permanently move any circuits you want on generator to one of the two subpanels, spreading them out by their power requirements.   I recommend putting all your most critical loads into one panel and all the "second tier, would be nice" in the other.
Each panel gets fed by a different generator.
The kit  I just listed is far cheaper than the transfer switch, and will work and be code legal.
I recommend adding some EMT conduit between the old panel and the new subpanels, so you can leave the Romex cables going into the original panel they are wired into, and simply extend the hot and neutral using THHN wires into the new panel.
Answer: Not meaning to be mean, but the comments contribute to a total hack job unless  you have 2 200 amp panels one for each generator. Still, you'd have 2 generators to start and connect and maintain.
I'd step it up a notch and, as they said in the movie Jaws, "we're gonna need a bigger boat".  By that I mean, just get one larger generator that can supply your needs.  I just installed at 15KW Kohler generator (propane powered) at my son's new house and it's awesome.
Connect it to the main panel with the appropriate plate lockout between the gen breaker and the main breaker.  If you wanted to step it up another notch, get the Kohler  200 amp auto xfer switch...it automatically starts the generator and transfers power during outages from utility to generator.     If you go that route, there may need to be some re-wiring in the main panel to isolate the neutrals from the grounds for it to be code legal since it's now technically a sub-panel.. I'd like to make a product recommendation, but that's OT here, still they are easy to find with a search.


Number of folds to form a cube, using a square paper?

Question: Take a square paper of size $ S \times S $ units and thickness 1 unit.
How many half folds should we do to form a cube out of it?
Consider infinitely foldable paper.
Comment: Full cube, or hollow cube?
Comment: Fun question! Brought me to try folding an origami cube :D ... (there are various manuals online of someone)
Comment: Actually it was a diamond window, hollow cube. I should have counted the number of foldings though..
Answer:
 Firstly there must be an even number of folds for the folded paper to remain square

 Consider the volume of the paper which is $S \times S \times 1 = S^2$

 Therefore the resultant cube side is $\sqrt[3]{S^2}$

 After $N$ pairs of folds the side length is $S / (2^N)$

 So $S / (2^N) = \sqrt[3]{S^2}$

 So $S = 2^{3N}$

 So $N = \log S / (3 \times \log 2) $
 Or $N = \log S / \log 8 $

 Now suppose $ S = 512$ thickness $T = 1$
 The computation gives $ N = 3 $ pairs of folds

 Worked example:
 After 1st pair of folds $S = 256$ with $T = 4$
 After 2nd pair of folds $S = 128$ with $T = 16$
 After 3rd pair of folds $S = 64$ with $T = 64$ which is a cube

 The question asks how many half folds?
 Answer:
 Half folds = $ 2 \times \log S / \log 8 $

 Obviously the paper can only be folded thus if $N$ is an integer
Answer: Consider what happens by doing $2$ folds, one in each direction.

 You now have a square that is half the size, but $4$ times the thickness.

So after $2k$ folds

 the square has edge length $S/2^k$ and thickness $4^k$.

For this to be a cube we need:

 $$\frac{S}{2^k} = 4^k\\ S=8^k \\ k = \log_8{S} = \frac{\log S}{\log 8}$$

So the number of folds we need is

 $$2k = \frac{2\log S}{\log 8}$$
 It will only be a cube if this result is an even whole number, i.e. if S is a power of $8$.

In reality, this will only work if you cut the paper in half and stack the pieces, instead of folding the paper. I have ignored the amount of paper connecting the different layers of the folded cube, which is quite substantial, and the round folded edges also keep it from being in the shape of a cube.
Answer: I think it should be...

 $N = 2 \log_2{\sqrt[\leftroot{-2}\uproot{2}3]{S}}$, where $N$ is the number of folds.
 As a caveat, $S$ can only be $2^{3x}$, where $x \in \mathbb{N}$.

 For example:
$S=4096$ ($=2^{12})$
$\sqrt[\leftroot{-2}\uproot{2}3]{S} = 16$; $\log_2{16} = 4$; $4 \times 2=8$ folds.
$4096 \div 2^4$ (I fold each side $4$ times) $= 256$.
 Thickness is $2^8$ ($8$ folds) = $256$.
Answer: It is simple.

 The volume of paper is $S^2$.
 So the side of the cube we want is $\sqrt[3]{S^2} = S^\frac{2}{3}$.
 Each fold doubles the thickness.  It starts with $1$.  After $N$ folds the thickness is $2^N$.
 To get the correct thickness for the cube we need to have $2^N = S^\frac{2}{3}$.
 Taking $log_2$ on both sides we get $N = \frac{2}{3} log_2 S$.
 Of course, it only works if N is an even integer.


How do you run one line of JavaScript at a time in Firebug?

Question: So I just started using Firebug to debug JavaScript, and I have no trouble setting breakpoints, but how can I run one line at a time after hitting a breakpoint? Is there any way to do this without manually setting a new breakpoint each line?
Answer: Have a look at the upper right corner:

The button Step over which I annotated with Move to next line, executes the current line and goes to the next one. Step by step. To also execute called functions step by step, you have to click on Step into (annotated with Go into function call).
Answer: Just press F11 to single step. Or press the "Step into" button.
Answer: If you want to go into the code of a function that is called on the current line you have to use F11 or "Step into" instead.
If you want to go to the next line of your code use F10 or "Skip" button when you're in the debug view. This maybe is better if you're using a big framework. Then you don't want to step through each line of the framework but more likely only through your own code...
Answer: use
<code>debugger;
</code>
at appropriate place in ur js, this will trigger a breakpoint if firebug is running, or you can use debugger; after every line if you cannot get into functions and then simply use f5 to jump to next debugger call.


What finish can I put on my pallet floor to fill cracks?

Question: What finish can I put on my pallet floor to fill in cracks and have an even, thick top coating?
Comment: Welcome to the stack exchange. A photo of the floor would help us guide you as a "pallet" floor could be several different types and some ideas may take you down the wrong path because we have a different idea of "pallet"
Answer: If you built a floor out of pallet boards I would expect that the floor would be uneven, have cracks between boards and rough surfaces. That style is pretty much what you get with this type of material!!
There is not much that you could do with it except to rip it out and go with something more conventional. You may be able to cover it with a floor leveling material if all the pallet boards are solidly nailed in but then you are still looking at having to install some new floor surface over that.
Answer: If this is salvaged wood from pallets, you can sand it all down and groove out all the cracks.  Then, you can cut little "Dutchmen" to fit those larger cracks, glue them in, and plane that level with the floor.
If the larger cracks are sealed, you could then coat the floor with a polyurethane or something similar.
Comment: I wanted to suggest +isherwood's comment below, but he's right, crystal epoxy is crazy expensive to do a floor with.
Answer: Table epoxy comes to mind, but it certainly wouldn't be a cheap solution. Like Michael Karas said, you have to expect a rustic look with pallet wood.
Answer: As I have actually used pallet wood as my entire house's flooring. Save the wood shavings from cutting the wood, and mix it with a wood glue and mix in the shavings. There is actually a brand that works great but I dont remember it. Take the shaving and glue mixture and fill in as much cracks and pin hole or screw holes you can. Dry and then sand to desired thickness. Seal with poly/epoxy/or a stain/sealant. Then you good to go
Comment: By "shavings", do you actually mean "sawdust"?
Answer: Pallet wood probably has some variance in thickness.  Also there has to be some slight warping.  I really really heavy coat of polyurethane could even out the walking area and fill in the gaps.  This is provided the subfloor could stop the liquid flow from seeping to whatever is below it.


How to check the decibel level of my headphones connecting to my windows laptop?

Question: I'm doing an experiment about music volume, and the subjects will be listening to the music via headphones connected to a laptop. Is there a way to measure the decibel level of the headphones?
Comment: You could always try to build your own [artificial ear simulator](https://www.bksv.com/en/products/transducers/ear-simulators/ear-mouth-simulators/4153), providing you have sound level meter.
Answer: Yes - there are many ways, ranging from accurate, but expensive decibel meters down to free mobile apps. Your challenge will be to try and measure in a way that accurately represents what the ear will hear, so you won't be able to just place the mic against the headphone speaker - you'll want to look at some way of emulating the obstacle to sound waves that a head will provide.
Answer: A product such as the 'Soundman Dummy Head' (available from online music gear retailers) might be of use. The product works with special mics that you can place in the ears.
This way you can accurately measure the volume that your test subject will hear during the test and adjust accordingly.
The only downside is this might be a little expensive for a home experiment, the alternative would be to build something similar yourself.
Answer: In my experience, If you maintain the output level and source constant, the other major variables affecting sound level would be headphone impedance and material.
So you might be able to calculate a theoretical value based on the producers specifications or measurments and compare that to the data recorded by instruments or that provided by the subject experiencing it.
Doing a bit of research on the topic, it appears that you can even calculate sound pressure and intensity based on the power and distance from speaker.
This site has a nice physics calculator for such values http://www.sengpielaudio.com/calculator-soundvalues.htm


Possible to configure DHCP server to only hand out IP's to PXE clients

Question: Is there a way when you are setting up a Red Hat DHCP server for PXE boot to ONLY hand out IPs to PXE clients? We already have a Windows DHCP server on the network (a server which we do not manage)and do not want this to conflict with it. I have been through a lot of documentation and do not see an option to force the DHCP server to only give IPs to PXE clients. If this is possible, how can I do it and what are some other concerns that I should know about? One of my concerns is that even though some clients may not be offered an IP, they are still being routed to my DHCP server, and would not know to look elsewhere. And, by the same token, I do not want my PXE clients being routed to the Windows DHCP server that knows nothing about PXE.
Comment: Put the PXE server and clients on a separate VLAN?

I know this will only work if you're doing original imaging in your work room. If you want to live PXE boot machines after deployment, this won't help (and hence just a comment)
Comment: Yea, we may be able to get this one another VLAN blocked off from the Windows environment. That may be the best bet. Would still be nice if DHCP had a way to differentiate between PXE and Non-PXE requests.
Answer: What you are looking for is called proxyDHCP. In a DHCP + proxyDHCP PXE scenario the DHCP server provides IP parameters to "ALL" the clients while the proxyDHCP provides the PXE parameters "ONLY" to PXE clients on a complementary DHCP offer. It perfectly suits your scenario.


Can't remove product image because "This is a required field."

Question: How can I remove those product images?
Answer: The question is not very precise but the message has most likely nothing to do with the image you try to delete. If you try to save a product with a missing required attribute, for example after you made it required, you will get this message, no matter what you change.
Pay attention to the warning icons on the left tabs to find the missing values.
Comment: Yes you have always to enter a label to delete an image. I don't know when they implement this.


Find Replace text FOO with Style "Heading 1" with Foo

Question: I am trying to find an easy way to convert my Word documents to HTML without the awful save-as that is built in.  These are structured documents (designed for our screen-reader (JAWS) users), and so they use Heading 1, 2, 3, 4 & the Table of Contents.
We plan to convert these to DAISY audiobooks (https://en.wikipedia.org/wiki/DAISY_Digital_Talking_Book ) , so we need pretty clean, but structured, HTML to convert.
I tried the find-replace, using Styles, but it would just replace anything in the text part of the search.  I could convert it from any one style to another, but adding text in the box messed it up.
(I think I see that CSS for DAISY means that instead of just
 it will have to be <level2 class=='section'
 and closing tags), but that's step 2 after I handle this part.)
I just want to be able to find any text using Style 2 and add text to the start of that line saying "yep, here's some style 2" so that I can do the HTML/CSS stuff.
Thanks!
Answer: You can do that with a simple Find/Replace. For example, specify the Heading 1 Style for the Find parameter and use:
Replace =
^&

For a macro you could incorporate that into, see: Convert a Word Range to a String with HTML tags in VBA


reseeding patchy lawn

Question: I pulled out some weeds and tried to reseed both in the front and back yard, the back seeds sprouted and grew but the front yard just will not germinate.  I seeded, watered and used the same grass seed from the same bag - why won't the front yard germinate?
Answer: Most likely the growing conditions are different - its sunnnier, or more shady, or drier, more exposed to wind, etc. Whatever the difference, you probably just need to give more care to the seed there, such as ensuring the seed bed is kept moist. If its very shady, then try using a seed mix designed for shady areas.

reseeding patchy lawn


How and when did Uchiha Madara learn Edo Tensei?

Question: During the Fourth Ninja World War, Uchiha Madara manage to escape Edo Tensei by releasing himself and put himself in Edo Tensei again. But how or when did Madara knew about the hand seals of Edo Tensei?
Answer: It is not really stated how and when Madara learned to use ET.
But it is possible that during the battles between Senju and Uchiha, Madara had seen Tobirama use it. And since ET is not a bloodline jutsu, and Madara as top Uchiha ninja, he copied it with Sharingan's ability.
Comment: With all the crazy power-ups it got, people forgot that the Sharingan was originally used to copy techniques :P
Answer: There are a few ways he could have learned it:

Copying it from Tobirama
Figuring it out himself
Getting the information from a different source, like a scroll. Orochimaru learned ET from the scroll of forbidden jutsus.

There is no definite answer however. It has never been stated or shown how Madara learned ET.
Answer: I might have a more satisfying answer to this. After all Madara already awakened Rinnegan. And I think I heard Jiraiya or someone say that the specialty of Rinnegan is that it grants the Rinnegan user the ability of knowing every jutsu in existence. So of course he knows every jutsu. Simple logic, Right?
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).