What does Detect [Alignment] show for a possessed creature?

Question: What does Detect [Alignment] reveal about a creature that is possessed? Does it reveal the presence of the base creature's alignment, the possessing creature's alignment, or both?
Answer: I think the answer would depend on the alignment of the creature being possessed and the alignment of the possessing creature. Looking at the spell Detect Evil from the PHB:

You can sense the presence of evil. The amount of information revealed depends on how long you study a particular area or subject.
1st Round
  Presence or absence of evil.
2nd Round
  Number of evil auras (creatures, objects, or spells) in the area and the power of the most potent evil aura present.
3rd Round
  The power and location of each aura. If an aura is outside your line of sight, then you discern its direction but not its exact location.

So if an evil creature is being possessed by another evil creature, the caster would be able to detect that there are 2 evil aura's on the creature.  Note that the caster doesn't know the source of the aura; hence they couldn't tell if it is possession, an evil magical item, or an evil spell on the creature.
If a good creature is being possessed by an evil creature, the caster would be able to detect that there is 1 evil aura on the creature. Again, since the source of the evil is not known there is no way to tell if it's a possession, an evil magical item, an evil spell, or if the creature actually is evil... though most players jump to the conclusion that it's an evil creature, which can make a great adventure hook.
Comment: This actually burned my paladin once.  A good NPC was being possessed and controlled by a mind flayer.  So my paladin sensed evil, believed he was evil, and killed him.  As a result, he faced torment and punishments of slaying a good aligned creature and had to set out to redeem himself.
Answer: Possession is usually described in fiction as someone's mind (or a piece of it) entering one's body and taking control over it from the rightful owner; contrast with domination and other forms of mind control, where the controller's mind stays where it is but sends instructions.
Detect Evil in the PHB says that you can "sense the presence of evil", and the other parts of the description all refer to evil auras (basically to detect strength and number of evil presences). So I'd think that if one creature possessed another, then both of them would show up for Detect [Alignment] (subject to their actual alignments) since both of them are present in some form.


Pop! OS wakes up from suspend with a black screen

Question: Release: 20.04, Gnome. Without grub. On a Lenovo IdeaPad Flex 5 (2020) 2-in-1. I found this thread advising to edit the grub file, but this distro doesn't have grub. Is there a similar file I could edit instead? Or would it work if I were to install grub?
Answer: 5.7 was the right kernel!
Now I can put the laptop in Suspend, and it will wake up without a black screen!


Substitute a Li-ion Polymer Battery with AA(A)s

Question: My headset broke a few days ago, but the circuit board still functions properly. I want to see if I can re-use it by soldering two 3.5mm female plugs to it, so I can use it with any speaker or headset. The problem is, it used this battery, I don't dare to play with those batteries. So I was wondering if it's possible to replace it with 3 AA, AAA, or another more common battery instead.
Comment: I would say they used that battery so that it would fit neatly into their housing. So long as you provide the correct voltage to the circuit and the batteries you use can handle the load, it shouldn't matter too much.
Comment: The original battery is easy enough to use and safe enough if used sensibly. You will have a charger for it already. It is by far the easiest solution to your needs. Do any connectins is a place where fire is not a problem. Fire is very unlike;ly if you are careful. LiIon can cause problems but they are 'afe enough' in normal use. Many millions are sold and used yearly without incident. Th % that fail spectacularly is extremely small.
Answer: If you can make them fit, either 3 AA or AAA would work, but unless you know the circuit, you should stick as close to the existing battery voltage and capacity as possible.  That would mean you have to look at the NiCD or NiMH batteries only, as they are 1.2V per cell.
Given a choice, I'd go with the NiMH option, as not only will you get the 1.2V per cell, or 3.6V in series, but you will also get almost the same capacity as the existing LiP battery currently.
With either of the above batteries, you will need to recharge them externally, or modify the charging circuit of your device.
The above is from making the assumption that you want to stay away from Li-ion Polymer batteries, as stated in your question.  If it is only that particular one that you want to avoid, but don't mind working with them, the best option in an AA or AAA case would obviously be an AA Li-ion Polymer cell. 3.7V per cell, the same capacity, and rechargable by the same circuit as the original.
Comment: Then I think I will get 3 NiMH AA or AAA. When you say capacity, do you mean the mAh? since from what I know, going from 670 to 2050 would make no difference other than making it last longer, or am I wrong?
Comment: Yes, I am referring to mAh.  The higher, the longer duration you can use the device.  Li-Ion would have the highest capacity, then NiMh, then NiCd.
Comment: You said "stick as close to the existing battery voltage and capacity", so would it be bad if I had the same voltage but higher mAh?
Comment: No, higher capacity isn't an issue.  Lower could be, that depends, but for headphones, even lower wouldn't be an issue.


'cut one off /loosen grip'

Question: 'Cut one off, or loosen grip'.
Meaning if someone asks you to do something for them and you accept, but you then just don't do it. We have an idiom that translates something around the lines of 'he cut me off or he loosened his grip'. They come from the idea of one holding on to a rope and the other person is below him and he cuts the rope or loosens his grip and he just falls. (It may be down to the fact that the person is putting more weight on the rope or because you can no longer hold on, so it's pretty much the same thing that he's going to burden you with something, and at that time you didn't have the impropriety and indecency to disappoint him/ it felt hard to say it to his face etc. so you just had to accept although falsely). That person has entrusted you and put confidence in you and then you just completely disregard him and forget about him for some reason or another.
Similar idiom?
Comment: We use ***to let someone down***  "I trusted him, but he *let me down*
Comment: The word is [renege](http://www.merriam-webster.com/dictionary/renege).
Answer: As Jim comments, a common usage is "He let me down". For example: "He promised to mend my car but he let me down"; "We arranged to eat together but she let me down".
Comment: Nice! A neat and rather amusing contrast of two acceptable phrases: she stood me up or let me down.  But I would not say my garage mechanic stood me up! I am not that sort of fellow.
Comment: Actually, She "*stood you up.*"  :)
Answer: "He flaked on me." Someone who habitually fails to do as promised is a flake. It does not conjure the same mental image as "he loosened his grip", but it means the same thing idiomatically.
The most common usage of the verb "flake" is when someone agrees to meet someone else (especially on a date) and then does not show up. But the verb applies equally well to any kind of decision not to meet a commitment.
Another answer says "he let me down." While this idiom conjures a mental image similar to "he loosened his grip", its meaning is broader. "He let me down" really means "he disappointed me". It could mean "he refused to do as promised" or "he tried and failed" or "he did a bad job" or "he waited until it was too late" or "I was left unsatisfied."
But "he flaked on me" specifically means "he intentionally did not do what he agreed to do."
Comment: I've never heard the 'flake' one but I agree with 'let me down' which is a very common phrase.
Comment: @chaslyfromUK maybe "flake" is an American thing.
Comment: I don't ever recall "flake" used in this sense. "Flaked out" may be used for someone who left a group of comrades when the going got tough.
Comment: @Jordan - I'm from the UK, and familiar with that use of "flake". (This may be due to the significant amount of time I spend watching US sitcoms though).
Answer: Drop the ball, as in "I counted on him but he 'dropped the ball.'"
Similarly: "Hung me out to dry"; "Left me high and dry"; "Left me hanging".
Comment: "Drop the ball" means *failed*, rather than *chose not to do something he's said he would*. Your other answers have some merit. They could all do with a definition of the phrase though.
Comment: Say what? If you *choose not* to do something, then of course you have *failed* to do it! If for example, my husband said he'd pick up the laundry from the dry cleaners after work, but decided to go out for beers with the guys instead. Yeah, he sure as hell did "drop the ball!" And then he'd be "*in the doghouse*" too!   :)
Comment: Not sure what you're struggling with here. Yes, if you choose not to do something, then you have failed to do it. BUT if you have failed to do something *it does not necessarily mean that you chose not to do it*. OP wanted something which meant *chose not to do it*; you gave him something which meant *failed*.
Comment: Not sure why you want to reduce a phrase with a rather broad spectrum of usage, down to a single word. *That's* a fail. _Sven Yargs_ covered this topic quite thoroughly on this site, in response to "The history of the phrase, "to drop the ball." [closed] from March 31. Needs no further clarification there.

'cut one off /loosen grip'


Does it make sense to salt water after it boils?

Question: Does it make sense to salt water after it boils? On the one hand, salted water has a higher boiling point. On the other hand, it increases regardless of whether you salt at one point or another
Answer: As @Sneftel wrote, the amount of salt used in cooking will not change the boiling point of water by any appreciable amount. However, if you are adding salt to water for flavor or other purposes, there is a good reason to add salt only once the water is boiling (or at least hot), especially if you are using a stainless-steel pot.
Salt crystals left undissolved at the bottom of a pot of cold water can corrode the stainless steel of the pot and result in pitting and discoloration. If you add the salt only once the water is hot/boiling, it will dissolve right away and not sit at the bottom to cause corrosion.
Comment: I don't understand this argument. Unlike sugar, salt dissolves at the same speed in both cold and hot water. So, how does adding it to boiling water protect the pot?
Comment: I'm also not buying the whole "salt damages the stainless steel pot" thing.  Not only have I made pasta in salted water for the last 20 years with no visible damage, I've even cooked things like salt potatoes in it, which require a supersaturation of salted water.  Gonna open this as a new question.
Comment: Update: we already have a really good answer on the salt-in-pasta-water thing, and the answer documents that it's a myth: https://cooking.stackexchange.com/questions/30253/is-there-evidence-that-adding-salt-to-water-prior-to-boiling-can-damage-a-stainl
Answer: The boiling point of water is not significantly affected by adding normal quantities of salt. If you're just trying to change the boiling point of water to the point where it has an effect on cooking, it doesn't make sense to add salt before or after it boils.
Answer: Adding salt to the water doesn't change the boiling point that much, as stated in other answer.
There is one reason for adding salt after the boiling: in stainless steel pan, the chloride from the salt can in the long run damage the steel. This effect is more pronounced with higher concentration of chloride, thus leaving the clump of salts at the bottom of the pan while the water eats up helps this higher concentration build up, together with giving more time for the chloride to work.

Stainless steel is often used in reinforced concrete structures, as despite being one of the most affordable structures, reinforced steel has poor durability. This lack of durability is exacerbated in severe conditions such as those in contact with oceans, de-icing or other chloride-contaminated environments. On the surface of steel, a thin oxide layer forms following exposure to an alkaline medium. When this layer is exposed to a large concentration of chloride ions it can be destroyed.


Shut off external css for element or line number

