Roll back to clean debian

Question: I have a remote server, which is like a "sandbox", where I'm testing all new software before installing them on production servers. I wanted to clean up a little bit this system, but accidentally deleted all /var contents. How can I recover it, or roll back to clean debian, if I can not reinstall system, because I have only ssh connection and no physical access?
Answer: Grab the debootstrap package. Debootstrap can install a starter Debian in a directory somewhere, and you can reconstruct some of /var based on that.
You won't be able to install the package normally, of course. Download it and unpack it manually.
dpkg-deb -x debootstrap_*.deb /
mkdir /chroot
debootstrap squeeze /chroot

Now recreate at least the directory structure and permissions, or just copy /chroot/var wholesale.
Of course you won't recover your data, but you should get a limping system. In particular, you won't be able to use the package management tools unless you repair the package database, and that's a lot of work. I advise reinstalling as soon as you can get physical access.
Answer: What I would do is as follows:
Get a Linux distribution which can run entirely in RAM. In this case, let's assume you will use PLD Rescue Linux (available here: http://rescuecd.pld-linux.org). Make sure to use right CPU architecture (x86 or x86_64).
Mount the iso somewhere (e.g. /mnt) and copy the kernel and initrd to your /boot:
cp /mnt/boot/isolinux/vmlinuz /boot/vmlinuz-rescue (vmlinuz6 for x86_64)
cp /mnt/rescue.cpi /boot/rescue.cpi (rescue6.cpi for x86_64)

Configure your bootloader to boot the rescue system instead of your Debian. Kernel command line should be:
initrd=/boot/rescue.cpi root=/dev/ram0

Remember to make it default, you won't be able to select it since you don't have physical access or KVM.
Now reboot your system. Wait some time till ping comes back and ssh into your box as root. The password is: pld
Now the fun begins. Format all of your system partitions - everything that was previously mounted on /, /var/, /boot etc. You can of course leave /home alone. For example if your system consists of a single filesystem on /dev/sda1, then run:
mkfs.ext4 /dev/sda1

Mount everything under /mnt. Create appropriate mountpoints if necessary.
Now you will bootstrap a basic Debian system:
debootstrap squeeze /mnt

This will install Debian Squeeze into /mnt. Wait for everything to finish (it will take a while). Mount-bind virtual filesystems:
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev

And chroot into your new environemnt:
chroot /mnt /bin/bash

Once in chroot install the Linux kernel and appropriate bootloader:
apt-get update
apt-get install linux-image-2.6-i686 (or linux-image-2.6-amd64)
apt-get install grub-pc

You will also need SSH meta-package:
apt-get install ssh

Now edit /etc/fstab, /etc/hostname and /etc/hosts to suit your needs. Remember to create /etc/network/interfaces with appropriate network configuration. Double check it for mistakes. You will need networking since you can only SSH into the box.
Setup a password for root:
passwd

Install your bootloader to the MBR of your harddrive. If you installed GRUB2 as in my example then run:
update-grub
grub-install /dev/sda

