SSH into Raspberry Pi with 3G modem connected

Question: I have a raspberry pi running raspbian. I have a 3G modem connected to it, as well as ethernet. It is set up to use the modem instead of the ethernet, just in case the modem fails, I can use the ethernet. However, I cannot ssh in with the mobile card, I have to use ethernet. How can I ssh in while the mobile card is running?
Answer: I had exact same problem. Reason why you cannot connect to RPi during running 3G modem is default gateway.
Let me explain, when you are connected to 3G and ethernet together, packet arrives e.g. from 192.168.0.100 to your RaspberryPi ethernet interface - e.g. 192.168.0.101. Raspberry Pi responds and send packet to interface in routing table. In case of active 3G connection it sends packet to default gateway (3G dongle) which cannot route private IP address to your computer back so you won't see any response from RPi.
To solve this you can use different metric or rule based routing. Personally I use rule based routing, so I route all traffic coming from ethernet port back to ethernet so I can login to my Raspberry Pi even when I am connected to internet using 3G dongle.
See this example (you can add it to end of file /etc/rc.local and reboot your Raspberry Pi)
<code># Never route local traffic through 3G dongle
ip route add table 42 default via 192.168.0.1
ip rule add from 192.168.0.0/24 table 42
</code>
Just change 192.168.0.1 to your local ethernet gateway and 192.168.0.0/24 to your local network and it should works like magic.


Why can't adamantium cut through vibranium?

Question: In Avengers vs. X-Men #3, Wolverine's claws meet up with Captain America's shield.

It's always been my understanding that Wolverine's adamantium claws can cut through anything, but also Captain America's shield is made of vibranium, which absorbs vibrations. So why did Wolverine's claws not cut through vibranium?
Comment: Doesn't the picture already answer your question ;-)
Comment: The shield is not made ONLY of vibranium. It was an alloy resin, cast and shaped. Once it was solidified, it could not be reshaped or transformed. Since the process was unknown, we cannot know how it was finished. Blame Marvel's early writers for not considering the ramifications of creating their super metal without explaining effectively how you MAKE it into stuff.
Comment: While it would be difficult to _finish_ the shield (ie - removing burrs, polishing, etc), I assume you could **cast** the shield; that is, pour it as molten metal.  The likelyhood of any (refined) metal (naturally) occurring in a block large enough to be shaved down to size is less than the probability of some of the characters powers working...
Comment: A diamond can cut steel, it doesn't mean by one hit..
Comment: It doesn't make any sense I know.  If it can't be cut by adamantium then surely it must be cut by another vibranium tool or else nothing could be fashioned out of vibranium, least of all a shield.
Comment: Given the curvature of the shield, and the perceived angle of Wolvy's strike, it doesn't appear as if it's his claws that 'meet up' with the shield.
Comment: The shield was poured into a mold of a tank hatch when it was in it's molten state and once it cooled it became it's final form.  No need to shape it, but there probably would be a need to "Finish" it as Clockwork-Muse pointed out.
Answer: To specifically answer the question: Adamantium CAN cut through Vibranium. Adamantium is an order of magnitude more indestructible than Vibranium. There has been confusion since the Marvel Cinematic Universe has changed the generally known origin of Captain America's shield.

In the Canon Marvel Universe, Earth-616: Captain America's shield is made of proto-Adamantium, an alloyed mixture of Adamantium and Vibranium, unique to Marvel Earth. Arguably one of the most indestructible items ever created by humanity.

In the Marvel Cinematic Universe, Earth-199999: Captain America's shield is composed of a Vibranium-alloy with remarkable properties of durability and energy redirection. While it is not as indestructible as Captain America's Earth-616 version, it can take a strike from Mjolnir and survive.

Vibranium is an extraterrestrial metal of unknown origin. There are two types of Vibranium:

Wakandan Vibranium, which absorbs vibration and dispels kinetic energy
Antartic Vibranium which disrupts metallic structures, including Adamantium and is known by another name: anti-metal

Adamantium is a synthetically created metal alloy discovered in an effort to recreate Captain America's shield's uniquely indestructible nature.

While the scientists were unable to recreate what was dubbed proto-adamantium, they did discover the next best thing, Adamantium, the most indestructible metal ever synthesized on Earth.
Wolverine's claws are composed of Adamantium and able to cut through almost any known material.

The image depicts Captain America's shield versus Wolverine's claws. Cap's shield is proto-Adamantium and Wolverine's claws are made of only beta Adamantium. (Wolverine was initially created with True Adamantium, but after interacting with his healing factor the metal degraded to beta Adamantium.)

Captain America's shield in the comics is not made only of Wakandan Vibranium unlike the MCU version which IS.

In the comic Marvel Earth-616, his shield is an alloy of proto-Adamantium, a unique and never again duplicated mixture of Adamantium and Vibranium, making it even stronger than pure Adamantium and giving it special properties neither metal seems to possess, singularly.

In the most recent storylines of the Avengers comics, his shield was broken and repaired by Asgardian smiths who added a bit of Uru metal to the mixture, thus making it even more unique with a potential to be enchanted.

Thus in this circumstance, Cap's shield is stronger than Wolverine's claws.
See Also:

Why is Captain America's shield called indestructible if Vibranium can be broken down for microscopic applications?

How was Thor able to dent Captain America's Shield?

How does Captain America's shield work?
Comment: Looking at the art and the angle of that hand, who's to say that fist is Cap's?  It might be the lesser known Avenger, The Floating Red Fist.
Comment: How many orders of magnitude of indestructability are there?
Comment: You must also consider the angle of the cut - Wolverine's strike in the picture doesn't look like it'd be ideal to cut the shield deeply - even if the shield weren't stronger, it wouldn't have suffered much damage.
Comment: I attribute that to bad art and let it go. I assume that both Cap is making an effort to ensure Wolverine's strike is as off balance as possible, since that is the nature of his fighting style and that Wolverine is doing the best he can to make a clean and powerful cut. If the artist can't carry that, my imagination just has to do the heavy lifting.
Comment: Speaking of bad art... isn't cap right-handed?
Comment: @X-Zero It looks like he's got it in his right (strongest) arm, and is swinging round, batting Wolverine off of him. Sensible move and choice of arm if you ask me.
Comment: And in the original writing Wolverine was infused with True Adamantium. It became secondary Adamantium after interacting with his healing process.
Comment: It was my understanding that vibranium doesn't just absorb vibration per se, but kinetic energy directed against it. If that's the case, Wolverine's strikes would effectively make the shield stronger. Even if the adamantium could cut through the vibranium under ideal conditions, in combat the additional force would likely neutralize that advantage. Plus, we have no idea of knowing how much pressure is required to cut vibranium with adamantatium, and/or if Wolverine is capable of exerting enough force to do so.
Comment: The comic canon shield is composed of adamantium and vibranium so even if his claws could cut vibranium, the alloy, by Marvel dictums is supposedly stronger than either metal individually.
Comment: For years growing up, I seem to remember that there was the stipulation about the shield that there was an 'unknown influence' on the creation of the shield that accounted for the incredible qualities. Has this been retconned out?
Answer: I will steal the info from my older answer:

Vibranium/steel alloy that Captain America's shield is made of is stronger than adamantium.
Adamantium was a result of Dr. MacLain trying to replicate the sheid's alloy.
Answer: Wolverine's Adamantium did not degrade from true Adamantium to secondary Adamantium. Adamantium is too strong and no super-charged healing power in the Marvel universe can alter the molecular structure of the strongest material in the Marvel universe. Secondary Adamantium is a far less expensive form of Adamantium that is produced to be used in mass quantity. While secondary Adamantium is nowhere near as strong as true Adamantium, it is still far stronger than any other steel or titanium alloy produced.
Wolverine's bonded Adamantium became Adamantium beta. "Adamantium Beta" is the result of the healing factor finding a way for Adamantium to allow Wolverine's bones to continue to function as normally as a part of his body. Bone marrow produces red blood cells so if the Adamantium completely closed off the bone from the rest of the body, Wolverine could never produce blood again. In reality, the Adamantium became a part of his body and actually helps regulate/control and sometimes enhance his healing factor and abilities. Wolverine can take punches from others with "Hulk"-level strength without having bones broken.
Comparing Adamantium against Vibranium is very difficult because the properties of each metal are so different. Vibranium is found in nature in the Marvel universe while Adamantium is an artificially produced metal alloy/resin. Vibranium can absorb and redirect forms of energy, making it very strong and resilient to damage in addition to being very tough already. Adamantium is physically impervious to most physical, chemical, and biological harm but it does absorb any energy. On equal terms, Adamantium can scratch and even cut Wakandan Vibranium, but it will probably require a very great amount of force to do so. Antarctic Vibranium would damage Adamantium because it destabilizes the molecular structure of all metals. Adamantium would probably have to be used to cut through super quick if possible.
In relation to Captain America's shield, Adamantium cannot cut through the shield because the shield is made of the original metal that was reverse engineered to create Adamantium alloyed with Vibranium to produce a metal that is stronger than true Adamantium. If the shield was made with only Vibranium, Wolverine's claws could probably cut through the shield with a lot more force than even Wolverine can produce. You would probably need someone with Adamantium claws and Hulk-level strength (now that would be one scary being in the Marvel universe).
Answer: The point of the matter is the variation of the metal in the shield is designed to absorb kinetic energy, which it did, Adamantium is designed to be unbreakable and the claws didn't shatter, both of the metals are performing their respective roles to their specifications.
The reason the shield didn't cut is down to the fact that without kinetic energy be it from gravity, man or machine made (which is TOTALLY absorbed by Vibranium) nothing will cut, it'd be like laying a weightless sword on tissue paper, without force there is simply nothing to push a blade through the object you wish to cut.
It's not that Vibranium is stronger or more durable than Adamantium, it isn't Adamantium is unbreakable in the face of kinetic energy, it's just doing what it's designed to do and channelling the kinetic energy away from itself so as to not be affected.
For example, diamonds are cut and shaped by high pressure water jets, now water isn't as strong as diamond but elements used in the right way and miracles of science are performed.
Answer: From Wikipedia:

