Flying with a poster tube as a hand luggage

Question: I am flying to a conference, in which I am presenting a poster.
In principle there might be a problem, as the poster tube:

is a second piece of hand luggage,
it is longer than the limit allows.

However, it seems that it works (once I tried with no problem, my colleagues usually have no problem).
Does it happen that one is not allowed to take a poster tube in the hand luggage?
If so, how to avoid this problem? (Advice, tips and tricks are welcome.)
If the question is place-specific, I'm interested mostly in EU.
Comment: Within Europe it usually works to take the train, I've done that several times from northern Sweden to Austria or southern France. Takes a little while (not necessarily more expensive if planned appropriately) but it's quite fun and there won't be any luggage problems :)
Comment: Neither me nor my students had any problems carrying a poster tube as second hand luggage (>50 flights, mostly EU, US, baut Asia as well). It usually even fits in the overhead compartment.
Answer: There are a couple solutions to the "transporting a poster tube on a plane" problem:

Most flights allow a second piece of hand-luggage, so that bit is fine. And while it is larger in the length dimension than is usually allowed, I've never had this be a problem. In not-very-full flights, it can be stored on top or behind other bags. On fuller flights, I usually just ask a flight attendant for help. So far the tubes have ended up behind the seats in the last row against the bulk head, and in the coat closet usually reserved for first class. Generally, I find they give you "credit" for trying not to be a problem.
As has been mentioned, you can get your poster printed or shipped to the conference location.
Cloth posters. These are becoming more easily accessible. While more expensive than paper posters, if carrying a poster on forces you to check a bag, and your airline charges fees for those, the cost difference vanishes swiftly. These can be folded and stored flat in a shipping envelop or bag. Just make sure to take them out and iron them on a very low setting to get the creases out before you hang them.
Comment: From my current observations: even if the allow "one piece of hand luggage only", poster tubes for some reason does not count to the limit (however, I've never asked, just in case not to ask for troubles). There were no problems neither for me nor my colleagues; besides sometimes from RyanAir (once a friend needed to fold his poster); other cheap airlines where perfectly fine.
Comment: +1 for cloth posters, a friend used it once and definitely worth that extra little money.
Comment: Creative rolling of your cloth poster can prevent creases and wrinkles.
Comment: +1 for cloth posters. I have used them on a regular basis and they are fantastic. Just fold them, put them in my suitcase or even backpack. Sometimes just have them ship directly to the conference hotel so that it is waiting for me when I arrive. Most of the time you don't even need to iron them but an iron has always been available if needed. Then there is the novelty value. Lots of people stopped by my posters because they notice the fabric. I gave them some time to be fascinated and awed, and then delivered my pitch. My research got a lot more exposure this way too.
Comment: +1 for cloth posters. I didn't even know they existed but they sound like a nice (and a little more expensive) alternative.
Answer: Sometimes flight attendant staff will be willing to hold a poster for you, since generally they can't safely go as checked luggage, and may not fit in the overhead compartment. You should inquire as to what will be allowed.
One useful alternative I've taken advantage of is to use a printing service in the city where you will be presenting your poster, and picking up the poster there. Nowadays, many will accept things sent by email, file transfer service, or web site. This makes the transfer process easier than before, and avoids the problem of last-minute delays (provided you send it ahead of time!).
Comment: Your alternative is only a half solution if you still need to somehow bring the poster back to your work location after the conference.
Comment: Actually, the last time I printed my poster at the conference venue (on a cheep paper, so it wasn't that wasteful). However, usually I would like to re-use the poster.
Answer:
I only encountered problems once (with Ryanair - I think they wanted to make me pay for late checked luggage). Fortunately it was going back home. I had to make the poster roll small (it then fit into their hand luggage frame) and I loosely folded the poster. As soon as I was in the cabin I unfolded it again and put it into the roll. Someone frome the cabin staff even asked why the poster was folded and said that this was crazy. Fortunately the creases were not that bad.
I'd always take the poster with the hand luggage: I once attended a conference where at the first 2 days about 1/3 of the posters had an A4 sheet saying: The poster can currently be found at Alitalia's lost luggage department...
You could print the poster at the place of the conference. I once presented a poster that was printed by the poster printing service of the conference hosting university (who actually allowed orders from the outside).
Comment: @O.R.Mapper: true, but then in my field we tend to have one-time-only posters so their main purpose is the conference.  The walls are already rather crowded, so if every once in a while one poster doesn't make it home it is not *that* bad.
Comment: Printing the poster at the place of the conference just solves the issue of bringing the poster to the conference, not that of bringing the poster back.
Answer: I've seen many people checking a poster in, since the size limits for checked-in luggage are larger than those for carry-on luggages. Another solution would be to send the poster by mail (preferably with a tracking system) a few days before to the hotel where you're going to stay, or even directly to the conference organizers, who can check that everything went fine.
Comment: Well, you did write: "If so, how to avoid this problem? (Advice, tips and tricks are welcome.)", which I understood as "could there be other possibilities if it's forbidden". But I don't mind deleting my answer if that's not what you meant.
Comment: No problem, but that being said, why do you want so much to carry it on board? As you say yourself, it exceeds the authorized dimensions, and therefore, you can only hope that the flight attendants will allow it, with the risk that they won't, which can make things quite complicated.
Comment: Thanks; however, the question was not on other possibilities.
Comment: Now I see, I was ambiguous. The point was concentrating on bringing poster on board, and "tips and tricks" were  related to that. However, it's academia.SE, so sometimes the best answer is "no, you don't want to X, try...", so its better to leave voters to plus (or not).
Answer: It depends on the airline's policies, but I have never had any problems on any of AA/AF/AZ/BA/DL/JL/KL/EK/QR/US, and I travelled extensively on all of them as a student, often with posters. The hand luggage restrictions are principally about overhead bin space: but a rolled up poster is small and can probably be squeezed in somewhere on the plane or in the coat cupboard if needs be. Therefore the fact that the tube exceeds one of the dimensions is not really of great interest to most airlines.
If you are travelling on a low cost carrier like RyanAir or EasyJet, that may be a different matter. I know that EasyJet is trying to be "business friendly" now so they probably will not be so interested in a small item like a poster tube. The one time I travelled on Ryanair with a poster I voluntarily checked it in at a very large fee rather than have an argument about it.
Now the warning I do have is: if you do check your poster tube, expect it to go missing. I lost three poster tubes (one permanently) by checking them. Somehow the baggage systems in many airports are not designed to transport tubes (especially if they have straps on them) and so they tend to get jammed somewhere and torn to pieces.
Answer: I'm returning to this old question because I now know the best solution! It's actually Fomite's third solution: fabric posters.
How to do it:
AstroBetter has an excellent blog post on this (http://www.astrobetter.com/blog/2015/03/25/fabric-conference-posters-ftw/) which in turn takes you to the how-to from the company Spoonflower (https://support.spoonflower.com/hc/en-us/articles/204266984-How-to-Create-a-Fabric-Poster-from-a-PowerPoint-or-PDF).
This is an even better option than it was a few years ago when Fomite mentioned it, because I've found the fabric printing to be slightly cheaper than traditional poster printing (this may depend on your campus printer) and on the fabric recommended by Emily Rice on AstroBetter, no ironing is needed. It is incredibly fun to be able to stow the poster in the corner of a suitcase and bring it out to show to friends or relatives I'm staying with on the way home from the conference.

Historical note: I came across this post several years ago and followed the advice, when creating my first printed conference poster! It ended up being awkward: I asked the flight attendant politely about putting it in a closet or overhead, and she said to put the tube on the floor at my feet (and the feet of the two passengers next to me). As it turned out, I was sitting next to (and inconveniencing) a professor headed to my conference (though he was nice about it). For the return trip, I decided to fold it up and mail it home and avoid having to deal with a poster tube ever again.
Comment: I favour fabric posters, but they do not look as good as well-printed posters on good stock.
Answer: I recently flew with a poster to a conference. The dimensions for hand-luggage usually are Height+width+length <= 42" (inches) (maybe 45", don't quite remember accurately). If the 'tube' sums up to less than this you should be good.
As is mentioned in another answer, most airlines allow two pieces of hand-luggage e.g. A laptop bag and maybe your tube, if you don't have anything else.
You are free to carry it with you in the hand unless the tube is arbitrarily long i.e. it exceeds 42 inches in length. If you are below that by length, I doubt the other 2 dimensions would be all that big.
At times they may take it from you right at the boarding gate and ask you to check it in there and then. That's fine. It'll be safe and given to you the instant you exit the aircraft rather than at the carousel.
Some aircrafts are small and may have a separate luggage are for hand bags towards the tail. You can put it there.
If it's a small flight and the tube is not too big (diameter and length wise) just prop it by your leg if you are in a window seat or put it below your seat.
As long as you are within the dimensions and allowable limits of hand luggage (count = 2 weight <= 7kgs) you should be fine
Answer: Almost every airline allows "a personal item" in addition to your carry-on luggage; otherwise people with purses wouldn't get any carry-on.  Your poster tube is probably not "a personal item", but your carry-on could be if it's small enough to fit under your seat.  (That's the real reason: there's not enough overhead bin space, but there's plenty of under-seat space.  Many people hate having stuff at their feet, though, so the airline can't count on that space being used; saying that you can take a personal item that fits under the seat works for you.)  In any case, the way this all works out in practice is that if you're lugging a huge amount of stuff that doesn't look like it'll fit, you'll be asked to check some at the door.  Otherwise, it's all okay as long as it will either fit overhead or fit under your seat without sticking out inordinately.  I've never seen problems even with backpack (personal item) + carry-on (overhead, fitting strictly within size limits and without requiring lots of shoving to get it to pretend to fit) + poster tube, except on really small regional airplanes with desperately tiny overhead bin space.
Also, if the poster tube doesn't fit in the overhead luggage--it nearly always does--they'll be able to check it at the door to the airplane, just like they do with other overly large and slightly fragile items like strollers.
And, finally, almost everywhere you will present has its own poster printing facilities within a few miles.  Any institution of respectable size will have their own, and any city of respectable size--and you're rarely far from one in the EU--will have a copy store of some sort at which you can print at poster size.
So just take the item with you as carry on, and in the extraordinarily unlikely event that something goes wrong and the poster is destroyed, get it printed at your destination.  (If you are extra-paranoid, you can get a somewhat tougher plastic poster tube instead of the cardboard ones--bearing in mind that I have yet to see a cardboard one get so crushed that the poster was significantly damaged.)
Comment: If the flight attendants are nice, sometimes they will put the poster roll in the jacket closet that the first class fliers use, and then the flight attendant will give it back to you at the end of the flight.
Answer: Format your poster so it can be printed as three strips, either vertical or horizontal. Roll them up in a small poster tube that is short enought to fit in your luggage.
Comment: I have thought about this a couple of times, but have never tried it. I have never seen a poster at a conference that is made up of multiple strips.
Comment: +1, I have done this successfully. The cuts were scarcely noticeable once the poster was re-assembled. It does help that my posters tend to follow rather an unimaginative, column-based layout :).


Is there a down side to setting the sampling time of a SAR ADC as long as possible?

Question: In configuring the sampling time for the internal ADC of a micro-controller (STM32F446RE) to sample the output of a current sensor connected to a PWM controlled motor, the sampling is triggered at 100kHz and I have a window of between 3 and 225 ADC clock cycles (22.5MHz) over which to hold the sampler open - my assumption is that the longer its open the less noise I'm going to see in the results. Is this correct, or is there a point where other factors come into play that would make a more intermediate sampling duration preferable?
Answer: That understanding is correct. If your ADC clocks are fast enough so that you can do 225 cycles of acquisition for one sample, then by all means do that.
Things that might go astray, as in basically every ADC, is that you might be loading the voltage source you're observing with your ADC. Of course, charging the ADC sample&hold capacitor for longer might increase the overall loading, but it might also allow the voltage source to catch up. The amount of current into the ADC or the capacity of the sample and hold can typically be read from the datasheet. If in doubt, add a voltage follower.

simulate this circuit – Schematic created using CircuitLab
Adding a voltage follower is also an excellent opportunity to also add an RC low pass filter, if your signal including noise isn't inherently band-limited to below Nyquist frequency anyway. Your noise has (near) infinite bandwidth, but your ADC is only meant to observe \$f_\text{Ny}=\frac{f_\text{sample}}2=50\,\text{kHz}\$ of bandwidth! So, filtering out anything above 50 kHz will lead to less noise being aliased into the 50 kHz it observes:

simulate this circuit
The ADC will of course load the voltage divider that RC low pass filter is, but at the low impedance of R1 and the sufficient drive strength of about any opamp, this should be negligible. Upon closer consideration, you'll notice that C1 now smooths out the noise to begin with, so you can then reduce the sampling time (if there's any other reason to do so, for example, need for higher sampling rate because of clocking reasons in the MCU).
Of course, if you know better than I do what frequency ranges you're looking for, you might design a better RC low pass, or even an advanced active filter with online tools (or pen and paper). The 50 kHz cutoff filter I sketched above is probably not a good choice – but it's hard to know a good choice when you don't know at which frequencies to expect signal components! In a PWM system, however, you expect harmonics at every odd multiple of the PWM frequency, whereas you probably mostly care about the current that flows on average over a few PWM cycles through your motor – model how fast the current through your motor is supposed to change, and filter so that this is preserved, but not much higher frequencies.
In general, if your CPU doesn't break a sweat dealing with 100 kS/s, then maybe go for the 50 kHz analog filter (or your signal being bandlimited below that from the start), and do the filtering and decimation in software: a simple FIR filter¹ running on your ARM can have a much steeper frequency response than a reasonably complex analog filter. That's what us radio folks do: analogously filter as much as necessary for the ADC and computation system to deal with the signal, then do the fine-filtering in digital domain, where math is exact (unlike real-world capacitors) and easy, and can be linear-phase.

¹ please don't build a Butterworth "just because it was the first filter I found" – it's not a filter type typical for digital filters, and it's rarely actually what people want, it's just nice because it's flat in passband and easy to build in analog, not in digital)
Answer: There is no downside to having longest possible sampling period unless it starts to limit the sampling rate.
It also does not result in less noise if the sampling capacitor already gets fully charged in shorter time.
Answer: Many ADC have about 5pF Csample, and 1Kohm Rseries (plus the sampling FET channel resistance). This is a 5,000 picosecond TAU.
The Neper tells you the improvement of accuracy, given each additional Tau of settling.
Neper = 8.6 dB per Tau, or about 1.6 bits.
For a 16 bit ADC, you need 10 nepers or 10 Tau settling, or 5*10 = 50 nanoseconds.
Answer:
is there a point where other factors come into play that would make a more intermediate sampling duration preferable?

One such reason could be oversampling the signal, which means taking multiple ADC samples and then combining them in software. Depending on the method used for combining/downsampling, this can reduce noise or increase resolution, or both.
For example, taking 4 samples instead of 1 and then just summing them together usually halves the noise level and thus increases resolution by one bit. But a simple summing filter works well only if the noise is white noise, and might actually increase the noise level if there is a high-frequency noise signal present.
In any case, having more samples available to software gives more signal processing freedom, while requiring more CPU power and shorter sampling time.


Are there online variants to "Path of Glory"? WH40K

Question: I've been watching a handful of this extended campaign type for a while now and I just saw a video where someone created an Ork war-band by using a dice-roll sheet prepared from custom rules. Can anyone tell me where to find such custom rules, or how to create a dice-roll sheet for a specific faction? I find Path to Glory more in-depth than the core game modes, but I only have regular space marines.
Answer: Mini War Gaming published a series of battle reports of Chaos vs. Orks.
You can find them here (half of them are free to view, the rest need a subscription).
Then, a user named Boff89 got inspired and shared this PDF on their forum. The introduction to the rules is signed by "Eric PB".
While these aren't the same exact rules used in Mini War Gameing's videos (I think), they look like what you're looking for.
I guess you can also try to ask MWG on their forum to share these rules, or make your own version using the videos and the PDF as a starting point...
Comment: Thanks for the heads-up. I'll try to find a space marine variant through them


Which edition/version should I use for citations with page numbers

Question: How do I cite a very old and well-known book which has multiple editions and reprints, various editors, facsimile reprints, and a recent paperback version, plus it's even available free online, again at more than one site. The text I want to cite is common to all of them so that's not an issue but I'd like to be able to give page numbers in the standard way. I don't know which edition to cite. The actual copy I've been using is a hardback 1970s reprint of a 1900s edition from the university library but it's not necessarily easy for others to find.
Comment: Can't you cite instead the chapter/section? Assuming it's consistent across all editions.
Comment: Despite my username it's a history book :) It doesn't have chapters but does have section headings. I can use those and not give page numbers.
Answer: Things can occasionally get tricky, but most situations are handled by these guidelines:

Cite what you've seen.  If you have one edition, don't assume that another has the same numbering (for pages, chapters, sections, equations, or whatever) without checking.  It's always better to cite an out of date edition correctly than to risk giving an incorrect reference to another edition.
If you've seen several editions, try to cite the one that will be most useful to readers.  Recent editions are generally preferable, both because they are easier to find and because they may be more up to date in other ways.  (But if a book is out of copyright and reprinted by many publishers, then recency may not be salient.)  If you know that a recent edition is not useful (for example, because material was cut), then you should say so.  Translations may be preferable for readers who do not speak the original language.
If you can't tell which edition would be most useful, then the decision probably doesn't really matter.  The most recent edition is generally a safe choice, if you can get your hands on it to check the reference.
More detailed references can help disambiguate.  A quick numerical reference is efficient, but it becomes near useless if the numbering has changed, while adding more context can make it easier to figure out where it might have moved in another edition.
Answer: Actually you don't want to put the reader of your article, at the same position, where you are now; and want to highlight the important background and related works, the reader needs to know about.
Therefore, cite the version you actually read and was part of the inspiration to your article/journal. This way, the reader knows exactly where to look, for further readings.


Can I change this summation to a sum of other summations?

Question: The form of the summation I have is
$$\sum _{ x=0 }^{ \infty  }{ x{ a }^{ x } } $$
I need to somehow remove the $x$ from the original summation in order to achieve the geometric series in each  other summation. For instance, $$\sum _{ x=? }^{ \infty  }{ { a }^{ x }\quad +\quad  } \sum _{ x=? }^{ \infty  }{ { a }^{ x }\quad +\quad  } \sum _{ x=? }^{ \infty  }{ { a }^{ x }\quad +\quad  } ...$$ I have seen this done before, but forget how to work with the bounds of each new summation . It would be greatly appreciated if anyone had a clue what I was talking about.
Answer: You should know that $\sum_{n=0}^\infty a^n = \frac{1}{1-a}$.
If we were to derive both sides with respect to $a$, then we have
$\frac{d}{da}[\sum_{n=0}^\infty a^n] = \sum_{n=0}^\infty \frac{d}{da}[a^n]=\sum_{n=0}^\infty na^{n-1} = \frac{d}{da}[\frac{1}{1-a}]=\frac{1}{(1-a)^2}$.
Multiplying both sides by $a$ gives us the desired result:
$$\sum_{n=0}^\infty na^n = \frac{a}{(1-a)^2}$$
Answer: Here is the way forward that aligns with approach suggested in the OP.
$$\begin{align}
\sum_{x=0}^\infty xa^x&=\sum_{x=1}^\infty a^x\sum_{y=1}^x(1)\\\\
&=\sum_{y=1}^\infty\sum_{x=y}^{\infty}a^x\\\\
& =\sum_{y=1}^\infty\frac{a^y}{1-a}\\\\
&=\frac{a}{(1-a)^2}
\end{align}$$
Comment: I believe that I understand your question.  Please let me know how I can improve my answer.  I really just want to give you the best answer I can.  - Mark
Answer: $a^x=e^{x\log a}$ and then apply the Taylor Expansion for $e^{x\log a}$. That should clean things up and make it a better form to solve the problem.
Answer: This is one of my favourite tricks. Multiplying a series by a carefully chosen term. It is especially useful in dealing with arithmetic-geometric series.
$$\begin{align}
 S &= a + 2a^2 + 3a^3 + \dots \\
 aS &= a^2 + 2a^3 + 3 a^4 + \dots \\
S - aS &= a + a^2 + a^3 + \dots \\
S &= \frac {a + a^2 + a^3 + \dots}{1-a}\\
S &= \frac{a}{(1-a)^2}\\
\end{align}$$
The last step assumes $\left\lvert a \right\rvert \lt 1$. Otherwise, the infinite series does not converge.
Comment: I don't know why it isn't being rendered by MathJax
Comment: @Anyone who knows Latex, please help and tell me what the mistake was
Comment: first of all do not skip lines in between align (remove the two returns); second, use \\ instead of \ when you want to return to next line in align.
Comment: @BGM Thanks a lot. I'll make note of not to skip lines in align.


Will I save on miner and network fees for sending btc if I import my bitpay wallet to another wallet like electrum or blockchain?

Question: I have a bitpay wallet that has received many small transactions. I want to send all of the funds to my trading platform, but the fees are too high after the first send each day which is as low as 1%. Will it help to import that wallet to another client like electrum or blockchain?
Comment: I'm not sure what you mean by "fees are too high after the first send each day". I'm not very familiar with Bitpay, are you talking about the bitcoin network fees or some fee that Bitpay is charging for each send?
If we're talking about network fees, other wallets might do a better job at fees estimation and/or control than bitpay, but it's not sure that you could easily import your bitpay wallet into another, it really depends...
Answer:
Will it help to import that wallet to another client like electrum or blockchain?

It should help. Electrum is better than Bitpay wallet. You can import wallet using seed phrase in Electrum.
Mempool looks clear right now so low fee rate transactions should get confirmed soon.

Ensure that you select BIP 39 option while importing:

Select "legacy" if you had addresses starting with "1" in Bitpay wallet:

I confirmed the first address after importing which is same in both wallets:

In future you can create a new wallet in electrum, move all funds to this wallet. Select "segwit" this time instead of legacy and use RBF for all transactions.
Comment: Forgot to mention, please download the latest version of Electrum wallet only from official source and verify before using it: https://electrum.org/#download
Comment: Thank you so much for your answer.  Is there any chance I could lose the funds by doing this? I assume the balance would remain accessible in BOTH wallets, and once I verify, I could delete the wallet from bitpay.  It was created by the bitpay app and I do have the seed phrase and can also generate the QR code to export the wallet.  My bitpay wallets all start with a "1".
Comment: Yes will be accessible in both wallets. You won't lose the funds if you have the recovery phrase.


TOS episode- Crew meets immortal from Earth's past

Question: In this episode, Kirk and an away team go to another planet they find uninhabited except for a millennia-old man who claims to have been various figures in Earth's history, including Alexander the Great (and possibly Julius Caesar, I'm not sure).
Comment: You may find a Star Trek The Animated Series fan film "Ptolomy Wept" interesting as it is a sequel to this episode. https://youtu.be/7Q_Po_ZVO70
Comment: This episode evolved into the independent film [the man from earth](https://en.wikipedia.org/wiki/The_Man_from_Earth), I believe.
Answer: This is Requiem for Methuselah.
Here's Memory Alpha's brief synopsis of the episode:

While the Enterprise searches for the rare cure to a deadly disease, the landing party is confronted by a reclusive man who is willing to kill to preserve his privacy.

And here's the actual dialogue from the relevant scene:

MCCOY: Physically human but not human. These are earlier versions of Rayna, Jim. She's an android.
FLINT: Created here by my hand. Here, the centuries of loneliness were to end.
SPOCK: Your collection of Leonardo da Vinci masterpieces, Mister Flint, they appear to have been recently painted on contemporary canvas with contemporary materials. And on your piano, a waltz by Johannes Brahms, an unknown work in manuscript, written in modern ink. Yet absolutely authentic, as are your paintings.
FLINT: I am Brahms.
SPOCK: And da Vinci?
FLINT: Yes.
SPOCK: How many other names shall we call you?
FLINT: Solomon, Alexander, Lazarus, Methuselah, Merlin, Abramson. A hundred other names you do not know.
SPOCK: You were born?
FLINT: In that region of earth later called Mesopotamia, in the year 3834 BC, as the millennia are reckoned. I was Akharin, a soldier, a bully and a fool. I fell in battle, pierced to the heart and did not die.
MCCOY: Instant tissue regeneration coupled with some perfect form of biological renewal. You learned that you were immortal and
FLINT: And to conceal it. To live some portion of a life, to pretend to age and then move on before my nature was suspected.
SPOCK: Your wealth and your intellect are the product of centuries of acquisition. You knew the greatest minds in history.
FLINT: Galileo, Socrates, Moses. I have married a hundred times, Captain. Selected, loved, cherished. Caressed a smoothness, inhaled a brief fragrance. Then age, death, the taste of dust. Do you understand?
SPOCK: You wanted a perfect, ultimate woman, as brilliant, as immortal as yourself. Your mate for all time.
FLINT: Designed by my heart. I could not love her more.
Star Trek: The Original Series S03E21 "Requiem for Methuselah"
Comment: Worth noting that Captain Janeway on *Voyager* recalls that James T. Kirk claimed to have met Leonardo Da Vinci, but says the evidence was not conclusive. A holodecck simulation of him was a recurring character, and did not have the memories of Methuselah.
Comment: @Davislor, the holodeck recreation would have been based on information _known_ about Da Vinci, and would not include any revelations from Kirk's encounter with Flint, whose existence Kirk promised not to reveal.
Comment: @RobJarvis Except that Janeway knew all about it.
Comment: Two or three of the ST:TNG/DS9/VOY novels had a sequel of a type to "Requiem for Methuselah".  Dr. Soong in an android body discovers that Flint has stolen his Juliana Soong (android), but cannot go after her.


How to installed Debian 8.8 uEFI

Question: I have a machine with uEFI firmware.  Windows 10 is installed using uEFI method.  Debian 8.8 Jessie seems to report that it is installing with BIOS method and not uEFI, because during grub bootloader installation Debian asks to choose location of MBR record.
Answer: You are using one of Debian 8.8 Live DVDs with pre-configured desktop like Gnome or KDE.
Try using standard Debian installation DVD.  It is configured to run legacy BIOS mode (uses MBR) and new uEFI installation mode.
When this CD boots it has a message that directly states it is a uEFI installer.   That message is on the very 1st menu that gives you a choice of graphical vs. non-graphical installation.
The Live DVDs don't state that they don't support uEFI and can waste you a lot of time.

How to installed Debian 8.8 uEFI


Which one is better for making a calendar, illustrator or indesign?

Question: Someone help me!
I would like to know which one is better for making a calendar... illustrator or indesign and why? I have to make one, but not sure which program to use.
Comment: Hey tzur, welcome to GD.SE! You've gotten some good answers already, hopefully one of those helps you. If so, be sure to check the little box next to the one you think best answers your question. If none of them answer your question, I'd encourage you to edit your question and add more details and context (specifically, what you're using the calendar for - print? web?). If you have any questions about how the site works, have a look at the [help center](http://graphicdesign.stackexchange.com/help). Keep contributing and enjoy the site!
Answer: InDesign. It has stylesheets for your text (dates, days of the week, month names) and for your tables (the calendar structure itself) and has master-page items that can be used on all pages consistently. illustrator would be fine to make the nice image that goes on the other half of the calendar.
Answer: inDesign and use the following script:
http://calendarwizard.sourceforge.net/
Has saved me many hours of toil and frustration.


DB Mirroring setup?

Question: I have done a SQL database mirroring setup. There is a Sql job which takes continues full database backup daily. Should I stop this job ?
Answer: No, you still need to take backups including FULLs and LOGs (DIFFs work too, just depends on your set up).
Make sure you are taking LOG backups as well, or your log file will get full and things go breaky.
All mirroring does, depending on what mode (async or sync), is keep data in sync between your primary and secondary.
Synchronous means the transaction needs to happen on both primary and secondary servers before it's considered complete.
Asynchronous doesn't require the transaction to complete on both sides (think of a server in NY and one in CA, latency would make things very slow if you have to commit a transaction on both sides of the country).
You still need to take backups as you normally would.  What if both servers go down and you lose them?  Those backups are the only way to get your data back.
Answer: Ideally the mirror db instance acts as the backup for the principal. So you already have a hot standby for the data in your principal in the form of the mirror dbs
You cannot take backups of the Mirror databases as they are in restoring mode..obvious..ain't it?
As of Principal, you can take continue to take your full backups.

DB Mirroring setup?


VBA For loop + if statement error

Question: I am trying to create a loop that finds the value of my input box, select the cell that has the matching value of my input box and delete its the entire row.
For some reason It seems like my if condition is not working at all.
*Totalrow= my double variable for the total number of rows on my sheet
*tenroxcode = my string variable for the inputbox
For i = 1 To totalrows
    If tenroxcode = Range("E" & i).Value Then
        Range("E" & i).Select
        ActiveCell.EntireRow.Delete
    End If
Next

Could someone PLEASE help me?
Answer: You need to loop backwards:
For i = totalrows to 1 step -1
    If tenroxcode = Range("E" & i).Value Then Rows(i).Delete
Next

Answer: Alternate that should be significantly faster.
dim r as variant

r = application.match(tenroxcode, columns("E"), 0)
do while not iserror(r)
    rows(r).entirerow.delete
    r = application.match(tenroxcode, columns("E"), 0)
loop

VBA For loop + if statement error


Explanation of Michelson Interferometer Fringe Shift

Question: I have been working on an experiment where 2 glass microscope slides are pinched together at one end (so that there is a "wedge" of air between them) and placed in the path of a laser in one leg of a Michelson interferometer. When I move the glass slides (fractions of a mm at a time) so that the path of the laser is closer or further from the place where the slides are pinched, a fringe shift occurs. I cannot seem to explain why this is happening! Any help with explaining this phenomenon would be greatly appreciated! If any more specifics about the setup or dimensions of the slides are needed, please let me know.Also, a full "light to dark" fringe shift occured roughly every 4mm of moving the slides.
Comment: What did you do to solve your homework?
Comment: How is the flatness of your glass plates; if you use a single plate (instead of a pinched pair) do you see the same effect?  Do you see a similar effect if you tilt the glass plates?  It isn't impossible that the constrained layer of gas between the glass plates has a slightly different index of refraction, but a back of the envelope estimation puts it at $10^{-8}$ m OPL change which is probably at the edge of your instrument's sensitivity.
Comment: Are you using a beam that makes multiple reflections inside the wedge?
Comment: Actually, the fringe shift didn't seem to occur with many pairs of slides, but with some of them we got a near constant fringe shift as we slowly moved the slides in the beam. Im also not sure about the flatness of the slides. How would that create a fringe pattern that was nearly constant? i.e for every mm we moved the slides the pattern would move by 1/4 fringe or so
Comment: Are your fringes linear or circular?
Comment: @WhatRoughBeast The fringes are linear
Comment: @User58220 I didn't do anything special to make sure multiple reflections occurred, but the glass reflects about 4% of the incident light that hits it. Even with this amount of reflection, could this still explain the fringe pattern shifting?
Answer: This is speculating - but if your slides are of non-uniform thickness, or they are bent as a result of the pinching, they will present a different path length in one leg of the interferometer (and therefore give rise to a shift in the fringe pattern). This may become clear by looking at this diagram:

In the diagram on the left, the total path length is independent of the position of the ray - in all cases the light bends by the same amount as it interacts with the different surfaces. In the diagram on the right, the rays closer to the "pinch point" will traverse less glass than the ones that are further away (which intersect the glass at a greater angle). This means that the path length will change as you move the slides left to right.
It is not clear whether there is a spacer as part of your "wedge" (I imagine there must be one, but I can't see it in your photo). If there is, then the big clip you use will surely bend the slides; and a Michelson interferometer is very, very sensitive to path length differences...
Comment: There is actually not a spacer, but I imagine the slides could still be bent by the pressure and maybe some grime or particles stuck to the inside of the slides. Is there any way to estimate the amount the slides would need to bend in order to see this quantity of fringe shift? Sorry I don't have much info about how the slides are pinched. The slides are each about 1mm thick with refractive index around 1.51-1.54
Answer: At a guess, the effect rises from the fact that your interferometer is not properly aligned. The presence of linear, rather than circular, fringes suggests that there is an angular misalignment. Then moving the wedge causes a lateral shift in the intersection point of the beam and the angled slide, which results in a shift in the apparent position of the beam at the target.
Try aligning the system to produce a bull's eye fringe pattern, and see if the anomaly persists.
Comment: Getting the fringes clear is not alignment. For off-center (vertical) fringes, think of two sources which are laterally offset. If the offset changes, the location of the fringe (same path length from both sources) will change as well. And if the wedge beam is not _perfectly_ perpendicular to its mirror, the location of the return bean will vary with wedge location. See, for instance, http://en.wikipedia.org/wiki/Michelson_interferometer, fig 3.
Comment: I am pretty sure the interferometer was aligned, since we tried very carefully to get the fringe pattern to show up clearly, and there was never any alignment that made a circular pattern. Now that I think of it, one setup with a lens made a circular pattern. Why is it necessary to have a circular pattern though?
Comment: Yeah, the bullseye pattern occurs when you have gotten the angles on the mirrors right. You may want to adjust those and the angle of the beam to produce the bullseye, then put the slides in preserving the bullseye.
Answer: This answer is based on Floris' insight that the slides might be bent.
Let's say the laser hits the slide at an angle of $\theta$ and travels through the panel at an angle of $\theta'=\sin^{-1}({n_a\over n_s}\sin(\theta))$. Let's assume the curvature is light enough that the laser essentially exits parallel to how it entered. I am also going to assume you are using a $\lambda=633\mathrm{nm}$ laser. We can express the change in phase from having no slides as $\phi={4\pi D\over\lambda}\sec\theta'\left({n_s\over n_a}-\sec(\theta'-\theta)\right)$ using a little trigonometry, where $D$ is the thickness of a slide. We want the curvature which is ${d\theta\over ds}$, where $ds=\sec\theta\,dx$. Let's express ${d\theta\over ds} = \left({d\phi\over d\theta}\right)^{-1} \left({d\phi\over dx}\right) \cos\theta$. You measured $d\phi\over dx$ to be ${2\pi\over 4\mathrm{mm}}$, and specified $n_s=1.52={n_s\over n_a}$. Let's say our angle of incidence is 10 degrees. We will now give this mess to Wolfram.
So at this point, we have to have a curvature of .06 degrees per mm to observe this fringe effect.
Comment: Or perhaps I should say this is maybe a nonanswer? .6 degrees per cm is pretty observable to the naked eye aided by ruler, so the fringe effect may be due to something else (assuming my analysis wasn't faulty)
Comment: Hmmm, very interesting. It definitely wasn't visibly bent, and i could barely fit a razor blade edge into the widest part between the glass slides.
Answer: In the 2 glasses there are 4 surfaces, i.e interface air/glass, and 8 surface orientations (a..h) and plenty room for interference between reflections and the main beam.
LASER  (air)    a1b (glass) c2d      (air)       e3f  (glass)   g4h
At each interface the is reflection that will be reflected forward again (self-interference)
look for iridiscence in thin materials.
previous answer, not important now:
Evaluate the dimensions of the screw thread that moves the clamp (distance, pitch) and how many turns are required for a given deviation.
I do not see the screw, but I imagine that it exists and influences the outcome.
Comment: It was set up on a linear translation stage, so I already know it took about 2mm of movement to get a full fringe shift. I was wondering why the fringes are even shifting at all
Comment: A photo would be nice. I'll change my answer to include interferences.
Comment: What would you like a photo of?
Comment: of the set up (at right)  that holds the glasses. ( what is the distance beween the glasses ? )
Comment: I didn't measure the distance between the glasses, and unfortunately I don't have another good picture of the clamp holding them. It was just a binder clip from the store that was squeezing one end together


Does the miner first validate transaction before doing POW or he does not validate at all ?

Question: Does the miner validate the transaction before putting it on the block for proof of work?
my understanding is if the miner does not validate the transaction and published the block and the block gets rejected of the invalid transaction then miner will lose the reward?
One more question does the nodes relay the transaction after validation or they just relay it?
Answer: Miner first validates all transactions he wants to include in the block he will mine.
Then from these transactions he calculates their Merkle root, that becomes the field of this block's header.
Then he mines (repeatedly hashes this header modifying its nonce field with each try).
When he finds the correct hash he broadcasts this block (including block's header and transactions) to the network.
Reasoning: It would be stupid from miner to do the expensive work of mining before making validation, risking the block to be rejected. This would mean he spent a lot of resources to mine the block in vain.

Nodes validate the transaction before relaying it.
Reasoning: It is beneficial for network if the nodes filter invalid (erroneous, malicious) traffic. It reduces the load.


Cat Anxiety Yowels at Night

Question: I've been a cat parent off and on my entire life and this is a new behavior for me. Sometimes, at night, my 7-year-old spayed cat will walk into the living room and yowl until someone calls her at which point she will come to them and cuddle. It happens once or twice per week. I'd understand if my door was closed or something but that's not the case. She deliberately chooses to walk from my bed to the living room and yowels until called. Sometimes she'll start drooling from happiness and usually won't repeat this behavior more than once per night. This "anxiety yowl" is a very similar sound to the one she makes when she's accidentally locked outside (which has only happened a handful of times in the last several years). Can anyone explain this behavior and how to prevent it?
Comment: Is your cat male or female? And is it neutered / spayed or intact? Please [edit] this information into your question.
Comment: not an answer but... It might be that your cat is actually playing a small game, trying to get you to interact with her, while re-confirming the friendship ties and manifesting some positive emotions. She pretends she is trapped outside, and needs your rescue. You calling her is her "rescue". You might be her Price Charming. You might not be able to prevent it, but "move" this behavior at some time of your convenience - maybe by having some friendly / emotional time before (your) sleep time.
Comment: You say she walks from your bed to the living room; have you tried closing the door so she can't leave the bedroom?
Answer: Cats learned to meow in order to communicate with their humans. Kittens meow at their mothers, but adult cats will rarely meow to communicate with each other. It's pretty well established that they meow on our behalf, and some cats are more vocal than others. I think that's just what your cat is doing. Your cat likes you, and wants your attention.
Your cat learned that meowing in a certain way will illicit a response from you (meowing when she's locked outside means you let her in), and you continually responding to this meow even now only confirms that for her. My cat meows and yowls at me all the time, and I love to chat right back at him, but I understand that it can sometimes get annoying. Here's a couple things you can try.
Ignore her: I don't really recommend this one. Only do it if you know she is 100% okay, and you've given her plenty of love and attention throughout the day. That being said, because you respond every time, it's a learned behavior for her. "If I meow, they give me attention." If you stop responding to her meows, she may realize that doesn't work and she'll need to try other things if she's seeking attention. Maybe she will just come quietly seek out a lap, but she might do something even more obnoxious.
Be preemptive: This one I highly recommend. It sounds like she meows at just this specific time (evenings, in the living room). Even though she might not always meow, you can try just preemptively giving her attention in the evenings before she meows (pick her up, call her over, wiggle a toy, etc). It's obvious she wants your attention, so try to give it to her before she has to ask. Try playing with her more throughout the day, too. She may meow at this time if she thinks it's the only time she can get attention from you.
All cats have different vocalization habits. It's important to pay attention to them, and notice any changes, in case something really is wrong. It never hurts to take her to the vet, or at least address it during her next scheduled check-up. But I don't get the feeling that your cat is meowing out of distress, nor is she meowing excessively in any way.
Comment: She sounds adorable! My cat has a large variety of ways he communicates to me too. Like us, cats can develop different habits through different phases of life, or to meet different needs. Maybe your evening routine has changed that triggered this new habit? even the smallest thing can affect how she thinks. Sleeping in a different room, going to bed earlier, etc.
Comment: What's odd is that she already has ways of communicating her needs. If she wants me to follow her she'll gently reach up and pat my leg with her paw. It's absolutely adorable. She isn't shy about hopping on my lap if she wants attention.

Cat Anxiety Yowels at Night


3 judges problem. Binomial-like distribution.

Question: I want to solve the following problem.
An indicted person is given two choices: either being tried by an individual judge, who takes the correct
decision with probability p, or being tried by a three-member jury, two members of which independently
take the correct decision with probability p, and the third one decides according to the result of tossing a regular coin. The decision of the jury is by majority.
a) Assuming the indictee is innocent, which option is best?
b) Assuming the indictee is guilty, which option is best?
Answer both questions depending on the value of p belonging [0,1].
I am having problems with the majority concept. If the three judges where correct with the same probability "p" I would expect that the probability that the majority of judges was correct will be a Binomial (2 success out of three experiments with probability "p") but as the third judge has a probability 1/2 of being correct I am not sure on how to proceed.
Answer: Here's the work for guilty, try to do the innocent case yourself, hint: try substituting something for p :)
Probability of being sentenced to jail by one judge = p
Probability of being sentenced to jail by the three:
Case one: homer says you're innocent
$$ \frac{1}{2} p^2 $$
Case two: homer says you're guilty
$$ \frac{1}{2} (1-(1-p)^2) = \frac{1}{2} (2p-p^2) $$
Summing together:
$$ \frac{1}{2} (p^2-p^2+2p) = p $$


How does angular momentum affect the trajectory of a projectile?

Question: I am thinking about a football thrown in a very tight, very fast spinning spiral.  If the football is thrown upwards at a high angle, is it possible for the football to not turn over at the top of its trajectory?  If so, what type of calculations are needed to show the conditions of angle, velocity, angular velocity, etc. that will determine if the football turns over and lands nose down or doesn't turn over and lands tail down?
Comment: I understand that you are not interested in the angular momentum with respect to some external axis, but in spin. And I understand that you paint the football so as to have head and tail. Is that true?
Comment: the law of this site is that we are forbidden to solve home-exercises. We are allowed only to give some main ideas, s.t. the user could solve the problem by himself.
Answer: Key to understanding this question is the fact that a "football", in this case, is a hand-egg:

When it is given spin about its long axis, it will act a bit like a gyroscope: it tends to maintain its attitude.
So the question becomes - when is that desire of the ball to keep pointing in the same direction greater than the torque due to airflow that tries to get it to point in the direction it is going?
To answer this you need to know the torque on the ball due to it moving at an angle to the air (air flow not parallel to the main axis) - that is actually a hard problem that is usually solved by CFD - computational fluid dynamics. In other words - we get the computer to do the math. When it is done you will find that the torque tends to want to turn the ball at right angles to the airflow - so if it is pointing up a little, the air will try to tip it more.
Now we have to add the angular momentum of the ball- when the ball is spinning fast (assuming a right hand throw) the angular momentum vector points forwards, and the torque vector points to the right. This means the ball will start to veer to the right - it precesses. The more it veers tithe right, the more the torque starts to point sideways, etc - in other words, the ball will wobble about the direction of the velocity.
This spinning and wobbling results in a stable spiral, but I believe that it also means that the ball will always continue to point along the trajectory. Incidentally this spinning motion is the same motion that a rifle imparts to a bullet - it makes the bullet fly more true since any errors in the shape will average out as the ball completes on complete "wobble".
In summary - if my understanding of football dynamics is correct, the ball will continue to precess about the velocity vector. The faster it spins the more tightly it will spiral about that path. The higher the angular momentum the slower the precession. There might be a limit where the precession is so slow that the ball appears to continue pointing up - but without a good CFD a model it would be hard to calculate.
Lucky for us, somebody else has done the calculation which you can find (rather poor copy) here
Comment: Thank you for answering my question.  I took my last physics class 20 years ago so this was not a homework question.  I've always wondered why some American football punts turn over and others don't.
Answer: There is no problem to get the time $T_1$ to reach the peak, and the time $T_2$ to fall on the ground if you know $v_{y,0}$, the projection on the vertical of the total velocity under which you threw the ball. For this calculus you can consider only the center-of-mass movement of the ball.
About the spinning movement, I don't understand in football but I don't see any reason that the spinning axis and angular velocity be dependent on the center-of-mass movement. Iff this independence is true, the spinning axis and angular velocity should be invariant, $\vec {\omega_0}$. Thus, the total angle by which your ball rotates until the peak, or until the ground, depends on the initial conditions.
These details should help you in solving your problem.


Is there any way to use mbutil on Windows?

Question: I have used mbutil on Ubuntu. It's a very handy tool. I am curious if there is any way to use it on a Windows 64 bit machine. If there is a way please help me to do so.
Answer: Per the answer by BradHards, yes it is a Python script so it will work in Windows. I was able to use it in Windows 7 after installing ActivePython.
(I first tried using IronPython but ran into problems with getting the required sqlite module to work)

Install ActivePython or another python that has sqlite.
Install mbutil (I just downloaded the zip archive and extracted to c:\)
From command line, run "setup.py install" to install mbutils
From command line, I copied mb-util > mb-util.py for convenience. So you can use "mb-util.py" instead of "python mb-util"
Run "mb-util.py -h", you should see the help information and now be able to use mbutil!
Comment: In step 4, did you copy mb-util.py to the root python path?
Answer: Its a python script, so it should run anywhere. If you don't have python for Windows, you may like to download and install ActiveState python.
Rather trying to use git on windows, the easiest way to get the python script is via a .zip download provided by github. The direct URL: https://github.com/mapbox/mbutil/archive/master.zip
Unzip that, and you should be able to run it on a command line window.
Comment: I have installed the ActiveState python. I run the setup.py file of mbutil in Administrator:PyPM. Command line returns the following error.

Usage: setup.py [........]

error: no commands supplied
Comment: If you really want to install it (and you don't have to - should work fine without installation), then you have to provide an command (like "install"). This is documented on the main page (https://github.com/mapbox/mbutil/blob/master/README.md), and also in README.md in your checkout.
Comment: Probably I will never do it. I tried all the way and hang with it for 3 days to extract tiles. git on windows worked fine but hanged machine after extracting 3 million tiles. I am working in a big project where 23 million of tiles.
Comment: The stability of Windows and capabilities of mbtiles appears to be orthogonal to the original question about getting it running....
Answer: You can try cygwin software :
1.Copy the .mbtiles file to cygwin. Assuming that you installed "cygwin" at it's default directory the user home is mapped to c:\cygwin\home\
2.Run the following command: mb-util --scheme=osm Freguesias.mbtiles Freguesias
hope it will help you..
Nice explanation available on following Pedros'blog
thanks..


Multiple FileSystemWatcher objects

Question: I need to watch several (maybe up to 50) different directories (some inc. subdirectories) for changes to files.
All these directories are on network shares. The network shares contain log files which are updated constantly.
Now I have heard that FileSystemWatcher is unreliable (missing events) and won't work with watching this many directories.
Now the unreliability is not an issue as I don't need to pick up every event because events would be raised at sub-second level if it did, I am more concerned with the scalability of how many you can actually use.
So my question is, should I build my own polling system watcher (every 5 seconds for instance) and iterate through all the files in the directories being watched or is this the wrong was to go about it?
How do I overcome my issue?
Answer: Use FileSystemWatcher and ocasually check for changes. You can lower the polling time according to importance or urgency.
More information can be found here.

Multiple FileSystemWatcher objects


Proof of there are an infinite number of primes by using the Fundamental Theorem of Arithmetic

Question: How can I show that there are an infinite number of primes by using the Fundamental Theorem of Arithmetic?
Comment: There were two answers. Why vote to close? Once again "This question is missing context or other details". What is needed?
Answer: You start by assuming the opposite. Let's say there are a finite amount of prime numbers, in fact, let's write them in a list.
$P_1$, $P_2$, $P_3$, ... $P_n$
Note, this is a complete list.
Now let's form a new number $a$, by multiplying all of our prime numbers and adding $1$. According to the Fundamental Theorem of Arithmetic, every integer greater than $1$ is either prime or a unique factorization of primes. So let's try both of these possibilities.
Possibility 1: $a$ is prime. However, we previously wrote all the primes on our complete list, so this is a contradiction.
Possibility 2: $a$ is composite. However, if it is, it needs to be a unique factorization of the primes on our list. But, it won't divide $P_1$ exactly, $P_2$, $P_3$, or any $P_n$ for that matter. So it is a violation of the Fundamental Theorem of Arithmetic, and therefore a contradiction.
Because we get a contradiction when we assume there are finitely many primes, it must be the opposite, or there must be infinitely many primes.
Q.E.D
Comment: @D_S Why not ? Euclid's proof exactly uses the mentioned theorem. I upvoted this answer and I am surprised that it has received no upvotes, but the much more complicated approach received $2$.
Comment: I don't think this is what OP wanted.
Comment: We do not even need the unique factorization theorem, if we modify the proof a bit : Step 1 : Every integer $N>1$ is divisble by at least one prime. Proof : The set of integers $t>1$ with $t|N$ is not empty because of $N|N$. Let $p$ be the smallest element of this set. Then, $p$ must be a prime, otherwise there would be an integer $a$ with $1<a<p$ and $a|p$ implying $a|N$. But this contradicts the choice of $p$. Step 2 : Assume , $p_1,\cdots , p_k$ are all the primes. Then the number $p_1\cdot \ \cdots\ \cdot p_k+1$ is divisble by no prime contradicting the claim we get in Step $1$
Comment: I found this version of Euclids proof in a german algebra-book and it is my favorite way to show that there are infinite many primes.
Comment: The fundamental theorem of arithmetic doesn't *feel* essential in this proof. I think we could transplant this proof to a ring that is not a unique factorization domain to show that it has infinitely many irreducible numbers.
Answer: The standard way
is by assuming that
there are only a finite number of primes
and deducing that
if all terms of the form
$\prod_{p \in P} p^{a(p)}$
are counted,
there are not enough of them.
I don't remember the details,
but it might go
something like this:
The number of integers
of the form
$\prod_{p \in P} p^{a(p)}$
which are less that $x$
are of the form
$\prod_{p \in P} p^{a(p)}
\le x$
or
$\sum_{p \in P} a(p)\ln p
\le \ln x$.
We certainly have
$a(p) \le \ln x/\ln p$.
The total number of possibilities
is certainly less than,
where $N$ is the number of primes,
$\prod_{p \in P}(\ln x)/(\ln p)
=(\ln x)^{N}\prod_{p \in P}1/(\ln p)
$.
However,
for every finite $N$,
$(\ln x)^{N}$ will be less than $x$
for large enough $x$.
So $N$ must be infinite.
I just did this off
the top of my head,
so I'm not completely sure that
it is correct,
but it seems OK to me.
Anyway,
there it is.


can i use a single voltage regulator to power two usb ports

Question: So I was wondering if its possible to use a single voltage regulator (with one input and one output) to power two usb ports? Or would I need two voltage regulators to this. The voltage regulator takes in 12V and outputs 1.5A at 5v.Both my usb ports require .5A @ 5V. I will be using TI ptn78060w. This is my first electronics projects and im still trying to get the hang of all this. Any help is greatly appreciates or any book recommendation to help me understand power would be great.
Comment: Ok for USB flash memory, but smart-phones request much more power. If no response they will simply take longer to charge.
Comment: what is the purpose of the device that you are designing?
Answer: Use of common power supply for ALL USB ports in a host/hub design is very common practice. This type of power distribution is called "ganged" power, and is used in vast majority of PC desktop mainboards. The USB ports don't have to have power protection or current limiting, the limiting and corresponding overcurrent reporting is optional. USB specs says (Section 7.2.1 of USB 2.0 base specification) that ports MUST SUPPLY AT LEAST five units of load (one unit = 100 mA for USB2, and 150 mA for USB3), which means no upper limit. However, to avoid potential overloading of connectors and internal system components it is wise to limit the current at the source, using either high-side power switches or simple resettable polyfuses.
One thing, however, is a must: the power distribution network between ports must be decoupled to a certain degree. The reason is to protect already connected and working port from power glitches related to hot-plug of another USB device. This effect is called "droop" in USB terminology. USB specification mandate that the droop on an already functional port shouldn't be more than 330 mV when a standard load of 10 uF ( in || 44 OHms) is connected to an adjacent USB port. It is called "droop test". The proper de-coupling is usually achieved with trace separation, placing ferrite beads, and individual port bypass caps (47 - 100 uF) close to each port VBUS pin.
For recommendations of component placing and board routing, look up reference designs of USB hubs, say, on MICROCHIP.COM
Answer: Yes, if you have two 500mA loads you can power them from a single PTN78060W which can supply up to 3A (3000mA).  If this is for a product and you want USB compliance (so you can use the USB logo), or you just want to engineer things better you should look at protected USB load switches like the two port TPS2052C, or at least use a PTC thermistor on each power output.  Note that some devices require resistors on D+/D- to signal the available charging current, although most devices default to 500mA without these resistors.
Comment: Thank you so much for clarifying this. I was wondering what book you recommend reading? I feel I don't quite understand power that much and would like understand it better.
Comment: It depends on how far you want to go.  For an introduction, take a look at youtube, there are Kahn videos on Ohm's law and Kirchoff's Law which will get you started.  If you want to take a deep dive, "The Art of Electronics" is regarded by many as the goto reference.


Voltage reflected wave in electric circuits

Question: Why when analyzing lower frequency circuits does not appear a reflected voltage wave, and yet in radio frequency circuits it does? From what i know, the module of the reflection coefficient does not depend on the frequency, so, why do we only take into account this phenomenon of reflection in radiofrequency circuits?
Answer: There is a reflected wave at all frequencies.
The circuit picture with scattering parameters (and forward and backward wave) is fully compatible to simple ohms law. In fact both are equivalent at low frequencies.
Let $a$ and $b$ be forward and backward propagating waves. Then current and voltage are given by
$U = \sqrt{Z_0} (a + b)$
$I = 1/\sqrt{Z_0}(a-b)$
also we have for the reflection factor
$r = \frac{b}{a} = \frac{Z - Z_0}{Z + Z_0}$
These relations hold at all frequencies. At DC frequency the phase of the $a$ and $b$ parameters can be assumed to be constant and be neglected in the analysis (except for sign). That is all the difference. Also at DC the value of the wave impedance $Z_0$ does not matter. We always obtain the same result.
So $a$ and $b$ are really another way to describe voltage and current. The advantage is that at high frequency the propagation along a wire is easier predictable for $a$ and $b$ paramaters than it is for current and voltage. There is only an exponential factor for the former and more complicated for the latter. However there is no fundamental difference, both descriptions are capturing the same physics.
Answer: The reason for not using nor needing the concept of "reflected wave" is not that they do not exist but rather the circuit itself is so much smaller than a wavelength that the sum of the reflected and forward waves is essentially constant between and within the circuit elements, hence their sum voltage is enough to describe what is happening in the circuit.
If the wavelength is short enough that you can see spatial variation along the connecting wires between the elements then you must take their lengths into account, and the easiest way of doing it is by analyzing the forward and reflected waves separately.
Note that over a transmission line the amplitudes of the forward and reflected waves, resp., are constant individually, only their sum when properly phased along the length is position dependent. That position dependence of the sum is neglected in low frequency circuit work, so you might as well just deal with the sum voltage alone.


Block Ads via AirPort

Question: Is there any way to block ads via an Apple Airport? I'd rather block all ads that way so that I can block ads on my iDevices.
Answer: You can set the Airport base station's DNS to a service such as OpenDNS. Then make an account with OpenDNS and set up a blacklist.
Answer: Dnsfool supports adblocking. I found it on google. Seems a bit slow. But its free.

Block Ads via AirPort


Massless Weyl spinor components

Question: Let's say there is a massless Weyl spinor moving in an arbitrary direction $n$. What are the analytical solutions for the two components of this spinor?
Answer: The equation of motion can be written down in the form
$$ ( \partial_t  \pm \vec \sigma \cdot \vec\nabla ) \psi (t, \vec x)=0,$$
where $\psi$ is two component column vector. Choice of $\pm$ sign corresponds to right or left handed Weyl neutrinos. By squaring this equation we see that $\psi$ satisfies also the wave equation,
$$ (\partial_t^2 - \nabla^2) \psi (t, \vec x)= 0 .$$
Any reasonable function can be written down as a superposition of plane waves. If we do this, the wave equation tells simply that we only have components on mass-shell, i.e. plane waves $e^{ikx}$ where $k$ is a null vector. This is just Einstein's energy momentum relation $E^2 = m^2 + p^2$ for $m=0$. Therefore we can write
$$ \psi(t, \vec x) = \int \frac{\mathrm d^3 k}{(2 \pi)^3 |\vec k|}  \left( \psi^p(\vec k) e^{-i|\vec k|t +i \vec k \cdot \vec x} + \psi^n(\vec k) e^{i|\vec k|t -i \vec k \cdot \vec x} \right), $$
where $\psi^p$ and $\psi^n$ are so far undetermined spinor-valued functions. This integral is the most general solution to the wave equation, but what we wanted to solve in the first place was Weyl equation. Therefore we plug it in and the result is
$$ (\sigma \cdot \hat k) \psi^{p/n}(\vec k)=\pm \psi^{p/n} (\vec k). $$
This eigenvalue equation has unique (up to normalization and phase) solution for every $\vec k$. For example for wave vectors in the $z$ direction this is $(1, 0)$ for right-handed spinors (spin in the direction of momentum) and $(0,1)$ for left-handed (spin in the direction opposite to momentum). Denote this solution as $\psi_0(\vec k)$. We now have the most general solution to the Weyl equation
$$ \psi(t, \vec x) = \int \frac{\mathrm d^3 k}{(2 \pi)^3 |\vec k|} \psi_0(\vec k) \left( \alpha(\vec k) e^{-i|\vec k|t +i \vec k \cdot \vec x} + \beta(\vec k) e^{i|\vec k|t -i \vec k \cdot \vec x} \right), $$
where $\alpha(\vec k)$ and $\beta(\vec k)$ are now completely arbitrary complex functions.

Massless Weyl spinor components


replacing wheel studs on a 92 Buick century

Question: Some of my studs are crossthreaded from the last mechanic who replaced my tires and wasn't paying attention to his impact wrench.  The problem is, there is no space to get the new studs in, and I had to cut the old ones out.  Is there any way to replace them without removing the whole tire assembly and potentially messing up the seal and ball bearings inside? (Brakes and everything else necessary to normally replace studs has already been removed. The problem is that there isn't enough space  between the opening and the more complicated parts of the tire assembly, and there isn't a groove like there usually is for replacing studs.)
Comment: Are you saying that you don't have enough space because you are not taking the rim off the vehicle?
Answer: I have the service manual for the 93 Buick and you have to grind the old studs out and put a small stud in for replacement or remove the hub. You can not install the regular size stud without removing the hub!
Answer: Is this on the front or the back? Also, did you try taking the brake rotor off of the hub?
In either case (front or back), you should be able to remove the caliper, brake pads, and rotor off of the hub. When you get down this deep, there should be plenty of room to get the studs out and replace them.
EDIT:

IF you cannot get the studs out, you'll need to take the hub assembly off from the steering knuckle. To do that, there is the bit nut which is used to keep the drive axle in place on the front (left image). Then there are three bolts which hold it onto the steering knuckle (right image). Be careful when pulling the hub out as you can damage the wheel bearing and would need to replace the hub.
Comment: A picture would really help. The tyre assembly in my mind is the wheel and tyre and must be off the car if you have removed the brakes already?
Comment: Brakes and everything else necessary to normally replace studs has already been removed. The problem is that there isn't enough space between the opening and the more complicated parts of the tire assembly, and there isn't a groove like there usually is for replacing studs. (Also, its the front right tire)
Comment: @CeaseofMorality - Please see edit.
Comment: I'll try to add a picture when I get back from work. In any case I would reaaally rather not remove the hub assembly. I don't want to damage anything that would cost a fortune to fix later. Are there any shorter studs on the market that I could use or any other solution?
Comment: @CeaseofMorality - Realistically I think you are missing something. With the design of those hubs, you should be able to replace the studs after removing the brakes with the hubs still on the car. GM designers were smart enough to deal with this (other manufacturers didn't seem so smart). Like Mauro said I think a picture of your hub on the car would be of great assistance in helping you.


Testing for difference in means with bimodally distributed data?

Question: I have two bimodal distributions of data with two peaks (one around 0 and the other around 1). I have provided an example of one of the distributions.

Although their means and variances are different, they both have peaks around the same x-axis markers. How do I test for difference in means using statistically rigorous approaches? Can I still use a t-test even though the data is not normally distributed?
Comment: It looks like your are in a regime where the central limit theorem would kick in, so you could still do a t-test, but I think a more important question is "why does the data look like this?".  Are those peaks at 0 and 1 actually 0 and 1?  From where do the data originate?
Comment: Can you explain the bounds at 0 and 1. Are these proportions of some kind? Do they include exact 0's and exact 1s?
Answer: This looks like a textbook example of using beta regression, which can model values between 0 and 1. It is often used for modeling rates and proportions. The distribution can take on various different shapes, and your distribution looks a lot like a beta distribution with shape parameters of .1 and .2. In R:
set.seed(1839); hist(rbeta(1000, .1, .2))

I can simulate two samples from different beta distributions, one with a higher mean, and then do a significance test using the betareg function from the betareg package in R:
set.seed(1839)
y <- c(rbeta(300, .1, .3), rbeta(300, .2, .1))
y <- ifelse(y == 1, .999999, y) # because values must be BETWEEN 0 and 1
x <- rep(c(1, 0), each = 300)
mod <- betareg::betareg(y ~ x)
summary(mod)

This returns:
Call:
betareg::betareg(formula = y ~ x)

Standardized weighted residuals 2:
    Min      1Q  Median      3Q     Max
-3.8917 -0.5212  0.0366  0.5800  3.0307

Coefficients (mean model with logit link):
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  0.55237    0.08089   6.828 8.59e-12 ***
x           -1.48921    0.12093 -12.315  < 2e-16 ***

Phi coefficients (precision model with identity link):
      Estimate Std. Error z value Pr(>|z|)
(phi)  0.33130    0.01566   21.16   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Type of estimator: ML (maximum likelihood)
Log-likelihood:  2806 on 3 Df
Pseudo R-squared: 0.2134
Number of iterations: 19 (BFGS) + 1 (Fisher scoring)

I have written explainers on beta regression, with some citations you can check out, both here (using betareg) and here (using gamlss)

But what if you were to assume normality and do a t-test? Usually, people worry about Type I error with violating assumptions. I simulated data where there was no difference at all between conditions 1000 times with a sample size of 1000:
set.seed(1839)
iter <- 1000
n <- 1000
results <- lapply(seq_len(iter), function(zzz) {
  y <- rbeta(n, .2, .3)
  y <- ifelse(y == 1, .999999, y)
  x <- rbinom(n, 1, .5)
  beta_reg <- summary(betareg::betareg(y ~ x))$coef$mean[2, 4] < .05
  t_test <- t.test(y ~ x)$p.value < .05
  c(beta_reg = beta_reg, t_test = t_test)
})
colMeans(do.call(rbind, results))

Type I error rates show that it is about .05 for both. So, you're probably fine doing a t-test. But (a) you should ask yourself if the two poles are worth modeling themselves—you could trichotomize the data into low pole/between/high pole if those poles are theoretically or practically meaningful—and (b) beta regression can provide a sanity check; do both a t-test and beta regression. If they agree, then report that.
Comment: Your `betareg` test would usually distinguish between for example $\alpha =0.1, \beta=0.3$ and $\alpha =0.3, \beta=0.9$ even though the underlying distributions had the same mean of $\frac14$


Faster way to copy rows of data to different sheets by column value

Question: I'm trying to find a faster way to copy specific rows of a sheet to different sheets. Iterating through them as done in code below takes too much time it leads to timeout.
Some information about origin sheet:

Has already a blocked header
Has around 5000 rows
Column A has a header "Project"
Sheet is sorted by Column A

Goal is to copy range of all rows for each project from origin sheet to a blank sheet that is named from specific project - so all rows that has in column e.g. "ProjectA" in column A are in a sheet called "ProjectA".
Here is a code that is working, but it is using very slow iteration, so I'm waiting around 20 minutes or even get a timeout when I'm processing it:
 var sheet = SpreadsheetApp.getActiveSheet();
    var columnRoom = sheet.getRange("A:A").getValues();
    var rows = SpreadsheetApp.getActiveSheet().getDataRange().getValues();
    var header = rows[0];
    var completedRooms = []
    var last = columnRoom[1][0]
    for (var i = 1; i < columnRoom.length; i++) {
        if (!completedRooms.includes(columnRoom[i][0])) {
            if (columnRoom[i][0] === "") {
                var currentSheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet("No Room");
            } else {
                var currentSheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet(columnRoom[i][0]);
            }
            currentSheet.appendRow(header);
            currentSheet.appendRow(rows[i]);
            completedRooms.push(columnRoom[i][0])
            last = columnRoom[i][0]
        } else if (last == columnRoom[i][0]) {
            var currentSheet = SpreadsheetApp.getActiveSpreadsheet()
            currentSheet.appendRow(rows[i]);
        }
    }

Is there a way to do it faster? I'm thinking about appending specific rows to a range and use copyTo but I can't arrange it, maybe use map function?
Answer: Your for () loop is unnecessarily calling SpreadsheetApp.getActiveSpreadsheet() in every single iteration. You can define a varible outside of the loop for chaining:
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet()
for (let i = 1; i < columnRoom.length; i++) {
  // something...
  spreadsheet.insertSheet("No Room")
}


Dot product of two vectors in spherical polar coordinates, do I have to convert to cartesian coordinates?

Question: For two vectors $p_1=(r_1,\theta_1, \phi_1)$ and $p_2=(r_2, \theta_2, \phi_2)$ I want the dot product $p_1\cdot p_2$. However, the solutions I have seen, involve finding the components in Cartesian coordinates and using them to get the dot product
e.g.,
$$p_1\cdot p_2= r_1r_2\sin{\theta_1}\cos{\phi_1}\sin{\theta_2}\cos{\phi_2}
+r_1r_2\sin{\theta_1}\sin{\phi_1}\sin{\theta_2}\sin{\phi_2}
+r_1r_2\cos{\theta_1}\cos{\theta_2}$$
My question is, is it necessary to convert to Cartesian?
I thought that in spherical polar the dot product would be:
$p_1\cdot p_2=(r_1r_2+\theta_1\theta_2+\phi_1\phi_2).$
It gives the wrong answer, so I know I am going wrong but not sure where. So, where I go wrong?
Answer: The formula
$$ \sum_{i=1}^3 p_i q_i $$
for the dot product obviously holds for the Cartesian form of the vectors only. The proposed sum of the three products of components isn't even dimensionally correct – the radial coordinates are dimensionful while the angles are dimensionless, so they just can't be added.
One can't simplify the calculation much. At most, one may realize that the inner product will only depend on $\phi_1,\phi_2$ through their difference $\phi_1-\phi_2$ because one may use the rotational symmetry around the $z$-axis to set e.g. $\phi_2$=0.
While doing so, we may set $\phi_2=0$ i.e. $y_2=0$ and the inner product reduces to
$$ x_1 x_2 + z_1 z_2 = r_1r_2 (\sin\theta_1\sin\theta_2 \cos\phi_1 + \cos\theta_1\cos\theta_2) $$
We may restore the form for a general rotation by replacing $\phi_1$ in the formula above by $\phi_1-\phi_2$ to get the inner product
$$ r_1r_2 (\sin\theta_1\sin\theta_2 \cos(\phi_1-\phi_2) + \cos\theta_1\cos\theta_2) $$
which is the same as your formula because $\cos(a-b)=\cos a\cos b +\sin a \sin b$.
Comment: thanks  for taking time to answer. very useful. I was surprised that I had find the components of the vector in Cartesian coordinates in order to calculate the dot product. I was hoping that the I could stay in  spherical polar coordinates.
Comment: You can calculate the dot product in the polar coordinates but you have to use the correct formula and the correct formula is what both of us wrote, not $r_1 r_2+ \theta_1\theta_2+\dots$ or something like that.
Answer: Notice that the radius vector of a point in space with spherical coordinates $r,\theta,\phi$ can be written as $$\mathbf{r}=r\mathbf{\hat{r}}(\theta,\phi),$$ where $$\mathbf{\hat{r}}(\theta,\phi)=\sin\theta\cos\phi\mathbf{\hat{x}}+\sin\theta\sin\phi\mathbf{\hat{y}}+\cos\theta\mathbf{\hat{z}}.$$ Thus the components of the radius vector with respect to the "spherical basis" $(\mathbf{\hat{r}}(\theta,\phi),\boldsymbol{\hat{\theta}}(\theta,\phi),\boldsymbol{\hat{\phi}}(\theta,\phi))$ AT THE POINT with spherical coordinates $(r,\theta,\phi)$ (it is VERY important to realize that the spherical unit vectors are really vector fields, they vary from point to point!) are NOT $(r,\theta,\phi)$. Instead, they are $(r,0,0)$! Indeed, $\theta$ and $\phi$, having no physical dimension, cannot be the components of a vector.
When $r_1,\theta_1,\phi_1$ and $r_2,\theta_2,\phi_2$ are known for two vectors $\mathbf{p}_1,\mathbf{p}_2$, we have $$\mathbf{p}_1=r_1\mathbf{\hat{r}}(\theta_1,\phi_1)\quad\text{and}\quad\mathbf{p}_2=r_2\mathbf{\hat{r}}(\theta_2,\phi_2).$$ (With respect to the spherical basis, we are forced to use different unit vectors $\mathbf{\hat{r}}(\theta_1,\phi_1)$ and $\mathbf{\hat{r}}(\theta_2,\phi_2)$! This is a striking difference between cartesian coordinates and spherical coordinates.) Hence: \begin{align}
\mathbf{p}_1\cdot\mathbf{p}_2&=\left[r_1\mathbf{\hat{r}}(\theta_1,\phi_1)\right]\cdot\left[r_2\mathbf{\hat{r}}(\theta_2,\phi_2)\right]\\
&=r_1r_2\mathbf{\hat{r}}(\theta_1,\phi_1)\cdot\mathbf{\hat{r}}(\theta_2,\phi_2)\\
&=r_1r_2\left(\sin\theta_1\cos\phi_1\mathbf{\hat{x}}+\sin\theta_1\sin\phi_1\mathbf{\hat{y}}+\cos\theta_1\mathbf{\hat{z}}\right)\cdot\left(\sin\theta_2\cos\phi_2\mathbf{\hat{x}}+\sin\theta_2\sin\phi_2\mathbf{\hat{y}}+\cos\theta_2\mathbf{\hat{z}}\right)\\
&=r_1r_2\left(\sin\theta_1\sin\theta_2\cos\phi_1\cos\phi_2+\sin\theta_1\sin\theta_2\sin\phi_1\sin\phi_2+\cos\theta_1\cos\theta_2\right)\\
&=r_1r_2\left[\sin\theta_1\sin\theta_2\cos(\phi_1-\phi_2)+\cos\theta_1\cos\theta_2\right].
\end{align} This is the formula you have given in your post. When we put $r_1=r_2=1$ and call $\omega$ the angle between $\mathbf{p}_1$ and $\mathbf{p}_2$, we get a fairly established formula, namely $$\cos\omega=\sin\theta_1\sin\theta_2\cos(\phi_1-\phi_2)+\cos\theta_1\cos\theta_2$$ since $\mathbf{p}_1\cdot\mathbf{p}_2=r_1r_2\cos\omega=\cos\omega$.
EDIT: never mind, your question ended up at the top of the list because someone recently edited your OP. My bad for not noticing the 2016 date in due time ...
Answer: You can write the dot product of two vectors $p,q$ in the form $\sum_{ij} p_i A_{ij} q_j$ where the matrix $A$ is a kind of "metric" that defines the inner product. In cartesian 3D coordinates this metric is a diagonal matrix, $A = \text{diag}(1,1,1)$, but in the spherical coordinates it takes a different form (and depends on position).
Comment: Should one transform the metric like a covariant tensor to end up with the formula?
Comment: Precisely. And in the case of Euclidean metric in the Cartesian basis, the transformation is rather simple, given by $J^T J$ of the basis transformation, see https://en.wikipedia.org/wiki/Metric_tensor#Euclidean_metric. The metric is useful since it also gives you immediately the volume element, if one needs to do integration.


How to dump the Windows SAM file while the system is running?

Question: I've exploited test machines using metasploit and was able to get the hashes from the SAM file; I've tried running commands as SYSTEM to get them but am unable to do so. What is a more portable method to extract the hashes from the SAM file?
Answer: There is a simpler solution which doesn't need to manage shadow volumes or use external tools. You can simply copy SAM and SYSTEM with the reg command provided by microsoft (tested on Windows 7 and Windows Server 2008):
reg save hklm\sam c:\sam
reg save hklm\system c:\system

(the last parameter is the location where you want to copy the file)

You can then extract the hashes on a Linux system with package samdump2 (available on Debian: apt-get install samdump2):
$ samdump2 system sam
Administrator:500:aad3b435b51404eeaad3b435b51404ee:c0e2874fb130015aec4070975e2c6071:::
*disabled* Guest:501:aad3b435b51404eeaad3b435b51404ee:d0c0896b73e0d1316aeccf93159d7ec0:::

Comment: this just dumps local accounts. to get cached domain creds you need to get SECURITY from the registry too. then you can run: **python /usr/share/doc/python-impacket/examples/secretsdump.py -sam SAM -security SECURITY -system SYSTEM LOCAL** to dump all cached creds.
Comment: which windows flavors does this work on (or rather which does it not)? tried to tell from MSDN website but it doesnt list it (at least i didnt see it)
Answer: It's not a permission issue – Windows keeps an exclusive lock on the SAM file (which, as far as I know, is standard behavior for loaded registry hives), so it is impossible for any other process to open it.
However, recent Windows versions have a feature called "Volume Shadow Copy", which is designed to create read-only snapshots of the entire volume, mostly for backups. The file locks are there to ensure data consistency, so they are unnecessary if a snapshot of the entire filesystem is made. This means that it is possible to create a snapshot of C:, mount it, copy your SAM file, then discard the snapshot.
How exactly to do this depends on your Windows version: XP needs an external program, Vista and 7 have vssadmin create shadow, and Server 2008 has the diskshadow command. The page Safely Dumping Hashes from Live Domain Controllers has more details on this process, as well as instructions and scripts.
Alternatively, there are tools such as samdump which abuse the LSASS process from various directions in order to extract all password hashes directly from memory. They might be much faster than VSS snapshots, but have a higher risk of crashing the system.
Finally, Google brings out this snippet, whose usefulness I cannot rate having never used metasploit myself:
meterpreter> use priv
meterpreter> hashdump

Comment: Yes, those files are actually where the registry database is stored – the file "SYSTEM" holds the data of HKLM\SYSTEM. (I mean, it has to be stored in some file _somewhere,_ does it not?) You can look at `HKLM\SYSTEM\CurrentControlSet\Control\HiveList` to see which subkeys correspond to which files.
Comment: What's the difference between the SAM\SYSTEM files and the SAM\SYSTEM registry subkeys (I'm referring to vmarquet's [answer](https://superuser.com/a/1088644/452686))? Are the contents the same?
Answer: Edit: I decided to edit after many years of abandonment.

The Windows SAM file is locked from copying/reading unlike /etc/shadow on Linux systems. Instead, to get around this tools will extract hashes from memory.
There are ways to get around this that I'll cover below:
Mimikatz
Run mimikatz with sekurlsa::logonpasswords.
fgdump
Similar functionality as mimikatz. Run it, and hashes will be dumped to local files.
hashdump
Built into meterpreter; extracts hashes from memory.
Registry
It's also possible to extract from the registry (if you have SYSTEM access):

reg save hklm\sam %tmp%/sam.reg and reg save hklm\system %tmp%/system.reg
Copy the files, and then run: samdump2 system sam

Backups
SAM file can also be stored in a backup location: C:\Windows\Repair\SAM
I should also mention that the tools will at a minimum require Administrator privileges; and most will not get all hashes unless SYSTEM access is attained.
Comment: Maybe I've misunderstood, but in what way are tools like `Mimikatz` or `fgdump` any more portable than C&A or different to it? As far as I can tell they're all third party tools that don't come packaged with Windows and need to be loaded separately. Also, for my own curiosity, what's the use case for hash-dumping tools when tools like Ophcrack exist?
Comment: Can mimikatz be used to crack local hashes on a powered-off system via a bootable disk, or is it only designed to run on a powered-on system?
Answer: Would like to specify additional method that is not described here, as lots of time in Red Teaming / Penetration Testing the most obvious ways are not accessible (denied, are monitored by Blue Team, etc.) and it's nice to know all available techniques.
One of workaround of accessing files, which system has handles on (cannot copy/remove as usual), is vssshadow.exe told above.
Second - esentutil.exe.
Exact command to take a copy of file with handle:
esentutl.exe /y /vss c:\windows\ntds\ntds.dit /d c:\folder\ntds.dit
This applies to SAM, SYSTEM, SECURITY, NTDS.DIT etc.
P.S.
There's esentutl.py in impacket's package:
https://github.com/SecureAuthCorp/impacket/blob/master/examples/esentutl.py
P.S.S.
esentutl PoC image
Answer: Obscuresec method overcomes your dificulties locally on any windows powershell 1.0 enabled machine. Leaves out some targets i know, but hey, nice job ! (thank you Chris).
Note: Admin privileges are always needed to perform such an operation
You could use

http://gallery.technet.microsoft.com/scriptcenter/Get-PasswordFile-4bee091d

or from another source (more recent i might add)

https://github.com/obscuresec/PowerShell/blob/master/Get-PasswordFile

Advised reading:

http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/12/using-the-windows-api-and-copy-rawitem-to-access-sensitive-password-files.aspx
http://github.com/obscuresec/PowerShell/blob/master/Get-PasswordFile
http://gallery.technet.microsoft.com/scriptcenter/Copy-RawItem-Reflection-38fae6d4
http://gallery.technet.microsoft.com/scriptcenter/Get-PasswordFile-4bee091d
http://blog.cyberis.co.uk/2011/09/remote-windows-sam-retrieval-with.html

For grabbing remote systems SAM and SYSTEM hives use the above mentioned in conjunction with

http://gallery.technet.microsoft.com/scriptcenter/GetRemoteSAM-b9eee22f
Comment: Links are broken.


Display any welcoming message during Sign Up?

Question: I am trying to implement a step by step sign up process for my app, like the ones seen on Facebook (mobile app) and Twitter. My question is, once the user clicks on the sign up button should I display any welcoming message ( for example, Welcome to my app! It only takes a few minutes to sign up) or should I just start the sign up questions without any messages?
Answer: Whether you show a welcome message really depends on the tone you are trying to set for your application. If it's a friendly, chatty application, then a welcome message could set that tone straight away, and set future expectations for interacting with the app. If it's a formal business application, then a welcome message may not be necessary or appropriate.
If you do want to show a message, I would recommend showing it either on the same page as the Sign Up button, or on the first page (ideally the only page) of the Sign Up form. In other words, don't make users click through a welcome message just to get to the first proper step of the task.


What comes after string theory/M-theory?

Question: Classical mechanics is a good approximation to special relativity, which is a good approximation to general relativity etc. I have heard that if string theory/M-theory is right, then it is not just an approximation to a more accurate theory, but represents the end of the line as a TOE, why is this so? Can this be proved in string theory/M-theory?
Comment: The claim would be that if string theory is right, then it's self-consistent at all energy scales and agrees properly with general relativity and the standard model in their common domains of applicability. That's very different from claiming that no physical theory can ever supersede it.
Comment: The general rule is, that not everything that you hear is correct. This would be one of these things. First of all, we don't even have string/M-Theory worked out, yet. We have a large collection of facts about string theory, and a smaller collection of facts about M-theory. If these mathematical structures have anything to do with reality is an unsolved experimental problem. A single experiment can completely take them off the table as relevant physics models, and certainly rule them out as ToE. If you want to apply more skepticism, it's not even clear that a ToE can even exist.
Answer: I would say that the questions that String/M-theory try to answer are the last ones that our current knowledge of reality allows us to ask.
One may think they are the last ones because they are already indirect, as no obvious experimental fact contradicts the current theories (General relativity and the Standard model of particle physics). Instead of experimental problems, M/String theory addresses the theoretical inconstencies between those theories. This could be seen as far-fetched (not to me), but for sure it will be difficult to imagine more questions afterwards.
Now, one should be careful with the idea of theory of everything for two reasons.

M/string theory progresses, but has not reached yet the point of predicting new facts to allow testing it. It is more in the state of 'consistent set of ideas' than in the state of a complete theory. It might occur that to produce predictions, it has to lower its ambitions to "theory of almost everything".
Past history tells that it already occurred that the Physics community thought collectively that "all was known (but a couple of details)" and actually the "details" led to complete changes (e.g. the creation of quantum mechanics & relativity).

Time will tell!


Removing and adding VLAN tag create buffer wrap around (NDIS MUX Intermediate Driver)

Question: I am using the "NDIS MUX Intermediate Driver and Notify Object" driver on WEC2013 to simulate 3 different networks with one ethernet adapter (3 VELAN).
My board is running a Freescale iMX6 processor connected to a Marvell switch. The switch is programmed to have 3 VLAN, one for each network.
This NDIS driver ([https://code.msdn.microsoft.com/windowshardware/NDIS-MUX-Intermediate-3e97f538][1]) is supposed to support this kind of configuration.
On startup everything is working fine, but after 64 rx transactions, the driver starts receiving the same headers as at the beggining. If I check the TCP sequence number, it's look like transaction headers are wrapping around.
The driver uses the VLAN tag from the receive transaction to determine on which virtual ethernet lan this transaction is supposed to go. Then it removes the VLAN tag and send the transaction to the VELAN.
// Code used to Strip off VLAN TAG header
pDst = (PVOID)((PUCHAR)pFrame + VLAN_TAG_HEADER_SIZE);
RtlMoveMemory(pDst, pFrame, 2 * ETH_LENGTH_OF_ADDRESS);
NdisAdvanceNetBufferDataStart(NET_BUFFER_LIST_FIRST_NB(NetBufferList), VLAN_TAG_HEADER_SIZE, FALSE, NULL);*

// Code used to resend the transaction
NdisMIndicateReceiveNetBufferLists(pVElan->MiniportAdapterHandle, CurrentNetBufferList, PortNumber, 1, NewReceiveFlags);

After the transaction is handled by the upper protocol statck, the driver reinsert the VLAN tag before returning the netbufferlist.
// Codes to reinsert the tag
Status = NdisRetreatNetBufferDataStart(NET_BUFFER_LIST_FIRST_NB(NetBufferList),VLAN_TAG_HEADER_SIZE,0,NULL);
NdisMoveMemory(pFrame, pFrame + VLAN_TAG_HEADER_SIZE, (2 * ETH_LENGTH_OF_ADDRESS));
NdisMoveMemory(pFrame + (2 * ETH_LENGTH_OF_ADDRESS), &Tpid, 2);
NdisMoveMemory(pFrame + (2 * ETH_LENGTH_OF_ADDRESS) + sizeof(Tpid), &ReceiveNblEntry->TagHeader, 2);

I did many researches on the Net to know if it is legal or not to directly modify the net_buffer of a net_buffer_list and did not find a clear answer (I think it was not before NDIS 6 but with NDIS 6 it is ok).
If I comment the codes to remove and reinsert the VLAN tag, everything works fine (of course the transaction is not recognized at the upper level because of the tag). That's why I am not sure if it is legal to change the buffer directly. But this driver is supposed to work.
Any idea?
Answer: To solve my problem, I created a temporary buffer, copy the one received from the miniport driver and then I removed the tag from the copy and frowned the copy to the upper protocol layer.
This way, I never have to modify the original buffer and everything is now working fine.
Hope this will help someone else.


Contract Deployment "not enough funds for gas" Arbitrum

Question: I am trying to deploy a contract using the following code:
 const Contract = await ethers.getContractFactory("Contract", {
    libraries: {
      UtilsLibrary: "0xF...e",
    }
 });
let pool = await Contract.deploy({gasLimit: 10000000, gasPrice: ethers.utils.parseUnits("1", "gwei")})

When I run this on Kovan, Goerly, Arbitrum Goerly, this works totally fine (obviously I correct the library address). When I run this on the Arbitrum mainnet I get an error saying "not enough funds for gas". I have changed multiple RPCs and result is not luck.
Contract takes about 5 mil gas to deploy and I have about 1 ETH in wallet. I really have no more ideas on what might be wrong here. Any suggestions appreciated.
UPD: I have deployed the UtilsLibrary totally fine as part of the script as well. So the correct signer is being used and it has funds.....
Answer: I had to increase the gas limit to 100mil and it took 80 mil to deploy. I am not sure why similar transaction only took 5mil on kovan and Arbitrum testnet
Answer: Arbitrum has a different way to compute gas cost, see here https://developer.offchainlabs.com/docs/Differences_Overview#fee-stats
In particular, calldata is more expensive than L1, and this explains the  contract deployment extra cost.