Leave chroot by typing "exit" and unmount everything under /mnt. Reboot and pray to the God of Ping. ;-)
WARNING:
Reinstalling OS while having only SSH access is always dangerous since you don't have any means to debug broken system without functional networking. First practice in a virtual machine on your PC and then apply those instructions to your server.
Answer: If your server is hosted with a hosting company, they may provide some way of remotely reinstalling the operating system or booting off a rescue disk? Perhaps it might be worth checking with them if this is possible? (You haven't specified if the server is hosted with a company or if it is simply just a remote box somewhere out of reach?)
The company which I host my dedicated server with provides both a web interface and desktop application with which you can manage certain aspects of the server and hosting account. This includes control over the boot source for the machine, so I can boot off one of a selection of rescue disks etc, as well as wiping and reinstalling with a new operating system (as in, using the same method they use to provision the server with a specific OS when you first order the server).
Comment: It's hosted in the company where I work, but I don't visit the office every day.

Roll back to clean debian


add constraints to the problem

Question: Take a single source capacitated FLP (facility location problem). As we know the linear formulation to this problem is:
\begin{align}
    &      && \text{min} \; \sum_{j \in J} a_{ij} \; t_{ij} && \\
    & s.t. && \sum_{j \in J} \; a_{ij} = 1     &&  \forall i\in I \\
    &      && a_{ij} \in \{0,1\} &&  \\
\end{align}
Where $a_{ij}$ is equal to 1 if client $i$ is served by center $j$ and 0 otherwise. $t_{ij}$ is the travel cost from center $j$ to client $i$.
Is the first constraint correct?
P.S. I am new to this subject and hence my struggle to solve this problem.
Comment: Could you give your question a more descriptive title? That way, others that find your post can also benefit from the answers to your question.
Answer: Here's a way to formulate a more generic constraint that you can then apply to your situation.  Suppose you have constant $b$ and binary variables $y_r$ and $z$ and want to enforce
$$\sum_{r\in R} y_r \ge b \implies z=1$$
The contrapositive is
$$z = 0 \implies \sum_{r\in R} y_r \le b - 1$$
You can enforce this via an indicator constraint or by using the following big-M constraint
$$\sum_{r\in R} y_r -(b - 1) \le M z$$
Here, $M$ should be a small constant upper bound on the LHS when $z=1$, and a good choice is $M=|R|-b+1$.
Comment: Thank you for your response. I can't quite get the relation between your response and my problem. Here what is $R$ representing? If I am write, with this response, I could have $M$ as negative number!
Comment: For example for a subset like $\{0, 3, 4, 8 ,10\}$ and penalty of 25, I have a $M = 5 - 25 +1 = -19$ which is a negative number. For this set I am gonna have $x_0 + x_3 + x_4 + x_8 + x_{10} - 19 z \leq 24$. Am I right?
Comment: No, $b=2$ for your situation.  The penalty of $25$ will appear as an objective coefficient, not in the constraint.
Comment: How did you come up with $b=2$?
Comment: The value $b=2$ corresponds to the "if at least two sites" in your problem description.
Answer: @RobPratt's answer is obviously the correct answer to this question and is also more general than this one, however, I think this answer can supplement it as it is specific to the OP's case and it also gives a simple thought process to arrive at the result.
The way I think about it is, that you would like to have less than two facilities open from each set $S_k$. Less than two, when counting, means less than or equal to 1. Thus what we ideally would like, in order to avoid the penalties, is that the following set of constraints are satisfied
\begin{equation}
  \sum_{j\in S_k}x_j\leq 1,\quad \forall k=1,\dots,K
\end{equation}
However, we cannot be sure, that it isn't better to pay some penalties in order to get a better facility constellation, so we introduce a new binary variable for each set $S_k$, here called $z_k$. This binary variable $z_k$ equals 1 if we choose two or more facilities from set $S_k$. The implication
\begin{equation}
  \sum_{j\in S_k}x_j\geq 2 \Rightarrow z_k=1, \quad\forall k=1,\dots,K
\end{equation}
can be modelled using a "big-$M$" constraint as
\begin{equation}
  \sum_{j\in S_k}x_j\leq 1+ M_kz_k,\quad \forall k=1,\dots,K
\end{equation}
Here you allow the left hand side to become strictly larger than 1 at the price of setting $z_k=1$. The value of $M_k$ should be set large enough not to interfere with the logic of the problem, but as small as possible: The maximal value of $\sum_{j\in S_k}x_j$ is $\vert S_k\vert$ implying that $M_k$ should be the solution to $\vert S_k\vert = 1 + M_k$, which obviously is (as @RobPratt's answer states) $M_k= \vert S_k\vert-1$. The last thing to do is to add the term
\begin{equation}
\sum_{k=1}^Kp_kz_k
\end{equation}
to the objective function.

add constraints to the problem


cut out a piece of the terrain

Question: See image. I'm trying to cut out a small piece of the terrain to use for particle system (scatter trees, grass etc). I used the knife tool to draw the area (orange line). How can I then delete the rest of the terrain and just keep the portion within the orange line? (In Max I just use the shapemerge modifier, not sure what to do here in blender).
Comment: keep this edge loop selected, press V to rip, then put your mouse over the part you want to select, press L. But you're talking about creating a particle system, are you sure you don't want to create a vertex group?
Comment: @moonboots: thanks for the tip! Vertex group is the way to go.
Answer: Create a desired shape from 2D curves, below is an example, and close it enabling cyclic option. Model the plane to shape, convert to mesh and knife project it onto the terrain. Then invert the selection and delete it. Or, having knife projected, separate the selection and delete or keep the portion that's left. NB: to knife project correctly you need to be in ortho view.
Answer: For selecting mesh inside the loop:

Using Knife tool create you loop as you want. You also can slect one vertex an pressing Ctrl select other, and blender will select shortest way between them. After selecting one way, you can continue selecting with Crtl + Shift.
In Edit mode, at the top click Select > Select Loops > Select Lopp Inner-Region

For separate selected, click on the top Mesh > Separate (P) > Selection. This will separate your selected mesh in new object.

As already written by "moonboots" user, if you want use this for particle system, you just can use Weight Painting, and selecting not required. Also you can paint white-black texture and use this as mask for transparent material, but you need particle system, so on transparent regions still will be particles. But, using this with Weight Paint, you can paint weights for particles and mask for transparent material, so it will be non-destructive.
Comment: OK, but this allows only **angular** selection and won't work when a more curved and natural looking shape is desired.
Comment: @Lukasz-40sth I dont understand what you mean, I tried to sculpt mesh in different forms and my method still works. I understand that knife tool works in projection, but selecting can be done with Shift + Ctrl, for selecting the shortest way, and on very different forms itis  will be working
Comment: hope you understand it now that I added the image.
Comment: Thanks for the tip on weight paint!

cut out a piece of the terrain


Where are TRNGs an absolute need?

Question:
Are there situations currently where a PRNG just will not do? Are there current situations where only a TRNG will be useful?
What about if someone uses a cryptographically secure PRNG?
What is the biggest use case (in terms of magnitude) for a TRNG that a PRNG can't solve.
Comment: I'm sure an OTP will be the main reason for TRNG's. I'd rather use a well seeded PRNG though, but that is not likely to be perfectly secure if it is assumed that the amount of seed / entropy is (much) smaller than the generated random bits.
Answer: Among use cases for TRNGs that (CS)PRNGs can't handle:

generating a One Time Pad, because we want information-theoretic security
generating the seed of a CSPRNG in an embedded environment where it is inconvenient to store the CSPRNG's state in permanent memory (EEPROM, disk), or we fear that that this permanent's memory could have leaked allowing prediction of the CSPRNG.

Problem with CSPRNGs is that they are deterministic, thus predictable for one who known their initial or current state.
Answer: A PRNG is a method for generating output that is unpredictable except by (1) someone who knows the secret seed (or sufficient internal state), or (2) who has more computing power than we know how to physically build. Furthermore, (3) we don't know how to prove mathematically that any of the algorithms we commonly use are really PRNG: the best we can do is have top cryptographers fail to break them.
A TRNG is a method for generating output that is unpredictable except (1) by someone who knows sufficient internal state of the TRNG. As far as we understand physics, breaking commonly used TRNG algorithms requires knowing the state after determining the TRNG output — it seems that time is not reversible.
By comparing those definitions, we notice three differences.
(1) Breaking a TRNG requires observing its internal state. Breaking a PRNG requires observing its internal state or its seed. This leads to the main reason TRNGs are needed: to provide an initial seed. Once you have a secret seed, you can use a PRNG to create output that nobody else can predict. But where do you get this seed? Thus, every computing device that needs to produce secret data (such as encryption keys) needs to either include a TRNG, or have some other way to seed a PRNG. It's possible to have a PRNG on a device without a TRNG, but it requires two things:

The initial seed needs to come from a trusted source, typically as part of the manufacturing process. If you trust the manufacturer to not include a bug or a backdoor in the device, then in principle you also trust them not to mess up or log the seed injection. However, injecting a seed tends to be somewhat difficult in practice: even injecting unique serial numbers, which need to be unique but not secret, is a bit of a manufacturing headache. And it's hard to audit the absence of logs (though it's also admittedly hard to audit the absence of backdoors in the finished product).
The seed needs to be refreshed every time the device loses power: the system must not boot twice with the same seed, otherwise the PRNG algorithm would produce the same output after every boot. This requires secure persistent storage that supports as many rewrite cycles as the device power-cycles, which is too much to ask for some types of devices (either because they use flash memory with a limited number of erase cycles, or because they use persistent memory that is not well protected against backup/restore attacks).

For this reason, most devices that have any security role need a TRNG. Many classes of devices tend to lack a dedicated TRNG component and instead try to use weak entropy sources such as event timing, but this doesn't work well in practice.
(1') Continuing on this difference, note that if an attacker can observe the internal state of a PRNG, they can predict all future output. With a TRNG, an attacker needs to maintain access to the internal state to keep knowing future outputs. The internal state can leak, for example, through side channel attacks where the attacker does not have permanent access to the device, or because the attacker gains access to a backup. This allows a TRNG to limit the effects of a partial compromise.
(2) and (3) are concerns if you're worried that the PRNG algorithm is breakable, either (2) theoretically or (3) practically. You can use the output of a PRNG as the key stream in a stream cipher, and conversely the key stream of a stream cipher is a PRNG. Thus the existence of a PRNG is equivalent to the existence of symmetric encryption with a fixed-length key. There is some mysticism about randomness, but really if you believe in practical symmetric encryption then you also believe in cryptographic pseudorandomess. So you need a pure TRNG (as opposed to a TRNG+PRNG hybrid) only if you don't believe in cryptography. If you only ever use one-time pads, then you need a TRNG to generate the pads. If you're willing to use symmetric encryption algorithms such as AES modes or ChaCha20, then using a (properly seeded) PRNG to generate the encryption keys does not weaken your security.
Comment: _"don't believe in cryptography"_ doesn't read like a joke. Is it meant to be?
Answer: They are needed when you want to have a "private conversation" (Whitfield Diffie), that no entity in the Multiverse can break. Ever. For all time.
The concept is Information-theoretic security. See the One Time Pad tag. See this on how to use them, and this on how to make them.
Also, regarding comments you may have received, I point you to NOBUS. That is indicative of a long running prejudice on this site against OTPs. Perhaps related to NOBUS and perception manipulation. See The Art of Deception. Ignore it. Don't take my word for it. Don't believe me. Do your own work, your own thinking.
Comment: I've removed the last sentence about Xmas, cider & possible followup questions as it is not part of the answer; it would have fared better as a comment. Merry X-mas to you.
Comment: Could you clarify what you mean by "a long running prejudice on this site towards OTPs"?
Comment: "towards" or "against" OTPs, I think it's rather the second, but I may be wrong
Comment: @kodlu You're correct; against.  There are many instances of senior contributors positing that OTPs are not usable & impractical, despite them having being successfully used for a century. It almost seems like a concerted disinformation effort, which leads to the question: Cui bono?
Comment: Can *we* consider this *almost* a conspiracy theory, Paul? :P
Comment: @MaartenBodewes Spoil sport. Happy New Year :-)

Where are TRNGs an absolute need?


Calculating Cohen's d for pre-post/treatment-control design where treatment-control is also a repeated/within factor

Question: I'm conducting a meta-analysis of studies that used pre-post/treatment-control designs. Most of them are mixed designs (pre-post is repeated/within; treatment-control is independent/between) with a continuous dependent variable. I'm using Morris' (2008) paper to calculate effect sizes for these mixed designs. However, some of the studies are fully within designs (pre-post and treatment-control are repeated, with treatment-control counterbalanced). I have not been able to find literature on how to calculate effect sizes for a fully within pre-post/treatment-control design. Does anyone have advice or references they can share?
Comment: Is your design what in clinical trials is called a crossover study? Everyone gets both treatment and control?
Comment: Yes, everyone receives treatment and control.
Comment: There may be material in the Cochrane handbook http://handbook-5-1.cochrane.org/chapter_16/16_4_cross_over_trials.htm which is relevant then. It is not really my area so cannot offer any more direct advice.
Answer: I'm not totally clear on what it is you are after here. Could you provide details of hat you mean by a 'fully within pre-post/treatment-control design'?
However, I would point you towards this recent paper that provides a full description of how to calculate d for different experimental designs.
https://www.frontiersin.org/articles/10.3389/fpsyg.2013.00863/full
The paper also provides a flowchart in the supplementary material that helps you arrive at a decision for which formula/ standardiser to use.
Comment: Lakens uses eta-squared to calculate effect sizes for 2 x 2 within ANOVAs but I'm trying to use Cohen's d (most studies lack sufficient info to calculate eta-squared). The formula I'm using is from Morris (2008) and is for 2 x 2 pre-post mixed designs (1 between, 1 within factor):  d = [(Mposttreatment - M pretreatment) - (Mpostcontrol - Mprecontrol)]/SDpre    I'm also calculating variance of d using a formula in the Morris (2008) paper Eq 25. I was wondering if I can use the same formulas if it's a 2 x 2 pre-post within design or if there are other equations out there. Thanks!


Why does the accretion disc radiate energy and matter?

Question: Jets of matter and energy are powered by accretion disc i.e., matter spiralling into the massive black hole at the galactic centre. How is this jet formed? I think that the dust particles and gases get ionized while falling in. Since accelerated charges radiate, the accretion disc also radiates. But I'm not sure because the jets come out only from the centre of the disc and also consist of matter particles.
Answer: According to Carroll & Ostlie*,

The energy generated by the disk's vicosity (internal friction) cannot be radiated away efficiently, and the disk puffs up into an ion torus that is supported by the pressure of the hot ions ... the radiation pressure that is generated balances the force of gravity and the photons are capable of supporting the matter in an inflated radiation torus.

There is a figure demonstrating how the outer portion of the accretion disk is thus held up by this radiation pressure from the ion torus. Although not explicitly stated in the text, matter within the jet would experience a similar force pushing it away from the ion torus so that unless it is directly between the torus and the black hole, it would be pushed into a narrow jet along the axis of the accretion disk.
Furthermore (p. 1115) the magnetic field of the accretion disk creates a large dipole. Charged particles in this region will naturally tend to spiral around the field lines rather than flying radially outward from the black hole.
* An Introduction to Modern Astrophysics, 2nd ed. 2007. p. 1113.


Connect Android phone via mtp

Question: System: manjaro.
Desktop profile: kde.
I tried to connect an Android phone via mtp, but it failed. The error message is as follows:
<code>$ mtpfs
Listing raw device(s)
Device 0 (VID=12d1 and PID=107e) is a Huawei P9 Plus.
   Found 1 device(s):
   Huawei: P9 Plus (12d1:107e) @ bus 1, dev 14
Attempting to connect device
libusb_claim_interface() reports device is busy, likely in use by GVFS or KDE MTP device handling alreadyLIBMTP PANIC: Unable to initialize device
Unable to open raw device 0
</code>
It shows that my device is busy and may be occupied by GVFS or KDE MTP. I tried to kill them, but it didn't work.
I have the following questions:

I cannot see any device mount points under the /run/user/1000/gvfs folder. This is an empty folder. How to deal with this?

How to solve the problem of GVFS or KDE MTP occupying my device?

How can I directly use GVFS or KDE MTP to access my device? The operation of the command line environment is required, and the operation of the GUI environment is not required.
Answer: apt-get install mtp-tools
it worked for me
Comment: Did not work for me: same as @aszswaz (Kubuntu 22.04)

Connect Android phone via mtp


Changing the distance metric in ObjectiveHTML's Google Maps

Question: I'm using the Google Map Add-On from ObjectiveHTML. When entering a route using the field type in an EE channel entry the distance (as displayed in "Show Details") is always displayed in Kilometers. Does anyone know how this can be changed to display in miles?
Answer: I uploaded a screenshot of my default setup. I simply create a Gmap field and create a route with an origin and destination. You can see my distance is in miles. I think Google is trying to automatically determine which metric to use.
I think what you propose is a good idea though. Being able to force that metric to be something would be nice. I will do some testing to figure out how to best get that data changed and I will report back here. But for now, I don't think it's a problem with the code, rather we just need a way to override the default.
Comment: Thanks for the quick response. It would be good to over-ride the metric as it appears that Google thinks we want to see KM despite the fact that we actually use Miles here in the UK.
Comment: I managed to get around this problem by modifying gmap_field.js (in gmap's themes folder). I changed line 1068 to:

`var distance  =  Math.round((leg.distance.value *  0.000621371192)) +  ' miles (' + leg.distance.text + ')';`
Comment: It seems as though the results are returned from Google in either miles or KM depending on how the route request is made (by address or by latitude/longitude) See:
 [link]https://developers.google.com/maps/documentation/javascript/directions#UnitSystems
However when I test it I always seem to get KM
@tom-davies
Answer: I'm sure Justin (ObjectiveHTML) will correct me if I'm wrong, but I don't think there is a way to configure this as an option on the FT at current. It is possible to set a metric param on {exp:gmap:search} but that's no help here.
THough I don't have a copy of the addon's source, the The Google Directions API specifies a units parameter with values of either imperial or metric. If you're willing to dig in to the code you should be able to find where the request is generated and fairly easily add a units=imperial parameter to the request.
Comment: Thanks. I've been digging around the code to try and locate  the request but didn't have any luck. I'll see what Justin comes back with.


Bentonite AND Sparkolloid

Question: I know from previous questions that you can use both Bentonite followed by Sparkolloid in the same mead. Am I correct in thinking the best process would be add bentonite, give a week, RACK OFF THE SEDIMENT,then add Sparkolloid and give enough time to clear and then a final racking?  The key component I am asking is the racking between the two. I wanted to make sure that was correct thing to do. Thanks all.
Comment: Does this answer your question? [Can you use bentonite and Sparkaloid at the same time?](https://homebrew.stackexchange.com/questions/24311/can-you-use-bentonite-and-sparkaloid-at-the-same-time)
Answer: Racking after clarification is always recommended since adding a clarifying agent often requires mixing it, which would disturb the sediments.
The only time I would not rack when adding a second clarifying agent would be if they work together, like Chitosan and Kieselsol.

Bentonite AND Sparkolloid


How did the Mogadorians know that Sandor was Nine's Cepan?

Question: In Nine's Legacy, Sandor gets caught by the Mogs, and they torture him to get information out of Nine. But how did they know that he was Nine's Cepan? They caught him because he was "poking around" at the They Walk Among Us magazine, but he could have been any of the Cepans.
Answer: I think because

Cepan of number 1, 2, 3 killed along with the Garde
Cepan of number 6 die too
Cepan of number 8 die in India
Cepan of number 5 already dead when they found him

=> They know for sure 6 Cepan of which number have die so when they find Sandor, they though him either Cepan of 4 or 7 or 9, and since the Cepan not go around carry the chest without his/her Garde the Mog can assume he is 9's Cepan
Beside, all Loric Chest have Loric symbol on it (can't confirm if it contain number of each Garde or not) so it maybe a good lead
Comment: 2's Cepan went separately from their Garde. Besides, how would the Mogs know what Cepan did? They had very limited knowledge, and every Cepan set up a different system.
Comment: one thing for sure the Mog know about the chest and how it important to the Garde (in The Rise of Nine, 8 say one Mog have his chest and run away without try to capture him - same with 4 when he in Sam's backyard to retrive the table) so when a Cepan go around with the chest and without the Garde - the Mog know something not right and they can assume that was 9'Cepan (the chest must always be with the Garde - or the Garde know where it hidden in order if the Cepan die, the Garde still know where the chest is and can open it)


How much money do I lose when I die?

Question: In Dead Island, it notifies you that you lost a certain amount of money when you die. How much is lost exactly?
Comment: I'd like to know why people down voted this. It seems like a legitimate question to me.
Comment: Many of my questions that I answer myself, I leave unaccepted to give others the opportunity to one-up my answers. Secondly, I'm often providing video documentation now, but was too lazy for this one. I think that a bigger issue here is, the better thing to do is copy Jarrod's answer, for example, and then add video evidence to it, but it feels like stealing. Is this proper etiquette?
Comment: Did people down vote because NiteCyper answered their own question? Doing such a thing is encouraged! http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/
Comment: I didn't downvote this, but I feel that the OP should at least give somebody else a chance to answer first and secondly documentation is more useful when the issue at hand is not easy to figure out at the first glance.
Comment: @NiteCyper That's a good topic to bring up in [meta] (but search for previous discussion about it first). You might also want to see [this related meta discussion](http://meta.gaming.stackexchange.com/q/5679/4797), too.
Answer: The cash penalty for death is 10% of total money, however, if you're playing as Xian Mei, this can be lessened (by up to -45%) with the life insurance skill.

Source: Modified the C:/.../Steam/steamapps/common/dead island/DI/Data0.pak/Skills file and tested the <prop n="PenaltyOnDeath" v="1"/> value; v="2" increases it to 20%, whereas v="0" removes the penalty.
Answer: In Dead Island, when you die, you lose 10% of your money.

How much money do I lose when I die?


Leoxsys nano wifi adapter installation in backtrack 5r3/kali linux 1.1.0

Question: I have leoxsys nano wifi adapter 150mbps using chipset realtek 8188ETV. It works fine in windows but not recognised in backtrack or kali linux via vmware workstation 9/10/11. When i gave the command "iwconfig" it showed "no wireless extension" and in command "airmon-ng" it did not show any dirver or chipset.
Answer: All realtek chipsets are not well supported in linux, specially new and rarely used ones. You have to do a little research before buying a Wi-Fi adapter, if possible return it and buy TP-Link WN722N, this one has Atheros chipset and well tested with kali Linux, Backtrack etc. Possibly you are fooled by flipkart , be aware of cheap brands like leoxsys, digiflip, etc.


How to see the developer of an app?

Question: I have a Galaxy S21+ running Android 14.  In the App Info, I don't see a way to tell which apps were made by which company. I'm especially interested in the pre-installed apps. Is there a way to do this?
Comment: Usually preinstalled apps are also available in Google Play or Samsung store. There you can find developer info. For play Store you only need the app packageName. Append it to the following URL: `https://play.google.com/store/apps/details?id=` and you get to the app web page (or to the page in Play Store app).
Comment: @Robert you will be surprised how many of the preinstalled apps cannot be found in any of the "markets" – usually more than half of them… // Eric:if you don't mind starting the apps, at least some of them might have an "about" menu you could look at. // In the past, I'd have said one could look up the package signatures. But with so many developers having handed over signing to Google, nowadays that only shows "Google" for far too many apps…
Comment: @Izzy But apps that are never updated (and thus are not available in any store) are pretty rare. The only parts that are usually not updated are the system apps, but even if some of them seem to be of little use I have never seen an app that was not from the device manufacturer (but my experience is mainly about devices from major brands like Lenovo and Samsung).
Comment: @Robert you can check some example device docs from my Adebar [here](https://izzy.codeberg.page/adebar/), first look at the creation date of the report, then head to the "System Apps" secrion. Compare "first installed", "last updated", creation date.On some devices I had a hard time spotting an updated app. Follow the app links, you'll have a hard time finding one that's on Play. Most of the system apps I couldn't even find anywhere. And I remember a study that came to the exact same results: most system apps are in no store and never updated (except with ROM updates maybe).
Answer: "Developer info" is not something that is usually shown inside Android OS, but mostly only related to the app store.

On recent Android versions, in the App Info screen, there may be a menu to see the app entry in the app store:

Samsung: App details in store
Pixel: App details

Selecting it should open the app directly in the store. From there, the developer of the app can be found.

Otherwise, as stated in Izzy's comment, apps may provide in-app about page where the developer may also be mentioned.
Comment: Actually, [key store may contain Organization](https://developer.android.com/studio/publish/app-signing#generate-key), but I'm not sure how user-friendly it is to check it, or even if it's applicable for this question. Free free to expand it as a proper answer.

How to see the developer of an app?


Framework compatibility

Question: I have a class library which is built on .NET Framework v4.0. Is it possible to add this as a reference in a console or web application targeted for v3.5 framework?
Answer: The metadata format has changed in .NET 4.0.  Version 2 of the CLR, the one you get when you target any version of .NET between 2.0 and 3.5 does not know how to read it.  Same thing happened between 1.1 and 2.0.  Version 4 of the CLR knows how to read the old formats without a problem.  As long as you have a reference to a non-framework assembly that was compiled to target version 4 then you have to use .NET 4.0.
Retargeting an existing EXE project that doesn't otherwise requires a reference to that assembly is possible.  Add a .config file to the project and paste this:
<code><startup useLegacyV2RuntimeActivationPolicy="true">
   <supportedRuntime version="v4.0"/>
</startup>
</code>
Answer: I would suggest no because they are using completely different CLR. As a rule, backwards compatibility = yes, forwards compatibility = no.
Answer: I just created a Framework 3.5 Console application and added a reference to a 4.0 dll I had handy.
The compiler was not happy about this at all.
The (empty) program ran once (console appeared, and then closed) and then 40 warnings arrived in the error list, relating to version problems, and the namespace of the dll could not be accessed at all.
I'm going to agree with Sasquiha and say that this looks like a no-go.

Framework compatibility


What is the difference between these two depictions of chromosome?

Question:
I understand that this is a single chromatid, but would this be considered a chromosome? Also before mitosis, the chromosomes appear as single chromatids but during interphase they replicate to form sister chromatids which are attached by a centromere and are also collectively known as a chromosome.
I do not understand the difference between the two of them. Are they both to be termed chromosomes?
Answer: Here is the thing, chromosome refers to a lot of different things ( however, all are coiled up DNA).
Let me explain step by step.
You have DNA, it has a diameter of 2nm, it is coiled with histone proteins and make 10-11nm fiber. This is what we refer to as the chromatin fiber(Beads on a string). At this point we are in interphase where too much coiling is not required because a lot of transcription, replication going on. At the S phase of the interphase, DNA replication takes place and sister chromatids are formed or do they? The answer is yes and no. The thing is even though DNA has replicated and coiled upto certain extent, we dont call the replicated dna as sister chromatids because we only consider them to be sister chromatids when we can clearly see them as separated threads connected at centromere during the M Phase.
So, to put it in simple words, you have the sister chromatids formed (during the S phase) long before you are actually calling them as sister chromatids, you just wait for them to condense further and when you can finally see them as distinguishable threads you call them as sister chromatids.
Now, your real question can be answered. You have posted two chromosomes, one green and the other is red, red has two chromatids connected at centromere. Lets start with the red chromosome. The red one is the metaphase chromosome. Try to remember cell cycle. You have your DNA replicated by the S phase of interphase, then comes G2 and then M Phase starts with prophase, at this point your chromatin fiber gradually starts getting condensed and by the end of prophase, your 10nm coiled DNA (Chromatin fiber) ends up coiled to 700nm fiber but remember, you have two 10nm fibers connected at centromere after the S phase but they were so thin that you could not distinguish the two threads separately, now you can because they coiled in a very organized manner and now you have two 700nm fibers attached at the centromere, this is the maximum condensation achieved and as this final condensed version is observed at the metaphase it is named metaphase chromosome.
So, the red one is definitely a chromosome. What about the green one? That too is a chromosome. the green one is formed at the next step of cell cycle that is anaphase. Here the two sister chromatids split at the centromere and move towards the opposite poles of the cell as  new chromosome. but wait, haven't I called them sister chromatids throughout the answer and suddenly calling them chromosomes? Yes, the previously called sister chromatids are called as  individual chromosomes the moment they are separated from each other at anaphase.
So in summary, the thread like structure that you see in interphase are coiled DNA(Not called chromosomes), chromosomes are also coiled dna but the difference is that these are way more coiled. The red one is metaphase chromosome (1400nm) with two sister chromatids(700+700=1400). The green one is also chromosome but these are actually sister chromatids that got separated at anaphase(only 700nm), you can call them as daughter chromosomes
I hope this helps
Answer: Before S-phase the nucleus has two copies of each chromosomal DNA, e.g. a pair of Chr-1 DNA molecule.
During S-phase each DNA molecule replicates and after condensation ends up forming a chromosome(dyad) with two chromatids (sister chromatids). At metaphase a cell has 46 dyads (considering mitosis/Meiosis-I).
This dyad then separates at the centromere in Anaphase and the two chromatids move towards two opposite poles. On reaching the poles they are called chromosomes.

The word for such chromosome is dyad, but it is relatively less in use I would say.


Please help me identify the Lego set

Question: This partial build was put together symmetrically. Both sides are moveable.
Comment: Actually, best way is to really insert descriptions there ;)
Comment: Hi nnLego! When uploading pictures please do not remove the text saying "enter description here" because without it the image will not render and we won't see it, and we'll end up thinking that you  **didn't** add a picture and we would close your question. Thank goodness I checked!
Answer: This is the rear part of 70009-1: Worriz's Combat Lair:
Comment: Oh, we managed to answer simultaneously. Upvoted!
Comment: @mindstormsboi Don't be hard on yourself, many new members engage in ask-and-disappear behaviour, and it's been less than a day since OP has asked the question in the first place.
Comment: Aw shucks, now all because of my misleading answer I deceived the OP and he's no longer active now apparently and won't see *your* correct answer, **all because of me.** Here, I'll give you an upvote, you certainly deserve it.
Comment: I think that what the OP has done is unfair, both answers are correct but the OP just accepted only one of the two and gave an extra upvote, which means that you get 35 more rep than Alex (and you probably don't care much about rep at this point) and... I think the OP simply did not even notice the other answer. Should something be done about this?
Comment: @mindstormsboi You're right in that I don't care about rep, but on the other hand I don't really see what is the "something" that could be done about it. I could certainly delete my answer, but that would certainly bring more harm (as it is the accepted answer). I'd gladly upvote Alex's answer for a second time, if I could, so I'm open for any suggestions.
Answer: That's part of Worriz's Combat Lair (70009) set. You can see the cage between second and last axles.
Comment: Wow, answered in the same second :) Jinx! :D

Please help me identify the Lego set


Quantum Gravity In Particle Accelerators

Question: It is my understanding that we have no fully working model for Quantum Gravity. However, I imagine one would need to take quantum gravity into account when making discoveries in, say, particle accelerators. How is it taken into account if we don't understand it?
Comment: At the length scales of relevance to high energy particle scattering, gravity (quantum or ortherwise) is not something most would imagine having to take in to account.
Comment: http://en.wikipedia.org/wiki/Orders_of_magnitude_(energy) will show you the energies involved.
Comment: Possible duplicate of: [Why can't gravitons be created in traditional particle accelerators?](http://physics.stackexchange.com/questions/192068/why-cant-gravitons-be-created-in-traditional-particle-accelerators)
Answer: The standard model of particle physics, which incorporates innumerable observations, depends on the mathematical model of quantum field theory, where the interactions under study are modeled  with the iconic Feynman diagrams. These diagrams

are a way of keeping count of integrations and the vertices are where the strength/ the coupling constant, of the interaction happens. Any calculation that can be checked against data is proportional among other things to powers of the coupling constant.
The known forces are ranged according to their strength

For effective theories of quantization of gravity, that is what makes the gravitational effect not measurable  in particle experiments, if you look how many orders of magnitude smaller than the coupling of the weakest fundamental force , gravity is.
Answer: The issue involves the renormalization group (RG) flow of quantum fields. The elementary renormalization group equation for a coupling parameter $g(\mu)$ for $\mu$ an energy scale is
$$
\frac{\partial g(\mu)}{\partial ln\mu}~-~\beta(g),
$$
for $\beta(g)$ the beta function. This wave introduced by Callan and Symanzik in the 1970s. These have different forms for different field theories. For QED it is $\beta(\alpha)~=~2\alpha^2/3\pi$ and for QCD it has the more complicated forms
$$
\beta(g)~=~-\left(11~-~\frac{2n_f}{3}\right)\frac{g^3}{16\pi^2},
$$
for $n_f$ the number of flavours, for $n_f$ less than $16$ it is clear from the above the function declines with increasing energy scale. This is the basis for asymptotic freedom in QCD. For gravity we have something stranger, but conformal gravity is $SU(2,~2)~\sim~SO(4,~2)$. We can derive a similar RG flow for $SU(4)$ that in the one-loop is
$$
\beta(g)~=~-\left(\frac{11}{3}C(G)~-~\frac{4n_f}{3}C(R)\right)\frac{g^3}{16\pi^2}
$$
for $C(G)$ and $C(R)$ the trace invariant $C(R)\delta^{ab}~=~Tr(T_R^aT_R^b)$ in the representation $R$. The adjoint of the group $G$ for colored gauge fields we have $C(G)~=~N_c$ We may then think of the graviton as colorless triplet states of gauge particles analogous to the QCD gluon.
There is considerably more that I could write on. However, the net upshot is that these RG flows tend to converge at higher energy. I now appeal to a diagram that shows how these RG flows occur

This shows the convervence of gauge fields, in particular $SU(3)\times S(2)\times U(1)$ leading up to the grand unification. The diagram also illustrates how supersymmetry makes the renormalization converge getter. There is a similar flow with gravity. The energy scales at which gravitation becomes strong is very high, the Planck energy or Planck mass. A chart below illustrates these scales. The huge difference can be seen with the force between two electrons by gravity $F~=~-Gm_e^2/r^2$ and their electrostatic repulsion $F~=~(1/4\pi\epsilon_0)e^2/r^2$. Another way to see this is that elementary particles at energy scales we can play with are very low mass compared to the Planck mass $\sqrt{\hbar c/G}$ $\sim~10^{19}GeV$ It takes a lot of energy to excite the vacuum state to produce units of Planck mass, which are the "atoms" of black holes.
As a result a $10TeV$ energy machine is $15$ orders of magnitude lower than where quantum gravity is expected to behave as a strong force. However, not all is absolutely lost. Above I mention the graviton is a triplet state of colorless gluon-like particles. Maybe these gluon-like particles are S-dual particles of the gluon with very weak force. This means that di-gluons in experiments we conduct are dual to gravitons and give us a window into quantum gravity. There is in fact a lot of interest in AdS/black hole-like physics with heavy ion scattering physics. A paper on this illustrates possible physics with large numbers of quarks and gluons, or quark-gluon plasmas, that are dual to black holes and quantum gravity physics.


automatically updating a label objective-c without clicking a button

Question: I have 4 labels, 3 are editable with one label that cant be edited and one float which is the sum of the 3 editable labels.  Whats the easiest way to get the uneditable label to update automatically with the summed value of the other labels as the user edits them? (i dont want the user to have to click a button after the user has edited the labels) I know i'll probably be using bindings but your help is very appreciated.
Answer: Assuming your three editable labels are actually "text fields", designate some object (probably your view controller) as a delegate and then respond to this NSControlTextEditingDelegate protocol method:
<code>- control:shouldEndTextEditing:</code>
When the user tabs or exits the editable text field, you'll catch that event via the protocol method and then you can update that non-editable text field (which you've set to an outlet in your view controller, right?).
Or, you can use bindings, yes.  :-)


Why getNetworkCountryIso() method is returning country code without Sim Card on Samsung devices?

Question: In my app I am getting user Country. For this I am using getNetworkCountryIso().As it is mentioned in documentation it returns registered MMC code.I have tested getNetworkCountryIso() method with and without SIM card. Without sim card it return empty string (Tested on Motorolla droid turbo and Nexus 5).But problem is when I am trying same thing on Samsung (S3 and S4 mini) it is returning country code even though both of mentioned cell phones do not have any sim card attached.And on closely look, i found out that there are some signals on status bar and sim card slot empty error as well as mentioned in picture.My question is why samsung device showing those signals what are those supposed to be? and why getNetworkCountryIso() method returning code if there is not any sim card?
Answer: As per Samsung developer website, (http://developer.samsung.com/technical-doc/view.do?v=T000000082); getNetworkCountryIso() should work on Wi-Fi only devices.
Comment: I didn't find anything in the documentation you linked explaining the behavior.


Can it be a correct grammar? 'Don't go nowhere'

Question: I heard it expressed on gotel radio station;  "Don't go nowhere" can it be correct?
Comment: Double negatives like that are common in conversation, especially in the conversation of those without much schooling.
Comment: It's not really Standard English, but it's grammatical in many dialects.
Comment: If a Nobel laureate uses "You ain't going nowhere", who are we to quibble ;-) https://www.bobdylan.com/songs/you-aint-goin-nowhere/
Answer: This is an example of a double negative.  Traditional formal English considers these to be poor style. However these forms are fairly common in casual speech.
In the example the meaning is clear "Don't go nowhere." is equivalent to "Don't go anywhere".  Sometimes the double negative introduces an ambiguity:  "I don't know nothing about it" could be understood to be a casual way of saying "I don't know anything about it." or a way of saying "I do know something about it." (We will use a range of cues, such as accent, presumed age, class, context and expected meaning to understand which is meant.)
Learners should generally avoid these double negative forms, as they are generally considered to be "poor English". But be aware that native speakers will use them from time to time.


Ids/ips configuration audit

Question: Is anyone familiar with a tool that can audit the configuration of an intrusion detection/ intrusion prevention tool? I'm looking for a tool that can check for best practices, and non standard configurations.  I have googled just about everything and I only come up with white papers.
Comment: There is no standard config file or format for IDS/IPS. So, there can be no tool.
Comment: Instead of auditing the configuration, people typically just run penetration test/vulnerability scans and see if expected results show up in the IDS.
Answer: Does it work? IPS and IDS are very specific configurations. Plus, the general behavior of each provider is different. Some fail-open, some fail-closed and some just fail.
The best way to audit is to:

Identify what assets/resources are being protected by the ((IP|ID)S).
Document the current configurations. (You need to know exactly what polices are being applied to each protected asset/resource). Literally, map asset/resources to policy.
Determine what tools and test need to be run against the assets/resources.
Run the sets and interpret the results.
Tune the device as needed.
Realize that you will get false(neg|positive)results.
Realize that the application is the right place to fix vulnerabilities.
Repeat 3-7 until confidence rating is high or completely shot.
If confidence rating is completely shot or you don't want to have all this weight on your shoulders and massive ramp up, get experts on the problem.
Answer: Whoever is the provider of the IDS/IPS system should provide documented guidance on how to install, configure and maintain the system to maximise the security it provides. You should then be able to audit the current configuration and management process against that documentation and for maintenance verify the system version and signature files in use are supported and current.
If the above is in place, you should be able to detect and/or prevent intrusions and malicious traffic. Then you can tune the system to filter out the noise and configure priorities for alerts and decide on your response, investigation and escalation processes.

Ids/ips configuration audit


A Simple Inequality Question $ c \leqslant \sum\limits_{i=1}^n a_i$

Question: If $p \geqslant 1$, and let $c^p \leqslant \sum\limits_{i=1}^n a_i^p $ . Then $$ c \leqslant \sum_{i=1}^n a_i$$ Here $c , a_i \geqslant 0$.
Answer: $\|a\|_p = \left( \sum\limits_{i=1}^n a_i^p\right)^{1/p}$ is the $\ell_p$ norm of $(a_1,\ldots,a_n)$.  The fact that this is subadditive, and thus a norm, is Minkowski's inequality.  Thus
$$\|a\|_p \le \|(a_1,0,\ldots,0)\|_p + \|(0,a_2,0,\ldots,0)\|_p + \ldots + \|(0,\ldots,0,a_n)\|_p = \sum_{i=1}^n |a_i|$$
Answer: An elementary argument might go as follows: The case $c=0$ is clear. Thus, assume $c\neq 0.$ We can reduce to the case $c=1$ by dividing through by $c^p$ in the first inequality, and by $c$ in the second inequality. So suppose that $\sum a_i^p \ge 1.$ If all $a_i< 1,$ then $1\le \sum a_i^p \le \sum a_i$ is clear. Otherwise there is some $a_i \ge 1$ and again we are done.


Do it yourself operational transconductance amp?

Question: While quickly prototyping some of diy-synth circuits I realized that I don't have OTA at hand, but I wanted to continue fiddling with the circuit. Is there a way to make OTA out of op-amps and transistors at hand? Quick googling couldn't find me any solutions.
If I understand correctly, OTA is OP-amp with current-controlled gain. Well, a differential amp with controlled current source should do the trick, right? Or there is something more to it?
Comment: What sort of circuit is it? Monolithic VCAs are a thing nowadays, and you can use those to build VCFs (and I'm sure VCOs as well)
Answer: The OTA is what the name inducates: A TRANCONDUCTANCE amplifier which means: High-resistive voltage differential input and a high-resistive current output (output/input=I/V=conductance gm). And - yes - commercial OTAs have a control node for injecting a control current Iabc (amplifie bias current).
Therefore, the transconductance gm can be externally controlled.
Of course, no ideal OTA is possible - which means: It is up to you to decide if a well-designed differential amplifier can meet your requirements or not (input and output resistances). I think, a darlinton pair at the input can provide a sufficient input resistance - and an active load (current mirror) provides a good output resistance.


why programming languages does not have factorial function?

Question: While searching on the internet I found  almost every programming language said implement your own factorial function, rather than giving built-in function for it.
Some of stackoverflow answers mention that it is too easy to implement that is why they leave it to programmers. However, then the question arise, why
the language designer can code and implement very complex function in built in library, but not the easy factorial why?
Comment: Most programming languages don't have most functions. For example, most programming languages don't have a "hello world" function. Why not? Because you can easily make it yourself.
Comment: because programmers need to learn how to implement recursion ;o)
Answer: Most programming languages don't have any built-in functions and such additional functions are provided by "standard library" of sorts. This answer addresses why factorial is unlikely to be found in "standard library" either.
Factorial is a function that is very rarely used in general purpose code (outside of basic recursion exercises) and requires extreme care when used. So general-purpose "standard" library (included or merged with a language) does not benefit much with providing one.
Specific concerns:

for majority of languages that have fixed-size integer values there is extremely small range of input values that are acceptable (1-14 for 32-bit integers) - having table for such a small range is preferable when it actually needed. This is quite different for majority of other common functions that have much large usable range of input values (something like "+" would work safely for up to INT_MAX/2 values).
it is very impractical to be defined in non-integer types as values are very quickly go out of precision range and become estimates. Each program needs to assess how to handle such losses and one generic implementation (usually unintentionally hiding exact details) become mostly useless.
for languages that allow unbounded integer types it grows far too quickly to be safe to use in general code anyway - performance is almost unpredictable and memory usage would grow too quickly. Again, calling for every specific case to pick specialized implementations and possibly calling for alternative approaches altogether.
in many cases (i.e. Taylor series) code naturally computes n! in the process avoiding O(n) cost of computation for each iteration or the actual result needs only part of the factorial (C(n,k)). Such cases likely occur in specialized applications that would use a library specific to the domain rather than generic one lessening need for factorial to be in the standard library.
Answer: First of all, keep in mind that "language", "implementation" and "standard library" are separate concepts. Languages are implementation blueprints that may not prescribe a standard library.
Factorial is built-in to standard implementations of Julia, R and Python (at the time of writing), which makes sense because these are mathematics-oriented, high-level languages. For the audience of these languages, it's a common task that should be easy. The expectation/flavor of these languages is "import solution", rather than "write it yourself".
As far as I know, there's nothing in the Python language specification requiring implementations to have a math module, and whether that math module must have a factorial method. The creators/maintainers of CPython (the reference implementation of Python) thought it'd be a good idea to include math and math.factorial though, and it's a pretty safe bet that most other implementations will follow suit, because it's a function that fits well with Python's "batteries mostly included" philosophy.
On the other hand, C has no such factorial function because it'd just be extra bloat. It's not a common task in the language. The flavor of C is low-level and bare-bones. C is a substrate to build up from, opting-in to necessary functionality. It hearkens from an era when every byte of space mattered (we're talking a few megabytes for the whole system). For embedded or system engineers, a huge standard library filled with things they're not using would only get in the way of their goals. There's no need to buy a car if you just want a chair to sit in. The Go language follows a similar philosophy: we'll give you just the primitives, you write the abstractions you need (or install a package).
Adding more stuff to a programming language specification itself and/or an implementation of that specification takes maintainence work, so it's not free lunch even when it does align. Taking the car analogy further, putting computers in every part of the car sounds great until there's a chip shortage or people figure out how to hack them, and it turns out to be a huge design liability. Sometimes less is more.
Based on this, we can infer that which functionality is built into the standard library and which isn't is pretty much a judgment call. Do language or implementation designers/maintainers find it important for the goals of the language? Then include it. If not, don't. Sometimes, it's unclear and maintainers and designers disagree about what should be included and what shouldn't. If something is included, is it a built-in (no import) or included but require import?
In Python, factorial is not a built-in likely because it isn't common enough to warrant core functionality and makes the most sense tucked in the math module. This is a design decision that can evolve: reduce was removed as a built-in and relegated to a standard library module (functools) because the creator of Python wanted to de-emphasize functional programming and avoid overuse.
I should also say that whether a function is easy to write or not is probably seldom much of a factor in whether it's included. It's a question of anticipating needs relative to costs.
If you want a language that magically does "all the things" (especially math things), Wolfram Alpha comes to mind.
Answer: Let's take C as an example The programming language C was created without any built in functions. This was a very deliberate choice.
When you create a helper such as a factorial function you are placing flag in the ground that says "this is how things are done". That may seem great at the moment of inception, but may greatly diminish the future of the language. It may rob future developers of the ability improve the logic of a tool due to the need to maintain legacy code.
User interface is another reason that most modern languages lack built in functions. When you create a UI function, you are tying the language to the platform it was designed on.
Functions are left to the developer to maintain the utility of the language.
Comment: @EdwinDalorzo they are worth the backward compatibility cost, but factorial isn't (the gamma function might be ;o)
Comment: Based on this argument, how would you explain the countless other functions that most language standard libraries do contain then?
Comment: @Edwin Dalorzo the explanation is is the term "standard library" they are not part of the language specification. They are a group of tools that were developed after the fact that have been implemented on every platform.
Comment: I don't think the question was why the factorial function is not in the language specification, but why is it not defined somewhere where the language puts its built-in functions. For example, why doesn't Java have a `factorial` function defined in its JDK API? Unless we have designed a specific language, most answers will be opinionated. My take is the factorial function is simply not useful enough in those languages, that's all.
Comment: @Edwin Dalorzo Ageed. Others did a good, in depth analysis of why factorial itself would be a bad choice for inclusion in a language or even a standard library.  I simply felt it important to point out that at their core, most languages try to leave the door open to innovation rather than defining specifics.


Are `mathfont` and `mathspec` intended for same purpose?

Question: What package of these two is better for changing math-mode fonts (to .ttf fonts)?
Comment: I agree that in its current *which one is better* form the question is primarily opinion-based, but a question about differences or pros and cons of the packages might not only be interesting, but also useful for a wider audience. Given that the question has already received a useful answer and given that it is very new and that there have been no comments on how to improve the question thus far (or why people voted to close) I voted to keep the question open.
Comment: I suggest you reword your question to make it more neutral and objectively answerable instead of asking which one is 'better'.
Answer: mathfont and mathspec have similar purpose, but mathfont works not only with xelatex but also with lualatex. Both packages allow to change the font of various math symbols and math alphabets.
Both packages have in my view the same deficiency: they care only about the look of the math and not about the mathematical meaning of the symbols.
The difference can be seen in this example:
\documentclass{article}
\usepackage{mathfont}
\setfont{Arial}
\begin{document}
$\mathrm{a} \preceq a$
\end{document}

The result looks as expected:
,
but if you copy and paste then you get: a ? a. Both a are identical, and the symbol is gone.
If you compile with unicode-math:
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
$\mathrm{a} \preceq a$
\end{document}

then copy & paste will give a ⪯ .
Comment: It is probably clear from the context, but it might be helpful for future readers to state explicitly that `mathspec` is for XeLaTeX and that `mathfont` works on LuaLaTeX and XeLaTeX. `unicode-math` also works for XeLaTeX and LuaLaTeX.


What appliance is required to make dense and stable foam out of aquafaba?

Question: All of the recipes of whipped aquafaba I encountered on the web are showing chickpea brine whipped with the use of a stationary mixer with a large conical-shaped whisk. Did anyone experiment with other devices? Apart from the shape of the whisk, what power and speed of rotation of the whisk is required as minimum to achieve maxiumum foaming capacity and stability?
Answer: Advice for whipping aquafaba is largely the same as whipping egg whites: you'll get firmer peaks faster the harder/faster you whip the liquid.
I am not able to find a good mathematical relationship between the power of the mixer and the integrity of the resulting whipped foam. However, stand mixers have more muscle than a hand mixer (or your arm):

Because thin aquafaba needs to be whipped fiercely to achieve peaks, a powerful stand mixer really is the best tool for the job — don't even try to whip with a whisk. A hand mixer can work if that's all you have, but you might not get the same consistency that a stand mixer will give. source

The above article also notes that "it can take up to 10 minutes" for peaks to form — aquafaba needs both time and power in order to whip well.
Plenty of other online sources describe success with a hand mixer, but agree than whisking by hand is unlikely to give satisfactory results. (I've never gotten really good stiff peaks from egg whites whisked by hand, either.)
Regarding the whisk shape: most stand mixers have that conical whisk to help cover as much of the bowl as possible. Hand mixers have a more balloon or cylinder shape, because the user is able to move the beaters around to capture any parts of the mixture which need more attention. It's more about the power of the motor than it is the shape of the whisks.
Comment: In addition to reducing the aquafaba, I can also suggest a bit of cream of tartar. Great test from America's Test Kitchen here: https://www.americastestkitchen.com/guides/vegan/what-is-aquafaba


Car window locking pins frozen, cannot pull the pin up

Question: Did it ever happen to anyone in cold weather? I literally could not pull up the pins with my fingers to open the door until inside the car heats up. What can I do if it happens again?
Answer: Two things may help before it happens again:
1) lubricate the pins with silicone - a light coating,
But better:
2) is to dehumidify the inside of the car - sounds like it has too much moisture in it if those pins can ice up.


WiFi driver is not installed on Asus PCE AC68?

Question: I am not able to install wireless card driver on Ubuntu? I tried to install it manually but not able to install?
Comment: All the commands here will not work until you turn off your secure boot from boot menu. This prevents system from installing drivers
Answer: Sorry that I have to add this as an answer, as I don't have rep to comment yet.
Thanks to chili555 reply and racar comment I now have the PCE-AC68 working on my system, Ubuntu 15.04 on mobo ASUS A88XM-A by
sudo apt-get install bcmwl-kernel-source
sudo modprobe wl
sudo reboot

I wanted the card as I've upgraded my cable modem + wifi router to Telstra Gateway Max (rebadged Netgear) which supports dual band wifi. Link speeds specified as 216/292 Mbps. It's probably not ideally set up yet as I'm only getting about 30 Mbps - I note that it's 802.11abg connection from iwconfig:
wlan1     IEEE 802.11abg  ESSID:"Telstra226B"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 40:5D:82:47:F4:66
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

But at least it is working now, and faster than my old Netgear WN111 usb plugin :) So thank you again.
Answer: Please run the command:
lspci -nn

Is your device this?

Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter (rev
  03)

If so, it uses the driver bcmwl-kernel-source.  If you still have the install DVD or USB, then you can find it and its prerequisite there. Navigate to pool > restricted > b > bcmwl and drag and drop the deb file to your desktop. Now navigate to pool > main > d > dkms and drag and drop dkms to your desktop. Now install both with:
cd ~/Desktop
sudo dpkg -i *.deb

Load the driver:
sudo modprobe wl

Your wireless should now be working. If it not as I described, please post your finding and I will edit my answer to propose a different solution.
Comment: Thanks, I found here the .deb file version 18.104.22.168 (http://ftp.psu.ru/linux/ubuntu/pool/restricted/b/bcmwl/). And did exactly what you said, everything works fine now. I am running Ubuntu 14.04 by the way.
Comment: since on the DVD i didn't find any drivers (only windows), i used sudo apt-get install bcmwl-kernel-source
Comment: You sir, are a gentleman, and a scholar. You guard the night with your wisdom. You are ever so gentle, and perfect. But really THANK YOU!!! I thought all hope is lost! PPl on amazon were saying it wont work ever!
Answer: I used this method:
Go to Settings > Software & Updates > Additional Drivers
It loads for a few minutes and then shows your wifi device (Broadcast name) and then you can enable it.
Then you can sudo apt-get update. It works for me.
Answer: Install ndiswrapper
sudo install ndiswrapper-common ndiswrapper-modules-1.9 ndiswrapper-utils-1.9

Install the WiFi driver (from Windows):
sudo ndiswrapper -i yourdriver.inf

Check the driver is working:
sudo ndiswrapper -l

Load the module:
sudo depmod -a

sudo modprobe ndiswrapper

Configure modprobe so that it loads ndiswrapper:
sudo ndiswrapper -m

Edit the modules to add ndiswrapper at the end:
sudo -H gedit /etc/modules

Remember to add ndiswrapper at the end.
Hope you now have your WiFi up and working!
Comment: Hi thanks for the answer. I can't find a deb file for ndiswrapper-modules. So when i try to load the module, I will get the error "module ndiswrapper not found"
Comment: Full documentation is here: https://help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper
Answer: I'm using the same Wifi Adapter and got it to work as chili555 mentioned (could not comment yet). But on a default installation of Ubuntu there's a package missing which is mandatory. This is the DKMS package. So you need to install the DKMS package first before installing the driver package like Chilli555 explained.
sudo apt-get install dkms

Working on Ubuntu 14.10 and using the 5Ghz band it's performance is similar to what it is under Windows. On my internet connection I'm getting 200+ Mbit/s


Ben's and Jerry's Ice Cream

Question: I assume that if we had two people named Ben and Jerry who made ice cream together, then it would be Ben's and Jerry's ice cream, yes? Now if "Ben and Jerry" were the name of a company, then it would be grammatically correct to call it Ben & Jerry's ice cream, but are there any problems here with the name of the company in its current form in terms of English grammar?
Comment: In terms of English grammar, the name obeys all the rules of English grammar. Even though, in terms of English grammar, a *name* can be anything at all and does not have to obey any rules whatsoever. (What absolutely does *not* work in terms of English grammar is replacing a "were" with a "where". That immediately qualifies the resulting statement as not English.)
Answer: Look at this website.
According to the website, Ben's and Jerry's ice creams would be used if Ben and Jerry had two different ice cream companies.  Ben and Jerry's ice cream is used if they jointly own a company.
Actual usage by native English speakers doesn't always strictly follow this rule, but Ben and Jerry's ice cream is the most grammatically correct way to name the company.
The actual quote from the website says:

When you are showing possession with compounded nouns, the apostrophe's placement depends on whether the nouns are acting separately or together.

Miguel's and Cecilia's new cars are in the parking lot.
This means that each of them has at least one new car and that their ownership is a separate matter.

Miguel and Cecilia's new cars are in the parking lot.
This construction tells us that Miguel and Cecilia share ownership of these cars. The possessive (indicated by 's) belongs to the entire phrase, not just to Cecilia.
Answer:
are there any problems here with the name of the company in its current form in terms of English grammar?

No. None whatsoever. You can call a company or a product whatever you want (within reason) and use whatever punctuation you feel is correct. I suppose the owners could have called it "Be'ns # Jerrys !ce cream" if they had wished.
Comment: OK, so normal rules of punctuation don't apply to company names, but I think it's pretty clear the OP wants to know whether "Ben and Jerry's" would still be correct if the normal rules *did* apply.

Ben's and Jerry's Ice Cream


D6h symmetry clusters- orbital classification confusion!

Question: I was am simulating high symmetry clusters D6h in several programs such as molcas and gaussian. I understand that the highest symmetry used in these programs is D2h and therefore there would be mixing of the different symmetry representations upon correlating from D6h to D2h. However upon simulating Mn@Si12 cluster, I'm seeing that the silicon atoms in the silicon cage have for all representations: s, px, py and pz orbitals despite there being restrictions according to D2h e.g b3u representation has only px functions and b2u only having py functions. Could anyone please shed some light on this phenomenon?
Answer: The symmetry operations are usually defined with respect to the origin of the coordinate system. For single atoms one naturally chooses $(0,0,0)$, which coincides with the symmetry center.
For example the $\sigma_{xy}$ mirror plane in matrix representation (with $(0,0,0)$ being the symmetry center) would be:
$\sigma_{xy}=\pmatrix{1&0&0\\0&1&0\\0&0&-1}$
which means: invert every $z$ component. If applied to some object centered on $(0,0,0)$ (e.g. the AO of an atom on this position), the result would still be centered on $(0,0,0)$.
In case of molecules we can have at most one atom sitting on the symmetry center. Sometimes none, e.g. in $\ce{C2}$ where the symmetry center is in the middle between both atoms. If you apply the above matrix here (assuming the molecule axis is aligned with the $z$ axis), then it would map the AO from one to the other atom. Therefore it is not symmetric (with respect to the above defined symmetry operation) anymore.
Thus you cannot relate the IRREP of an atomic orbital in the single atom, with its IRREP in the molecule. The symmetry center changed! For example take an $s$ atomic orbital of any of your $\ce{Si}$ atoms. The position of the atom does not coincide with the center of the molecule. Therefore any symmetry operation (except for $E$) would map the $s$ orbital to some other $\ce{Si}$. The AO is no longer characterized by an irreducible representation.
What the code does instead, is first generating Symmetry Adapted Linear Combinations (SALC) of the atomic orbitals. Those are then again characterized by IRREPs (of the molecule) and used for the calculation. Now each obtained MO is indeed only constructed from SALC of the same IRREP. In other words: the Hamiltonian, and therefore the MO coefficient matrix as well, become block diagonal. However, in the output the MO coefficients are transformed back from the SALC basis set to the AO basis set, which is not block diagonal and may contain contributions from any AO for each IRREP of the MOs (an exception would be the AOs of an atom located in the center of the molecule).
Comment: I only found a HTML version of the molcas manual, so I cannot check what p438 is about. Anyway, you do have a basis which you can classify according to irreps: the SALC, which is build based on the AO basis.
Comment: Are you referring to Table 10.5? It has a footnote: "Functions placed on the symmetry center." As there can be at most one atom in the symmetry center, this does not work in general.
Comment: Homonuclear diatomics, like $\ce{C2}$ and $\ce{Ni2}$ have an inversion center inbetween both atoms. That is their symmetry center, hence there is no atom sitting on the symmetry center.
For the other example: heteronuclear diatomics don't have inversion symmetry, so there is no symmetry center.
Comment: Thanks alot for your answer, I believe you have answered my question quite clearly, but I'm still struggling to understand a few things. Would you be kind enough to answer this query please. If it is not possible to relate Irrep of AO to Irrep of MO and each MO may contain contributions from any AO for each IRREP, how is it possible to classify basis functions according to irreps . This done for high symmetry molecules in molcas manual p438.  Many thanks for the help.
Comment: Yes i'm referring to table 10.5. Thanks alot for looking at it. So for the example of NiH, Ni is on the symmetry centre? and for C2 and Ni2, one atom of each lies on the centre and by symmetry operations, the functions are applicable to the other atom?
Comment: Thanks alot for the help and the detailed answers. Please let me know if there is any way to reward your answers apart from upvoting.


GE Dishwasher Error Codes (PDT760SSF4SS)

Question: My GE Dishwasher is displaying active error codes F51, F65. I can't seem to find any information on the meaning of these. Can anyone tell me what these mean?
Comment: This started with a 'Leak Detected' error which is no longer there.
Answer: Searching for GE Dishwasher Error Codes (as they generally aren't model-specific), I found the following page: http://www.searspartsdirect.com/dishwasher-repair/error-codes/ge-dishwasher-error-codes.html
F51 is "Temperature sensor failure"; "Shut off power to the dishwasher and check the wiring connections on the temperature sensor, which is located on the flood switch. Check the resistance of the temperature sensor. It should measure about 11,000 ohms at room temperature. Replace the flood switch if the temperature sensor is defective."
F65 is "No water detected by the inverter control board": "If the dishwasher didn't fill, make sure that your water supply cut-off valve is open. Replace the water inlet valve if defective. If the dishwasher did fill, shut off power to the dishwasher and check inverter control board wiring. Reconnect any loose wires. Replace the wire harness if damaged. If the wiring is okay, replace the inverter control board."


One hot encoding with Keras

Question: I have a large dataset (500k rows) where one column contains the weekday of the purchase. For now, it is in the 0-6 format (Mon-Sun) and I think I should one-hot encode it before training my sequential NN in Keras. It is not clear if I should do this in the dataset (transform the one column into 7 columns, manually or is there a Pandas function?) or I can just have that one column containing an array of length 7. The dataset is a Pandas Dataframe if it matters.
Answer: Pandas and skicit learn provides function to do the encoding.Sharing an example code using pandas dummies function
<code>one_hot = pd.get_dummies(df['weekday'])
# Drop column weekday as it is now encoded
df = one_hot = pd.get_dummies(df['weekday'])
</code>
Comment: indeed, this worked well and created as many columns as the cardinality of the label.

One hot encoding with Keras


Why is Las Vegas located where it is?

Question: Anybody know the history of Vegas and basically why that location was chosen as the main hub for gambling, hotels, and entertainment given that (at that time) it was pretty much a random desert in the middle of nowhere?
Comment: The history of Las Vegas is pretty thoroughly documented in Wikipedia, see: [History of the Las Vegas Valley](http://en.wikipedia.org/wiki/History_of_the_Las_Vegas_Valley)
Comment: Given that the people wishing to run the gambling etc... were not exactly on friendliest terms with the Law, "random desert in the middle of nowhere" seems like a recommendation for a site.
Comment: @paulsmith It's in the first paragraph of the section titled "1829–1905: origins". To wit, "By following the Pike and Smith routes through a tributary of Colorado River they came upon the Las Vegas Valley described by Smith as **the best point to re-supply before going onto California**."
Comment: Thanks for the welcome!  Actually Wikipedia was the first place I had checked before posting my question, however I had hard time finding any information about the original reasoning behind selecting that location. Which section is that in?
Comment: @paul smith: I think the problem might be that you are assuming some sort of overall plan, when it was more a case of things just growing.  That is, gambling was legal in Nevada, Las Vegas was about as close as you could get to the major population centers of southern California, the first casinos made profits, so they expanded and attracted more business.  And of course, unlike e.g. Reno, there's really nothing in Las Vegas to distract gamblers from losing their money...
Answer: Las Vegas was not founded in a particularly random desert. It was founded on a meadow (las vegas is Spanish for "the meadows") watered by the nearby Big Springs, or Las Vegas Springs. As such it was a watering spot on the Old Spanish Trail.
After the Civil War, O.D. Gass set up the first permanent white settlement there. Other settlers followed, and it was an important enough agricultural center to attract a stop on the San Pedro, Los Angeles & Salt Lake Railroad. This put them within a day's reach of Los Angeles and the sea, contributing to substantial growth.
As the nearest major settlement to the Hoover Dam, Las Vegas also enjoyed an influx of population and money during its construction, and cheap electricity and tourists headed for Lake Mead after its completion. They were boosted again with the construction of nearby  Nellis Air Force Base.
The aquifer feeding the springs that had first attracted settlers to the area were sucked dry by the 1950s, but by then the city was already by far the largest population center in southern Nevada, and tourism and the military had long since displaced agriculture in the local economy.
Answer: The main reason that comes to mind at once are legal issues:
http://www.library.ca.gov/crb/97/03/chapt1.html
Nevada, legalizing casino gambling in 1931, was for almost 50 years one of two states with legalized casinos. (Maryland had them from 1949 to 1968, in some years with slot revenue exceeding Nevada's.  Waldorf was the main center for this, but it was legal throughout the four Southern Maryland counties.)  More states started legalizing casinos later, beginning with New Jersey in 1976.
Comment: This really doesn't answer the question of why Las Vegas is where it is.  After all, Reno had legal gambling before Las Vegas had anything major.  A good answer would have to address things like proximity to the Los Angeles metro area and the activities of Bugsy Siegel and others who were active in the Hollywood movie scene.

Why is Las Vegas located where it is?


Whats the difference between yama and san in the title of a mountain?

Question: Whats the difference between yama and san in the title of a mountain? 富山 and 富士山 Toyama and Fujisan for example?  Is one simply a mountain and the other a volcano?
Answer: According to Jisho.org the Kanji in question (山), has only one meaning: Mountain.  That has no distinction between a volcano (which is written 火山) or a regular mountain.
As @Leebo has pointed out both readings (やま and さん) are used in mountain titles.  I personally would take that to mean that there isn't really a dramatic difference between the two.  The difference in reading may stem from how kanji got integrated into the Japanese language, but that is mostly conjecture on my part.
The only way to know which reading is correct is experience.  Usually one will sound better than the other.
Be aware that not all mountains have the 山 kanji at the end of its name like 二ノ森 on Shikoku, and some will have the ending 岳 like 鶴見岳 on Kyushu.
Comment: There are mountain names that use the reading やま, such as 立山, 笹山, 赤沢山, 本谷山, 双児山, 大滝山, 越百山, 辻山, 鉄山... and many more.
Comment: Thanks,  I wasn't finding any in my original search.  I'll update the answer
Comment: To make things more confusing, yama and mori are often used interchangeably, and many Japanese will rather picture a tree-covered _mountain_, than a collection of trees, when they hear the word mori...


A positive lambda: '+[]{}' - What sorcery is this?

Question: In Stack Overflow question Redefining lambdas not allowed in C++11, why?, a small program was given that does not compile:
int main() {
    auto test = []{};
    test = []{};
}

The question was answered and all seemed fine. Then came Johannes Schaub and made an interesting observation:

If you put a + before the first lambda, it magically starts to work.

So I'm curious: Why does the following work?
int main() {
    auto test = +[]{}; // Note the unary operator + before the lambda
    test = []{};
}

It compiles fine with both GCC 4.7+ and Clang 3.2+. Is the code standard conforming?
Comment: @MatthieuM. Because capturing lambdas don't decay to function pointers! `;)`
Comment: Another `+` sourcery follows. Try this on GCC: `struct foo { static const int n = 100; }; int main() { return std::max(0, +foo::n); }`. If you remove the `+` it fails to link, which is standard conforming behavior. VS2010 has no trouble in linking it (even without the `+`).
Comment: At least related: [Resolving ambiguous overload on function pointer and std::function for a lambda using +](http://stackoverflow.com/q/17822131/420683)
Comment: Let's add some more magic: `auto test = *[]{};` (note `x` is still a function pointer here, I think due to decaying) and then.. `auto test = +*[]{};`. Of course you can repeat this infinitely: `auto test = *+*+*+[]{};`. And my favourite: `auto test = +*??(:>()<%??>;`
Comment: It is interesting that for a capturing lambda it would not work.
Comment: @MarkGarcia: exactly, that may be the only difference between capturing and non-capturing, and thus a hint as to the solution.
Comment: @MatthieuM. just for reference, two lambdas with the same signature have different types. using the `std::function` template avoids wraps the type difference.
Comment: @DyP Ouch! Nice touch with the alternative tokens and trigraphs, looks like your next entry for the IOC++CC... `:)`
Answer: Yes, the code is standard conforming. The + triggers a conversion to a plain old function pointer for the lambda.
What happens is this:
The compiler sees the first lambda ([]{}) and generates a closure object according to §5.1.2. As the lambda is a non-capturing lambda, the following applies:

5.1.2 Lambda expressions [expr.prim.lambda]
6 The closure type for a lambda-expression with no lambda-capture has a public non-virtual non-explicit const conversion function to pointer to function having the same parameter and return types as the closure type's function call operator. The value returned by this conversion function shall be the address of a function that, when invoked, has the same effect as invoking the closure type's function call operator.

This is important as the unary operator + has a set of built-in overloads, specifically this one:

13.6 Built-in operators [over.built]
8 For every type T there exist candidate operator functions of the form
    T* operator+(T*);

And with this, it's quite clear what happens: When operator + is applied to the closure object, the set of overloaded built-in candidates contains a conversion-to-any-pointer and the closure type contains exactly one candidate: The conversion to the function pointer of the lambda.
The type of test in auto test = +[]{}; is therefore deduced to void(*)(). Now the second line is easy: For the second lambda/closure object, an assignment to the function pointer triggers the same conversion as in the first line. Even though the second lambda has a different closure type, the resulting function pointer is, of course, compatible and can be assigned.
Comment: Fascinating. And what's the point of unary `+` for pointers? I understand it exists for numeric types for completeness with unary `-`. But unary `-` with pointers makes no sense.
Comment: It is useful if you want to force decay of arrays or functions and if you want to force promotion of small integer types or unscoped enumerations.
Comment: @TadeuszKopec … And for all types, it removes lvalue-ness. You can use it to pass a value instead of a reference to a function overloaded on both, e.g. by perfect forwarding.
Comment: @Potatoswatter: _"And for all types, it removes lvalue-ness."_ `+lvalue` is not defined for all types, and for some of those where it is it is just an overloaded function call so could produce any value category of any unrelated type, for some yet other cases it doesn't produce the same type.  It would be an odd use to use it to pass by value instead of reference.  The better way would be with `static_cast(lvalue)` to get a prvalue of type T from an lvalue.  _"customary to use a generic function called val()"_: This isn't clear, can you show an example/link of such a `val()` function?
Comment: @user1131467 I simply mean, if you aren't specifically using the built-in `operator+`, you should define a function `val` which effectively does the `static_cast` you mention, rather than sticking to prefix `+` notation.
Comment: @ThomasMcLeod It's what I quoted from 13.6: operator `+` has candidates like `T* operator+(T*)` and therefore any pointer will do. The operator tries to find some way to apply to its argument, the lambda. The lambda can be converted to a pointer and it is the only candidate that is available, so it *is* converted to the pointer to the function, which return the pointer itself as specified by 13.6.
Comment: @TadeuszKopec That's a good question and I'm afraid I don't have an answer for that. Note that for pointers 13.6/8 only defines `+`, not `-`.
Comment: (For non-primitive types, it's more customary to use a generic function called `val()` than an `operator+` overload, though.)
Comment: The advantage of Potatoswatter's val function is that it uses implicit conversions, not a forcible cast.  So it cannot accidentally break if the type changes later.
Comment: What is a "conversion-to-any-pointer" ?
Comment: But for the implicit `operator+` not any pointer will do, it needs a pointer to , unless I missed something.
Comment: @ThomasMcLeod No, that's the whole point, any pointer conversion will do. That's what I mean by conversion-to-any-pointer. [build.over] does not form actual overloads like you'd normally write, it just tries to find *anything* that can provide a pointer (in this case). From the intro of [build.over]: "[...] **operator overload resolution can resolve to a built-in operator only when an operand has a class type that has a user-defined conversion to a non-class type appropriate for the operator**, or [...]".
Comment: @DanielFrey, my apologies. I misunderstood the meaning of "built-in".  I thought we were talking about member function unary overloaded operators as in 13.5.1.


In single-slit interference, why don't we consider all combinations of points and their contribution to the diffraction pattern?

Question: The explanation I was taught back in college was that we take points $a/2$ spaced apart where $a$ is the width of the slit, and at certain angles the difference in distance traveled will be half a wavelength apart causing destructive interference, causing dark fringes. Then repeat this for for the points $a/4$, $a/8$, etc. spaced apart (uhh...what? I thought if the points are half as close, then the difference in distance traveled will also decrease and it wouldn't be fully destructive). But the major issue with all this is that we aren't considering each pair of points along the single slit, and I feel like every pair of points would contribute to the diffraction pattern on the wall. Why is this not the case?
Comment: "... where a is the length of the single slit ..." I think you mean the *width*.
Comment: https://physics.stackexchange.com/questions/257768/what-are-interferences-of-higher-order-in-the-context-of-born-rule-and-triple. This answer maybe helpful!  See the last answer ...
Answer: To get the pattern, it's enough to find the directions of zero intensity by the principle that any ray has a partner anihililating it. The actual form of the intensity between two zeros depends on the interference of rays from all points.
This rule of thumb is not very convincing mathematically, because it somehow  assumes that the continuum of rays is countable.
In order to make the argument correct one uses the path integral formalism, that tries to include all continuous paths between a point and all points over the source and adds all phases varying with path lengths.
By hand waving or by similarities to distributions over path of Brownian motion in imaginary time, one finds that only a small portion of paths in the neighbourhood of Fermat's geometrically shortest light ray add up constructively; all others yield a random phase noise background.
Answer: "... we aren't considering each pair of points along the single slit ..." No, but we are considering each point, and we're choosing to add the contributions from each point in the most convenient way, selecting the points a pair at a time, such that the contributions from each pair cancel to zero. [Real number analogy: $\text{If } a+d=0,\ b+e=0,\ c+f=0,\ \text{then }a+b+c+d+e+f=0$.]
We know that waves leaving the one edge of the slit (width $b$) at an angle to the normal of $\theta=\arcsin{(\lambda/b)}$ will cancel to zero with waves leaving from the middle of the slit. So if we work our way along the first half of the slit width-wise from that edge, and along the second half, starting at the middle, corresponding points in the two halves will, at angle $\theta$, produce waves that also cancel to zero. This is because the path difference is $\lambda/2$ in each case. So the contributions from every point add to zero.


URL Hacking - autosave

Question: Is there a way to autosave a record that is created or opened for editing in salesforce ?  In light of this feature not being available in salesforce my users are complaining about losing data even with a lengthy time out set. Simply put, they are entering extensive prose and during the course of a day are interrupted. Any way to add a parm to the url or other method ????
Answer: There's no real solution outside of "saving frequently," at least within salesforce.com itself. You could turn on the "timeout popup" box, so they can at least know they need to log back in before continuing. Also, you can increase the session time to the maximum, which should last for an entire work day worth of time. If your users are using Chrome or Firefox, they could use Lazarus: Form Recovery (a free addon) that can recover a form's content in the event of a session timeout.
Answer: Those types of url hacking are not supported by Salesforce, but are possible by raising a case. There are however security risks as a consequence of implementing them:
How can I allow "autosave by URL"?
Answer: Unfortunately, I'm pretty sure there's no way to do this just through the URL. I was thinking you might be able to get creative with javascript in a sidebar component, but it doesn't look like Save is available to $Action...
Your users may need to suck it up and learn to click save more often... :/
Answer: The best thing to do here is override edit page with VisualForce page and periodically save content to SF record.
Steps:

override edit page with Visual Force page
add JavaScript, something like this (jquery usage)

var cleared = false;
$('input,select,textarea').on('change',function(){
    if(cleared==false){
        timeout = setTimeout(function(){
            //autosave, VisualForce remoting function that saves changes
            //be careful to return id of record on first saving to save every other change to the same record
            cleared = false;
            },10000);
    }
    cleared = true;
});
This piece of code with call your autosave function every 10 second after changing something in input field.
Answer:
Add VF Page component to std. VF Page. Make the VF Page component's height to 1px so that it is not visible.
Add a JS function (say AutoSave) in VF Component which calls Window.SetInterval every 5 sec or 10 sec or whatever interval you are looking for.
Invoke a VFRemoting function within AutoSave function and pass all the TEXT input values to Apex controller(send it as an Obj). Update the record with new values via  RemoteAction Apex function from the controller side.

Note: This solution  is a long shot, meaning it takes longer to develop and hard to maintain.
In my view, these kinds of problems are business process issues and not a technical issue.

URL Hacking - autosave


How to cover the top and bottom of a piece with a self-leveling epoxy resin?

Question: Is there a good way to cover both the top and bottom of a piece with a self-leveling epoxy resin?  I have a small box/basket that I'd like to have in my kitchen to hold cooking oils.  Since the bottles will likely leak cooking oil, I'd like to treat the wood with an epoxy resin, so that it will be durable and more easily cleaned.  And, it case it's not clear, by epoxy resin I mean a material similar to what's used to finish bar tops.  Anyway, all of the resources I see on using epoxy resin cover finishing the top and sides of the piece.  Basically, we pour and spread the resin on the top and it runs over the side.  What's not clear to me is what to use on the bottom of the piece.  Can we use the epoxy resin on the bottom as well?  If so, it's not clear to me how to accomplish this.  Every piece I've seen has drips from the epoxy along the bottom.  I suppose we could sand these drips down, but then we'll have the same issue when we flip over the piece and treat the bottom.  Certainly, I could use a different product on the bottom, but I'd rather just use the same durable finish on all sides.  Is there a good way to accomplish this?
Comment: You don't need to coat the bottom, but if you *want* to just do it as a second operation and tape the sides to create a dam. BTW epoxy is overkill for this, varnish or shellac would be sufficient to seal off the wood.
Comment: @mickburkejnr They would provide sufficient protection, but that's not to say they'd provide the same amount. Few things can compete with a pour-on finish for protection, one application can be equivalent to the thickness of over 20 coats of varnish and in addition they're typically harder and less permeable.
Comment: Varnish or shellac would be easier to apply and give the same ammount of protection.
Answer: The only way I can see to do it is to thicken the epoxy with something like   colloidal thickening silica, but every thikener shoul work reasonabily well, until it is thick as a filler and then apply it with a spatula in a thin layer, wait until the epoxy is almost cured and then apply another layer (for the workability time refer to the resin manufacturer instructions). This way you can also add some dye to have a particular color, if you like
Be sure that the epoxy is resistant to the UV rays, else it will become yellow-ish after some time, and it is not really nice.


Is the し in はじめまして pronounced as "shi" or as "sh"?

Question: Is this always the case for words that end in して similar to how です is pronounced "des"?
Answer: From what I hear, usually, the じ in はじめまして is included in the greeting. People shorten the "shi" into sounding like "sh" is because it would be more convenient in conversations. The same applies to "desu".  If you are using Romanization(changing Japanese symbols into  English pronunciations), keep in mind that in order to speak to the same dialect of a Japanese local, you should shorten words like "desu" to sounding like "des" to make more efficient.