The shield is created by fictional American metallurgist Myron MacLain, who had been commissioned by the US government to create an indestructible armor material to aid the war effort. MacLain experiments with vibranium.
During one of his experiments to fuse vibranium with an experimental steel alloy, MacLain falls asleep and awakens to find that the resulting alloy had set in a tank hatch mold. However, he was not able to duplicate it, because as MacLain described it, "some unknown factor" was present during the experiment that he could not identify. The shield was then painted to become Captain America's weapon and symbol.

From the Marvel Database:

American metallurgist Dr. Myron MacLain was contracted by the U.S. government to create an impenetrable substance to use for tanks during World War II.
He was attempting to perfect an indestructible alloy as strong as the legendary Adamantine, which Hercules' Golden Mace was made from. Dr. MacLain was hoping the alloy would provide a distinct advantage in the armor of American war machines, during World War II.
The doctor worked tirelessly, using a steel alloy (now known as Proto-Adamantium), and an unknown metal (now known to be Vibranium or more precisely Wakandan Vibranium). While the doctor was asleep, as a result of his exhaustion, an unknown factor caused the metals he was working with to bond.

Given the above, it must be assumed that -- even in its original Pre-"Fear Itself" form -- Captain America's shield was not JUST Vibranium, but 'Vibranium + Who-Knows-What.' Certainly, MacLain never worked it out. Therefore, speculating on what 'should' happen in a scenario where the shield is attacked with adamantium is redundant. It does what it does, whether that be a property of the Vibranium, or some as-yet-unknown added substance.
Answer: Essentially, cap's shield in fictional theory is made of vibranium and TRUE adamantium.
Wolverine is just made of adamantium bonded to his skeleton.
It would be like trying to cut through iron infused steel prison bars with just iron or steel.
Answer: Vibranium is the heart and soul mineral of Wakanda, home to T'Challa(Black Panther). Vibranium is impenetrable after it hardens, it absorbs any and all oncomming force. Plus it is known that Vibranium ain't the only substance in Cap's shield... If I remember correctly, adamantium is the result of trying to recreate vibranium. Vibranium is stronger.
Cap's sheild is indestructible because it is made of both:

Adamantium 2. Vibranium

Adamantium is unbreakable, but supposedly it can still be melted or damaged by energy or heat.
Vibranium is not indestructible, but can not be harmed by energy or heat.
So, one can take physical punishment and one can take energy punishment.


Marketing Cloud Issue with Sender profile using reply mail management

Question: We understand the email address for the RMM domain is not real but would have thought it would forward messages sent to that email address to the specified email address in the forward section. Issue is recipients copy and pasted the fake email address into their contacts and try emailing it directly. They not receive a bounceback but the email doesn't go anywhere either. Anyone find a way to resolve this? See screenshot of the sender profile used to send:
Answer: I've seen this issue raised before, but all roads led to the email entering a black hole. The official response I received from support was:

"This is not a valid inbox so if a subscriber were to create a new
  email and send it to [Sender Domain] it would not work. Since we do
  not create a valid email for this process there is no option
  set/modify this process."

I can't imagine this being a terribly common occurrence, but if it does become a problem you can always make a note if your emails or use a 'noreply@' email address.
Comment: Thanks for the response. Unfortunately noreply@ reduces deliverability and this client of our wants to encourage people to reply. It works fine if the recipient replies directly to the email it gets forwarded appropriately but she is getting a bunch of people that saved the from email address into their contacts and wondering why they are unable to email it so its definitely a problem. Wish there was just some way to forward those emails to a real email address. Seems like standard domain manangment functionality


Remote logging from snort to rsyslog

Question: As part of a school project, we are supposed to run snort on a Ubuntu server in IDS mode and log the packets to rsyslog on a remote Ubuntu server. I have been searching for manuals/tutorials for a week now. I couldn't find any helpful links. Any help would be greatly appreciated.
Answer: I'd suggest starting at the man pages.  Also, there is documentation about snort on its website www.snort.org.  As for rsyslog, there is site for that as well, www.rsyslog.com.
I'm a bit surprised that neither of these two sources would not provide you with the information you needed.

Remote logging from snort to rsyslog


Touchpad heating up on dell inspiron n5010

Question: My laptop Dell Inspiron N5010 runs an Ubuntu 12.04.4 LTS 64 bit version. I have installed all the necessary fglrx drivers and the laptop temperature is not very high. It persistently remains between 45-60 degree centigrades. But the problem is that the touchpad is heating up due to some unknown reason and hurting my fingers . In Windows 7, the touchpad did not heat up so much with the laptop temperature staying almost in the same range as in Ubuntu. (I used psensor in Ubuntu and SpeedFan in Windows 7 to determine core temperatures). Can anyone please help me with this, is there any workaround to prevent the touchpad from overheating? Also, will an overheated touchpad cause problems in the laptop in the long run?
Answer: It is highly unlikely that Ubuntu get your touchpad hotter in any way.For some reason i have heard a lot that some Dell models have an issue with overheating touch pads after a while.
Probably the touchpad in your Dell is over some hardware that produces a lot of heat (like wireless card,cpu,hard disk) or you laptop is faulty.I don't think Ubuntu have to do any with this.
60 degrees Celcius is too hot to touch,so even though that for a pc/laptop 60 degrees are safe,for your hand ain't.
I will suggest to communicate with Dell or a technician.
Before you do that you can try to see if the fan and the heat-sink are gunked up with dust and that is causing the overheating in the touchpad.
Comment: Well, thank you for your reply. I think you may be right. But, as far as the cooling system in my laptop is concerned, I recently(just a month back) got my entire cooling system changed and replaced by a much more efficient one as a part of general laptop maintenance. Also, I do not think that there is a lot of dust in my laptop as I maintain it pretty well.


UITableView select added/edited row after reload (with sections)

Question: Heyhey - new day new fun XD
EDIT: Solution see end of text!
I have following issue:
I have a UITableView which gets its data from CoreData. The TableView is divided in section, using the first letter of the name.
If you click on a cell, u can edit the content of that CoreData-Object on the right side of the screen. If you click the ok button, the new content is saved and the TableView reloads to show the changes. No Problem till now... but:
After editing (or adding) i want the TableView (after its reload) to select the just edited (or added) TableCell.
How can i determin the indexPath and section for edited cell (its possible that its in a new section due changing the name). Any ideas?
EDIT: Ok, i think i can determin the new position in the controller function of (NSFetchedResultsController) - i only have the find the right place;
SOLUTION:
I got it. In the didChangeObject controller (NSFetchedResultsController) i can retrieve the new indexPath which i save in a variable and set the selected row after the reload of the tableView to this new indexPath!
Comment: Post your answer as an answer - it's fine to answer your own question. You might even get some upvotes out of it.
Answer: SOLUTION: I got it. In the didChangeObject controller (NSFetchedResultsController) i can retrieve the new indexPath which i save in a variable and set the selected row after the reload of the tableView to this new indexPath!


Moving circle using QGIS?

Question: Using QGIS 2.2, I want to move a circle from one specific point to another specific point: How can i grab the exact center of the circle and move it to another location without creating points in the center of the circles?
Comment: Welcome to GIS SE!  As a new user be sure to take the [Tour] where you will see that there should be only one question asked per question.  There is an [edit] button beneath your question that you can use to decide which question is the more important for you to ask here.
Answer: Welcome to Gis SE.
If you want to move objects in QGIS you can use the "Move Feature(s) tool" in the editing toolbox.

Start to edit your layer containing the circles, then click on the circle you want to move and move it to the other position.
After the editing you have to save your changes.
If you want to move the circle to specific coordinates you can have a look at this question:
  Moving vectors to specified coordinates in QGIS?
Comment: thanks for your answer. I already know the "move feature-tool". unfourtunately your answer did not solve my problem: i want to pick the circle in the center and move it exactly over another circle. to do this it is recommended that i can pick the circle at the center and that the objectfang logs the center of the second circle.

Moving circle using QGIS?


Domain of $f(x) = \sqrt{x+1}\cdot\sqrt{x-1}$ and domain of $g(x)=\sqrt{x^2-1}$

Question: Recently I came across this question in my homework. The problem is as above. While doing the problem I converted the $f(x)$ into $g(x)$ since they are the same and I got domain as $(x \leq -1$ and $x \geq 1)$ but the answer showed the domain is $x\geq 1$.
If the two functions are the same then why do their domains differ? Or are the functions not the same? Please clarify my doubt.
Comment: The functions are same only in the intersection of the domains. You cannot say that the functions are the same and conclude that they have the same domain.
Comment: but g(x) comes only when i further solve f(x)
Answer: $f(x)$ is not the same as $g(x)$.
The square root function is only defined for a positive expression inside it. Function $f(x)$ has a term $\sqrt{x-1}$, and in order for this term to be defined, $x-1\ge0$. This gives the domain for $f(x)$ as $x\ge1$. When you convert $f(x)$ into $g(x)$, you obtain $\sqrt{x^2-1}$, this transformation is only possible if you specify that $x\ge1$. Essentially, if you do not use this condition, you could be multiplying the square root of a negative number with another expression, and this is not defined.
Comment: now what is the domain for g(x)??
Comment: The domain for $g(x)$ is as you said, $x\le-1$ and $x\ge1$. But the point is that functions $f(x)$ and $g(x)$ are only equivalent under certain conditions, i.e., $x\ge1$
Comment: So you mean you cannot multiply them and do it first. Ok, now I understand. Thank you sir


Pruning Echeveria/Graptopetalum/Pachyphytum flowering stalk: What does it do?