Question: Is there a command via css/javascript/jquery that shuts off external css(css included through <link type="text/css" rel="stylesheet" href="css/style.css"/>) for a certain element or starting at a certain line in a file? I am running into a problem with css from a template that my company bought interfering with css, html and jquery elements that I built out separately. The template is pretty robust and I would rather not mess with it. In the end I would like it to be that the template is it's own entity and the code that I add in be none the wiser of the template.
Comment: You'll probably have to explicitly override the styles with a stylesheet of your own.
Comment: Just make a backup copy of the CSS before you mess with it.  Then use Firebug or other developer tools to identify the offending lines.
Answer: No, there isn't. You need to arrange your existing CSS to do what you want.
By making your CSS "more specific" you can override the other styles.
See: http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/
Answer: I think I understand what you're saying...you're using this template that works pretty well, but you want to use your own style for the inner content areas without interfering with the main template layout and vice-versa. In that case, I'd make specificity my friend.
There's probably a main content div/section somewhere in there. You can either apply your own class to that div:

...or nest another div inside:

This will give you a somewhat clean slate so you can apply your own styles to .my_class and everything inside it.
.my_class { //new style rules that will only apply to my stuff}
.my_class p { //only applies to paragraphs within my_class }
.my_class a { //only applies to anchors within my_class }
//etc...

Answer: You can continue to include the robust template and then link to your own specific CSS file (i.e. include two CSS files). In your personal CSS file just reset the CSS for what you don't want to use the template for.
Or simply redefine a style. If the robust template uses
table.class

Then redefine table.class in your own CSS file which you include AFTER the robust template.


Most efficient way to read from external accessory input stream and push to s3?

Question: I am trying to read up to max 2MB from an external accessory via bluetooth and its taking a lot longer than expected. We are optimising on the external accessory side of things but I am looking also for a more efficient way to write the data to a temporary file before uploading it to s3 or even better just piping the inputstream straight to s3.
At the moment we have a very simple mechanism which is pretty much based on the EADemo code and aws examples:
<code>// low level read method - read data while there is data and space available in the input buffer
- (void)_readData {
#define INPUT_BUFFER_SIZE 1024
    uint8_t buf[INPUT_BUFFER_SIZE];
    while ([[_session inputStream] hasBytesAvailable])
    {
        NSInteger bytesRead = [[_session inputStream] read:buf maxLength:INPUT_BUFFER_SIZE];
        if (_readData == nil) {
            _readData = [[NSMutableData alloc] init];
        }
        [_readData appendBytes:(void *)buf length:bytesRead];
    }

    [[NSNotificationCenter defaultCenter] postNotificationName:SessionDataReceivedNotification object:self userInfo:nil];
}
</code>
And our _sessionDataReceived:
<code>- (void)_sessionDataReceived:(NSNotification *)notification
{
    SessionController *sessionController = (SessionController *)[notification object];
    uint32_t bytesAvailable = 0;
    NSData *streamData;

    while ((bytesAvailable = [sessionController readBytesAvailable]) > 0)
    {
        streamData = [sessionController readData:bytesAvailable];
    }

    if (![_fileMgr fileExistsAtPath:_deviceFile]) {
        [_fileMgr createFileAtPath:_deviceFile contents:nil attributes:nil];
    }

    NSFileHandle *fileHandle = [NSFileHandle fileHandleForUpdatingAtPath:_deviceFile];
    [fileHandle seekToEndOfFile];
    [fileHandle writeData:streamData];
    [fileHandle closeFile];

    NSDictionary *attributes = [_fileMgr attributesOfItemAtPath:_deviceFile error:NULL];
    unsigned long long fileSize = [attributes fileSize];

    if (fileSize == (ourExpectedBytesSize)) {
        [self sendToS3];
    }
}
</code>
And our sendToS3:
<code>- (void)sendToS3
{
    _s3filekey = [NSString stringWithFormat:@"%@/files/%@", user, _deviceFilename];

    AmazonS3Client *s3 = [self s3Client];

    S3TransferManager *tm = [S3TransferManager new];
    tm.delegate = self;
    tm.s3 = s3;

    S3PutObjectRequest *por = [[S3PutObjectRequest alloc] initWithKey:_s3filekey inBucket:_uploadBucket];
    por.requestTag = @"sendToS3";
    por.filename = _deviceFile;

    [tm upload:por];
}
</code>
What would be the best way to get and push this data to s3 as fast/efficiently as possible?
Answer: You might want to try to send data to S3 in a background thread.


Story title query -- reality conforms to belief

Question: I remember reading at least one story (there's probably more
than one use of this premise around) in which reality was literally shaped by
human belief. So when people believed the Earth was flat, it was. When they
believed in the ether, it existed. So when enough people believed the Earth was
a sphere, it became one. Does anybody know the title?
Comment: That's a common trope. It'll be hard to pinpoint the book. Is there anything else you remember?
Comment: https://en.wikipedia.org/wiki/The_Secret_(book)?
Comment: I'm surprised to see their isn't really a TV tropes page for this. http://tvtropes.org/pmwiki/pmwiki.php/Main/ClapYourHandsIfYouBelieve includes a few stories like this but mostly it's just about specific entities that are made real or given power by belief in them, rather than all of reality being determined by belief.
Answer: I remember reading at least one story (there's probably more than one use of this premise around) in which reality was literally shaped by human belief.
A classic science fiction story on that theme is the 1950 novelette "The New Reality" by Charles L. Harness (which may also be the answer to this old question), first published in Thrilling Wonder Stories, December 1950, available at the Internet Archive. A character in the story explains the premise:

The ontologist continued rapidly. "All of you doubt my sanity. A week ago I would have, too. But since then I've done a great deal of research in the history of science. And I repeat, the universe is the work of man. I believe that man began his existence in some incredibly simple world— the original and true noumenon of our present universe. And that over the centuries man expanded his little world into its present vastness and incomprehensible intricacy solely by dint of imagination.

So when people believed the Earth was flat, it was. [. . .] So when enough people believed the Earth was a sphere, it became one.

As I got deeper into the manuscript, my mouth grew dry, and my heart began to pound. This, I knew, was a contribution the like of which my family has not seen since Copernicus, Roger Bacon, or perhaps even Aristotle. It seemed incredible that this silent little man, who had never been outside of Koenigsberg, should hold the key to the universe—the Critique of Pure Reason, he calls it. And I doubt that even he realizes the ultimate portent of his teaching, for he says we cannot know the real shape or nature of anything, that is, the Thing-in-Itself, the Ding-an-Sich, or noumenon. He holds that this is the ultimate unknowable, reserved to the gods. He doesn't suspect that, century by century, mankind is nearing this final realization of the final things. Even this brilliant man would probably say that the earth was round in 600 B.C., even as it is today. But I know it was flat then—as truly flat as it is truly round today. What has changed? Not the Thing-in-Itself we call the earth. No, it is the mind of man that has changed. But in his preposterous blindness, he mistakes what is really his own mental quickening for a broadened application of science and more precise methods of investigation—

When they believed in the ether, it existed.

Check history of gravity—acceleration. Believe Aristotle unable detect acceleration. Galileo used same instruments, including same crude water clock, and found it. Why? . . . Any reported transits of Vulcan since 1914, when Einstein explained eccentricity of Mercury orbit by relativity instead of by hypothetical sunward planet? . . . How could Oliver Lodge detect an ether-drift and Michelson not? Conceivable that Lorentz contraction not a physical fact before Michelson experiment? . . . How many chemical elements were predicted before discovered?

A more recent story with a similar premise is the 1989 novella "Matter's End" by Gregory Benford. Both stories end with the-world-as-we-know-it destroyed as the result of a physics experiment: the disintegration of a photon in Harness's story, observation of proton decay in Benford's. However, the idea that the earth used to be flat, or that the luminiferous ether used to exist, is not mentioned explicitly in Benford's story, although the moon does assume a cubical form near the end:

Smooth glistening forms began to emerge from the rough, coarse earth. Above the riotous, heaving land the moon was now a brassy cube. Across its face played enormous black cracks like mad lightning.

The idea of reality shaped by the human mind may have its origin (as a sci-fi premise) in the 1942 novella "Waldo" by Robert A. Heinlein; see Organic Marble's answer.
Answer: I don't really imagine this is the story you seek, but Heinlein's Waldo contains a passage I've always liked, which beautifully encapsulates the worldview you describe:

Suppose Chaos were king and the order we thought we detected in the
  world about us a mere phantasm of the imagination; where would that
  lead us?  In that case, Waldo decided, it was entirely possible that a
  ten-pound weight did fall ten times as fast as a one-pound weight
  until the day the audacious Galileo decided in his mind that it was
  not so.  Perhaps the whole science of ballistics derived from the
  convictions of a few firm-minded individuals who had sold the notion
  to the world.  Perhaps the very stars were held firm in their courses
  by the unvarying faith of the astronomers. Orderly Cosmos, created out
  of Chaos -- by Mind!
The world was flat before geographers decided to think of it
  otherwise.  The world was flat, and the Sun, tub size, rose in the
  east and set in the west.  The stars were little lights, studding a
  pellucid dome which barely cleared the tallest mountains.  Storms were
  the wrath of gods and had nothing to do with the calculus of air
  masses. A Mind-created animism dominated the world then.
More recently it had been different.  A prevalent convention of
  materialistic and invariable causation had ruled the world; on it was
  based the whole involved technology of a machine-powered civilization.
  The machines worked, the way they were designed to work, because
  everybody believed in them.
Until a few pilots, somewhat debilitated by overmuch exposure to
  radiation, had lost their confidence and infected their machines with
  uncertainty -- and thereby let magic loose in the world.
Answer: This reminds me a lot of "The Vanished" by John Peel.
The story starts with a handful teenagers waking up to find the world empty, the people vanished.  They eventually discover find out they are part of an experiment, testing that same theory -

they were dropped on an uninhabitable alien world, and since they weren't allowed to know about the experiment they believed a copy of their world into existence... cheap and easy terraforming.

The experiment proved the theory, in that all the kids survived
the poisonous alien atmosphere, but ultimately failed because the world (cities, tech and all) was too complex, the kids were too few, and they discovered the experiment - which had depended on the unquestioning belief in their surroundings that knowledge of the experiment undermined.  In the end, a couple of the kids manage to deliberately believe, and so create, a simpler but survivable garden world.
The theory (of reality conforming to belief) comes up during the story as a plot point - with some people [called cornerstones] being better at influencing the collective reality than others.  The world was maintained through this combination of consensus and change so that, for example, the earth could transition from flat to round by individuals (including animals) being persuaded to believe or disbelieve those theories and 'discoveries'.  It's spelled out pretty clearly in the text, but I don't have a copy on hand.
I'm not sure if this is the story you're looking for, since there's a handful of works with similar premises... but it seemed pretty similar and inspired me to find the story again, I hope it helps.


Pipe under outdoor faucet leaking. Any ideas?

Question: my outdoor faucet seems to be leaking. My gf wrapped it up with tape to try to reduce the flow (bless her) I don't know what pipe or piece seems to be connected under the actual spigot. Does anyone have an idea of a fix or replacement method?
Comment: A picture will help.  It sounds more like the garden hose or vacuum break leaking than the pipe from the house to the spigot.  If the first, then closing/shutting off the spigot should work.  If the second then need to shut off the water from inside and repair/replace that pipe and/or spigot.
Comment: Uploaded a picture for visual
Comment: Did you experience freezing weather recently?
Comment: The picture helps.  That is an easier repair than a straight pipe out from the the house.  Two wrenches and a replacement pipe/nipple and the water off is all you need.
Answer: If the pipe itself is cracked and leaking, you replace the pipe itself, by unscrewing the spigot from the pipe and the pipe from the Tee fitting below. Such short sections of threaded pipe are called pipe nipples, and can be had in many different lengths from any hardware or plumbing supplier.
If it's leaking from the threads you may be able to stop the leak by tightening the pipe to whichever fitting joint is leaking, or by removing it, reapplying thread sealant (either tape or pipe dope) and reinstalling it.
If the pipe cracked because it froze, you might need to take preventative action to keep it from freezing again, as it is clearly just exposed to the outside air in a manner not suited to anywhere the temperatures ever drop below freezing.


formula to convert precipitation in mm/h to runoff in m³/s

Question: I have precipitation data in mm/h but to use them for my model I need them in m³/s. Is there a formula to convert them?
Answer: When we say there was 1 mm (or 0.001 m) of rain, it is assumed that it is on a 1 square meter area, so it is equivalent to a volume of water of 0.001 $\small\mathsf{m^3}$ (or one liter). So first you have to divide your data by 1000.
Then you have time, which is easy: there are 3600 seconds in one hour. So to convert L/h in m$\small\mathsf{^3}$/s, you have to divide your data by 3,600,000:
1 L/h = 2.7778 x 10$\small\mathsf{^{-7}}$ m$\small\mathsf{^3}$/s.
You can ask this sort of things in WolframAlpha; the trick here is to "convert" mm/h, assumed by the engine to be a speed, in L/h, the volume flow rate hidden by the mm/h unit.
Answer: There is no such simple relationship between rainfall and runoff (I wish there was!).
How much of the rainfall ends up as runoff depends upon at least the following variables:
temperature,
humidity,
wind-run,
hours per day of bright sunshine,
latitude,
altitude,
type and density of vegetation cover,
soil type, thickness and consistency,
antecedent conditions,
soil moisture content,
land slope and orientation with respect to the sun,
underlying geology (lithology, structure, connectivity with surface soils, degree of weathering),
degree of urbanization,
heat island effect,
human intervention,
seasonality.
That is why all catchment models used to estimate the overall rainfall-runoff have to be carefully calibrated using rainfall AND runoff time-series of data. You can't do it by remote sensing. For all the fancy gimmicks and new equipment there is no substitute for boots on the ground.
Golden Rule Nr 1: you can't manage what you don't understand
GRNr2: You can't understand it unless you measure it.
GRNr3: You can't measure it by sitting in an office.
Answer: You cannot make the conversion.  mm/hr describes the amount of precipitation that falls over an area but is independent of the area over which the precipitation falls.  Getting 1 mm/hour implies a light shower, whereas 20mm/hour a heavy rain.  If you describe the precipitation as m3/s you don't really know the rate at which the precipitation is falling without also knowing the area over which it is measured.  For example, if you have 1 m3/hr what does that really mean? it could mean a light dusting of snow if you are talking about 100 hectares of land, or a torrential downpour if your area was 10 meters squared of land.
Typically m3/s is used to measure flow rates for a river, creek, or channel.  You can use rate of precipitation mm/hr in conjunction with an area to determine the total volume of precipitation but overall the two rates are measuring somewhat different things.
Overall without an area you cannot convert mm/h to a volume uses in m3/s.


What size tires/tubes for a Giant cypress dx 6016?

Question: Anyone know what size tubes and tires to get for a Women's 15in Giant cypress dx 6016? The bike is older, I'm guessing 2006-2008 but I'm not positive.
Comment: Get tires that fit the rims, and tubes that fit the tires.
Answer: Without photos or other details, it's a bit hard for us to tell, since the wheels may not be original, etc. Often, your best bet is to find a well-regarded local bike shop and ask them.  You may need bicycle repair in the future, perhaps in a hurry, so this is a good opportunity to find a shop you're comfortable with.
Searching on the net, I did find an old ad for a used https://sidelineswap.com/gear/bikes/complete-bikes/other-bikes/2525465-giant-cypress-dx-hybrid-bike-15-in-frame-24-speed-nice which may be the type you have. It seems to have 700C size wheels.
bikepedia.com is a good resource for bike specs by year, make and model.
Answer: Presumably you want tubes and tyres for a new-to-you bike, and want them to fit the existing rims.
The sidewall of the tyre will have some numbers written there.  If Armand is correct, then there will be something like   "622-35"  or possibly reversed.  This is a standard format called ETRTO.
The 622 is your rim size, and the 35 would be the tyre's width, both in millimetres.
Other possible numbers include 559 (the common 26") and 630 (an obsolete 27 or 28 inch which was neither)

If you're getting a bike with rims but no rubber at all, then it gets a bit harder.  How to determine tire size when the sidewall label is unreadable?
If you're buying spares, in case you need them, then wait till you get the bike in your hands.  There's always a chance someone has modified something, or the model year quoted was off.
Patience - you'll be riding soon !


Linux = Is there something like a "Java Shell" instead of other linux shells?

Question: The programming language I know most about is Java. Currently I have to write quite a lot of "shell scripts" to automate my servers. Is there something like a "Java Shell" so I can write the shell scripts in Java?
Comment: [If all you have is a hammer, everything looks like a nail](http://en.wikipedia.org/wiki/Law_of_the_instrument). Perhaps it is time for you to learn some new programming languages, specially the ones better suited for your current job.
Comment: There's a mighty big difference between using java as your command shell and using java as a scripting language.
Comment: Did you ever notice that hammers come in all shapes and sizes, so that you can choose one suitable for the job at hand?
Comment: I think the point is that, sometimes, we have to fit screws.
Comment: Well, regarding the hammer: Standardization is/can be one of the key "success principles". Of course there's always something more specialized and more appropriate, but this adds a lot of overhead in most cases... My problem is, I actually do only need to prototype something. I am NO programmer I am more a  "business economics" guys... So a java shell (with loose typing...) would have been great... Thanks for all your answers...
Answer: There is no real requirement that "shell scripts" have to be written in a shell language, you could do everything with C or even Assembler, if you like that.
In the context of shell scripts, the shell is nothing more than an interpreter for a programming language, just like Perl or PHP, but heavily optimized for the kind of work you mostly do with a shell script.
In the long term, I would suggest that you learn bash or something, which isn't really difficult because shells are very limited in their abilities so that there isn't too much to learn.
Comment: The main issue with writing administrative programs in a language other than c or a shell is making sure the runtime is available for your language. Most Linux systems come with bash, csh, perl, and sometimes python at install time, but they won't have java.
Answer: You can get groovy and use groovysh.  I've done some things with that, but I find perl or bash/sh the most useful for doing admin scripts.  An application language like Java adds a lot of overhead when all you need to do is execute OS commands and search text.
Comment: +1 for Groovy. It allows you to access the JVM and the full Java API, albeit with Groovy syntax. But if you're a Java developer then it's not that hard to get into. One of the big pushes for Groovy is the ability to write system independent scripts - for deployment, for testing, for anything. Best part - works on Windows, Linux and OS X without changing source. Oh, and yes you could use Cygwin on Windows to run nix based scripts but then you'd have to deal with Cygwin (not fun).
Comment: Actually it's true that it is very hard to replace bash scripting with groovysh. But its the step in the right direction and it seems there are some (although discontinued attemepts) to make it work more like a real shell (for example "grash")... In the End I will have to learn bash. But I hadnt heard of groovysh and I think its the best attempt to having a "java shell"...
Answer: Some of the lighter jvm languages have shells, but those are front-ends to the interpreter, not custom dialects for sysadmining. A good system shell needs to have excellent process and file descriptor support and have concise syntax and builtins, and I don't think that exists in Java.
You can mix programming with scripting with things like chef, puppet, vlad, and the like, but that means learning bash scripting first, because those languages, quite sensibly, delegate commands to the shell. Languages like Ruby, Perl and Python are less verbose and you'll see them used a lot. Java's verbosity and some of its core values (do everything in the jvm, don't leave the ide) make it very ill-suited to the task.
Answer: Yes, there is. I have been using BeanShell from time to time, even though it is not under active development at the moment. It is an interpreter for standard Java syntax and also comes with a graphical interpreter / environment, if required.
You could write your shell scripts as described in the BeanShell docs, but you would have to make the Beanshell jar file available to your Java installation for this (e. g. put it into the /ext/lib folder of your JRE installation), otherwise java will not find the bsh.Interpreter class.
However, I would also recommend to take a closer look at your shell scipting options (you did not mention your environment, but TiZon's recommendation with bash is cool when using Linux). Using a full-blown general-purpose programming language like Java will only get in the way when trying to be productive with shell-like tasks, e. g. moving files around, invoking commands and the likes.
Answer: You should probably take a look at Bash Scripting.
Answer: I wrote jpad.io to allow running java "shell scripts" and interactive snippets while also providing nice visualization of the results. This shows what I mean:

To copy a file using this as a scripting language you would use:
http://jpad.io/example/1I/fileio
final File file = new File("outt.csv");
Object o = new int[] {1,2,3};
JPad.writeCsv(o, file);
java.nio.file.Files.copy(file.toPath(), Paths.get("copy.csv"));

Which you can also run from the command line as:
 > jpad fileio.jpad
 > dir
 29/04/2017  13:30    <DIR>          .
 29/04/2017  13:30    <DIR>          ..
 29/04/2017  13:30                16 copy.csv
 29/04/2017  13:30               160 fileio.jpad
 29/04/2017  13:30                16 outt.csv

Answer: Yes, add the beanshell .jar into your Javahome/jre/lib/ext  directory and then you can launch scripts like so:
java bsh.Interpreter myscript.bsh

Answer: PowerShell, an object oriented shell which can use C# libraries, has been opensourced and is available for Linux.


XSLT IE6 default processor

Question: What is the default XSLT processor for IE6. Does it support EXSLT? Is there anyway to make it support it?
Answer: The default XSLT processor for IE6 is MSXML 3.0. You can forget about doing XSLT in MSXML 3. What it supports is not even a subset of XSLT, but an older draft. However, most people will have MSXML 4 or higher installed, either through a software update, ms office or some other way. XSLT in MSXML 4 and up is really fast, much faster than XSLT in Firefox.
So, don't test for the IE version, but for the MSXML version. Try MSXML 6 first, and if it doesn't exist fallback to MSXML 4. Don't try MSXML 5, it was an intermediate version used by Office, but is no longer supported by Microsoft.
MSXML supports extension functions (Firefox doesn't, sadly), so you could add EXSLT support with javascript.
Answer: You have awakened a tormentor from my past.
MSXML, it was installed as a service update, and the XSLT processor originally included in MSIE6 did not support much of anything other than a very general level of draft functionality.  The service update improved on it greatly.
Because of requiring the presence of a service update we never considered performing any client-side XSLT with MSIE6 and instead performed transformations server-side when the client browser was MSIE6 and relayed the transformed content.
Comment: That sounds interesting. I would like more details about what MSIE6 base install does and does not with respect to XSLT. If only to explain why people should be using Firefox to enjoy my uber-cool XSLT hacks.

XSLT IE6 default processor


Correct bridging for ARC?

Question: I have a category class for NSString.
@implementation NSString (URLEncode)

- (NSString *)URLEncodedString
{
    __autoreleasing NSString *encodedString;

    NSString *originalString = (NSString *)self;
    encodedString = (__bridge_transfer NSString * )
            CFURLCreateStringByAddingPercentEscapes(NULL,
                                (__bridge CFStringRef)originalString,
                                NULL,
                                (CFStringRef)@"!*'();:@&=+$,/?%#[]",
                                kCFStringEncodingUTF8);
    return encodedString;
}

Am I using the correct bridge transfers for ARC and the new LLVM?
The original code:
- (NSString *)URLEncodedString
    NSString *encodedString = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL,
                                (CFStringRef)self,
                                NULL,
                                (CFStringRef)@"!*'();:@&=+$,/?%#[]",
                                kCFStringEncodingUTF8);
    return [encodedString autorelease];
}

Answer: As mentioned in the comments, I think it's fine to talk about ARC and the contents of Automatic Reference Counting here.
__autoreleasing is not meant to be used like that. It's used for passing indirect object references (NSError**, etc). See 4.3.4 Passing to an out parameter by writeback.
According to 3.2.4 Bridged casts, the __bridge_transfer is correct as the CFURLCreateStringByAddingPercentEscapes function returns a retained object (it has "create" in its name). You want ARC to take ownership of the returned object and insert a release (or autorelease in this case) to balance this out.
The __bridge cast for originalstring is correct too, you don't want ARC to do anything special about it.
Comment: I might add that using the `CFBridgingRelease()` macro makes transfer and consumption of CFType Objects way easier to read - at least in my eyes. e.g. `NSData *imageData = CFBridgingRelease(ABPersonCopyImageData(person))`
Comment: Thank-you - this helped immensely. I just wanted to make sure that my understanding of the docs were correctly being applied.
Answer: This is a correct, not leaking version.
As you say in the comments: __bridge_transfer transfer the ownership to NSObject (NSString) and assume that the object is retained by CF Framework (the method CFURLCreateStringByAddingPercentEscapes return a retained object so this is what we need)
than on the self object we don't want to perform any memory management. Hope it helps
Fra
-(NSString *)urlEncodeUsingEncoding:(NSStringEncoding)encoding {
    return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(NULL,
           (__bridge CFStringRef)self,
           NULL,
           (CFStringRef)@"!*'\"();:@&=+$,/?%#[]% ",
           CFStringConvertNSStringEncodingToEncoding(encoding));
}

Answer: -(NSString *) urlEncoded
{
    CFStringRef encodedCfStringRef = CFURLCreateStringByAddingPercentEscapes(NULL,(CFStringRef)self,NULL,(CFStringRef)@"!*'\"();@+$,%#[]% ",kCFStringEncodingUTF8 );
    NSString *endcodedString = (NSString *)CFBridgingRelease(encodedCfStringRef);
    return endcodedString;
}

Answer: No __autoreleasing necessary. The correct ARC syntax is simply:
- (NSString *)URLEncodedString
{
    return CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL,
                                                                     (CFStringRef)self,
                                                                     NULL,
                                                                     (CFStringRef)@"!*'();:@&=+$,/?%#[]",
                                                                     kCFStringEncodingUTF8));
}

Correct bridging for ARC?


How to decide dimensions of PCB heatsink?

Question: I am using MCP73213 IC for charging my 2S Li Ion battery.  I want to use this IC for 1 ampere charging during constant current charge cycle.   My specifications are as follows. Input source voltage : 9 volts(10 % accurate) charge current : 1 ampere during constant charging cycle  Max power dissipation for such application is as follows : (9.9 volts -6 volts)* 1 ampere = 3.9 W Thermal resistance of IC : 62 C/W So rise of temperature during max power dissipation : 62*3.9 = 241 centigrade.   But according to datasheet, IC will die at 150 centigrade. Datasheet of MCP73213 : http://ww1.microchip.com/downloads/en/DeviceDoc/20002190C.pdf  I would like to place PCB heat sink below MCP73213 IC to allow power dissipation. What should be the dimension of PCB heat sink. I am really confused. Please help me in this regard.
Answer: Texas Instruments has this handy guide for PCB heatsinks. AN-2020 Thermal Design By Insight, Not Hindsight
Comment: I love how the app note number is "twenty twenty" in the context of hindsight.  :)
Answer: Given the following...
Ta = 25C

Tj_max = 150C

Theta_Jc = 20.5C/W

P = 3.9W
The maximum allowed junction to ambient thermal resistance is...
Theta_Ja_max = (Tj_Max - Ta) / P = 32°C/W.
The the total thermal resistance (Theta_Ja) is the sum of the junction to case thermal resistance (Theta_Jc) and the case to ambient thermal resistance (Theta_ca).
Theta_Ja = Theta_Jc + Theta_ca
Therefore...
Theta_ca = Theta_Ja - Theta_Jc = 32°C/W - 20.5°C/W = 11.5C/W.
In still air with natural convection a 1 square inch pad of copper typically gives Theta_ca of approximately 40C/W.  To get 11.5C/W you would be looking at a very large pad.  Also you would need multiple layers of copper just to be able to conduct the heat out into a wide enough surface area.
If you insist on using this part you would most likely need one or more of the following...

Using a fan to increase airflow will drastically reduce the junction to ambient thermal resistance.  The fan would be placed directly over the part blowing down onto your 1 square inch copper pad.
A PCB mount finned heat sink could be used.  But that method is going to be expensive and even then you may not be able to get it to work.

To get the heat to the heat-sink, the heat sink would need to be placed directly on the opposite side of the PCB.  You would need to move the heat through the board with a grid of thermal vias placed directly under the pad.
Vias themselves don't have very good thermal conductivity so you would need to fill them with silver or some other high conductivity material.
The pad under the part is not very large so you may not even be able to fit enough vias to make this method work.

My advice would be to find a different part.
Answer: Yup, You are looking at a decent sized grill.
Because the MCP73213 is internally limited, keeping its temperature down that wattage is essential to achieve a steady current output.
I might be wrong, because heat sink design is not my speciality but here's my two cents:
To calculate the thermal resistance of the "profil" needed to keep your IC cool we use:

T_J max = 125 C
T_A (the ambient temp.) = 25 (You can do a plot of this function using T_A as variable, and see how the demands change).
Theta_JC = 20.4
Theta_CS = Depends on how you mount the IC and how well it couples with your PCB trace. Using a Thermal compound will keep this value low.
((125 - 25 )C/3.9W)-(20.5 C/W +1 C/W) = 4.14 C/W
4.14 C/W is a large grill!
Formular from the app note:
http://ww1.microchip.com/downloads/en/AppNotes/Design%20Considerations%20for%205V%20to%203.3V%20Pass%20Regulators.pdf
The datasheet is relatively sparse regarding info on general efficiency and seems to have a flat temp. respons when charging. However, we do not see graphs for more than 500 mA.
For 1000 mA continous, you should consider the following:
PCB trace with lots of copper to dissipate heat - even use vias if possible and use back plate to dissipate heat.
Mount a large grill and consider adding a fan to generate flow. This vastly improves the thermal capabilities of any grill.
General info on thermal:
http://www.designworldonline.com/how-to-select-a-suitable-heat-sink/
Great resource for understanding different parameters.
Answer: Standard copper foil (default 1 ounce/foot^2 foil, 1.4mils thick, 35 micron thick), has thermal resistance of 70 degree centigrade per watt of lateral heat flow per square of foil. For any size square of foil.
Can you use a small fan to cool the foil?
Answer: If you want to dissipate 3.9W and need to keep die temperature at 150°C, then you have to have thermal resistance 38.4°C/W or less.
62°C/W is a property of that device/case, you won't change that.
You have to choose different case, not 3x3 DFN. Or put heatsink on top of that chip (PCB heatsinking is not enough in this case). Or choose different chip or redo your design (you can add LDO to your circuit, before this IC, to drop voltage down to say 5V).


Router Extended Access Control List

Question: Why can't we place the Extended ACL close to the destination not the source ? What will happen if we do so ?
Comment: Typically, you want standard ACLs as close to the destination as possible in order to prevent dropping too much traffic, and you want to place an extended ACL as close to the source as possible in order to not router traffic that is destined to be dropped because that wastes router resources.
Answer: You can place an extended ACL where you want (as long as it is in the path of the packet you want to filter of course). However, depending on the filtering parameters, it is usually better to put it close to the source. This way, undesirable traffic is denied close to the source network without crossing the network infrastructure, which limit bandwidth usage.

Router Extended Access Control List


How do I find the right audience for my book?

Question: I wrote a book about two years ago with almost no prior planning or outlining done before the writing. I've since matured more and figured out that the audience for my book changes from chapter to chapter. I'm not sure how to remedy this- some themes that are non-negotiable in this book are more mature, but I feel that my writing isn't developed enough to write for that audience. How do I solve this?
Answer: Genre and Tone are probably the most important thing to consider in terms of determining your audience. You need consistency.
You see, I'm worried when you say the audience for your book changes from chapter to chapter. It shouldn't.
You see, audiences simply want to be entertained, but everyone has different preferences. Comedy lovers want to laugh, romance lovers want to see some love, and horror lovers want to scream and have nightmares.
If you're reading a horror novel by a guy like Stephen King, you know it's horror even in the light-hearted moments because the tone and world-building remain consistent. Overall, the story is a dark and grim tale. Any fun or sweet moments are only there to lighten the mood.
For King, horror is his thing. He could decide to switch it up a bit, but his horror is what everyone remembers it for. It's like with any talent, you find what you're best at and then you stick with it. Then your audience comes to you.
What you don't want to do is wildly fluctuate between tones at random. It can work, but it's a delicate balance. Don't bounce back and forth between two genres unless you're confident you can pull it off. Lack of consistency is the best way to annoy audiences.
For example, let's say I'm writing a horror novel but I'm not fully committing to it. I want it to be a comedy too. So I'm gonna throw some silly jokes right before the chase scene. And right after. Okay cool, now I'll have the monster maul several people. And...back to more silly jokes. Horror. Jokes. Horror. Jokes. Jokes. Jokes. Horror.
No middle ground, no gradual shift from one tone to the next, only constant indecisiveness. My tone goes from grim to silly so fast it gives my audience whiplash.
That's how you lose your audience, by never committing. Find what you're good at, see how it does, and then, if it doesn't work, you can always learn from your mistakes.
Answer: First Draft: Discovery writing

I wrote a book about two years ago with almost no prior planning or outlining done before the writing. I've since matured more and figured out that the audience for my book changes from chapter to chapter.

This seems normal for a 1st-draft without an outline or plan. The method is generally called 'discovery writing' (as opposed to 'plotting' with an outline).
The strengths of discovery writing are the author's voice, and a pervasive mood or emotion that is maintained throughout – skills that improve with practice.
Horror and mystery are genres that thrive under discovery writing because (typically) just as characters define their goals they are de-railed, murdered, surprised by the plot, etc.
Stories that require character progression, or have very specific goals for each 'act' – ie: tragedy, biography – where each step of the story needs to be well-defined for the overall narrative to work, are not as benefitted by discovery writing.
Second Draft: What did you discover?
The 1st draft is set aside for a few weeks, or more. Two years is not unheard of, you certainly have some distance from the original.
You can now see what works – no need to guess or theorize. This is the main goal of the 1st draft: get it on to the page where it can be read objectively.
Second draft is about making characters consistent (now that you know who they are), fixing plot holes (now that you know what happens), and consolidating the narrative (merge redundant scenes, flesh-out minor characters and worldbuilding, probably re-ording events for dramatic effect, etc).
The second draft is a complete re-write, not just an edit. Elements that don't contribute or support the main theme and story need to be cut. Author-identified protagonists (Mary Sues) need to be reduced to mere characters who serve the story. Antagonists probably need to be paced so the early obstacles seem more important and later obstacles are not telegraphed too soon.
These are major re-writes to character and plot, but the author's voice, and that strong emotional tone is already baked in. 2nd drafts will be better with the benefit of hindsight and the specific 'working' example from the 1st draft.
Third Draft: a commercial product for other people
Beta readers, story doulas, and professional editors should only be consulted after a 2nd draft – after you have already made conscious decisions about how the story should work. There is no point in handing someone a raw manuscript and asking their opinion, if you have not already made the effort to give the story an intentional form and direction through your own second draft.
A third draft is also a complete re-write of the second-draft, but it won't be as drastic. Typically the objectives in the 3rd draft are about narrative pacing, refining the voice of the narrator, and probably few (if any) plot or character tweaks.
The goal is to communicate with a reader through a commercial format they are familiar and comfortable with. These aren't necessarily author-lead decisions.
Why do you write?
If the goal was to write as a hobby you can stop at 1st draft. There is no need to 'fix' something that was done for fun.
If the goal is to become a better writer, to learn about the craft and grow as a person, you can stop at the second draft – or never stop re-writing the second draft. Or write something else.
In 2 years you have matured. Happily this keeps happening your entire life, and writing can be an enriching part of growth and self-realization. It is satisfying to read something 2 years later and think "Hey, that's not so bad!" even when it is not how you would write it today.
If the goal is to publish, the third draft is a commercial product that will compete in a saturated marketplace. Your 'product' will be ruthlessly compared to other works, dismissed by readers who didn't like it, and forgotten by consumers in a fraction of the time it took you to create it.
This isn't everyone's goal, and it shouldn't be, but if you ultimately want to connect with an audience, first you must to impose your own second draft corrections until the story is moving in the direction you want.


No FaceTime app after iOS 8 upgrade

Question: Upgraded to ios8 on my iPad air. There is no FaceTime app on the settings page to turn or or off. How to I set up face time
Comment: So it is not in your Settings ?
Comment: Where are you?  FaceTime goes away in certain mid-eastern countries.
Answer: Since this is a strange and unusal thing that I have never heard of, I can't offer a single solution, however I can offer multiple procedures to try and solve the problem.

Turn your iPad off and back on. Simple yes, but don't underestimate the power this procedure can do. It works wonders!
If that didn't work, try resetting all of your settings. This can be acheived by opening the settings of your iPad and navigating to General -> Reset -> Reset All Settings. This will not cause you to loose any data, however anything in the settings app will be set to their default settings, ranging from iCloud login, WiFi networks, wallpapers and even your ringtone will be set to the default. No data will be lost, but you will need to sit with the iPad for a solid few minutes reconfiguring it again to its proper settings.
Hopefully that worked, because if it didn't it's time for a device fresh restore. This is where you will need to get a computer and a USB to lightning cable and hook it up to iTunes. This procedure will force EVERYTHING to be removed from the device unless you restore it from a backup. So before you do anything, make sure you create a backup by going File -> Devices -> Back Up. Now that you have your backup this step splits into two options for you.

a) Click on the Restore button in the device summary page to wipe the device clean. Once installation is finished and while the iPad is still connected to the computer you may select Restore From Previous Backup. This will restore everything back onto the device, including apps + their data, photos and anything else, even your wallpaper at the time. If the setting STILL isn't there. Then there is no choice to do a full restore and keep it that way

b) The best way to go about is is enable iCloud and sync all of your contacts/calendars/anything else to it if you haven't done so already. Also, a nifty new feature is iCloud Photos where it stores your photos in your drive. You can use this as a first line of backup for photos but if you want you can copy them off your computer while its still plugged in (eg iPhoto if you are on a mac). Once all your important data is backed up somewhere other than the device, hit that Restore button once again. Let it finish and go through the step by step tutorial to setup as a new device.
Proceed to restore all your data by logging into iCloud/redownloading your apps/changing settings once more, but before you do any of this, check to see if the FaceTime setting is there again. If it isn't, you may as well restore from the iTunes backup once again and this time call Apple for support.

Hope it doesn't have to get anywhere further than option 1 but if all else fails I hope it works out for you. Good luck! :)
Answer: I have the same issue. It was when I upgraded but disappeared later.
Nothing on my settings page concerning Facetime.
Tried reset and the result was positive. It did the trick for me. Bad thing I had to reset all my settings back. Time consuming..
Answer: I had the same problem.
I turned off all restrictions in settings, then rebooted and found that Facetime came back. Worth a try before resetting everything.

No FaceTime app after iOS 8 upgrade


When should I create and use my own CA?

Question: I was taking a look to one Docker tutorial in which is explained how to create and use our own CA for encrypting the communication between the Docker client and the daemon and immediately a couple of questions came to my mind: why not always use a CA certificate created by our own (for example, for https)? and when should we use our own CA certificate and when not?
Comment: A **CA** is here to attest the identity of the person you are talking to is the one you think it is. If you are your own CA the user still needs to know that the CA is you at some point, somewhere there has to be a starting point, and that starting point should preferably be a third party already trusted by the user.
Answer: In the context of ssl/tls a CAs main job is to assure the client that the server the client is connected to is the server the client intended to connect to. In some cases it may also be used to verify other things.
Understanding this and understanding your clients is key to understanding when you should create your own CA. You need to ask yourselves some questions.

Will your clients be using generic software or will they be using software you provide?
If it's generic software does it expect to use a system default list of CAs or does it expect an explicit CA to be configured?
Will your clients be on machines you manage?

Once you do this you can assess the pros and cons of using the public CA system or a private CA in your particular context.
Often you will have little choice. Take a public website for example, your clients are using generic software, on machines you don't control and which they will not be prepared to do special configuration of for your site. You have basically no choice but to use a widely recognized public CA.
At the other extreme take something like openvpn. It fully expects you to use your own private CA as a means of identification and access control. Trying to use it with a public CA just wouldn't reasonably work.
A middle ground might be a website for internal use only. Using your own CA here would bring advantages, you could issue certs for internal-only hostnames and you wouldn't be dependent on any external party to issue certs. However it would also bring disadvantages, you would have to install your own root in the main trusted root stores on clients. Getting your root cert into the trusted root stores on the clients may be a pain if you have unmanaged machines around. Having your cert in the trusted root stores would also mean it could be used for MITM attacks on your clients, so you would need to keep the root (and intermediate if applicable) certs under very close control.
Or moving to the software development side consider a program with an auto-update system that relies on tls for security (not a design I would recommend). If you use a public CA on the server and the operating systems default CA list on the client then anyone who can persuade a public CA to give them a cert for your domain can MITM your updates. On the other hand with a private CA the attacker would need to compromise your internal certification infrastructure.
Answer: A CA is a certificate authority which means a third party that attests of your identity.
It is possible to use self-signed certificates for encryption but it doesn't allow attesting that the certificate comes from the proper (authorized) machine.  Anyone could set up a self-signed certificate for your domain name.
If you really wanted to create your own CA to sign your own certificates, you could but it wouldn't have any credibility and would require all browsers to import the certificate manually.
Comment: To add to that, an uninformed client would see connecting to your secured endpoint as an attack initiation. This is because your CA is not in the client's list of trusted CAs.

When should I create and use my own CA?


What is a coversheet provisional patent application?

Question: A lawyer mentioned that to me. Also he compared it to strategic provisional.
Comment: Perhaps this link is applicable: https://www.jdsupra.com/legalnews/risks-of-cover-page-provisional-33077/
Comment: @EricS Thanks. It helps.
Answer: An example of this type of filing would be on the even of a public presentation or meeting with potential investors who gave no obligation of confidentiality an inventor realizes they are about to compromise their patent rights.
They could take all the written materials they have prepared that relate to the product/invention and file it electronically with the USPTO as a provisional patent application (which requires a special cover sheet or otherwise clear, compliant, indication it is a provisional filing. Any other descriptive material can be included with no formal organization.
It might help or might be found wanting if it is later called on to support your ultimate claims. If you follow up with a non provisional within a year of the disclosure with a non provisional application you probably get the benefit of the one year grace period in the US.
Then you don't have the problem the linked article talks about (disclosures or on sale beyond the grace period) and the benefit would be to disqualify purported prior art that has a publication date between the two applications. It could also preserve your rights to file other than in the US. The rest of the world foes not have a grace period.


HTTPS in public wireless network: is it ok

Question: When I am using public WiFi to go to a secured site that uses HTTPS, is my data encrypted? Is it a lot more risky than when I am on a secured network ?
Comment: Ad-hoc or access point?
Answer: Your data is encrypted by the SSL crypto, but anyone on the network (and that means pretty much anyone, on public unsecured wifi) can sniff the traffic.  How secure it is depends on the crypto of the browser you're using and the server you're communicating with, as SSL will fall back to the lowest common cryptographic denominator.
Also keep in mind that some SSL cryptography has been compromised.
For many purposes, though, the SSL encryption will keep your data private enough.  If you're hiding holiday present details from the recipient you're probably ok, but if you're transmitting illicit government secrets you might want to find a more secure network.
One thing of note, unless all your traffic with the website at the other end is encrypted, once you've established credentials with the site if the rest of your session on the site is unencrypted your cookie-based authentication with the site will be out in the open for all to see.  It's not that unusual for sites only to encrypt the data they think is risky when you acquire it but then to use unsecured HTTP for the rest of the session, thereby exposing your cookies (and your identity and authentication on the site) out in the open.
Comment: You can't replay TLS traffic. The server uses a new random number in every handshake, the client has to use this number in the subsequent handshake. TLS would be really stupid if it permitted replays.
Comment: Can you provide a source for your claim that replay attacks of SSL/TLS are possible?
Comment: This question links has some details about TLS and replays and links to the specs.  Only poorly implemented clients/servers would be vulnerable though, which should not include standard browsers. Replays usually are not possible, unless someone has screwed up or found a bug.  http://security.stackexchange.com/questions/3664/ssl-replay-attack-when-client-server-random-is-missing
Comment: No, indeed, I was mistaken, as is (apparently) well-documented.  Answer corrected - thanks for pointing out my error!
Answer: Yes, the HTTPS use SSL. A security Layer.
It encrypt the exchange between your computer and the server.
But like every encryption. It's hackable. But it takes really long time.
Except if you are a secret agent, this security is enough.
Answer: HTTPS is to avoid MiTM attacks, just be aware that if there is a warning you are must likely under attack.
If you are concerned with your privacy, then set up an SSH Tunnel or buy a VPN.
Answer: If you use HTTPS, the actual web pages are transmitted encrypted, but anyone with access to the same WiFi network can see data such as

DNS requests
hostnames of sites you visit due to Server Name Indication (SNI)
the amount of data you transfer from/to specific IP addresses

(WPA2 Enterprise may make sniffing for other users impossible, but that's unlikely to be used for a public WiFi and doesn't prevent the network owner to do such things.)
For better security you should use a VPN. Then the only things other people on the same WiFi should be able to see are the host name (due to the DNS lookup) of your VPN, its IP address and the amount of data you transfer to/from your VPN. There may be additional data leakage when your operating system or a program tries to transmit data while the VPN is not yet connected so the routes are not set up yet. On Android devices there is a setting to block data transfers while not connected to a VPN.


Difference between dysentery and bloody diarrhea

Question: The difference between diarrhoea and dysentery is quite clear; but the appearance of blood in stool or bloody diarrhoea is a very confusing term when compared with dysentery. Are they different in the amount of blood or their etiology or pathogenesis or something else. I searched a lot in the internet and medicine and pathology books but nowhere I could find a straight answer. If anyone knows about it please reply with proper reference and values (if its about the amount).
Comment: I think *dysentery* is always associated with infection but bloody diarrhoea can happen because of many other aetiological reasons. (Although, etymologically, *dysentery* just means an upset gut).
Comment: I am not too sure that's why I am commenting. I'll verify if this is true and then post as an answer.
Answer:
Diarrhoea
Diarrhea is loosely defined as passage of abnormally liquid or unformed stools at an increased frequency. For adults on a typical Western diet, stool weight >200 g/d can generally be considered diarrheal. Diarrhea may be further defined as  acute  if <2 weeks,  persistent  if 2–4 weeks, and  chronic  if >4 weeks in duration.
~Harrison's principles of internal medicine, 20$^{th}$ edition, page 261.

Dysentry
Dysentery is bloody diarrhoea, i.e. any diarrhoeal episode in which the loose or watery stools contain visible red blood. Dysentery is most often caused by Shigella species (bacillary dysentery) or Entamoeba histolytica (amoebic dysentery).
~WHO definition

One can also follow WHO definition of diarrhea for practical purposes but still I mentioned it from Harrison as it is more specific and quantified.
'Blood in stools' generally describe visible blood in stool, and the quantity of stool passed here can be normal like in upper GI bleeding if compared to diarrhoea or dysentry.
Diarrhoea can be classified into four major categories: Secretory, Osmotic, Malabsorbtive, and Exudative, in which exudative diarrhoea show such features of bloody stool.(~ Robbins basic pathology 9$^{th}$ edition page 577).
In fact, it is also clearly mentioned in Harrison in the topic of diarrhoea that:-

Invasive bacteria and  Entamoeba histolytica  often cause bloody diarrhea (referred to as  dysentery).

Conclusively, bloody diarrhoea and dysentry are the same.
Comment: If anyone thinks that there is some issue with this answer please do suggest me by commenting on it, this will help me to improve writing posts next time.


Check if a DHCP server existing in my network using bash

Question: using CentOS with static IP, Is there any way to determinate if a DHCP server running on the network using bash ?
Answer: nmap does this easily:
sudo nmap --script broadcast-dhcp-discover -e eth0

will show:
Starting Nmap 6.40 ( http://nmap.org ) at 2016-08-16 09:25 UTC
Pre-scan script results:
| broadcast-dhcp-discover:
|   IP Offered: 192.168.0.67
|   DHCP Message Type: DHCPOFFER
|   Server Identifier: 192.168.0.1
|   IP Address Lease Time: 0 days, 0:05:00
|   Subnet Mask: 255.255.255.0
|   Router: 192.168.0.1
|   Domain Name Server: 188.8.131.52
|   Domain Name: maas
|   Broadcast Address: 192.168.0.255
|_  NTP Servers: 184.108.40.206, 22.214.171.124, 220.127.116.11, 22.214.171.124
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.27 seconds

Note: there is a similar script for dhcpv6
sudo nmap --script broadcast-dhcp6-discover -e eth0

Comment: Good command but its worth noting that this just outputs the *first* DHCP server that responds. If multiple DHCP servers exists, this command won't find them.
Comment: Although existing answers were fairly good, I much prefer your solution!
Comment: I prefer this variant, but it seems that the machine on which you're executing this, really gets an offered IP assigned to the queried interface. Any way to prevent that?
Answer: If available in the repository there is dhcpdump
from man page:
SYNOPSIS
       dhcpdump [-h regular-expression] -i interface

DESCRIPTION
       This command parses the output of tcpdump to display the dhcp-packets for easier checking and debugging.

USAGE
       dhcpdump -i /dev/fxp0

       If you want to filter a specific Client Hardware Address (CHADDR), then you can specifiy it as a regular expressions:

       dhcpdump -i /dev/fxp0 -h ^00:c0:4f

       This will display only the packets with Client Hardware Addresses which start with 00:c0:4f.

Answer: If you have tcpdump available to you, invoking the program as root with the following parameters might assist you in finding the server:

tcpdump -i [interface id] -nev udp port 68

Unfortunately, due to my network's layout, I can't get a full DHCP handshake captured right away.  However, I do see a DHCP Request from my iPad:
22:16:44.767371 30:10:e4:8f:02:14 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: (tos 0x0, ttl 255, id 15652, offset 0, flags [none], proto UDP (17), length 328)
    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 30:10:e4:8f:02:14, length 300, xid 0x42448eb6, Flags [none]
      Client-Ethernet-Address 30:10:e4:8f:02:14
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: Request
        Parameter-Request Option 55, length 6:
          Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
          Option 119, Option 252
        MSZ Option 57, length 2: 1500
        Client-ID Option 61, length 7: ether 30:10:e4:8f:02:14
        Requested-IP Option 50, length 4: 192.168.2.222
        Lease-Time Option 51, length 4: 7776000
        Hostname Option 12, length 15: "NevinWiamssiPad"

After letting `tcpdump' run overnight, I did eventually see this ACK:
07:46:40.049423 a8:39:44:96:fa:b8 > 68:a8:6d:58:5b:f3, ethertype IPv4 (0x0800), length 320: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 306)
    192.168.2.1.67 > 192.168.2.22.68: BOOTP/DHCP, Reply, length 278, xid 0x5e7944f, Flags [none]
      Client-IP 192.168.2.22
      Your-IP 192.168.2.22
      Client-Ethernet-Address 68:a8:6d:58:5b:f3
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: ACK
        Server-ID Option 54, length 4: 192.168.2.1
        Lease-Time Option 51, length 4: 86400
        Subnet-Mask Option 1, length 4: 255.255.255.0
        Default-Gateway Option 3, length 4: 192.168.2.1
        Domain-Name-Server Option 6, length 8: 192.168.2.1,22.214.171.124

If when running that tcpdump command, and you see a BOOTP/DHCP Offer or Ack(Nack), that will be from a DHCP server, and the server's MAC address will be right after the timestamp on the first line.
So the (valid) DHCP server here has MAC address a8:39:44:96:fa:b8`.
Using one of many MAC address lookup tools on the web I see this MAC belongs to A8:39:44 Actiontec Electronics, Inc which is my router.
In order to catch rogue DHCP server packets as they happen, I would have to leave this tcpdump process running in terminal window:
tcpdump -i en0 -nev udp src port 67 and not ether host a8:39:44:96:fa:b8
This will only show me DHCP server responses from hosts other than my valid DHCP server, as long as the process is running in its own window.
The following command will run in the background until 100 packets are captured, appending any rogue DHCP server messages to the file /tmp/rogue.  Again, the MAC address of your valid DHCP server has to be used in the appropriate place, as well as the interface descriptor on your system.
tcpdump -U -i en0 -c 100 -nev udp src port 67 and not ether host a8:39:44:96:fa:b8 >> /tmp/rogue 2>&1 &
`
Comment: +1 used to use this all the time on customer's VoIP networks to help them spot rogue DHCP servers that were messing up their service.
Comment: Yeah, I had to use it for finding rogue DHCP servers on early deployments of cable modem networks until we figured out how to filter outbound UDP port 67 on each kind of pre-DOCSIS cable modems on our network.  Even after we identified the rogue, it wasn't always possible to identify what modem it was behind.  In severe cases, we had to shut off each node until the rogue stopped, and then isolate what amp on that node to narrow the number of truck rolls the MSO would make.  Fun times.  Long live DOCSIS.
Comment: any simple solution, because I want to check frequently with bash
Comment: If you leave this `tcpdump` command running, it will display DHCP server packets sent out by a MAC address that is different than your DHCP server's.   Of course, you'll need to supply the address in the indicated place...  I'll place it in my answer presently, to get better formatting.
Answer: If you have scapy available, it is a (even scriptable) command-line simple solution.
Just this code (run inside scapy interface or script it via .py file, as desired) should perform the DHCP request and return the number of answers (equals to DHCP different servers):
conf.checkIPaddr = False
fam,hw = get_if_raw_hwaddr(conf.iface)
dhcp_discover = Ether(dst="ff:ff:ff:ff:ff:ff")/IP(src="0.0.0.0",dst="255.255.255.255")/UDP(sport=68,dport=67)/BOOTP(chaddr=hw)/DHCP(options=[("message-type","discover"),"end"])
ans, unans = srp(dhcp_discover, multi=True)      # Press CTRL-C after several seconds
ans.summary()

The Scapy way is a good one since it is available on many platforms and embedded devices (like OpenWRT) and accepts scripting.
The downside: you need python installed (well... widely available too).
No need for Bash on this solution.
Answer: You could try creating an alias device and using a dhcp client in testing mode, where it prints out any response, without actually reconfiguring the interface:
ifconfig eth0:1 up
dhclient -w -n eth0:1

I only have access to a debian box, so if you have another dhcp implementation, the dry-run option might be different, like for dhcpcd:
dhcpcd -T eth0:1

I used to have a cron script run with something like this, that would alert the admin (me!) about rogue dhcp servers.
Comment: when call `ifconfig eth0:1 up` the output `SIOCSIFFLAGS: Cannot assign requested address`
Answer: Given enough time, it might be possible to do the detection passively:
Recall that an initializing client sends out a DHCPDISCOVER broadcast.
If a dhcpserver is available, it will optain an offer and then emit (again as broadcast!) a DHCPREQUEST.
Thus

if you receive a DHCPREQUEST broadcast, there is a dhcp server
if you receive DHCPDISCOVER, but no DHCPREQUEST within a second or two (to account for remote dhcp servers via dhcp relay), there is no dhcp server
if you do not even receive DHCPDISCOVER, you have to wait longer - or try to actively find a dhcp server (e.g. as per Kenned's method)

The success of the first two points deopends on the number of other hosts newly attached / booted to the network and also the lease times.


Formulating the correct flows in differential equation models

Question: I am working on a differential equation model, and I am struggling to set up the appropriate flows.
Imagine a population of young individuals, $N$, subject to births, $B(N)$ and deaths, $D(N)$, and a rate of maturing to adults, $M(N)$:
\begin{equation}
\begin{split}
\frac{dN}{dt} & = births - deaths - maturing\\
& = B(N) - D(N) - M(N)
\end{split}
\end{equation}
Imagine that we are modelling the population on a weekly time step but our knowledge of the demographics comes from annual statistics.
I know that individuals give birth, on average, at an annual rate of $b_{year} = 0.1$. The annual death rate is $d_{year} = 0.15$. It also takes 5 years to reach maturity. If I was modelling the population at a yearly time step, I could just use $b_{year}$ and $d_{year}$ as is, and define $M(N) = mN = \frac{1}{5}N$.
First question: am I right in thinking that to model this population at a weekly time step, I should scale the parameters by 52 weeks? That is, if 10% give birth per year, then 10/52 $\approx 0.19\%$ give birth each week. In other words, the equation should be:
\begin{equation}
\begin{split}
\frac{dN}{dt} & = births - deaths - maturing\\
& = B(N) - D(N) - M(N)\\
& = \frac{b}{52}N - \frac{d}{52}N - \frac{1}{5(52)}N
\end{split}
\end{equation}
Second question If the death rate is $d$, should the the number of individuals maturing be weighted by the probability of surviving, i.e. should $M(N) = (1 - d)mN$, leading to something like:
\begin{equation}
\begin{split}
\frac{dN}{dt} & = births - deaths - maturing\\
& = B(N) - D(N) - M(N)\\
& = bN - dN - (1-d)mN\\
\end{split}
\end{equation}
Or, because this model is cast in continuous-time, is this complementary probability not required?
Third question Individuals being born will not die immediately, but will die at some average point of youth. In that case, should there be some additional rate included for $D(N) = deM$, where $e$ is $1/\text{average time to death}$. For instance, individuals might die 2 years after they are born on average, meaning $D(N) = d 0.5 N$.
Thanks a lot for any help you might have clear up these issues!
Answer: You could model it is a homogeneous system of ODEs with two equations for mature, $M$, and immature, $I$.  The deaths will diverge as the system runs long enough.
$$
\dot{M} =  g*I-d*.05*M
$$
$$
\dot{I} = b*M - g*I
$$
where $b$ is the birth rate, only mature people reproduce, $g$ is the rate at which the young transition to mature, only mature people die, and $d*.05$ is the rate at which the mature die.  You can easily make it more complicated if you want.  These are pretty easy to solve, and there's lots of computational tools for plotting phase diagrams.
Comment: Thanks. I see that there are other ways of formulating the problem, but imagine that I want to keep the same structure as my example, i.e. one differential equation with two outgoing rates.


asp.net c# Command button doesn't run command code when clicked

Question: I have a c# asp.net applcation that has 3 pages.  page 1 is data entry.  Page 2 is a name search.  Page 3 is a summary of account information.
The first page contains 2 asp:textbox (es) and 2 buttons.  The first textbox allows a user to enter in an account number.  The second textbox allows a user to enter in a name to "lookup an account number by name" search.  button 1 submits the account number in textbox number 1 to the account summary page via querystring.  button 2 submits the name to lookup to name search page via querystring.
On the name search page, a list of account numbers and names is displayed with the account number being a href link back to the data entry.  The account number is transferred back to the data entry page via the querystring in the link on the name search page.
My issue occurs as such.  When I return to the data entry page from either the name search page or the account summary page...  I parse the querystring to pre-populate the value of textbox #1 with the account number.
If the user then changes the pre-populated account number and clicks on button number 1.  The data on the account summary page is for the pre-populated account number and not the new account number the user typed in.
The code for the command button sets the value of textbox #1 and sticks it in the querystring as part of the click event; however, the querystring retains the pre-populated value.
<code>            case "summary":

            sAPN = txtAPN.Text.ToString();  (<--- Textbox 1) this always comes out as the    prepopulated value.
            sfxbal = fxbal.CheckAPN(sAPN);  (<---- Validation function)
            if (sfxbal.Length == 14)
            {
                sAPN = sfxbal;
                sfxbal = "";
            }

            if (sfxbal == "")
                Response.Redirect("CreateAccount_Summary.aspx?APN=" + sAPN);
            else
                Response.Redirect("GetAPN.aspx?APNError=" + sfxbal);
            break;
</code>
i've tried using Use Submit behavior to false.  I've tried using a javascript "onblur" and although I can display in an alert the value of txtAPN (textbox 1) with the new user entered value and not the pre-populated value, the data is always for the pre-populated value.
No validation occurs, as well.
If I return nothing in the query string.  The new user entered account number is valildated and data on the summary page is for the new account number.
It absolutely acts like my command code is by-passed.  Why would that occur?
Answer: I'm having the strong feeling that you set Text property every time the page is loaded.
You need to set the Text property once (only when the GET is made):
<code>protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
       txtAPN.Text = ....;
    }
}
</code>
Otherwise each time the form is submitted, the text box will get the value from query string (it overwrites the value given by the user).


In hashcat, is there a simple way to set the amount of symbols in the password?

Question: For example, I know a password has to have at least 3 symbols, but I don't know where those symbols are. What is the simplest way to specify this when cracking the password with hashcat? The only method I found was through a .hcmask file and then just manually writing down every possible mask (eg ?a?a?a?s?s?s, ?a?a?s?a?s?s) and so on but that seems like an insanely complicated way for something so straightforward. Is there an easier way to do it?
Answer: The multiple-masks method is currently the only way to narrowly control combined character sets in hashcat.
Note also that since ?a includes ?s, intermixing them as you've done in your example would be redundant. You can include character-set specifications in a masks file, so you'd probably want something like:
?l?u?d,?1?1?1?s?s?s
?l?u?d,?1?1?s?1?s?s

etc.
Making such mask files can be tedious. You can automate it with the policygen script from the PACK toolkit.


What is the sum of $1^4 + 2^4 + 3^4+ \dots + n^4$ and the derivation for that expression

Question: What is the sum of $1^4 + 2^4 + 3^4+ \dots + n^4$ and the derivation for that expression using sums $\sum$ and double sums $\sum$$\sum$?
Comment: There is a pictorial derivation and the formula is here: http://math.stackexchange.com/questions/241760/geometric-interpretation-for-sum-of-fourth-powers. This can be proved with induction, by studying the vector space of polynomials using $\binom{x}{n}$ as basis vectors instead of $x^n$, or in several interesting other ways. I seek a geometric explanation in that post.
Comment: See my answer in http://math.stackexchange.com/questions/718271/easy-proof-for-sum-of-squares-approx-n3-3/718323#718323.
Comment: See my [answer](http://math.stackexchange.com/questions/320985/how-to-determine-equation-for-sum-k-1n-k3/321000#321000).
Answer: If you don't want to look up Faulhaber's formula you could try $$(n+1)^5-n^5=5n^4+10n^3+10n^2+5n+1$$
If you sum both sides of this, and know how to compute the sums of $n^3, n^2, n \text{ and } 1$ you should be able to work out the sum of $n^4$.
Answer: One way is by using the Euler-Maclaurin summation formula, something you strangely don't find in most standard calculus books.
http://en.wikipedia.org/wiki/Euler%E2%80%93Maclaurin_formula
Let $f(x) = x^4$.
Then
$$f'(x) = 4x^3, f'''(x) = 24 x, f^{(5)}(x) = f^{(7)}(x) = ... = 0 $$
And according to the formula,
$$ \sum_{k=1}^{n} k^{4} = \sum_{k=0}^{n} k^{4} = \int_{0}^{n} x^{4} \ dx - B_{1} \left( f(n) - f(0) \right) + \frac{B_{2}}{2!} \left(f'(n) - f'(0) \right) + \frac{B_{4}}{4!} \left(f'''(n) - f'''(0) \right)$$
where $B_{i}$ is a Bernoulli number.
http://en.wikipedia.org/wiki/Bernoulli_number
So
$$\sum_{k=1}^{n} k^{4} = \frac{n^{5}}{5} + \frac{1}{2} (n^{4}) + \frac{1}{2} \left( \frac{1}{6} \right) (4n^{3}) + \frac{1}{24} \left(-\frac{1}{30}\right)(24n) $$
$$ = \frac{n^{5}}{5} + \frac{n^{4}}{2} + \frac{n^{3}}{3} - \frac{n}{30}$$
Answer: Every rational polynomial $P$ that takes integer values $P[n]$ for $n\in\Bbb N$ can be written uniquely as an integer linear combination of the polynomials $\binom nk$ (for fixed $k$; it has degree $k$ in $n$):
$$P[n]=\sum_{k=0}^{\deg P}c_k\binom nk \quad\text{for all $n\in\Bbb N$.}
$$ These individual polynomials satisfy $\sum_{i=0}^{n-1}\binom ik=\binom n{k+1}$, and correspondingly $\binom{n+1}k-\binom nk=\binom n{k-1}$ (when $k>0$). Since each $\binom nk$ starts with $k$ values $\binom 0k=\binom1k=\cdots\binom{k-1}k=0$ followed by $\binom kk=1$, we can find the coefficient $c_0$ of $\binom n0$ as $P[0]$, and the remaining coefficients by forming $P'[n]=P[n+1]-P[n]=\sum_{k=1}^{\deg P}c_k\binom n{k-1}$ (this is not really the derivative of $P$ of course), and continuing recursively with$~P'$. In practice one need not compute $P'$ as a polynomial, just as a list of values at various$~n$, obtained by taking differences from the sequence of $P$. For $P[n]=n^4$ one gets
$$
\begin{matrix} P: & 0 &   & 1 &   & 16 & & 81 & & 256 & & 625 & & 1296\\
                & P':   & 1 &   & 15 &   &65 & & 175 & & 369 & & 671\\
                 &  & P'':  & 14 &  & 50 & & 110 & & 194 & & 302 \\
                 &  &   &  & 36 &  & 60 & & 84 & & 108\\
                 &  &   &  &   & 24 & & 24 & & 24 \\
  \end{matrix}
$$
so $(c_0,c_1,\ldots,c_4)=(0,1,14,36,24)$. Then $n^4=\binom n1+14\binom n2+36\binom n3+24\binom n4$, and
$$
  \sum_{i=0}^{n-1}n^4=\binom n2+14\binom n3+36\binom n4+24\binom n5.
$$
You can easily expand that into a quintic polynomial expression in $n$. Please note the summation is up to $n-1$; this works better in this setting.
I think this is called the discrete version of Taylor expansion (or something close to that).
Answer: The sum can be derived via combinatorial argument.
Count the number of quintuples $(x_1,x_2,x_3, x_4,x_5)$ with the property $x_5> \max\limits_{i\in S}$ from the set $S=\{1,2,...,n,n+1\}$,
then as $x_5$ varies from $2$ to $n+1$, the positions $(x_1,x_2,x_3, x_4)$
 the positions can be filled in $\sum\limits_{i=1}^n i^4$ ways.
Counting it according to the cases: $5 = 4 + 1 = 2 + 2 + 1 = 3 + 1 + 1 = 2+1+1+1=1+1+1+1+1$ (where the numbers in partitions indicate the number of equal components in that partition, i.e. for example $5=4+1$ corresponds to the case $x_1=x_2=x_3=x_4<x_5$; and $2+2+1$ corresponds to the case two pairs have equal value but the value of the pair are different ,.. and so on). Count the number of ways in which each of the partitioning can happen: $1,14,36,24$ respectively (in the same order as I have presented the partitions).
You get the number of ways to be: ${n+1\choose 2}+14{n+1\choose 3}+36{n+1 \choose 4}+24{n+1\choose 5}$
Therefore, $\sum\limits_{i=1}^n i^4 = {n+1\choose 2}+14{n+1\choose 3}+36{n+1 \choose 4}+24{n+1\choose 5} = (1/5)n^5 + (1/2)n^4 + (1/3)n^3 - (1/30)n$.
Answer: Here is my favorite method which works for any polynomial summand and you only need to remember two basic facts, one from calculus one and one about polynomials. First, since summations are analogous to integration, we have that
$$\int x^k \approx x^{k+1} \Rightarrow \sum x^k \approx x^{k+1}.$$
For your problem, let us define
$$f(n)=\sum_{i=1}^n i^4$$
and since the summand is a polynomial of degree four, the sum $f(n)$ must be a polynomial of degree five. If you don't believe me then just compute at least the first six values of $f(n)$ and compute the sixth differences and all of the terms will be zero (analogous to the sixth derivative of a fifth degree polynomial being zero).
Then using the (second) fact that a polynomial of degree five can be uniquely determined by six points, use points
$$(1,f(1)),(2,f(2)),(3,f(3)),(4,f(4)),(5,f(5)),(6,f(6))$$
and compute the unique interpolating polynomial and you get
$$f(n)=\frac{6n^5+15n^4+10n^3-n}{30}.$$
Answer: Solution to the question can be find on my YouTube Channel " Cipher". Following is the link.
https://youtu.be/_y_Q8-3g-M8
Comment: Welcome to MSE. This is a comment not an answer. Wait until you have enough reputation so you can comment directly.


Does Counterspell work vs a Mind Flayer's psionic spells?

Question: A mind flayer can cast a few spells, requiring no components. There seems to be two parts to this:

If a spell being cast has no components, would others be even aware that it is being cast at all?
Does counterspell work against a psionic spell?
Comment: Related: https://rpg.stackexchange.com/questions/122014/can-i-counterspell-subtle-spell-without-material-component
Answer: Counterspell does not work against the mind flayer's spells
To use counterspell you must be aware of a spell being cast. However, Xanathar's Guide to Everything tells us that if a spell has no components it is imperceptible to all observers:

If the need for a spell's components has been removed by a special ability, such as the sorcerer's Subtle Spell feature or the Innate Spellcasting trait possessed by many creatures, the casting of the spell is imperceptible.

The mind flayer can cast several spells using Innate Spellcasting (Psionics) which says:

It can innately cast the following spells, requiring no components:

Thus, the mind flayer's spells cannot be perceived. And because of that they cannot be counterspelled.
Jeremy Crawford has confirmed the same ruling for the case in which Subtle Spell is used to remove all components from a spell:

Subtle Spell is meant to protect a spell w/o material components from counterspell, since you can't see the casting.

Innate Spellcasting (Psionics), in general, can be counterspelled
Even though we know it won't work against the mind flayer it is worth looking at what the general rules for Innate Spellcasting (Psionics) are. Here's what the basic rules say about it:

A monster that casts spells using only the power of its mind has the psionics tag added to its Spellcasting or Innate Spellcasting special trait. This tag carries no special rules of its own, but other parts of the game might refer to it. A monster that has this tag typically doesn't require any components to cast its spells.

So, if there is a monster that has Innate Spellcasting(Psionics) and uses it to cast a spell that does have components, it can be counterspelled because spells cast in this manner are just normal spells with no special rules and spells, in general, can be counterspelled.
Answer: No.

You attempt to interrupt a creature in the process of
  casting a spell.

Counterspell works against spells. Not spell-like abilities which is what a Mind Flayer uses.
Comment: Mind Flayers do indeed have innate spellcasting, which involves spells, not "spell-like abilities". Rubiksmoose touches on the real problem with using Counterspell against a Mind Flayer's spells.
Comment: In fact, 5e doesn't even have spell-like abilities. Not by name anyways.


What is the difference between Application number, Publication number and Patent number?

Question: What is the difference among the application number, publication number, and patent number? I just know that application number is a 8-digit number, and the publication number is 11-digit while the patent number is 7-digit. However, it confused me when we will get a application number? a publication number? a patent number?
Answer: I assume you are talking about the US for the formats.
The application number is assigned when the application is filed at the USPTO. It is of the format "16/123456".
The publication number is assigned when the application is published (usually 18 months after it was filed). It is of the format "2016/0123456".
The patent number is assigned if the application is granted. It is of the format "9123456".
Comment: Starting in 2018, US issued patents are now 8 digits long: https://patentimages.storage.googleapis.com/c0/d5/f7/86ad5b42759506/US10000000.pdf


OpenGL (ES) -- What's the difference between frustum and ortho?

Question: When I use each of them with the same parameters the only difference I notice is how close the 'camera' is from the objects. What is the difference here, and which is preferred for a mainly 2D game?
Comment: http://stackoverflow.com/questions/2571402/explain-the-usage-of-glortho/36046924#36046924
Answer: I don't agree with LeffelMania, although his answer is already accepted, I would like to explain again what a frustum is and what the differences between orthographic and perspective projections are.
A frustum is a pyramid without the top shaped 3D object (in the link defined by the space between the zNear and zFar plane).

The frustum is used to determine what the camera can see. Everything that is inside or intersects with the camera's view-frustum has to be rendered, all the rest can be ignored.
Because a frustum is a difficult shape to do intersection checks on, often a matrix transform is constructed so that the view frustum is transformed to a cube. This matrix transform is also applied to all scene objects so that we can now do a simple 'does it intersect with a cube' check. This is called the canonical view frustum (see more info here)
Now about perspective vs orthographic projection. In the picture you see the camera, or center of projection (COP). In a perspective projection the COP is near the near plane. Rays from all positions on the far plane are pointing at the COP. Where these rays intersect the near plane (aka viewport) a pixel is colored according to the color of the closest thing to the near plane that the ray hit. A perspective projection leads to (multiple) vanishing points and objects further away from the camera are smaller, also parallel lines in the world are not necessarily parallel on the picture.
In an orthographic projection the COP is infinitely far away, so the rays are almost parallel to each other. There is no vanishing point, more distant objects are not drawn smaller and parallel lines in the world are parallel on the picture.
Comment: Sorry but "is used for 3D scenes to accommodate a perspective view projection" is so vague that I just had to fill in more details. "it accounts for each object's distance ... (and) viewing angle" is a weird statement, since the view frustum itself has no knowledge of this at all and is not used for any distance or angle computation. All the view frustum is, is a way to cull a scene.
Comment: Apparently "Generally speaking" and "gross generalization" didn't qualify my answer well enough. We completely agree, you just used a lot more words and a picture...
Answer: Generally speaking a Frustum is used for 3D scenes to accommodate a Perspective view projection. It accounts for each object's distance from the camera as well as viewing angle to determine an object's size and position on the screen. An orthographic projection simply takes each object and draws a straight line from the object to a pixel on the screen, making it just a flat scene. That's a gross generalization and there's a lot to be said on the subject, but for a 2D game you'll want to use an orthographic projection.
Answer: There was two type of projection corresponding to what you mentioned:
Orthographic Projection and the Perspective Projection.
Graphs below to help you quickly understand the difference between the two:
Orthographic Projection
Perspective Projection