What does it mean for a char to be signed?

Question: Given that signed and unsigned ints use the same registers, etc., and just interpret bit patterns differently, and C chars are basically just 8-bit ints, what's the difference between signed and unsigned chars in C?  I understand that the signedness of char is implementation defined, and I simply can't understand how it could ever make a difference, at least when char is used to hold strings instead of to do math.
Comment: the answer is simple, your assumption that chars aren't used for math is wrong. I frequently use "uint8_t" and "int8_t" in system code which are often defined as unsigned and signed char respectivly.
Comment: I think part of this is me forgetting that there's no distinct byte/unsigned byte type in C.
Comment: possible duplicate of [Difference between signed / unsigned char](http://stackoverflow.com/questions/4337217/difference-between-signed-unsigned-char)
Answer: It won't make a difference for strings. But in C you can use a char to do math, when it will make a difference.
In fact, when working in constrained memory environments, like embedded 8 bit applications a char will often be used to do math, and then it makes a big difference. This is because there is no byte type by default in C.
Comment: He's saying there's no type called `byte`, not that no type is a byte.
Comment: Does this explain why even using signed char? when all characters can be represented in unsigned char? (I presume the negative values don't encodes to anything). Imo unsigned char should be the default type instead of signed char.
Comment: There is the `uint8_t` type in C. Unless the system is completely obscure, bytes are 8 bits.
Answer: In terms of the values they represent:
unsigned char:

spans the value range 0..255 (00000000..11111111)
values overflow around low edge as:
0 - 1 = 255 (00000000 - 00000001 = 11111111)
values overflow around high edge as:
255 + 1 = 0 (11111111 + 00000001 = 00000000)
bitwise right shift operator (>>) does a logical shift:
10000000 >> 1 = 01000000 (128 / 2 = 64)

signed char:

spans the value range -128..127 (10000000..01111111)
values overflow around low edge as:
-128 - 1 = 127 (10000000 - 00000001 = 01111111)
values overflow around high edge as:
127 + 1 = -128 (01111111 + 00000001 = 10000000)
bitwise right shift operator (>>) does an arithmetic shift:
10000000 >> 1 = 11000000 (-128 / 2 = -64)

I included the binary representations to show that the value wrapping behaviour is pure, consistent binary arithmetic and has nothing to do with a char being signed/unsigned (expect for right shifts).
Update
Some implementation-specific behaviour mentioned in the comments:

char != signed char. The type "char" without "signed" or "unsinged" is implementation-defined which means that it can act like a signed or unsigned type.
Signed integer overflow leads to undefined behavior where a program can do anything, including dumping core or overrunning a buffer.
Comment: [In contrast, the C standard says that signed integer overflow leads to undefined behavior where a program can do anything](http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Integer-Overflow-Basics.html#Integer-Overflow-Basics) For historical reasons the C standard also allows implementations with ones' complement or signed magnitude arithmetic
Comment: @Altes Goral: I like your answer but I think you should mention that char != signed char. The type "char" without "signed" or "unsinged" is implementation-defined which means that it can act like a signed or unsigned type.
Comment: Hmmm ... isn't the overflow behavior of signed types implementation defined?
Comment: @Ates: Yes: e.g. if your loop index is a signed integer type, optimizers will generate more efficient loop code because they don't have to worry about doing the expected thing in the face of overflow.
Comment: @MartinBa I don't know. Do you know of any instances where it is different or are you merely asking? My intuition tells me that the behaviour should be consistent because I wouldn't imagine a C implementation doing anything beyond what the underlying CPU does for some ADD machine instruction -- it's the same bitwise addition of bits, as far as my limited knowledge of CPUs serves me.
Comment: @MartinBa Thanks for that info! I wonder if any modern (relevant) implementation do anything beyond regular CPU-level arithmetic (i.e. the overflow behaviour is defined and consistent across implementations)...
Comment: Nice. Seeing how that high-order bit is handled differently between the two types when the value is overflowed did the trick for me!
Answer: #include <stdio.h>

int main(int argc, char** argv)
{
    char a = 'A';
    char b = 0xFF;
    signed char sa = 'A';
    signed char sb = 0xFF;
    unsigned char ua = 'A';
    unsigned char ub = 0xFF;
    printf("a > b: %s\n", a > b ? "true" : "false");
    printf("sa > sb: %s\n", sa > sb ? "true" : "false");
    printf("ua > ub: %s\n", ua > ub ? "true" : "false");
    return 0;
}

[root]# ./a.out
a > b: true
sa > sb: true
ua > ub: false

It's important when sorting strings.
Comment: "By default, char is signed" As the OP said - that is implementation defined.
Answer: There are a couple of difference. Most importantly, if you overflow the valid range of a char by assigning it a too big or small integer, and char is signed, the resulting value is implementation defined or even some signal (in C) could be risen, as for all signed types. Contrast that to the case when you assign something too big or small to an unsigned char: the value wraps around, you will get precisely defined semantics. For example, assigning a -1 to an unsigned char, you will get an UCHAR_MAX. So whenever you have a byte as in a number from 0 to 2^CHAR_BIT, you should really use unsigned char to store it.
The sign also makes a difference when passing to vararg functions:
char c = getSomeCharacter(); // returns 0..255
printf("%d\n", c);

Assume the value assigned to c would be too big for char to represent, and the machine uses two's complement. Many implementation behave for the case that you assign a too big value to the char, in that the bit-pattern won't change. If an int will be able to represent all values of char (which it is for most implementations), then the char is being promoted to int before passing to printf. So, the value of what is passed would be negative. Promoting to int would retain that sign. So you will get a negative result. However, if char is unsigned, then the value is unsigned, and promoting to an int will yield a positive int. You can use unsigned char, then you will get precisely defined behavior for both the assignment to the variable, and passing to printf which will then print something positive.
Note that a char, unsigned and signed char all are at least 8 bits wide. There is no requirement that char is exactly 8 bits wide. However, for most systems that's true, but for some, you will find they use 32bit chars. A byte in C and C++ is defined to have the size of char, so a byte in C also is not always exactly 8 bits.
Another difference is, that in C, a unsigned char must have no padding bits. That is, if you find CHAR_BIT is 8, then an unsigned char's values must range from 0 .. 2^CHAR_BIT-1. THe same is true for char if it's unsigned. For signed char, you can't assume anything about the range of values, even if you know how your compiler implements the sign stuff (two's complement or the other options), there may be unused padding bits in it. In C++, there are no padding bits for all three character types.
Answer:

"What does it mean for a char to be signed?"

Traditionally, the ASCII character set consists of 7-bit character encodings.  (As opposed to the 8 bit EBCIDIC.)
When the C language was designed and implemented this was a significant issue.  (For various reasons like data transmission over serial modem devices.)  The extra bit has uses like parity.
A "signed character" happens to be perfect for this representation.
Binary data, OTOH, is simply taking the value of each 8-bit "chunk" of data, thus no sign is needed.
Answer: Arithmetic on bytes is important for computer graphics (where 8-bit values are often used to store colors).  Aside from that, I can think of two main cases where char sign matters:

converting to a larger int
comparison functions

The nasty thing is, these won't bite you if all your string data is 7-bit.  However, it promises to be an unending source of obscure bugs if you're trying to make your C/C++ program 8-bit clean.
Answer: Signedness works pretty much the same way in chars as it does in other integral types.  As you've noted, chars are really just one-byte integers. (Not necessarily 8-bit, though!  There's a difference; a byte might be bigger than 8 bits on some platforms, and chars are rather tied to bytes due to the definitions of char and sizeof(char).  The CHAR_BIT macro, defined in <limits.h> or C++'s <climits>, will tell you how many bits are in a char.).
As for why you'd want a character with a sign:  in C and C++, there is no standard type called byte.  To the compiler, chars are bytes and vice versa, and it doesn't distinguish between them.  Sometimes, though, you want to -- sometimes you want that char to be a one-byte number, and in those cases (particularly how small a range a byte can have), you also typically care whether the number is signed or not.  I've personally used signedness (or unsignedness) to say that a certain char is a (numeric) "byte" rather than a character, and that it's going to be used numerically.  Without a specified signedness, that char really is a character, and is intended to be used as text.
I used to do that, rather.  Now the newer versions of C and C++ have (u?)int_least8_t (currently typedef'd in <stdint.h> or <cstdint>), which are more explicitly numeric (though they'll typically just be typedefs for signed and unsigned char types anyway).
Answer: The only situation I can imagine this being an issue is if you choose to do math on chars.  It's perfectly legal to write the following code.
char a = (char)42;
char b = (char)120;
char c = a + b;

Depending on the signedness of the char, c could be one of two values.  If char's are unsigned then c will be (char)162.  If they are signed then it will an overflow case as the max value for a signed char is 128.  I'm guessing most implementations would just return (char)-32.
Answer: One thing about signed chars is that you can test c >= ' ' (space)  and be sure it's a normal printable ascii char. Of course, it's not portable, so not very useful.
Comment: The standard library contains a function called isprint, which checks whether a character is printable, so this trick isn't useful at all.
Comment: But ASCII code 127 is "delete", not a visible graphical character, and your proposed check will merrily accept that. It's not even portable in the sense of being reliably interpreted by terminals.


Delete all demo data

Question: Many templates come with demonstration data that may be installed to show off the features of a template. Is there a simple method of deleting all this data or am I going to be forced to delete each item individually?
Comment: no simple method of deleting - but you could just install without the demo data.
Comment: Templates themselves don't come with sample data. You've most likely installed the quickstart package which includes the entire Joomla CMS **and** the template. When installing the quickstart package, you have the choice to install sample data. Simply uncheck it ;)
Comment: Just to clarify, the content is already on the site. It includes articles, categories, etc. It would be nice if there was some way to just wipe all of it out and be able to start fresh without having to reinstall the whole CMS from scratch. But then again I suppose a 'button' with that ability would be rather dangerous!
Comment: Are you trying to remove articles including its category only, or you want to remove other things such as modules, plugins and settings those come with template installation?
Answer: Go to
1) Content->Articles, Check All and Trash.
2) Content->Categories, Check All and Trash.
Voila: all content in Trash. Then you can Empty trash.
Comment: you also need to delete some modules and menu items.
Comment: and contacts, and banners, and newfeeds, and tags

Delete all demo data