Question: If I prune the flowering stalk of the Echeveria or its relatives just under the first flower, leaving a stem with the leaves on it, will it branch? make new flowering stalks? New plantlets which I can root?
Answer: If you leave the flower stalk attached to the plant, it will slowly wither and die, and eventually fall off. Letting the plant go dormant after flowering, by stopping all watering for a few weeks, will speed up that natural process.
Cutting off just the flower head is rather pointless, because all you have done is create a wound where pests and diseases can attack the plant more easily.
The leaves on the flower stalk can be used for rooted cuttings just like the other leaves, but since they are usually small they are more likely to dry out and die before they develop roots than cuttings using bigger leaves.
If you really want to propagate a lot of these types of succulent, just "disassemble" a complete plant and use every leaf as a root cutting!
Comment: I had hard time cutting from the rosette it self: Cutting did not break where it should . (they break-off above the base and leave the meristem on the main stem, then the leaf dies without sending a new plantlet). If I put the small leaves in a humid box, would that be worth it?


Does any hero with enhanced regeneration in One Punch Man also ages slowly or live longer?

Question: In many series, heroes or superhuman people who has enhanced regeneration also age slowly or live longer. Is this the case in One Punch Man? Does any hero with enhanced regeneration in One Punch Man also ages slowly or live longer?
Answer: Most likely not possible to tell a that point. In OPM, there is really little information about characters background.
I can only assume that you are referencing Zombieman, S-Class rank 8 hero ? There is no clue of the age of this guy, or even when he become an "undead", so maybe he doesn't age, who knows ?
all we know about him is here
Comment: We do have details about his creation, in fact.  Not hard enough to definitively nail down his creation date, but there are some pretty tight bounds from what we know.  The anime hasn't gotten there yet, but the Manga and webcomic have.


Can you have 2 promiscuous (sniffing) ports on a single machine?

Question: I'm wondering if you can actually have 2 (or more) promiscuous (sniffing) ports on a single machine, to monitor multiple network segments?  And can you monitor them all with snort?
Answer: Absolutely. Specifically "promiscuous" mode is just a flag on the network stack that passes all packets seen on that interface up to the application layer. Using snort as an example, this is often how one will properly monitor multi-homed systems. One NIC monitoring each uplink.
Using snort as your IDS, please be careful with how it handles interface specifications. The interface option will accept only a single argument, either a specific interface or any. The trouble with any is that it will cause the process to listen on all interfaces, including loopback. Additionally, snort is single threaded (expected to change with version 3.0). I would highly recommend running multiple instances of snortd, each listening on a single interface. How this is accomplished will depend on your distribution. On RedHat based systems edit the file /etc/sysconfig/snort and populate the INTERFACE variable. For example, if you use eth1 and eth2 for monitoring you would use
INTERFACE="eth2 eth3"

The init script will automagically launch a separate process for each interface listed.
Comment: @FredY I've run a snort sensor with as many as 4 nics, caveat being with the way snort handles interface specs. I'll update my answer with the info.
Comment: Hi packs, yes I'm specifically wondering if I can achieve that in Snort IDS. I'll try fitting another network card and set it to run on promiscuous and see how it goes. Thanks a lot.
Answer: Yes you can.
I've had two wireless cards in promiscuous mode sniffing two different channels at the same time.


Can't delete a record in a Custom Object using a certain profile

Question: My custom object Project Team has a Public Read/Write OWD. The profile Regional Manager has a Modify all access to the Project Team custom object. When trying to login as the Regional Manager, I cannot delete a record in that object. Any ideas? Thank you!
Answer: When selected 'Modify All' it means that we have overridden the sharing settings and security. If Modify All is selected, then obviously Delete permission is there, as said here.
I would suggest you retry and let us know if you are still stuck.


How does MS SQL Server decide when it can use "Parallelism" when executing queries?

Question: How does MS SQL Server decide when it can use "Parallelism" when executing queries? I recently posted another question here that, when looking at the actual execution plan used parallelism when I had an order by on the query and did not when I didn't have the order by. So, I'm wondering how it figures out when it can use "Parallelism" and when it can't.
Answer: SQL Server makes this decision based upon cost. If you execute 'sp_configure' (make sure advanced options are enabled) you will see an entry for 'cost threshold for parallelism'. If the optimizer estimates the cost to be greater than the run_value then your query will be executed in parallel.
If the ORDER BY clause in your example results in an increased cost, then the query will go parallel.
Comment: You can find more info about the cost calculated for parallelism here:
http://msdn.microsoft.com/en-us/library/ms178065.aspx
and here
http://technet.microsoft.com/en-us/magazine/dd320292.aspx .
Comment: Is there any way (or some tool, maybe) to see what is the value of the 'cost threshold for parallelism' for a query?


How much weight can a character throw in a ranged attack?

Question: I have been wondering for the longest time now, how much weight is your limit when throwing objects. If you throw a weapon that you are not proficient with you get a -4 penalty, same is said about when you throw an object. But what I am wondering, is even with the penalty, how much weight can you throw based on your strength? and what penalty will you take?
Answer: The Dragon #295 Wizards Workshop column "Sage Advice" includes this exchange:

How far can someone throw something that is not a weapon? How much damage would a hit with such an object deal?
Here's an informal system the Sage worked up for throwing things. It's offered to readers of "Sage Advice" for commentary and playtesting.
You can throw an item that weighs up to one third your light load rating as an improvised thrown weapon.… You can throw the item with one hand, provided it is no larger or heavier than that would would be a one-handed weapon for you.… Anything bigger than what would be a one-handed weapon for you must be thrown with two hands and the throw requires a full-round action.
If you want to throw an object that's heavier than one third your light load, you cannot use it as a weapon. Instead, you make a Strength check to lob it near your target in the hopes of doing some damage. The result of the check determines the distance you throw the object, according to the guidelines below. If the item does not exceed your light load rating, triple the distance you can throw it as figured by the guidelines below. If the item exceeds your light load rating but does not exceed you medium load rating, double the distance as figured by the guidelines below.

For a running throw (at least 10 feet of movement toward your target), you throw the item 5 feet +1 foot per point your Strength check exceeds 10.
For a standing throw, you can throw the item 5 feet +1 foot per 2 points your Strength check exceeds 10.

If the item exceeds your maximum load rating but is not heavier than what you can lift, 5 feet is the maximum distance you can throw the item (but see below); you can't throw what you can't lift. For these heavy objects, don't bother with an attack roll. Just have the thrower pick a spot for the object to land.
If the Strength check result is too low to reach the target spot, the DM should pick one [a spot] that's on a straight line between the thrower and the target spot. All such heavy objects require two hands to throw and thus throwing them is a full-round action.
In all cases use the deviation diagrams… to see where the item really lands (assume a range increment of 10 feet). It's possible that the deviation roll will make the item travel slightly father [sic] than the Strength roll indicates. If the throw was only 5 feet, do not roll for deviation.
A creature in the object's landing spot gets a Reflex saving save (DC 15 + the thrower's Strength modifier) to avoid the object.
Damage from an improvised thrown weapon or a larger thrown item is equal to the thrower's unarmed strike damage or 1d6 points per 200 pounds of weight.… (110, 112)

The column is unsigned. This exchange predates the 3.5 revision, but, so far as I am aware, was never followed up nor later modified, making its status technically unofficial but, at least, interesting. Absent other guidelines, it seems a decent enough scaffold to build from, although, like most of 3.5, these rules tend to break down at the extreme edges.
Also see improvised weapons (referenced in the exchange above), the feat Fling Ally (Races of Stone 139-40) et al., and the prestige classes hulking hurler (Complete Warrior 40-2).
Answer: When you use an object that is not a weapon to make an attack, you have to use rules for improvised weapons. And penalty for using heavier weapons is not a function of weight, but the size category of the weapon.
So, what you need to do to determine whether the object can be thrown and what penalties should be used?

Determine which weapon the object resembles.

To determine the size category and appropriate damage for an improvised weapon, compare its relative size and damage potential to the weapon list to find a reasonable match. An improvised weapon scores a threat on a natural roll of 20 and deals double damage on a critical hit. An improvised thrown weapon has a range increment of 10 feet.

Note that you need not only to determine the weapon's type but also its size category. Thus, a small tree trunk can be a huge club. And remember that weapon category is not a measure of its size but the size of the intended wielder.

A weapon's size category isn't the same as its size as an object. Instead, a weapon's size category is keyed to the size of the intended wielder.

Find out whether the object is small enough to be used by the character.

The measure of how much effort it takes to use a weapon (whether the weapon is designated as a light, one-handed, or two-handed weapon for a particular wielder) is altered by one step for each size category of difference between the wielder's size and the size of the creature for which the weapon was designed. If a weapon's designation would be changed to something other than light, one-handed, or two-handed by this alteration, the creature can't wield the weapon at all.

Thus, a trunk from the previous example is two-handed for a large creature and can't be used by smaller ones.
Note that throwing a two-handed weapon is a full-round action.

Throwing a light or one-handed weapon is a standard action, while throwing a two-handed weapon is a full-round action.

Determine the penalty.

Improvised Weapons
  Sometimes objects not crafted to be weapons nonetheless see use in combat. Because such objects are not designed for this use, any creature that uses one in combat is considered to be nonproficient with it and takes a -4 penalty on attack rolls made with that object.
A creature can't make optimum use of a weapon that isn't properly sized for it. A cumulative -2 penalty applies on attack rolls for each size category of difference between the size of its intended wielder and the size of its actual wielder.

So a large creature can throw the trunk from our example with a -6 penalty (-4 for improvised weapon and -2 for one size category difference) and have to use a full-round action to do so (a club is one-handed and becomes two-handed for a creature one category smaller).
(quotes from this page, emphasis mine)


Can I log file operations (create/modify/delete) in Windows?

Question: Is there any logging mechanism in Windows XP to know whether a user has done a specific file operation (create/modify/delete)?
Answer: Yes you can and it's called Auditing. You can audit for succesfull and/or failed attempts. To enable auditing you have to take 2 actions:

Enable auditing by a policy.
You have to open local Security Policy (or a policy on a domain) and go to Local Policies -> Audit Policy -> Audit object access. Check either Success or Failed, or both.
Enable auditing on a file or folder
Now auditing is enabled, you have to set which files are audited. To do so rightclick on the file or folder that you want to audit and choose properties. Go to the security tab and click Advanced. Here you have to select for which users you want to enable auditing. Next you have to check for with actions you want to enable auditing.

