Difference between 職務 and 業務

Question: Could you please explain the difference in meaning between 職務 {しょくむ} and 業務{ぎょうむ}? In which context are each of them the most suitable?
Comment: What have you been able to find out so far?
Comment: Thank you for your comment, @l'électeur.
Till now, I just know, that they mean some work, duties inside a single position. But as I tried to find some clear difference between them, I have got lost... I see their kanji, but still can't feel the exact difference.
Answer: 事業{じぎょう} means business or industry.
業務{ぎょうむ} means work done in reference to a business.
職務{しょくむ} means duties in reference to one's job or position.
To break it down, 事業{じぎょう} is what your company does, 業務{ぎょうむ} is what your department does, and 職務{しょくむ} is what you do.For example, if you worked in a video game company, the 事業{じぎょう} is the production and sales of video games. Within the company, you have departments like  production, sales and marketing; what they do falls under 業務{ぎょうむ}. And within sales, you have people with their own 職務{しょくむ}, like salesmen, people writing the invoices, people in charge of the inventory, etc.
Note that 業務 is often used to mean "business" or "commerical" like 業務連絡{ぎょうむれんらく} (business page) and 業務用冷蔵庫{ぎょうむようれいぞうこ} (commercial refrigerator.
Answer: 職務 refers to your personal responsibility/duty as a businessperson. 職務 is something assigned to each employee. For example "dereliction of duty" is 職務怠慢, not 業務怠慢.
業務 is business; everything your company does as a whole to earn money. For example Amazon's 業務 is online retailing and cloud computing. In the legal language 業務 means something much broader, but that's another story.

Difference between 職務 and 業務


How to avoid blown out highlights with the Nikon D300?

Question: Sometimes when I take photos with a Nikon D300 I got some blown out highlights. Does anybody knows a technique that helps to avoid this undesirable effect?
Comment: Welcome to the community. By "burnt" you mean overly exposed allover? Is it possible that you use spot metering and meter for a very dark area/subject in your scene? Can you post a picture to demonstrate the problem?
Comment: I've used the d300 for years and not seen 'burnt' photos.  But I must echo ysap-- please post an example.
Comment: You mention D300 two time in your question but you tagged your question with nikon-d3000; please clarify.
Answer: To avoid blown highlights you can:

use your camera's exposure compensation to set -1 or -2 stops of exposure.
use spot metering on a lighter part of the image and use exposure-lock before re-framing.
use matrix metering (sometimes helps)
alter the positioning of subject and/or camera to make better use of available light
use supplementary lighting to reduce the depth of shadows in the subject

The range of light levels that can be recorded by a camera are much lower than those present in many real-life situations. One way to deal with this is to use High Dynamic Range (HDR) Imaging techniques. Use the exposure bracketing features of the camera to make multiple images that can be combined using HDR software that compresses the dynamic range of the scene (using tone mapping) to fit within the range expressible in a displayed or printed image.

+  =
(creative commons images by Kevin McCoy via Wikipedia)
Answer: It depends what do you means by overexposing, according to some condition it is normal the camera to overexpose, in that ponctual condition you just follow RedGrittyBrick's answer.
However it could be the camera which constantly overexpose and in that case you can tune a compensation with the setting b6: Fine Tune Optimal Exposure in the Custom Settings menu.
You can even have a setting bank like A without compensation and the setting bank B with a different value of the b6 setting.


Ports used for Lync Edge server

Question: I have Lync 2010 Standard deployed in my environment, along with an edge server. On my firewall I have NAT'd the public address(s) to the server. Right now I have all the ports opened for these addresses to work, but now I want to lock this down for security concerns. Is there a complete list of ports that Lync needs opened in order to work properly? I used the port numbers on the Lync Manual, but it was still blocking audio/video after I entered them into the FW. Any assistance from anyone who has set this up previously would be much appreciated.
Comment: Are you using TMG or another kind of reverse proxy as well?
Comment: Not using any kind of reverse proxy or TMG. I wish there was a simple list of what exact ports need to be configured. I'll do some more research to see if I'm missed this documentation from Microsoft.
Answer: I have a similar setup to you, and here's what I'm doing and everything works:
External IP1, Port 80/TCP is NAT/PAT to Standard server port 8080/TCP
External IP1, Port 443/TCP is NAT/PAT to Standard server port 4443/TCP
Since you're not using a TMG server, your firewall must do port translation so that external requests hit the correct site in IIS on your Standard (frontend) server.
External IP2, 443/TCP, 5061/TCP, 3478/UDP, TCP/UDP 50000-59999 Static NAT to Edge server, no port translation
Firewall rules permit the Edge server to talk to the standard edition frontend server.
I'd have to go back and look at my topology, but I believe I used separate URLs and IPs for each of the different services/media. Most of the Lync headaches are in the DNS misconfigurations, sometimes it won't accept CNAMES where you need A records, and vice versa.
If you're going to have a lot of clients (more than 100) than you probably should use a TMG or "insert reverse proxy here" to protect your frontend.
The image below may help you, as will the source that drew it:
http://ucken.blogspot.com/2011/07/configuring-lync-for-external-access.html
Comment: That is exactly what I was looking for. Thanks SpacemanSpiff!
Comment: No problem, went through this exact fun about 6 mnonths ago, good luck.
Comment: I did go and look, and it appears I'm using two IP addressed on my edge server on the inside, with the inbound stuff hitting the primary, and the access, webconf, and av traffic from the inside hitting the second
Answer: The Lync documentation from Microsoft is complete and accurate. If you're still experiencing an issue, chances are that you configured your firewall rules incorrectly. I'd give that another look before you conclude that the Microsoft-provided document is wrong.
Comment: Good point. Thanks for the advise. I'll review my setup and report back. Thanks!
Comment: The Lync documentation does not cover deploying without Forefront TMG all that well, it's terribly confusing.

Ports used for Lync Edge server


Why is the focus indicator light always on in single point focus mode on my D7000?

Question: I switched my settings on my Nikon D7100 to single point focus but now as soon as I turn my camera on, I have a square focus icon in my viewfinder, not just when I press on back button focus. This can't be right.
Comment: Why don't you think that can be right?
Answer: When using single point focus, you need to line up your subject and focus point selection for focusing, so the information on selected focus point location is useful even before auto focus has not yet been activated. Thus, on a D7100, the focus point is always displayed in single point mode. This is indeed different from dynamic AF area modes, where the camera doesn't know in advance which focus points it would use and therefore AF points are shown only when AF is active (user manual page 74).
Note that there is a separate "●" symbol in lower left corner of the viewfinder to indicate that focus has been achieved.
Comment: So I can recompose my shot after getting the dot symbol and be ok? I'm used to seeing the square only after back button focusing.
Comment: @AnedaSmith Yes. With thin depth of field, using focus point closest to subject final framing will generally improve focus accuracy. In [certain situations](http://photo.stackexchange.com/questions/39907/4390/in-which-situtations-are-cross-type-autofocus-points-better), closest cross-type focus point may have an advantage.


Macbook air colorful pixels on screen

Question: I see these tiny colorful pixels on my screen which (seemingly) do not go away.
The reason is probably me wiping off smudge with paper or whatever I had around the house.
Is there a way to get them off? I don't want to try "scrubbing" any harder.
Comment: Can you send a photo? A photo, not a screenshot.
Comment: I should have mentioned that it is a very subtle thing, so I don't know if it would be possible to capture even if I had a camera/camera phone.
Comment: Try. If it's visible, fine, otherwise we'll workout something else.
Answer: There are two possibilities: dirt on the screen, and actual internal dead pixels.
If it's dirt on the screen, then since it doesn't sound like you've tried this already, I suggest water. Water will not hurt your screen, as long as it does not run down into a crevice and into the electronics. Use a damp microfiber cloth if you have one; otherwise, use a damp paper towel very lightly (paper towels can be scratchy). Most crud that you can get on a screen will wipe away easily with wet wiping; you do not need to scrub hard, and you shouldn't as this could scratch the screen or damage the internals.
When I say "damp", I mean getting the cloth wet under a faucet and then firmly wringing it out until it doesn't drip. Dry water off your hands so they don't drip either.
On the other hand, a colorful single pixel defect may well be a "dead" pixel. (Dirt on the screen typically doesn't look colorful except when it's fresh liquid droplets, which act as little lenses magnifying the pixels.) Typically, there is nothing you can do about these, but I have seen occasional reports of a dead pixel being restored by gentle rubbing. I would not recommend attempting this, myself.
Answer: If the pixel is always there, i.e. "on", it is a stuck pixel.  Apple's quality control allows a number of these per square inch.
So if your Apple is new (or in the warranty period) and it has a couple of these you will not get an exchange for a new computer.
If it is out of warranty, you can try to "massage" the pixel while the computer is off and, keeping pressure on the pixel while booting up, stop the massage when completely booted up.
There are websites (mydeadpixel.com) and programs you can try that flash bright images.  These sometimes cure the problem, but only rarely.
Google Fix-a-Stuck-Pixel-on-an-LCD-Monitor and you'll find a few more things to try...
Good luck

Macbook air colorful pixels on screen


Why should I get a bond with negative interest instead of having a bank deposit account either zero interest or positive interest

Question: I don't get why central banks apply negative interest rates. They say that buy our bond and at the maturity, it will worth less than today. What is the policy outcome of such decision?
Why an investor still accepts this or is it just a mechanism to indirectly discourage bond sellings?
Comment: On why an investor may accept negative yields: institutional investors may be stuck to low or negative yiels, because regulations force them to hold assets with long maturities. In addition, if even lower rates than today are expected in the future, investing in bonds with a negative yield may be expected to be profitable, because of an expected capital gain.
Comment: In [this BBC article](http://www.bbc.com/news/business-35755100) it is suggested that investors buy "the bonds with a view to selling them later when the central bank goes into the market as part of its quantitative easing programme, which involves buying financial assets with newly created money. In other cases, banks have been more willing to buy bonds with negative returns because they are charged by the central bank if they deposit excess funds. In some cases, foreign investors think they can make money if the currency rises enough to compensate for the negative yield."
Answer: It makes little sense to me either, but here are some possible reasons for buying a bond with negative interest rates rather than depositing the same amount in a bank:

The deposit-taking bank may go bankrupt during the lifetime of the bond and your deposit would be too large to be guaranteed, with the cost of default insurance being higher than the the negative interest
The bank may start charging you for holding your deposit at some time during the lifetime of the bond, at a higher cost to you than the negative interest
You may be legally obliged to hold bonds, for example as a pension or insurance company
You run an Exchange Traded Fund or similar investment tracking a bond index and some of the bonds in the index have negative interest rates
You are a foreign investor who only cares about the combination of the current exchange rate, future exchange rate and interest rate, not any individual component of this triangle, or you believe currency appreciation will more than compensate for negative interest
You are a derivatives trader, and the market prices of derivatives lead to an arbitrage opportunity where you can only guarantee a profit by buying the bond
You believe that at some time in the future you may be able to sell the bond for more than you paid for it (i.e. an even more negative yield), perhaps to a central bank's quantitative easing programme
Answer: @Henry gives a good answer with lots of interesting reasons. However, there are lots macro-model setting where the demand for risk free assets is positive, even when the interest on savings is negative. Essentially, because risk is unpleasant and we don't have any good alternative  technology to the market for risk-less assets to move our savings through time, risk adverse entities will generally have a positive quantity of the risk-free asset regardless of the interest rate.
And, to some extent, this meshes with our intuition about how savings works. The poor medieval farmer puts away ("saves") food in the summer for winter knowing that much of it will spoil and there certainly won't be any more than he puts in ("negative interest") but because he doesn't have a bank or because agricultural prices are higher in the winter, he can't simply sell all his produce today, save the money, and buy the food later.
In fact, if you have log-utility preferences the income and substitution effects cancel (see for example Jones chapter 20) and no change in interest rates up or down changes the consumption and savings decision.
Answer: Basically, every cut in interest rates discourages saving/holding bonds, also when the interest rate goes into negative territory
It was long believed that when interest rates are zero (or negative) nobody has an incentive to hold bonds/assets, as there is no opportunity cost in holding cash (and cash is more liquid).
However, it turned out that investors are still willing to hold bonds. The main reason is that negative interest rates are still cheaper than holding and securing cash (i.e. storage costs) and (to a lesser extent) that writing checks and withdrawing money from the ATM is still preferred to managing your cash holdings on your own.
Look at this blog entry for an interesting discussion on the topic.
Comment: Do you see that behaviour of big players would be changing? I'll guess some CIO's are not very fond of negative rates and are actually considering other low-risk investments. Some companies have systematically changed their strategic allocation as rates have dropped.


How can I stop WIndows Phone 8.1 from continually downloading and installing an update?

Question: I have a Nokia Lumia 520 that I bought used. When I began using it it told me there was a new OS update to be installed. I did that. But after it runs for some amount of hours it will again tell me that there is a new version of the OS to be installed. Is there something I can do to get it to stop re-updating?
Comment: The same update should not be installed over and over. What OS version do you have in Settings > About > More Info? Also, uncheck the box in Settings > Phone Update.
Comment: @NeilTurner I have OS version 8.10.12393.890 . I think the update that was taking place when I asked this question took. It is the first one that sent me a text message after it finished - "Hi there! To find out about the new, fun stuff that's in your Windows Phone 8.1 update, go to windowsphone.com/new
Comment: It seems like your phone was behind on updates, I would recommend you check for updates a few times and install the update. They contain new features and fixes.
Comment: @NeilTurner You mean that if there have been 5 OS updates since a phone was updated, it will do each one, not just the last one? That would explain why it kept repeatedly updating. I did not write down the OS version numbers each time as I should have, to see if they were different versions. My phone has been set to do automatic updates since I got  it.
Comment: Some are cumulative, others are not. So I'd guess you only have a couple of updates to install. That should be it until Windows 10.
Answer: Uncheck 'Automatically Download Updates' option under Settings > Phone Update, if you do not wish to download updates automatically.  You can manually check for updates using 'Check for Update' and install when you wish to.


How to program Kenwood TM-742A 6-meter repeater offsets for 500kHz

Question: All the 6-meter repeaters in my area use a 500kHz offset, but the Kenwood TM-742A defaults to 1MHz offsets. Is there any way to make it easier to program the local repeaters into this radio?
Answer: To disable Repeater AutoShift turn the power off. Press and hold both the VFO and REV keys while turning power on. Do this again to turn Autoshift back on.
The manual makes mention of using the SHIFT key to override the autoshift but I am not sure how this works.
I have multiples of this radio and have never had the occasion to need to use a non-standard repeater shift on 6m. No 6m repeaters near me so cannot test. This does however work on the VHF/UHF. In my experience California seems to be the most likely place where repeater shifts are non-standard but having said that, anyone can change repeater shifts.


AC Compressor Working?

Question: I have a 2005 Subaru Legacy GT.  The AC pumps a little cold air and then blows only at room temperature.  I understand there are two sides to an AC system (high and low) and that the exchange valve and the compressor are the two points where those two side connect to each other.  I just replaced the evaporator valve ($30 part and a little bit of labor, but relatively easy to access on the fire wall in the engine bay).  I am wondering how I test if the compressor is working...it is not making any strange noises and the clutch appears to engage/disengage the pulley on command.  I'd rather not have to replace it if is functioning properly, but don't know how to tell.  Any thoughts?
Answer: You can confirm that the air-conditioning system is working by using a pressure gauge to verify that both low-side and high-side pressures are in the expected range of operation (while the A/C is running and compressor clutch is engaged).
The 2005 Legacy service manual says that a fully charged system should be 400 ± 30 g (0.88 ± 0.07 lb).
The manual also says that under the following conditions, the low-side pressure should not exceed 40 psi:

engine running at 1,500 rpm
A/C switch ON
blower speed set to "HI"
temp setting at "MAX COOL"
air inlet setting at "RECIRC"

Hope this helps.

AC Compressor Working?


How to remove critters from car?

Question: What could be a good way to remove critters from a car (cockroaches, ants, etc.)? I want to avoid using insecticides, since this will leave an unpleasant odor on the car.
Answer: I'm not certain this will work, but you could park your car in bright sun on a hot day for the whole day. It should heat up and cause the critters to either flee or die.
Answer: I believe that first of all you should have a thorough carwash. Then let it be in the sun to dry. There are some insecticides in solid form that can be placed at different locations inside car which have less odour. You can also place camphor at different locations as it also repels ants and many insects. The only thing is it is imflammable but I don't think it will mean a lot when properly placed. Moreover camphor has sweet smell and is also good for health. Camphor also acts as biopesticide.
 *Leave a few tea bags of mint tea near area where the ants seem most active.Dry crushed mint leaves or cloves also work as ant deterrents.
 *Usage of diatomaceous earth could be very effective method and you would find coackroaches dying within 48 hours.Keep this in car and also sprinkle it in appropriate locations.
 *Mix 1 litre water,one teaspoon of borax and a cup of sugar.Soak cotton balls in the solution and place them in containers containing hole in lid.Ants will carry it back and eventually kill their colony.
Comment: Actually these are safe,non-toxic household methods and I believe it can be used in cars.Yeah! Safe and Non toxic for humans.
Answer: You need to find out how they are getting in. Cars should be able to keep bugs out unless the windows/doors are open.
If those are closed and you still get bugs you need to figure out where they are getting in or they'll keep appearing. If you've got a rust problem creating holes, you can get expanding foam insulation to fill the holes and keep them out.
Answer: First, you have to remove whatever is attracting the bugs. Insects don't colonize your car because they like to annoy you; they do so because there's something inside which they like (probably that they consume). So, if your kid's been spilling Jolt on the upholstery, you'll need to clean out all that sugar (I'm guessing the critters don't go for the caffeine). And, while you're at it, clean the whole car.
Second, there are passive bug traps that may do what you need (e.g. Roach Motels). Tape a few down under the seats, and check them in a week. If there's nobody home, throw them out and declare victory; if there is, then replace them.
Third, if you still have problems, you may have to bend your "no pesticide" rule. Camphor explicitly works by smell, so you may want to avoid that. But, if you selectively spray in critical areas (e.g. edges of carpet) then you may get what you want without too much odor. And then, leave the car windows open to get the smell out.

How to remove critters from car?


How to use ICMP to verify the accessibility of a site?

Question: If I want to know for sure that a web site is really blocked by the authorities or the site itself faking it, what kind of a method can I use..? I mean that when we use tracer it just use the ICMP... But is it possible that a site is blocked even after having a successful tracing? (like blocking TCP ports)
Comment: DNS blocking would simply prevent you from resolving the IP of the server from its domain name. (Update: Seems the comment I was referencing has been removed, oh well...)
Answer: You can't use ICMP alone to discover if a service is up. It's just another protocol that the machine happens to accept and have appropriate daemons for. A ping will show you that the machine is up and accepting ICMP ECHO requests, but it can't tell you that a service is listening on a TCP port. Since some servers don't respond to ICMP requests or have firewalls that block those requests, ICMP won't always be reliable.
In order to test if a specific service is up, just attempt a TCP connection to that service.
In order to test if your route to the host is being blocked, use a VPN and attempt to access the site from a different country. You could also use a down/up test like http://downforeveryoneorjustme.com/ to test if the HTTP daemon is up and available from somewhere else.
Answer: Quickest way to see if the server for the website is up is to ping the web address, if it returns an ip address, but all the echo replies time out, that is a good indication that the server is up.  This trick works in all operating systems.
Example (from a Unix/Linux system):
user$:ping amazon.ca
PING amazon.ca (18.104.22.168): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1

Another option if you run a linux system is to use a tool called zenmap, which is built off of nmap.  It is a port scanner, so if it reports that port 80 is active then you know the web server is up.  It is not illegal to use a port scanner, just be careful as some ISPs have in their service agreement that their customers cannot use tools like port scanners.
Answer: You may like to use hping which determines whether a TCP service is up by sending TCP SYN request and waiting for SYN/ACK response. It works more reliably than ICMP ping because, as they said, the host may be blocking ICMP responses.


Before WW2, how did Japan pay for imported US oil?

Question: Related question that brings something up. Japan was importing most of its oil from the USA, until the oil embargo was imposed in summer 1941. Before this embargo, how did Japan pay for this oil? What did they trade for it? Gold or silver?
Comment: Net or gross? IE, are you asking how the*nation of Japan* settled its foreign exchange balance (gold, typically) or how *individual Japanese purchasers* contracted for oil (U.S. Dollars, like everyone else purchasing commodities in a US. market)?
Comment: @DrZ214: Was Japan as a national government really involved in importing oil?  Or was it imported by Japanese oil companies (dealing with American oil companies), who in turn sold the oil to their customers?  And used the money their customers paid them to pay the American companies?
Comment: @PieterGeerkens I'm asking how the nation of Japan did it. I don't know what contribution individual purchasers made but I can't see how it would compare to the national budget.
Comment: @jamesqf. At least someof it was handled by the Zaibatsu https://en.wikipedia.org/wiki/Zaibatsu (e.g. Mitsubishi) in partnership with American Oil companies (e.g. Associated / Tidewater Oil).
Comment: It seems that the Japanese government would reluctantly accept gold in lieu of oil as payment for all their exported silk.
Comment: @PieterGeerkens Do you have a source? Why would it be reluctantly? Unless it was after the embargo, I would think gold can pay for anything.
Comment: It's a joke - pointing out some basic facts about the operation of national *current accounts* that are fundamental to understanding macro-economics.
Answer: Before 1930, Japan had a "considerable (see quote below if link is broken)" trade surplus with the US, much of this stemming from exports of silk. Japan also had a substantial trade surplus with China (from cotton textiles). In the 1930s,

Japan exported textiles and miscellaneous articles to Southeast Asia and exported less to the United States and China, with both of which Japan had had a considerable trade surplus prior to 1930. In the 1930s, Japan imported raw cotton, petroleum and so on from the US, and imported less from India, with which Japan had had a considerable trade deficit.
(From: A.J.H. Latham & Heita Kawakatsu (Eds): "Intra-Asian Trade and the World Market", Routledge: London, New York, 2006, p174.)

Japanese exports of textiles amounted to 63.6% of total exports in the period 1917 to 1926, and 56.8% between 1927 and 1936 (source: W. J. Mcpherson, 'The Economic Development of Japan')
After 1930, things changed and Japan began to run a trade deficit with the US. This was offset (at least in part) by reversing or at least reducing the trade deficit with India and South East Asia. Japan was able to expand into new markets during the depression (1931 to 1934) and by 1940 Japan was exporting more heavy manufactured goods than she was importing.1
It would appear that Japan was using this surplus to help pay for the oil (i.e. multilateral settlements). Note also that

Japanese exports grew faster than world exports, faster than other
variables and, in the cotton industry, the export output ratio rose
from 1.5 per cent in 1890 to nearly 56 per cent in the 1930s.

source: W.J.Mcpherson
It should be pointed out that the Japanese government allocated quotas to companies for oil imports (at least from 1934) and thus (as far as I can see) did not import oil itself. The 1934 Petroleum Industry Law favoured local refining operations (and Japanese companies, but American companies such as Standard Vacuum Oil and Tidewater Oil continued to operate), and the government purchased from them. It would thus be wrong to look at oil imports as being 'directly' paid for by the Japanese government. Nonetheless, earnings from exports of textiles and manufactured goods were key to the government's ability to purchase oil from private oil concerns in Japan. Government finances also drew on government bonds issued through the bank of Japan, and the Japanese government ran a deficit throughout the 1930s.

1 Janet Hunter and S. Sugiyama, 'Anglo-Japanese Economic Relations in Historical Perspective, 1600–2000: Trade and Industry, Finance, Technology and the Industrial Challenge'. In Janet Hunter and S. Sugiyama (eds.), 'The History of Anglo-Japanese Relations, 1600-2000: Volume IV: Economic and Business Relations' (2002)

Other sources
Mark Mason, American Multinationals and Japan: The Political Economy of Japanese Capital Controls 1899-1980
The Japanese Economy during the Interwar Period (Bank of Japan review)
Kerry A. Chase, States, Firms and Regions in the World Economy
Comment: That "considerable" link is broken for me - fair use would allow a small screen shot I believe, and would allow me to up-vote this answer.
Answer: Japan had significant coal resources at the time. It combined this with Korean iron to produce steel for export. This is similar to what Japan does now with Chinese resources. Japan's main value is as a trade route along the pacific between the us and Asia.
Comment: This answer would be improved if you could include sources showing that steel export was part of the trade balance between pre-ww2 Japan and the Unite States.
Comment: https://en.wikipedia.org/wiki/Mining_in_Japan


Why is eating meat from living animals wrong?

Question: Why is it wrong to eat meat from a living animal? Is it because it is cruel? Is it because it is impure? Why is it?
Comment: Not a direct answer to your question, but just because something is prohibited doesn't necessarily mean it's "wrong" in some kind of moral way that we should be expected to understand. It's forbidden to wear clothes made out of a wool/linen combination but one would be hard-pressed to find a reason why that is "wrong" besides for the fact that it's forbidden.
Comment: I assume you're looking for a reason for the prohibition, so "G-d said so" isn't an acceptable answer?
Comment: Even in a narrow-scope forum such as this, you should clarify "religiously wrong" vs.  "wrong for moral people" vs. "wrong for reasons of survival"
Answer: Rambam explains this prohibition as follows:
Guide for the Perplexed 3:48

It is prohibited to cut off a limb of a living animal and eat it,
  because such act would produce cruelty, and develop it: besides, the
  heathen kings used to do it: it was also a kind of idolatrous worship
  to cut off a certain limb of a living animal and to eat it.
  (Friedlander translation)

The Sefer Hachinuch as well links it to cruelty, going so far as to say that there is no greater cruelty in the world:
Sefer Hachinuch Mitzvah # 452

משרשי המצוה כדי שלא נלמד נפשנו במדת האכזריות שהיא מדה מגונה ביותר
  ובאמת שאין אכזריות בעולם גדול ממי שיחתוך אבר או בשר מבעל חיים בעודנו
  חי לפניו ויאכלנו

For more mystical reasons see R. David Ibn Zimra's explanation in Metzudas Dovid Mitzvah #189.
Answer: R Jack Abramowitz answers in the following way

The reason for this is similar to that for the prohibition on eating
  blood: when a limb is severed from a living animal, it still contains
  the animal's life force. This is also evident in the verse stating the
  prohibition to Noah: Flesh with its life…you shall not eat (Genesis
  9:4). To eat a limb torn from a live animal is unspeakably cruel.
  Since we are what we eat, eating such a thing only reinforces the
  trait of cruelty.

For further reference, see the Talmud in the tractate of Chullin on pages 101b-103b, the Shulchan Aruch in Yoreh Deah 62, Rambam's Sefer HaMitzvos #182 (negative).


Selecting multiple variables by Attribute from different target layers

Question: I have a model with species point data as a source layer and a number of different shapefiles as target layers. To start I run a search by location tool to determine where the source and target layers intersect, and then copy features to create a new target layer. Next I want to use the select by attribute tool to determine where in my original target layer are common attributes to my new target layer.
My question is: Is there an SQL expression that would allow the search by attribute tool to select from an individual field in the new target layer and compare it to the original layer?
Answer: Union the  layers and then select by attributes where FieldName = FieldName_1 (if they are named the same then the second input will automatically be renamed with an '_1' suffix).


Are there any tax concerns with small periodic vs larger less frequent contributions?

Question: Haven't had to worry about this much with tax my tax advantaged accounts.  But I have started up a mutual fund with Vanguard, and I was curious if there are any tax related concerns with investing a set amount every couple weeks, vs one lump sum payment a few times a year.
Comment: The only caution I'd give is if you are buying right near distribution time as you may well be paying taxes without seeing any of the gains.  For example, if a fund has its year end distribution on 12/30 and you buy on 12/29, you may get the tax bill for the distribution even though you didn't any gains in the fund over the day you held it.
Comment: You're just purchasing shares in the fund, right? Not selling? Periodic investments will affect your basis, and there are tax implications that apply to all mutual funds in non-tax-advantaged accounts (as opposed to say, ETF's).
Comment: Just purchasing. I am aware that there are some basic tax implications with any mutual funds for this type of account.  Just curious what would be the best way to contribute to it to make things easier and cheaper when filing taxes.
Comment: I'm not a tax expert, but if you're not selling *any* positions, you shouldn't have any tax consequences to worry about. I did try to address the implications you might face whenever you do choose to sell, though.
Answer: If you're just purchasing shares in the fund, the interval at which you purchase them shouldn't matter directly for tax purposes. Since you're not selling any shares in the fund, and I'm assuming you're reinvesting your dividends, this position shouldn't generate any taxable income.
However, when you do choose to sell, you'll likely have a different cost basis than if you invested the money all at once. Investing at periodic intervals is known as dollar cost averaging (DCA), and the usual assumption is that it lowers both risk and return because you accumulate your position over time and at different prices.
DCA also affects which parts of your investment qualify as long-term or short-term capital gains; if you opened your entire position at once, all of your shares would have the same term status, but if you accumulated your position over time and decide to close all or part of your position within a year of any purchase, some portions of your gains may not qualify as long-term capital gains. Sales like this follow a first-in-first-out-procedure, so the shares you bought first are sold first.
This question on DCA has some good information that might help you too. Note that Vanguard published a study that recommends investing the entire lump sum at once if you have the entire amount available. If you're simply investing part of each paycheck, Vanguard recommends DCA as a "prudent way to invest."
Mutual funds do have different tax implications than ETF's because of the way shares are redeemed
Although this isn't a tax issue, make sure you're aware of any commissions or annual fees Vanguard will charge you if you choose to trade non-Vanguard funds or other securities. These vary depending on the type of account you, so look at their information to see what applies to you.
Answer: There are different types of cost basis methods: average cost, FIFO (First in, First out), and specific identification.
With specific identification at the time of selling you specify shares from which purchase you are selling.  This is the most complicated but can lead to the lowest tax bills.
If you invest every couple of weeks, you will have more transactions to keep track of and more complications if you decide to use the specific identification.
Comment: Good answer. I'd also add that for mutual funds, brokers are [*required*](https://en.wikipedia.org/wiki/Cost_basis#Mutual_Fund_Basis_Methods) to offer specific identification, FIFO, and average cost methods.


Can (must) P-trap be directly underneath the drain in stand-up shower stall?

Question: Can (must) P-trap be directly underneath the drain in stand-up shower stall? I'm roughing in a 48"X36" one piece shower stall with a center drain. In the photo I've just got it dry fit. This is the way I "think" it's supposed to go? I can't imagine moving the P-trap any closer to the vent, as I'd have to use another 90. Or, asking another way, can I do it this way? Total distance is 24" to the vent, so I'm good there. A shower with other than a center drain is not an option, this is a stand up shower only, not a tub.  The way I envision this is I'll have about 4-6 inches coming out the trap (the "e" in pipe is level with top of crete), then the drain base glued on that. Yes I can easily slope to the vent, picture doesn't show it well. BTW the wye on the vent is already glued in (long time ago), and yes I plan on completing the vent with two couplings, vent is already plumbed to the main vent stack (not pictured) above, and yes, I plan on closing this back up with crete, then the shower stall on top of that. The clean-out in the photo is from the old laundry drain and is no longer connected to anything.
Comment: This should be fine. Remember not to slope *too much* from trap; slope from trap outlet to vent fitting inlet should be ≤ the trap arm diameter. Check local code.
Comment: Far easier to clean and service if under the drain
Answer: Looks good. You want the p trap where you have it, not back by the vent.


Hume on matter of fact

Question: Hume says that ideas comes from impression and matters of fact can't have impression. So is it according to Hume that we do not have any impression of things in the daily life such as table, chair? Then why does he give the example of blue color where most of the ideas of its shades come from impression?
Comment: Not clear; see [Hume's Account of the Mind](https://plato.stanford.edu/entries/hume/#AccMin) for the distincion between *impressions* and *ideas* and [Hume on Causation](https://plato.stanford.edu/entries/hume/#Cau) for the distinction between *relations of ideas* and *matters of fact*.
Comment: Aren't impressions elements or objects of the mind, something like what used to be called 'sense data' ? If so, we don't perceive - directly experience - tables and chairs. Our knowledge of them as 'matters of fact' is the product of habitual or customary associations : the association of ideas derived from impressions. That's my view, entirely prone to error, of what Hume believes.
Comment: That sounds strange. Send the citation. Maybe it was about a qualified form of impressions, such as emotional impressions, rather than sense impressions.
Comment: Impressions are "in" the mind through our five senses. Matters of fact are the facts "out there": propositions concerning matters of fact depends on the way the world is.
Comment: @Geoffrey Thomas: that tallies with what little I've read of Hume.
Answer: Hume's view is that ideas derive from impressions, meaning roughly and to take an example that I cannot have the idea of blue unless I have had sensory experience (impression) of the colour. The idea is causally dependent on the impression. He doesn't keep strictly to this view in his example of the missing shade of blue. Hume concedes that if we were to have sensory experience of every shade of blue except one, we could imagine - form an idea - of what the missing shade of blue would be like. ('Treatise of Human Nature', 1739-40, I.1.1.)
After receiving an impression of blue I can retain the experience in memory; I thus acquire an idea of the colour, blue. There are no innate ideas; all ideas derive from impressions. This is a part of Hume's empiricism.
'Matters of fact' are broadly limited to beliefs about the existence of perceptible objects - chairs, tables, statues, trees and such like. Such beliefs have two features. The first is that we cannot establish them by reason, by logic, but only by perception. The other is that 'the contrary of every matter of fact is still possible; because it can never imply a contradiction' ('Enquiry Concerning Human Understanding, 1748, IV.1) The Statue of Liberty exists but it is logically possible for it not to do so. By contrast a triangle cannot exist without its having three sides and three internal angles; a triangle without three sides and three internal angles is in Hume's language a contradiction.
Hume never offers an explanation of how external objects, if there are any, cause our impressions to occur, nor does he try to show that there actually are any external objects to cause our impressions. In this sense we can't - or don't - have an impression of the external world but only (at best) an impression caused by an object in the external world.
It seems to me that you identify 'matter of fact' with 'external world'. I don't think this is quite right. A matter of fact is a perceptual belief based on our experience of impressions. But you are right (to repeat) that we do not have impressions of anything in the external world. Perhaps there is an external world and perhaps objects in it cause our impressions but of the external world itself we have no impressions.
Hume is an extremely elusive writer. There appears to be extreme clarity but on many points it is desperately hard to pin down his exact meaning. However, the above is my considered view about the relation of impressions to matters of fact. I believe it to be correct but as so often with Hume one must be tentative.
Comment: @wolf-revo-cats. You have an answer to your question on Hume,

Hume on matter of fact


Arduino Master-Slave Pins

Question: Can I change the pins on the communication for a Master-Slave arduino Wire transmission? I want to communicate between 2 arduinos, but on one of them A4&A5 are taken
Answer: You cannot. Wire uses hardware I2C, and on the Uno only A4 and A5 are connected to the TWI peripheral on the MCU. You will need to either switch to a bit-bang I2C implementation or change the protocol you're using.
Answer: To complete Ignacio's answer, there's indeed no other hardware I2C on AVR Arduinos.
The only options you have to use other pins is:

to use bitbang i2c, which is way slower ;
or you can switch to the Arduino Due which features two TWI ports ;
or you can use an SPI to I2C serial bridge such has that one.

Arduino Master-Slave Pins


How can I check for damage to my lens from impact with a window?

Question: I was taking a photo at an airport when I accidentally zoomed my Canon SX40HS into a window. The impact wasn't super hard, but there was a thump. I cannot see any visible damage, but how can I check for damage to the picture quality (distortion, bluriness, etc)?
Comment: +1 Good and useful question for a lot of photographers who tend to bump their equipment once in a while.
Comment: This is nothing! I recently dropped my camera with the EF 24mm f/1.4L II USM (A great big hunk of glass) out of a bus onto solid concrete!!!  There is a slight dent on the bottom of the front of the lens where the hood fits on but otherwise somehow it is unscathed! AF drive, glass, everything! Don't ask me how.... ?!  Images taken still look good :)
Answer: Well, I've damaged a manual zoom lens before, and you can actually feel damage as you adjust.  With motor driven, I guess sound and performance are your best measurements.
Also, I'd bet that if there is the slightest damage it will show up best (worst?) at "infinite" focus.
But to truly know you would have to had taken a series of perfectly aligned test shots of a known test pattern when the camera came out of the box.  Not to say that you might not be able to spot trouble on a series of test shots, but lining up a test surface perfectly parallel with the focal plane and directly on the centreline of the lens is tough.  (meaning send it off to Canon, if you really want to know)
If you have a scene you've shot often enough to know well, you may be able to spot a problem shooting it again.
Answer: Your best bet is to simply take photos of something and look at the image.  There isn't any particularly fancy way to check.  If the zoom still works and pictures taken at both ends of the zoom come out sharp and don't have distortions in the image, then you are probably ok.  You could probably try taking a picture of a sheet of graph paper or some other grid to get an idea if there are any alignment issues with lens elements.
Comment: Another question-answer for [testing a new lens](http://photo.stackexchange.com/questions/12215/how-can-i-test-a-new-lens-to-make-sure-it-is-operating-correctly) should apply for testing a possible damage as well.
Answer: The most likely 'damage' you will have to your lens is a de-centering of the elements that make up your lens. This will result in a region of your photos that is less sharp than other regions.
On a camera with a fixed lens, this is probably less of a problem than an SLR type camera with interchangeable lenses, but testing for de-centering can be approximated by taking a photo of a wall with repeating patterns (such as a brick wall) straight on. Such a straight-on shot should have everything evenly in focus. Open up the pictures on your computer and zoom in all the way to examine how different portions of the image stack up.
Keep in mind that there is going to be some normal variation across an image. Also, if you need to look that closely to find problems when you know what you're looking for, it's not really a problem.
Answer: If you cannot see any visible damage, I would suggest to just take some pictures, trying both maximum and minimum zoom lengths, and then check the results. If you want to test for distortion, you could try taking some pictures of buildings, or similar structures, that have straight lines. The pictures themselves should show you if any damage is causing blurriness.


Create firebird database in specific directory

Question: I want to be able to create a firebird database in a specific directory. I know that the firebird user needs to have r/w/x permissions to the directory where I want to create the db. I created a group called 'tracker' and I added my user and the firebird user to that group.
firebird@ubuntu:/$ groups firebird
firebird tracker

I created a main directory called 'tracker'
drwxrwx---   3 me tracker  4096 Oct 16 10:40 tracker

Inside the 'tracker' directory I created an 'fdb' directory where I want the firebird DB's to be created.
drwxrwx--- 2 firebird firebird 4096 Oct 16 11:35 fdb

Now when I try to create the database using the following command:
CREATE DATABASE 'localhost:/tracker/fdb/test.fdb' page_size 8192 user 'SYSDBA' password 'foobar' DEFAULT CHARACTER SET UTF8;

I get the following error:
Statement failed, SQLSTATE = 08001
I/O error during "open O_CREAT" operation for file "/tracker/fdb/test.fdb"
-Error while trying to create file
-Permission denied

If a change the 'tracker' directory to belong to the 'firebird' group then it creates the database, which makes sense, but since the firebird user belongs to the 'tracker' group, it shouldn't have any permission problems.
What am I missing here??
I'm using firebird 2.5.
Thanks
Answer: You can try first with firebird user if you can create a file in that directory

sudo su  firebird

also you might check DatabaseAccess in firebird.conf , but by default it should be Full
Comment: I did that and yes I can create a file in that directory. I will check DatabaseAccess. Thanks for the response.


AngularJS how to bind data with SVG widget

Question: I know that this is usually not the way to use AngularJS but I was wondering if what I want to achieve is doable with AngularJS. If this is not the recommended way could you please provide hints on how to achieve this? Please consider that I am new in the web programming area.
So in my project I draw using SVG & RaphaelJS several widgets on a canvas that is placed within the "holder" div. I am trying to bind this widgets to data using AngularJS, basically each widget is linked to an object in the CustomController. How can I access the CustomController when I initialize my widgets?

Is this anyway to achieve data binding on SVG widgets using AngularJS? I am starting to think that this is not the purpose of AngularJS..in this case could you please advise me on how to do this?
UPDATE:
Guys thanks a lot for your answers! The requirement is that the widget accepts user input and I want it not to be placed in the html file (for modularity purposes). So the directive seems to be the primary choice for now. In the link method I would draw the widget using RaphaelJS and I can also draw the editable objects but this way I would not properly use the AngularJS binding mechanism, it would be just watches and event handlers...which seems messy to me. It would have been nice if some way I could've put SVG tags in the template property of the directive and do biding in the template, but that does not seem to be supported.
Do you guys have other ideas on this?
Btw is there any way to apply bindings programatically between a property and a HTML element (eg. textbox) obtained with jQuery?
Regards
Answer: You could get hold of the controller, but that would make the whole communication between SVG and your app in-side-out. Instead invert how the application is composed: Let angular drive the app and wrap the svg using a directive into a reusable component as Dan mentioned.
btw using SVG and angular is not such a rare thing. check out this pretty awesome example: http://sullerandras.github.com/SVG-Sequence-Diagram/
Answer: You should look at creating an angularjs directive that wraps these objects. When data that is bound to angular scope changes, you need to do a scope.$apply(). This is a simplistic answer, take a look at the http://docs.angularjs.org/guide/directive doc.


Incentives for support agent to provide feedback

Question: I am exploring ways support agents could be encouraged to provide feedback to the system about whether a suggested solution (e.g. user has to delete cookies from browser) solved the problem or not. Adding a mechanism to submit "yes, it works/no, it doesn't work" is quite simple. What I am not convinced about is that agents will be pushing the buttons. There are some products that introduced gamification aspects into the support systems (e.g. http://freshdesk.com/gamification-of-support-help-desk/). I wonder if anyone tried any kind of free incentive mechanisms for support agents and what worked. Things that come to mind are different badges and statuses assigned to agents based on number of submitted answers.
Comment: I suggest reading *Reality is Broken* by *Jane McGonigal*.  Not a short answer, but it is a great start.
Comment: Link to that book's site: http://realityisbroken.org/
Comment: Are your support agents volunteers or support is their responsibility?
Comment: Agents are not volunteers, they are paid agents.
Answer: Anna,
You have to ask yourself the human question. "What's in it for me?" I think gamification would rock. But the agents need some way of doing something with it. Could the solution calculate to a pay raise during a review? It could but that would take to long and submissions would soon decline. A points based systems where the users can redeem those points for event tickets, movie tickets, or save them to go into a pool for a weekend get a way kind of thing would get people involved. This would also have to be backed up with internal corp communications to show case the event, the winning and/or the vacation that was one etc. There needs to be a buzz around the solution that's chosen.


How to determine $x$ and $y$ intercepts for $y = 4(x - 2)^2(x + 2)^3$

Question: I need help to determine $x$ and $y$ intercepts for
$$
y = 4(x - 2)^2(x + 2)^3
$$
I guess my first question is, do I need to get the equation into
$$
ax^3 + bx^2 + cx + d
$$
form before starting?
Comment: Would I then just use the x - 2 and x + 2 to determine that the x-intercepts are at 2 and -2?  When I graph it, that shows that would be correct.
Comment: In general, the more "structure" an expression has, the easier it is to solve problems about it. Multiplying out tends to destroy structure.
Answer: The $x$-intercepts are defined to be the points where $y=0$.  Since what you have is factored, it is easy to see where $y=0$.  If $y=0$ then one of the factors must be $0$.  The $y$-intercept is where $x=0$.  If it exists, it is unique.  Just plug in $x=0$ and see what you get.
Comment: Would I then just use the x - 2 and x + 2 to determine that the x-intercepts are at 2 and -2?
Comment: @erimar77:  Yes.
Answer: That would be counterproductive.
The $x$-intercepts are solutions to $y=0$, and your equation is set up so that this is easy to solve.
For the $y$-intercept, just set $x=0$ and calculate $y$.
Answer: Multiplying is easy; factoring is hard.  (Believe it or not, that's why it's hard for identity thieves to steal your money in properly secured e-commerce transactions.  Unless maybe the thief is the Prince of Mongolia and you're inexperienced.)
If you had a polynomial in the form $ax^3 + bx^2 + cx +d$, you'd have to factor it to find the $x$-intercepts.  This one you've already got in factored form.
Answer: The x-intercepts can be calculated like this:
$$ y = 4(x - 2)^2(x + 2)^3 $$
$$ y = 0$$
$$ a \cdot b \cdot c = 0 \rightarrow a = 0 \vee b=0 \vee c=0 $$
$$ 4 = 0 \vee (x-2)^2 = 0 \vee (x+2)^3 = 0$$
$$ None \vee x = 2 \vee x \ -2$$
The y-intercept can be found by substituting $0$ for $x$ in $4(x - 2)^2(x + 2)^3$.
Answer: The zeroes of the equation $y = 4(x-2)^2(x+2)^3$ are clearly defined as $x = +2, -2$ which everyone stated. Another idea which I think is interesting is the equations behaviour around these roots. The factor $(x-2)^2$ has an order of $2$ therefore near this root the equation will "bounce" or act quadratically. The factor $(x+2)^3$ has an order of 3 therefore the equation will act cubically near this point, with an inflection at the root.


no hot water or cold water after installing faucts

Question: Ok all i did was i added to the end of the hot and cold water lines about 3 feet of copper line on each hot and cold water to install a washer .I turned off the main but didnt drain the hot water heater just turned off the breaker . added the plumbing and then turned on main and turned on breaker . The washing machine works fine hot and cold water the sink near by works fine also hot and cold water . The problem is there is another bathroom near by and the sink doesnt work now no hot or cold comes out nothing . There is a toilet in that bathroom and it works fine . Why would the bathroom sink no longer get any water ( cold or hot water) .I tryed  a couple of times turning main off and on again and nothing . like i said the other sink and washing machine work fine and so does toilet in that bathroom but no water at all comes out of sink hot or cold . And i never shut off angle stops below that sink i never touched it . Any help u can offer will be great thanks for ur time
Answer: Remove screen on faucet and take apart and clean.  May even have to pull valves on faucets and clean.  During your repairs I would guess you disturbed some crud and stopped up the little water conservators in the tap.  As a old restorationist I see it all the time.
Answer: I assume by angle stops you mean shut off valves. I would back track from the sink.  Shut off the valves under the sink and remove the lines. Then slowly open the valves to see if you have water pressure. If not, you're going to have to trace the line back and  find the blockage. Obviously take the normal precautions.
Comment: ty but for both hot  and cold to get blocked ..i could see one but both ..ill try that for sure and i was going try from the outside water to attach hose and try to blow it back out that way ..slowly forsure maybe that will unblock but still have to figuyre out whyu it was blocked to begin with ..Thanks for help


Large trend-followers: why use futures rather than ETFs?

Question: There are a number of large trend-following CTAs that have been successfully running for 10+ years. Their main instrument is diversified futures. Why not ETFs (is it due to liquidity / scaling, costs, risk)?
Comment: There are some people trading ETFs in this manner, they are just not called "CTAs". Meb Faber for example. But they use less leverage than is possible with futures.
Comment: @AlexC wanted to use the "CTAs" here to refer to any large trend-follower.
Answer: Leverage: futures usually require much lower margin than their ETF counterparts. For example /ES (E-mini S&P 500 futures) requires about \$4K overnight maintenance margin per contract (may vary by brokerage) to control 50 times the S&P 500 index (currently valued at about \$108K). This is over 20:1 leverage. Furthermore you do NOT pay interest on your short positions.
Tax Benefits: in United States the futures contracts typically qualify for the so called Section 1256 Contracts and have special tax treatment. You may be able to significantly reduce your tax liability on realized short-term gains compared to ETF.
Commissions: in general commissions are lower with futures contracts.
Answer: I am going to speculate here. Scale. Say for equities the futures market is bigger than the actual spot market (presumably because you can have cash-settled rather than physically settled contracts); would appreciate if anyone could dig up some numbers. This means more capital can be employed making the strategies more scalable.
As far as leverage is concerned -- don't necessarily have to see it that way. Instead of leverage you can see it as an intermediate settlement mechanism + stop loss bundled into one. To properly manage risk conceptually you could have the full nominal allocated to the position (10% for margin and say 90% put in some short-term fixed income vehicle for the life of position).
Another aspect could be access: futures are an almost 24/7 market, ETFs -- not yet.
Finally -- ease of shorting.
Comment: Got some numbers (though more would be appreciated) for daily volume: E-mini S&P 500 -- 192 bn, SPDR S&P 500 -- 20 bn.
Comment: There are lots of reasons, if anything the question should be why you would use ETFs.  Leverage is an ancillary benefit, but the primary reason is using a contract well-specified to the task at hand.  ETFs can take many forms and it's unlikely a given ETF will perfectly coincide with a strategy you're looking to implement (this is actually a reason to use OTC forwards in lieu of futures, but that's a separate discussion).  And 'access' is also ancillary...most trading (at least on globex) takes place during standard market hours.
Answer: There are also quite a few futures markets that don't have a corresponding ETF. For example I don't see an ETF for Feeder Cattle,Slovenian Power, Shanghai Rebar, and many more.


History of notation: "!"

Question: Does anyone know where the factorial "!" symbol came from?
I can't decide if it is my favorite or least favorite notation in mathematics...
Comment: I'd bet money that was added in a much later translation of Euclid, considering that the exclamation mark didn't appear until the late Middle Ages.
Comment: If you like/dislike "!", then you'll love/hate ["!!"](https://en.wikipedia.org/wiki/Double_factorial).
Comment: This is due to euclid, you find it already in the "elements"
Answer: Earliest Uses of Various Mathematical Symbols will help you for the origin of math symbols.
Factorial is in the category "probability and statistics" and we can read:

The notation $n!$ was introduced by Christian Kramp (1760-1826) in 1808. In his Élémens d'arithmétique universelle (1808), Kramp wrote [in old French]:

Je me sers de la notation trés simple $n!$ pour désigner le produit de nombres décroissans depuis n jusqu'à l'unité, savoir $n(n - 1)(n - 2) ... 3\cdot 2\cdot 1$. L'emploi continuel de l'analyse combinatoire que je fais dans la plupart de mes démonstrations, a rendu cette notation indispensable.

My translation:

I used the very simple notation $n!$ to refer to the product of decreasing integers from n to 1, ie $n(n - 1)(n - 2) ... 3\cdot 2\cdot 1$. I had to do it since I've nominated this product a large  number of times in my demonstrations.
Comment: *I employ the very simple notation $n!$ for denoting the product of the decreasing integers from $n$ to the unity, that is, $n(n-1)(n-2)\dots 3\cdot 2\cdot 1$. The continued usage of combinatorial analysis I make in the greater part of my proofs has made this notation indispensable.*
Comment: Can someone translate? My old French is a little rusty.
Comment: It's probably not the best translation but the idea is here.
Comment: "The continued usage of combinatorial analysis ... has made this notation indispensable."  So say we all!
Comment: A translation is given in the Wikipedia article on [Christian Kramp](https://en.wikipedia.org/wiki/Christian_Kramp).
Answer: As noted in Fabien's answer, the first stop for questions about notation is Cajori's A History of Mathematical Notations.  Section 713 there contains an excerpt with Augustus de Morgan's observations on notation, including his opinion of the use of "!" for the factorial.  He, for one, was not a fan.  Here's an excerpt of the excerpt:

"Mathematical notation, like language, has grown up without much
  looking to, at the dictates of convenience and with the sanction of
  the majority.  Resemblance, real or fancied, has been the first guide,
  and analogy has succeeded....
Among the worst of barbarisms is that of introducing symbols which are
  quite new in mathematical, but perfectly understood in common
  language.  Writers have borrowed from the Germans the abbreviation
  $n!$ to signify $1\,.\,2\,.\,3\,.\,.\,.\,.\,(n-1)\,.\,n$, which gives
  their pages the appearance of expressing surprise and admiration that
  $2$, $3$, $4$, etc., should be found in mathematical results."
Answer: According to Ian Stewart, the symbol "!" was introduced because of printability.
Before 1808
$\underline{n\big|} = n \cdot (n-1) \cdots 3 \cdot 2$
was [widely?] used to denote the factorial. Because it was hard to print
[in non-computer ages], the French mathematician Christian Kramp chose "!".
Source: Professor Stewart's Hoard of Mathematical Treasures
Comment: I think that should be $\underline{\big|n}$, not $\underline{n\big|}$. There is an example [in a paper by Hilbert](https://docs.google.com/file/d/0B8yVJ91qLq9yamRWMVphQWxhZm8/edit), from 1894 (second page, half-way down, "$D_{\alpha\beta} = \ldots$"). And it is indeed badly typeset, but then our own computer-age efforts are hardly exemplary.
Comment: In the above-mentioned source it's called $\underline{n\big|}$.
Comment: Perhaps Stewart got it wrong. See for instance [this MathWorld page](http://mathworld.wolfram.com/Factorial.html).
Comment: My Maths teacher used $\underline{n\big|} $ as a notation, because he liked it, and fairly comfortable to calculate factorial that way. But again, its just a notation :)
Comment: @TonyK [Cajori](http://www.amazon.com/History-Mathematical-Notations-Dover-Mathematics/dp/0486677664/ref=sr_1_1?ie=UTF8&qid=1408717230&sr=8-1&keywords=cajori) agrees with Hilbert that it should be $\underline{\big|n}$. He also says this notation was introduced in 1827, and became somewhat popular only after Todhunter used it in his texts around 1860.
Answer: Yesterday I gave a short answer to the question What does this symbol denote? and I cited a 1921 historical survey paper by Cajori. Since this paper is not freely available on the internet (in fact, my copy is a photocopy from a library bound volume of the journal), I decided to expand my answer by including excerpts from the paper, with links, almost all of which are freely available (at least in the U.S.), to all papers and books cited in the excerpts. However, because that question has been marked as a duplicate of the question here, and the question here seems to be more visible and a better depository for these excerpts, I'm posting the excerpts here instead.
Besides Cajori's paper, I want to call attention to Pat Ballew's 24 January 2014 blog entry Notes on the History of the Factorial, which also gives a fairly thorough historical survey.
Florian Cajori, History of symbols for $\underline{n}=$ factorial, Isis 3 #3 (Summer 1921), 414-418.

(first few sentences of the paper, on p. 414) As simple a matter as the notations for the designation of « $n$-factorial » (that is, of the product $1.\;2.\;3 \ldots n)$ involves in the history of its development questions of pedagogical and philosophical interest. Is it desirable to introduce a young student into a large amount of algebraic symbolism or should there be restrictions? May the symbolism not be so extensive as to retard rather than accelerate the progress of algebra as a science? We are led to the consideration of these questions by noting the history of factorial notations. It has been known $\left({}^1\right)$ for some years that the notation $n!$ representing the product $1.\;2 \ldots n,$ was introduced over a century ago by CHRISTIAN KRAMP [= Christian (Chrétien) Kramp (1760-1826)], professor at the University of Strasbourg, in his Éléments d'arithmétique universelle ou d'Algèbre [= Élémens d'Arithmétique Universelle; see the paragraph just before Article 188 on p. 219], Cologne, 1808 $[\cdots]$

Note: Footnote $\left({}^1\right)$ on p. 414 mentions two references, published in 1903 and in 1904, in support of the claim about Kramp. In the lower half of p. 414, Cajori mentions Legendre's use of $\Gamma(n+1)$ and Gauss's use of $\Pi(n),$ both around 1811, and some other more obscure notations used in the first half of the 1800s.

(from upper half of p. 415) Relating to the origin of the notation $\underline{\big|n}$ for « $n$-factorial », nothing has been given in histories, except the statement that it has been in use in England. We are glad to be able to throw light upon the history of this symbol, and to give some details regarding the spread of it, and of its rival $n!,$ in the United States and other countries. The notation $\underline{\big|n}$ was suggested in 1827 by THOMAS JARRETT (1805-1882) who had just graduated from St Catherine's College in Cambridge, England, with the degree of B. A. It occurs in a paper « On Algebraic Notation » that was printed in 1830 $\left({}^3\right).$

Note: Footnote $\left({}^3\right)$ on p. 415 specifies p. 67 of volume III of Transactions of the Cambridge Philosophical Society.

(from bottom of p. 415 to top of p. 416) For a quarter of a century the notation $\underline{\big|n}$ was neglected. In 1846, Rev. HARVEY GOODWIN used it freely in an article, « On the Geometrical Representation of Roots of Algebraic Equations », that was printed in 1849 $\left({}^4\right).$ [Footnote $\left({}^4\right)$ specifies p. 343 of volume 8 of Cambridge Philosophical Transactions.] In 1847 GOODWIN published his Elementary Course in Mathematics, a popular educational manual which reached several editions, but, to our surprise, he did not make use of any contracted notation for factorial $\underline{n}$ in this text. In fact, the symbol $\underline{\big|n}$ made no substantial headway in England until it was adopted by ISAAC TODHUNTER about 1860, and was used in his popular texts.
(from lower half of p. 416) In the United States $\underline{\big|n}$ was probably introduced through TODHUNTER'S texts. In the first volume (1874) of J. E. HENDRICKS' [= Joel Evans Hendricks (1818-1893)] Analyst, (Des Moines, Iowa) both the notation $\underline{\big|n}$ and $n!$ are used by different writers. The latter notation, though simpler, was used in elementary texts of this country [= United States] less frequently than the first. The notation $\underline{\big|n}$ was adopted by such prominent text book writers as JOSEPH FICKLIN (Complete Algebra, copyright 1874), CHARLES DAVIES (Revised BOURDON'S Elements of Algebra, 1877), EDWARD OLNEY (1881) and about the same time by GEORGE A. WENTWORTH, WEBSTER WELLS, E. A. BOWSER [= Edward Albert Bowser (1845-1910)] and others. Thus it became firmly rooted in this country $\left({}^4\right).$ Among the French and German authors $\underline{\big|n}$ has met with no favor whatever [means: it was rarely used]. The notation $n!$ found wide adoption in Germany $[\cdots]$
(footnote $\left({}^4\right)$ on p. 416) In a few publications JARRETT'S factorial symbol is given in the modified form $\underline{n\big|}.$ See, for example, THOMAS CRAIG'S Treatise on Linear Differential Equations, vol. 1, p. 463, New York 1889, and WEBSTER'S New International Dictionary of the English Language, Springfield 1919, under the word « factorial ».
(from top half of p. 417) G. CHRYSTAL'S Algebra [= Algebra. An Elementary Text-Book for the Higher Classes of Secondary Schools and for Colleges, Part II, footnote on p. 4], 1889, came out for [means: advocated for] $n!,$ though in the $\text{XIX}^{\text{th}}$ century it was much less frequent in England than $\underline{\big|n}.$ In the United States $n!$ was used by W. P. G. Bartlett [= William Pitt Greenwood Bartlett (1837-1865)] $\left({}^3\right)$ as early as the year 1858. It was adopted mainly by a group of men who had studied at Harvard $[\cdots]$
(footnote $\left({}^3\right)$ on p. 417) J. D. RUNKLE'S, Mathematical Monthly, Vol. I, No. 3, p. 84-87, Cambridge, Mass., 1858.
(lower half of p. 417 to end of the paper) In the present century [= early 1900s] the notation $n!$ has gained almost complete ascendancy over its rivals. It is far more convenient to the printer. Remarkable is the fact that many writings, both advanced and elementary, do not use any contracted notation for $n$-factorial; the expanded notation $1,\; 2, \; 3\ldots \; n$ ["$1.\;2.\;3 \ldots n$" probably intended] is adhered to. The facts are that a short mode of designation is not so imperative here as it is for « square root », « cube root » or « the $n^{\text{th}}$ power ». We have seen that HARVEY GOODWIN of Caius College, Cambridge, made liberal use of $\underline{\big|n}$ in a research article, but avoided it in his Elementary Course. Instinctively he shrunk from the introduction of it in elementary instruction. We have here the issue relating to the early and profuse of symbolism in mathematics: Is it desirable? In the case of $n$-factorial some writers of elementary books of recognized standing avoid it. More than this, it has been avoided by many writers in the field of advanced mathematics, such as $[\cdots]$ Of course, I am not prepared to say that these writers never used $n!$ or $\underline{\big|n};$ I claim only that usually they avoided those symbols. These considerations are a part of the general question of the desirability of the use of symbols in mathematics to the extent advocated by the school of G. PEANO in Italy and of A. N. WHITEHEAD and B. RUSSELL in England. The feeling against such a « scab of symbols » seems to be strong and wide-spread. If the adoption of only one symbol, like our $n!$ or $\underline{\big|n},$ were involved, the issue would seem trivial, but when dozens of symbols are offered, a more serious situation arises. Certain types of symbols are indispensable; others possess only questionable value. Rich meaning is conveyed instantaneously by $\frac{dy}{dx},$ $\int y \, dx,$ but $\underline{\big|n}$ and $n!$ serve no other purpose than to save a bit of space. Writers who accept in toto the program of expressing all theorems and all reasoning by a severely contracted symbolism, must frame notations for matters that can more conveniently be expressed by ordinary words or in less specialized symbolism. We know that intellectual food is sometimes more easily digested, if not taken in the most condensed form. It will be asked, to what extent can specialized notations be adopted with profit? To this question we reply, only experience can tell. It is one of the functions of the history of mathematics to record such experiences. Some light, therefore, may be expected from the study of the history of mathematics, as to what constitutes the most profitable and efficient course to pursue in the future. The history of mathematics can reduce to a minimum the amount of future experimentation. Hence algebraic notations deserve more careful historic treatment than they have hitherto received.

History of notation: "!"


Why the underlying function of a monomorphism may not be an injection

Question: In category theory, a monomorphism (also called a monic morphism or a mono) is defined to be a left-cancellative morphism. It seems that this definition generalizes the definition of injections. However, even in a concrete category, a monomorphism may not be an injection. Why could this happen? I know examples of monomorphisms which are not injections but what is the reason behind the existence of such examples? Isn't monomorphism a generalised concept of injection? Similar questions can be asked about epimorphisms and surjections.
Comment: What more are you looking for, beyond "A generalization may not always behave exactly the same as the thing it generalized, in all respects"? For what it's worth, in the quite common case of a concrete category in which the underlying set functor is representable, (i.e., in which there is a free object on one element), all monomorphisms will be injections. In some sense, the failure of monomorphisms to be injections more generally is just the failure of the underlying set functor to always be representable.
Comment: The reason behind the existence of such examples is the definition of monomorphism. Your mind is too biassed by your mathematical background.
Answer: There are several issues here.  Let $\mathcal C$ be a category.
(1) The question only makes sense when $\mathcal C$ is concrete, as otherwise "injective" has no meaning.  When $\mathcal C$ is concrete, we can choose a faithful functor $\pi : \mathcal C\to Set$, and regard a morphism $f:X\to Y$ as being injective if $\pi(f)$ is injective (i.e. a monomorphism in $Set$).
(2) However, this notion of "injective" depends on the choice of concrete structure.  Indeed, if we consider one of the simplest possible categories, which has two objects $A,B$ and one nonidentity morphism $f: A\to B$, then we can concretize this category by mapping $A,B,$ to an $n$-element set and an $m$-element set, respectively, and mapping the morphism to any function between those two sets--the faithfulness condition is essentially vacuous.  But now $f$ was a monomorphism (and an epimorphism, although not an isomorphism) and its concretization will not typically be any of these things, depending on how the concretization was chosen.
(3) This counterexample highlights what can go wrong.  First of all the notion of monomorphism depends solely on the category, and not on a choice of concretization, so it is a better "invariant" generalization of the notion of injection from $Set$.  Furthermore, it can be discussed whether or not a concrete structure exists.
Finally, the phenomenon that a monomorphism can fail to be injective relative to some concrete structure is roughly attributable to a lack of "enough" morphisms and objects in the original category, so that in $Set$ one sees the map is not a monomorphism, but in the original category there are not enough objects and morphisms to find a "preimage" of any diagram exhibiting the failure of injectivity.
Comment: Point (2) begs the question whether every concrete category can be concretized in such a way that all monomorphisms are injective?
Comment: I agree.  I have posed this as a separate question.
Comment: In regards to point (1), we do not *choose* a faithful functor to set, rather $\mathcal{C}$ is equipped with such a functor.
Answer: I would like to add some remarks (although there is already an accepted answer).
A morphism $f : X \to Y$ is a monomorphism precisely iff $f_\*(T) : \mathrm{Hom}(T,X) \to \mathrm{Hom}(T,Y)$ is injective for all $T \in C$, iff $f_\* : \mathrm{Hom}(-,X) \to \mathrm{Hom}(-,Y)$ is a monomorphism in the category of presheaves $\widehat{C}$. This leads to the following intuition: The notion of monomorphism is only well-behaved if there are enough presheaves.
If $U : C \to D$ is any functor, of course it may fail to preserve or reflect monomorphisms. However, if $U$ has a left adjoint, then it is easy to verify that $U$ preserves monomorphisms. Moreover, when $U$ is faithful, then it is easy to check that $U$ reflects monomorphisms. Thus, if $(C,U)$ is a concrete category over a category $X$ (a category $C$ equipped with a faithful functor $U : C \to X$; see Section 5 in The Joy of Cats), such that $U$ has a left adjoint, then a morphism $f$ in $C$ is a monomorphism iff $U(f)$ is monomorphism in $X$. This applies in particular to the well-behaved case that $C$ is algebraic over $X$.
Answer: Note that monomorphism is not the only way to generalise an injective map.  There are stronger notions, like a section.  A morphism $f:A\rightarrow B$ is a section if $\exists g:B\rightarrow A$ such that $f\circ g = 1_B$, where $1_B:B\rightarrow B$ is the identity morphism.  Moreover, there also are different kinds of monomorphisms (regular monomorphisms, extremal monomorphisms), most of which are generally stronger notions than a monomorphism, but weaker than a section.  The situation with epimorphisms is dual.
Comment: As a point of terminology, I would say that the morphism $f$ in the above *has* a section, in particular $g$ is one such.
Comment: Mark is right.  The usual name for morphisms like $f$, that have sections, is "retractions".
Comment: Section is too strong though; the function $\emptyset \rightarrow X$ is only a section if $X$ is the empty set, but it is *always* an injection.
Answer: Give a concrete category,  $\pi: \mathcal{C}\to Set$, if $\pi$ has a left adjoint $L$ (it making free objects) then if $m: X\to Y$ is a monomorphisms then $\pi(m)$ is a injection i.e. a monomorphim in $Set$ (just consider the one point space $p=${$\ast$}, and two two elements of $a, b\in \pi(X)$ i.e. two maps $a, b: p\to \pi(X)$ i.e. two morphisms $a', b': L(p)\to X$,    we have $\pi(m)(a)=\pi(m)(b)$  iff $m\circ a'=m\circ b'$ iff  $a'=b'$ iff $a=b$). Dually, "cofree objects functor" isnt usual, anyway epimorphisms in $Set$ is a retraction, and in category setting form simple epimorphisms to retraction there is a spectra of properties: extremal , strong epimorphisms are the principals,  the immersion $\iota: \mathbb{Z}\to \mathbb{Q}$ this is a epimorphisms in the cateogory of rings with unity but no a strong-Epimorphism. In $T_2$ topological spaces dense continuous  maps are the epimorphisms, the extreme epimorphisms are the surjective continuos maps with co-induced topology on codomain,  but no all extreme epimorphisms are retraction.


Form's title and/or logo.

Question: As you can see some applications have a logo or/and title at the top left side. Does it help to understand where is the user at this moment (what form user is working with)?  Are there any other ways to return user's attention after distraction?
Answer: I think there is value to using iconography to show users quickly where they are - up to a point. The up side is that international users can still use the form (eg, I don't know the French phrase for Shipping Method but a cardboard box with a question mark on it would let me know that's what I needed to decide). I think if you hint at a call to action in your icons (like the question mark in my previous example) then users will move along appropriately and not admire your pretty icons for too long.
Answer: The top left corner is where surfers expect to find the company logo.  And with time, it has also become common usage to expect to be able to click on that logo to go to the home page.
I wouldn't use that area to give an indication on the particular form.  Instead, I suggest that you have the form name or description beneath the logo, or, if you don't have a navigation bar, to the right of it.

Form's title and/or logo.


Cheap and efficient 3D sensor?

Question: I'm searching for a cheap (under 100$) and efficient 3D sensor, which detects obstacles and moving objects, for robot applications like quadrotor navigation, swarm robotics, etc. Can you suggest a sensor that can be either a commercial product or a "do it yourself" project?
Answer: Honestly it depends what you want, I will cover some options from cheapest to most expensive

Ultrasonic sensor on a servo 5-50$ depending on the model. It can be fairly accurate with around 1cm accurcy and 255 steps on a full circle, but it can have poor performance in dusty environments and can have poor results with curved items.
Ir distance sensor, 10-100$ depending on model. More accurate than ulatrosonic sensor (around .5cm accuracy). Preforms better with round objects, sensitive to dust, but can be placed in clear enclosures to protect them.
1d lidar/laser raingefinder on servo, 80-300$ some examples they work over longer ranges and collect data faster potentially allowing two axis collection to get a "3d" point cloud, but are more expensive and will require a more sophisticated controller to take advantage of them.
inexpensive 2d lidar sensor (possibly on a servo for 3d capture) example alloes for true 2d capture and can be moved up and down to allow for a 3d point cloud, more expensive and required even more procssing power probably no less than a Raspberry Pi or Intel Edison
Stereoscopic cameras, 400$+ my favorite is the ZED these provide "true" 3d and can be fairly accurate at around 10 centimeters but give you a real 3d point cloud in addition to being cameras that you can use to do object recognition and detection on, the only problem is that they require significant horsepower no less than an Nvidia k1 which could restrict some mobile applications
True LIDAR sensors, 1000$+ allowing for very robust 2d point clouds  example and are designed to be oscillated up and down to provide full 3d mapping, they can ve very expense up to 10k+ and will require an embedded computer to run
True 3d LIDAR sensors, 50,000$+ dollars are very accurate and can provide immense amounts of data but are very expensive heavy and require lots of processing power in order to use

If you provide more specifics on your application I can give a more specific answer.
Comment: I am not sure that is feasible at 1000$ a quadrocopter, possibly with a homebrew stereoscopic camera setup i.e. 2 webcams on a stick, but you will still need something to process the images on and it is quite intensive I normally use a [JETSON TK1](http://www.newegg.com/Product/Product.aspx?Item=N82E16813190005) but they are quite pricy by themselves and a little large/power hungry. Possibly you could have a base station to track the objects/quadcopters and command them to move?
Comment: My project is doing a quadrotor with 3d sensors, obstacle avoidance and recognizing moving object like tennis ball. sensor must scan a 3d scene very quickly. After this project I will try to do a quadrotor swarm. total project fund is about 5,000 usd. I have to do 5 quadrotor. so max bill of a quadrotor and sensor is 1,000usd. may be ZED ok but 500 is expensive

Cheap and efficient 3D sensor?


Correction in color model

Question: In HSL color model, I have a subjective feeling that there is interaction between saturation and lightness. That is, as the lightness becomes close to 0 or 1, we need a larger value of saturation in order to maintain the same "subjective saturation" than with lightness close to 0.5. Is there a color model that takes this into account and does correction between saturation and lightness (or alternative parameters that correspond to them)?
Answer: Of course, this is why HSV and HSL color systems are typically plotted as cones, with the point of the cone at the extreme ends of lightness having less variation in hue and saturation (or chroma as it is labeled in the below image). (Image taken from Wikipedia.)

Perceptual models based on psychological experiments don't tend to be this symmetric though. And the Munsell color system is frequently presented as an irregular blob. E.g. there is no such thing as dark yellow.

Answer: What exactly is the lightness of a color? Here are two definitions that are quite different:
Merriam-Webster: "the attribute of object colors by which the object appears to reflect or transmit more or less of the incident light"
Wikipedia: "a property of a color that is defined in a way to reflect the subjective brightness perception of a color for humans along a lightness–darkness axis"
It's very different because the first definitions relates to light, the second implies the use of a reference lightness axix. Search more and you'll find more definitions. The takeway is that it all depends on what constitutes lightness for you. So basically, it is a matter of choice: which color model do choose to use?
In this regards, the model of the Natural Colour System is quite interesting. It is a perceptual model where the places of the colors in the system have been determined not my measurement, but by human research. The interesting part is that it has a rather special definition of lightness. In fact, it is called whiteness, rather than lightness.
The top half of this color circle is a lot brighter than the bottom. Yellow is located at the top, which generally reflect more light than the purple at the bottom.

If the colors in the color circle get converted to corresponding greys, the difference in brightness becomes quite apparent. The top of the circle reflects 90% of the light while the bottom only reflects 22%.

Now whiteness comes into play. The whiteness of a color is the amount of white that a color contains. Imagine, for instance, a pot of yellow, a pot of red and a pot of white paint. If you add the same amount of white paint to the red and yellow, both colors will still have a difference in brightness. BUT they will somehow be acquainted. They will both become a bit milky and a bit brighter but will retain a certain familiarity. The same goes for black. If you add the same amount of black to several colors of the same saturation, they will somehow belong together, notwithstanding their difference in brightness.

This ís an example of the effect of classifying colors according to whiteness.  I picked the top row of colors so that they all have a similar saturation. You can see that their brightness varies wildly and will be hard to combine.
The bottom row was picked with similar saturation AND similar whiteness. Even though when measured, you will find that they do not have the same brightness (do not reflect the same amount of light). As you can see, suddenly they seem to have something in common and won't be hard to combine into one design. As said, the same goes for black. Adding black will make the colors darker, but they will still retain their familiarity. Adding both black AND white will make the colors more grey, that is: less saturated.

Correction in color model


How do I make a working example of a "Dangling Pointers" exploit? (or where do I find it online)

Question: I was recently reading about buffer overflows and dangling pointers. I read "Smashing the stack for fun and Profit " by Aleph1 and that paper was really clear and concise in explaination. On the contrary when I search for dangling pointers, I get some resources on what they are. I also found a BlackHat presentation about it and I understood it (not totally though). It gives a high level overview on how the exploit would work. Is there a "Smashing the stack" kind of explanation of dangling pointers using a C/C++ program? Or someone could please explain exploiting dangling pointers in a easy way which I test using some code of my own?
Comment: How to exploit them, or how to create them?
Comment: Actually both. I want to write my own code to create it. And then exploit it.
Comment: In c++ its easy, create a class, reference it with a pointer, then dispose of it. Your pointer now points to where the instance of that class used to be, and is now a dangling pointer.
Comment: How do I dispose off a class?
Comment: Andrew meant create an object, not a class. Just create an object, delete the object immediately, and allocate something sensitive right after. If you're lucky enough  the sensitive thing will be allocated where you just deleted or relatively close.
Answer: I just wrote a very simple example for demonstrating one possible form of dangling pointer vulnerability. You can directly run it and type "aaaaaaaaS" to reach the goal statement. Hope it would be helpful.
<code>int main(){

    char* data = (char *)malloc(32); // Assuming that the 9th char is critical...

    data[8] = 'L';

    printf("data buffer at address %x\n", data);

    /*  ...
     *  some complex program code here
     *  ...
     */
    free(data); //the data buffer could be accidentially freed.
    /*  ...
     *  some complex program code here
     *  ...
     */

    /* Here, the allocator could allocate the chunk of data buffer for the input buffer.
     * Whether this will happen depends on multiple factors (allocation algorithm,
     * the size of the buffer, etc.). For example, if you set the input buffer with
     * size 64, this might not happen because the allocator will use a new chunk
     * instead of reusing the old one.
     */
    char* input = (char *)malloc(32);

    printf("input buffer at address %x\n", input);

    /* Assuming that the attacker can control the input. Now, the attacker can
     * type aaaaaaaaS to write char 'S' to the critical space.
     */
    scanf("%s", input);

    /* The dangling pointer is used here to do a critical operation.
     * Note that this bug might be hard to find because it will
     * almost never trigger a crash.
     */
    if(data[8] == 'S'){
        printf("Pwn!\n"); // This is the goal of the attacker
    }else{
        printf("Pew!\n");
    }

    return 0;
}
</code>
Comment: `"this bug might not be hard to find because it will almost never trigger a crash"` <- You seem to be contradicting yourself here. A bug which doesn't cause a crash is usually harder to find than one which does.
Comment: Thank you for pointing out this error. I have updated the comment.
Answer: In C or C++, a dangling pointer is what you (as a programmer) get when you have a pointer to dynamically allocated memory, delete/free that memory, but keep using the pointer.
The pointer now points to unallocated memory and trying to access it will likely crash the program. However, under certain circumstances it can happen that the memory gets reallocated to something entirely different. The pointer is now suddenly valid again, but points to data it isn't supposed to point to, like data the user isn't supposed to access.


How can I make glass tunnels through lava?

Question: I have found a lava pool while tunneling and would like to put up walls for the tunnel in glass so I can see the lava flow in the tunnel (and benefit from its light). I'm having trouble navigating around the pool, however (including some Obsidian at the top, which I know how to deal with). Has anyone ever done this before? What are some good strategies on accomplishing this without (quite literally) getting burned?
Comment: by being awesome :p
Comment: Potions of fire resistance are your friend.
Answer: It's not hard, if you're careful :) Careful includes having a bucket of water in your inventory, and/or a pool of water nearby - maybe a chest for those high-value items.
Lava moves slowly, so you can replace blocks touching it with glass before it reaches you. Make sure you know what keys your glass blocks are in :) Break the block, quickly place the glass.
Also make sure you have a line-of-sight on a non-lava block to click the glass block - if I recall right, you can't attach glass to lava. :)
If you are having speed problems, you can also temporarily replace a lava block with, say, gravel - then break the outer block, put in glass, and dig up the gravel block, letting the lava flow into the glass.
Answer: I have done this many times while building a bedrock-layer minecart track to connect my various dwellings. The strategy I have used with great success is to temporarily block the lava flow with a scaffolding of nether brick fence. Being made of stone, it will not catch fire and burn up like regular wood fencing, but it will still allow you to reach through it to place your glass blocks behind it.
In addition, the spaces in and around the fencing can give you enough room to place the glass against the sides of either a fence post on the edge of the scaffolding or a previously-placed block of glass. This means you can still build your glass tunnel even if you can't reach a nearby wall, floor, or ceiling of the lava pool to place the block against. This is very handy if you hit a lava pool that is very wide and/or deep.
It should also be noted that these same techniques are useful if you hit an underground pool of water, although in that case regular flammable fence would do just fine too.
Answer: Me and a friend actually just did this as a new neato way to light the floor of a building we just made. The end result is awesome, the entire floor is glass and there's lava right below it that glows up through the building, but in the process we died like 5 times. So just be careful, have water buckets at the ready, dig the area all around the lava so you have some room, then build the glass in and fill around, be as careful as you can about not letting the lava leak out. Probably easier to co-ordinate in single player since you can't kill each other. hah.
Comment: I don't think that prevents people from damaging each other indirectly. e.g. pushing people into lava.
Comment: You can prevent players from damaging each other in multiplayer by adding the line `pvp=false` to your server's [server.properties](http://www.minecraftwiki.net/wiki/Server.properties) file.
Answer: one way would be to use pistons to push the glass into place. then you them to fill the glass tunnel with sand, dirt or gravel. then rinse and repeat. :)
Comment: There are all sorts of really useful techniques like this that involve using pistons to indirectly place blocks.


What is a non-gender specific way to specify a group of people when writing Chinese

Question: If you write 'they' (tāmen) in Chinese characters, you have to be specific about the gender: 他们 / 她们 / 它们
All of them mean 'they' but what do you use if you mean a group mixed with men and women?
Comment: "you have to be specific about the gender": this is not a question, it is an affirmation, and it is wrong, better edit the question: "is it specific?". Answer is that 他们 is not gender-specific by default, it can mean both "men and women", and "men". Same as in the French "ils" by the way.
Answer: 他们 - "they" (men / men and women )
她们 - "they" (women )
它们 - "they" (objects)
*The term "它们" is rarely used. Most of the time, people would use "这些" (these)+ object or "那些"(those)+ object when referring a group of objects.
Comment: I challenge you to pick up any novel, book or newspaper.  You will see hundreds of 他们 before you come across one 它们- If there's any at all.
Comment: "它们" is not that rarely used, when you address animals or pets (or any non-human being objects), definitely use "它们". "她" and "她们" are new concept only exist in contemporary Chinese after "May Fourth Movement" 1919, to have equal rights for women in literature.
Comment: @TangHo: Isn't that because most novels and newspapers are more concerned with people than with animals?  In China, if a story is about animals, do they "anthropomorhpize" like we do?   In English, we may use "it" for animals when the main characters are people.  But when the focus is one or more animals, we tend to make them more human-like and use "he" & "she."