Can you store items in npc inventory?

Question: So I was wondering if I could store items like weapons on npc's and leave them to their business, without lossing my stuff?
Answer: Items given to NPCs via pickpocketing will not permanently stay there. Usually they will disappear after certain events, like leaving the area or simply letting some time pass.
Stolen items will replenish in an NPCs inventory in the same way.
Answer: Inventory is a tricky thing. It depends on the NPC, and what the NPC is doing.

Non-follower NPCs can be reverse-pickpocketed or pick up items you drop, or be sold items.  These items will stay in inventory temporarily.  If anything resets the NPC's inventory due to a scripted quest, time passing without you in the cell, or in some cases, interacting with other NPCs, items can leave inventory forever and be unretrievable.  These NPCs are no more containers than the containers in their homes, which are subject to cell resets.
Follower NPCs will maintain the items in their inventory most of the time. If they are dismissed and allowed to sandbox, it's possible for them to lose inventory (although very rare and usually related to a quest tied to the companion).  They will not lose equipped inventory. They aren't supposed to lose any inventory in this way, so if it happens, its likely a bug.
All NPCs will use potions from their inventories, and their use of
enchanted weapons does discharge the weapon based on their skill with
the associated magic type.

It is important to note that an NPC may not always be the same NPC.  An example is a quest in the Interesting NPCs mod where a woman wants to become something powerful.  If you help her, she changes into a monster.  The monster is still the "same character" but the inventory changes because the actual NPC is what changed.
TL;DR: only store items with your followers or containers you own that aren't subject to cell resets.
Comment: Another example: In vanilla, Cicero is three different NPCs depending on where you are in the Dark Brotherhood quest line.
Answer: NPCs that don't respawn will keep items forever, anything you give/reverse pickpocket or they pick up. Respawning NPCs will lose items even if they're you followers, such as dark brotherhood initiates. Items traded to merchants will also reset as they're in special containers rather than merchant npcs' inventories.

Can you store items in npc inventory?


Heat production of magnifying glass

Question: Why Magnifying glass(convex lens) produces heat when placed in front of sun?
Comment: It doesn't.  Do you know what a convex lens does with light?
Comment: @CarlWitthoft Then why do a paper gets burnt when placed under it?
Answer: When you focus light from the Sun you are actually creating an image of the Sun. If the focal length of the lens is $f$ the radius of the image is given by:
$$ r = \frac{r_s}{d_s} f $$
where $d_s$ is the distance to the Sun and $r_s$ is the radius of the Sun. The fraction $r_s/d_s \approx 10^{-3}$, so if you choose a lens with a focal length of 10cm the radius of the image is about 0.1mm (assuming the lens is perfect).
The intensity of sunlight is around 1kW per square metre - the exact value depends on latitude, season, time of day, cloud cover, etc, etc so let's just take 1kW/m$^2$ as a representative figure. All the light falling on your lens is being concentrated into the 0.1mm radius image of the Sun, so if the radius of your lens is $r_l$ the power per unit area in the image is:
$$ I = \left(\frac{r_l}{0.1 mm} \right)^2 1kW/m^2 $$
So if the lens radius is 5 cm, which seems a fairly standard size for a lens, then the power per unit area in the focussed image of the Sun is about 250MW/m$^2$ or 250,000 times the intensity of Sunlight on the Earth. That's why it's hot!
Of course the total power isn't very great, because even though the focussed light is very intense the area of the 0.1 mm image is only about $3 \times 10^{-8}$ square metres. The total power is just the area over which light is being collected (the area of your lens) times 1 kW. A bigger lens will capture more sunlight and focus more power.
Answer: It is the sun that produces the energy that falls on the convex lens in the form of light (and a bit more than just light in the visible part of the spectrum). The lens concentrates all this light in a small spot. A good fraction of the energy is converted to heat if the material at the focal point is suitable.
Comment: +1. The sun is incredibly inefficient, when you think about it. Why don't we invest in a compact fluorescent star…
Answer: The lens focuses light due to refraction.  Absorbance of light by a surface creates heat.  More intense light due to focusing creates more heat per unit area at the focal region.

Heat production of magnifying glass


Does the charge distribution of two uniformly charged conducting spheres change as we bring them near each other?

