How to securely download a new kernel?

Question: I want to test a new kernel for my ubuntu. I want the most recent stable kernel available. How can I do it securely? That is, no http downloads.
Comment: Kernel packages can be downloaded securely using HTTP.
Comment: @user535733 I've only found way to download old kernels not newest ones
Comment: Are you thinking about repositories, or the source tarball?
Comment: Have you read the [Ubuntu Kernel Team's Wiki](https://wiki.ubuntu.com/KernelTeam), which has a lot of good resources and advice for new testers?
Comment: Or are you testing for a specific purpose? For example, to see if a particular bug is fixed? If so, simply try a 19.04 LiveUSB or (soon) a 19.10 testing .iso
Comment: @user535733 the bug involves SSD, so I need to use it from my SSD, so I need to install the kernel into the system
Comment: What's your release of Ubuntu? Is there a Launchpad bug number for the issue?
Comment: @user535733 im using ubunu 18.04, here's the launchpad bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1746340
Comment: I'm confused why you need to install to the SSD to test the kernel. Where the kernel boots from seems irrelevant to the issue in the bug report. For the specific answer to "where do I get newer kernel packages," see https://wiki.ubuntu.com/Kernel/MainlineBuilds. There's a link to that page also in the bug report.
Comment: @user535733 I know, but if I use the live CD, it does not talk to the SSD. I could make it talk but It wouldn't be the same as having it installed
Comment: @user535733 thanks, I was able to download them through https and even verify the checksums
Answer: You can download the newest versions of the kernel ready form Ubuntu at https://kernel.ubuntu.com/~kernel-ppa/mainline/
And then use

sudo dpkg --install *.deb

to install it
Answer: Introduction
The key point in the question is how to do it securely. I've divided this answer into four sections:

How to find the newest mainline stable Ubuntu kernels
How to download the kernel and checksum files
How to verify checksums
How to install new kernel

How to find the newest mainline stable Ubuntu kernels
Go to https://kernel.ubuntu.com/~kernel-ppa/mainline and click on date modified two times. The first time sorts by date in ascending order, the second time sorts descending. Your newest kernels will be on top:

I'm interested in 4.14.120 which is an LTS (Long Term Support) kernel for five years. I'll click on it and move to the next section:

How to download the kernel and checksum files

I've selected the generic packages for downloading:
linux-headers-4.14.120-0414120_4.14.120-0414120.201905161610_all.deb
linux-headers-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
linux-image-unsigned-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
linux-modules-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb

Scroll down further and you will find the CHECKSUM files that guarantees what was published is what you actually received:
CHECKSUMS       2019-05-16 21:34    9.0K
CHECKSUMS.gpg   2019-05-16 21:34    473

Click both checksums to download them and move onto the next section.

How to verify checksums
After downloading checksum links follow these instructions:

Verifying the mainline build binaries
In order to allow verification that the published builds are the
  builds made by the mainline build system, the individual files are
  checksummed and the results of that published as CHECKSUMS in the same
  directory. This file is in turn signed by the mainline builder using
  the GPG key below which can be obtained from the Ubuntu Keyserver:
pub   2048R/17C622B0 2008-05-01
        Key fingerprint = 60AA 7B6F 3043 4AE6 8E56  9963 E50C 6A09 17C6 22B0 uid                  Kernel PPA
The verification can be done by running the following commands:
Import the above public key to your keyring (if you haven't already done that):

$ gpg --keyserver hkps://pgp.mit.edu --recv-key "60AA7B6F30434AE68E569963E50C6A0917C622B0"

Download the CHECKSUMS and CHECKSUMS.gpg files from the build directory and verify if the CHECKSUMS is signed with the above key:

$ gpg --verify CHECKSUMS.gpg CHECKSUMS
gpg: Signature made .... using RSA key ID 17C622B0
gpg: Good signature from "Kernel PPA <email@example.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.

Verify the checksums of downloaded deb files:

$ shasum -c CHECKSUMS 2>&1 | grep 'OK$'

You should get a line ending with "OK" for each of downloaded deb file and each type of checksums that are given in the CHECKSUMS file.

I've edited the CHECKSUMS file and removed irrelevant kernels (ARM, S390, low-latency, Power PC and 32-Bit) to leave only the checksums for files downloaded above:
# Checksums for v4.14.120, check with the command below:
#     shasum -c CHECKSUMS
#
# Checksums-Sha1:
b26b07d9ae2dcf25648dab3fe2374f6a2df219d1  COMMIT
44d09220f11394adb7067a79ce1693ed8e6e149e  linux-headers-4.14.120-0414120_4.14.120-0414120.201905161610_all.deb
4cea2a7041ddf2655426f9fc4a57c39d0b6e02b8  linux-headers-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
24ae91d3d812ef2fec4527f5d2acd5d089c27cb1  linux-image-unsigned-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
194fbaae734d33ba26ec1bb631f59b1c01740a3d  linux-modules-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb

#
# Checksums-Sha256:
c253adc68879d07caffca5037ca997d7d2c7b74e87073093566c33e7a6a517e8  COMMIT
bf32ef3ee0b410f9264f1b6dd2349c5753ba73d02b5977d49010120ac6f1e7aa  linux-headers-4.14.120-0414120_4.14.120-0414120.201905161610_all.deb
4f769f431f99cadb4c564d0da4c6231a2c593307c10c520f81b74834a6149b28  linux-headers-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
b18a6163ec0a42a598795cb181dcde86d0c59e9b9b117a1b9e5d7186e967b59a  linux-image-unsigned-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb
8aa8790171b9e948f2d5b0ce8c54a81d2b2bfb9d33ead499d865f841497fcabc  linux-modules-4.14.120-0414120-generic_4.14.120-0414120.201905161610_amd64.deb

Note: For some reason the CHECKSUMS file opened up instead of downloading. I had to copy and paste text to manually created file CHECKSUMS.

How to install new kernel
Assuming checksum verification passed change to your downloads directory and install:
cd ~/Downloads        # Go to our downloads directory
sudo dpkg -i *.deb    # Install all four kernel .deb files downloaded
rm -f *.deb           # Clean up so we don't accidentally install next time around
reboot                # reboot to grub and select new kernel on Advanced Options

Note don't key in # comments those are for explanation purposes and machine ignores them.
Comment: I get a issue with this `gpg --keyserver hkps://pgp.mit.edu --recv-key "60AA7B6F30434AE68E569963E50C6A0917C622B0"' ` :
"gpg: échec de réception depuis le serveur de clefs : Fin de fichier"
But it works with this `gpg --recv-key "60AA7B6F30434AE68E569963E50C6A0917C622B0"

How to securely download a new kernel?


How to make the gloves that I can get work in the rain and cold?

Question: My convenient bike shop has no gloves. Amazon.com has very little highly rated gloves. Amazon.co.jp doesn't even list ones rated highly in US so I bought wind proof gloves (which weren't that warm in mildly cold condition) from a convenience store and undergloves for 100 yen shop. How can modify gloves to work best?
Comment: It's not necessary to get cycling-specific winter gloves. Just visit an outdoor or skiing shop. Be aware that some gloves don't allow independent movement of all fingers which can be a problem with some shifters and brake levers. Apart from that most good outdoor gloves are at least wind proof and allow proper grip of skiing/hiking poles or ice axes which means they also work nicely for cycling.
Comment: What are you trying to achieve?  Warmth while riding is a different goal to being waterproof.
Comment: Modifying existing gloves is going to be unsatisfactory because gloves need to fit, well, like a glove. Better to get the right thing in the first places. There are places to shop other than Amazon and your LBS. Jinbocho is full of ski shops.
Comment: Even fewer of those type of shops here.
Comment: @AdamRice OTOH some of us can't find gloves that fit well (my hands are 2 sizes longer than they are wide).  I'm seriously considering seeing if I can make some 2XLs narrower, especially as my wrists are thin even for the width of my hands.
Comment: ... A further modification might be to attempt to wind-/water-proof  gloves that fit.  People [do this sort of thing using thinned silicone sealant](https://www.reddit.com/r/Ultralight/comments/2kh7xo/has_anyone_tried_diluting_100_silicone_to_make/).  Wouldn't work on stretchy material though
Comment: With gloves and undergloves probably it won't be easy to shift the gears, but they should work. If you still feel the hands cold it might be because your body is cold and the blood flow to the extremities is reduced.
Answer: What about buying neoprene gloves instead? You can find them in nearly any dive shop, they come in various thicknesses and are not really hugely expensive. They might feel slightly funny, but will definitely work.
Comment: No dive shops around here- we so inland.
Comment: I have done this in the past (actually "windsurfing" gloves that I bought for kayaking).  It was OK when wet and just above freezing, but I wouldn't want to use them for long days.
Comment: What was the primary problem with them?
Comment: @Sherwood they get very sweaty except in a narrow range of temperatures.  They also don't fit brilliantly because my hands are longer and thinner than they (and most gloves) are designed for.  This means they get uncomfortable after a while.  This is a particularly grippy pair.  A different pair were useless on a road bike for more than a couple of hours as they tried to slide forwards against the hoods so I got tired hands from having to hold tighter than normal
Comment: I see... Well gloves are very individual thing. If you don't want to spend quite a lot of money on gloves, you can basically choose between breathability or waterproofness. I also have one "emergency" trick - when it's raining hard and i only have some light gloves, I carry a pair of nitrile/latex and put them under my normal gloves. It feels slightly funny and your hands are going to sweat, but you are warm. And also you can carry such gloves on every ride - if you need to work on something mechanical, your hands won't be dirty.
Answer: Gloves are a personal thing and your experience will vary.
I prefer a full-fingered padded cycling glove most of the year.   Even when its raining, I'm okay to have wet gloves.
When it is really cold, I prefer a wind-proof outer gauntlet made from leather, that has had beeswax massaged into it.  They come up the arm a bit and cover the sleeve's cuff.  I'll wear thin merino wool undergloves for warmth.   Downside, they're thick and awkward.
On hot days I still prefer full-coverage gloves, to minimise sun exposure.  So I have some "ninja lite" gloves with no padding.
On one bike I fitted some motorbike grip heaters under the bartape, but they weren't very effective.  Most of the heat was lost to the aluminium bars or the airflow, so I made some "Bar Mitts" or "Poggs" from fleecy lambskin, something like below.
 for drop bars or
 for flat bars.

 Example of the heater pads I used.
This combination worked really well, the only downside is the 2x 18650 batteries would go flat in about 15 minutes, so I had to run them for a few minutes at a time.  Which was workable.
Comment: Generally you'd only use pogies when it's cold enough that it doesnt rain which eliminates the water running down issue.  Although given how bad most waterproof gloves on the market are i think Chris's idea of a windproof bar cover has some merit for long wet rides.
Comment: Those pogies look more suitable on flat bars than drop bars - you lose the advantage of multiple hand positions and braking would be tricky if you tried to use the drops outside them.  I've seen some in use recently, and it's still over 10°C every day here
Comment: @ChrisH yes - that is a known downside.  You can push into them a bit more to reach the drops (think like a veterinarian ?!)  but they're really not usable from the tops.  Also they require withdrawing a hand to change gear if you use vintage shifters, while brifters work from inside the warmed space.   Note the dropbar and flatbar styles are quite different and not interchangable, they have differnet angles.  You'd still want light undergloves or normal padded cycling gloves for those times when your hands are out of the pogs.  But my effort was made of fleeced lambskin and it was so WARM.
Comment: I sometimes wonder about something far bigger, covering the  hoods and drops with one aperture, lined with something warm and with a wind-/water-proof shell.  If I ever do something along those lines it will probably be shaped like a fairing and take a huge amount of effort, so it probably won't happen.
Comment: Doesn't this have problems with water running down your arms/sleeves and into the mitts? From my experience, I always wanted water proof cuffs on my gloves that I could tug under the cuffs of my rain jacket, precisely to avoid this issue.
Comment: Cold can be dealt with easily if it's not too severe. My problem has always been the rain. I'd much rather bike at -12°C than at +0°C with rain...
Comment: @cmaster-reinstatemonica yeah likely - mine were on the recumbent so the hands went up to the bars and rain would not track that way.  I guess you'd ideally have a rain jacket with sleeves that end up on the outside?  Andy's right, they are more for cold than rain.
Answer: Windproof gloves, perhaps over liners, can work well.  Even if you get wet hands, reduced wind chill means they don't get so cold as they would without gloves
You can also wear track mitts (fingerless cycling gloves) over the top of windproof or thin waterproof gloves if you want padding.  For almost complete waterproofing you could wear disposable (surgical) gloves under track mitts.  You could still wear something warm under the disposable gloves, which would make them easier to reuse as well.  This is plan B for me if I'm caught out away from home with insufficient gloves (e.g. lost my warm ones), as I've got disposable ones in my first aid kit.
Another fully waterproof (and windproof) option is PVC-dipped cotton.  Because the cuff is cotton, you'd need good overlap with your jacket sleeve to stop water soaking down.  The pair I have aren't a good enough fit for on the bike, but if they were, they'd be worth trying, over fleece or knitted warm gloves.
My rides are too long for battery solutions, but you can wear heated motorbike gloves (sadly mainly 12V) or add 5V heater pads to the inside of  gloves that otherwise work well.  The motorbike gloves would be bulky, so a test would be a good idea - I can ride in big ski gloves without a problem but some people struggle (I'd struggle in the only pair of motorbike gloves I have, but they're very bulky and short in the fingers).
Comment: @Criggie many years ago. A combination of running hot and being enough of a pack rat to carry extra layers means neither particularly appeal to me.  I'd be more likely to carry the disposable ones in my emergency kit than plan on using the rechargeable ones.  The single use ones can get rather too hot if fixed in place under insulation, so for riding gloves I don't recommend them. Battery heating pads OTOH (which again I don't have) have the advantages of stop-start operation and easy recharging.
Comment: ...Ski-type gloves will do me for below freezing all day, even going slowly for fear of ice, silk liners or thin touchscreen gloves in reserve to go  underneath as well as nitrile
Comment: Have you tried those saturated salt heat pads with a clicker in them?  They're faffy to "recharge" and I really don't like the idea of the disposable one-time use chemical ones.
Answer: Leather gloves works well in a wide range of temperatures and also protects well if the case of fall.
They are not "waterproof" in the sense that they do get wet in the longer rain and must be dried with care, not just left on the bicycle.
Answer: Another possible source: I wear my motorcycle gloves in cold or very wet weather, anti vibration work gloves from the workshop in cold dry weather, and no gloves otherwise (because I hate wearing gloves).  Motorcycle gloves are big and bulky, but ubiquitous (at least in the uk), and I already have them.  Work gloves with vibration pads are actually a pretty good substitute for proper cycling gloves.  As noted above non synthetic motorcycle gloves need a bit of care, but not that much.  The worst thing is drying them before riding home if you don't have enough time.
Cold here means down to a few below 0 C occasionally (yes, it does happen even in England).  Wet means wet.  I ride between fifteen minutes and an hour on paved roads.


Circuits for Modular Arithmetic

Question: I've read this which describes how to do do integer arithmetic in circuits. The one thing that it does not describe is how to do these operations with a modulus. How can modular arithmetic be done in circuits? Can someone point me to a resource or describe the modular step here?
Comment: Please note: I asked this question previously, and was asked to show my research. I've was locked out of that account, and this other question were closed. So I repost question with link showing my research
Comment: In some sense, adders do modular arithmetic with modulo 2^n, where n is the number of bits it can represent. In general, you should be able to use the remainder from the division circuit to get the modulo for an operation.
Comment: This question does not meet my expectations for the level of research.  So you read a textbook chapter that describes how to do addition, multiplication, division, etc., but that didn't describe how to do modular reduction.  OK, so where else did you look?  Do you know how to design an algorithm for modular reduction?  If you can divide and multiply and subtract, you have everything needed to do a modular reduction.  This is covered in many textbooks.  Questions that ask us to regurgitate material found in textbooks tend not to be a good fit for this site.
Answer: In general, everything that you can describe in pseudocode, you can convert into a circuit. So if you can do modular arithmetic by hand, then a circuit can do it. More to the point, here are some concrete ideas for doing modular arithmetic, where the modulus is $m$:

Addition: You already know how to add two numbers. Assuming both numbers were in $\{0,\ldots,m-1\}$, the answer lies in $\{0,\ldots,2m-2\}$, so it is enough to check whether the results is at least $m$, and if so, subtract $m$.
Subtraction: This is similar to addition. The idea is that $-a = m-a$.
Multiplication: Here the basic idea is to compute the result $ab$, divide by $m$, and keep the remainder. You can (possibly) optimize this by doing modular reductions along the way.
Division: This is more complicated, and is probably better implemented in microcode or software. Suppose we want to compute $a/b$. If $m$ is prime then we can assume that $b \neq 0$. We compute the modular reciprocal $b^{-1}$ of $b$ using the extended Euclidean algorithm, and then multiply $a$ by $b^{-1}$. If $m$ is composite then the situation is slightly more complicated since $b$ doesn't always have an inverse. In that case we first compute the GCD $g = (a,b)$, and $a' = a/g$, $b' = b/g$. There is a quotient $a/b$ only if $(b',m) = 1$, in which case we can proceed as before.
Powering: This is again quite complicated, and better implemented in microcode or software. Here the idea is to use the repeated squaring algorithm, reducing modulo $m$ at every step.
Discrete logarithm: Given $g$ and $g^a$, find $a$. This is complicated enough that it probably isn't implemented in hardware.
Answer: Yes, you should study the field of "residue numbers".  This is a field in computer science and electrical engineering that has all sorts of fascinating circuits that deal with modular arithmetic.  You can find circuits that deal with arithmetic that also includes an arbitrary, non-binary (power of two) modulus.
Comment: Interesting! Nice to see someone from a "different" field to share their perspective. I tried to look it up, but the Wikipedia article https://en.wikipedia.org/wiki/Residue_number_system has warning signs all over. What would be a good resource to learn more?

Circuits for Modular Arithmetic


Difference between Constitution and other administrative law

Question: I am asking this mainly with respect to rights. There are certain fundamental rights in India (and in several other jurisdictions ) (but I am asking with respect to India) like right to freedom and so on. These rights are provided by the Constitution. There are on the other hand other rights like those to information and right to privacy that are provided through civil law or administrative law or hounourable court's order. My question is why can't all rights directly come from the Constitution? As far as I knew constitutional law mainly deals with the functioning of states and governments so why encode certain rights directly into the Constitution while others as separate law?
Answer: First, the right to privacy derives from the Constitution, as "an intrinsic part of the right to life and personal liberty under Article 21 and as a part of the freedoms guaranteed by Part III of the Constitution", see Justice K.S. Puttaswamy (Retd) vs Union of India. The issue here is that prior to this ruling, the right to privacy was only implicit in the Constitution, and it took a lawsuit and argumentation to extend the interpretation of the Constitution. The right to information is a statutory right. The rights created by this law are stated explicitly, so no lawsuit or interpretation is required (unless a court case is required to understand what a "competent authority" is, or whether the right includes more than the 4 enumerated sub-rights). That is, this statute specifically creates a right, which could not be inferred from the Constitution.
There are three ways to create a new right. One is to "discover" that it was implicit in existing law, as in the Aadhaar ruling. Another is to amend the Constitution and add something to Part III. Turn to the Constitution itself, art 368, which describes amending the Constitution. The third way is to do this statutorily, as in the right to information. Acts of Parliament are "easier" than Constitutional amendments: an amendment requires a 2/3 quorum, and us subject to other specific restrictions, possibly requiring approval by a majority of states. Likewise the right to free, compulsory education is Art. 23a of the Constitution, but the details of implementation are a statutory creation, subject to judicial review unlike Constitutional amendments (hence Pramati Education and Cultural Trust v. Union of India (2014)).
Theoretically, the Constitution could be amended to require that all rights must be encoded in the Constitution, which would make it more difficult to create new rights.


Use of Either... or, or, and or in English

Question: Can I say "A test comprises an equal number of items concerned with either prospective or retrospective, long-term or short-term, and self-cued or environmentally-cued memory subscales"?
Comment: Is this the same:  "A test comprises an equal number of items concerned with either prospective or retrospective memory subscales. The memory subscales can be long- or short- term, and self- or environmentally- cued"?
Comment: BTW... there seems to be an 'and' missing from the title of your question - it's confusing
Comment: Thank you for saying!

Yes it is the same. The thing that I want to point out is that each subscale is made up of half prospective and half retrospective memory items, half long- and half short- term memory items, and half self- and half environmentally- cued memory items.
Comment: You might be better off dropping *either* and changing all 3 instances of *or* to *and*. Otherwise there's some tension between *equal number* (i.e. all categories are represented) and the *exclusive or* interpretation (i.e. pick one but not both) suggested by the word *either*.
Answer: Judging from the context of options presented, I think you could slightly improve the clarity of what is meant in this sentence by inserting additional copies of "either":

A test comprises an equal number of items concerned with either prospective or retrospective, either long-term or short-term, and either self-cued or environmentally-cued memory subscales.

But I think a much better option than trying to load more into that sentence is to lay out the options in several sentences or a bullet list. For example, if I understand correctly:

A test comprises items concerned with various characteristics of memory subscales. These items should be equally split across:

prospective and retrospective
long-term and short-term
self-cued and environmentally-cued
Comment: +1 bullet points are a good idea but the example makes me think tests are split across 3 groups instead of drawing from each of the 3 groups.
Comment: Entirely possible, but that is really part of the point I am making (perhaps not clearly enough) that the meaning is being lost by trying to crunch this concept into one sentence.
Comment: Yes. Too big for 1 sentence...
Comment: I was agreeing, have now lent formal support ;)
Answer: I think your statement is technically wrong. It can be written generally like this:

A Test comprises (something) with Either B1 or B2, C1 or C2 and D1 or
D2

Which I interpret to mean that the test comprises something with:

options from B and D, OR
options from C and D

But not with options from B, C and D which is what I think you mean.
It might be more clear if you could say:

A test comprises (something) with one of each of the following
options/parameters: (B1 or B2), (C1 or C2) and (D1 or D2).

OR

A test comprises (something) with one of each of the following
options/parameters:

B1 or B2
C1 or C2
D1 or D2


How do I find out what wifi chipset my phone has?

Question: I've got LG Optimus One phone (model LG-P500h). How do I find out what wifi chipset my phone has? Is there a general mechanism that will work for all phones?
Comment: I don't know the answer, but...This is an _excellent_ example of the kind of questions we like here. It's asking how solve a particular problem ***and*** has applicability for future readers.
Comment: You can see the chipset model under 'Device' in CPU-Z application. Type that in Google and see if it gets you to a specification page that also specifies 'WiFi' connectivity.
Comment: I just run: getprop | grep connectivity
Which outputs:                       [ro.connectivity.chiptype]: [bcm43xx]                  [ro.connectivity.sub_chiptype]: [bcm4359]
Answer: Well without some specialized program, there's always dmesg.
Turn on wifi, then run dmesg in a terminal/adb shell/ConnectBot. Towards the end of the file you'll see debug statements about your wireless.
dmesg | grep -i lan can be useful if you have busybox installed.
I get lines like this:
TIWLAN: 1251 PG 1.2
tiwlan0: no IPv6 routers present

The first one isn't interesting on its own, but the second one screams "network adapter" due to driver naming convention for network adapters. "tiwlan0" is closer to OpenBSD's naming convention than Linux's (Linux native drivers would just call it wlan0) but...not unexpected.
A few web searches later - and yep, it's a TI wireless chip.
Answer: The sure fire method that will work for any phone is to crack open the case, write down the name and part number of the chips, and then research them individually.  That can be pretty intensive though, not to mention that you might damage your phone in the process.  Manufacturers typically do not publish the parts list for their products.  The product spec sheet may contain the CPU type (a Qualcomm MSM7227 in the case of your phone).  They may also list the GPU (Qualcomm Adreno 200 for your LG Optimus One P500).  No guarantee on that though.
The folks over at isuppli.com teardown hardware and inventory the parts.  Most of their reports you have to pay for, but some get published for free.
Most handsets use a chip from Texas Instruments, Broadcom, Royal Philips Electronics, or Atheros Communications.  Using those chip maker names as a filter may help you to zero in on the particular chip in your handset.
Answer: I simply used the dmesg command in a terminal emulator and scrolled until I found anything named bcm432x... and wlan. Think thats it. I have lg p500.
Answer: Use Wi Mark BenchMark Receptor from google play.
OR
https://www.youtube.com/watch?v=rQtxZ4MbaFA
Comment: Could you include some more details please? For one, where to find that app you mention (a link would be most helpful). And secondly: What is that Youtube link for? Not everybody can access it (e.g. because of firewalls or Chinese walls), so a few explanatory words should accompany it. In this context, also remember that links might die (and Youtube videos taken offline for "copyright" issues etc.).
Comment: Unfortunately I haven't found a phone yet whose wifi chipset it has detected.
Answer: I simply googled "what chipset is in galaxy j100" (my phone) done some reading and got answer..... fyi this one has chipset by marvell...
And yours, the LG has a Qualcomm msm 7227
Comment: I've deleted the duplicate answer you posted earlier. In future, if you want to add more information to your answer, you can edit it using the **edit** link. Don't just post a second answer, as that will lead to confusion.


Matcha Tea Inquiry

Question: Does ground matcha need a hechsher? I know certain items, such as tea, when they are only one ingredient do not require a hechsher. Is ground matcha included in this?
Comment: Ya'el, welcome to Mi Yodeya. This is a very nice opening question. I believe that you are correct regarding the general idea that "natural" ingredients don't need a hechsher. I only recently became interested in drinking matcha green tea as it has a stronger flavor and supposedly is much higher in anti-oxidants than regular green tea. I have to investigate exactly what this "matcha" is about and see how it's manufactured. If you can include some info on "matcha" into your question, it may improve its substance and help you get better answers.
Comment: Related: https://judaism.stackexchange.com/q/49004/5275
Answer: Adding to alicht's post, I checked Wikipedia's explanation of "matcha":

Matcha is made from shade-grown tea leaves that also are used to make
  gyokuro. The preparation of matcha starts several weeks before harvest
  and may last up to 20 days, when the tea bushes are covered to prevent
  direct sunlight.[5][better source needed] This slows down growth,
  stimulates an increase in chlorophyll levels, turns the leaves a
  darker shade of green, and causes the production of amino acids, in
  particular theanine. Only the finest tea buds are hand-picked. After
  harvesting, if the leaves are rolled up before drying as in the
  production of sencha, the result will be gyokuro (jade dew) tea. If
  the leaves are laid out flat to dry, however, they will crumble
  somewhat and become known as tencha (碾茶). Then, tencha may be
  de-veined, de-stemmed, and stone-ground to the fine, bright green,
  talc-like powder known as matcha.[6][7]
Grinding the leaves is a slow process, because the mill stones must
  not get too warm, lest the aroma of the leaves is altered. It may take
  up to one hour to grind 30 grams of matcha [8]

Based on this explanation, the production process involves grinding the tea leaves between millstones. Thus, if these millstones were used only for grinding tea and other similar natural products, and there are no other flavorings added to the tea (e.g., it's loose matcha powder), it seems that it would fit the rules mentioned in the OK article. Happy drinking.
Answer: According to the OK ("Consumer questions for the OK"), it would seem to depend on whether the tea is flavored or not:

Plain tea does not require a hechsher, since it does not have additives. However, any flavored tea does require a reliable hechsher, because the additional ingredients may not be kosher. Many flavorings used in flavored teas are made from dairy or non-kosher ingredients.

(see also: OU Kosher article "Tea and the OU Kosher Ingredient Approval Process")

Matcha Tea Inquiry


Why does my Ps3 lag/skip/freeze

Question: Ive had my Ps3 for 7 years its the Fat 80 GB version i know its old but ive cleaned it and im thinking of replacing the thermal paste. The main games it Freezes or skeps is Cod ghosts and advanced warfare. PLEASE HELP
Comment: Like was said in your previous question, if you've disassembled your PS3 to the point of being able to see the thermal paste, you seriously need to replace it.  Not doing so runs the risk of doing permanent damage, which no amount of thermal paste will solve.
Comment: It's also likely the cause of your issues here, and by not replacing it, you've probably already caused permanent damage.  Sorry, realized I hadn't mentioned that part.  No thermal paste = bad things happening when trying to use the system.
Comment: after use what should it look like. mines snowflaky patern and is crusty
Comment: I'm not sure how often I can tell you; if you can see your thermal paste, **you need to replace it**. If you want your PS3 to work, its not really an optional step.
Answer: It sounds like your PlayStation 3 is reaching the end of its life. I am fairly surprised you've lasted this long without the YOLD (Yellow Light of Death). My Fat PlayStation 3 lasted no where near 7 years before I had to start applying thermal compound to it. That being said, applying thermal compound to a PlayStation 3 isn't a long term fix. I had to use a heatgun on the CPU/GPU and reapply thermal compound at least once every two weeks and sometime within the same week and it eventually got to the point that even with the fix the fan would run at really high speeds and was very loud.
Also applying a new layer of thermal compound may not even work in this case as it is likely, given the age of the console that the CPU/GPU are too far gone by this point that the fix would simply do nothing.
7 years is a good run but it looks like your PlayStation 3 is on its last legs.
Comment: ok well its still going strong its never getting hot the highest the fans ever gottne to is level 3. but this is the only problem iv ever had with it
Comment: Temperature may not even be the issue here. Freezing and skipping is a sign that the processing chips on your console are unable to cope with the demand the games place on them. The freezing is caused by the CPU/GPU not being able to process the data fast enough so it essentially gives itself time to process that data by freezing the game. Old age can cause these issues just as easily as temperature can.

Why does my Ps3 lag/skip/freeze


Photoshop cc multiple layer cut

Question: Hi all I was just wondering if I could make a selection on multiple layers and cut or copy the selection.
I have a earth globe that I have copied 5 times and have change the designs for each. I need to break up the globe in the same areas could I break up all 5 layers at once without repeating the process 5 times ? I don't need to blend or adjust just cut or copy selected layer
Thanks!
Comment: `Edit > Copy Merged`
Comment: That's only cutting the top layer
Comment: if the layers align in selection you can make a selection on a layer, delete the needed area then without deselecting go to another layer delete again, and so on and so forth
Comment: This isn't really what I was going for as I was looking for a more cut via layer without duplicating the main layers approach but Thank You for your help this did make things easier
Comment: Copy merged should copy *all visible data* within a selection. Then you can just paste.
Answer: If i understood your question fully: copy those layers + merge them + add your selection to that 1 new layer
Perhaps a smart object will help you too

Photoshop cc multiple layer cut


Organ and Bone Marrow Transplantation?

Question: In organ transplantation the transplant is rejected by the body's immune system , but is it possible if along with organ transplant if bone marrow transplantation is carried out from the same donor , then will the Cell Mediated immunity still reject the graft ?
Answer: As Mowgli pointed out, a bone marrow transplant involves destroying the patient's own immune system with radiation and, essentially, replacing it with a new one from the bone marrow donor. If you did a double kidney/bone marrow transplant from Alice into Bob, then Bob's new immune system (which is the same as Alice's) would recognize the new kidney from Alice as self (because it is) and not attack it. Yay!
The problem is that, to the new immune system, all the rest of Bob appears to be non-self and will get attacked. This is called Graft-versus-host disease and is at least as serious a problem as organ rejection.
Comment: _"The problem is that, to the new immune system, all the rest of Bob appears to be non-self and will get attacked. This is called Graft-versus-host disease and is at least as serious a problem as organ rejection"_: What do you think of this https://biology.stackexchange.com/questions/79881/could-bone-marrow-transplants-be-used-to-prevent-tissue-rejection-of-trans-speci as a fix for that, introduce both patient & body donors cells to the pig fetus then transplant it's bone marrow?
Answer: Bone marrow transplant requires to first destroy the pre-existing immune system with chemotherapy and/or radiations. So essentially you would not have the first immune system and my guess is that yes, in theory, it would work.
However, double-grafting an artificially immunocompromised patient (who clearly suffers from another severe pathology, if they need an organ graft in the first place) would be extremely risky as it would exponentially increase the risk and mangnitude of post-operation complications, and I think no surgeon in their right mind would ever take such risk.

Organ and Bone Marrow Transplantation?


When is using the native language for mobile phones a better choice then using Phonegap/Titanium/Rhomobile

Question: Currently looking at some possible work in the mobile field and one question that I havent (yet) found an answer to is why developers that wish to market their apps to the greatest range of mobile phones would choose to code in the phones native lnauge over cross platform techs such as phonegap, titanium, rhomobile, and others. Are their benefits for say someone that is equally versed in java and javascript to choose phonegap's javascript implementation over BB/Androids java version for example, with the language proficiencies being equal ?
Answer: PhoneGap is a great solution if you are going to try and hit more than one platform, especially if you are thinking of Android/BlackBerry and Objective-C. On BlackBerry making a nice user interface can, depending on skill set and based on my experience, be a bit easier in HTML / CSS than in the native Java code, Android a bit less so.
If you are making an app for one platform and well versed in that language then definitely go native.
Keep in mind that a lot of platforms are migrating towards W3C widgets as well, BlackBerry, Symbian and Meego support them and webOS is of course all JavaScript. I would not be surprised if Android started to offer something similar.
Regarding Apple and section 3.3.1, the JavaScript in PhoneGap is executed in the native iOS UIWebView control and so far there have been no problems with section 3.3.1 - in fact Apple has communicated that PhoneGap-like solutions are totally acceptable. (More info)
Answer: I can tell you why I do it, and keep in mind these are very personal reasons, unique to me (within a margin of error of course).
But for starters, I've been developing on frameworks very similar to the iPhone frameworks since the 1990s with OPENSTEP. The jump from OPENSTEP to Mac OS X wasn't difficult at all, and from Mac OS X to iOS, while a bit tougher, wasn't that difficult. So the first reason was that based on my past knowledge, it was an easy transition.
Secondly, I've always been a little leery of third party development environments targeting iOS. I know Apple, I know they like to make sure things stay within the lines they have laid out, and I know the problems they've had in the past with other similar environments on their Mac platforms before. Their position is very well known, and the 3.3.1 section in the dev agreement, anyone who knew this could know that was coming.
3.3.1 says that the program needs to be originally written in Objective-C, Objective-C++, C or C++. It also allows Javascript, but only as executed on top of the WebKit. So I like to stay within those.
All those things above are just the two big things that keep me writing ObjC code for the iOS platform.


differences between privileged mode and unprivileged mode in the RTX RTOS

Question: As i said in the title what's differences between privileged mode and unprivileged mode in the RTX RTOS?
And why in privileged mode  threads has allowed full access to the cortex M processor?
Answer: From the RTX Documentation

Processor Mode for Thread Execution
CMSIS-RTOS RTX allows to execute threads in unprivileged or privileged processor mode. The processor mode is controlled with the #define OS_RUNPRIV.
In unprivileged processor mode, the software:

has limited access to the MSR and MRS instructions, and cannot use the CPS instruction.
cannot access the system timer, NVIC, or system control block.
might have restricted access to memory or peripherals.

In privileged processor mode the software can use all the instructions and has access to all resources.
Note
It is recommended to use the privileged processor mode.

Privileged and Unprivileged mode is really a feature of the ARM core and RTX is simply making that feature available.  If your application has a reason to restrict privileges for threads than you might choose unprivileged mode.  But I suspect most applications use privileged mode and allow all threads full privilege.
Comment: Is it possible some high important threads use privileged mode and the others use unprivileged ?
Comment: there are 2 definition for MSR and MRS,which one do you mean? 1-Move to system coprocessor register from ARM register.       2-Load an immediate value, or the contents of a general-purpose register, into specified fields of a Program Status Register (PSR). MRS has 2 definition too!


What's in the empty space between a nucleus and the electrons?

Question: I was thinking the other day about how the empty space in an atom is relatively huge, but I was wondering, is it really empty space? Originally I just assumed it was a vacuum and that was it, but that just posed more questions. Please will somebody explain to me what is in the "empty" space of an atom? Sorry if the question isn't entirely clear; I'm only 16 and just completed my GCSEs (so please try to keep the answer fairly basic)!!
Comment: There is no "empty space" in an atom. Due to the quantum nature of electrons, they are smeared out over the whole atom. The Bohr model is close to being pure fiction (and should not be taught in school anymore). Furthermore, why should a vacuum in between things be a problem ... there is nearly a vacuum between the planets.
Comment: Sad but true, most probably because most science educators are not up-to-date (but rather 80 years in the past).
Comment: What questions are raised? – Well, the internet keeps up in some places, and not in others, the number of good physicists is small compared to the number of people doing popular science on the internet google just puts sites first that are linked often, these are not necessarly the sites with the highest signal-to-noise-ratio.
Comment: Sebastian Riese has it 100% right, the public is, at least, 80 years behind in physics and so is high school education. Unfortunately, even the folks who know better, our own theoretical "stars" are still publishing books for laymen with material that is woefully outdated and that they would not dare teaching at the university level.
Comment: If you type into the Google search bar, "how much of an atom is empty space", the first result as well as other results will tell you almost all of it is empty space. Is this just the internet not being able to keep up with scientific advances? I'm confused. Also, I never complained about the empty space, I just said it poses more questions.
Comment: So why do I hear all this talk about 99.99999% of an atom being empty space? What is this?
Comment: But again, there is nothing wrong with empty space, as long as some force keeps the items in place.
Comment: Okay, so enough about how we are taught BS in school, how are atoms structured (if it's possible to explain)?
Comment: You're right, Ramashalanka, I should've looked more thoroughly before spamming the site with more questions of the same context.
Comment: pardon for interrupting isn't Rutherford scattering hints that the atom(nucleus) is mostly(almost perfectly) empty? any idea how experiment unveils electron's uncertainty(probability cloud or whatever that mean)
Answer: There is no such empty space as such in an atom. The Rutherford model of particle nature is a historic model now. After Rutherford model De broglie's hypothesis came giving us the wave nature of quantic component and how it has both particle and wave nature eg. Photon. Later on Schrödingers wave equation gave us the concept of wave function and probability distribution , which leads the conclusion that electron distribution are much more like an wave where we can find the probablity of their existence in it and they are at random can have any place.the wavefunction representing the behavior of moving particles in specified position and times describe it though in other position it's less likely to have the particle and that's why magnitude of the wave function is small else where. But No its not free space at all. I think Google answered your question with respect to Rutherford model or they have talked about forbidden zone between two energy states.
And I think  quantum theory is not included in secondary school syllabus but in high school in (11th and 12th class) you should have the basics of quantum theory. And I can't deny if the evolution of physics from classical to quantum is to incorporate in students they have to start from the basics and history. I will recommend you to look at physics books by Halliday resnick. And if you want to start from high level go for "Quantum Physics" by Eisberg and Resnick. Though it's for under graduate students, you can understand it clearly as it covered the whole history also. And language is very lucid. But to understand it you should have idea of basic calculus.


Antiochus Epiphanes

Question: I have a question about Antiochus Epiphanes. We know that he is the figure from Daniel 11:29 and my question is, did he live before Cyrus gave a decree to rebuild Jerusalem and the Temple or after this? Thank you.
Comment: Cyrus the Great lived from about 600 BC to 530 BC.  (see https://en.wikipedia.org/wiki/Cyrus_the_Great ) Antiochus IV Epiphanes lived between 215 BC to 164 BC (see https://en.wikipedia.org/wiki/Antiochus_IV_Epiphanes )  A.E. was therefore about 500 years after Cyrus the Great.
Comment: I don't see the name/title 'Antioches Epiphanes' in the text you reference, Daniel 11:29, I think we need further clarity and detail to the question.
Comment: Not sure why folks are voting to close this. It's a clear question (+1). OP states an assumption, so answers should either proceed with that assumption (which is pretty unanimous in biblical scholarship so relatively uncontroversial outside of certain fundamentalist / Dispensationalist evangelical groups in Western countries), or the answer could challenge the assumption. In any event, trying to close a clear question seems the wrong approach.
Comment: There is much dispute that Dan 11:29 refers to A.E.  Some will agree but many will disagree.  I suggest you check some good histories for an account of the political nobody and governing incompetent.  Antiochus Epiphanes, on the other hand, was referred to sarcastically, by at least some of his contemporaries, as "Epimanes" - the madman.
Comment: If you want a rather detailed explanation of Antiochus and his place in the historical record, you may want to read some of the comments on the following thread.

"Has Daniel 11:20 onwards happened already or yet to happen?"
Comment: @lucy-red since this question leans more towards "historical context" but relatively less about biblical scripture, it might be better to transfer this question over to https://christianity.stackexchange.com
Answer: Antiochus IV is not mentioned in the Book of Daniel, although there is little doubt that he is the person referred to. The sources for him include the Books of Maccabees, Polybius and Josephus. He reigned from about reigned 175 B.C.E. – 163 B.C.E. Summary of his life:

Antiochus IV Epiphanes... was one of the Seleucid emperors, son of
Antiochus III the Great (224 – 187 B.C.E.) ruled the area known as
Asia' (Babylon, Syria, Palestine, Upper Asia) from 312, when Alexander
the Great's empire was divided among his generals. Antiochus IV's
religious zeal for Zeus, of whom he believed himself to be a
'manifestation,' resulted in the desecration of the Jewish Temple in
Jerusalem and in what was a reign of terror for Jews who refused to
comply with his policy of Hellenization. This resulted in revolt and
eventually in territorial loss, and in the loss of political prestige,
for his successors.

Cyrus lived c. 600–530 BC. Antiochus came long after this, during the time of the Maccabean Revolt.
Answer: The following historical detail of Antiochus Epiphanes, as provided by Uriah Smith, shows that he came after the time of Cyrus.
[I have bolded the most relevant portion, but provide the fuller commentary for context.]

"VERSE 9. And out of one of them came forth a little horn, which waxed
exceeding great, toward the south, and toward the east, and toward the
pleasant land. 10. And it waxed great, even to the host of heaven; and
it cast down some of the host and of the stars to the ground, and
stamped upon them. 11. Yea, he magnified himself even to the prince of
the host, and by him the daily sacrifice was taken away, and the place
of this sanctuary was cast down. 12. And an host was given him against
the daily sacrifice by reason of transgression, and it cast down the
truth to the ground; and it practiced and prospered." {1897 UrS, DAR
171.2}
A third power is here introduced into the prophecy. In the explanation
which the angel gave to Daniel of these symbols, this one is not
described in language so definite as that concerning Medo-Persia and
Grecia. Hence a flood of wild conjecture is at once let loose. Had not
the angel, in language which cannot be misunderstood, stated that
Medo-Persia and Grecia were denoted by the ram and the he-goat, it is
impossible to tell what applications men would have given us of those
symbols. Probably they would have applied them to anything and
everything but the right objects. Leave men a moment to their own
judgment in the interpretation of prophecy, and we immediately have
the most sublime exhibitions of human fancy. {1897 UrS, DAR 172.1}
There are two leading applications of the symbol now under
consideration, which are all that need be noticed in these brief
thoughts. The first is that the "little horn" here introduced denotes
the Syrian king, Antiochus Epiphanes; the second, that it denotes the
Roman power. It is an easy matter to test the claims of these two
positions. {1897 UrS, DAR 172.2}
I. Does it mean Antiochus? If so, this king must fulfil the
specifications of the prophecy. If he does not fulfil them, the
application cannot be made to him. The little horn came out of one of
the four horns of the goat. It was then a separate power, existing
independently of, and distinct from, any of the horns of the goat. Was
Antiochus such a power? {1897 UrS, DAR 172.3}

Who was Antiochus? From the time that Seleucus made himself king over the Syrian portion of Alexander's empire, thus constituting the
Syrian horn of the goat, until that country was conquered by the
Romans, twenty-six kings ruled in succession over that territory. The
eighth of these, in order, was Antiochus Epiphanes. Antiochus, then,
was simply one of the twenty-six kings who constituted the Syrian horn
of the goat. He was, for the time being, that horn. Hence he could not
be at the same time a separate and independent power, or another and
remarkable horn, as the little horn was. {1897 UrS, DAR 172.4}

If it were proper to apply the little horn to any one of these twenty-six Syrian kings, it should certainly be applied to the most
powerful and illustrious of them all; but Antiochus Epiphanes did not
by any means sustain this character. Although he took the name
Epiphanes, that is, The Illustrious, he was illustrious only in name;
for nothing, says Prideaux on the authority of Polybius, Livy, and
Diodorus Siculus, could be more alien to his true character; for, on
account of his vile and extravagant folly, some thinking him a fool
and others a madman, they changed his name of Epiphanes, "The
Illustrious," into Epimanes, "The Madman." {1897 UrS, DAR 174.1}

Antiochus the Great, the father of Epiphanes, being terribly defeated in a war with the Romans, was enabled to procure peace only
by the payment of a prodigious sum of money, and the surrender of a
portion of his territory; and, as a pledge that he would faithfully
adhere to the terms of the treaty, he was obliged go give hostages,
among whom was this very Epiphanes, his son, who was carried to Rome.
The Romans ever after maintained this ascendency. {1897 UrS, DAR
174.2}

The little horn waxed exceeding great; but this Antiochus did not wax exceeding great; on the contrary, he did not enlarge his dominion,
except by some temporary conquests in Egypt, which he immediately
relinquished when the Romans took the part of Ptolemy, and commanded
him to desist from his designs in that quarter. The rage of his
disappointed ambition he vented upon the unoffending Jews. {1897 UrS,
DAR 174.3}

The little horn, in comparison with the powers that preceded it, was exceeding great. Persia is simply called great, though it reigned
over a hundred and twenty-seven provinces. Est.1:1. Grecia, being more
extensive still, is called very great. Now the little horn, which
waxed exceeding great, must surpass them both. How absurd, then, to
apply this to Antiochus, who was obliged to abandon Egypt at the
dictation of the Romans, to whom he paid enormous sums of money as
tribute. The Religious Encyclopedia gives us this item of his history:
"Finding his resources exhausted, he resolved to go into Persia to
levy tribute, and collect large sums which he had agreed to pay the
Romans." It cannot take long for any one to decide the question which
was the greater power, - the one which evacuated Egypt, or the one
which commanded that evacuation; the one which exacted tribute, or the
one which was compelled to pay it. {1897 UrS, DAR 174.4}

The little horn was to stand up against the Prince of princes. The Prince of princes here means, beyond controversy, Jesus Christ.
Dan.9:25; Acts.3:15; Rev.1:5. But Antiochus died one hundred and
sixty-four years before our Lord was born. The prophecy cannot,
therefore, apply to him; for he does not fulfil the specifications in
one single particular. The question may then be asked how any one has
ever come to apply it to him. We answer, Romanists take that view to
avoid the application of the prophecy to themselves; and many
Protestants follow them, in order to oppose the doctrine that the
second advent of Christ is now at hand. {1897 UrS, DAR 175.1}

II. It has been an easy matter to show that the little horn does not
denote Antiochus. It will be just as easy to show that it does denote
Rome. {1897 UrS, DAR 175.2} . . .

[Quoted from Thoughts on Daniel and the Revelation (1897) by Uriah Smith.]

Antiochus Epiphanes


Stuck at loading screen after removing LightDM

Question: I removed unity and installed cinnamon on my Ubuntu 14.04  LTS, everything was working fine. I recently removed LightDM in favour to the lock screen of cinnamon using this method How to uninstall lightdm?
And now, it's stuck at loading screen (splash screen) showing Ubuntu logo and the animation so I can't access my desktop, terminal and text editor. PLEASE HELP! Thank you.
Comment: what happense when you run   ctrl + alt + f1 ?
Answer: 1- Run ctrl + alt + f2
2- Login with root or an admin.
3- sudo apt-get install lightdm
4- sudo apt-get update
5- sudo service lightdm start
6- sudo reboot


jquery random sort

Question: i'm currently working on a small jquery project. now i have one (maybe simple to solve) problem. following my code - i have shortened it and dropped a few lines (only array positions)
function setupblurb()
{
    var blurb = new Array();
    blurb[0] = "text1";
    blurb[1] = "text2";
    blurb[23] = "text24";
    return blurb;
}

function setupweblinks()
{
    var weblink = new Array();
    weblink[0] = "days/day1.html";
    weblink[1] = "days/day2.html";
    weblink[23] = "days/day24.html";
    return weblink;
}

function setuppositions()
{
    var positions = new Array();
    positions[0] = "1";
    positions[1] = "2";
    positions[23] = "24";
    return positions;
}

in another script i output the 'days'. it works well (sorted from 1-24) but now i want to know how i can randomly sort the output? i have the function 'setuppositions()' but when i change the positions there, e.g.:
positions[0] = "5";

it links the output to day1 instead of day5.
i am grateful for every help i get :) thank you!
Comment: It'd be easier if you had an array of objects rather than multiple arrays.
Answer: Perhaps you could define the Array variables in the global scope above the functions:
var blurb = new Array();
var weblink = new Array();
var positions = new Array();

function setupblurb()
{
...

See JSFiddle

jquery random sort


How to upload a file to a shared drive using unix?

Question: I have a requirement which says it should be able to upload and download a file from a Windows shared drive using UNIX.
How to approach that ? Should it be done using ftp or sftp ? Please explain.
Comment: You just need to mount windows shared drive in unix using samba, then just simply copy files using `cp` as local. take look at this link => https://wiki.samba.org/index.php/Mounting_samba_shares_from_a_unix_client
Answer: There is two requirements here:

take a file from a drive shared from a windows machine
upload a file (somewhere) using ftp/sftp

The first can be accomplised by using the Samba client for Unix, which allows you to mount a remote windows share on a Unix directory. Once that is done you can read the files (maybe also write, but that is not necessary).
For the second part you should go with sftp, as the "s" in there stands for secure. With the old ftp passwords can be sniffed. sftp is normally part of the ssh package. If possible you might want to look at using scp, the server that you are uploading to should support that as well. You should consider setting up passwordless login to the server using a public key (ssh-keygen and ssh-copy-id)
There is no need to setup a FTP server (or an SSH server) on the Unix machine that needs to do the uploading, isstalling Samba client and ssh (client) is enough.
Answer: FTP uses PORT 21
SFTP uses PORT - whichever your SSH Daemon is listening to.
To get data/send use "STOR".
This could be used for shared drives as well as with server.


C# GDI Invert Graphics flipped on the X axis

Question: I am drawing a series of Points using the Graphics class. I am reading from a Point array. For whatever reason the rendered image is upside down (flipped on the X axis). Is there a simple way to tell the Graphics class to draw "upside down" ? Many thanks.
Comment: "flipped on the X axis" and "upside down" both mean that the image is mirrored *on* the X axis (*along* the Y axis)
Comment: oops. removed my comment. don't know why I read it wrong.
Answer: It sounds not like it's drawing upside down, but like it's being given the coordinates upside down.
Check that you're expecting coordinates with the right origin.  0,0 should be by default top-left of your screen.
EDIT: You should be able to compensate by changing Y on each point as you draw it to use the formula Y = height - Y.
Answer: You should note that the default orientation or direction of graphics in most drawing systems is from top of display to the bottom of the display. To compensate for this, you need to know the intended height of your viewing area, and then subtract your coordinates from that height. This will reverse the orientation, and set your figures relative to the bottom of the viewing area.
Let's say you have two points specified as <x,y> and a viewport that is 300 (w) x 200 (h).
<code>{{0, 0}, {100, 200}}
</code>
When drawing in the viewing area, <x, y> will get mapped to <x, 200-y>. This gives us the following points.
<code>{{0, 200}, {100, 0}}
</code>
There are also mechanisms to switch the mapping mode to Cartesian style coordinates, which will probably match your source data, but is usually avoided because it will remap everything else that has already compensated for the default orientation.
The SetMapMode() function in Windows can be used for this purpose if this is what you really wish.
SetMapMode() @ MSDN
Here's the P/Invoke signature of the function. (from
pinvoke.net: setmapmode (gdi32) )
<code>[DllImport("gdi32.dll")]
static extern int SetMapMode(IntPtr hdc, int fnMapMode);
</code>
edit:
There's one more way to accomplish this, which I personally haven't tried.
Graphics.TransformPoints Method @ MSDN
This allows you to specify coordinate systems, and the Graphics object will do the mapping for you. In your case, you may wish to call it with CoordinateSpace.World or CoordinateSpace.Page as the first argument, and CoordinateSpace.Device as the second.
Comment: TransformPoints makes life simple. THANKS!


Merging resources tags

Question: 1) free-online-resources tag (has just one question) can be merged to online-resources.
2) resources tag and resource-request tag be merged or have their tag wiki better defined and differentiated?
3) what about potential tags which are used rarely like 'mooc'
Answer:
If a tag has just one question, and it is very similar to another tag that has many questions, I recommend just deleting the used-once tag. When searching, for example, one can always search for "[online-resources] free" to scratch that itch.
Looking at the questions, I think [resources] and [resource-request] can be merged.
If the concepts behind them are sufficiently unique and well-defined, I prefer to let them be as they are.
Comment: @WiccanKarnak updated my answer too.
Comment: @WiccanKarnak I have merged them now.
Comment: ok, what about _Also can resources and resource request be merged or have their tag wiki better defined and differentiated?_
Comment: Please check out update in the question.
Comment: Can I merge them in by any means? (referring to (2) )
Comment: I mean i only have 440 rep which is less than 1250
Comment: can you please add 'status-completed' to the above question?

Merging resources tags


System Gain vs ISO

Question: Does the "system gain" (i.e. electrons/ADU) change when one changes the ISO of a digital camera? To put this another way is there an analog amplifier between the sensor and the ADC whose gain is programmed to change when the ISO setting is changed?
Answer:
is there an analog amplifier between the sensor and the ADC whose gain is programmed to change when the ISO setting is changed

Quite often there is. It can be a multiplier after the ADC, too. Can be that gain does not change (Sigma/Foveon, some digital backs, some other cameras). Can be that it is not for all ISO settings, like "extended low ISO" on Nikons and Canons. Can be a combination of gain and multiplier (intermediate ISO settings on many Canons, Hi ISO on some cameras).
Answer: The exact recipe will be a closely guarded trade secret for manufacturers but certain things hold true.  Chipworks might give you some background that may help for specific cameras (or it might not).
The actual light captured and charge generated will always be the same at the sensor.  There are multiple points where the results can be adjusted.
CMOS sensors have an on-chip gain control / amplifier which makes adjustments during the readout (CCD's don't).
There can a separate amplification stage en-route to the ADC.  Necessary for CCD but some CMOS systems have been seen to do this too.
Finally a third layer of digital adjustment may be applied.
Comment: Noise and signal analysis allows to finв out what is happening. With digital multiplication, the histogram contains gaps. With analogue amplification stage raw data is the same for different ISO settings (given the ISO setting is used to compensate for less light), but Std.Dev. is different.
Comment: Not really, since in the real world what happens is going to be a blend of all the techniques there rather than any specific one.  Also what is used is likely to be specific to each sensor (if not each body).  So far as I'm aware none of the main applications include 14-bit histograms (even if you had a 16k pixel wide display to show it on) you probably would not see a gap and if there was then it would be easily buried by the s/n ratio anyway.
Comment: The blend it is, but the signatures of each method are clear and thus ingredients can be established. There is no need to display the full histogram - a segment that fits display is enough, or one can dump it to something like CSV. Gaps are clear, non-masked by noise, as digital manipulation is the last operation, obviously. I happen to be one of the authors of a program, one of the uses is precisely that - statistical and visual analysis of raw data.
Comment: Comments are not a place for discussion.  If you have evidence of what happens then you have an answer you can edit to include it, the fact that you didn't suggests that you are likely to be talking rubbish.
Comment: Sorry, but rubbish is your "you probably would not see a gap".

System Gain vs ISO


Drawing tool with Overlay

Question: I combined two plots using Overlay. In the output plot I want to add few modifications. Usually I right click on the plot (for Plot or ListPlot) and use the drawing tool option. But there is no such option for the output of the Overlay. Is there any alternative to drawing tool to modify (like adding text or arrow) a plot created by Overlay.
Comment: You can `Rasterize` it first.
Comment: In case you're not aware, there is also `Show`.
Comment: @amr: It seems that the `drawing tool` does not work with `show` too! :(
Answer: There is a three-argument form of Overlay that allows you to specify one of the layers as the target for interactions. So if you only want to modify the contents of the last layer in the list of overlays, you can specify that layer as follows:
Overlay[{Plot[1, {x, -1, 1}],
  Graphics[{Blue, Circle[]}]}, Automatic, 2]

This draws a blue circle as an overlay, and lets you subsequently move that circle around with the drawing tools. Here, the argument 2 refers to the second layer with the circle. If you replace it by 1 you'll be able to modify the Plot instead. Unfortunately you can't get both to be interactive at the same time.
Comment: You can make the third argument of Overlay dynamical, for example `Overlay[...Dynamic[x]]`, and by setting x=1 or x=2 edit the layer of your choice.
Comment: If you really want the output to be `Graphics` with all of its parts modifiable, I'd suggest using `Inset` instead of `Overlay`.
Comment: @andre Thanks, that does make it more flexible.
Answer: This is a very rudimentary approach for an editing application. I'll reuse the Plot from Jens here...
Basically it shows you how to select a specific layer in your Overlay graphical object through a specific event (Right-Mouseclick for instance). You can handle this specific event to flip through the Overlay layers. From there you could do your specific manipulations with the drawing tools.
DynamicModule[{x = 1},
    EventHandler[
       Overlay[{Plot[1, {x, -1, 1}], Graphics[{Blue, Circle[]}]}, Automatic,
       Dynamic[x]], {{"KeyDown", "x"} :> (x = x /. {1 -> 2, 2 -> 1})}]]

I've chosen here KeyDown as my event, since mouse clicks (like right mouse clicks) are already heavily overloaded and this is getting a nightmare to proper pass the events to the built-in event handlers.
The plot:

Pressing "x":

Pressing "x" again:

Drawing tool with Overlay


More chapters requested. Is this a good sign?

Question: I sent out the first four chapters to about six different publishers. Within three days I received a no from one. On the ninth day, I got a request for additional chapters from another publisher. Is that a good sign? They didn't ask from the entire manuscript which concerned me but the first chapters had to spark an interest if they asked for more right? I'm so nervous!
Comment: The ambiguity of the question aside, of course it is a good sign. Send them more chapters.
Comment: The answer is yes, but depending on your genre it can pay to approach agents instead of publishers. I'm guessing your writing is in non-fiction, where that's often not necessary.
Answer: I'd consider it a good sign.
After one publisher said, "no," someone else apparently found your work more interesting. So they answered "maybe," instead of "no," and asked for more chapters to help make a decision.
Comment: Note that the publisher that requested additional chapters was not the same publisher that responded with a rejection. OP has clarified this in the question; you may want to revise or even delete your answer in response.
Comment: @MichaelKjörling: OK, fixed. Thanks for your help.


Coinvariants of tensor products of Hopf algebras

Question: Let $G$ be a Hopf algebra, considered as a right $G$-comodule in the obvious way.
The axioms of Hopf algebras imply that
$$
G^{\operatorname{coinv}(G)} == \{g \in G : \Delta(g) = g \otimes 1\} = \mathbb{C}1.
$$
Consider now that tensor product of comodules with $k$-factors
$$
G\otimes \dotsb \otimes G.
$$
Is there an explicit description of
$$
(G\otimes \dotsb \otimes G)^{\operatorname{coinv}(G)}?
$$
Answer: If $H$ is Hopf, then $H\otimes H$ with diagonal action is free, of the same dimension of $H$. The map is very explicit, you can surely can find it in any book of Hopf algebras (e.g. S. Montgomery). There is also the version for coaction. The statement is that it is isomorphic to  $H\otimes V$ where V is a vector space, the $H$ coaction comes only from the left factor, and V=H as vector space. You can iterate fue procedure (or the explicit map) and get a formula for the coinvariants
Answer: Let $\Bbbk$ be a field and $H=\Bbbk G$ its group algebra. Then the regular coaction makes $H$ a right comodule over itself and we use the monoidal structure of right comodules to view $H^{\otimes n}$ as a right $H$-comodule.
Using the fact that $\{g\otimes h\otimes k\;|\;g,h,l\in G\}$ is a basis for $H^{\otimes 3}$ one can proof that
$$(H\otimes H)^{coinv}=\Bbbk^{\oplus |G|}.$$
A basis for the vector space $(H\otimes H)^{coinv}$ is given by the elements $g\otimes g^{-1}$, for $g\in G$.
More generally,
$$(H^{\otimes n})^{coinv}=Span_\Bbbk(\{g_1\otimes \ldots \otimes g_n \;|\; g_1\cdot\ldots\cdot g_n=1\}).$$
 The dimension of this vector space is
$$\dim (H^{\otimes n})^{coinv}=|G|^{n-1}.$$
Answer: According to my understanding, you regard $G$ as a comodule on itself. So what you write is also Ok. Now I offer a way to construct a coinvariants on tensor product of comodules with k-factors. Without loss of generality, we can assume that $k=2$. Firstly, we should define a comodule structure on $G\otimes G$. This was done by in  Susan Montgomery's book ``Hopf algebras and their actions on rings'' on page 14 (Definition 1.8.2). I posted it here.
$$\Delta_{G\otimes G}:=(id \otimes m)(id \otimes \tau \otimes id)(\Delta \otimes \Delta),$$
where $m$ is the multiplication, $\tau$ is the switch map. So we can define
$$(G\otimes G)^{coinv G}
:=\{g_1 \otimes g_2\in G\otimes G\mid \Delta_{G\otimes G} (g_1\otimes g_2):=g_1\otimes g_2 \otimes 1 \}.$$
Comment: Yes, this is comodule structure on $G \otimes G$ that I am asking about. But I am looking for an explicit description.


Kernel Panic, can't boot into Linux after re-installing grub… is this because of a kernel mismatch?

Question: tldr I dual boot Mint 20 and Windows 10. EFI boot partition got corrupted so reformatted and re-installed Windows bootloader and grub. Windows works fine, grub menu displays, but can't boot into Mint and get a kernal panic error. I updated Mint last month but now re-installed grub from a USB with an older version of Mint, not sure if that's linked to the problem.

I have a dual boot with Mint 20 installed alongside Windows 10
I boot in UEFI mode and have a separate boot partition. This was corrupted somehow recently, I think because I had to hard-restart a few times in succession so Windows may have tried to do some recovery stuff which messed up the partition or something. As a result, I had to reformat the boot partition, re-install the Windows EFI boot loader and then re-install grub on that EFI boot partition using the method outlined here: https://linuxsuperuser.com/reinstall-grub2-efi-bootloader-ubuntu/
Note I also updated the UUID of the EFI partition in fstab after following those steps.
The grub menu successfully appears and I can get into Windows fine, but I can't get into Mint.
When I try to get into Mint, my Toshiba boot logo is displayed but nothing happens even after leaving it for 20 minutes.
When I choose to enter recovery mode from the grub menu it gives me a "kernel panic" error. Here is a photo I took of the errors that come up: https://i.stack.imgur.com/4Vfe6.jpg
I searched for this error and found a similar question: https://askubuntu.com/questions/71332/kernel-panics-with-cannot-open-root-device-error-where-do-i-append-the-root
The answer talks about many different things which to me seem like they should be irrelevant in my case since everything was working until I re-installed grub. What stood out to me in the answer though was this part:

"Check if the kernel that is being boot by the boot loader is the
correct kernel. I have seen people who, after building a first kernel
(which doesn't boot), forget that they have to mount /boot before the
overwrite the kernel with a new one. As a result, they copy the kernel
to the root file system (/) whereas the boot loader still expects the
kernel image to be on the /boot partition."

I updated Mint about a month ago, but I installed grub from the original installation USB I used. So is it possible that grub is looking for the previous kernel when it should be look for the new one? I'm not sure what kernel my Linux installation was using, I'm quite new to Linux so I'm not sure how to find out.
If so, how do I remedy this?
Note fsck /dev/sda3 is fine. I tried the boot-repair GUI utility but when I click "recommended repair" nothing happens even if I wait 20 minutes. Pressing "quit" is unresponsive as well.
Answer: Fixed this by re-creating the initrd.img file in /boot.
For some reason the version of this file was different to the kernel version and I recreated it so they matched.
Comment: Would you elaborate how you re-create that? Also mention the different kernel version if possible.


Has select always included the label on drop down lists?

Question: Maybe I am just noticing things now but has select always included the label on drop down lists? I thought it used to say -none- when none was selected.
Example from dmaster demo
Answer: Yes that was one of the many changes in 5.31 related to screen readers and buttons and such. https://github.com/civicrm/civicrm-core/pull/17675
It also inadvertently made all my contacts appear to be from Afghanistan.
Comment: It makes our forms look ugly. Are screen readers not able to read the labels beside the multiselect? At the very least, it could make Select with an uppercase S.
Comment: The PR above mentions that there are some longer term goals with Select2 which might make it unnecessary. And it mentions it might be awkward but is less awkward than the screen reader saying "None press button". You can open an issue or PR about the uppercase.


If two objects are too close to each other, would an object detector do a poor job of correctly classifying them?

Question: Suppose we have an object detector that is trained to detect $20$ products. If two objects are too close to each other, in general, would an object detector do a poor job of correctly classifying them? If they were far apart in the scene, would the object detector to a better job of correctly classifying them?
Answer: As you ask, "in general...", I will answer generally, however this changes a lot from model to model and the way they handle close objects.
In general, yes, they would do a poor job detecting very close objects, switch to segmentation models for that (for class or better, instance segmentation).
In general, objects detectors learn to tell an object from other based in 2 criterion:

Intersection over union: for object of the same class
Class probability: for objects of different class

So, if two objects of the same class are very close, the 2 detected bounding boxes will be highly overlapping, then, the Non Maximal Suppression filter will remove one of them. This is where objects detector, in general, perform worse.
Similarly, if two objects belong to different classes the 2 detected bounding boxes will be highly overlapping but the NMS filter won't remove them (again, in general, NMS is set only for same class objects). However when 2 objects are very close, there is a high chance they are partially occluded. Objects detectors, in general, don't handle occlusions very well.
So, in conclusion, objects detectors will perform better detecting far-away objects.


Looking for node revision author token

Question: According to http://drupal.org/node/252241 a revision author token may be available. However I do not see anything referencing revision:author (variation?) in my list of available tokens. Is there something like this?
Comment: Drupal 6 or 7 ?
Comment: Its for Drupal 7
Answer: For D7, in order to gain access to revision:author tokens, you have to install Revisioning module. (of course you also need token module)
Then you can see all the available tokens by going to Help -> Token (/admin/help/token)
So after enabling the module, a new token category, named "Revisions", is available. You can see for example
[revision:revision-author] which refers to "The author (or editor) of the revision" and a bunch of others regarding the revision author.
P.S. As per this there seems to be currently a bug regarding [revision:revision-author:mail]
Good luck and let me know if you need more help!
Answer: This one is for D6 but probably give you a hint: http://api.drupalhelp.net/api/revisioning/revisioning_tokens.inc/6.4
Answer: Have you tried Custom Tokens module ?

It gives the user the ability to create custom tokens for specific
  replacements that can improve other modules relying on the Drupal 7
  token API or, for Drupal 6, the Token module.
Versions 7.x-1.x and previours relied on PHP evaluation to build
  custom tokens.

The idea is to define your own tokens and use them. Also it works with PHP Filter Module.
Install module goto admin/structure/token-custom/add to add a new token. Since you want to get the author from node submission select Token type node
Answer: When I use tokens together with Rules action "After updating existing content" this token gives me the author of the updated node (i.e. the author of the latest revision): [site:current-user]. (To get an author of the first revision, you can use [node:author].)

Looking for node revision author token


Themes conflicts and overrides my WordPress Support widget Plugin styles

Question: The front end of the widget plugin has the widget launcher and once opened, it shows the actual widget with its elements. it has lots of styling issues which are 100% from whichever theme is currently active on the site. most of the styles get influenced and this is overridden by whichever theme is running and thus add its own styles to my widget. how can I make the widget 100% independent and only show its own styles without any interference from themes?
Comment: What widget plugin are you referring to?
Comment: my own. it's a help and support widget that shows help articles and also comes with a form.
Answer: You should always prefix everything when creating your own plugin. Also try to avoid generic classes like .col and .container. If you don't, that's a recipe for disaster.
So use .yourpluginprefix_container instead of just .container.


Deploying WAR files on a shared host?

Question: How would I go about deploying a WAR file on a shared host? Everything I read about deploying them says I put them in webapps inside the Tomcat root directory. Then go to localhost:8000. My hosting account is a shared account where I can get to my site by theIP/~MyUsername/. I don't have access to anything above the /home/MyUsername directory. Tomcat is running, and I can upload JSP files and view them. Do I just have to manually unpack the WAR file and upload the contents?
If I could get root access, how would I deploy a WAR file? If I put the file in the webapps directory, would it unpack into the MyUsername directory?
Answer: Unzip the WAR files into the same location as you put the jsp files; it should just work.

Deploying WAR files on a shared host?


What mixture of liquid soap to water should I use for soil with high silicon content?

Question: I want to use my Miracle-Gro spray attachment for spraying a soap solution on my lawn and plants since I have very high silicon in my soil.  we used Naiad wetting agents on the golf course where I used to work, but that is on a much grander scale. Any ideas for a good mixture?
Comment: Why do you want to spray soap on your lawn?  What insect or pest problem is driving this?  If not insect control then what does the silicone do?  Pictures would help too....
Comment: high silicone content doesn't allow the soil to soak up water, i.e. the water will have a tendency to bead up on the surface.  i know i can use liquaid soap, or naiad to rectify this problem, but i've never tried it using a residential spray applicator
Answer: There are a few solutions to your soil problem:

top dressing twice a year with compost or similar with high amount of organic matter combined with watering slowly and deeply so the soil does not dry out.  This takes time to take effect, possibly several years
surfactants are available for homeowners, usually at your local feed/agro products store.  Companies like Aquatrol have a number of products for golf courses and similar.
dish soap at 5ml/litre can be applied. Do not use anti bacterial soap. Apply then water in to move it down into the soil. Do not repeat until you have seen the effect. This is only a short term solution. Apply once a month during the growing season.


I can't see any wireless setting in loki 0.4. Please help!

Question:
There isn't any wifi setting, and i am a noob, dont know how to fix it.
Answer: Now, it will be good to provide some troubleshooting info so we are able to help.
To me it sounds that Loki is trying to load incorrect driver for your wifi hence the issue.
You need to discover the manufacturer of your wifi card, and discover what driver Loki is trying to load. For example if you have Intel wireless card and Loki is trying to load Acer drivers will result in wifi card blockage.
Here you go few commands to help us troubleshoot. Please provide output of this commands and/if by issuing this commands your wifi started working. We should be able to take from there if further assistance is necessary:
iwconfig - to find your wifi interface name (e.g wlan0)
rfkill list all - to see whether your interface is blocked, hardware block or software block (here you may see different wireless vendor instead of the actual one which indicates and issue)
ifconfig wlan0 up - trying to bring the interface up
lspci - find the hardware manufacturer
lshw -C network - find the manufacturer of your wifi card
nmcli radio wifi on  - try to bring the interface up
killall NetworkManager && NetworkManager - kill existing network manager process
/etc/init.d/network-manager reload - reload service
/etc/init.d/networking restart - reload tcp/ip stack
Comment: Thx for this! The *nmcli radio wifi on* worked for me, after i searched around on many webpages. Stupid thing is, the Wifi-USB-dongle was recognized...the kernel module was loaded...but **switchboard-plug-networking** gives me "Wifi is disabled" but the switch on the top right was on. Strange thing...now working :D
Answer: You may not have the the necessary Wifi drivers. You need to:

Find the wifi adapter your pc/laptop is having.
Find if its driver is available (just search with adapter_name + ubuntu + driver on google)
You will likely get good tutorials to install the driver.

We you can provide specifics, I can update the answer accordingly.
Answer: Just connect your pc with terhering cable with mobile ( must internet connection) open app store then uinstall updated kernal version the restart your pc done.


"My Apps" in App Market only showing SOME past downloads after a reformat?

Question: I used to be able to go to "My Apps" and view all my past apps.  Now that I've done a reformat, though, I only see a SMALL subset of the apps I've downloaded before.  I thought it was supposed to show all my past downloads?
Answer: Its been my experience that only paid apps remain in your my apps list after data is erased from your phone. I believe that the list of downloaded free apps is stores in the phones memory so its lost when you wipe it. This is the benefit of services like appbrain.
Edit: As thunsaker points out, if you use Google's Android Backup Service and you have a 2.2 or later device it will save the list of your downloaded app (among other things) and restore that to the Market after a restore.
Comment: Also of note, if you opted to have google backup your settings/preferences when you first setup the phone (Android 2.2+) your bookmarks, wallpaper, wireless settings and applications are saved. Once you log into the clean device your applications should start downloading automatically from the market, free or paid.
Comment: This has only happened to me once so I wasn't entirely sure if and how it normally worked, but that is good to know.
Comment: Google's backup has never worked for me.  Le sigh.
Comment: I haven't made any conscious attempt to diagnose when it works and when it doesn't but I think it only worked for me one time when I factory reset an unrooted device running a stock ROM.  I wonder if it's rooting/custom roms that break this? If that's the case it's not that important because if you are rooted then you can use Titanium instead.
Comment: I have had it work both after a wipe, and again after installing CyanogenMod7 on my G2. In fact, CyanogenMod7 asks if you want to start the app download/restore process right after the initial setup or to initiate it at a later time.
Answer: It will only show apps you've purchased from the Market (at least, that's the experience I've had) besides the ones currently installed on your device.  I recommend Titanium Backup (requires root) for backing up all your apps.
Answer: Is this the first time that you've opened the Market since your reformat?
My experience both with moving from an old phone to a new one and after a factory reset, was that once I'd added my primary account onto the phone, the first time that I opened Market and went straight to My Apps, I saw every app that I had on my previous device both paid, and free in the list (the free ones showed in the list as "Free" rather than the normal "Installed").
If I then came out of Market, the next time that I opened Market it just showed me my paid apps plus the apps that had actually been installed on this phone since the wipe, it had now 'forgotten' my previously installed apps and I've lost the chance to easily find and reinstall them.


midpoint between two normal distributions for the Rao-Fisher metric

Question: Given two multivariate gaussian distributions $G_0 \sim N(\mu_0,\Omega_0)$ and $G_1 \sim N(\mu_1,\Omega_1)$, is there a closed-form formula for the gaussian distribution equidistant from them that is located on the geodesic for the Rao-Fisher metric? If not, are there other metrics with a statistical meaning where it is available?
Answer: Yes, there is, because the the Fisher-Rao metric on the space of multivariate Gaussian distributions is isometric to a metric on the symmetric space $SL(n+1)/SO(n+1)$ which is a close relative to its metric as a symmetric space of non-compact type. See the following paper. You have to adapt the symmetric space formulas for geodesics to this slightly different metric.

MR1790612   Lovrić, Miroslav; Min-Oo, Maung; Ruh, Ernst A.: Multivariate normal distributions parametrized as a Riemannian symmetric space. J. Multivariate Anal. 74 (2000), no. 1, 36–48.

It is also known that the Fisher Rao metric on the space of all densities ($L^2$ or smooth) is isometric to a an open subset of sphere in a pre-Hilbert space. See (here).
Comment: The Fisher metric for multivariate Gaussian distributions is not symmetric, and doesn't have a closed form midpoint formula. For details, see the paper "A Riemannian Geometry of the Multivariate Normal Model" by Skovgaard. The model introduced in your reference is not the Fisher metric, but a slightly different metric where you can calculate the midpoint.
Answer: There is no closed-form formula. We can compute the Euler-Poincaré equation and with symmetries we can reduce this equation to Euler-Poincaré equation. We can then use "geodesic shooting" to compute the distance between the 2 multivariate gaussian distributions. See the following reference:
[A] M. Pilté and F. Barbaresco, "Tracking quality monitoring based on information geometry and geodesic shooting," 2016 17th International Radar Symposium (IRS), Krakow, 2016, pp. 1-6.
available on IEEExplore:
http://ieeexplore.ieee.org/document/7497346/
To understand the geometric meaning of the Euler-Poincaré equation of this geodesic could be understand by use of "moment map" from Jean-Marie Souriau that is an element of Lie algebra (when you have symmetries, the moment map is invariant; its components are the Emmy Noether invariant; but Souriau Moment map has a geometric meaning).
You can read more details on this geometric approach in 2 papers:
[B] Barbaresco, F. Geometric Theory of Heat from Souriau Lie Groups Thermodynamics and Koszul Hessian Geometry: Applications in Information Geometry for Exponential Families. Entropy 2016, 18, 386.
http://www.mdpi.com/1099-4300/18/11/386
All these tools will be debated in GSI'17 conference and CIRM TGSI'17 seminar.
F. Barbaresco
GSI'17 Co-chairman


The Triangular Cannonball Problem

Question: How many ways are there to stack an equilateral triangle of cannonballs into a tetrahedron of cannonballs? In other words, how many positive integers are both triangular and tetrahedral?
Answer: The $n$th triangular number is $\frac{n(n+1)}{2}=\binom{n+1}{2}$.
The $n$th tetrahedral number is $\frac{n(n+1)(n+2)}{3}=\binom{n+2}{3}$.
Only the following numbers are both tetrahedral and triangular, i.e. there are only four possible pairs $(n,m)$ of positive integers with $\binom{n+1}{2}=\binom{m+1}{3}$:

$1=\binom{1+1}{2}=\binom{1+2}{3}$ (this is the $1$st triangular number and $1$st tetrahedral number, a trivial case)
$10=\binom{4+1}{2}=\binom{3+2}{3}$ (this is the $4$th triangular number and $3$rd tetrahedral number)
$120=\binom{15+1}{2}=\binom{8+2}{3}$ (this is the $15$th triangular number and $8$th tetrahedral number)
$1540=\binom{55+1}{2}=\binom{20+2}{3}$ (this is the $55$th triangular number and $20$th tetrahedral number)
$7140=\binom{119+1}{2}=\binom{34+2}{3}$ (this is the $119$th triangular number and $34$th tetrahedral number)
Comment: Do we need to add the short reasoning from that OEIS link? It's pretty short to include: `For numbers to be triangular and tetrahedral, we look for solutions r*(r+1)*(r+2)/6 = t*(t+1)/2 = a(n). The corresponding r and t are r = A224421(n-1) and t = A102349(n).
Writing m=r+1 and s=2t+1, this problem is equivalent to solving the Diophantine equation 3 + 4*(m^3 - m) = 3*s^2. The integer solutions for this equation are m = 0, 1, 2, 4, 9, 21, 35 and the corresponding values of s are 1, 1, 3, 9, 31, 111, 239. (End)`
Comment: @justhalf I thought about it, but the proof isn't complete as it doesn't show why those are the only integer solutions for that Diophantine equation.
Comment: Well, fair point, I thought it's at least closer to a proof than simply stating it. But fine both ways :D

The Triangular Cannonball Problem


MI Max 2 soft-bricked

Question: Okay here is what happened Yesterday I restrated my phone beacuse the volume and power keys were acting funny but instead of booting into the system in boots into TWRP btw just in case I installed a custom rom before i restarted this okay back to the problem today I gave up trying to flash new custom roms since It keeps booting into TWRP so i decided to go with the stock rom I flashed with Miflash hoping it would fix but now TWRP is gone can't turn off my phone,can't boot into fastboot or bootloader,all I can is Mi-Recovery 3.0 also just to add my volume up key wont work that's the reason for why i think there is damage on my volume up key.
From the Main Menu of Mi-Recovery 3.0 all i could do is reboot to system which just makes it boot bact to recovery and wipe data which also did'nt work, Connect with MIAssistant is also useless since the app cant detect it. Thats all.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/94776/discussion-on-question-by-need-help-mi-max-2-soft-bricked).
Answer: Your phone boots into recovery because of a short circuit in the Volume Button.

From TWRP Recovery, get a backup of boot partition and
copy the boot.emmc.win file to PC via MTP-USB
tap "Reboot" and "Bootloader" to enter fastboot mode
boot your phone from fastboot with
fastboot boot "C:\Users\<profil>\Desktop\boot.emmc.win"

you must repeat the last step each time you want to boot into system

MI Max 2 soft-bricked


Email notification about comments

Question: Somebody asks question, I reply, they post comment on my reply. I don't get notification about their comment. Is that normal or is it bug?
Answer: SO doesn't send email notifications for comments, period.  You will have the notification icon (next to your name in the banner) light up if they comment on your question/answer or respond to a comment you made using your name in the "Twitter-style", @Rubycut.
Answer: As for E-Mail notification: That doesn't exist on SO (except for the negligeable daily thingie).
As for notifications not even turning up in the envelope: Sadly, that's by design. If it's not your question or answer the comment is made in, it will take a <code>@Rubycut</code> for the message to reach you.
Related question

Email notification about comments