You can find the results in the security eventlog.
Comment: This isn't strictly correct. What the audit log will show you is that files have been _opened_ (or that open attemps failed) for the types of access specified. It does not record actual read, write, etc., operations. For example, a program could open a file for read/write access and then only perform read operations, but the Security log will show that the file was opened for read and write. For that matter the file could be opened and then nothing at all actually done to it; the Security log will still show that the file was opened for read and write.


How does a phone store date and time even when the battery is removed?

Question: I have seen android phones which do not ask users to set the date and time even if I remove battery and reinsert and start the phone. If I have a SIM card inside it, I understand it fetches date and time from the network provider. But what if I do not have SIM and there is no Wi-Fi connected?
Comment: I'm afraid this is not "Android specific"-related, but I guess [this is similar](http://www.computerhope.com/issues/ch000386.htm): there's a smaller internal battery that powers the chip. Also related (but wrong place): http://stackoverflow.com/questions/26360648/is-there-any-cmos-chip-battery-in-android
Answer: "There is in fact a second battery in every phone." (Cf. answers 15., 19. and 48. of this discussion.)
Comment: A semi-anonymous comment on a TechDirt article isn't much of a source. In this case it may (but may not) be correct, but I wouldn't consider it "reliable" in a general sense.
Answer: They use a Real-time clock, the same as just about any other electronic device that keeps time. Newer devices have largely begun to move to supercapacitors to power the RTC, but batteries are also used. The decision depends on a variety of factors, including space and relative cost of the components.
If you want some really in-depth details on how an RTC might be designed, Texas Instruments has published the specifications for the various RTCs used in their chipsets. Here is the spec for one of their OMAP systems-on-a-chip (warning, PDF file).
Answer: As @eldarerathis said, there are secondary batteries or Real-Time-Clock (RTC) chips built into the SoCs (System-on-Chip) of each device. They are built into the circuits by the SoC provider, like Qualcomm, MediaTek, etc. Newer devices use semiconductor arrangements like the CMOS (Complimentary Metal Oxide Semiconductor) battery in computers, which do the same thing. This feature is present even in many sub-par non-Android devices running proprietary operating systems.
If you dig deep into the specific operating system, (in this case, Android) you can find an option to disable it. This causes the phone to completely eliminate any power transfer inside it in some cases. However, this cannot be guaranteed to be present in all devices. It is just used to store energy to keep track of time or prevent any specific circuit from idling away.
In some cases, the time-record may be lost if the device is not used for long periods of time. In such cases, there would be no current flowing inside the circuit, because all of it would be completely used up.


Shortcomings of "The Continuum" by Hermann Weyl?

Question: I just read that Hermann Weyl used a certain type of type theory as the foundation of mathematics in his book "The Continuum" and he was able to derive calculus without the use of infinite sets. Naturally, I'm going to read it ASAP but I wanted to ask right away what it's fundamental flaws are, since obviously its not taken as the conventional foundation (instead of ZFC). I'm inclined to assume that it's nothing detrimental to mathematical physics, since that was Weyl's primary field.
Answer: You can see Hermann Weyl:

In Das Kontinuum he tries to overcome this [the vicious circles he believed being involved with set-theoretical approach to foundations] by providing analysis with a predicative formulation — not, as Russell and Whitehead had attempted, by introducing a hierarchy of logically ramified types, which Weyl seems to have regarded as excessively complicated — but rather by confining the comprehension principle to formulas whose bound variables range over just the initial given entities (numbers). Accordingly he restricts analysis to what can be done in terms of natural numbers with the aid of three basic logical operations, together with the operation of substitution and the process of "iteration", i.e., primitive recursion.
Weyl recognized that the effect of this restriction would be to render unprovable many of the central results of classical analysis — e.g., Dirichlet's principle that any bounded set of real numbers has a least upper bound — but he was prepared to accept this as part of the price that must be paid for the security of mathematics.
Comment: Interestingly, there are two different kinds of completeness for the reals: (1) Any bounded set of reals has a supremum ; (2) Any bounded sequence (function from N into R) has a limit supremum. (1) easily implies (2) in any reasonable formal system, but to get (1) from (2), the naive proof requires DC (dependent choice), and the more clever proof needs CC (countable choice): Let $q$ enumerate the non-negative rationals. Take any set $S$ of reals with upper bound $b$. Let $f(n) = \cases{ q_n & if $b-q_n \ge x$ for any $x \in S$ \\ 0 & otherwise }$. Let $c = \sup(f)$. ... Then $b-c = \sup(S)$.)


Installing a new electric cooktop details

Question: Printed instructions for my new electric cooktop say: A 3-wire or 4-wire, single phase, 120/240 volt, 60-Hz., AC only electrical supply is required on a separate, 40-amp circuit fused on both sides of the line. Obviously there are breakers in the breaker box, but what does "40-amp circuit fused on both sides of the line" mean? Thanks!
Comment: Are you replacing an existing cook top, or is this a completely new install and a wire is needing to be added?
Comment: Run a search for "40 amp plug". If your wall does not have something that accepts that kind of plug then you need an electrician.
Answer: I believe the simplest way to put it is, it needs to be on a dedicated 40 amp double pole breaker.
With a 240 volt appliances there are 2 "hot" lines, usually a red insulated wire and black insulated wire. A neutral, usually a white insulated wire, and a ground wire can be bare wire or sometimes insulated in a green covering.
The 4 wire connection is the accepted code compliant connection, the 3 wire has been phased out, but still does exist in older connections.
I hope this gets the idea across. There are a few well versed electrical guys on SE that really know the ropes well when it comes to electrical issues. They may be able to fill you in a little more.
Comment: Each "side" is 120V to ground, and there's 240 between the two sides. Both **sides** means both lines are "fused" (circuit breaker these days, mostly) *not* that the lines are "fused" at both **ends.** A double-pole breaker ensures that either side tripping will de-energize the whole circuit.
Comment: No more info needed, you got it!
Comment: The fact the manual says "120/240 volt" means you will need a neutral.  Some 240v circuits like water heaters do not need a neutral.
Answer: They're packing a lot of information in one sentence.
They're making a distinction between 3-phase (like New York City and Brazil) and split-phase (everywhere else in 120V-land).  Split-phase is really just single-phase, with a tap in the middle.  The middle tap goes to neutral, and since neutral is supposed to be near ground potential, we usually don't bother putting circuit breakers on it.
So they are telling you that both hot wires need a circuit breaker.  That is also to deter you from hooking it up 240V-only (no neutral) or Euro-style 240V (neutral at one end, where you would normally only breaker the non-neutral).
By saying "120/240V", they are saying the oven requires neutral be in the middle.   Typically ovens use neutral for 120V loads, which are trivial: clock, controls, ignitors and the oven light.  Incandescent bulbs s are as happy at 500F as Br'er Rabbit is in the briar patch, so bringing 120V out to an oven lets you use any dirt-common 120V incandescent bulb, instead of having to hit up Batteries-n-Bulbs for a weird 240V bulb. For this reason they bring neutral to ovens.
By saying 3- or 4-wire, they are saying they don't care if there's a ground.  However, Code cares if there's a ground.  Prior to 1989 (??) you could wire an oven with hot-hot-neutral no ground. (not alright was wiring it with 8/2 NM cable with bare neutral; the only bare neutral ever allowed was SE type: strands wrapped around conductors).   They are saying if your house doesn't have a ground wire, they can accommodate that.
What they do is ground the oven to neutral.  Which is awesome until the neutral breaks, then, opening the oven door causes the chassis of the oven to be electrified at 120V.  But hey, at least you don't have to search for a 240V bulb!


Intentionally breaking up a developed monopoly

Question: In Monopoly Deal, can you take a wild property away from a compete set with a house and hotel on it, place the house and hotel in your bank, and use the wild property towards another set?
Answer: Yes, you can.
The rules on wilds say:

You can swap [wilds] around amoungst different sets on your turn.

Hasbro answered what happens to houses and hotels on a set that gets broken up:

If you break up a full set that has houses and hotels, those houses and hotels have to go into your bank.

Thus, you can intentionally break up your own monopoly by moving the wild, in which case, the houses and hotels go to your bank.


How does photos app in mac imports pictures from hard disk?

Question: I copied some pictures in my mac from my phone using a usb. But in photos app some of them are being shown and some not shown. Some of them I have deleted are being shown and some are not being shown after deletion from finder as jpeg files. My question is how does photos app work?
Answer: The Photos app works by creating a library of your photos files.   A regular library has two important parts, the books on the shelves and some kind of cataloging system to help you to find the book that you are looking for.  If you brought a cookbook that you bought into a real library, other library patrons wouldn't be looking at your cookbook because it is not a part of the library's collection.
In the same way, if you copy pictures onto the hard drive of your computer, but do not tell the Photos app about them, then they are not considered a part of the Photos library.
There are several ways to import photos into the Photos App.  Photo's usually opens when you connect a phone, for example and will attempt to import photos that way.  If you have a folder with pictures though,  you can either drag that into the window of the Photos app or from the Menu Bar with Photos open click File>Import.  For more check out https://support.apple.com/kb/PH21297?locale=en_US


Typesetting functions: italics or non italics?

Question: I've been typesetting all my functions in non-italics (even for $f(x)$), but am not sure if this is the correct convention. This website suggests that generic functions (e.g., $f(x), g(x)$ should be in italics and only ones with fixed meaning should not (e.g., $\sin(x)$). What if I give the function a fixed meaning (e.g., $F(x)$ always mean XXX in the text). What convention does everyone use?
Comment: Using Latex thanks
Comment: Please tell us whether you use Plain-TeX or LaTeX.
Answer: There are various, and often conflicting, typographical conventions for virtually everything under the sun, including mathematical typesetting. It's true that some typographical conventions are more widely observed than others, depending on which country and typographical tradition you feel you are associated with. However, there is no universal convention for math typesetting, beyond possibly [??] the convention that the = symbol should always signify "equality" or "is equal to" -- in some properly defined sense, of course.
Rather than committing to any one given math style, you may want to look into typesetting your documents under XeLaTeX and/or LuaLaTeX. That way, you can make use of the unicode-math package, which offers four [yes, 4] different "math styles" that govern the way non-bold lowercase and uppercase Latin and Greek letters are typeset. They are:

