Cannonballs packing

Question: A pile of cannonballs stacked like a pyramid has a rectangular base. Each layer has a length and a width in terms of cannonballs that are each one less than those of the layer that is directly below. The highest layer has a width of 1 and a length that is qual to the width of the first layer. For example, if the bottom layer has a width of 2 and a length of 3, this pile meets the criteria. What are all the piles that have a number of cannonballs that is a square number?
Comment: Is this a puzzle, or just another mathematical query?
Comment: They are all points on an elliptic curve.
Comment: Sorry, you seem to have left out the "e" in "equal".
Answer: Well, I find that the number of balls in a stack of height $n$ is

 $ {n(n+1)(5n-2)}\over{6} $

Using this formula and testing for squares, I found three before 64 bit integers overflowed.

 $$ \begin{array} {|c|c|c|} \hline \text{Height} & \text{Cannonballs} & \text{Square Size}  \\\hline  1 & 1 & 1 \\\hline  6 & 196 & 14 \\\hline  49 & 99225 & 315 \\\hline    \end{array} $$

The first two are fairly easy.  The third is conceivable.
There might be more, but they would by millions of layers thick, and would crush the cannonballs.
Edit: I rewrote in python and found no other viable piles up to a height of one billion.
Edit: combining several comments from justhalf, we get that $n$ must be of the form $a^2$, $2{a^2}$, $3{a^2}$, or $6{a^2}$ for integer $a$.  This allows the search space to be greatly reduced.  I have thus now tested all $n$ up to nine hundred trillion ($9*{10}^{14}$) without finding more squares.  If these cannonballs are one millimeter in diameter (which qualifies them as shotgun pellets), the base of the stack would be 6 AU by 12 AU, enough to partly cover the orbit of Jupiter.
Edit: I've now passed 10 quadrillion (${10}^{16}$) without another square.  66.8AU by 133.7 AU, larger than the orbit of Neptune, and covering a lot of Pluto.  I don't expect to find another square.
Comment: $n$ and $n+1$ are relatively prime, $n+1$ and $5n-2$ have only 7 as possible common denominator, and $n$ and $5n-2$ have only 2 as possible common denominator. You can start from there I guess, to prove or disprove existence of other $n$s.
Comment: @justhalf  Will that help prove or disprove entries of the form $ a^2, 2{b}^2, 3{c}^2 $ like the height 49 entry?  Actually, we can discount the common denominator of 2: There must be an odd number of factors of 2, so we can eliminate the odd multiple and leave the even as part of the square part of the other term.
Comment: Not sure, since I haven't done the proof. But seems plausible to appear as one of the cases. For example, we know that $n$, $n+1$, and $5n-2$ should be in the form of $c_0s_0^2$, $c_1s_1^2$, and $c_2s_2^2$ with $\prod c_i = 6c^2$ for some $c$. Combine this with the possible common denominator restriction.
Comment: I've noticed that this question is related to another one called the Cannonball Problem.
Comment: As @CarlLöndahl noted in his comment, this is an [elliptic curve](https://en.wikipedia.org/wiki/Elliptic_curve) ($y^2=cubic$). You could derive infinitely many rational points from the solutions you already have (e.g. $(\frac{64}{125},\frac{168}{625})$ ) but there can be only finitely many integer ones. It seems likely to me that the three you found are all of them, but that is probably quite hard to prove.
Answer: This kind of questions are quite frequently asked on the math sites.
Please refer to the book of Silverman (Arithmetic of Elliptic Curves) for the general theory.
There are computer algebra systems that can find the integral points of (many) elliptic curves over number fields.

For this example:
We write down the equation $$6m^2 = n(n + 1)(5n - 2).$$ A change of variable $y = 180 m$, $x = 30n$ gives $$y^2 = x(x + 30)(x - 12) = x^3 + 18 x^2 - 360 x.$$ This is a Weierstrass model for the curve.
Now paste the following
<code>E = EllipticCurve([0, 18, 0, -360, 0])
for P in E.integral_points():
    if P[0] % 30 == 0:
        print((P[0] / 30, P[1] / 180))
</code>
into this page and press "Evaluate".
The output:
<code>(-1, 0)
(0, 0)
(1, 1)
(6, 14)
(49, 315)
</code>
which gives us all the integral solutions $(m, n)$ to our original equation.

Cannonballs packing


Gnucash: Is there a way to flag a transaction?

Question: When I'm reconciling my accounts it would be very useful if I could flag/mark a transaction.  I'm not talking about using the R field.  Perhaps another column that would let me mark the transaction as okay or for later processing.  I haven't been able to find that feature in Gnucash -- does it exist?
Answer: I put "***" in the description of transactions that need to be reviewed as a way to mark them. They are easy to spot later, or search for to find.
Comment: That could be helpful.  I'll start using that.  Thanks, @chrisg.  :>)


Cone and lock nut adjustment on the drive side is impossible on my back wheel

Question: The right side cone is covered with a cup style spacer and the cone wrench cannot be used to fully tighten the lock nut. I think this metal cup serves as some kind of seal. How can I retighten cone and nut ?
Comment: You might want to add some more details - is this rear or front hub? Does the wheel have disc or rim brake? Maybe add a photo?
Answer: On quite a few hubs (particularly rear hubs), cone and locknut are only adjustable on one side. The other side is tightened during assembly, before inserting the axle into the hub. If your left side is adjustable, the solution is to undo the left side, take the axle completely out, tighten things on the right, then reassemble and use left side for final adjustment.
Comment: Sometimes you can get enough access on the drive side with the cassette (or more precisely its lockring) removed, but generally I've found final adjustment to be far better on the left, when it's usually possible even in the frame
Comment: Addendum: if the locknuts have completely undone themselves on both sides, make sure to leave about equal axle length outside the tightened locknuts on both sides (so you have enough axle to hold the wheel in place). It will require careful measurement (e.g., take full axle width, subtract nominal hub width, i.e., the actual width between the dropouts, divide by two - that's what you expect to leave outside the tightened locknut) and/or several trial-and-error adjustments.


Textbook Recommendation: Topological Dynamics

Question: I need to take credits satisfying a topology requirement, and can structure it myself. My field of study is dynamical systems, can someone recommend a textbook that handles differential equations/dynamical systems from a topological point of view? Or is there another recommended field of study that would fill this?
Answer: Not completely sure what you are looking for....The books are ordered w.r.t. difficulty. First one the easiest.
Classical bifurcation theory
If you want to classify dynamical systems it is important to see if the solutions curves can be `continuously' deformed into each other. In the first order ODE this can be very easily done by introducing continuous parameter dependencies in the vector field which let you deform the solution curves.
ARNOLD Geometrical Methods in the Theory of ODEs
GUCKENH. HOLMES Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields
Chaos theory
The chaos generating mechanism for an ODE/map can typically be brought down to an abstract underlying topological phenomenon. You see this for example when the tangles of the unstable and stable manifold can intersect each other in such a way that you get a mechanism which is equivalent to that in the Smale-horseshoe.
ALLIGOOD, SAUER, YORKE Chaos: an Introduction to dynamical systems
PALIS TAKENS Hyperbolicity and Sensitive Chaotic Dynamics at Homoclinic Bifurcations  (Advanced)
Index theory Index theory for dynamical systems associates an index, which is a discrete function on the dynamical system. Furthermore, the index is constructed such that it does not change when the system is `continuously' deformed. Consequently giving a classification of the dynamical system. Milnor's his topology from the differentiable point of view is quite nice to start with in this topic. His main focus is to introduce
the Poincare-Hopf theorem for vector fields.
MILNOR topology from the differentiable point of view
If you are interested in more advanced readings in the topics of connecting index theory to dynamical systems then you might look into Morse or Conley index theory. For Morse index theory there is a nice online lecture set by Georgia U on youtube and for Conley index theory you might want to start with any of the introductory papers by Mischaikow (just google his name).
Answer: You could do a study of "Thurston-Nielsen Classification theorem", which classifies diffeomorphisms of surfaces.
Answer: You could also take a look at V.I. Arnold's "Ordinary Differential Equations" and
S. Lefshetz's "Differential Equations: Geometric Theory". Also, there's a pair of iconic books; first is by J.Palis and W. de Melo called "Geometric theory of dynamical systems". Second is A. Katok and B. Hasselblatt's "Introduction to the Modern Theory of Dynamical Systems".


How do you record the first time setup of an Android device without USB Debugging enabled?

Question: I'm trying to record the initial setup of an Android phone/tablet for my company but i'm running into an issue where none of the Android to PC mirroring programs work during this part without having USB Debugging enabled. The problem is that these settings are not available because of the company settings and even then trying it on a private Android device it seems that when you Factory Reset the device the enabled USB Debugging setting is reset to its default which is off.
So my question is how do people take pictures or recordings of the initial Android setup with this conundrum in mind?
Answer: Robert's suggestion of taking a screenshot helped. I used screenshot key combination Power + Volume down button wherever I needed to take screenshots during device setup. Those screenshtos were saved to the Gallery.


Resources to improve my Hebrew to learn Halachic works?

Question: My Hebrew is solid - I am able to get around Israel. When I learn works of Halacha (Aruch HaShulchan, Mishna Berura, Kitzur) I am not able to follow due to not knowing words and acronyms. What is a good resource to be able to learn these works without an English translation? A learning dictionary that includes acronyms?
Comment: Related: https://judaism.stackexchange.com/questions/5197/learning-hebrew https://judaism.stackexchange.com/questions/30014/whats-the-most-efficient-method-for-learning-biblical-hebrew
Comment: For the Roshei Teivot themselves, this link takes you to an on-line book that is excellent for the acronyms. You can order a hardcopy from that page if you like it. https://www.hebrewbooks.org/34968
Comment: See the resources mentioned in my answer [here](https://judaism.stackexchange.com/a/138104/11501)
Answer: If you have an understanding of grammar and are able to look at a word and see what is the shoresh (the root) and what is prefixes and suffixes, I recommend using a hebrew-english dictionary. There are multiple that should be for sale in physical/online seforim/judaica stores.
Comment: Will the many Aramaic words used in halachic words be found in such dictionaries??


How to get address of connected USB modem?

Question: I just connected my N81 telephone as USB modem to Linux Mint 14. All works fine, just wondering how to find a full path to this device, something like /dev/tty*.
Comment: take a look at `lsusb -v` but I'm not sure.
Comment: @Kiwy yeah, there it is: 'Bus 003 Device 013: ID 0421:0007 Nokia Mobile Phones' But no address provided
Comment: maybe `ls -l /dev/` could allow you to identify the thing if you find the number of nod maybe 3,13 in your case but I can't assure it
Answer: Probably too late, but it might help others. Wouldn't help you to use mmcli from ModemManager?
$ mmcli -L

Found 1 modems:
    /org/freedesktop/ModemManager1/Modem/4 [Lenovo] H5321 gw

$ mmcli -m 4

/org/freedesktop/ModemManager1/Modem/4 (device id '34391e5ed3c2b2b7f11d7b36
53147e93414a8c06')
  -------------------------
  Hardware |   manufacturer: 'Lenovo'
           |          model: 'H5321 gw'
           |       revision: 'R3C11'
           |      supported: 'gsm-umts'
           |        current: 'gsm-umts'
           |   equipment id: '358993042510275'
  -------------------------
  System   |         device: '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4'
           |        drivers: 'cdc_acm, cdc_wdm, cdc_ncm'
           |         plugin: 'Ericsson MBM'
           |   primary port: 'cdc-wdm2'
           |          ports: 'cdc-wdm2 (at), wwp0s20u4i6 (net), cdc-wdm1 (at),
ttyACM1 (at), ttyACM2 (gps), ttyACM0 (at)'
  ...

Comment: The kernel folks say to remove ModemManager because it causes too many problems. I'm not sure I agree. I think the problem is in the device or the way the device is setup. Also see [How to make /dev/ttyACM0 (and friends) exclusive?](https://lists.kernelnewbies.org/pipermail/kernelnewbies/2019-March/019828.html)
Comment: Well, in https://lists.kernelnewbies.org/pipermail/kernelnewbies/2019-March/019834.html Greg KH just says, that if person handles modem with own peace of code, than it cannot use ModemManager as they're fighting over serial line with each other. That's not a general statement that ModemManager is bad and should be removed.
Answer: Solution 1: Run dmesg and watch out for ttyUSB* lines if your modem interface is a classical emulated serial interface.
Solution 2: Browse /sys/bus/usb/devices/X-1:Y:*/ until you find useful information.
Based on your line Bus 003 Device 013: ID 0421:0007 Nokia Mobile Phones, i would guess X=3 and Y= 12 (13 minus one).
Solution 3: Run udevadm monitor as you plug your USB device.
Comment: How do you translate *`Bus 003 Device 013: ID 0421:0007 Nokia Mobile Phones`* to a device like `/dev/ttyACM4`?


Hall effect vs Current Transformers as Current Sensors

Question: I am trying to clarify the difference between some current sensors, would i be correct in stating that Current Transformers induct the flux of collapsing magnetic fields caused by AC, but cannot sense DC, while hall effect sensors direct the magnetic field onto a semiconductor so they detect both AC and DC?
Comment: A CT needs a changing magnetic flux to produce a signal whereas Hall sensors don't.
Answer: Yes, Hall effect sensors sense the magnetic field caused by current, and can therefore measure absolute current.  A current transformer can only sense current down to some minimum frequency below which gain falls off rapidly.  A current transformer can't sense a fixed current.
If you are measuring current of something that is inherently AC, like the power line, then a current transformer can be appropriate.  If you really need to sense DC current, then you can't use a current transformer and a Hall effect sensor may be appropriate.  Keep in mind that a Hall sensor requires separate power to operate.
The other major way to sense current is by using a sense resistor.  The resulting voltage is not isolated, so that may need to be dealt with.  In the case of a sense resistor, it is often convenient to put some detection and processing circuitry together with the sensor.  That can the convert the result to digital and send the digital information over some isolation barrier, like a opto-coupler.
Comment: @Oliver: No, I wouldn't call a current sense resistor a voltage divider.  A voltage divider is two resistors working together, for one thing.  To see what a resistor does, look at Ohm's law.  One way to write that is Volts = Amps x Ohms, which describes a resistor as a current to voltage converter.  THat is how a resistor is used to sense current.  For example a 100 mOhm resistor will produce 100 mV per amp passing thru it.
Comment: It looks just like a voltage divider but because the sense resistor is so low in value compared to the load resistor, it has almost no effect on the current, and you can almost ignore it as far as the load current goes.
Comment: @OlinLathrop I was trying to think how he'd see a voltage divider- and if you consider the shunt in series with a load impedance or resistance (both across the mains) it does look like a voltage divider. Both a shunt resistor and a CT affect the current a teeny bit in just about any real situation.
Comment: Would you say a Sense Resistors or shunts (?) are pretty much a voltage divider, you are measuring the proportional current? Am I on the right track with that?

(While I am here, I recognise your avatar and I wanted to thank you for your help in previous questions where I was being difficult because of "aesthetic considerations" :D you are very patient with half-arsed barely educated 'electronic artists' haha! I really appreciate it, and I am slowly learning.)
Comment: @Spehro: I thought we were talking about current sense resistors, so there is no load resistor.  It seems like you are referring to the current transformer case?
Answer: There is a way to detect DC current with a transformer - It is called a flux gate or zero flux DC current transformer.  The technique was written about in 1901 in an IEEE paper, was realized in an HP 428B milliammeter from the 1950s or 1960s and used in other applications today.
Essentially, toroidal cores with equal and opposite windings are excited by a sinusoidal waveform.  This produces zero net flux in a winding common to both cores - the cores should be matched orthogonal cores.  If a DC current flows in a wire through the center of the cores, it produces a net flux as it subtracts from one of the cores flux (the other core is saturated further).  The common winding then indicates a net flux which can be bucked with a second common winding current which is proportional to the net flux/current in the sense winding.  A control loop is used to close the loop and drive the net flux to zero.  Pretty cool stuff.  I am surprised it is not used more often and suspect it is easier/cheaper to use hall effect sensors.


How do I integrate gmail?

Question: Can anyone give me step by step idea to install integrated gmail in Ubuntu 12.04 with screen-shots and steps till end. It would be very helpful for other new users as well.
Comment: Please clarify/refine your definition of "integrated gmail".  Do you mean integration into the messaging menu, launcher panel, HUD, and dash?  Or were you looking for integration into a desktop mail client, e.g. Thunderbird?
Comment: Using the Webapps is what you want right?
Comment: Please do be more specific.  For old linux geeks who have no idea what the modern notion of "webapp integration" into Unity means, check out [webapps - How do I use Ubuntu's web application integration? - Ask Ubuntu](http://askubuntu.com/questions/165662/how-do-i-use-ubuntus-web-application-integration)
Answer: You could use Geary, but it is in an early stage of development.
There are a stable ppa and a daily ppa. If you want stable software, don't use the daily ppa, it's at your own risk.
To add the stable ppa and install Geary type the following in a terminal.:
sudo apt-add-repository ppa:yorba/ppa
sudo apt-get update
sudo apt-get install geary

To add the daily ppa and install Geary type the following in a terminal.:
sudo apt-add-repository ppa:yorba/daily-builds
sudo apt-get update
sudo apt-get install geary

Comment: I will NEVER change my repositories for any reason.  If it can't be done by normal methods I do not want it on my production systems.  It would simply add more documentation workload to make sure it is another page of documentation is in the binder for each and every system's configuration, for security audits and etup of new systems...  And those pages would then require audits of the foreign repositories.  No way.  Nu-huh.   Period.  I would have a revolt on my hands if I allowed anything like this in our shop.
Answer:
Open Thunderbird program.

From menu go to Edit -> Account Settings.

In "Account Settings" dialogue select Account Action -> Add Mail Account

In the "Mail Setup Account" enter your Gmail username and password and click on Continue button.

In the next step select "IMAP" or "POP3" and click on "Create Account" button.

Then you can see your Gmail content in Thunderbird.
Comment: You left out the most important part - Add the extension "Lightning" for calendar synchronization.
Answer: That depends on that you mean by integrated... There are a number of applications you can install to manage your email, contacts, calendar, etc. But I'm not aware of anything natively built into the default Desktop environment (that includes Unity, Gnome or KDE).
Comment: Unity webapps can do that "integration" but it's not clear if that's what the OP wants
Comment: I won't waste a downvote, but this is not an answer.

How do I integrate gmail?


Mac Wireless Mouse, not apple brand

Question: Which mouse is able connect to MBP 2011, But not apple brand.
I'm looking for mouse that can connect without need to use the USB port permanently.
Comment: Every BT mouse works. Personally I use a Microsoft laptop mouse as they manufacture high quality consumer input devices.
Comment: @MaxRied Can it work without use of their bluettooth wireless?
Comment: If you buy a bluetooth mouse, they work with your MB's integrated bluetooth module.
Comment: @MaxRied Thank you mac, can you please write your answer on "Answer section" so i can approve it.
Answer: You can connect any Bluetooth mouse to your MB's integrated bluetooth module. Personally I'd recommend Microsoft mice as they are of good quality. My father recently had some problems with a el cheapo china model, but if you pick a brand, you should not have a problem.
Make sure it has this logo on it, and not some "Yeah we do our own kewl 2.5 GHz radio" (actually there is no reason to do this, except not to pay a few cents for the Bluetooth license):
Comment: There is a reason, actually: the other stuff often has better battery life because it is a one-way (i.e. no receiver in the keyboard) protocol rather than two-way. However, this also means inferior security (Bluetooth exchanges encryption keys during pairing), so I wouldn't recommend it, though this is less of an issue for mice rather than keyboards.
Comment: @KevinReid My BT mouse runs now for over one year without changing the batteries, while my elcheapo Trust mouse with proprietary receiver lasted a week on it's best times.

Mac Wireless Mouse, not apple brand


Mind Blowing vs. Mind Boggling

Question: I have seen these phrases using interchangeably, but I couldn't pinpoint exactly what do they mean.
what is the difference between the 2 and where/how to use them?
Comment: Personally, I would use mind blowing in terms of something so shocking it would hypothetically cause your mind to explode under the stress of this revelation. Whereas mind boggling is more a term for a puzzle or conundrum, these too could be mind-blowing when the answer is revealed, but mind boggling is the term for the inability to conceive the idea of what something is trying to portray. For example, paradoxes are mind boggling, whereas the solution for a paradox would be mind blowing.
Comment: I rather like _mind-boogling_. Stick with it.
Comment: @nickson104 that's a really depictive explanation! Care to turn it into an answer?
Comment: Converted to answer, unfortunately I have little to no time to expand on it
Answer: In my experience 'mind-blowing' is an Americanism, but is creeping overseas. 'Mind-boggling' is used more by the British, but they usually say 'boggles the mind!' The two phrases have almost the same meaning. 'Mind-blowing' refers to a highly stimulating event or experience, such that it overwhelms the senses. 'Mind-boggling' or '(it) boggles the mind' is usually used to refer to an overly complicated, confusing, self-contradictory policy or unfathomable attitude, situation or position (usually taken by an administrative organ of government). Bureaucracy is usually loaded with 'mind-boggling' regulations.
Answer: I would agree with both of the other answers.
The evolution of the two phrases is rather interesting. The phrase "the mind boggles" goes back to about 1915, with "mind-boggling" as an occasional adjectival form. Note that "mind-blowing" does not appear to have been used at all. The use of "mind-boggling" from 1901 to 1907 is one which I have not been able to track down.

Then we reach the sixties, and the phrase "mind-blowing". Well, first there was "blew my/his/her mind". (Note that the 1940s/1950s usage is actually an artifact of how n-gram works, and is not accurate.)

However, "mind-boggling" is the big winner, with "mind-blowing" seeming to ride along as an alternative.
Answer: Personally, I would use mind blowing in terms of something so shocking it would hypothetically cause your mind to explode under the stress of this revelation. Whereas mind boggling is more a term for a puzzle or conundrum, these too could be mind-blowing when the answer is revealed, but mind boggling is the term for the inability to conceive the idea of what something is trying to portray.
For example, paradoxes are mind boggling, whereas the solution for a paradox would be mind blowing.

Mind Blowing vs. Mind Boggling


Can't install OpenCV3 on Anaconda3 python3.6 on macOS

Question: I'm trying to install OpenCV 3.2.0 on Anaconda3 python 3.6 on macOS 10.11.6 but I can't find a way.
My Anaconda3 has python 3.5.2 installed but if I create a new virtual environment using
$ conda create -n myvenv python
then it downloads and installs python 3.6 on the new myvenv. A simple search
$ conda search opencv
opencv                       2.4.8                np17py27_2  defaults

while opencv3 yields no results
$ conda search opencv3
NoPackagesFoundError: Package missing in current osx-64 channels:
  - opencv3

Installing menpo opencv3 build gives following conflict:
$ conda install -c menpo opencv3
Fetching package metadata ...........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
  - opencv3 -> python 2.7* -> openssl 1.0.1*
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.

I tried to install using homebrew but linking it with Anaconda3 python3 seems difficult:
$ brew install eigen tbb
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/eigen-3.3.1.el_capitan.bottle.tar.gz
100.0%
==> Pouring eigen-3.3.1.el_capitan.bottle.tar.gz
  /usr/local/Cellar/eigen/3.3.1: 486 files, 6.4M
==> Downloading https://homebrew.bintray.com/bottles/tbb-4.4-20161128.el_capitan.bottle.tar.gz
100.0%
==> Pouring tbb-4.4-20161128.el_capitan.bottle.tar.gz
==> Caveats
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/<username>/.local/lib/python3.5/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/<username>/.local/lib/python3.5/site-packages/homebrew.pth
==> Summary
  /usr/local/Cellar/tbb/4.4-20161128: 119 files, 1.9M

More info
$ conda info
Current conda install:
               platform : osx-64
          conda version : 4.3.8
       conda is private : False
      conda-env version : 4.3.8
    conda-build version : 2.0.2
         python version : 3.5.2.final.0
       requests version : 2.12.4
       root environment : /Users/<username>/anaconda3  (writable)
    default environment : /Users/<username>/anaconda3/envs/lesvenv
       envs directories : /Users/<username>/anaconda3/envs
          package cache : /Users/<username>/anaconda3/pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/osx-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/osx-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/osx-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : None
           offline mode : False
             user-agent : conda/4.3.8 requests/2.12.4 CPython/3.5.2 Darwin/15.6.0 OSX/10.11.6
                UID:GID : 502:20

while coda list is:
$ conda list
packages in environment at /Users/<username>/anaconda3/envs/lesvenv:
anaconda-client           1.6.0                    py36_0
clyent                    1.2.2                    py36_0
mkl                       2017.0.1                      0
numpy                     1.11.3                   py36_0
openssl                   1.0.2j                        0
pip                       9.0.1                    py36_1
python                    3.6.0                         0
python-dateutil           2.6.0                    py36_0
pytz                      2016.10                  py36_0
pyyaml                    3.12                     py36_0
readline                  6.2                           2
requests                  2.12.4                   py36_0
setuptools                27.2.0                   py36_0
six                       1.10.0                   py36_0
sqlite                    3.13.0                        0
tk                        8.5.18                        0
wheel                     0.29.0                   py36_0
xz                        5.2.2                         1
yaml                      0.1.6                         0
zlib                      1.2.8                         3

My anaconda is:  /Users/<username>/anaconda3/bin/anaconda
My python 3.5.2 is:  /Users/<username>/anaconda3/bin/python
My conda myvenv python 3.6 is: /Users/<username>/anaconda3/envs/myvenv/bin/python
Answer: This answer is now outdated (unless for some reason you wanted to use an older version of OpenCV) - please see this answer
The above correct answer did not work for me.
Ended up lowering the version of python until this is fixed.
conda install python=3.5
conda install -c menpo opencv3

I know this is not a permanent fix, but this works for me and you get to stay within the conda environment without doing much.
The issue is currently referenced here: https://github.com/conda/conda/issues/2448
Hope this helps!
Answer: Since you are using a newer version of python3, you would probably have to build opencv from the recipe yourself, which is available at https://github.com/conda-forge/opencv-feedstock
Another option is to have the specific version of python3 in your new environment by creating it like this:
(root) osx:Downloads nwani$ conda list | grep python
python                    3.6.0                         0
(root) osx:Downloads nwani$ conda create -yn opencvtest python=3.5.2
(root) osx:Downloads nwani$ source activate opencvtest
(opencvtest) osx:Downloads nwani$ conda list | grep python
python                    3.5.2                         0

The version 3.1.0 builds of opencv are available on the conda-forge channel:
(root) osx:Downloads nwani$ conda search -c conda-forge --spec 'opencv=3*'
Fetching package metadata .........
opencv                       3.1.0               np110py27_0  conda-forge
                             3.1.0               np110py34_0  conda-forge
                             3.1.0               np110py35_0  conda-forge
                             3.1.0               np111py27_0  conda-forge
                             3.1.0               np111py34_0  conda-forge
                             3.1.0               np111py35_0  conda-forge
                             3.1.0               np110py27_1  conda-forge
                             3.1.0               np110py34_1  conda-forge
                             3.1.0               np110py35_1  conda-forge
                             3.1.0               np111py27_1  conda-forge
                             3.1.0               np111py34_1  conda-forge
                             3.1.0               np111py35_1  conda-forge

You can install it like this:
(opencvtest) osx:Downloads nwani$ conda install -y -c conda-forge opencv
(opencvtest) osx:Downloads nwani$ conda list | grep -e python -e opencv
# packages in environment at /Users/nwani/Downloads/m3/envs/opencvtest:
opencv                    3.1.0               np111py35_1    conda-forge
python                    3.5.2                         0

Comment: Thanks, I managed to install both menpo and conda-forge opencv3 in two separate environments.
Answer: I found that the accepted solution does not work on python 3.6 with anaconda.
So to install opencv manually and still have it work with conda:
$ cd ~
$ git clone https://github.com/opencv/opencv
$ git clone https://github.com/opencv/opencv_contrib
$ cd ~/opencv
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D PYTHON3_LIBRARY=/Users/yourusername/anaconda3/lib/libpython3.6m.dylib \
    -D PYTHON3_INCLUDE_DIR=/Users/yourusername/anaconda3/include/python3.6m \
    -D PYTHON_DEFAULT_EXECUTABLE=/Users/yourusername/anaconda3/bin/python3 \
    -D PYTHON_PACKAGES_PATH=/Users/yourusername/anaconda3/lib/python3.6/site-packages \
    -D INSTALL_C_EXAMPLES=OFF \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D BUILD_EXAMPLES=ON \
    -D BUILD_opencv_python3=ON \
    -D BUILD_opencv_python2=OFF \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..
$ make -j4
$ make install

At this point the install should have gone smoothly.  However if you go to terminal you will still get:
$ python
import cv2
ImportError: No module named cv2

So now rename this file
$ cd ~/opencv/lib/python3.6/site-packages
$ mv cv2.cpython-36m-darwin.so cv2.so

and copy it to this location
$ cp cv2.so /Users/yourusername/anaconda3/lib/python3.6/site-packages

and now it should work.
$ python
import cv2
cv2.__version__
'3.2.0-dev'

Comment: How do you add it to the conda package list because once they update it, one would like to keep it updated.
Comment: To clarify this is a temporary fix for those that require python 3.6. To update would be to repeat the above steps after downloading the appropriate git changes.
Answer: I installed anaconda3 on Win10, and i had the same error when i was installing opencv3 with conda:
conda install -c menpo opencv3
Searched a while i saw this question and another similar one on google groups here. Somehow i managed to install opencv3 in a python35 virtual env, which might work also on Mac OS.
conda create --name python35 python=3.5
activate python35
conda install -c menpo opencv3

Afterwards, relaunch the Anaconda3 Navigator and choose the python35 environment.
Have a test in Spyder:
import cv2
print(cv2.__version__)
3.1.0

Answer: Update: Conda has a pre-built OpenCV package for Python 3.6 now!
The direct solution would be to just do the following in the base installation
conda install -c menpo opencv3

Previously, the packages were built up to Python 3.5, so I used to solve this problem with @VivekPatani's alternative.
Currently, conda menpo's repository has a pre-built version of OpenCV for the Python 3.6 version. Hence, downgrading to 3.5 or building OpenCV from source would not be necessary.


Input 0 is incompatible with layer conv2d_2: expected ndim=4, found ndim=3 I get this error in Tensor flow, What does it mean and how can I fix it?

Question: import pickle

import keras

from keras.models import Sequential

from keras.layers import Dense, Dropout, Flatten, Activation

from keras.layers import Conv2D, MaxPooling2D

from keras.utils import to_categorical

import numpy as np

X = pickle.load(open('cancer_image_features.pickle','rb'))

y = pickle.load(open('cancer_image_lables.pickle','rb'))

X = X/255.0

y = to_categorical(y)

model = Sequential()
model.add(Conv2D(32, kernel_size=(3, 3),activation='relu',input_shape=X.shape[1:]))

model.add(Conv2D(64, (3, 3), activation='relu'))

model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Conv2D(32, kernel_size=(3, 3),activation='relu'))

model.add(Conv2D(64, (3, 3), activation='relu'))

model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Activation("softmax"))
model.add (Flatten())

model.add(Dense(3))

model.compile ( loss = 'binary_crossentropy', optimizer = 'adam' , metrics = ['accuracy'])

model.fit(X,y, batch_size = 512, epochs = 10,  validation_split= 0.3)

Answer: The error is likely to come from this line:
model.add(Conv2D(32, kernel_size=(3, 3),activation='relu',input_shape=X.shape[1:]))

Input_shape should be a 4dim vectors as stated in the keras doc:

Input shape
4D tensor with shape: (batch, channels, rows,
cols) if data_format is "channels_first" or 4D tensor with
shape: (batch, rows, cols,
channels) if data_format is "channels_last".

You may have to reshape your data, as stated here:
https://stackoverflow.com/q/43895750/8119313
Answer: X.shape here as I guess is something similar to the mnist data, (60000, 28, 28), means it doesn't have extra dimension or say 24bit-representation, i.e., some color-bytes.
As such, each x in X is having 2D shape, thus, X.shape[1:] -eq x.shape -eq (28, 28).
You have to explicitly reshape X to include the extra dimension needed for Conv2D layer.
As per the code, seems you want to use 'channel_last' configuration, for which reshaping of X_train and X_test may go like:
X = X.reshape(list(X.shape) + [1])    # (60000, 28, 28, 1)

For 'channel_first' it will be:
X = X.reshape([X.shape[0], [1]] + list(X.shape[1:]))    # (60000, 1, 28, 28)

Hope it helps the reader.


Convergence of spectra under strong convergence of operators

Question: Say $\left\{A_n\right\}$ is a sequence of bounded self-adjoint operators on a separable Hilbert space, converging in strong operator topology to a (bounded, self-adjoint) operator $A$. Denote the spectrum of $A_n$ by $\sigma_n$, and the spectrum of $A$ by $\sigma$. Under what conditions does it follow that $\sigma_n\rightarrow\sigma$ in Hausdorff metric? Any references will be appreciated.
Comment: I don't know if this helps at all: http://www2.im.uj.edu.pl/actamath/PDF/34-153-163.pdf
Comment: There is an analogous result for normal bounded operators on a Hilbert space converging in norm topology. A proof is given e.g. in Aupetit's _A primer on spectral theory_. Aupetit also lists a couple of similar results, but I don't recall whether he treats your problem, too.
Comment: I don't think there's much chance for a positive result to hold without much stronger hypotheses. For instance, choose an orthonormal basis and let $P_{n}$ be the orthogonal projection onto the span of the first $n$ basis vectors and let $I$ be the identity operator. Of course, each $P_{n}$ is a bounded  self-adjoint operator, and so is $I$. Then $P_{n} \to I$ in the strong operator topology by Bessel's inequality. However, the spectrum of each $P_{n}$ is $\{0,1\}$ and the spectrum of $I$ is $\{1\}$.
Comment: Could you elaborate a bit on what kinds of conditions you expect? The question, as it is, is a bit too open-ended for my taste.
Comment: @lvb: Thanks for your comment. Will look it up.
@Theo: I know that this isn't true in general, and I do expect some strong (but hopefully still usable) conditions. I think my problem can be reduced to the following: With the hypothesis of the original problem, suppose $x\in\sigma_n$ for all $n$. Under what conditions can we conclude that $x\in \sigma$? Here's something I dug up in that direction: http://www.jstor.org/stable/2156538. Are you aware of other results in this direction? Thank you!
Comment: Thanks for the clarifications and the link, and no, unfortunately I'm not.
Answer: FWIW: The best result that comes close to what you seek, that I know, is theorem 50.16 in

Kriegl, Michor: "The Convenient Setting of Global Analysis",

which is an extension of a theorem of Rellich that you can also find in

Kato: "Perturbation Theory of Linear Operators", chapter 7, theorem 3.9

It says: For a smooth curve of unbounded self-adjoint operators in a Hilbert space $t \to A$, with common domain of definition and compact resolvent, the eigenvalues of $A(t)$ may be arranged increasingly ordered in such a way that they become $C^1-$ functions.
If the curve is real analytic, then the eigenvalues and eigenvectors can be chosen smoothly in t.
A smooth curve of unbounded operators means that $t \to (A(t)u, v)$ is smooth for all $u, v \in H$ vectors in the Hilbert space, and $u$ in the domain of definition of $A(t)$, of course.
On the other hand, there is a theorem that approaches the problem from a different angle in

Dunford, Schwartz: "Linear Operators, Part II"

chapter X.7 "Perturbation Theory", corollary 3: For $E_n, E$ being the resolutions of the identity of the normal operators $T_n, T$ with $T_n \to T$ in the strong operator topology, we have: If $E$ vanishes on the boundary of the Borel set $\sigma$, then $E_n(\sigma) \to E(\sigma)$ in the strong operator topology.
I haven't thought if it is possible to use this result to get closer to an answer to your question, though :-)
HTH.
Comment: Hi Tim. Thank you for your answer. It isn't obvious to me how one could apply this to the general question. Perhaps the question is far too general to begin with. I think I have some partial answers in special cases, which should suffice for my means. Thanks again!
Answer: Here is another partial answer. From the book by Kato, "Perturbation theory for linear operators", this is Theorem 4.10 in Chapter 5 (p. 291); I'm paraphrasing a bit:
Let $T$ be selfadjoint and $A$ be selfadjoint and bounded operators in a Hilbert space. Then
$$
  \operatorname{dist}(\Sigma(T + A), \Sigma(T)) \le \| A \|.
$$
Here $\Sigma(T)$ denotes the spectrum of $T$.
In other words, if you replace the strong operator topology by the norm topology, so you have $\| T - T_n \| \le \epsilon$, then you know that for each element $\sigma$ of the spectrum of $T$, there is at least one element $\mu$ of the spectrum of $T_n$ such that $|\sigma - \mu| \le \epsilon$ - and vice versa.
Comment: Yes, norm convergence does imply convergence of spectra in the Hausdorff metric. It is of course strong convergence that raises the nontrivial question. By the way, there might not even be "honest" eigenvalues. Anyway, that doesn't affect the result you posted.
Comment: @William: Maybe this result is trivial to you; it's not to me. It certainly gives one possible answer to the question "which additional assumptions do I need to make this true".
Answer: Even if it might be to late for answering. The following work provides a characterization of the convergence of the spectrum with respect to the Hausdorff metric. The continuity is satisfied whenever the norms of all polynomials (up to degree 2) of the operator behave continuous. One could do much better: In particular quantitative estimates are provided. Even there it can be read as a characterization.
"Continuity of the spectrum of a field of self-adjoint operators"
by Siegfried Beckus and Jean Bellissard
http://arxiv.org/abs/1507.04641
A tool to prove this continuity is the theory about continuous fields of C*-algebras. In the paper the result can be read also as follows:
The spectrum of a field of bounded self-adjoint operators behaves continuous if and only if the related field of C*-algebras is continuous.
Comment: This is nice! Thanks!


Is Dark Matter expected to be equally distributed in our solar system?

Question: If dark matter winds up being roughly equally distributed in our solar system would this mean it has no net gravitational influence? Furthermore, do we expect dark matter to be less dense out in intergalactic space? Might this be because normal matter attracts it and gravitationally binds it?
Comment: See http://physics.stackexchange.com/q/102605/ and links in the answer, as well as http://physics.stackexchange.com/q/34312/ and links therein and http://physics.stackexchange.com/q/107764/
Comment: They aren't duplicates, but you might find them useful/helpful/general interesting.
Answer: Dark matter is pretty uniformly distributed on Solar System scales.
Yes, massive objects would attract it more. However, because it essentially does not interact with matter except through gravity, it will pass through stars and planets without stopping. Note that unless there is a collision to transfer energy, an unbound particle cannot become bound to a single mass, since it has too much energy. It will simply move on a hyperbolic trajectory, leaving the star/planet at the same speed it approached.
On the very largest scales (clusters of galaxies), dark matter and normal matter correlate positively.
Note that most of the gravitating mass in the universe is dark matter. If the Solar System had the same ratio of dark to normal matter as the universe at large, we would be dominated by it and there would be clear signs (e.g. the mass of the Earth would be nothing like the density of rock times its volume). Instead, we have a pretty typical dark matter density and an extremely high normal matter density (being on a planet close to a star is a very rare find if you randomly picked points in the universe).
See also this answer for further discussion and references.
Comment: @john But it turns out it is not so simple and depends how "uniform" you think uniform is. As usual, the devil (and also much of the physics) is in the detail.
Comment: Great! And so simple!
Comment: @RobJeffries: I'd say $\pm1.5\:\%$ still qualifies as "pretty uniform". But [the prediction of that variation](http://physics.stackexchange.com/a/194137/3540) is really cool!
Comment: Worth pointing out that although it is true that "*an unbound particle cannot become bound to a single mass*", they *can* become gravitationally bound through *mutli*-particle interactions.  Yes, this is rare, but given enough particles and enough time, it's bound to happen.
Answer: Short answer: To first order the density of dark matter in the solar system should be uniform. To second order, no, it is not. Gravitational focusing will alter the density depending where in the solar system you are.
Longer answer: The dark matter density is expected to be roughly uniform on the scale of the solar system, and to be around $10^{-22}$ kg/m$^3$. This is the mass equivalent of about 100,000 H atoms per cubic metre, but is actually around 100 times less than the density of normal matter in the interplanetary medium. Thus the gravitational influence of dark matter is also 100 times less than that of the interplanetary medium.
The reason it is expected to be relatively uniform is twofold. First, if it interacts at all with normal matter, other than gravitationally, it does so weakly. Second, we expect the dark matter to be orbiting the Galaxy, as the Sun does, with a speed of around 250 km/s, but because the dark matter is more spherically distributed than the stars, we expect this will not be co-orbiting with the Sun, but at random angles with respect to the solar motion. i.e. the relative speeds of the solar system with respect to the dark matter will be hundreds of km/s.
I think that what this means is that the gravitational perturbation of the dark matter distribution by planets, with low orbital speeds and escape velocities at their surfaces of a few to tens of km/s will be negligible. The Sun will act to gravitationally focus the dark matter, because the escape speed at the solar surface is 600 km/s. However, any dark matter attracted to the Sun will gain exactly the KE required to escape again, unless there are inelastic interactions with normal matter (some have proposed this could occur in the solar core).
There is a fascinating discussion of some of these effects by Lee et al. (2014) (which I have yet to fully digest). The effect of gravitational focusing and the modulation of the average dark matter velocity with respect to the Earth as it orbits the Sun is one of the ways in which those hoping to detect dark matter will eliminate false positives. A picture say a thousand words, so below I show conceptually what is going on (picture from Lee et al.). In March the density of dark matter near the Earth increases due to gravitational focusing by the Sun, due to the net motion of the SUn with respect to the average velocity of the dark matter with respect to the Sun. Six months later the Earth again sits in a more average dark matter density. This will produce an annual modulaton an a dark matter detection experiment.

Lee et al. give an approximate argument for the size of the effect. If it takes a time $t \sim r_s/v$ for dark matter to cross the solar potential well (where $v \sim 250$ km/s is some mean speed), then during this time it is deflected by roughly $(GM_{\odot}/r_s^{2})t^2 \sim GM_{\odot}/v^2$. The deflection as a fraction of $r_s$ is then roughly $(v_{esc}/v)^2$, where $v_{esc}$ is the escape velocity at $r_s$, which for the Sun and $r_s \sim 1$ au is about 40 km/s. The focusing effect is parameterised in terms of a cross-sectional area, which is thus squeezed by a factor $(v_{esc}/v)^2$. Now conservation of mass tells us that $\rho A v$ is invariant in the solar frame, but $v$ does not change appreciably. Therefore the density increases by a similar factor $(v_{esc}/v)^2 \sim 2.5$ per cent. Lee et al.'s more careful modelling predicts a density modulation of 1.5 per cent.
Answer: Dark matter isn't equally distributed in places: it mostly lies within areas where galaxies exist. In a sense dark and light matter likes to clump together. Plus, it gathers in around together from it's own gravitational pull.
I also think it would be rather impossible for dark matter within our solar system to be uniformly distributed, partly because dark matter doesn't defy gravity: it would most likely be pulled around objects like the sun or Jupiter more than it would be around Earth or Mars.
Yes, dark matter seems to be less plentiful out in intergalactic space where there are no large clusters of stars such as galaxies or clusters etc, and in my opinion, it might be because of the normal matter and once it starts clumping into one point of space it attracts other dark matter as well.
Answer: On a cosmic scale, dark matter is not evenly distributed throughout the universe.  It tends to attract normal matter toward it, so its distribution can be traced by observing the positions of galaxies and comparing their actual location with numerical simulations.  Here is a photo showing how galaxies are found attracted along strands of dark matter: http://apod.nasa.gov/apod/ap011219.html.
Notice that each tiny circle is an entire galaxy.  On the scale of our solar system, no such measurements have been made.  However on a galactic scale, the density of dark matter has been measured, and it has been found to be more dense toward the center of galaxy clusters, and less dense toward the diffuse outskirts.  Here is an account, which explains that the researchers used gravitational lensing of the largest objects in the universe, galactic clusters: http://scitechdaily.com/astronomers-measure-the-density-of-dark-matter-in-galaxy-clusters/
Answer:
Is Dark Matter expected to be equally distributed in our solar system?

Not by relativists. Note Einstein saying this in The Foundation of the General Theory of Relativity: "the energy of the gravitational field shall act gravitatively in the same way as any other kind of energy". Gravitational field energy aka spatial or vacuum energy is dark. And it has a mass equivalence and a gravitational effect. So it qualifies as "dark matter".

If dark matter winds up being roughly equally distributed in our solar system would this mean it has no net gravitational influence?

Yes. See this address where Einstein described a gravitational field as space that was "neither homogeneous nor isotropic". If it's homogeneous, there's no gravitational field.

Furthermore, do we expect dark matter to be less dense out in intergalactic space?

Yes we do. Because galaxies are gravitationally bound. Space expands between the galaxies but not within, and conservation of energy says the energy density has to go down.

Might this be because normal matter attracts it and gravitationally binds it?

Yes. But it's because of the expansion of the universe too. The expansion isn't uniform, and the result is inhomogeneous space. Which is what a gravitational field is.


Data set with high imbalance and extremely low frequency of the minority class

Question: I have a binary classification data set with a very high imbalance of 15126 - 8. I've tackled a few data sets with very high imbalance, but the frequency of the minority class is so low here... Can someone give me a hint for a direction?
Comment: This is probably too broad to be answerable here. What do you want to know? Can you make this more concrete than "give me a hint for a direction"?
Comment: You have only 8 examples from the minority class?
Comment: Maybe look into anomaly detection ...
Answer: Extreme class imbalance does make a classification task a lot more difficult. I have dealt with this in my own work on predicting suicide attempts and classifying rare facial expressions. There's no easy cure-all answer (yet at least) but a lot of smart people are working on the issue and have techniques that can help. Depending on the classification algorithm you're using, you might consider a cost-based approach that penalizes errors on the minority class more strongly than errors on the majority class or a resampling-based approach that artificially creates an evenly distributed dataset. See the following paper for more details/ideas:
Learning from imbalanced data sets by He and Garcia.
http://ieeexplore.ieee.org/abstract/document/5128907/?reload=true


Does answering a question with down votes attract down-votes?

Question: It is my philosophy not to take from the community with out giving anything. That is why before asking any new question I will make sure to answer one question to the best of my knowledge so that it will be useful to at least the asker. I have answered the question "Name for "jack of all trades" type role". However it is attracting down-votes. The question also had down-votes. I have reviewed my answer and didn't find any reasons behind the down votes. Does answering a question with down votes attract down-votes?
Comment: sometimes it's rather opposite, as discussed at MSO: [Is "Don't do it" a valid answer?](http://meta.stackexchange.com/a/8922/165773) _'received dozens of "Don't Do It!!!!" responses, which then got upvoted...'_
Answer: What you posted isn't an answer.
You posted a series of questions for the asker. If you don't have the ability to post an actual answer (which happens often with questions which are closed, given the criteria for close votes) post comments asking those clarifications beforehand.
Otherwise, you will pick up downvotes (and rightly so in my opinion).
Comment: Understand your point. However along with the questions, I have posted answers also. Now If I remove my questions will it be considered as answer?
Answer: While it's great that you want to give back, sometimes it's important to understand that the goal of Stack Exchange is to help not just the asker, but to also help the thousands of future visitors who will visit that Q&A piece.
Remember, there is but one asker, but there are countless future visitors who may have the same or a similar problem.
With that said, even in its edited form, the answer still doesn't appear to be supported by facts, references, or specific expertise. What's more, these things are hard to include in questions that begin with assumptions regarding the incompleteness of the question.
The goal of Stack Exchange is to provide high quality answers to questions about a real, actual problem the asker is facing. The answers should clearly and definitively answer the question as per the guidelines in How to Answer.
While it is okay to list assumptions in your answer, please understand that the assumptions you list are actually required in order to give a solid answer, and as enderland mentions, this could be cleared up by posting clarifying comments to the asker.
Lastly, I want to address something you said in your question, something that I consider very important on Stack Exchange sites:

It is my philosophy not to take from the community with out giving anything. That is why before asking any new question I will make sure to answer one question to the best of my knowledge so that it will be useful to at least the asker.

Keep in mind that the people who ask great, well-researched questions that follow the guidelines in How to Ask and the FAQ are giving back to the community. Some may even argue that questions are much more important than answers, as a single question can set the stage for 5 or more outstanding answers. Without good questions, we don't have good answers.
When a person asks a well-researched question, he or she should be putting effort into making sure it's well written, that important details are included, and that he or she has done a basic search to gain a better understanding of the problem so that the answers will actually make sense to the asker.
We can lead a horse to water, but we can't make him drink. So when an asker puts in effort to meet the answerers half-way, this is where the real learning happens, and that learning extends to many others who perhaps aren't as articulate enough to ask such well-written questions.
If you ask questions in this manner, you rock! This site wouldn't exist without you! Don't ever think you aren't giving back by asking good questions! :)
Comment: To point to the example - when a question is very vague, it's nearly impossible to answer - so the downvoted question leading to downvoted answers is in this case true.  You're asking the question maker a bunch of counter questions - which is a discussion format that doesn't fit us.  That's probably why the question is getting downvoted - it's too vague to answer.  A better way to approach questions is to put them in comments on the question.
Comment: I just love this answer!  You rock jmort253!!  I second that with the point that questions and answers are two different skill sets - I seem to be a great answer-er, but have absolutely no pride about my ability to write questions.  I like to think of it as specialization of labor, and I'm thankful for the people who can write that relevant question that we've all be asking all these years! :)
Answer:
Does answering a question with down votes attract down-votes?

Hmm... Probably not.
But I would argue that a downvoted question tends to attract more downvotes because it perpetuates a "bandwagon effect" that works in concert with a "groupthink effect".
EDIT: Of course, as @enderland points out, the reverse often happens too.

"oh someone downvoted this? I like it kinda - here's a sympathy upvote!"
Comment: The reverse often happens on answers. "oh someone downvoted this? I like it kinda - here's a sympathy upvote!"
Comment: This is a community driven site, where initially what is and isnt acceptable is pushed by the majority of the community, of course there will be the bandwagon effect! What is and isnt acceptable is driven by the bandwagon effect
Comment: @enderland: Indeed. That happens too.


What equations does ArcGIS use to calculate X,Y coordinates from latitude and longitude?

Question: I am using the  NAD 1983 2011 UTM Zone 13N system for my data in ArcGIS. I really want to know how the equations ArcGIS used to calculate the X and Y.
Comment: There is an open source library, https://proj4.org/about.html - written in C and C++ for doing coordinate transforms if you really want to know how this can be done - ArcGIS is proprietary software and so beyond trusting the documentation you can't be sure how they do it.
Comment: Related: https://gis.stackexchange.com/questions/1237/seeking-introductory-texts-about-coordinate-system-projections/1262#1262  Particularly look at Snyder's Map Projections. Esri's algorithm is close to Snyder's for normal zone/data.
Answer: I suggest you have a look at Esri's page on Geographic Transformation Methods. In it, they explain that

A geographic transformation always converts geographic
  (latitude–longitude) coordinates. Some methods convert the geographic
  coordinates to geocentric (X,Y,Z) coordinates, transform the X,Y,Z
  coordinates, and convert the new values back to geographic
  coordinates.

Equation Based Methods describes four methods for converting coordinates:

Three-parameter methods
Seven-parameter methods
Molodensky method
Abridged Molodensky method

This page on grid based methods is also likely relevant.
Also have a look at this technical article How To: Determine which NAD_1983_To_WGS_1984 transformation to use.
I'm unsure which method above was used for your specific calculations.
Comment: OP asked a UTM projection aka how does transverse Mercator work, not about converting between geographic coordinate reference systems. Sorry, but downvote.


Extend the number of rows in Excel 2003 beyond the allowable 65k

Question: I'm stuck with excel 2003 at the office, I was wondering if there is a way to extend the number of rows to at least a million or two.
Comment: Excel does support more than 65k rows of data for data sources feeding pivot tables.  The only other way would be to upgrade or split your data up into chunks of less than 65k.
Comment: Excel 2010 on my machine topped out at 1,048,576 rows.
Answer: I would suggest if you have that much data you need to consider moving to a database rather than a spreadsheet. If your version of Office came with MS Access, this is a reasonable solution for the immediate future. If your data continues to grow you'll eventually need to migrate to a different DB because Access eventually tops out as well (around 2GB of data I believe).
Comment: In that case you may want to consider a [reporting tool](http://www.postgresql.org/download/products/5) to create repeatable reports that crunch the numbers and handle formatting for you.
Comment: That data sits in a PostgreSQL db; however, sometimes I'd like to do some stats on the data, normalization plots, Pearson distributions. usually I do this in R, but sometimes, it's just a lot faster and convenient to do it in my excel templates. It's usually fine in most cases; but if i'm doing a per year analysis, I'll need mullion+rows
Comment: What in your Excel templates makes it faster and more convenient? I mean, loading that much data into a spreadsheet and then opening it up in Excel has to be a PITA. I'm not familiar with statistical analysis, but couldn't you program your formulas as stored procedures or something? Either that or use a reporting tool as Kenneth suggests. It seems more direct to just do the stats in the database than to dump all the data into a spreadsheet and use Excel to perform the calculations.
Comment: pivot tables make it faster
Answer: Quite simply: You can't get there from here.
You could try to bodge something together by splitting the data across multiple worksheets, but only you will know how well that's going to work.
If you want to go past 65K rows, you either upgrade to Excel 2007 or newer, which supports over 1 million rows (probably 1,048,576 or 2^20) or you quit using Excel.
Edit: I'd like to also reference Pablo Rodriguez's Answer which indicates that Go-OO, an OpenOffice.org variant, also supports 1 million rows.  If your macros and formulas can be translated, this might be a worthwhile possibility.  Presumably any other OOo variants based on Go-OO (e.g. NeoOffice & OxygenOffice) also benefit from this change.
Comment: What if we have excel 2016 and we need ten million rows? Is there  a simple registry key or something we could edit?
Comment: @wizlog: No, there's no kind of configuration you can change to make Excel support more rows.  Even Excel 2016 x64 is limited to 1,048,576 rows.  If you have ten million rows of data, Excel is the wrong tool for the job.  It's time for a database and/or more sophisticated analysis software like R or SPSS.
Comment: thank you for the reply. I assumed it wouldn't be so hard as data tables can have an unlimited number of rows.
Answer: Sorry, it's just not possible.  Your company might not want to pay for an MS Office upgrade, but maybe you could try Open Office?
Comment: Nope. Just tried it. OpenOffice has the same limitation.
Comment: And Google Docs spreedsheet topped out at 30100.
Comment: OpenOffice.org v3.2 on my machine tops out at 1,048,576. It's an improvement over MS Excel, but still not going to help you unfortunately. MS Excel only supports >65k as of Office 2007.
Comment: Hmm, I'm using OOo 3.2 as well but it maxed out at 65k. Are you running a 64-bit version by any chance?
Comment: Graeme, I'm not sure I understood your comment, but MSOffice 2007 does a million lines
Answer: Go-oo is an OpenOffice variant that supports 1 million rows. There is a way to hack the code and get 2 million rows, but you'll have to recompile.
As stated here some Linux distributions of OpenOffice come with the 1 million row limit instead of the lower default.
Answer: We had an issue along these lines a year or so back. I realize your post says you are stuck with MS Office, but I do believe that trying to make that work is an exercise in futility.
We ended up using a linux machine with kOffice. It handled our file just fine. I'm not entirely certain it'll handle MILLIONS, but it handled 45-50k rows fine.
Comment: office 2010 can handle up to 1,000,000 lines ... I do most of my analysis in R; however, sometimes it's just easier to do stuff in excel.
Answer: You can read a million or more rows of data (depends on the number and type of the columns) into an Excel 2003 Pivot Table (limit is a 1 Gigabyte working set), even though the Worksheet limit is 65K rows.
Answer: If you need 400,000 rows in Excel 2003 you can open a flat (.txt, .prn, ...) file that has 400,000 rows in it. Excel will allow and create the 400,000 rows. It will give you a lot of warnings about being able to handle it, but I run some heavy duty macros that place formulas in the cells and I have no problem getting it to work.


What's the difference between repulsive Delta function and Attractive Delta Function?

Question: What's the difference between repulsive Delta function and Attractive Delta Function? I need to clear the concept. Please note that I know what's the Delta function.
Comment: can you clarify where you saw the term "attractive delta function"? could it be that it is in a description of a potential between two particles and then the meaning is that the coefficient multiplying the delta function is negative?
Answer: The difference is simply whether the factor multiplying the delta function is positive or negative. A potential that is a positive delta function is an infinitely high and infinitely thin potential hill. One that is a negative delta function is an infinitely high and infinitely thin potential well.


Windows 7 right click "Send to" file context menu

Question: When I right click a file (in any folder) I see an option "Send to" and inside
Desktop
Documents
...
and a bunch of other locations.
How can I add my own location, ie "C:\stuff" to this context menu?
Answer: Open file explorer and navigate to: %APPDATA%\Microsoft\Windows\SendTo
Once in the SendTo folder, right click -> New -> Shortcut
Answer: In addition to the default shortcuts in the SendTo menu, there are hidden options that are exposed if you hold down shift while right clicking the targeted icon.
(This is Windows 7 only)
The easiest way to add your own is to type "shell:sendto" in a file explorer, ( or start -> run -> sendto ) and place whatever shortcut you deem useful. As mentioned before you can add shortcuts to programs as well as directories.
(This is more universal)
HERE is a nice article with a picture instructions.
Answer: in addition to shortcuts to folders, you can add shortcuts to apps. for example, add a shortcut to "send to notepad" to open a file in the notepad app. a useful function for a developer.


Adobe brackets: write spaces instead of tabs

Question: I am using brackets with coffeescript, but when I hit Tab, it insert a tabulation whereas i only need 2 spaces. Also, when I create a line break, the indent is tabs, and not spaces. Can I change these 2 setting ?
Answer: In the lower-right of the status bar you should see an indicator saying "Tab Size." Click the label to toggle to spaces. To change the amount of indent, click the number next to it and type a new value.
Note: if the indicator already says "Spaces" then Brackets should be using spaces instead of tab characters already. But it might not feel that way because when you move the cursor or press Backspace, there's a "soft tabs" behavior: the cursor will smartly skips over contiguous spaces to line up evenly with the next tab stop. If that bothers you, there will be a preference in the next release of Brackets (Sprint 38) to disable that behavior, making the cursor never move more than one space at a time.
Answer: For language specific control, Brackets allows you to provide different tab and space indentation values in the brackets.json file. For example:
"language": {
    "html": {
        "spaceUnits": 4
    },
    "javascript": {
        "tabSize": 2
    }
}

Comment: Wow, this is extremely useful. And you can leave a default `"spaceUnits"` outside of `"language": {...}`. Also, I'll put this link here for anyone looking to edit `brackets.json`: https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#preferences
Answer: For changing tab spacing you can edit your brackets.json file. you can find it on Debug->Open Preferences File and simple add "spaceUnits": 2 at the end of the file for 2 space. Remember to add a comma on previous line. You can edit that file for customizing your bracket.
Or you can change it more easily at the right-bottom of your bracket interface you saw a option Space: 4 click on the number and change it as your wish...


Is the Nintendo Switch backwards compatible?

Question: Is the Nintendo Switch backwards compatible with games or accessories from previous Nintendo consoles?
Comment: @StevenVascellaro Region locking is something that's no so obvious. while Nintendo has been adding Region Locking in the past this wasn't the case with at-least the GBA and the NDS up to the NDSi. from the NDSi -> WiiU they had added Region Locking and with the PS3 and PS4 Region Locking for games is supported but it's up to the developers to use it or not so it's not enfroced (PS3 games aren't region locked but Persona 4 Arena was). Backwards Comparability is obvious when (if i recall correctly) the Nintendo Switch has no Disk Drive and cartridges are a totally different shape to DS ones
Answer: No. The Nintendo Switch is not backwards compatible with any previous Nintendo consoles or controllers. Nintendo has mentioned they are considering re-releasing more Wii U titles on the Switch, such as the upcoming Mario Kart 8 Deluxe.
Comment: They recently announced support for Gamecube controllers for Super Smash Bros. Ultimate.  Presumably, this will be similar to how the WiiU did it via a dongle.
Comment: Despite no backwards compatibility, likely due to cartridge vs. disc, I thought the Switch was going to have an emulator at some point?
Comment: The Virtual Console will be returning eventually, but if the Virtual Console's precedent stands, previously purchased VC games will not carry over to the switch, and there's till no way to play previously purchased physical media, both of which are the key concepts of backwards-compatibility.
Answer: No. Although the Nintendo Switch is not backwards compatible, Nintendo has been releasing older games from the NES and SNES, with their new platform: Switch Online. Additionally, Nintendo has been releasing some older titles from the Wii and Wii U, which have been remastered to be compatible with the system.
Answer: While there are some Wii U games ported to the Switch, you have to buy and beat them again, and no hardware is compatible with both consoles, although SSB Ultimate will see the re-rerelease of the GameCube controller, along with the adapter.


A single word to describe someone who is both old and wise

Question: I am trying to find a word which describes someone who is both old and wise. I would like the word to describe someone who is extremely frail and infirm. It might also have the connotation that their counsel is odd or hard to follow, even if it is sound advice.
Comment: Too Localised. It's bad enough to ask for a word that means both *old* and *wise* (so far as I'm concerned, *wise* invariably implies *old* anyway). But to ask that this word should also imply physical frailty *and*  quirkiness seems to me to be stretching things a bit too far.
Comment: @FumbleFingers Sorry, I couldn't find any "Too Localised" close option, so instead I thought I'd answer the poor fellow best as I could.
Comment: At the risk (certainty?) of sounding conceited, the correct answer would be "me". (Sorry, I just couldn't resist).
Comment: @FumbleFingers - I don't think *wise* implies *old* at all; it's just that they are correlated. Wisdom is to intelligence as strategy is to tactics; intelligence helps you do something, but wisdom helps you know what's worth doing. Often you learn that via regret, but you could learn by listening to the wise. Also, I agree that cramming all that into one word is a stretch; the best I think you could do is allude to such a character: "He's like the Miyagi of programming."
Answer: The closest word I can think of is "sage", which seems to connote someone who is both old and wise.
In certain contexts, it might also be possible to use "patriarch" or "elder", which both imply wisdom or age, but these words add some political connotations that may or may not be desirable.
I'm not sure if there exists a word that includes quirkiness, too. If you don't mind using semi-proper names (in a somewhat more metaphorical sense), you could use "einstein", "oz", or "yoda". These can be probably be used as common nouns, but they may be too strongly tied with the original individuals the words come from.
Answer:
I am trying to find a word which describes someone who is both old and wise.

The word you are looking for is venerable, which per the OED is:

Commanding veneration or respect by reason of age combined with high personal character and dignity of appearance; having an impressive appearance in virtue of years and personal qualities.

Even if that is not quite exactly what you are looking for, then you should be able to find related terms easily enough.
Regarding the other aspect you asked about, that the advice be odd or difficult to follow, you might start with Delphic.  The OED gives one sense for this as "oracular, of the obscure and ambiguous nature of the responses of the Delphic oracle", and provides as a citation the following:

This reads rather like a Delphic response.
Comment: Venerable is certainly "compatible" with OP's requested *frail*. But for me at least it's a very bad fit with *quirky*, because it usually implies *august* and/or *dignified*.
Comment: Even if I ninja'ed him, his answer is must more complete. +1.
Comment: I agree this is the best in keeping both implications most fully.
Answer: The term doyen is often used to convey some of those characteristics.  According to Merriam Webster:

a : the senior member of a body or group b : a person considered to be knowledgeable or uniquely skilled as a result of long experience in some field of endeavor

Often this term is used with "the" to indicate the most knowledgable or skilled person in a field.  According to the Compact Oxford English Dictionary:

the most respected or prominent person in a particular field

This term probably does not convey frail, infirm or quirky.
SUPPLEMENT: Another possibility is a phrase, not a single word.  The term ancient one connotes both age and respect, maybe wisdom, especially when used as an address, and has a feeling of frailty.  I still don't think it conveys quirky, though.
Comment: Doyen as in poetry?
Comment: @Noah - Not sure about poetry. Per American Heritage (and others) derivation is from Old French doien, from Late Latin decnus, chief of ten ; see dean.
Answer: Venerable? (No quirkiness) Wizened? (No quirkiness) Sensei? (In its English usage, anyway.)
My guess is that you could swing it with two words, but you wont find one that completely covers it.
Since you're looking for a single word, I assume you're writing something and not trying to explain it in conversation. If so, I'd say make up a word that sounds right, and tell the reader that it means or has as connotations all the above things.
Answer: Wyrd may be a choice. Though it is often associated with witches.
Comment: You mean *wyrd* the obsolete spelling of the noun *weird*?  The one that has amongst its sense "One pretending or supposed to have the power to foresee and to control future events; a witch or wizard, a soothsayer." per the OED?


Qt phonon video player example C++ or python

Question: Does anyone have a working example of a video player built using Qt phonon? (in C++ )
See my related question here . I am unable to build one using Python.
Answer: A working example of a video player built using Qt phonon: Dragon Player
And here you find the Mplayer created with Phonen too, including all the sources: Phonon MPlayer. You need to login, then you can browse the source code by clicking on "Source" and then "Browse".
EDIT: Oh, and of course the Media Player Example in the Qt Assistant, you should have a look at this, too. It plays both audio and video.
Answer: I have written a Simple Video Player using QT. The soure of the player is also hardcoded for this example. See here
Answer: Most qt and kde video players these days(not vlc).
  Looking for phonon reverse dependencies on ubuntu I find

amarok(music player with videos
support)
minitube
kmplayer
bangarang
dragonplayer

non video players

okular(documents with embeded videos)
web browsers w/html5 video I think

libqtwebkit4
libkonq5
ktorrent(I think torrent film previews)
gwenview(play videos in picture viewer?)
dolphin(file preview)


if we do not use any wallpaper on desktop will it increase performance of windows?

Question: if we do not use any wallpaper on desktop will it increase performance of windows?
Answer: I've never seen wallpaper adversely affect performance on the machine itself, but when connected to the machine from a remote desktop connection it certainly can.  The bitmaps that get sent across in a terminal session are much smaller with just a solid color background.
I suppose with really low-grade video hardware or a buggy video driver you could see downgraded performance.
Rarely I've seen wallpaper be repainted slowly after a maximized window was minimized, but that's usually when there are a ton of things going on on the server that consume considerable amounts of system resources.
Comment: Also, I think using an image that is bigger than your screen resolution (so Windows will stretch it down, if that's what you select) might slow things down at points. That might only be when you load the wallpaper (login, desktop refresh, change, etc) and a bit of a RAM hit, though. My guess.
Answer: Theoretically yes. Practically no - except on the earlist (and I do mean earliest, somewhere about year 2000.) machines.
This was for static picture. Active desktop is a different story, and it can slow down things a bit.
Comment: "and I do mean earliest, somewhere about year 2000"  Yeah, remember the 90s, before computers were invented?
Comment: "and I do mean earliest, somewhere about year 2000" Wait... what?
Comment: Just to clarify, I ment cca. 2000 as "earliest" since he was inquiring about winxp, and by my memory, xp came roundabout that time (I may missed by a year or two; really, didn't bother checking). Of course, there were computers before that time and there were windows before that time. Please, do not take out of context.
Comment: I'm guessing "earliest" is talking about machines that would come with XP on them, as that came out after 2000.
Answer: When redrawing the desktop, it will make a slight impact on performance. Redrawing a detailed bitmap usually takes longer than redrawing a solid color. The difference isn't as noticeable on newer hardware, though.
Answer: If you are using some kind of remote access (via network / internet), then turning off the background will increase the transmission speed of your desktop.  From my experience, a background image effects the performance very little (unless your running a netbook with little memory or something).  It will chew through a bit of memory however, a 32bit 1920x1080 image will consume a bit over 8MB of RAM (not much of an issue of you have 8GB, but might be an issue if you have 512MB or less)
Answer: It can certainly have an impact on a machine with virtual memory, in my experience. (That's the default and how most machines run, although for newer machines with multigigabyte RAM there is a good case for disabling it.)
The problem is that Windows likes to swap 'unused' memory out to the pagefile even when there's no real need, there being memory to spare. That's normally not a problem, except for if you're working in a full-screen application window, your background image isn't being rendered; its memory becomes unused and gets swapped out to disc. Then when you finish working and unmaximise the window, it suddenly becomes needed; several meg of rendered background then has to be dragged back off the disc and copied back onto the screen. On older, slower machines like laptops this was very noticeable.
This was the case for WinXP; it may have changed in Vista/7 since, due to the increased usage of video-card-accelerated rendering.
Answer: I think not using a desktop wallpaper increases the performance of the user much more than the performance of Windows.
I've tried various wallpapers in the past and just find them distracting, if I want to look at a stormy sky or a tropical island I try to go outside and see the real thing ;)
Answer: I am interested in this topic so I test it on the virtual machine. I have archlinux with LXDE desktop on VMware, I assign 500M RAM to this system, therefore I care much about the memory useage.

when I use a 600k png file as the wallpaper, the memory use is about 139M.
when I use a solid background, the memory use is just 122M.

I tested on two fresh start separately and use the htop command at about 2min after the start.
The conclusion is that with wallpaper addtional memory will be needed, the cpu is hardly affected. If you have a very small memory, you may care about the performance.
Answer: This answer from another question explains it fairly well: Logging in to Windows 7 with one specific user account is very slow. Why?
It seems that having a solid colour desktop slows down the login time on Windows. Yes, this even affects Windows 7, so its not just a problem with older OS's.
Answer: Yes it will. It uses certain resources (I am not sure how) If you have a good hardware you don't have to worry about it but if you need 100% of your performance and you are doing tasks that are slowing down your PC then turn off your wallpaper.


Will White Sand ever be released officially as a book?

Question: Arcanum Unbounded has the prologue from the 1999 version of White Sand. I started White Sand and didn't really like the comic book form. Does Brandon Sanderson intend to ever publish a canon, full written version of White Sand, or will it only officially ever be in graphic novel form?
Answer: Possibly.

Brandon:
   It's possible that someday I will. So if you wanna be patient, maybe we'll do some Dragonsteel Edition, or something like that.

https://wob.coppermind.net/events/355/#e10687
Comment: Worth pointing out that the White Sand he is talking about here is what is often called "White Sand Prose", and as mentioned in the full quote that is taken from, has been released to members of Brandon's mailing list.  I don't know if it still gets sent out; but the text version of White Sand is already out there; just not as "official canon" as far as I know.  I'm not sure if the release he's talking about here would be canon either; or just a professionally published version of the White Sand prose.
Comment: @JMac It apparently contradicts the graphic novel; I heard the main character is female in the prose version, so it's not exactly canon
Comment: @Stormblessed - Not quite, the LEO character is male in the prose but female in the published work.


How to improve performance while generating (extruding) mesh in unity3d on iOS?

Question: I'm going to make a game similar to AudioSurf for iOS, and implement in it "generate of route to certain parameters".
I used the example of Extrude Mesh from Unity Procedural Example and this answer on question - link
But in iOS there is considerable lag in the extrusion of the object, and if the whole route extrude early in the game - it takes a lot of time, it also has a display problem of the track, consists of a large number of polygons...
Can you advise me how to display the generated route or what is the best way to generate route?
Comment: +1 More or less just because of how much I'd love to have a game like that on my phone.
Comment: Asked by OP in [Unity Answers](http://answers.unity3d.com/questions/315059/how-to-improve-performance-while-generating-extrud.html), question answered there as well.
Answer: You can tremendously increase the performance in procedural mesh generation by-
 - Instead of generating new meshes, you can edit the vertices and triangles arrays of the mesh i.e use fixed size triangle and vertex array-
create a class "RoadMesh" and add functions to it like- UpdateRoadMesh(Vector3 playerPosition)
this function will calculate and set the values  of vertices and triangles at the far end on the road depending on the current position of the player,
   While updating the array values when you reach the end on the vertices and triangles array start using the beginning indexes as the player would already have crossed those points . as no new mesh is created and the vertices are also edited once every few frames it will have tremendous performance..


What is a good way to learn about multicore programming at the kernel level in Linux?

Question: I am interested in multicore programming at the kernel level.  I expect this affects many areas and is probably different for each architecture.  What are some must read sections of the kernel?  If I wanted to compare and contrast code for an Intel I7 and an ARM Cortex-A9 MPCore where would I find the differences?
Comment: It would be hard for you if you cannot read the linux source code...
Comment: I'll cobble together a prototype answer.  It won't affect the bounty or accepting an answer, so if you care about points, there are a lot available: the bounty, answer acceptance, and upvotes from me and others.  I think I understand what I read in the source code, and perhaps that is best, stickiest way to learn what I want.  However, there are many true experts on Stack Exchange and if I had one in the next cubical or office, I would ask that person the same question.  You may be an expert too, and I certainly appreciate your earlier answer, but I am looking for more detail.
Comment: Also, I hope this question is of use to the community.  It seems like we have a multicore future, so learning more about them probably has value to many Stack Exchange Programmer participants.
Answer: There is nothing special about Multicore Programming in Linux. You have to understand the whole kernel. Instead of asking specific questions, go ahead and download the Linux Source code from kernel.org and go through the README file and the source code structure. (Your question about intel and arm process is answered in README). Start reading the source code along with a good linux kernel book.
Answer: To understand the multicore operation support provided by processors and used by operating systems, diving into the code may not be the ideal method.  It may be important to first understand what it does to get a framework on which to hang the many pieces that relate to how it does it.  Specification deals with the problem domain, code deals with the solution domain, and in most systems there is a design process that does an object oriented or functional decomposition to relate the two.
One way to approach this question is to start with the theory of operation documentation for the architecture of interest, greping for multicore or multiprocessor, two concepts that have close affinity although there are some distinctions related to implementation, particularly on the hardware side.  For the Intel architecture I found some interesting information from Volume 2, Part 2: MP Coherence and Synchronization page 2:507 of the Intel®
 Itanium®
 Architecture
Software Developer's Manual
From this material, some of the following code becomes much more intelligible.

semaphore.c must use single core and multicore appropriate methods to prevent objects that may be shared from access.  This leads to finding references to spin locks.
spinlock.c leads to some device specific usage and consequently its .h is located in files like arch/arm/include/asm/spinlock.h or arch/ia64/include/asm/spinlock.h

Certainly there is no substitute for reading the code, but there is also no substitute for reading the vendors manuals, particularly when working with one of the most complex devices on the planet.
Answer: All programming in the kernel is multi-core programming (in the sense that it has to be capable of running on multiple cores). So there's nothing specific to that which you don't already do for general kernel coding.
Areas of kernel programming relevant to multi-core systems are locking, scheduling, and memory access (NUMA if you're on that type of machine).
Here's a few good places to start:

KenrelNewbies - Kernel Hacking
Getting Started with Kernel Development
Assorted free books/docs
Comment: Let's assume I want to read code related to NUMA or CCNUMA.  Thanks for the links, I have seen some of these, and the O'Reilly Linux Driver book they look like they will be very useful.


Using microfiber to dry my car from water

Question: I bough this microfiber product to dry my car from water after i wash my car ! https://www.amazon.com/Sonax-450800-Microfiber-Drying-Cloth/dp/B004PA0G0A ... but seems the product has 2 different sides. one side with longer microfiber compared to the other side. so which side i should use to dry my car?
Thanks
Answer: Theoretically, the thicker side has more surface area to absorb fluids faster like a sponge so using that side should work like a sponge. Because it's synthetic, it may not absorb water until its soaked, preferably with  clean soapy water from washing the car. Once its soaked, rinse it in plain water to see how it absorbs then use it to soak up standing water on your car. Wipe and squeeze often. The finer side may work on windows to help wipe off and leave little droplets that should evaporate quickly without leaving streaks. Since its reusable, once done, wash it in soap and water or throw it in the washing machine with laundry to rid it of dirt, grease and oil to renew it for next time.


Slurm new user on Ubuntu 18.04

Question: I am a very new user of Ubuntu (escaped from Windows recently) and yesterday when I was turning on my PC I found new user listed in login options with a nickname "Slurm" (I am the only user with a password). I tried to Google it but there is nothing about it (only about slurm itself, but it is different). Maybe somebody can explain me about it. Can it be some kind of virus? Because it is strange, it's like new user with his own password. I deleted that account, just in case.
Answer: Slurm is a workload manager used in computation clusters. When it is installed, it creates a "Slurm" user for management of the service. Check if you have installed this package and, if so, remove it.
<code>sudo apt remove slurm*
</code>
Best regards

Slurm new user on Ubuntu 18.04


PHP Image Upload Resize, Watermark, Title & Copyright Info

Question: Ive written an image upload and resize script for my website which allows users to upload images, and then the script resizes the images in 3 different sizes and adds a watermark image (my website logo) on the top.
The problem I have is, that if a user then tries to upload one of the resized photos again, it will then add the logo watermark on top of it again.
What I want is to maybe add some information to the uploaded image (i.e. author, which I could set to my website name), so that if a user uploads an image which has already been watermarked, I can put a check in my script so that I dont add the watermark logo again.
Is this possible with PHP?
Answer: Take a look at this http://www.php.net/manual/en/function.iptcembed.php


After six months under review and after an e-mail to the editor

Question: I submitted a 3-paged paper to a journal of MAA at November.
I did not get a responce from the editor until the  fifth of May so I decided to send an e-mail to the editor to ask (in a very polite way) if my paper is still under review.
But, I still did not get an answer and now I am not sure what to do.Send another e-mail?
Maybe I am wrong ,but how long should I wait to get a responce for a note which is 3 pages long?Forever?
So, my question is:
Is it appropriate to send another e-mail to the editor or should I wait?
Answer: For what it's worth, May 5 was likely in the middle of the end-of-semester rush of projects, make-up student work, writing and giving and grading final exams, meeting with students who need at least Grade X to graduate, etc. In addition to this, your email could have gotten lost in the avalanche of student and administrative emails during this time. On the other hand, presumably an editor would have weathered this many times before . . .
I suggest looking at the calendar for the college/university the editor is affiliated with, and after the spring semester has been officially over about a week, I think it would be reasonable to send another (polite) email.
Answer: Yes, it is appropriate after some time. You don't say what the May 5th email said. May 5th was only 11 days ago, so maybe now is not the time yet, but in early June surely you're within your rights to ask what the status is.


Xamarin 6.1.5 on OS El Capitan

Question: Hi I am beginner in C# coding and I just installed Xamarin Studio Community. With the 6.1.2 version I could go in the add-ins manager and look up for new add-ins. But since I updated to the 6.1.5 I got this error message when I go to the repository:

Exception occurred: The remote server returned an error: (404) Not
  Found.
System.Net.WebException: The remote server returned an error: (404)
  Not Found.   at System.Net.HttpWebRequest.EndGetResponse
  (System.IAsyncResult asyncResult) [0x00065] in
  /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net/HttpWebRequest.cs:1025
  at System.Net.HttpWebRequest.GetResponse () [0x0000e] in
  /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net/HttpWebRequest.cs:1037
  at MonoDevelop.Core.Web.RequestHelper.GetResponse
  (System.Threading.CancellationToken token) [0x0008d] in
  /Users/builder/data/lanes/3509/7494718e/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs:194

It looks like the web page or the source doesn't exist. With the 6.1.2 it looks like it found the source to downloaded add-ins.
Any tips for what I should do?
Comment: Have you tried again since? Maybe the servers were temporarily having issues?
Comment: I tried a few times and just tried again and still the same issue.
Answer: This sounds like a bug. I would report it via:
https://bugzilla.xamarin.com/index.cgi

Xamarin 6.1.5 on OS El Capitan


How do I deal with falmer and dwemer mechs?

Question: I'm about to go venturing deep into a dwemer ruin, and I was wondering if someone has some advice for dealing with falmer & dwemer mechs.
Comment: Basically just like you deal with anything. I usually shoot all of the falmer from a distance, they're not really strong. The mechs could be quite a challenge though, try to use ranged attacks if you have them. You can even try to use glitchy spots where they can't hit you, but from where you are able to attack.
Comment: Currently two answers, both downvoted for no apparent reason. Huh?
Comment: One thing not mentioned:  Falmer can't see, so don't worry about light sources... use as much light as you want.  They can hear though, so muffle is critical.  They are not resistant to poison, so use it if you have it, but, they use it all the time, so resistance to poison is useful.
Answer: I find falmer are very susceptible to arrows - pick off the leaders first of course.
With mechs - it depends which ones :

spiders - not much danger in a melee battle.
spheres - Arrows to damage, but they can close quickly so swap to sword/shield - they are also susceptible to bash damage
ballistas - make use of cover and snipe with ranged weapons. Up close hit from behind if you can.

Mechs of course are more susceptible to shock damage. Falmers take all damage that hit them. Good luck.
Answer: Assuming the regular methods aren't working, Dwemer ruins are filled with traps, and they work against all creatures.  The spinning blade from floor thing tends to be extremely effective and even falmer will run headlong into it, while you can also use fire traps to keep them back and shoot them with arrows/magic.
Comment: @TonySuffolk66 Dwemer traps are generally resetting, and the spinning blade one I mentioned is usually set off by a pressure plate just before it on either side, so if you are careful you can kite enemies back to it and trigger it while they are chasing you.
Comment: that is true if you want to run through a ruin with a sphere chasing you and shooting at you, while trying to find the trap that you think you passed. Seems better to me to learn some good combat skills. Although daunting when you first meet them, neither falmers, or mechs are invincible and can be defeated even for a low level player.
Comment: @TonySuffolk66 The OP made it sound like he was having trouble beating them on his own, and at this point there's no reason to repeat your answer.  I find tricking enemies into dying to traps extremely satisfying anyway.
Comment: I would have thought that there aren't enough traps in most places to deal with all the enemies.
Answer: I would use bound arrows and bows against all dwemer. weapons with a shock enchantment are best.
Answer: It's easy to pick off the falmer and the mechs with bows and arrows except for the "Centurion" mech. The Centurion is a large mech with a dwarven warhammer on one hand and a dwarven battle axe on another. It also has a special ability to shoot steam at the player dealing moderate damage. The best way to defeat it I've found is to try to lure it to a small tunnel where it can't fit and attack it from there.