Question: Assume that we have positively charged two solid conducting spheres of the same radius and material. It is evident that the surface charge is uniform on them to eliminate the internal electric field everywhere inside the spheres. However, how does the charge distribution change if we bring them close to each other? Recall that we place them close (not in contact) to each other. Does the exerted Coulomb's force upset the uniformity of the surface charges on both spheres? How can we find the new charge distribution so that the internal electric fields remain zero?
Comment: @AXensen Yes, they do.
Comment: I'd say, yes they change and you can find the charge distribution solving a boundary element problem, if you know the potential of the 2 spheres. Try to have a look here https://physics.stackexchange.com/q/781452. I'll have a think if there is some simple way to exploit symmetry to get the solution. The internal field = 0 appears as a boundary condition of the differential equation
Comment: [Electrostatics of two charged conducting spheres](https://www.researchgate.net/publication/258710075_Electrostatics_of_two_charged_conducting_spheres)
Comment: @Farcher Seems to be a useful article, thanks.
Answer: Some of your question can be answered conceptually. A uniformly charged sphere on its own is an equipotential surface, and it makes a potential outside of itself of $(1/4\pi\epsilon_0)Q/r$. Thus if two uniformly charged spheres are brought near eachother, they will no longer be equipotentials. The electric field created by sphere $1$ makes sphere $2$ no longer an equipotential. If the spheres are conducting, the charges on sphere $2$ will move to counteract the influence of sphere $1$ (and, of course, vice versa).
One way of calculating this is with a multipole expansion of the potential of the spheres. If the spheres are far apart, then to leading order sphere $1$ creates a constant electric field at sphere $2$. This can be fixed by giving each sphere a dipole moment (a charge distribution $\propto-\cos\theta$, where $\theta$ is the angle formed by the center of the sphere, the point on the sphere in question, and the other sphere). Such a charge distribution's magnitude can be adjusted to cancel the electric field within the conductor. Of course, higher order multipole moments can be introduced for more precision.
However, this particular problem can also be solved exactly with the method of images. We'll construct an image charge solution to the electric field outside of the conducting spheres. Our solution needs to satisfy three requirements in order to be the uniquely correct electric field throughout space:

The total charge on each sphere is $Q$. This means all image charges inside one sphere need to add to $Q$.
The spheres are equipotentials. This means for each image charge we place outside of a sphere, it should have a partner inside the sphere whose magnitude and position is dictated by the spherical image charge solution. A single charge can be placed at the center of the sphere whose magnitude can be adjusted to achieve condition (1). It does not need an image charge outside because it does not disrupt the equipotential on the surface.
It needs to satisfy the Laplace equation, which is to say that all image charges must be located within the spheres.

We solve this problem with an infinite series of image charges. First, we place initial charges $Q$ in the center of each sphere. Each charge gets an image charge in the other sphere. Google "spherical image charge solution" if you don't know where to place those image charges or how big to make them. Then those image charges get image charges... etc. This converges because each image charge gets smaller and smaller by roughly a factor of $r/d$. When you've listed out all the image charges, sum up the total charge, and rescale to get the desired total charge.
Then you can calculate the distribution of real charges on the surface of the spheres. Just find the electric field at a given point on the surface of the sphere from the image charges and multiply by $\epsilon_0$ to get the surface charge density (of real charges) at that point.


If I dual boot Windows 10 and Ubuntu, could a keylogger affect me if i'm on Ubuntu?

Question: If I have a keylogger on Windows 10, can it affect me when I boot into Ubuntu on the same computer.
Comment: Is it a [hardware keylogger](https://en.wikipedia.org/wiki/Hardware_keylogger)?
Comment: Note that it's pretty trivial to write a keylogger for Ubuntu. Try to install `xinput`, open a terminal and launch it as `xinput text ` then open a different terminal and try to do something with `sudo`. Observe how the the events are intercepted when you are typing your password.
Comment: Theoretically it could. It most likely doesn't.
Answer: No: when you boot into Ubuntu, programs stored on the Windows 10 partition cannot be run and cannot log what you are doing on Ubuntu.
Windows also can not store files on an Ubuntu system since it does not recognize ext4 filesystems.
So for a virus/keylogger/whatever to infest Ubuntu, it would need to magically move itself to something you can open in Ubuntu. You need to activate that something by making it executable, clicking it in Ubuntu to run it and it would need to have valid instructions for an Ubuntu system to be able to run.
Not going to happen any time soon.

A possible method (but it is a stretch): from Windows you get infected by  UEFI malware; when Ubuntu is booted it copies some software over to your Ubuntu system and executes itself. (that is assuming something can be copied over from an UEFI partition to another partition).
Comment: Malware can include code to read/write ext4 / xfs / btrfs if it wants to, so it can try to infest the Linux side of dual boot systems.  It's not like a few hundred extra kB of code will make a piece of malware harder to hide.
Comment: Theoretically, in could install itself in Ubuntu's start up folder.
Comment: it could if you don't have encryption on.
Comment: Note that a *hardware* keylogger that's between the keyboard and the computer will still work just fine no matter what.
Comment: If the malware has read access to the hard drive, then it can do whatever it likes. It is only limited by the author's skill and imagination. "Windows does not support ext" is almost meaningless in this context as that doesn't prevent the malware supporting it (not to mention other attack vectors e.g. infecting your hardware's firmware).
Comment: Not directly from windows though.
Comment: How? Windows does not support ext. You can not even mount an ubuntu partition from Windows.
Comment: Not to mention that whilst windows doesn't natively support ext, its easy enough for a dual boot user to install free software that adds ext support to windows.
Answer: As some comments have already stated, it's absolutely possible that a malware can jump between different operating systems on dual boot. There are only two barriers the malware must overcome:

It must bring its own ext3/4 driver to handle the file system used by Ubuntu
It must run with high privileges in order to access the required APIs

Everything else is just a question of the attackers intentions and skill. I don't know any case where "COTS" class malware did this. But when you look at some "weapon" class of malware you'll see modules to persist in BIOS or even the firmware of your hard drive. You will also see that it's highly modular so that every kind of functionality can be added at any time. So if the attacker thinks its necessary, there will be a module for it.
However if you are using full disk encryption (not only /home) it's much harder to jump over.
Otherwise the attacker could just modify existing binaries or scripts which are executed by default by the system.
Comment: Many dual boot users may install software in windows allowing them to read ext partitions. Malware could also merely detect if this is installed and use it if available. A reduced attack vector than including its own, but certainly easier to implement.
Answer: Windows 10 can only track you when it is booted. As privacy-invading as Microsoft is, they can't legally (I hope), make it so something is injected into Ubuntu to track you there too. Unless Windows is booted, it is completely inactive, tracking features and all.
Comment: ? What does this have to do with a keylogger.. I would downvote if I could
Comment: Ah dude, it's no secret that Microsoft Windows 10 has an integrated keylogger, that is forcefully enabled... I too thought OP was asking about Windows 10's keylogger, since he didn't mention otherwise.
Answer: I think it's safe to say, no. If it's a program on the windows OS it would be extremely un-likely it would function on Ubuntu. If it's a hardware key-logger then it would work regardless of any OS running.
Just make sure there aren't any strange devices plugged into your computer.
Answer: Depending on if the "malware" was coded to look for dual boot configs which many rarely do as it adds many, MANY more lines of code and is an overall headache, but i wouldnt put it past microsoft to do so.... if it can check for dual boot systems it would most likely remain in the bootsector, reason for the bootsector would be to detect the presence of a grub loader, which, id suggest poking around there with EXTREME caution, and it would be worth seeing if you could modify the "malware" so that it was unusable, but still showed as though it remained on your system.
Comment: This is highly unlikely.  If malware was going to attack the other OS in a dual boot system, it wouldn't just modify the boot loader that ultimately loads Linux (GRUB stage 2), let alone just the boot *sector* or earlier GRUB stages.  Once Linux (the kernel) is loaded, it takes over.  For a modified GRUB to infect Linux at boot time, it would have to make a complicated modification to the kernel and/or the initrd as they were being loaded.  But they're compressed, and decompress themselves on the fly.  Easier for win malware to use an ext4 library and write to the root FS.
Comment: it could nestle itself into uefi but that should invalidate the sign would it not? Not sure though.
Comment: Not too crazy familiar with bootsectors, but if they designed the OS with it already in, then probably not.
Comment: Yeah that is true.  Well... I have no windows so i am safe  _O-
Comment: Lol, i still run win7, i mean bootsector virus' have been around for many decades. Refined technologies or methods would make it run seamlessly along side the bios even if they decided to inject it later. Either way, im switching everything over to linux, just having some issues with my ubuntu right now, debating on an arch distro...... cant decide -.-
Comment: My comment was still revelent to this or no? Just curious if i was on track or WAY off with it.
Answer: No.
If you install keylogger in windows it doesn't effect on ubuntu.
Because ubuntu didn't support exe excution without wine virtual enviorment.
So don't worry.
Comment: Microsoft Windows 10 has a built-in keylogger (that is permanently enabled for most users!) and as a number of other people have already pointed out, it's theoretically possible for keylogers to operate cross-operating system... Albeit unlikely.


SiteMap / webmaster / google adsense

Question: Can we apply for Adsense without sending Sitemap to webmaster tools ?
Comment: Why wouldn't you want to send a sitemap?
Answer: Yes.
Here are the published AdSense requirements, policies, and terms. The word "sitemap" never appears. Nor does a sitemap seem to have any obvious relevance to AdSense, since the ads are based on the pages the ads appear in not some overall spidering of the site.
Your demand for "100% correct knowledge" suggests you have some doubts about this. Maybe you should explain why you're asking in your question.
Answer: Adsense required some geniune content and sizeable content in your website. site wap not required for adSense

SiteMap / webmaster / google adsense


être flingué meaning

Question: Please,  I came across this expression and I couldn't understand it (être flingué) could anyone give me its definition and put it in an example?
Thanks in advance
Comment: Please change the title of your question to something more specific. Anyone that posts a question hopes someone will answer their question...
Comment: Have you look at a dictionnary first?
Comment: If what you found in a dictionary doesn't seem to fit in the context in which you heard the word, do mention the context in your question.
Comment: @StéphaneGimenez Did you find anything? OP didn't say they looked in a dictionary but I couldn't find anything satisfying. I don't think it should be on hold.
Answer: "être flingué" generally means to be exhausted. Note that this is an extremely familiar expression and can't be used in a professional context (unless you are at ease with your colleagues).
More specifically, "être flingué" can also mean that you are drunk or under the effect of a drug depending on the context.
An example of a use of "être flingué" would be :

"J'ai super mal dormi, je suis flingué"

roughly meaning

"I slept really poorly, I'm exhausted"
Answer: In argot (the French language used by the underworld), a flingue is a gun. Hence, the verb flinguer means "to shoot at someone with a gun", or "to kill someone with a gun".
Ex:

Le terroriste a tenté de fuir, et la police l'a flingué.

Used in familiar usage, it can be used figuratively, and it then means either:

to break something

J'ai tellement joué à la Playstation que j'ai flingué la manette

to criticize heavily someone or something or to give a bad rating

Les professeurs ont tous flingué son travail de fin d'étude.
  Le directeur des ventes a flingué les vendeurs qui n'avaient pas atteint leurs objectifs.

Être flingué is the passive form of the verb and can be used for any of the meanings above.
Comment: *Ce film est flingué par la critique*  - c'est aussi être flingué , non ? Hors contexte (non donné par la question), j'ai donné les sens courants.
Comment: Être flingué c'est être (très) fatigué, je sais pas comment t'as fait pour inclure toutes les autres définitons mais pas celle-là ^^

être flingué meaning


Greek Mythology Movie about Theseus and the Minotaur

Question: Hope someone else has seen this movie based on Theseus and the Minotaur.
When I was a kid (age 4-10) between 1977 and 1983, I remember watching a classic movie about the myth of Theseus and the Minotaur. This was around the same time when they were showing the movie: The Three Stooges Meet Hercules (1962).
They also used to show The Mighty Hercules cartoon (1963) around that time. Once these stopped showing on TV, so did this mystery film that I saw, which I'm trying to find. I am from Australia.
All I can remember about the movie which has always stuck in my mind is that the main character (let's call him Theseus) is told by his father to change the black sails to white sails if he is alive and is returning safe and well to his homeland.
At the end of the film, he forgets to change the color of the sails to white, so his father thinks that he has been killed by the Minotaur. So right at the end of the film, the father kills himself by jumping off a cliff and into to sea. I vividly remember this scene. I always felt very sad when that happened. I have seen the film probably 3 or 4 times, but cannot find any hint of it anywhere.
It is not the Italian-made movie The Minotaur, the Wild Beast of Crete (1960). That's what most people think it is. The other strange thing about this film is that I think the hero was not named Theseus. I can sort of recall as a kid wondering why the main character had a different name to the Greek hero from the Greek myth, after learning about the myth. It puzzled me.
Thought it was a Rank film and went through many of their films, but no luck. Has anyone else seen this film? Spent years trying to find it.
In response to some of the comments below: This was a film similar in style to Jason and the Argonauts (1963), The 300 Spartans (1962), and The Minotaur, the Wild Beast of Crete (1960). It was a color film and a serious film, not a comedy. For some reason, I cannot remember anything about the Minotaur in the film, which is kind of strange. But just like the movie, The Three Stooges Meet Hercules (1962), I could only remember the scene where the guy grew massive muscles when rowing the boat, which stuck with me, and that the Three Stooges were in the movie. I knew that was definitely a movie, and only saw it again twenty years later after first seeing it as a kid. It was like watching it for the first time. I have asked a video store guy (about 60 years of age) who had a massive collection of old sci-fi and fantasy movies (VHS and DVD) and had watched most of them. He was also a massive fan of fantasy and sci-fi movies. He hadn't seen the film but thought it could be The Minotaur, the Wild Beast of Crete film after looking it up on the Internet. I have also asked a couple of website guys who have sites dedicated to classic movies. One of them also suggested that it could be The Minotaur, the Wild Beast of Crete. After that, I had to clarify that it was not that movie. Because that movie doesn't have the white/black sails in it, or the king at the end of the movie jumping off the cliff.
Another update: At one point I even asked AI to give me the movie's name. It suggested one of the Sinbad movies. One of them does have the Minotaur in it. But I watched all of them after that suggestion, and none of them were even close. The movie I am seeking has an ancient Greek/Roman feel about it and is probably a 1960-1970s film. I also remember watching the movie around the same time as the Hercules (1983) film, which had a sci-fi theme and starred Lou Ferrigno, who played the Incredible Hulk in the TV show (1977-1982). So I suppose the movie I am seeking could have been playing on Australian TV until 1985 max (when I was 12 years of age). I can only recall seeing the film in primary school. At age 13 in 1986 I went to high school, and I am pretty certain I never saw it when I was in high school. Also, at the end of the film, some words were scrolling down from the screen giving some sort of conclusion to the movie, at the same time as when the father disappeared off the cliff, which was the end of the movie.
** Update about accents in response to question below ** I cannot recall anything peculiar about the accents but they were most likely British, with similar accents to those in the movie Jason and the Argonauts. Even though the actor who played Jason in Jason and the Argonauts was American, his voice was dubbed using a British accent. I cannot recall reading any subtitles when watching the film, but I suppose I can't 100% rule it out. Since I can only remember a few fragments of the movie, I can't be sure about the accents and what I was watching.
Comment: Was the film live action, animated, stop motion…?
Comment: "*Most people"*? Where else have you asked about this?
Comment: What accents did the actors in the film have? British? American? Australian?
Answer: It's slightly later than you remember (1987) but a likely candidate is an episode from The StoryTeller, a series of fantasy stories that was part live action, and part filmed with Jim Henson's Muppets.
There have been several filmed versions of the Theseus legend, but this is the only one I can find that includes the King's suicide.
Watch it here.
Answer: The Labirynth: Deeds of Theseus (1971) shows the scene where Theseus fails to change the sails on his ship and his father throws himself into the Aegean sea.
Comment: TS already stated "This was a film similar in style to Jason and the Argonauts (1963), The 300 Spartans (1962), and The Minotaur, the Wild Beast of Crete (1960)." ps liked that cartoon when I was a kid!
Comment: @YaroslavKornachevskyi - I did think that, but this is a misremembered story-ID from nearly 50 years ago, where OP was watching cartoons at the same time.
Comment: Well, release date is 1983 in [Italy](https://www.imdb.com/title/tt0457031/releaseinfo/?ref_=tt_dt_rdat). No info about other releases.
Comment: @YaroslavKornachevskyi - ["*This is the third in a series of five twenty-minute films based on Greek heroic mythology that were written by Aleksei Simukov and directed by Alexandra Snezhko-Blotskaya between 1969 and 1974*"](https://tinyurl.com/5hefjvuk)
Comment: Sure, I was referring to the release in the west.


The Propinquity Effect

Question: I am currently in the process of studying enzyme catalysis and am struggling to get to grips with this concept. As far as I understand, the propinquity effect allows substrates to bind with enzymes in the conformation which would facilitate the reaction, thus increasing the reaction rate. Could someone expand on the why and/or how enzymes are able to do this? What specific reactions benefit from this the most?
Answer: how: an enzyme is able to effectively make a reaction intramolecular by binding the reactants in the correct conformation in close proximity within the active site this can speed up the rate of a reaction dramatically, intramolecular rates avoid diffusion control and have prearranged conformations which is far more efficient than typical intermolecular reactions,
why: enzymes are outrageous, evolution has pushed them, through trial and error, towards optimal configurations that, almost magically, provide ideal conditions for a reaction to occur

The Propinquity Effect


Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

Question: I have tried all methods mentioned on the internet but there is no use.
I am trying to install misaka by writing pip install misaka it keeps complaining by showing the same message. I have downloaded and installed MS build tool 2015 and 2017, Restarted my laptop. Whatever I did, couldn't figure out why it complains.
Python version 3.6.4
Windows 10
Comment: Not sure if MS build tool installs the VC redist runtime. VC 2017 is 14.0. Try getting the  redist files from [Microsoft](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) and install them. Files are vc_redist.x86.exe and vc_redist.x64.exe.
Comment: @michael_heath I have installed even visual studio, but it doesn't work.
Comment: I finally got to solve this issue as described here: https://stackoverflow.com/a/55575792/1612432
Answer: To solve any of the following errors:

"Failed building wheel for misaka"
"Failed to build misaka"
"Microsoft Visual C++ 14.0 is required"
"Unable to find vcvarsall.bat"

The solution is:

Go to:  https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017

Select the free download under Visual Studio Community 2017

This will download the installer.
Run the installer

Now the most important step is to select what you need under the workload tab:

Under Windows there are 3 choices. ONLY check "Desktop development with C++"
Under Web & Cloud there are 7 choices. ONLY check Python development (I believe this is optional but I still did it).

Now go to your cmd and install the package:
pip3 install misaka

Note that if you already installed Visual Studio then when you run the installer, you can modify it (click the modify button under Visual Studio Community 2017) and do steps 3 and 4.
Comment: I needed more. I run Visual Studio Installer -> Visual Studio Build Tools 2019. It preselected: C++ BUILD TOOLS C++ Build Tools core features C++ 2019 Redistributable Update C++ core desktop features OPTIONAL MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.28) Windows 10 SDK (10.0.18362.0) C++ CMake tools for Windows Testing tools core features - Build Tools C++ AddressSanitizer (Experimental) MSVC v140 - VS 2015 C++ build tools (v14.00) INDIVIDUAL COMPONENTS Windows Universal CRT SDK MSVC v140 - VS 2015 C++ build tools (v14.00)
Comment: How to do this via regular windows cmd?
Comment: - VS 2015 C++ build tools == VC 14.0;
- VS 2017 C++ build tools == VC 14.1;
- VS 2019 C++ build tools == VC 14.2;
Comment: Sharing an up to date link for the installer for the Visual Studio 2017 Build Tools : https://my.visualstudio.com/Downloads?q=visual%20studio%202017&wt.mc_id=o~msft~vscom~older-downloads
Answer: Using the https://visualstudio.microsoft.com/visual-cpp-build-tools/ installer only and selecting only four specific components helped solve the error.
Comment: How to do this via regular windows cmd?
Answer: I was getting the same error when trying to install biopython with Python 3.7 on Windows 10.
Installing just the Build Tools (instead of the full Community Edition as suggested in the other answer), with the options "C++/CLI support" and "VC++ 2015.3 v14.00 (v140) toolset for desktop" checked in addition to the defaults, solved the problem.
Comment: How you did so?
Answer: I did a variation of @Jason246 answer, to keep up with changes to the website.
I was having a problem with a pip install spacy that gave the same problem in the title.
This is running on a Windows 10 machine.
First, I went directly to https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017 .
Then I clicked the Download button. The download was 71 Mb at the time. Then pressed the install button when the download ran. The install took a long time as it had to create a Windows restore point.
Then I started the installer and checked the following:

I selected

Windows 10 SDK
C++ CMake tools for Windows

(and the VS 2019 C++ came along for the ride).
I ran
pip install spacy
and am no longer getting the error for C++ 14.0.


What is the difference of spectra of EI-MS and ESI-MS/MS?

Question: I want to ask not difference about the principle or applicability to GC and LC, but the peak behavior of spectra. EI is hard ionization method, so there occurs many fragments, sometimes losing molecular ion. In contrast, ESI is soft ionization method, so there are a few fragments. But this can be disadvantage because of lack of molecular information. To complement this, ESI-MS/MS proceeds more fragmentation. Then what is the difference of EI-MS and ESI-MS/MS? Both methods have fragmentation. If my sample is available in both GC and LC, then can I get similar peaks and information in GC-EI-MS and LC-ESI-MS/MS?
Answer: Assuming the present question relates to the characterization of a commercial sample 2,3,5-tribromothiophene here, with results used to monitor the progress of a chemical synthesis of simple small molecules (no forensics, no proteins, no polymers, etc.), then EI-MS might suffice (especially if combined with IR, 1H and 13C-NMR spectroscopy) and ESI-MS/MS be an overkill.

GC-MS is a hyphenation.  This means, at first you separate compounds by gas chromatography.  Then these fractions are ionized, shatter into fragments which eventually are separated along the ratio of mass/charge by mass spectroscopy.

In LC-MS (equally a hyphenation), liquid chromatography performs the separation of the compounds.  Because the mechanism of LC differs from the one of GC, you are not able to equate retention times by GC with those of the same compounds of LC.  Because of the large excess of solvent molecules in LC in comparison of your analyte molecules, the chemistry of ionization in the mass spectrometer equally differs from the one by GC.

Contrasting to spectroscopic methods like NMR, the shape of the spectra obtained by mass spectrometry, the relative intensity of the individual peaks experimentally recorded may differ quite a lot from one experiment to an other.  Among the influential parameters are the method of ionization like CI (chemical ionization) with a gas, or EI electron ionization where electrons hit your molecules.  The parameters of the ionization interfere, e.g., an EI with an accelerator potential of $\pu{20 eV}$ is softer (with less fragmentation) than the standard $\pu{70 eV}$; however with the possibility that some molecules are less well ionized at all and subsequently less well seen because of lesser fragmentation.
The conditions of fragmentation in a GC-MS equally differ from those for a LC-MS.  In the case of the later, ionization and fragmentations of your analyte molecules interfere much more with the ionization and fragmentations of the carrier molecules (the excess of solvent compared to your analyte running the LC).

As nicely described <code>@M.Farooq</code>'s answer, the combination of MS-MS primarily targets larger molecules where by sheer structural complexity of the molecule's structure (e.g., proteins, polymers) one identifies fragments of first generation by characterization of their subsequently formed fragments.  This is an example of tandem mass spectroscopy.
For the synthesis of small organic molecules, the detailed elucidation of these fragmentation pathways in the mass spectrometer however often are not relevant.  Your time and energy typically are better invested in the characterization of your compounds along the compound characterization checklist by your group or / and the targeted journal (example J. Org. Chem., yet you may use it anyway as a guide).  In many cases, this includes recording
a) a low resolution MS with characteristic peaks assigned ($\ce{M+}$, adducts, important isotopic peaks (e.g., halogen pattern); a few important assigned fragmentations (e.g., $\ce{- H2O}$, decarboxylation, tropylium cation) or pattern (e.g., McLafferty)
and b) one high-resolution HRMS for the newly prepared compound
altogether with a self-consistent set of other (spectroscopic) data (UV, IR, NMR, melting point, combustion analysis, etc.).
Comment: Actually my desired product has molecular weight about 500 Da and supposed to be nonvolatile, so I excluded option using GC-MS. When I searched for analytical MS instruments available in my university, there were GC-MS (EI type), MALDI-TOF, and LC-MS/MS (ESI/APCI multimode). In the description of MALDI-TOF, it was written that it is used for samples with relatively high molecular mass. So I finally chose LC-MS/MS and also requested for starting materials to compare with product sample data. I wanted to see data with single MS, but there wasn't except MALDI-TOF.
Comment: @KrangLee, Earlier you said it was not an LC MS experiment but direct infusion. Get more information from the analyzer about what he did exactly. You have half information and you are writing even less info in your query. Earlier you stated your M must be around 320 and now you state it around 500. People cannot predict beforehand.
Comment: @M.Farooq In summary, 2,3,5-tribromothiophene (previous question, MW=320) is one of the starting materials and purchased, and requested MS as standard. And my product sample is supposed to have molecular weight around 500 (didn't mention in the previous question). Sorry for confusion. I'll be back with more information tomorrow.
Answer: There is no comparison of EI-MS as ESI-MS or ESI-MS/MS. They work on different principles, serve different classes of molecules, but the end goal is to identify a given molecule. Just like an airplane vs. helicopter, both serve to carry a person from one place to another, but their lifting capacities are different. EI is used for small molecules (< 400 amu) which can be conveniently vaporized into gas phase and as you noticed it is a hard ionization technique (causes a lot of fragmentation).
ESI was not meant for heavy fragmentation, it was meant to make elephants fly, as the inventor said. You do not want a lot of fragments of a big molecule. Imagine the messy spectrum with hundreds of peaks. ESI was designed for large and huge molecules, where GC fails badly. Nowadays electrospray is routinely used for small molecules too. Since the purpose of both is to identify molecules, ESI-MS does cause fragmentation despite the name soft ionization, but some time the spectra is still too complex or inconclusive. Then you try the tandem approach. You take a certain ion(s) from the first MS, take it to another one, cause fragmentation by various means, and use that mass spectrum for final confirmation of the unknown.
Connecting with your previous query, the mysterious m/z 382 could be chosen and made to break into pieces in tandem. This would help to identify the adduct or the impurity in your analyte. BTW, as your sample contains bromine, you must see bromine isotopic peak near m/z 382 in the expected ratio.
Comment: Your first comment is a separate question. You have to get the exact information from the analyzer. Before that it is useless to think about it.
Comment: Ask your analyzer what experiment did he do? First was it LC-MS/MS? Then what ions were chosen in the second MS?
Comment: When analyzing reaction mixture using LC-MS/MS, if mobile phase condition doesn't work well, there can be bad separation so that there are two or more compounds in one peak in chromatogram. Then in tendam MS, do we pick the most desired product-looking or informative peak in the first MS and continue fragmentation of this peak in the second MS? So in the final data are we looking the MS data for only one ion?
Comment: Ah, you answered certain ion'(s)'. Then Do I have to ask what or how many peaks did the analyzer select, to interpret each final peaks?


include url title in live look template

Question: I'm trying to use the live look feature in expression engine to preview entries, but it doesn't pass the URL title to the preview template. Am I doing something wrong or is this just not allowed? I can't imagine preview templates would be of much use without this.
Answer: In the "Live Look" url title isn't being pass with the preview template. Instead of url title, entry id is passed. you can see the entry id as last segment.
Comment: Is there a way to change it from entry_id to url_title?
Answer: I solved this by spinning out two entry loops in the same template - one for url_title and one for entry_id. I used croxton's Switchee to select the appropriate loop based on regular expression in the segment.
Alternately, you could set up a separate live look template for the channel. But then you'll need to maintain two templates.

include url title in live look template


Find modular inverse of a number

Question: Recently I have read extended euclid's algorithm which is used to find out the modular inverse of a number N whith respect to MOD such that $\gcd(N,MOD)=1.$ But I have a doubt that how to find modular inverse of a number if $\gcd(N,MOD)\neq1$?
Comment: Why do you think that finding a modular inverse would be possible in this case? It does not exist.
Comment: This is one of those subtle issues that often gets skipped over in texts etc. I always think it should be spelled out BEFORE telling you how to construct the inverse that not every number mod $n$ can have an inverse.
Answer: You should have doubts because it may not always be possible!
Consider the numbers $6$ and $9$ that have gcd $3$
Curiously $6^2 \equiv 0 \mod 9$
So
$$ \frac{1}{6^2} \equiv \ UNDEFINED \ \mod 9$$
So
$$ \frac{1}{6}  \equiv \ UNDEFINED \ \mod 9$$
And there is an example of a pair of $N$ and $MOD$ with no modular inverse
Comment: It will *never* be possible: $x$ has a multiplicative inverse modulo $n$ *if and only if* $x$ and $n$ are coprime.
Comment: was hoping OP could derive that independently but I suppose this comment^ will make this post more useful to others in the future :)

Find modular inverse of a number


Application Publish Help

Question: I am planning to publish an app on AppEXchange but we have used API(Google Contact Api - Rest API). Should we have to go through web app scanner results.
Answer: You would need BURP scanning if your application makes callout to external websites. You can find potential question answered here.
This is very good blog post written by Daniel on same topic.
Answer: Salesforce no longer provides licenses to BURP. Instead ZAP is the preferred tool. It should be used for testing and the results submitted.  More information is hwere - http://security.force.com/security/tools/webapp/zapbrowsersetup
Comment: How to test RestAPi on zap. Can you please provide instructions on how to do it ?

Application Publish Help


What is the difference between 怕,害怕 and 恐怕

Question: Is 害怕 only used in the literal sense of "be afraid of, be scared", meaning "to be afraid of snakes", etc. and 恐怕, on the other Hand, for abstract worries? and can 怕 be used in both senses?
Answer: The context in which I would use 恐怕 is something similar to "I'm worried this  might be the case". I'd say it is used to describe a predicition or extrapolation, sometimes can be translated to be just "probably".

這池恐怕有三公尺深 :  The pool here is probably 3 meter deep (and that worries me)
我恐怕會被留校 : I guess I'm going to be in detention

怕 alone can be translated to "be afraid of":

我怕蛇 : I am afriad of snakes
我怕高 : I am afraid of height

... or "be weak against / be bad at"

我怕燙 : I'm weak against hot (food/drink)
我怕冷 : I'm weak against cold (weather)

... or "being a chicken and not willing to face it".
害怕 is more of a mental state and perhaps less of a verb. If it is, it's probably a intranstive verb.

我對這裡的交通感到害怕 : I feel scared by the traffic here
這電影院令人害怕 : The movie theather make me scared

The use of "害" usually implies "bad effect".
Now... there could be use cases in which 害怕 and 恐怕 are shortend to be just 怕. In this sense, perhaps 怕 is more abstract than the other two. In summary:

區別的方法只怕很難說明 : Describing how to disambiguate is probably going to be difficult.

:-)
Answer: online dictionaries have the answer (note example phrases): bkrs: 怕:动
(害怕; 畏惧) fear; dread; be afraid of:不怕疲劳
不怕任何困难  怕得要命  狼特别怕火  没有什么可怕的。
(担心) be afraid of; have a fear of; for fear; fear lest:她怕把孩子吵醒 我怕打扰你而没有来拜访你  副
(也许,表示估计) I'm afraid; I suppose; perhaps:会议怕要延期了 事情怕不这么简单
害怕to be afraid to be scared 因遇到危险、困难而畏惧或发慌。害怕得要命 她不再害怕他们会误解她了
这小女孩非常害怕打雷
恐怕(1) [I'm afraid]∶表示估计并担心
我恐怕迟到了 恐怕不成。
(2) [perhaps; maybe]∶表示估计, 相当于"大概"、 "也许"
天气那么热, 恐怕就要下雨了 他们恐怕需要我们的帮助 恐怕他是忘了
much more including English at bkrs
Comment: 看起来有些用户反对真相得以昭示.
Comment: Please see: [How to reference material written by others](https://chinese.stackexchange.com/help/referencing): "Do *not* copy the complete text of external sources; instead, use their words and ideas to support your own."

What is the difference between 怕，害怕 and 恐怕


Linear Programming Negativity Constraints

Question: What happens when a variable is negative?
An example would be:
Maximize z = 3x1 + 4x2, subject to constraints:

2x1 + 3x2 <= 10
2x1 - 4x2 <= 20
x2 <= 10
x1 >= 0

To set up an Linear Programming problem in Standard Form, I learned that it must be of maximization type. The constraints must be <= (which is good as 1) and 2) agree with that). However, x1 is >= 0, but x2 is not. What would one do in this case? I tried introducing slack variables, namely x2', but I don't know where to go from here, any hints/help would be appreciated. I am just confused on what to do when one of the variables does not satisfy the positivity constraint, here x2<=10.
Edit: I think I can rewrite x2<= 10 as x2-10 <= 0. Then introduce x2' = x2-10. Then, can I replace x2 with x2'+10?
Answer: Replace $x_2$ with $x_2^+ - x_2^-$, with $x_2^+ \geq 0$ and $x_2^- \geq 0$.


Are lens caps universal?

Question: I recently purchased a Nikon L35AF 35mm point and shoot. The seller clarified it didn't come with a lens cap. Are there lens cap that would fit this camera if it's the right size? Or is the one that comes with the camera the only one that fits?
Comment: Ask all the questions you want, but it's best to stick with one question per post.
Answer: No.
In general there are different sizes, and mounting types. Slip on,  or squeeze style being the most prominent types and sizes can range quite a bit. So they arent universal by any stretch.
That said, the L35AF lens cap had a custom cap that also protected the viewfinder. There are people apparently who use just a standard 46mm lens cap however. So while not universal they aren't generally proprietary down to a per lens basis.
Answer: For interchangeable lenses that take a screw-on filter and where the cap fits into the filter thread with spring/tension, most front lens caps are going to be made in a standard filter size, and they're relatively easy to replace (Leica Series filter sizes being one notable exception and a serious PITA to find caps/filters for).
Back lens caps, otoh, are going to be specific in thread and size to the mount system of the lens.
However, for a fixed-lens camera, like the Nikon P&S you're talking about, where the lens cap slides onto the end of the lens, chances are good it'll be hard to find a replacement that's an exact fit, and you may have to find the original part. There are no standard sizes for those types of lenses.
Answer: No. Lens caps are not universal, although many are interchangeable. For most lenses with a thread and no built-in hood, all you need to know is the thread-size and you can buy a cap of the same type and diameter.
There are many proprietary hoods which are designed to mount over a built-in hood or dome over protruding lens elements. Those are almost never interchangeable.
For fixed-lens cameras, most have self-closing lenses. Those that do not, nearly always use custom lens caps. Although for popular models, third-party sometimes offer compatible caps. Your best bet is to search for lens can for L35AF and see who has something to offer. Some may sell used originals, some may sell third-party made ones.
Comment: I saw someone mentioning using a small square of bubble wrap and covering the lens that way and holding it with a rubber band. Does this work as an alternative method?
Comment: @Taylor - Of course, its a pain to take on and off though, but in a bind, you can do it.
Comment: Doesn't the lens have threads to accept 46mm filters? If so you could buy a generic 46mm lens cap and use it. It wouldn't protect the front of the viewfinder, though.

Are lens caps universal?


Why doesn't the water cycle stop, since it dissipates energy?

Question: In artificial cycles like for example refrigeration cycle, because of irreversibilities extra energy is require to be provided so that the refrigerant is available at the same state as it was at the beginning.
 So where does extra energy for water cycle come from? Does it have zero irreversibility?
Comment: Obligatory SMBC: https://www.smbc-comics.com/comic/2014-04-27
Answer: The extra energy comes from the Sun.
The energy in the sunlight hitting the Earth evaporates the water, then when the water cools the latent heat goes into heating the the Earth and its atmosphere and is eventually radiated out into space as infra-red radiation.
Comment: I think this answer would be better if you addressed the last sentence explicitly: "Does it have zero irreversibility?"
Answer: As has already been pointed out, the Sun provides the excess energy for the water cycle to continue indefinitely (or at least for as long as we have the Sun). But let's investigate this a bit further.
Even though it seems as if water in a closed system would be able to evaporate and condense on its own through the vapor pressure of the water, there are a few concerns with that view.
Follow the energy
Firstly, it takes energy to break the inter-molecular bonds (in the case of water, these bonds are called hydrogen bonds) between the molecules of the liquid. This will cause the liquid to cool down, and with that cooling the vapor pressure will drop until the atmosphere above the liquid is saturated.
But, "Aha! The energy taken from evaporation will be given back when the vapor condenses again!" you might say. While it is true that the evaporation energy will be given back as heat upon condensation, for there to be a "cycle", this condensation must happen at some other location (e.g. high up in the atmosphere), which means that energy will have moved from the liquid to the location of condensation. Or in other words the liquid is cooling down and the point of condensation is heating up. At some point these two locations will reach the same temperature; when that happens, the vapor pressure will be the same at the two points, and there will be no flow of vapor in either direction. The system has reached thermal equilibrium, and will no longer evolve.
Note that this would happen even if you let the (warm) condensed liquid flow back to the original reservoir, e.g. through gravity. Because for the vapor to condense, you need to pull energy out of the vapor which can only happen if you have a "source of coldness", i.e. something cold which will absorb the energy of condensation.
Then look at the entropy
At this point we have pretty much exhausted the energy argument, which incidentally is called the First law of thermodynamics (the total energy inside a closed system does not change). But we must have some more argument for why the system would stop, or why there are no mechanisms that would allow us to keep it running. We therefore have to turn to the Second law of thermodynamics, which says that the entropy inside a closed system will always increase (or at least not decrease). This is always the scary one, since the concept of entropy is hard to have a natural intuition for. But let's see what we can pull out if it anyway.
I previously said that energy was flowing with the vapor from the liquid reservoir to the condensation point, which would require a "source of coldness" at the point of condensation. Another way of saying that is to state that for the vapor cycle to run, you would need to have two different temperatures, with the reservoir having a higher temperature than the condensation point.
However, now with the help of the Second law of thermodynamics, the unforgiving increase in entropy would dictate that the system will evolve towards a state where the temperatures are the same throughout the whole system, i.e. thermal equilibrium, thus completely ending the flow of energy/vapor.
The water cycle in the atmosphere
Now then, why does the water cycle continue on Earth if it could not be sustained in a closed system?
The simple answer is that the Earth and its atmosphere is not a closed system. We have energy flowing in from the Sun's radiation and energy flowing out through the Earth's and the atmosphere's black-body radiation. (I'm ignoring the heat of the Earth core, to not make the reasoning overly complicated.) An indirect consequence of the Second law is that when we have a flow of energy/heat, i.e. a temperature gradient, we can extract some of that energy in a useful form (called "work").
So if we examine the situation in our atmosphere, we find that the short wavelengths of the sunlight can penetrate through the atmosphere and heat up the land and waters on the surface of Earth. This will provide enough energy for water to evaporate without the reservoir getting cooler and cooler.
Then the water vapor rises to a higher layer of the atmosphere, which has not been heated up by the sunlight. However, the atmosphere still radiates black-body radiation which provides us with our "source of coldness" for the vapor to again condense. From here on, the story is familiar: the condensed water eventually rains back down on us and the cycle continues.
To summarize
Thermodynamics requires a flow of heat to extract the work required to sustain the water cycle. This heat flow is provided to us by the Sun: we are tapping into the minuscule flow of heat that hits the Earth on its way from the Sun into outer space.
Comment: If atmosphere's emissivity is so high as to cool it down by thermal radiation, then why is its absorptivity (which must be equal to emissivity by [Kirchhoff's law](https://en.wikipedia.org/wiki/Kirchhoff%27s_law_of_thermal_radiation)) not high enough to heat atmosphere up by the Sun, compensating the emissive loss of energy?
Comment: @Ruslan the trick is that absorptivity and emissivity has to be equal for the *same wavelengths* of radiation, but with the atmosphere the incoming rafiation from the sun has a much shorter wavelength qhich goes through the atmosphere, while the radiated IR light has a much longer wavelength at whitch the emissivity is higher.
Comment: Hmm, that should mean the emissivity is small enough at wavelengths shorter than about $1.5\,\mathrm{\mu m}$. This looks about right, judging by [the spectrum here](http://funnel.sfsu.edu/courses/metr104/F13/summaries/AbsorptionSpectra_Atmosphere.pdf), thanks.
Answer: The cycle requires a source of energy---this is the Sun---and also a way to get rid of entropy---this is done by heat radiation into space.
The water cycle involves irreversibility at various stages, for example in turbulence in the atmosphere, rivers and sea; in plant chemistry; in heat flow across finite temperature differences, and so on. Therefore entropy is increasing. This entropy is eventually radiated away into space via infrared radiation from the planet. Overall this involves flow of both energy and entropy, as follows.
The incident sunlight is mainly in the visible part
of the electromagnetic spectrum, while the radiation emitted by the Earth is mainly infrared. The crucial fact here is that
in thermal radiation the amount of entropy
per joule increases with the wavelength, so when a given amount of energy is first absorbed in visible light and then later emitted in infrared radiation, overall the energy balances out while more entropy is emitted than was absorbed.
This process allows the Earth to get rid of entropy without losing energy overall and cooling down. This
allows it to support processes such as the water cycle.
(I added this answer because I judged existing answers to be either too long or too short; but I think we all agree on the physics.)


Using GPG, encrypt a file with private key

Question: I'm setting up a system to update software on a device and I would like to encrypt the update files using a private key that I have created and then decrypt them with the public key.
All of the examples that I have found encrypt with the recipients public key, I want to encrypt with my private key.  I have seen Bob & Alice examples that use encryption of a file with your private key and then with the recipients public key, but I can't figure out how to do the private key encryption.
Comment: Do you want to be the only one to be able to decrypt the files ?
Comment: Maybe this will help you : http://crypto.stackexchange.com/questions/2123/rsa-encryption-with-private-key-and-decryption-with-a-public-key
Comment: In my scenario I don't really care if anyone can decrypt the file, although the public key will only be distributed to the systems that need it. What I care about is that I am the only one that can encrypt the file that contains the code updates. I suppose that I can just reverse the definitions in my case, and never disclose the 'public' key and put the 'private' key on the systems to be updated.
Answer: This is not the way GPG works.
You encrypt a file with a public key (may be yours), and decrypt it with a private key.
So if you share your public key on the Internet, anyone would be able to encrypt a file with your public key, but you would be the only one able to decrypt it.
See : http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto-1.html
Comment: I suppose that the function that I'm using the encryption for could be done with signing where the file and the sign are concatenated to one file, as I don't care it anyone sees what the data is, just that it can be verified that I'm the one that generated it.
Comment: darn, broken link
Answer: Old question, but... I came across it looking for something else.
What you really want here is not to encrypt the file, but to create a verification that you are the origin of the file. This is the purpose of signatures of files.
A quick basic idea of how public key encryption works: Encrypting something with your private key can only be decrypted by your public key. Encrypting something with your public key can only be decrypted by your private key. (Why this is so is something beyond the scope of this answer.)
In normal operation, if someone wants to send you a message, they encrypt it with your public key, since only your private key can decrypt it.
A signature generates a one-way hash of the file/data, and reverses the roles of the public and private keys: Anyone with your public key can decrypt the hash, and they can be certain only you generated the encrypted has because only your private key can be used to encrypt it in the first place.
The hash is used to verify the file has not been tampered with since you signed it. Any changes to the file will change it's hash, and make it clear hat it has been altered. Since they do not have your private key, they cannot generate a new signature of the new hash for decryption with your public key.
Many systems use this method to sign checksum/hash files of other files, assuring that the files with those checksums/hashes are authentic.
You can also combine data/file encryption and signing it, assuring that the encrypted data cannot be decrypted by anyone but the intended recipient, and that none of the encrypted data has been tampered with.
"Under the hood", this is how GPG and related programs work. It is too computationally expensive to encrypt the data using the key data. Instead, they generate a random "one time password" (OTP) to encrypt with a much faster encryption method. Then the password is encrypted with the keys of he intended recpients and sent along with the encrypted data. Since only their private keys can decrypt the password used to encrypt the data, you have very reasonable assurance no one else can.
Final note: Cryptography is always in a state of flux. What is "reasonable" or "assured" as I write this, might be invalidated tomorrow by someone discovering a weakness in one of the algorithms used.


Does every prime power generate a primary ideal?

Question: Let $R$ be a commutative ring with identity and let $p\in R$ be a prime element (i. e. $(p)$ is a prime ideal). If $R$ is an integral domain, it can be shown that $(p^k)$ is a primary ideal for every $k\in\mathbb N$ (this reduces to
$$ p^k\mid ab\quad\wedge\quad p\nmid a\quad\implies\quad p^k\mid b $$
for all $a,b\in R$). I wonder if this remains true if $R$ is not an integral domain, as I cannot find any counter-example.
Comment: $R=\mathbf{Z}[t]/(t^2,2t)$; $k=2$, $a=2$, $b=p=t$.
Comment: And it's false also in artinian rings (replace $\mathbf{Z}$ with $\mathbf{Z}/4\mathbf{Z}$), and in reduced noetherian rings (replace $\mathbf{Z}[t]/(t^2,2t)$ with $\mathbf{Z}[t]/(t^2-2t)$.
Comment: @YCor But in $(\mathbf Z/4\mathbf Z)[t]/(t^2,2t)$, $t$ is not a prime element, because $2\cdot2\in(t)$, but $2\notin(t)$.
Comment: @YCor Thanks! So even in Noetherian rings this is false (while I've found books that state the opposite...)
Answer: This is not true for arbitrary $R$.
For example, if $R=\mathbf Z[x]/(x^2-2x)$, then $x\in R$ is prime and $x^2$ divides $0=x(x-2)$, but $x^2=2x$ does not divide $x$ and $x$ does not divide $x-2$.
Note that it is (easily) true if the ideal $(p)$ is maximal (because in this case, if $p^2$ divides $ab$ with $b\notin (p)$, then $b$ is a unit).


Prevent most users from logging in via non-SSO methods

Question: I would like to block all of our users from logging in except via SSO. However, I still have some cases where only I need to login with un:pw. Is it possible to allow me to bypass the blocked login? salesforce.com/?login=1 is confirmed to not work
Answer: Please follow the below steps given on Link https://help.salesforce.com/s/articleView?id=sf.sso_enforce_sso_login.htm&type=5
For a quick reference

For the users where you need to Bypass just create a new profile for which Backdoor entry is required and do not enable the SSO Enabled permission as mentioned in step 3) c. and give the My Domain URL to user to login using Salesforce Username and Password.


Redirecting/rickrolling intruders

Question: While browsing for Node.js packages, I came across this one. It's purpose is to redirects crawlers away from a site, and by default it Rickrolls them. I find the idea amusing, but is it a good idea to do this to intruders, given that unvalidated redirects are a security risk?
Comment: I don't want to burst your bubble but the chance that the owners of these scanners actually notice that you've redirected them to a Rickroll video is low. These guys are interested about the servers they've managed to infect, not what happened after an unsuccessful attempt.
Comment: [Imagine if the intruder algorithm comes across a false positive.](http://sayforward.com/sites/default/files/ext_image/5189_944d.gif)
Comment: The biggest problem I see with this is that rickrolls are so horribly dated I doubt even the Garfield strip would touch them at this point.
Comment: While amusing, I suspect this isn't very effective. Automated searches from bots, quite possibly running on zombies, don't really care where you redirect them. In fact, I would suspect that they simply ignore the redirect and determine that the requested URL isn't vulnerable.
Answer: Unvalidated redirects do not necessarily apply here. An unvalidated redirect is something more along the lines of an attacker being able to send a victim to a destination of the attacker's choosing. If you read the example on the OWASP page you linked at the bottom, you will see that the attacker crafts a URL that can be sent to a victim using social engineering or otherwise. A static redirect coming from a server is a completely different scenario.
While rickrolling an attacker may seem amusing, legitimate users would be quite confused if they are given a link to your site which automatically rickrolls them, decreasing the user's trust.
Comment: We're not using PHP, so it wouldn't have been any use to us anyway. But your paragraph on usability is a very, very good point.
Answer: All of the examples in the page you link are talking about cases where the user supplies all or part of the URL to be redirected to - unless I'm missing something about the Node.js package you linked, the parameter is supplied in the server configuration, so it is not vulnerable to exploits related to parameters passed by an attacker.  Assuming no malicious user has control of your site (in which case, there are a myriad ways they can force a user to redirect to a site they control anyway), I don't see how this could introduce a vulnerability.  That said, you will need to be very careful to only give it URLs which users would never hit legitimately or through mistaken typing.

Redirecting/rickrolling intruders


SD Card not working on LG Optimus L7II

Question: I Brought a 16GB Lexar micro sd card for my LG Optimus L7II and installed the micro sd card and I've have tried downloading apps but it keeps coming up insufficient storage space available! How do I get the SD cards to work?
Answer: Applications never get installed to SDcard. It is by-design. If you can access other files (music/video/...) then it is working perfectly. Applications are only installed to the internal storage.
Answer: What version of Android do you have? Depending on the version (2.3+ I think) you can move apps to the external SD card via App2SD (or check the Settings/Applications for the option). You will have to install on internal first and then move to external, so to free memory you will have to move some other apps which are already installed.
But some later versions of android no longer support this.
If you root your phone, then try Link2SD.

SD Card not working on LG Optimus L7II


How do open source projects maintain quality?

Question: How do open source projects maintain quality?
What keeps the projects from people with relatively little programming experience checking in poor quality codes?
Comment: How do you define "quality"?
Comment: What do you mean by "checking in"? I doubt you will find a single open source project with a world-writable repository. Open Source means that you can take the source, make your changes (good or bad) and be happy (or not) with the result, but that's not the same version that most other users get, unless your changes are accepted in the main branch.
Answer: How do closed source projects maintain quality? What keeps the projects from people with relatively little programming experience checking in poor quality codes?
The same way:

code review
testing
static typing
static analysis
metrics
consistent coding styles
consistent guidelines
shame (because everybody in the world can see who wrote that crappy code)

But really the answer is: most don't. In both cases, open and closed source. After all, programming is subject to the Pareto Principle and Sturgeon's Revelation ("Ninety percent of everything is crud") just like everything else.
In Linux, for example, in almost 100% of all cases where a company releases a previously closed source driver as open source, that driver needs a considerable amount of work before it can be merged into the kernel tree, simply because its quality is so bad. In some cases, it is so bad that the code is basically unsalvageable and has to be rewritten from scratch.
So, in Linux, the way that quality gets maintained is that low quality contributions get rejected, but there is a mentoring process helping people to write better quality code.
Comment: This answer needs a hefty edit, I think you've copy and pasted in twice - I'd edit it but I don't want to lose the gist of your answer...
Comment: NOTE: static typing does not guarantee quality.  *Strong typing* does.  There are serveral languages that are strongly typed, but not statically typed.  I dare say the proportion of quality projects is probably about the same between the different platforms.  At the end of the day it's all about the logic, not the types.
Comment: Indeed, open source stimulates better quality than closed source. In closed source the only thing that the world sees is the external behavior of the application, and the primary motivator of programmers is their monthly salary, which doesn't depend on the code quality at all. Thus the code is often quite a mess. Been there, seen that...
Comment: +1 for "most don't. In both cases, open and closed source."
Comment: If I could set two answers as accepted answer, I'd have chosen this one as well. but the answer I chose explained the aspect of open source project that I didn't undestand before. I thought the open source projects' codes could be changed by anyone, like a wiki.
Comment: @Berin:  Strong typing doesn't guarantee quality either, although it helps.  I do agree with you that there's been plenty of great software written without strong static typing.
Comment: @David, I agree.  Having used strongly typed languages that were not statically typed, I find that world actually helps me focus on the problem at hand instead of the syntax of the language.
Comment: @Daniel, Wikis aren't necessarily editable by just anyone either. The most famous, Wikipedia, is, but even there some articles are protected.
Answer:
What keeps the projects from people with relatively little programming experience checking in poor quality codes?

Usually, not everyone have the rights to change the source code. Most often there is only a small group of trusted developers that have rights to change the source code. If someone else wants to make changes, they can submit patches, but these are checked and added by the developers with commit access.
Some projects allow other developers to join the trusted group, if they submit several patches of sufficient quality.
Answer: That really depends on the size of the developer base, and what back yard you happen to be playing in.
How either of those are determined mostly depends on the skills of the founding developer(s).
First, realize that writing code and pushing it into the wild for the whole world to critique and review takes a special kind of person. That person might not be very confident in their abilities, but they are willing to publish their code anyway. Someone else might be extremely confident. Both people have the same goals:

Release something that seems useful
Get help from other programmers

There may be underlying financial reasons, but the above tends to be true.
There may be other motivations in the mix. I know people who spend an enormous amount of time re-writing proprietary applications under an OSI approved license (usually the 3 clause BSD or GPL). I know other people who can't stand GPL2+ libraries and work to re-write them in order to release them under a less restrictive license.
In any event, you have lots of people writing and publishing code for various reasons.
In my experience, (really) bad code gets committed due to the following reasons:

The original author found contributors that exceed their skill level. They don't know a bad patch from a good one.
The original author wants to stick it to (insert whatever man here) and is happy to have some help and a fellow idealist to e-mail
The original author trusted a part of the code to someone who made some bad decisions on what actually gets accepted, or didn't really look at what was being proposed.

Lets break these down a bit:
On the first point, the original author probably hoped to learn something in the process of releasing their work. That's not in any way bad, but if you have a small development community it can become toxic. Think about it, you have a thick enough skin to release your stuff, you get a patch that blows your mind, is your skin now thick enough to admit that you have no idea what the patch actually does? That happens quite a bit. If you have more eyeballs watching things, it helps. So let's say the first root of toxic changes is ego.
Additionally, you might just get tired of fighting an otherwise great contributor on a single point and just say 'screw it', even if you understand the patches.
On the second point, stuff that is written to fill an idealistic void (at least early on) is of lesser quality than something written to fill a technical void, at least in my experience. For the most part, the GNU project is an exception to this rule, they have been producing software that runs predictably and consistently on a variety of architectures for years.
You won't see a lot of revengeware in the wild, it doesn't last very long. I have been part of projects that were started explicitly to stick it to the man, and I've quickly left them. This brings us to the second source of toxic changes, no real focus.
Finally, you get to the point that a project has really taken off. The original author is not only skilled enough, but trusts their skills enough to ward off toxic patches. The project grows, the code base grows and more and more trusted lieutenants are brought on to help manage contributions. The original author has final say, if they want it, but trusts their inner circle to effectively look after the parts that they maintain.
People do odd things. I can't count the number of nervous breakdowns that I've witnessed on public mailing lists on both hands. People get burned out, develop drinking problems, sometimes drug problems or all out vanish. Their spouses leave them, their homes burn down, feces occurs. However, by this time, you should have enough critical eyes on stuff to catch that.
This brings us to the third (at least in my experience) reason why toxic code gets put out into the wild - a lack of community oversight. This happens mostly in projects where users outnumber actual contributors by 100:1 or more. You have plenty of eye balls, but none of them know what they're looking at.
Not listed, but finally, the original developer may have burned out years ago. When / if that happens, a project loses passion.
Beyond that, other things happen. Companies get bought (we're seeing the aftermath of that now with OpenOffice / OpenSolaris).
Answer: Well run open source projects use the same tool sets and patterns of behaviour that good closed source projects do.  The difference is that in the open source model you can have many more eyes on the design and the code.
So for the two open source projects I'm heavily involved with, we:

Have JIRA as a feature request and bug tracking system
** We roadmap the items listed in JIRA
We hold collaborative design discussions on mailing lists and IRC
We have code reviews
For new joiners, we ask that they submit patches until we are comfortable with their level of code quality and familiarity with the code base
We ensure that documentation is written as part of completing some code
We use source control and have feature branches and maintenance branches
We run a CI server

See http://www.producingoss.com for a guide on how to run a successful open source project
Answer: Some don't.
Those that work have a single person (or if very large a group with well defined responsibilities) who vet everything and only let what meets their standards into the official codebase. (Private branches = private problems).
Comment: Interesting the votes down here.  Linux - the open source pin-up poster, is an example where there is a strong person in charge who vets what gets through. This promotes long term consistency and quality. I personally don't like the linux code base, simply because like most open source, there are too few comments. HOWEVER, it has outstanding longevity and thats due to that person at the top who rules over what's in and what's out.
Answer: If you have an application with more than one (experience) developer, bad code won't go into the main branch, since you won't get write access if you don't prove you meet their standards.
Answer: Most projects have version control systems, where the code development goes in branches. New features are accepted to unstable branches, or even in a branch-per-feature or branch-per-fix manner. When a new branch is tested and it's clear that the code is of good quality, it can be merged into the main branch, or into beta-testing branch, from where, after fixes if necessary, it goes into or becomes itself the production branch.
Read about Mercurial http://hginit.com/ and Git http://progit.org/book/ version control systems.
Comment: @Jörg W Mittag I completely disagree, you only have to look at where 90%+ of open source projects are hosted.  Sourceforge, Github, Google Code and more, they _all_ provide source control and that is used is a vast majority of cases.
Comment: I'm willing to bet that this is not true. In my experience, only a small number of projects actually use version control. And of the ones that do, many use version control systems in which merging is something between very painful and virtually impossible. I count myself blessed to mostly work in an environment where the "version control question" basically boils down to "Git, Bazaar, Mercurial or Darcs?" but for most programmers its more like whether to put the manually managed `foo_finalversion.test-20101110-abc.bak.bak.c` files in a separate folder or not.
Comment: As soon as you learn DVCS like hg or git, you naturally start using them as soon as you start a project. Just create a folder, and do `hg init` or `git init`, and your repository is created.
Comment: @Jörg: I think you might be somewhat right for many propritary products. But almost all open source projects use version control.


What ship models does Sisko have in his office?

Question: In Star Trek: Deep Space Nine, Captain Benjamin Sisko has a few models of ships in his office. Which ships does he have? I believe I saw the Voyager (probe, not Star Trek ship), but that is all that I can say certainly.
Here's one ship that I saw there:
Comment: http://memory-alpha.wikia.com/wiki/Model
Answer: That is almost certainly the USS Saratoga, aboard which Sisko served as First Officer prior to its destruction in the battle of Wolf 359.

Note the lack of the "roll bar" common to many Miranda-class vessels.
Edit:
Confirmed by @Valorums's link that this is the Saratoga:

Benjamin Sisko kept a model of the Daedalus-class starship in his office on Deep Space 9. In the same room, he also kept models of a Miranda-class starship and another of a Nebula-class starship and, in later years, a large model of the International Space Station, complete with a docked space shuttle orbiter.
The Miranda-class model was of the USS Saratoga and constructed from the modified, newly-released AMT/Ertl model kit, no. 8766.

The other ships include the USS Horizon:

An unknown Nebula-class starship, and the International Space Station docked with a Space Shuttle:

The latter is probably what  you mistook for the Voyager probe, which I don't think actually appears in Sisko's office:


DroidFish's rtb folder's file placed somewhere else

Question: DroidFish has an rtb folder that should be used for wdl and dtz syzygy endgame tables. For the six pieces tables it represents roughly 80+60Gb and as I my phone has only 64Gb as internal memory, I would like to put the files on a SD card and make DroidFish point to them, but it does not seem to be possible. Is it really the case ? If not, how should I do ?
Comment: Will do as soon as I can test
Comment: Does [this](http://www.talkchess.com/forum3/viewtopic.php?t=70972) answer to your question? "It is possible to use one (but not more than one) opening book placed on the external SD card, but it requires entering the full path in the preferences setting. Once you have entered the path, you must not use the "select opening book" feature, since that will overwrite the preferences setting."
Comment: If it solved your issue let me know please to add it as an answer for further users facing this trouble, or add your own answer!
Comment: Actually, I put each folder (for up to 5 pieces and both 6pieces wdl and dtz) in a same folder on the "external" SD Card (I stress the external because of the legacy surname "internal sd card" for the device hard, creating confusion here and there) an pointed to them in the endgame ("tablebase") DroidFish's setting and it works.
Comment: You know better than me what's the exact trouble and what worked. Can you please explain it at an answer? This kind of question can attract new users to the site.
Comment: Actually I was wrong, all files (rtbw and rtbz files for endgames up to 5 pieces and 6 pieces) should be the same directory and the directory can be on the phone hard disk or on a micro sd card, provided DroidFish points to it correctly, details in my answer.
Answer: Let \path\to\endgame\tablebase\files be ... the path to endgame tablebase files. This means that the directory should contains only tablebase files, and not for instance folder for up to 5 pieces tablebase files and a folder for 6 pieces tablebase files. The files are .rtbw or .rtbz files. (These are Syzygy files, I don't know how it works for Gaviotta files (for which DroidFish provides the gtb folder) but I guess it works the same.)
The .rtbw files store win/draw/loss information including, where applicable, information on the 50-move rule. During the search only the .rtbw files are accessed. These files are "two-sided": they store information for both white to move and black to move.
The .rtbz files store the distance-to-zero: the number of moves to the next capture or pawn move. These files only need to be accessed when the root position has 6 pieces or less. They are "single-sided".
Anyway, all these files for up to 6 pieces endgames are in the folder \path\to\endgame\tablebase\files and now you should make DroidFish point to it. This takes place in DroidFish in "Settings --> Endgame Tablebases --> Syzygy Directory" where you have to put the complete path -- don't forget the "\" the path necessarily starts with.
It may be stupid as you already put files in that folder so you think you know its path, but beware as for instance on my samsung galaxy, the application "My Files" (the samsung file explorer) gives me a wrong path : if I use the path it gives to me, I don't see that tablebase are used by the engine in analysis mode :

as in the last line there is only "d:35/55 3:g4 t:431.7 n:1935M nps:4483k h:99" and no "tb:x" in it. Recall that "d" is the depth of analysis expressed in number of moves, "3:g4" at this point indicates that the third best move is g4, "t" is the time spent on the analysis so far, expressed in seconds, "n" is the number of nodes the engine searched through, "nps" is the current number of nodes the engine searches through per second and "h" divided by 10 gives you how full in percent the hashtable is, in previous picture's case it is therefore 9.9% full. (These notations and definition are UCI engines standards.)
The reason is that the "My Files" application does not give the absolute path to the folder. To get the absolute path to the folder, you have to use for instance the "Explorer" application which, while you browse, will display the absolute path the to place you browsed at.

Example for a folder placed in the hard disk of my phone : /storage/emulated/0/DroidFish/rtb
Example for a folder placed in the micro sd card plugged in my phone : /storage/3661-6463/Syzygy

The /storage/emulated/0/DroidFish/rtb is a vanilla DroidFish folder that you should use if you have place enough on your phone's harddisk. In /storage/3661-6463/Syzygy the /storage/3661-6463 is the absolute path of my micro sd card and the Syzygy is the folder I created in it.
I give all these precisions about paths because what is for instance provided here does not work in my case. So beware, the absolute path (internal or external = on the sd card) depends on your device.
When it works, the analysis looks like :

and you see the "tb:15" bit in the last analysis line, showing that the tablebased are used. The "tb" indicates the current number of tablebase consultations/hits by the engine. Sadly, even as Stockfish provide dtm and dtz information, they are not printed in droid fish analysis part and as far as I know there's no option allowing to tweak this ...
I have a samsung galaxy s9+ with 64Gb of internal memory and a 250Gb micro sd card that contains 150Gb of endgame tablebase files versus a samsung galaxy s10+ with 1Tb of internal memory containing the same 150Gb of tablebase files and I don't see any real difference of performance. It's just a tiny bit slower on the s9+ when the analysis depth gets bigger, but nothing major. In any cases, it will crush any human more than 99% of the time on average. ;)


time of flight between two scintillators

Question: I found this page on Wikipedia about finding distance between time of flight of two particles passing past two scintillators, https://en.wikipedia.org/wiki/Time_of_flight_detector, but I can't find any other proofs or anything other than simply showing this equation. Does anyone know where this is derived? Or possibly shown for relativistic speeds.
Answer: The equation is
$$\delta t = L\left(\frac{1}{v_1}-\frac{1}{v_2}\right)$$
This is just saying that the difference in time recorded between the "start" and the "stop" depends on the velocity of the particle: the time it takes a particle with $v_1$ to travel a distance $L$ is $\frac{L}{v_1}$, obviously.
The next bit is trickier. We are supposed to prove that this reduces to
$$\delta t \approx \frac{Lc}{2p^2}\left(m_1^2 - m_2^2\right)$$
when the particles have the same momentum $p$, and we are told in the article that this is a relativistic approximation.
Looking at the units, we have $L L T^{-1}M^{-2}L^{-2}T^2M^2 = T$ - which is encouraging.
Relativistically,
$$E^2 = m^2c^4 = p^2 c^2 + m_0^2 c^4$$
Assuming that the mass in the equation is the relativistic mass, and that this is much larger than the rest mass, we find
$$p^2 = m^2 c^2 - m_0^2 c^2$$
Now the relationship between the mass $m$ and the rest mass $m_0$ is of course given by
$$m= \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}$$
Or
$$m^2~\left(1-\frac{v^2}{c^2}\right)=m_0^2$$
and the momentum reduces to
$$p^2 = m^2 v^2$$
which is the same as the classical equation.
Right now I'm blocking on how to take the last step here... I am marking this "community wiki" and leaving this for someone else to complete. Maybe I will be able to do it myself with fresh eyes in the morning.
Answer: What you need is $v$ in terms of $m$., $p$ and $c$.
Starting from $E^2 = p^2c^2+m^2c^4 = \gamma^2 m^2c^4$ or $p=\gamma mv$ where $\gamma^2 = \dfrac{1}{\left ( 1-\frac{v^2}{c^2}\right)}$
some algebra gives $\dfrac 1 v = \dfrac 1 c \cdot \sqrt{\left (1+\dfrac{m^2c^2}{p^2}\right) }$
Because $p\gg mc$ the square root can be expanded to the first term
$\sqrt{\left (1+\dfrac{m^2c^2}{p^2}\right) } \approx 1+ \dfrac{m^2c^2}{2p^2} + . . .$
and this leads to the required relationship because the momentum $p$ is the same for both particles.
PS
I am afraid I do not understand what @Floris meant by "I am marking this "community wiki" and leaving this for someone else to complete."  An explanation would be appreciated.