ISO: italic (aka sloped) shape for all Latin and Greek letters, both uppercase and lowercase.

TeX (maybe should be called "Knuth"?): italic shape for all Latin letters (both uppercase and lowercase); italic lowercase Greek letters; upright uppercase Greek letters.

french: italic lowercase Latin letters; upright uppercase Latin letters; upright lowercase and uppercase Greek letters.

upright: upright shape for all Latin and Greek letters, both uppercase and lowercase.

I'm pretty confident that these four styles manage to cover the vast majority of conventions one may run into "in the wild". However, I wouldn't be surprised if there were some math typesetting conventions out there, somewhere, that do not conform to one of these four styles. Do please let me know if you run across such a deviant math style...
The following table shows how these styles affect the "look" of lowercase and uppercase Latin and Greek letters.

The important thing to do is to use as little visual formatting as possible and, instead, to rely on LaTeX and the unicode-math package to do the tedious job for you of making the typeset mathematics adhere to the chosen style.
The unicode-math package also offers three options for the bold-style criterion: ISO, TeX, and upright; see section 5.2 of the package's user guide for detailed information. To use the ISO style for regular-weight letters and the upright style for bold letters, you'd type
\setmathfont{Stix Two Math}[math-style=ISO,bold-style=upright]

You asked a separate question:

What if I give the function a fixed meaning (e.g., $F(x)$ always mean XXX in the text)?

The typographic issue worth noting isn't that F could happen to represent only one specific function -- at least in your usage of F. The typographic issue at stake is that F is very much a generic symbol; as such, the way it should get typeset should very much depend on the math style you employ. In contrast, \sin can only ever mean one thing -- unless you want to assign a non-standard meaning to \sin, in which case you will have well earned the unforgiving and everlasting enmity of your readers...

Here's the code that gave rise to the screenshot shown above.
\documentclass{article}
\usepackage{booktabs,unicode-math}
\setmainfont{Stix Two Text} % or some other suitable text font
\newcommand\blurb{$abc \quad y=f(x) \quad ABC \quad \sigma\phi\psi \quad \Sigma\Phi\Psi$}
\begin{document}
\begin{tabular}{@{}ll@{}}
math style & output \\
\midrule
ISO & \setmathfont{Stix Two Math}[math-style=ISO]\blurb \\
TeX & \setmathfont{Stix Two Math}[math-style=TeX]\blurb \\
french & \setmathfont{Stix Two Math}[math-style=french]\blurb  \\
upright & \setmathfont{Stix Two Math}[math-style=upright]\blurb \\
\end{tabular}
\end{document}

Comment: Thanks very much for this detailed response
Comment: @mickep - Thanks. AFAICT, `math-style=literal` isn't really comparable to the four math styles I mention in my answer. The main effect of `math-style=literal` is to assure that if you enter a given symbol (say, the glyph for upright-alpha) directly, it will get rendered "as is". In contrast, if `math-style=TeX` were in effect, Xe/LuaLaTeX would produce a *slanted* alpha glyph even though the input consists of an upright alpha. I must confess to not knowing what a meaningful use case for `math-style=literal` could be.
Comment: What about `sin` and `e` and `i`? There the styles may vary more then your four generic types (which are valuable).
Comment: @usr1234567 - I'm not aware of a math style that *recommends* using italic letters for `sin`, `cos`, `exp`, `log`, etc; however, I wouldn't be terribly shocked if such a style did exist. The ISO standards webpage cited by the OP states that `e` and `i` should be rendered in the upright font shape *if* they denote the resp. famous mathematical constants. However, I believe it's fair to say that adherence to this standard is far from universal -- at least among mathematicians. (Aside: I use `i` a lot in my own writing, but as an indexing variable, *never* as the square root of `-1`.)
Comment: Nice answer! I've seen that there also seems to be a `math-style=literal`, but I'm not sure if that is used.


Record Lock and uncommitted Work Pending

Question: Are all the records are locked for update during a Dml or only it's locked when we use 'For Update' in the query? If it's just when using a query with 'for update' then why Salesforce throws 'uncommitted work pending' error even when we don't use record lock before a call-out?
Comment: I'd [edit] your question with more specifics (ex. code that's throwing the error, the exact error message). You're talking about record lock but it sounds like you're having issues with a common error related to doing a DML before a callout in the same transaction as explained [here](https://help.salesforce.com/articleView?id=000326129&type=1&mode=1).
Answer: The uncommitted work error will occur for things that you may not logically think as DML operations, including posting chatter messages, sending emails, publishing events, locking and unlocking records (approval process locks), setting a database savepoint for potential later rollback, scheduling a future, Batchable, Schedulable, or Queuable, etc. Simply querying records will not cause an uncommitted work error, even if you use FOR UPDATE. However, doing most other things that interact with the database will cause this error to occur.
Answer: The error 'uncommitted work pending' is not because of record lock instead it's because Salesforce does not allow Callout if there is any pending write operation on Database(the reason might be it does not want to hold write lock for long duration because callout response time depends on external system/service provider). Also in Apex, you cannot explicitly call database commit, its implicit though as per OoE.


Should I answer the kaddish if I'm still at the amidah?

Question: Generally, when I say the amidah with a minyan, I'm one of the last (if not the last) persons finishing. This means I'm still at the amidah when the kaddish is recited. And I don't know if I should keep praying, respond amen, or keep silent. What should I do when this happens?
Comment: http://judaism.stackexchange.com/a/54061
Answer: The Shulchan Aruch says that one should not answer to kaddish or kedusha in the middle of amidah. He says that one should stop praying, listen and lechaven and that will be as though one answered.
In Pninei Halacha Rabbi Eliezer Melamed brings sources that some say that doing so would constitute a hefsek. His conclusion is that one should wait and listen, as the Shulchan Aruch says, unless it intereferes with one's kavana, in which case it is allowed to go by those who say that it is forbidden to stop.
Comment: @msh210 http://judaism.stackexchange.com/a/54061
Comment: Thanks! But who says it is forbidden to stop?
Comment: @Gabe12 No problem, it is there in the notes: Rabeinu Tam and the Rif say one is not allowed to stop. Rashi and Rabeinu Chananel say one must stop and listen. The Tosfot and the Ran say the *minhag* is to stop and listen, and that's what the *Shulchan Aruch* decided. But if it intereferes with *kavana* Rabbi Melamed says that one can go with the above, as stated as well in Tzitz Eliezer (11, 3) and Halichot Shelomo (6, 12).
Comment: I don't have it before me now but seem to recall that some _acharonim_ explain that the stop-and-listen rule applies only to "_Y'he sh'meh..._".


To be content or contented? When to use them correctly?

Question: If I have a million dollars, I will be content or contented?
Which is appropriate?
Comment: If I had a million dollars, I'd buy you a green dress (but not a real green dress, [that's cruel](http://www.com-www.com/musiclyrics/barenakedladies-ifihadamilliondollars.html)). I'd also be rich and content.
Answer: Both words are adjectives and therefore either would be grammatically correct:

If I had a million dollars, I'd be content.
  If I had a million dollars, I'd be contented.

A similar question was asked on ELU almost two years before this one; none of the answers there have garnered a ton of votes. The UE forum also has a similar question, and one user there replied:

I have been trying for years to find a good explanation, and I have
  never found one.

I think there are some contexts where one word sounds more "natural" than the other. For example, I'd probably say:

She was content with her job.
  She was a contented worker who always had a warm smile.

However, near as I can tell, this is grounded only in personal preference; the words could be swapped without committing a grammatical faux pas.
As for your context, I like the first one better, but that's just me. I seem to usually prefer content when it falls at the end of a sentence:

If I had a million dollars, I'd be content.
Comment: One little difference is forming adverbs with *-ly*.  People usually say *contentedly*, not *contently*.  ([COCA](http://corpus.byu.edu/coca/?c=coca&q=42563831))
Answer: "Content" is a simple adjective.   It describes a state or condition that some noun might possess.   "Contented" is a participle.   Like the adjective, it can modify a noun and it describes a state or condition.   Unlike the adjective, it implies an agent.
If you have a million dollars and if your wealth makes you content, then you are contented.  That is to say, you are contented by your wealth, or your wealth contents you.   The million dollars is the agent for the verb "to content".
In most cases, you can freely choose whether to imply an agent.   It is just as appropriate to be content with your wealth as it is to be contented by your wealth.


How to add a custom read more link in views?

Question: I have used views to create a page to look like the below screen shot. I have used trim to limit the description of the body to 200 texts. I have added "Link" and have termed it as "Read more". Is it possible to change the "Link" text in our webshop as "to shop"? I want this change to happen only for that specific item. For the rest it should be "Read more"
Answer: Probably going about it the wrong way, you could either set a custom text field on your node called 'Link text' then output that as a field and check 'Link this field to its node' in views.
Or you could use the 'Link' field type contrib module, then output that as a field, this will allow you to set custom text as the link label, but you will also need to supply the link itself. But this will allow more flexibility.
Answer: The Views UI does not offer if'fing. And - frankly - I almost gave up using the Rewrite options, as I noticed I'm more productive with tpl files. If you want to alter the link depending on some context, try using row theming then.

Add a field named Taxonomy Term: Term ID. Make sure it outputs raw, without any classes, wrappers, and stuff
In the Theme Information section: pick a theme tpl file that suits you, put it on server and rescan template to make it recognized.
Put your field where you want: print $fields['tid']->contents
In the PHP code, make a variable that will form the link text depending on the context you wish
Build the link using the l() function, using the variable as the first parameter. The url for terms is 'taxonomy/term/$tid'. I don't remember if the l function replaces it with alias, if not, use drupal_get_alias_path on the url, to have an aliased link.

That should work.


Why do we say, "keep a stiff upper lip"?

Question: I've never understood the origin of the phrase, "keep a stiff upper lip".  Presumably it's something to do with avoiding crying (as it means to remain stoical), but if anything it's the bottom lip that may wobble before one cries; generally the upper lip always stays stiff anyway.  So, why do we say this to indicate stoicism?
Comment: There's a related Briticism, "[keep your pecker up](http://www.phrases.org.uk/meanings/217400.html)", which sounds impossibly obscene to an American ear...
Answer: As reported from the Online Etymology Dictionary, keep a stiff upper lip is attested from 1815.
It is probably referring to the facial mimic, in the same way bite one's lip and curl one's lip do.
The meaning of a stiff upper lip reported by the NOAD is "a quality of uncomplaining stoicism."

Senior managers had to keep a stiff upper lip and remain.
Answer: From the Phrase Finder:

Remain resolute and unemotional in the face of adversity, or even tragedy.
This is such a clichéd expression that it is difficult to imagine doing anything else with a stiff upper lip apart from keeping it. It is similar to 'keep a straight face'

Hope that explained why we use it.
Answer: Back when men grew moustaches, the quivering of the upper lip was more noticeable. Hence the phrase.
Comment: Men still grow moustaches.
Comment: Do you have a source?
Comment: @user11550 On-point, hahaha.
Answer: I have heard, on relatively good authority, that this hearkens back to when the British had military forces in Pakistan.  The arms they used were single-shot rifles which had to be loaded similar to an old musket, but with the powder in a paper cartridge.  Before putting the cartridge in the barrel the soldier had to tear off a seal on one end with his teeth.  But if he was missing his two upper front teeth he could not do this and hence was not qualified to be on the front lines.
Supposedly some folks figured out that if they knocked out those teeth they could avoid service in Pakistan.  But of course the missing teeth resulted in a lack of stiffness of the upper lip.
So "Keep a stiff upper lip" came to mean "Have courage".
Comment: (I'm vaguely recalling that I heard this on Paul Harvey's "The Rest of the Story", but I can't find a reference.)
Comment: And I will note that this same rifle cartridge was apparently a factor in the [Indian Mutiny of 1857](https://www.thoughtco.com/the-british-raj-in-india-195275#the-indian-mutiny-of-1857).
Comment: https://www.royal-irish.com/artefacts/cartridges-and-indian-mutiny
Answer: I once read that the phrase comes from a time when dead sailors were sewn into canvas shrouds.  Because it was also common for sailors to try escaping by pretending they were dead, the needle was put through their lip at the last stitch to see if they responded, showing they were really alive.  There must be more to the story because how would Anyone survive if they were just buried at sea.?
Comment: Do you have supporting references?


Time in Stack Overflow bug

Question:
I am seeing the same date and time for a long time, and it is not changing. Why so?
Comment: You mean why the SO developer team doesn't deploy a new version of this site every second to get an accurate clock?
Answer: It isn't changing because we didn't deploy there since.
Those are build numbers/versions, not the current date.
Also - that's not Stack Overflow. It is stackexchange.com.
Comment: @SagarV - you can't remove it because it has an upvoted answer. I will not remove it as the question (and answer) contain information that is useful for future visitors who may have the same question. If the community decides to remove it, so be it.
Comment: A software deploy? No. We don't deploy the site every day. The database gets updated daily. That's a different thing.
Comment: ya correct. I took the screenshot from SE leagues. There is an update yesterday am I correct?
Comment: To be clear @Sagar - that isn't a date and time; it is the ID of the current version of the site's *code* that *happens* to be structured a bit like a date and time. People work on the site all the time, and every time a change is published the version number changes.
Comment: As this is on hold as off topic, I am not able to remove it. @Oded will you delete this question please

Time in Stack Overflow bug


state of data bus in store instruction

Question: I am just confused on at the store instruction in assembly. when the address bus carries the memory address to be written to, what is the state of the data bus. Does it carry the memory contents of the address pointed to by
Answer: Yes in a simplistic processor/model the address computed by the instruction is put on the address bus, if this is a write then the data goes on the data bus, there is often a write strobe of some sort of indication to the memory that this is a write operation as well as some sort of an enable to tell the memory that this is actually a memory cycle.  to simplify logic sometimes the data bus and even address bus is allowed to do whatever and is only valid when the proper enables/strobes are present.
http://github.com/dwelch67 has logic simulators you can run to see this in action.  The amber_samples repo and the mips1_core_samples also allows you to see busses in action.
I say simplistic because once caches and mmu's get involved, things get more complicated.  The addresses can change, many reads may be required to perform one simple write.  Deep down in the core of the processor, the memory bus nearest the core will still resemble some sort of address and data bus that takes the bits from your instruction and puts them on those busses.
No two processor families are the same, an ARM and an x86 and a mips have no reason to resemble each other in any way and may very well not look the same even though on all of them you can say for example store the value 0x1234 to the address 0x1000 using an instruction.

state of data bus in store instruction


Is it necessary to bleed brakes if the system is never opened?

Question: Just wondering if there is a point to bleeding the brakes if the system is never opened, since it's effectively a closed system. For example, does the chemical change should the fluid reach boiling point release gas? Or should one change the fluid periodically because of some type of degradation, which really falls under the category of flush and not bleed, but the process is similar from what I understand.
Answer: Brake fluid by nature is hygroscopic, meaning it absorbs water. Even though it is considered a closed system, it doesn't mean it isn't hermetically sealed. Brake fluid will absorb water, have no doubt. You should change your brake fluid once a year or there about.
As the brake fluid absorbs water, it becomes less tolerant of heat, meaning it boils at a lower temperature. When you step on the brakes, you are exchanging motion to create heat, which the brake fluid must be able to tolerate. Here is a chart of the different DOT's used for autos (pulled from this Wikipedia page):
<code>        Dry boiling point   Wet boiling point   Viscosity limit     Primary constituent
DOT 2   190 °C (374 °F)     140 °C (284 °F)      ?                  Castor oil/alcohol
DOT 3   205 °C (401 °F)     140 °C (284 °F)     1500 mm2/s          Glycol Ether
DOT 4   230 °C (446 °F)     155 °C (311 °F)     1800 mm2/s          Glycol Ether/Borate Ester
DOT 5   260 °C (500 °F)     180 °C (356 °F)     900 mm2/s           Silicone
DOT5.1  260 °C (500 °F)     180 °C (356 °F)     900 mm2/s           Glycol Ether/Borate Ester
</code>
Brake fluid also needs to be changed to reduce corrosion in the brake lines.
You are right in that the process is pretty much exactly the same between flushing and bleeding. If you change a part which requires you to bleed your system, you may as well flush it while you are at it.
Comment: Passenger vehicles usually require either DOT3 or 4. Yes, consult your owners manual, or ask a different question. If you do, ensure you put the year/make/model.
Comment: One to two years is the industry standard. If Honda says every three years, so be it. As a further post down that thread says, *Change it at the interval that makes you sleep better at night.* If you want to wait that long, then do so. If you want to change it every year, there is no issue in it. The brake fluid will continue to absorb water no matter what you do.
Comment: This may warrant a separate question, but for passenger vehicles, will the latest DOT suffice, or should I look up the specific DOT for my vehicle?
Comment: Once a year seems a bit much, relate form [here](http://www.piloteers.org/forums/18-maintenance/29290-pilot-brake-fluid-change-every-3-years.html) indicates a factory call for once every 3 years.
Answer: I drove my 2001 Bonneville 437,000 miles over the course of 10 years and NEVER changed the brake fluid. Take it for what it's worth.
Comment: That doesn't mean you shouldn't change it.
Comment: Rite on man. Did you notice a decrease in brake performance over time?


in the town or in town

Question: I would like to ask if it is acceptable to call an event "English in the town" putting the emphasis on the contrast that is is not held in the classroom.
It is the name of the event, i.e. it should attract and draw attention to it.
Thank you.
Comment: Hmm.. I would try "English on the streets". (0:
Comment: The thing is, the event is held in a coffee bar, so it is not really on the streets :) I just wanted to emphasize that it is not held in the class, but in town. I got a complaint that one can never say in the town because in town is an idiomatic expression. But I called it "in the town" on purpose. Now I am in doubt.
Comment: "English in Town" is a clever and intriguing name for the event. Go ahead and use that. Trust me.
Comment: Thank you. I was just wondering if I I could use the definite article with town. I understand its idiomatic usage, as in "in town, on the town," but if I wanted to lay stress on it. I guess I was wrong
Answer: Both are possible, but "in town" is significantly more idiomatic.
"In town" not only means "in the town, as opposed to outside in a rural area", but also strongly connotes "visiting, on hand, close by". It's understood to mean "in our town".

Hey, kids! There's a Santa Claus parade in town. Do you want to go?

"In the town", on the other hand, requires the mention of a specific town.

There is much to see in the town of Rochester, New York.
In the countryside there's little to see, but in the town there are several museums.

in the town or in town


How to install wiringPi in Matlab Simulink for interface Raspberry Pi with ADC?

Question: I like to use IC MCP3008 to change analogue signal to digital signal for Raspberry Pi interface with Matlab Simulink. But I getting the error missing file wiringPi.h and wiringPi.c. May I know how can I add the wiringPi in the Matlab directory?
Answer: Is wiringPi installed by default in the distribution you are using?
I'm not sure if it is currently pre-installed with Raspbian.
If you are using Raspbian (or another Debian based distribution) try the following command.
sudo apt-get install wiringpi
Comment: I don't know how to install or add the wiringPi in Matlab. I open the Linux and install the wiringPi is success, but still getting  this fatal error: /home/pi/wiringPi/wiringPi/wiringPi.h: No such file or directory
Comment: @TamamaChin I'm afraid I can't help if the problem is specific to Matlab (which I know nothing about).  Perhaps Matlab has a configuration section to specify the location of libraries etc.


Do I need to show my passport when I leave the UK?

Question: I'm a dual US/German citizen, residing in the UK. I am currently applying for a visa for South Africa with my German passport, which may take another 3 weeks to process. Now, I need to travel to the US for a month. I am still in possession of my US passport so will obviously use that passport when I enter the US. I have authorized a friend to pick up my German passport and send it to me in the US, once the South African embassy is done processing my visa application.  My worry is that since I entered the UK using my German passport, it may cause problems if I leave on a different passport. So my question is, do I need to show a passport at the UK border before I leave?
Comment: Keep a full copy of your SA application along with the portrait page of your German passport.  They have no legal value, but may help support if you have to explain something.
Comment: TBC you'll be leaving by heathrow airport, or?
Answer: Largely No, but...
The UK does not have exit immigration checks. Your passport will be checked by airlines or ferry staff to verify you'll be accepted into your destination, but no-one from the UK Border Agency will see/check/etc you or your passport
However... The UK is slowly, and many would say somewhat incompetently, rolling out a scheme originally called E-Borders. That will involve carriers (ferries, trains, airlines etc) sending electronically to the UKBA the details of everyone entering and leaving the UK. It was partly deployed, and I believe will be rolled into the new program. Under that, there's a chance that the UKBA will be told the details of you leaving.
Your problem is more likely to be on your return to the UK. You'd be entering the UK on your US passport, which only entitles you to a short visit (up to 90 days), and not for the purposes of living in the UK. You'll get a stamp. You may have issues with convincing them to let you in given that you do live in the UK, and you may have issues if you don't leave the UK within 90 days on the US passport as the system may detect you as an overstay.
Comment: It's not 90 days, it's 6 months. Also UKBA doesn't exist any more.  Otherwise fine.
Comment: That's correct. But it's still nice to know the consequences should I not receive my passport back in time.


How to remove names from "GitHub contribution list"

Question: I fixed some minor typos from someone's GitHub repository and now, in my GitHub profile, the repository is listed as one of which I have contributed to. Is there any way to remove it from my profile?
Comment: Have you deleted the fork and does it remove it from your list?
Comment: Are you still watching the repo and do you still have a fork?
Comment: I have a fork, but I can delete it, not problem. And, I am not watching it.
Comment: I've deleted the fork, but it is still there. Showing, at the right side of the profile page, where it says: "Repositories contributed to"
Answer: Right now the only way to "remove" your name from the "Repositories contributed to" and "Repositories you contribute to" lists is to bury it with more commits on more active projects.
The repos that show up there are based on two key ranking factors:

Recent activity on the original repo
Total commits by you accepted/merged into the repo

So all you need to do is commit more to other projects and do so on projects with more activity than those you want to push down.
That is until GitHub release a new feature where you can cherry pick what shows up in those two boxes.
Comment: Thanks @Eight Days. Its not the answer I wanted to hear.

How to remove names from “GitHub contribution list”


How can I check if two attributes match between a point and the area within which the point is located? in QGIS

Question: I would like to verify a geocoding process. I have used googles API and have geocoded about 35.000 adresses within Austria. By inspecting the locations it is obvious that a few lie outside of Austria (5 total) and that around another 30 are not coded in the right counties. This I could confirm visually, but I´m not sure how much I can trust the rest of the results and can´t check 35000 points visually.  Therefore I would like to see if the adresses lie in the right local communities. I have a point layer containing the street adresses and the respective community and a vector layer containing all the administrative boundaries. So I would like to do a sort of spatial query by location AND attribute, to see if the local community contained in my point layer matches the name of the community that is contained in my administrative boundary layer to root out obvious mistakes. Does anybody have an idea how I could do this?
Comment: have a look to the 'virtual layer' concept of QGIS where you can query spatial and non-spatial attributes together in form of a SQL statement. see https://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/virtual_layers.html for more information
Answer: If you have PostGIS with your QGIS (or maybe you could use virtual layers instead !), you can run an SQL like the following to select the points that fall within admin boundaries and have matching names with the administrative boundaries they fall within:
SELECT  p1.point_id, p1.community_name, p2.admin_boundary_name
FROM points p1, admin_boundaries p2
WHERE ST_Within(p1.geom, p2.geom)
AND p1.community_name = p2.admin_boundary_name

I tried to use descriptive names, you will have to replace them with whatever you have, and if you also want the geometries of the points returned, just add p1.geom to the select.
Answer: This is probably most simply done using a two-step process of spatial join and then adding a field to check for matches.  So...

Spatial join (Join attributes by location) - your input layer is your points and your join layer is your administrative boundary polygons.  This should join your administrative boundary names to your points.
Open the attribute table of your output, and click field calculator.  Use the field calculator to create a new field (called "match" or something similar) and use the expression "Community Name" == "Admin Name" to flag matches vs non-matches.
Comment: Thanks a lot! this one was really the simplest solution I could implement without high GIS knowledge, very helpful to verify a huge batch of geocoded adresses!


Is it better to create an index before filling a table with data, or after the data is in place?

Question: I have a table of about 100M rows that I am going to copy to alter, adding an index.  I'm not so concerned with the time it takes to create the new table, but will the created index be more efficient if I alter the table before inserting any data or insert the data first and then add the index?
Answer: Creating  index after data insert is more efficient way (it even often recomended to drop index before batch import and after import recreate it).
Syntetic example (PostgreSQL 9.1, slow development machine, one million rows):
CREATE TABLE test1(id serial, x integer);
INSERT INTO test1(id, x) SELECT x.id, x.id*100 FROM generate_series(1,1000000) AS x(id);
-- Time: 7816.561 ms
CREATE INDEX test1_x ON test1 (x);
-- Time: 4183.614 ms

Insert and then create index - about 12 sec
CREATE TABLE test2(id serial, x integer);
CREATE INDEX test2_x ON test2 (x);
-- Time: 2.315 ms
INSERT INTO test2(id, x) SELECT x.id, x.id*100 FROM generate_series(1,1000000) AS x(id);
-- Time: 25399.460 ms

Create index and then insert - about 25.5 sec (more than two times slower)
Comment: +1, indexes will markedly slow down an operation involving 100M row insert task, so better to drop them and recreate them.
Comment: What about 10K rows? 100 rows? Is there a cutoff where the index is faster to create first? And what about the data being inserted and indexed upon (text vs geography vs integer)? Does that change any of this?
Comment: What about index creation on #Temp tables, does anyone have any resource / links that discuss if the same applies to the Temp table indexes!  TIA.
Answer: It is probably better to create the index after the rows are added.  Not only will it be faster, but the tree balancing will probably be better.
Edit "balancing" probably is not the best choice of terms here.  In the case of a b-tree, it is balanced by definition.  But that does not mean that the b-tree has the optimal layout. Child node distribution within parents can be uneven (leading to more cost in future updates) and the tree depth can end up being deeper than necessary if the balancing is not performed carefully during updates.  If the index is created after the rows are added, it is will more likely have a better distribution. In addition, index pages on disk may have less fragmentation after the index is built.  A bit more information here
Answer: This doesn't matter on this problem because:

If you add data first to the table and after it you add index. Your index generating time will be O(n*log(N)) longer (where n is a rows added). Because tree gerating time is O(N*log(N)) then if you split this into old data and new data you get O((X+n)*log(N)) this can be simply converted to O(X*log(N) + n*log(N)) and in this format you can simply see what you will wait additional.
If you add index and after it put data. Every row (you have n new rows) you get longer insert additional time O(log(N)) needed to regenerate structure of the tree after adding new element into it (index column from new row, because index already exists and new row was added then index must be regenerated to balanced structure, this cost O(log(P)) where P is a index power [elements in index]). You have n new rows then finally you have n * O(log(N)) then O(n*log(N)) summary additional time.
Answer: Indexes created after are much faster in most cases. Case in point: 20 million rows with full text on varchar(255) - (Business Name)
Index in place whilst importing rows - a match against taking up to 20 seconds in worst cases.
Drop index and re-create - match against taking less than 1 second every time
Answer: I'm not sure it'll really matter for index efficiency's sake, since in both cases you are inserting new data into the index.  The server wouldnt know how unbalanced an index would be until after its built, basically.  Speed wise, obviously, do the inserts without the index.


Return undefined or throw error upon invalid function input?

Question: I know this is a duplicate but the anwser over here simply does not satisfy me:
JS library best practice: Return undefined or throw error on bad function input?
I'd like to talk about a few things that were pointed out and what remained unclear to me.
First off I'd like to present one example where I personally would rather throw an error then return undefined.
function sum(a, b)

Say the consumer passes a string because he passed the direct value of an input box and the end user typed in something other than a number.
If I as the author of sum had returned undefined upon string input, then even if the dev had typed in a string at some point, nothing would have happened and he wouldnt have cared, as thats what was to be expected. But in this case, had I thrown an error, the dev would have realised that thats actually an edge case that had to be handled, because after all, no one wants errors in their program.
So basicly, why not make devs aware of edge cases by actually throwing errors?
This was a comment on the question mentioned above which pretty much is exactly what I am asking but no one replied yet:

"But since it takes 1 extra min for me to throw an error instead of dying silently, won't that save hours in debugging time for those who didn't take the time to read the docs?"

Another point that is in the accepted anwser from above:

"Catching an exception is a lot slower than testing a return value so if an error is a common occurrence, then exceptions will be a lot slower."

The only case I can think of where this qoute applies to is with I/O or networky stuff where the input is always in the correct format but e.g. a user does not exist with that id.
In cases like that, I understand why throwing an error would slow down the process. But again, what about a math library consisting of only pure, synchronous functions?
Isn't it smarter to check the input instead of checking the output? (Make sure the input will work instead of running the function and checking if undefined is returned)
A lot of my confusion really stems from type checking actually as I do come from the C# world and think a library should be used in its exact way as intended rather than it being merciful and working anyway.
Answer: I would argue that for an OO language it's common to return null even though that's bad practice and the inventor of null calls it the billion dollar mistake.
Functional languages have solved this problem before OO even existed by having a Maybe type.
When composing functions you could use a variation of a Maybe that contains a Success or Failure, Scott Wlaschin calls this railway orientated programming and Promises are a kind of railway orientated programming.
The problem with using Maybe in OO is that you don't have union types. In F# your code would look like this:
let x =
  // 9/0 throws so divideBy returns None the caller of divideBy can
  //decide what to do this this.
  match (divideBy 9 0) with
  | Some result -> //process result
  | None -> //handle this case

When matching something in F# you'll get a compile time error if you forget a case (not handle the None). In OO you won't and are stuck with runtime errors or failing quietly. Improvements in C# may come with the compiler warning you when you try to access nullable types but that only takes care of the if not null, it does not force you to provide an else.
So in JavaScript I would advice using Promises or returning a result object. Promises are native to modern browsers and nodejs. In the browser it will shout at you in the console when you do not handle failed promises (errors in console and break at uncaught rejection in sources). In the future; for nodejs; it will cause your process to stop as with an unhandled exception.
//example with promises
const processNumber = compose([
  //assuming divideBy returns a promise that is rejected when dividing by zero
  divideBy(9)
  ,plus(1)
  ,minus(2)
  ,toString
])
// 9/0 returns rejected promise so plus,minus and toString are never executed
processNumber(0)
.then(
  success => //do something with the success value
  ,fail => //do something with the failure
);

//example of result type:
const Success = {}
,Failure = {}
,result = (type) => (value) =>
  (type === Failure)
    //Failure type should throw when trying to get a value out of it
    ? Object.create({type:type,error:value}, {
      value: {
        configurable: false,
        get: function() {
          throw "Cannot get value from Failure type"
        }
      }
    })
    : ({
      type:type
      ,value:value
    })
;
//convert a function (T->T) to (result T->result T)
const lift = fn => arg => {
  //do not call funcion if argument is of type Failure
  if(arg.type === Failure){
    return arg;
  }
  try {
    const r = fn(arg.value);
    //return a success result
    return result(Success)(r);
  } catch (e) {
    //return a failure result
    return result(Failure)(e);
  }
};
//takes a result and returns a result
const processNumber = compose(
  [
    //assuming divideBy throws error when dividing by zero
    divideBy(9)
    ,plus(1)
    ,minus(2)
    ,toString
  ].map( //lift (T->T) to (result T -> result T)
    x => lift(x)
  )
);

const r = processNumber(result(Success)(0));//returns result of type Failure
if(r.type === Failure){
  //handle failure
} else {
  //handle r.value
}

You could just return null or throw but more and more people in OO start to realize that's not the best way to handle things. Throwing is a side effect so makes the function impure (the more impure functions the harder it is maintain your code).
Null is not good type to reflect functions that could fail. You don't know why it failed to return the expected type and now have to make assumptions as to why, making assumptions in code makes your code harder to maintain.
Comment: What about times where promises would seriously be overkill like math functions etc.? Also, maybes in C# look wonderful. I just hope they catch on
Comment: @ThatBrianDude In Java and C# returning null could be used to indicate something went wrong and throwing an exception is to indicate what went wrong. I think it's better to return a `Result` type for synchronous functions in JavaScript, it's like a `Maybe` but instead of `Some` and `None` it has `Success` and `Failure` where `Success` is the actual value and `Failure` is the error. Working on an example for js here: https://github.com/amsterdamharu/lib/blob/master/src/index.js#L36-L125 but will have to finish it tomorrow or later.


Can two 120V outlets be converted to one 240V for stacked washer dryer combo?

Question: There are two 120V outlets in laundry area of all electric townhouse built in 1982. All the 24" wide electric stacked washer dryers combos require 240V. What is the best way to make necessary improvement?
Comment: Can you provide some pictures of the insides of the outlet boxes and main panel? I'm surprised there's not a 240v outlet in the laundry area.
Comment: Seems that [the basic premise posed here isn't true](https://www.whirlpool.com/laundry/laundry-sets/washer-dryer-combination/p.1.6-cu.ft,-120v-20a-electric-stacked-laundry-center-with-6-wash-cycles-and-wrinkle-shield.wet4124hw.html).
Comment: Since we have not received an update look up portable dryers I saw 3 in 1 page that were 120v panda, magic chef and extreme power us. The one we had in our big motor home may have been magic chef as there was a high speed water extractor the same brand and that made the small dryer usable I haven't used the heat pump style dryer but that sounds like a good option also.
Comment: Can't say yes or no at this point but the receptacle for the washer in the US is required to be 120v 20 amps. It depends on what is available in that area. The dryer in my motor home was only 120v but it was quite small , we would need the info on the washer and dryers and the available circuits. Washer circuit dryer circuit there may be a different option.
Answer: Your unit already has a 240V dryer plug. Guaranteed.
An all-electric townhouse built in 1982 WILL have a 240V electric dryer plug in the laundry room.  Period, fullstop, end of subject.  You just haven't found it yet.
While you're searching, also search for a gas line.  That would be very surprising in a development that is all electric, because usually the whole point of going all-electric in a condo complex is to avoid even having to bring gas onto the property!   For instance my friend has an all-electric house, the entire square mile does not have gas lines.
I suspect you'll find no gas line.  If so, it is impossible for the building to receive an occupancy permit without a 240V dryer socket in the laundry area.  It MUST be there.
The longshot
Which makes no sense, because if the last guy did this, there'd be no way to dry clothes!!!!
Now, you know what the common 120V dual receptacle looks like.   Maybe you've also seen "single" 120V receptacles with a round socket instead of oval.  Each of those fits in a space we call a "gang" (no idea why).
If you're seeing two of those next to each other (say, 4 sockets, or 2 singles next to each other, or a duplex and a single) in a "2-gang" space with a basically square cover plate... then it's remotely possible that somebody hijacked the 240V dryer plug and replaced it with dual 120V circuits.
The hint is that a 240V dryer socket normally takes a 2-gang space.
Conversion in that direction is possible (240 to dual 120s).  And if that "240 -> dual-120" conversion was done, it can be un-done.
Other than that, conversion in the other direction is not possible: you can't take any random pair of 120V circuits and turn them into a 240V circuit.
This all seems highly improbable... but as Sherlock Holmes says, when you eliminate the impossible (the townhouse not having any dryer power), what remains no matter how improbable must be the truth.
Comment: Why _MUST_ there be a 240v plug there somewhere? Because code requires it. Unless the inspector was the builder's brother-in-law and took a little cash to look the other way, there will be a 240V there somewhere. (Just sayin' it a different way.)
Answer: Heat pump dryers to the rescue!
While traditional and even condensing electric dryers indeed draw far too much power to run on a 120V laundry circuit, thanks to the marvel of modern technology known as a heat pump dryer, all hope is not lost in your situation!  In particular, the Miele TWB1xx series of dryers plug into a standard 120V circuit and draws about 1kW of power; this permits it to be stacked with one of the Miele compact front loading washers using the manufacturer's WTV502 stack kit, while sharing the laundry branch circuit with the washer.  This does pull about 2.3kW of power from a 120V/20A circuit, but since you aren't expected to be running your washer and dryer for several hours straight on a regular basis, this is acceptable.
Note that while you won't need a dryer vent for the dryer I recommend, you'll need to rig the drain hose since heat pump dryers discharge the moisture from the clothes as condensate.  (They are basically dehumidifiers for clothes.)  Also, this trick only works with the Miele dryers; heat-pump dryers from other manufacturers are either 240V-only (Blomberg/Beko) or 120/240V (Samsung).
Answer: Probably not, the amperage required by a modern dryer is larger than is available from a standard 120V outlet.
You'll probably need an electrician to run a properly sized new cable from the electric service to the unit location.
Comment: Depends on your definition of "modern dryer" -- the Miele TWB1xx draw a mere 1kW at 120VAC...
Answer: The premise seems a bit odd: an all electric townhouse that, apparently, didn't have an electric dryer before. All the dryers I know knew of in 120/240 land, whether standalone or 24" stacked, require 240V. For a long time, that was the standard. But, as noted by others, there are now a number of dryers or combination washer/dryers that will run on just 120V! The times they are a changin'.
That being said, let's assume for the moment that you indeed do not have a 240V receptacle (typically NEMA 14-30) available in the laundry room.
Combine Receptacles
This is technically sometimes possible. Specifically, if you have 2 120V receptacles on different legs, then this can be done technically. If the receptacles are side-by-side (e.g., a duplex receptacle or two receptacles next to each other) then you can test this with a multimeter. You will either get 240V between the hot pins or 0V. If it is 240V, then the following issues apply:

Must be a Pair

Code requires that to combine two 120V circuits on opposite poles into one 240V circuit, the breakers must be next to each other (sort-of - could be outer pair of a proper quadplex, but that is actually one big unit that covers 2 full spaces, so depends on how you define "next to each other") and have common maintenance shutoff. As you will find in many questions & answers here, that can mean a handle-tie (so that the breakers trip independently but are manually shut off together) but normally just means a double breaker.

Must have Appropriate Wire

Typical 120V receptacles use 14 AWG wire on a 15A breaker or 12 AWG wire on a 20A breaker. But for a dryer, you typically need 10 AWG wire on a 30A breaker. If you need to replace the wire and the receptacle, you might as well run a new circuit. I find it highly unlikely that you will find 10 AWG wire on a 15A or 20A circuit, at least in an ordinary house.

You must have a 120V receptacle for the laundry room

AFAIK, you must have a 120V receptacle in the laundry room. If you convert these 2 receptacles to 240V, and you don't have any other receptacles in the room, then you can't do this. You can't just use the same circuit for 120V and 240V because of the 30A (dryer) vs. 20A (regular receptacles) problem - the 30A breaker would not properly protect appliances plugged into the 120V receptacle.
So all of that points to being able to legally combine the 2 120V circuits to get 1 240V circuit being extremely unlikely.
New Circuit
The usual solution is a new circuit. How easy/hard that will be depends on the distance (and obstacles) between the breaker panel and the laundry room, and how full your breaker panel is.
But check carefully to make sure there isn't another circuit lurking somewhere nearby. I find it unlikely (but not impossible) that an all electric townhouse built in 1982 would not have a 240V circuit for a dryer, unless it was split into 2 120V circuits for use elsewhere, which is possible. 240V -> 120V is much easier than the other way around - you can always use 10 AWG where you only need 12 AWG.
Comment: It's not me and I can't  see where you messed up anything.+1
Comment: Can downvoter please tell me what I messed up? I can then correct or delete.