I2C bus fails after a few sensor reads

Question: I'm building a small home automation hobby project for which I try to connect 4 temperature/humidity sensors (AM2320) to an I2C bus on the Raspberry Pi. When initially connecting the sensors they work fine, but after a few calls (10 to 50) with 4s interval, the reading fails with a "OSError: [Errno 6] No such device or address". After that, a call to i2cdetect on the bus results in a very slow respons where each probed address takes around 1s (equal to the problem described here). After this i2cdetect fails to detect the sensor.
Physically disconnecting and reconnecting the sensor resets the bus.
I think the root of the problem is in the capacitance of the connecting line between sensors and Pi, however I can't wrap my head around why. Hopefully someone can clarify what the problem is.
Details of the setup
I am using 4 identical sensors connected to a single Raspberry pi. Each sensor is connected to it via a stripped Cat5 cable (4 wires (2 twisted pairs) per sensor, shielding and outer isolation removed) of approximately 2m length.
As the sensors are rather simple and cheap, they do not have a configurable I2C address. Each has address 0x5c. To accommodate 4 of them I configured some GPIO pins to give me 3 additional I2C buses next to the standard bus number 1. This is done by adding the following lines to the config file. (As per this instructable.)
<code>dtoverlay=i2c-gpio,bus=5,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24
dtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=1,i2c_gpio_sda=17,i2c_gpio_scl=27
dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=4,i2c_gpio_scl=18
</code>
All sensors are powered from the 3.3V rail on the Pi. All SDA and SCL lines have a pull-up resistor of 3.3 kOhm. Only for the 'standard' I2C bus number 1 I rely on the 1.8 kOhm resistors that are on the Pi itself.
I read the sensors by means of this Python script: https://github.com/Gozem/am2320/blob/master/am2320.py.
Things I have tried
I have tried the following things, by themselves and various permutations of these things. Non appears to have any noticeable positive or negative effect.

Different timing parameters for waiting in the Python script.
Different I2C speeds (from standard 100 kHz down to 50 kHz, 25 kHz, 10 kHz, 5 kHz and 0.5 kHz).
Different pull-up resistor values: 150 Ohm, 230 Ohm, 1.8 kOhm, 3.3 kOhm, 10 kOhm, and Inf (no pull-up). As well as the Raspberry Pi build in pull-ups.
Different number of sensors (connecting only 1, connecting 2, connecting all 4)
Different sensors on different buses (various permutations).
Untwisting the wires: For one sensor I untwisted the wires to attempt and reduce the capacitance between them.
Software resetting the bus (via this method) does not resolve the problem. Only a physical disconnect/reconnect works.
Rebooting the RaspBerry Pi sometimes resets the bus, but not always.

The only thing that did seem to solve the problem: Was when I moved one sensor closer to the Pi. With a twisted pair wire of ~0.2 m length it appears to work fine (tested for ~half an hour). This indicates to me that wire length, and thus likely wire capacitance or wire resistance is the issue. However when looking at the way to compute the maximum allowed values (as per this TI document), and looking at the characteristics of Cat 5 cable (wiki) I would think I should be well below the maximum 400 pF capacitance, and should have hit a suitable termination resistance somewhere given all the various resistor values and communication speeds I have tried.
(I unfortunately don't have an oscilloscope to measure the signals on the line directly.)
So to summarize the question: I'm at my wits end and hope that there is someone who can explain me what's going on.
Edits based on comments:
(2021-01-11 16:00)
I'm using a Raspberry Pi 3B+
I had the cables in twisted pairs as ((V;GND) and (SDA;SCL)).
I have now reduced the complexity of the setup. I only have 1 sensor connected directly to the Pi I2C bus 1 (GPIO 2 and 3), with only the Pi pull up resistors. The wires between are untwisted ~2m long. I've disabled all extra I2C buses. I've added a 4.7 nF and a 47 uF capacitor between the V+ and GND on the sensor side (As per suggestion from Justme to add some. I've chosen the cap values rather arbitrarily). This seems to work without issue(!) (Over 400 cycles, 4s interval. Stopped and started the script some times in between.).
From this point I extended to include one more sensor. I added an I2C bus number 3 on GPIO 17 and 27 with 3.2 kOhm pull-ups. Added a second sensor to this. The sensor also has 4.7 nF and 47 uF capacitors added at the sensor end. This is still connected via twisted wire pairs. The second sensor malfunctioned after ~200 cycles. At that point i2cdetect also only read addresses 'in slow mode'. Sensor on bus 1 happily continued on. I swapped the two sensors around. Same result after ~330 cycles: Sensor on bus 3 (untwisted pair) failed, sensor on bus 1 (twisted pair) continued on. So either it's the difference in pull-up resistors (next to investigate), or it's indeed that the extra I2C bus is unstable for some reason (as suggested in the comments by tflong01).
(2021-01-11 17:30)
Bus 3 is unstable with whichever sensor and whatever pull-up resistor. Sometimes it works for 100+ cycles, sometimes it fails on the first try. Any sensor on bus 1 however, is rock steady now that the caps are added to the sensor.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/118344/discussion-on-question-by-rob-h-i2c-bus-fails-after-a-few-sensor-reads).
Answer: Only a partial answer:

A single AM2320 sensor connected to the standard RPi I2C bus 1 over a ~5m twisted pair Cat5 cable runs without issues (>5 days already) after bypass capacitors had been added between the V+ and GND pins on the sensor side. (4.7 nF and 47 uF).
Adding multiple sensors by adding more I2C busses via the GPIO pins did not work. I suspect this is an issue with the implementation of these busses on the RPi 3B+ and not with the sensors or the wiring. I personally accepted this and left it at this for now.

As not scope was available, it could not be checked if for example noise on the SDA and SCL lines was a problem.
Notes from the discussion in the chat that may help other people:
If noise on the SDA and SCL lines is the problem, it can help to:

Avoid putting the SDA and SCL in a single twisted pair,
add 100 ohm serie resistors in these lines to reduce dV/dt,
replace the pull-up resistors with a constant current pull-up,
or reducing the Pi's IO driver strength.

Do not add capacitors to any of the signal lines.
It is questioned if the I2C bus on the RPI 3B+ can actually be set to values other than the default: https://raspberrypi.stackexchange.com/questions/108896/what-is-rpis-i2c-maximum-speed/109005#109005

I2C bus fails after a few sensor reads


Arrow's Impossibility Theorem Proof - Unicity of "dictator"

Question: I have a hard time understanding completely Arrow's Impossibility Theorem proof, even the very pedagogical one by Geanakoplos, that can be found for instance here : https://users.ssc.wisc.edu/~dquint/econ698/lecture%202.pdf
I don't understand the very last part (part 3b in this pdf) where, after proving that there is a "dictator over policies except a specific one we arbitrarily chose", we prove that in fact it is THE dictator (by repeating the previous process with an other arbitratily, different, policy)
It's supposed to be the "easy part" so I suspect I don't quite understand something before this final part...
The specific part that I don't get is when it is said that as "we already know that Bob's preferences over b sometimes matter" then " the new dictator must also be Bob". These 2 phrases sum up the part where they prove that the "dictator over policies except a specific one we arbitrarily chose" we found before is in in fact a "dictator over all policies" (and does not depend on any policy, and is unique). The first quote in this paragraph seems very light to me...
I'll give my confused explanation so that someone can tell me if I'm talking nonsense or not, and explain to me where I'm wrong in that case.
One point where I'm confused (and I guess that maybe it's why I don't get the final part) is how the "dictator over policies except a specific one we arbitrarily chose" has been proven to be unique ? In the proof (part 2 and 3a) I don't see where we prove its uniqueness (I understood how we show its existence in part 2). In fact, I have the feeling that it's the very definition of this "partial dictator" that underpins his uniqueness, since he alone determines society's choice independently of all the other voters, it's impossible that there could to be two of them, is that right ?
Is this what explains the final part ? I guess my confusion is visible...
Many thanks in advance. I can elaborate more if needed
NB : A more concise and "mathematical" version of this proof can be found here : https://www.ceremade.dauphine.fr/~vigeral/Memoire2017Elie.pdf
If you prefer to discuss it based on this version.
Answer: There cannot be two dictators over all alternatives, what would happen if one wanted alternative 1 and the other alternative 2? So if they prove that Bob is a dictator, they have proven that Bob is the unique dictator.
In other words: they don't have to prove uniqeness, it is inherent in the definition of dictator.

Arrow’s Impossibility Theorem Proof - Unicity of "dictator"


Use of the word "glitch"

Question: I find myself talking about computers with a lot of non-tech people, who often use the word "glitch" to describe an undesirable outcome of a program or operating system(of course, never Linux!).  I have never heard another programmer use the word "glitch" and hearing it makes me think the user has no idea what they are talking about.  SO my question: Do you use the word glitch in everyday, technical conversation, if not, does its use imply to you ignorance and lack understanding?
Comment: non-tech people don't talk about linux at all - and they get bored when you do ;-)
Comment: Linux glitches. For example, the open source nvidia drivers do very little other than glitch. It's just that non-tech people are rarely Linux users. Oh - and I'm a programmer who uses the word "glitch" quite a bit. But maybe that's just a mental glitch.
Comment: @Steven - It's a tactical thing. When annoying visitors lose the will to live, they either stay away or... well, cease to be a problem. Although there can still be a cleanup problem, I suppose - best *not* to explain the difference between sed and awk, probably.
Answer: Glitch came into computing from the hardware side. In hardware, it has a pretty well defined meaning -- a short-term, unexpected change in the state of a signal. This can happen for a number of different reasons, including noise such as from a nearby radio transmitter or static discharge, or defective design such as not taking propagation delays into account. In early computers (especially home-brewed hardware and such) problems from real glitches weren't all that uncommon, but as designs have stabilized, real hardware glitches have become pretty rare -- to the point that encountering a real problem from one anymore is probably pretty unusual.
Comment: This is a good point. Glitches (and [hazards](http://en.wikipedia.org/wiki/Hazard_(logic))) are well-defined in the electronic realm. +1
Answer:
A glitch is a short-lived fault in a system. It is often used to describe a transient fault that corrects itself, and is therefore difficult to troubleshoot. The term is particularly common in the computing and electronics industries, and in circuit bending, as well as among players of video games, although it is applied to all types of systems including human organizations and nature.
The term derives from the German glitschig, meaning 'slippery', possibly entering English through the Yiddish term glitsh. Source

But honestly, it's just another general term for the same thing. You can try to split hairs and define bugs, glitches, defects, etc. In the end, it is just something that is not producing the desired output.
Comment: @Steve314: The purpose of programming is to rigorously, unambiguously, formally communicate the behavior of complex systems to other humans not necessarily familiar with the system or the domain. In other words: splitting hairs is our job.
Comment: Splitting (often arbitrarily invented) semantic hairs is a common obsession in some places, though. For example contractese, with those strictly defined meanings for "must", "should" and "will"?
Comment: @Jörg - true, but not for what we're discussing here. Words like "glitch" and "bug" simply don't have precise formally-defined distinct meanings, except within particular niches. If it's useful to define some for a particular workplace, fine - but some people will then insist in every context that their particular meaning is the one true meaning and all other meanings are wrong. My contractese example is a bad one, though. Until a contract lawyer throws a temper tantrum over people using the word "must" in everyday speech without any penalty clause being specified, it's not the same thing.
Comment: @Steve314: Sorry for not being clear. I wasn't referring specifically to this situation. My comment was meant more as an explanation as to why such nitpicking and hairsplitting seems to be common in programming/technical forums even during casual conversations. IOW: the reason why it's a "common obsession" is because a) it's our job, and b) we're passionate about our jobs (otherwise we wouldn't be here discussing how to improve it, right?) and can't just switch it off at 5pm.
Comment: splitting hairs about splitting hairs? I think that we are using the wrong term here, it should be "being pedantic".
Answer: My know of many teenagers (16+) using it. At my work especially we don't speak of glitches, bugs or even problems. Since its widely accepted in our organization that if you say "bug" you assuming that there is a problem with out development and we claim liability for it.
Instead we say "issues" which need to be assessed.
Comment: Euphemism Creep. Soon, 'issue' will be a four-letter-word.

Use of the word "glitch"


Time derivative of a "general" vector $\vec A$ in an accelerating frame: what about e.g. velocity $\vec v$?

Question: According to Morin "Classical Mechanics" (Section 10.1, page 459), the derivative of a general vector $\vec A$ in an accelerating frame may be given as
$$\frac{d\vec A}{dt}=\frac{\delta \vec A}{\delta t}+\vec \omega\times \vec A, $$
where $\frac{\delta \vec A}{\delta t}$ denotes the rate of change of $\vec A$ measured in the rotating frame. I understand the derivation, but I am somewhat confused about the "general vector" part. The derivation assumes you have position vector, or that's how I interpreted it, because then $\vec r=\vec R+\vec r'$, where $\vec r$ is the position in the inertial frame, $\vec R$ is the position of the origin of the accelerating frame in the inertial frame and $\vec r'$ is the position in the accelerating frame. This is all fine and good, but surely if I take any other vector, say the velocity $\vec v$, this rule no longer applies? So my question: what is different about this "general vector" $\vec A$, or what am I not quite grasping?
Comment: It's not clear to me what your question is. If you're saying that perhaps Morin phrased the argument only for the position vector but not other types of vectors, then my response is simply that you have to repeat the similar steps and see that the argument goes through in general. This formula is completely general, and holds for any vector-valued map. See [here](https://physics.stackexchange.com/a/773823/203278) for the general formulation.
Comment: If one has a velocity vector ${\vec v}^\prime$ in a non-inertial frame which has an origin with velocity, $\vec V$ with respect to some inertial frame; then in the inertial frame the velocity is given by:$\vec v=\vec V+\vec v^{\prime}$. Such reasoning follows from the ordinary notion of addition of vectors.
Comment: Although my above statement about vectors is true, it doesn't really help when one wants to determine an explicit form for the time derivative of a vector in a non-inertial frame.
Answer: I struggled with this exact question before and let's be clear with something from the start. ${\bf A}$ can be any vector and this formula (10.5) works.
Next, for the general vector derivation, Morin says

The second group arises because the coordinate axes are moving. In
what manner are they moving? We have already extracted the motion of
the origin of the accelerating system by introducing the vector ${\bf R}$, so
the only thing left is a rotation about some axis ω through this
origin (see Theorem 9.1).

The ${\bf\hat{x}}$, ${\bf\hat{y}}, {\bf\hat{z}}$ and ${\bf R}$ are defined in (10.3) in  such a way that${\bf\hat{x}}$, ${\bf\hat{y}}$ and $ {\bf\hat{z}}$ they will only have rotational motion (no linear acceleration) and so we apply Thm 9.2 to $\frac{d{\bf\hat{x}}}{dt}$ etc... This is what the expression ${\bf r}_I$ = ${\bf R}$ + ${\bf r}$ is used for in the derivation. So let me be clear about that, the expression ${\bf r}_I$ = ${\bf R}$ + ${\bf r}$ is used in the general derivation for the vector ${\bf A}$.
For the general vector ${\bf A}$, he doesn't need to write down a similar relationship because of how he is using ${\bf\hat{x}}$, ${\bf\hat{y}}, {\bf\hat{z}}$ which were indeed defined in a (useful) way that required position vector ${\bf R}$.
To answer your question concretely, he could've done this with some other vector (e.g. ${\bf V}= \frac{d{\bf R}}{dt}$, ${\bf v}_I$ = ${\bf V}$ + ${\bf v}$)but what's important is that he wrote down ${\bf\hat{x}}$, ${\bf\hat{y}}$ and  ${\bf\hat{z}}$ in a way that they don't have linear acceleration.


Nginx server name difference

Question: If the server ip is 10.0.0.0, but I'm mapping it to make it to have www.example.com, is the below config the correct way to do it?
server {

    listen 80;

    server_name 10.0.0.0 example.com;

    access_log /var/log/nginx/example.log;

Answer: No, if you want to restrict a server to a single interface address, it needs to go with the listen directive:
server {

    listen 10.0.0.0:80;

    server_name example.com;

    access_log /var/log/nginx/example.log;

    ...
}

Answer: above answer, or you can just setup a basic server block
server {
listen 80;
listen [::]:80;

root /var/www/folderName/htdocs; // where you have your project folder and public directory
index index.html index.htm;  // add index.php here if using php files

server_name test.com www.test.com;   // desired url goes here

location / {
    try_files $uri $uri/ =404;
}

}
the tutorials from digital ocean are pretty nice - https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts

Nginx server name difference


Java Enums can have behavior?

Question: In Java, an Enum can do the great things that Enums do, but can also have methods (behavior and logic). What advantage does that have over using a class using an enum? Simple examples to illustrate the point would also be welcome.
Answer: Here's a simple example:
enum RoundingMode {
    UP {
        public double round(double d) {
            return Math.ceil(d);
        }
    },
    DOWN {
        public double round(double d) {
            return Math.floor(d);
        }
    };

    public abstract double round(double d);
}

Comment: The abstract method is overridden by the nested classes used by UP and DOWN.  You'd use it in code like this: double doMath(RoundMode m, double x, double y) { double d; ... d = m.round(d); ... return d; }  You'd pass in RoundingMode.UP or RoundingMode.DOWN as the first parameter.
Comment: How would you use this in code? Do I just do this?
 double foo = RoundingMode.round(20.3);

Or would you extend the enum to child enum? I'm thrown off by the abstract method.
Answer: Enum types are also a great way to implement true singletons.
Classic singleton patterns in Java typically involve private constructors and public static factory methods but are still vulnerable to instantiation via reflection or (de-)serialization. An enum type guards against that.
Comment: Although you do get some odd method "for free". (Anyway singletons are evil.)
Comment: I don't understand the comment.
Comment: Interesting point. How does the enum guard against reflection and deserialization? I guess I'm asking, what actually prevents me from instantiating an enum via reflection? Does the compiler throw a checked exception?
Comment: If you load an enum class and get an instance via reflection it will work, you will just get the same exact instance as you would normally.
Answer: I'm not quite sure where the title of the question fits in with the rest of it. Yes, Java enums have behaviour. They can have state too, although it should really, really be immutable state. (The idea of a mutable enum value is pretty scary IMO.)
An enum in Java is a fixed set of objects, basically. The benefit is that you know that if you have a reference of that type, it's always either null or one of the well-known set.
Personally I really love Java enums and wish C# had them too - they're much more object-oriented than C#'s enums which are basically "named numbers". There are a few "gotchas" in terms of initialization order, but they're generally fab.
Comment: Can't you emulate Java enums with C# classes?
Comment: @Vilx: Of course you can.  Before Java 5, you could write your own classes to make typesafe enum objects.  (Well, you still can, of course, there's just not much of a point.)
Comment: Vilx: You can, but it's a bit nasty. Basically you use an abstract base type with a private constructor, and derive from it with *nested* types which can call the private constructor.
Comment: I'd like to add a few more really's to "really, really be immutable state"
Comment: Can you give me a quick example of an enum with a state? Just trying to wrap my brain around that.
Comment: One example might be card suits, where each suit could have a name and an image associated with it.
Answer: Because the enum instances are singletons, you can use them in switch statements or with == to check equality.
Answer: Basically, Java enums are classes (I don't believe there is a difference at the bytecode level), with the additional benefit of having a known fixed set of possible instances and being able to use them in switch statements.
You can emulate the "known fixed set of possible instances" with regular classes (the "typesafe enum" pattern described in countless books and articles), but it's quite some work (repeated for every such class) to get it to work really correctly in regard to Serialization, equals() and hashCode(), and perhaps some other things I forgot. Language-level enums spare you that work. And, as mentioned above, only language-level enums can be used in switch statements.
Comment: They are classes, but there is a difference at the bytecode level.  For one thing, enum classes have the ACC_ENUM flag.  See http://java.sun.com/docs/books/jvms/second_edition/ClassFileFormat-Java5.pdf.
Answer: In our project, we're using Enums for a few things, but perhaps most prominently for i18n purposes - each piece of shown text is given an Enum. The Enum class has a String-returning method that inspects the Locale that is being used, and picks the correct translation from a collection of translations on runtime.
This serves as a dual-purpose - you get code completion from your IDE, and also never forget to translate a string.
The usage is very simple, to the point that it's almost rendundant to give an example, but here's how one might use the translation-enum
System.out.println(Translations.GREET_PERSON.trans()+" "+user.getName());

Or, if you want to be fancy, have the Enum accept arguments, which will, with some magic string manipulation, be inserted in a marked position in the translations string
System.out.println(Translations.GREET_PERSON.trans(user.getName());

Comment: Interesting usage, but it would seem like you could get the same behavior from a series of static methods in a class. Guess I don't see the advantage of using the enum.
Comment: Enums are much easier to add when needed. They are self aware too - you can get the string of the enum itself within trans() - therefore, you can use that as a keyword to match against in your translations-table
Answer: Take a look at java/joda time classes, where enums do hell of a lot of job.
Here is an example of java.time.Month:
public enum Month implements TemporalAccessor, TemporalAdjuster {
    JANUARY,
    FEBRUARY,
    MARCH,
    APRIL,
    MAY,
    JUNE,
    JULY,
    AUGUST,
    SEPTEMBER,
    OCTOBER,
    NOVEMBER,
    DECEMBER;

    private static final Month[] ENUMS = Month.values();

    public static Month of(int month) {
        if (month < 1 || month > 12) {
            throw new DateTimeException("Invalid value for MonthOfYear: " + month);
        }
        return ENUMS[month - 1];
    }

    // About a dozen of other useful methods go here

}

Java Enums can have behavior?


How to prove that a minimum edge cover is a forest?

Question: How can it be proved that any minimum edge cover is a forest? As far as I understand an edge cover could be one connected component therefore a spanning tree). If it's the case then it wouldn't be a forest.
Answer: A forest is a graph in which every component is a tree. If there is only one component, and that component is a tree, the graph is a forest.
So why is every minimum edge cover a forest? Suppose you have a graph $G=(V,E)$ and an edge cover $C\subseteq E$. Suppose some component of the graph $(V,C)$ contains a cycle, say $x_1x_2\dots x_kx_1$. Then $C\setminus\{x_1x_2\}$ is a smaller edge cover than $C$: $x_1$ is covered by the edge $x_kx_1$, $x_2$ is covered by $x_2x_3$ and every other vertex in $V$ is still covered by whatever covered it in $C$. Therefore, every minimum edge cover must contain no cycles, and an undirected graph that contains no cycles is a forest.
Indeed, we can go even farther. If an edge cover $C$ contains a path $x_1x_2x_3x_4$ then $C\setminus\{x_2x_3\}$ is a smaller edge cover, by essentially the same reasoning as above. Therefore any minimal edge cover is a forest that contains no path of three or more edges. So, not only is every minimum edge cover a forest, but it's a forest where every component is a star (a complete bipartite graph $K_{1,k}$ for some $k\geq 1$; note that $K_{1,1}$ is an edge and $K_{1,2}$ is a two-edge path).
Comment: A spanning tree is a tree so it is connected by definition. An edge cover doesn't have to be connected, and a non-minimal edge cover doesn't even have to be a forest.
Comment: @Yos Because if it wasn't a tree, it wouldn't be minimal. Edited.
Comment: but according to that logic a spanning tree is a also a forest. then what is the difference between spanning tree and edge cover?
Comment: it seems like the proof is almost trivial in that case: either the edge cover is one connected component then as you said it's made of one tree so it's forest; or it's made up of multiple tree then it's also a forest
Comment: The point is that an edge cover doesn't have to be a forest at all. The nontrivial part is proving that every component of a minimal cover is a tree. But you proposed "It could be a tree" as a counterexample to the proposition that it's always a forest. I've explained why that's not a counterexample.
Comment: When you say in the answer that "If there is only one component, and that component is a tree" what if there're cycles and it's not a tree? Why do you suppose the case that it's a tree?


Can't upload images due to permissions error

Question: For some reason when I try to upload an image to my blog I get an error message saying that WP can't create a folder under the relevant directory (wp-content/uploads/2010/09) and it's asking if the folder above it has write permissions.
The parent folder indeed has write permissions. I tried creating the folder manually and it still shows the same error message.
Comment: @Lea, In order to provide an accurate answer to you question more details are needed.  Is this a new WordPress installation?  If not were you able to upload images in the past?  What permissions do the current upload directories have and what did you change them to?  Is PHP running under the username or a group name like nobody or www-data?  Are your WordPress files owned by a username or username:groupname?
Comment: *@Lea*: To add to the questions by *@Chris_O*, who is your webhost? To administer are you using FTP, CPanel or other? Are you on Mac or PC? When you say it has write permissions, what are the numbers it has?
Comment: What was the error massage Lea ?
Comment: I use Site5 for hosting. The WP version is 3.0.1
I uploaded images successfully until this problem. This isn't a new blog. I haven't touch the permissions and that's why it's surprising. All folders from Uploads and down have read/write permissions. I use the Site5 FTP and/or edit via WP. The numbers are 7 5 5.
Comment: *@Lea*: Do any of these answers below help you solve your problem? If so, please up vote them to thank the people who've helped you, and pick the best answer so your question doesn't remain in the "unanswered" list.
Answer: @Lea,
This error happens when PHP (WordPress) can't write to the file.  This is caused by not having write permissions or the username or group that PHP (WordPress) is running under doesn't have permission to write to the file.
755 permissions will allow WordPress write permissions when PHP is running as the username under most shared host plans.
Some FTP programs will allow you to change the user and group assigned to the folders.  You can also make this change using Cpanel's file manager.
The folders should have the same username as your Cpanel account.
Some server environments require you to use 777 permissions for PHP to have write access.  This is not secure in a shared hosting environment.  You can change your permissions to 777 temporarily to see if that allows you to upload photos but MAKE SURE YOU CHANGE THEM BACK TO 755 WHEN YOUR DONE.
Your hosting provider should also be able to provide help in this situation.
Answer: This seems to be a common problem. I've dealt with it a while ago too. In my case, all of the proper directories had 777 permissions. Here is my solution, along with a bunch of others that I've tried:

In my situation, I had to make sure the FTP user account I was using for WordPress had read/write/execute access. Inexplicably, the original user account had its permissions reset, perhaps by the web host or something. We were never able to determine what caused this change. Using an admin account, we were able to upload images without issues again.

These tips come from a thread from WordPress support for WP 2.5 (you can refer to the link for more info on any of these items):

Make sure you uploaded all the WordPress files correctly.
Clear your browser cache, restart your browser.
Update your Adobe Flash to the latest version (esp you Linux users!)
Disable your plugins and see if the buttons appear. If so, reactivate one by one until they don't appear any more.
Upgrade all your plugins as well.
The highly popular Bad Behavior plugin breaks the uploader. Upgrade it to 2.0.14 (or later).
mod_security might be causing problems. Disable it to see if that is the problem.
Try a smaller image, in pixels. Filesize is largely irrelevant, it's the width and height of the image that matters.
Sometimes the problem is with the image itself. WordPress uses the normal PHP functions for working with images, which are in the "GD" library. GD has problems with certain types of images. One particular image type that it cannot handle is grayscale images. If your image is black and white or grayscale, then make sure that it's a FULL COLOR image.
A new issue in WordPress 2.6 occurs when you have a custom directory for file uploads. The upload will work, but the link/thumbnail link will be wrong and so the image won't appear.
Do you have custom settings on the Settings->Miscellaneous screen? If so, make sure that they are correct. The upload directory must not have a leading slash in front of it (uploads instead of /uploads), and the URL must not have a slash at the end of it.
Answer: This fixed it for me: I was logged into WordPress using the user name I created when installing instead of my original cpanel user name that had proper permissions on my account. I fixed the issue by creating a new WordPress admin user using the same username and password as my cpanel user. Logged out and back in as that user and problem solved.
Answer: Try to add permission to the parent folder which is the "uploads" directory.
Comment: The uploads folder also already has write permissions.
Answer: Try uploading the images using FTP software and see if it gives same error.
Also check if there is any plugin auto-creating a thumbnail of the image uploaded in some other directory
Also try changing the default file upload location in case this error insists on showing up
Hope any of this helps (:
Answer: One thing that occurred to me - WP will tell you that it can nto copy file to /wp-content/upload even when all permissions are right.... if

upload_max_filesize

in php.ini is too small (say 2M and you try to upload 3.5MB file)!
Hope that helps all thsoe who have right permissions but still can not upload!
Answer: In my case, this was caused by the upload_path option in the wp_options table having the wrong value.
The solution was to empty the option field. This makes WordPress use the default upload path (<wproot>/wp-content/uploads)
MySQL query to do this:
UPDATE wp_options SET option_value = '' WHERE option_name = 'upload_path'


redirecting an ajax processing page

Question: I have a page that checks to see if the user logged in and if the user is not, uses an jQuery ajax call to a php processing page to get the information.  But to get the information it has to redirect out to the 'login site' which sits on a different server, and the 'login site' then POSTs back the login information to the php page, and the php page turns the raw data into something the first page can understand.
Well at least that's what's suppose to happen.
What actually happens is that once the php processing page redirects I get a 302 error.  I've tried going to the php page without the ajax call to it and it works fine, redirecting to the 'login site' and accepting the post back.
I can't remove the ajax call and just code the bounce into the first page because the page is html, unfortunately it has to stay that way, and html pages don't like POSTs to them and crash.
Below is the code with the ajax call...
if (Login == null) {
    $.get("some_php_page.php", {  }, function(data) {
        if (data == "") {

        } else {
        //set login cookie;
        }
    });
}

Below is the php processing page...
if ($RefererServer != LoginServer) {
    header( "Location: LoginServer/verify.php");
} else {
    // send login information back
}

Anyone have any idea?
Comment: You should read this thread, i think it addresses your problem:
http://stackoverflow.com/questions/199099/how-to-manage-a-redirect-request-after-a-jquery-ajax-call
Comment: Remember that AJAX calls are subject to same-origin security policies. Redirect the ajax call to a completely different server is HIGHLY likely to trigger the security policy and kill the request.
Comment: How is 302 an error? It is the code typically used to for redirection.
Answer:
On the server side, you should return a json:
{ "success: false, "redirect": http://redirecturl.com }
On the client side, redirect is made by js
$.ajax({
    // ....
    success: function(response){
        window.location = response.redirect;
    }
});

redirecting an ajax processing page


Designing Multi-Tier application to use progress bar

Question: I have a multi tier application in c# that is supposed to perform tasks on a database (If first time use, we may create the database and fill it with some data). When I initially designed the application I didn't account for a possible progress bar control, let alone any reporting of progress of any sort. How can I modify the design of the application to be able to report database operations progress to the UI layer? Is there a solution out there that is reusable and doesn't force me to modify all my functions to take additional inputs for the reporting?
Comment: Good luck.  (Reporting) progress is hard
Answer: As Greg said, there's a lot of work ahead. However, there are many ways in which to approach the problem, and the best for you depends on what contextual information passes down from the client to the application/database layers already. For example, if a session token or transaction identifier is passed from the client to the application in the normal course of executing a query/transaction or an acknowledgement reference passed back asynchronously from the application to the client, then for those queries/transactions for which progress reporting was necessary you could have the application update a status table that the client could query. This could reduce the amount of re-work required. Basically, you need to consider the "middleware" in place already and see if any of that can be leveraged to correlate transactions across tiers.
Answer: No. Depending on how large your application is, you have a lot of work ahead of you.
For progress reporting to work, you need the code which is performing the work to raise events when a unit of work is completed.  That event needs to be handled at the UI layer and progress indicators updated.
A good place to start would be to look into using BackgroundWorker (there is an example on MSDN here - http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx).  Once you're familiar with the BackgroundWorker you should be in a better position to decide which changes you need to make to your application.
Answer: You could modify the server code so that it updates progress information at the server end (without changing function signatures), and then have a separate method that can query this information separately.
This would allow you to retrofit support for progress without having any impact whatsoever upon your existing calls to the server, just add a new background thread on the UI checking for updated progress information while a long running task is underway.
Edit: I guess the same approach would work for tasks that take place in the client. But still, a static progress indicator class could be used here too.


Why didn't Cirrus make the SR-22's parachute steerable?

Question: After the parachute is deployed there is no control where the plane is going, so why didn't Cirrus make the SR-22's parachute steerable?
Comment: I'm just guessing, but since you can create some pretty significant descent rates over-steering a chute this may be more dangerous than it is beneficial. On top of that, additional training would be required to effectively steer the aircraft under a chute which most passengers wouldn't take. A big selling point of the chute is for passengers to be able to deploy it if the pilot is incapacitated.
Comment: Upset recovery training is also good for surviving emergencies, as well as IFR because "inadvertent flight into IMC" is a major cause of accidents for VFR pilots, yet a lot of people elect not to take those additional training. And other than destroying an airframe or developing an advanced simulator, its difficult to train for just reading about it on paper...
Comment: I guess if you'd like to own a Cirrus and survive in emergency case, you would get additional training if it was available and learn how to steer a parachute. I agree with you in case pilot is incapacitated, but it could have both modes.
Answer: Remember what the purpose of the CAPS/BRS airframe parachute is: It's a last-resort emergency measure to put the aircraft on the ground in a condition that is likely to be survivable for those onboard.
Steerable parachutes add considerable complexity: Control lines would need to be routed into the cabin, and connected in such a way as to not interfere with the chute deployment under any circumstances.
Assuming a suitable design could be devised to accomplish that a steerable parachute (even for a single person) requires quite a bit of training and skill to use. This is not something that can be adequately trained for in the case of the Cirrus airframe chute (because pulling the chute on perfectly good aircraft to teach steering would be cost-prohibitive).
Faced with the risks and complexity of a steerable chute or the relative simplicity and safety of a simple drag chute to decelerate the airframe prior to impact (hoping you land in a suitable 40-by-40 foot square) Cirrus and BRS opted for the latter. The result is a dead-simple "Pull the handle!" system that's proven very successful thus far.
Comment: Not to mention, If gliding the airplane to a safe landing were an option, you wouldn't have pulled the chute.
Comment: I somewhere read that (READ) if you glide, your speed at landing would probably around 40-60 depending on aircraft. As per Cirrus, you would be dropping at 20 MPH. Rolling at 40-60 is better than Dropping at 20 (I think). Would love your answer on this.


Will relative velocity of light exceed $c$?

Question: Suppose I'm standing a few light minutes away from a light emitting object, as soon as the light is turned on, I project myself towards the object with some speed. Will the relative velocity of my speed and $c$ add up to give a velocity higher than speed of light?
Comment: No that won't happen. See this: http://math.ucr.edu/home/baez/physics/Relativity/SpeedOfLight/headlights.html
Comment: Irrespective of the relative velocity between you and the light source, you will *always* measure light (in a vacuum) to travel at $c$.
Comment: This question gets asked here every few weeks (in various guises) - if you search the site you will find good answers by high-reputation authors.
Answer: No. This will never happen according to Special Relativity and its addition of velocities principle. You might be thinking of Galilean Transformation in which two velocities will add with no limitation. But, these transformations are only special cases of Lorentz Transformation where the following postulate holds true and can not be violated:

As measured in any inertial frame of reference, light is always propagated in empty space with a definite velocity c that is independent of the state of motion of the emitting body. OR: The speed of light in free space has the same value c in all inertial frames of reference.

Take a look at the following source in which you can plug in values for v and u' and yet resultant velocity u will never exceed c:
Einstein Velocity Addition
So, Nature is bound by a stringent constraint for the velocity of any object.


ffmpeg encode bing like video preview

Question: I want to mimic the bing video preview functionality, with a thumbnail preview, then onMouseOver, load and play a video file. I plan to use VideoJS (html5 + flash) for the video playback. I need to use ffmpeg to produce these video files.
How can I create a mp4 preview with video only, which contains 1s of every other minute of the full clip, and shrink resolution to a fixed width (maintaining aspect ratio, preferably with zoom crop) using php + ffmpeg command line?
I'm assuming it can be done somehow along the lines of cutting 1s clips, then combine the smaller clips, and re-encode for a final rescaled output.
*Edit: Using ffmpeg is a design requirement. Pulling out 1s clips, should be fairly easy, but combining them seems to be somewhat complex with ffmpeg. I don't want cycling thumbnails, I want a video preview which contains a number of 1s clips. Eg. runtime in seconds: 100-101, and 200-201 combined in a heavily compressed clip. I am asking for a command line example of how to do this in an efficient manner.
Answer: One way to do this in Windows (or wine) would be to use an Avisynth script. This would allow you to do all your desired transformations in one step. It's been a little while since I've used Avisynth but a very simple script might look like:
<code>DirectShowSource("C:\file\to\encode.avi", audio=false) # Or another source filter
SelectRangeEvery(1440, 24) # outputs 24 frames every 1440 frames
BilinearResize(320,240) # resize to your desired resolution
Crop(...) # crop to reach desired aspect ratio
</code>
This could be extended to support various framerates and aspect ratios instead of hardcoding everything. The resulting .avs file can then be used as an input file to ffmpeg, provided that it has been compiled with --enable-avisynth.
Answer: I've an approach and i think that will work...
Using ffmpeg you can get thumbnails of the video at specific intervals.
So i will take about 5 to 10 thumbnails in the interval of 2 seconds and store them on my server with a unique name that identifies the video.
So when I mouse over i call the function which will load these images sequentially(which makes the user feel the video is fast forwarding..)
But in this format, we can't play sound when we mouse over ..
I don't know whether this is good but i know this will work..
Update:
I think it will be better to create a video using ffmpeg using the extracted images and play them while we mouse over.. This will be quite faster than loading a sequence of images. ffmpeg can be used to create a new video from a list of images.
Answer: I managed to do this now, by pulling out 1s clips, and convert them to mpeg. Then combine these mpeg files, by appending them into a single file. Then convert til mpeg file to mp4

ffmpeg encode bing like video preview


Why do I have to fake Texlive package in Ubuntu?

Question: I followed this answer like a parrot and installed Texlive on my Ubuntu. However, I don't understand why I have to create a fake package to trick Ubuntu into thinking that texlive is installed. What is the point? I thought that simply having texbin on the path is sufficient for other programs to find texlive.
Answer: Having the path to the TeX Live binaries in your path is indeed sufficient for other programs to find TeX Live. It is more of a question of installing the same thing twice (or rather a newer version and an older version).
apt is the package manager of Ubuntu and it has no idea that you installed TeX Live unless you used apt to install it. Thus, if you don't use apt to install TeX Live, you need to tell apt that TeX Live is already installed or it will think that TeX Live is not installed. Why is it a problem if it thinks that TeX Live is not installed? Well, if you install a package that depends on TeX Live, it will think that it needs to install TeX Live. Many people want to avoid this extra installation.
You might be interested also in the information at https://github.com/scottkosty/install-tl-ubuntu/
Comment: Adding to this, it would greatly help to understand that the GNU/Linux world is different from Windows. While in Windows you have to download/buy/clone every piece of software from a separate location and install each with its own installer, shipped with their own versions of the libraries (often duplicates), in GNU/Linux, e.g. with `apt`, you can almost always avoid doing that by having the package manager handle all the process for you.
Comment: Does this apply if you install and update packages with ``tlmgr``? Does it too need a fake package to think texlive is installed?
Comment: @sverre if you update packages with `tlmgr` you do not need to do any additional changes to notify `apt`. This is because the Debian control file that is used does not allow for specifying versions. If you install new packages with `tlmgr` and you did not have the equivalent packages in the control file, then you could add them. For an example of the control file, see https://github.com/scottkosty/install-tl-ubuntu/blob/master/debian-control-texlive-in.txt
Answer: suppose you have installed the TeXLive version from http://tug.org/texlive/ and now you want to install the editor Texmaker with apt-get install texmaker. Then Ubuntu's package manager tells you that you also have to install the TeXLive. This doesn't happen when faking the package manager of Ubuntu.
If your Ubuntu uses the latest TeXLive version from Debian (2014) then you already can use the one from Ubuntu, it comes with the program tlmgr which allows updates of TeXLive without using apt-get. Older versions of Ubuntu's TeXLive had no update mechanism.


Different gauges of wire

Question: My house is 54 y/o. Years ago the circuit panel was upgraded to all 20 amps with the exception of the AC and oven.
I am adding a can light which uses 12 - 18 gauge wire. I chose 14 gauge.
I am wanting to tie it in to the existing on/off switch which I believe may be wired with 12 gauge wire. Is it safe to tie in the 14 gauge to the 12?
Answer: No, you may not use 14 gauge wire on a 20 amp circuit. You need to use 12 gauge wire.
Comment: I know it sounds silly since the lamp has small wire that you have to use such a large wire to make the connection but the lamp wiring is enclosed in the box and fixture.+
Answer: Go for it, but you will need to change the breaker in that panel to 15A. Also put a tag on the #12 wire going to that breaker that says "#14 wire in circuit".
Also, any 20A receptacles on that circuit (Ms. Winky) must be changed to 15A receptacles (Ms. Horror).
Also, if the hardwired loads on that circuit total 7.5A or more, you cannot have any receptacles at all, or the loads must be changed to smaller draw loads.
Still want to do that?
Answer: What does the switch currently switch? Were you going to do the splice at the existing light fixture or in the box itself (not sure why you'd do this, and you'll probably have space or missing neutral issues).
You should check the breaker that controls the switch's circuit. If it's 20A (likely with 12 gauge wire) and you want to continue with 14 gauge wire, you must verify your loads and downsize the breaker to 15A. You're probably better served just continuing with 12 gauge. If your existing wiring is aluminum, you must also splice to new copper wiring with a Al/Cu nut to avoid corrosion.
Comment: Can you just tie into the existing light's box? You shouldn't need to modify the switch for this. I'd verify the conductor metal to know if you have to do a Al/Cu splice, and do the short run between the two lights with 12 AWG.
Comment: I want to wire it into the current light switch so it will come on at the same time as the existing light. Not from the 20 amp breaker to the light. It's an add on.
Comment: Not a good practice to downgrade a breaker, the next person sees the 12 in the panel and that huge disco ball keeps tripping the circuit so 12 is good for 20 and they upgrade the breaker.  fire is the next possibility for not using 12 to the next fixture in the first place.
Comment: These are all copper wires.

Different gauges of wire


Ubuntu Internet stops working

Question: I have a very big Internet problem in Ubuntu. Whenever I load a web page or download something it will download half of the file and then it will stop downloading. After that the only whey I can fix it is if I diconnect from my wireless access point and then reconnect and start the download again. So how do I fix this? This also happens with Youtube videos.
Comment: Welcome to Ask Ubuntu! We need more hardware information to help you, can you look at [this question](http://askubuntu.com/questions/14008/i-have-a-hardware-detection-problem-what-logs-do-i-need-to-look-into) and then edit your question adding the information.
Answer: try typing this on your terminal - -
    sudo dhclient0 wlan0

This might solve the problem ..
If not then while your internet is working..
type
    lspci

in terminal and save it in a file
after you get disconnected try this again and write in a different file
vimdiff to see the device-driver change.. download a set set of drivers accordingly to solve..
Comment: It say dhclient0 cmannd not found
Comment: @iphone4life4, it should be dhclient without the 0. This worked for me, thanks minocha.
Answer: Is this issue only on ubuntu? Is it only on this computer?
If the answer is yes to both of these questions, it may be a driver issue. Otherwise it is most likely an internet connection issue.
For best support it would be good if you could give us the name/model of your device to allow us to help you more.
Otherwise, try this in terminal...
modprobe -r *driver_name*

Then follow these directions to blacklist the module... http://ubuntuforums.org/showthread.php?t=796831
If you have any issues, you can un-blacklist the module and re-add with
modprobe *driver_name*

Ubuntu Internet stops working


Links table on multiple publishing targets out of sync

Question: We have set up 2 publishing targets (web and web2).  The web items tables are in sync with the same number of items and the items match when comparing. The problem is we are seeing the links tables between the 2 out of sync.  The numbers do not match?  I have noticed this using our custom config, I have also set up a minimal site from a vanilla SC deployment with the only config change being a second publishing target. After creating some templates and pages and publishing I can see the links table is out of sync even though the items including the newly created / published items match. Has anyone come across this before.  Is it something to be concerned about or is this expected behaviour?
Answer: If your both targets are identical, then it should match ideally. I would advice you to try following -

Republish site on both targets
Rebuild indexes
Rebuild Link databases

Make sure to do this sequentially so not to miss out any probability.
After this you link databases should match for both targets.
And even if it doesn't, I dont feel that this is concerning. Generally we do not peep into these activities and let framework handle it.
I would only extend my investigation if I face any problem.
Hope this helps !


How deploy UWP app like we did WPF from windows server?

Question: I am new in UWP deployment need the right way to do this
I want to deploy my UWP to my users through group policy like we did WPF app?
Answer: Derive from Distribute LOB apps to enterprises document.

There are several options for distributing line of business (LOB) apps to your organization's users using MSIX packages without making the apps broadly available to the public.

And App Installer is suit for your scenario that double-clicking an .appinstaller file that installs the app package from a web server. For the detail steps you could refer to  Installing Windows 10 apps from a web page document.
Update
For your comment questions, You could refer to Deploy an Application from Windows Store for Business via System Center Configuration Manager document.

you can take the .appx file for an app that has been made available for Offline use, and distribute the app with a management tool such as System Center Configuration Manager or the Windows Imaging and Configuration Designer.
Comment: from App Installer ".appxbundle" is created.. so this file can we deploy through management tools?
Comment: Yes, i understand,, I have few questions.. 1) Basically I want to deploy my UWP app like we are doing with WPF MSI... i want something like MSI that can install through command line without any UI or i can easily install that for many users from one place...So i need to create MSIX for that if yes how to create MSIX for UWP application. 2) its is possible to deploy ".appxbundle" file through Management tools like Citrix?
Comment: Hey, thanks for the update.. can we install this Appx from CMD?
Comment: We recommend use powershell to install appx package. you could refer this [document](https://learn.microsoft.com/en-us/powershell/module/appx/add-appxpackage?view=win10-ps).


Why don't we migrate more?

Question: So today, I asked a question on UX and received the following comment about this being a legal issue and not being allowed on UX. Why wasn't this post migrated to the Legal Stack Exchange? How do you migrate and why isn't it done more?
Comment: Why migrate to somewhere if it will be off-topic there? Unless you *know* the target site well, you shouldn't offer migration to it.
Comment: Being a legal issue doesn't automatically mean it belongs on [law.se] - they have a help center that tells you what is and is not on topic there.
Comment: Could we encourage users to at least bring up migration? Most just say this is off topic and leave!
Comment: Migrations come in with the close privilege - you can vote to migrate to another site. You need a consensus on that (IIRC, 4 votes to the same destination) and a site can have a maximum of 5 destinations (their meta being one).
Answer: One comment saying a question should be migrated doesn't mean it should be.  People say and think all sorts of things; they aren't always right.  Others on your site might disagree, or it might sound plausible but it turns out the other site has guidelines that the question doesn't satisfy.  If a question gets migrated in that state it'll just be closed on the other site.  All that bouncing around is frustrating for the user who asked the question, and we shouldn't be yanking the question around unnecessarily.
Migration is part of the close-vote process currently, so if voters (or a moderator) agree it will be migrated.  But if the question is on-topic where it was asked it shouldn't be migrated even if people think it would fit better somewhere else; if it's on-topic here, answer it here.
You as the asker can re-ask your question on another site if you agree with the suggestion, though this is a little controversial and you need to avoid crossposting the same question on multiple sites.  In re-asking you'll probably need to do some editing to tailor it for the site where you're asking it, so check out the site's tour and on-topic help.  If you re-ask your question elsewhere and can't just delete the original, be sure to indicate that you've done this -- a comment with a link to the new question, for example.
Comment: @MichaelKjörling I think, by and large, migrations haven't served us well; often I see a question get migrated that then has to be edited to fit the new site *anyway*, plus it comes with comments that usually need to be deleted, plus the user might not have even created an account so can't be pinged.  So if it hadn't gotten very far along to begin with, why not just start clean?  I made some minor edits to acknowledge that not all agree with this approach.
Comment: @MichaelKjörling fixing a question before migrating it is good practice but too-seldom done.  IMO [migration should be possible only after closing, and we need to make the other site's scope more obvious to migraters](http://meta.stackexchange.com/a/277891/162102).  Reducing bad migrations helps everybody.
Comment: Please don't encourage people to re-ask a question elsewhere on the network. If the *OP* wants their question migrated, it's better if they flag it for moderator attention and request migration to a specific target site. (I know, I know, I don't have any diamond now, but I argued the same when I did. Except perhaps on the largest sites, this should be a rare enough event to not put any undue workload on the diamond moderators, and the largest sites on the network already have a good number of diamond moderators to spread the workload.)
Comment: True, it depends on the specifics of the question being discussed. But I still think encouraging the user to post it a second time risks, if nothing else, leading to duplicated effort; the few times I've seen that, the OP has just reposted what they had, so we might almost *as well* just have migrated. If the question is poorly written, it might well be better to put it on hold on the original site, get it fixed up to a presentable state, *then* migrate.

Why don't we migrate more?


How could I visit StackExchange when I am on StackOverflow?

Question: How could I visit StackExchange when I am on StackOverflow? Now, I input the address of StackExchange to visit it when I am on StackOverflow. Is there another way?
Comment: @AlE. I disagree. That's a [tag:feature-request]; this is a [tag:support] question
Comment: @AlE. So? I was always under the assumption that that quality did not necessarily make questions into duplicates. See, for example, http://meta.judaism.stackexchange.com/q/506/5323 and http://meta.judaism.stackexchange.com/q/1339/5323
Comment: @Shokhet I can't see AIE's suggested duplicate to see what he was suggesting, but in general the rules are a bit looser on meta than on main sites.  We don't need the same discussion on multiple posts over and over again.  So if the question (regardless of tags) can be answered by reading the comments and answers (mostly answers) on the linked question, then they really on duplicates on meta.
Comment: @psubsee2003 Makes sense, I guess.
Answer: Right-click on "StackExchange" on the upper-left of the page.  Select "Open link in new tab".  Then www.stackexchange.com will be open in the new tab.
Comment: Whoa. You just blew my mind with that one.
Answer: From SO, there are a few ways that I know of; it's a bit easier to get to meta.stackexchange.com than plain old stackexchange.com:

To MSE via dropdown:

Click the Stack Exchange drop list at the left of the top bar.
If Meta Stack Exchange is one of your top communities the link will be readily visible, at least to the meta.
If not, you can type "Stack Exchange" in the search box there, although at that point you might as well just type it in your address bar. However, if you click "edit" in the drop down, you can add it as one of your communities.

To MSE via bottom navigation menu:

Scroll alllll the way down to the bottom of whatever page you are on.
In the column on the right, there is a link to Meta Stack Exchange.

To SE via your profile:

Visit your user profile on Stack Overflow.
Click "Network Profile" on the top right.
You are now looking at your network profile on stackexchange.com and can navigate around from there.

To SE via the tour page:

Click "Help" on the right side of the top bar.
Select "Tour" from the drop down menu.
Near the top of the tour page, just under the big Stack Overflow logo, there is a direct link to stackexchange.com.
Comment: [pacoverflow's answer](http://meta.stackexchange.com/a/252997/230261) is way easier.
Comment: "way" is an understatement :D It's like a quick sentence and simple process, vs Comprehensive Sys Admin handbook for Red Hat... (yours *is* more thorough, and some people like *options*, so +1 for both)


Is "You alright?" (without "are") acceptable?

Question: I'm having a hard time figuring out which is the correct form of asking this kind of question. I mean speaking strictly, this doesn't sound right: You alright? or You eaten anything? compared to Are you alright? and Have you eaten anything?.
So please enlighten me. Are those both forms correct or just something which is ignored for the sake slang speakers?
Answer: Those phrases are examples of ellipsis: the omission of words that can be understood from the context, or given contextual clues.
While ellipsis is not normally used in formal English, it is more used in spoken English, or informal English.
Answer: These aren't correct in formal English. Here, the sentences say "Are you alright?", "Have you eaten anything", as you mentioned. The "Are"/"Have" are implied here, that's all. One finds this a lot in informal English -- words which can be guessed from context are sometimes dropped altogether.
It's just a way to save time, similar to how contractions are used (though contractions may be used in formal English as well)
Answer: We use ellipsis a lot in spoken English. It's certainly not good written style though!
I might have a conversation like this with friends:
Alright? Coming to the pub tonight?
Naa (No). Too tired. Went out last night.
Stay out late, did ya (you)?
Yeah. Got home about 2 in the morning. Wife wasn't happy!
Comment: This adds nothing to the existing, accepted answer.
Comment: I'm terribly sorry. Would it be acceptable ellipsis just to say "Supercilious curmudgeon"?
Answer: "You alright?" is not necessarily true according to the grammar rules. It is instead used for conversations with friends and relatives. The most correct sentence, in my opinion, would definitely be: "Are you alright?"


How do the Trader books connect to the main Liaden storyline?

Question: In the Liaden universe, has there yet been a connection made between the Trader books (Balance of Trade, Trade Secret) and the main line (Agent of Change, Fledgling, etc.)? I'm thinking it must be through the creation of Bechimo... but I don't recall reading anything directly on point. Have I missed something?
Comment: What do you mean by "connection"?
Comment: @jmoreno
By 'connection' I mean that the events/characters etc in one sent of books seemed to not have any relationship to the other books... nothing that happened in one set affected the other set, no common characters, etc.
Comment: Clans and contra are mentioned, as are fractions and auto-doc's.  The Rabbit clan is mentioned in several books
Comment: Well, as to clans and cantra that is just background of the universe... Liadens, Terrans, ships, etc. I was looking for something a bit more specific. However I would be interested in knowing which books Rabbit clan is mentioned in. Do you read them much?
Answer: Well, I believe I asked this question just a little too early. The connection is beginning to be made in the newest book 'Trader's Leap', which just came out. The clan that was involved in the Trader books, turns out to have helped colonize a planet with Korval (mainline books), and the planet is the focus of the new book, with both clans coming together in a trading relationship.
Comment: Note that both can be found in the crystal soldier books
Comment: Both clans? I didn't realize that, it has been a while since I have read them. Still Trader's Leap seems a bit more specific of a connection, eh?
Answer: Ixin is mentioned in I Dare:
"Deliberately, she sought out Korval's known allies and friends: Justus, Guayar, Ixin, Reptor, Mizel"
Mouse and Dragon: "Ixin, allow me to make you known to Aelliana Caylon Clan Mizel, Scholar and Pilot. Scholar Caylon, here is Lus Tin ven'Deelin, who has the honor to be Ixin"
Local Custom:  "To make matters even more confusing, it is assumed all persons of melant'i will have a firm grounding in Liaden heraldry, thus opening up vast possibilities for double-entendre and other pleasantries. "A hutch of bunnies," will indicate, en masse, the members of Clan Ixin, whose clan-sign is a stylized rabbit against a rising moon. Korval, whose distinctive Tree-and-Dragon is perhaps the most well-known clan-sign among non-Liadens, is given the dubious distinction of dragonhood and a murmured, "The Dragon has lifted a wing," should be taken as a word to the wise".
a ven'Deelin is quoted in Daughter of Dragons (found in The Tomorrow Log and Dragon Tide).
Korval is mentioned in both Balance of Trade "Korval Herself led the opposition, so the history texts tell us, and at last prevailed" and Trade Secret "On other fronts there was Korval, meddling as always".
Also, the Uncle is mentioned in Balance of Trade.
As for cantra, as it is named after Cantra, the founder of Korval, so I wouldn't consider it mere background content, it's not a dollar or a credit, it's the money minted using Korval's dies.
This shouldn't be taken as an exhaustive list, but yes, the books are clearly related, and not in the sense that Twilight and Anita Blake are set in the United States.  The clans at least have a history of interacting, although we don't see it happening on screen so to speak, until Trader's Leap.
Comment: Well... yes, but that's not quite what I mean. Take 'Fledgeling'. We follow the adventures of the young girl... and then suddenly in the middle of her overall story find out she is actually related to the Delm of Korval, and comes back to meet him, meets the turtles, etc. There is a difference between being in the same 'universe' (in the official sci fi sense) and being more related stories. I'm thinking that Trader's Leap is going to link together the characters in the Trader stories (possibly their great grandkids) and the main line of Korval.
Comment: And I am still wondering when we will figure out about the whole idea of Bechimo came from, and what was the crisis that stopped him from being crewed.
Comment: @VaughnOhlman: Bechimo is clearly an extension of the Uncle's work with fractin.  I would speculate that the crisis was just more intervention by the scout's, who at least as of BoT were not in favor of anything to do with them (or at least thought they were the only ones that should have them).
Comment: Well, that could well be. But with the amount of focus on it I would not be at all surprised if they wrote something, even if perhaps just a short story, covering those events.
Comment: OK, I just discovered another connection. When the Scout Ruling is made in Accepting the Lance it is mentioned that he was built in reaction to the secret then published document from the Trader series.


Why are there so many different ways to measure disk usage?

Question: When I sum up the sizes of my files, I get one figure. If I run du, I get another figure. If I run du on all the files on my partition, it doesn't match what df claims is used. Why are there so many different figures for the total size of my files? Can't computers add?
Speaking of adding: when I add the "Used" and "Available" columns of df, I don't get the total figure. And that total figure is smaller than the size of my partition. And if I add up my partition sizes I don't get my disk size! What gives?
Answer: Adding up numbers is easy. The problem is, there are many different numbers to add.
How much disk space does a file use?
The basic idea is that a file containing n bytes uses n bytes of disk space, plus a bit for some control information: the file's metadata (permissions, timestamps, etc.), and a bit of overhead for the information that the system needs to find where the file is stored. However there are many complications.
Microscopic complications
Think of each file as a series of books in a library. Smaller files make up just one volume, but larger files consist of many volumes, like an encyclopedia. In order to be able to locate the files, there is a card catalog which references every volume. Each volume has a bit of overhead due to the covers. If a file is very small, this overhead is relatively large. Also the card catalog itself takes up some room.
Going a bit more technical, in a typical simple filesystem, the space is divided in blocks. A typical block size is 4KiB. Each file takes up an integer number of blocks. Unless the file size is a multiple of the block size, the last block is only partially used. So a 1-byte file and a 4096-byte file both take up 1 block, whereas a 4097-byte file takes up two blocks. You can observe this with ls or du: if your filesystem has a 4KiB block size, then ls -s and du will report 4KiB for a 1-byte file.
If a file is large, then additional blocks are needed just to store the list of blocks that make up the file (these are indirect blocks; more sophisticated filesystems may optimize this in the form of extents). Those don't show in the file size as reported by ls -l or GNU du --apparent-size. du and ls -s, which report disk usage as opposed to size, does account for them.
Some filesystems try to reuse the free space left in the last block to pack several file tails in the same block. Some filesystems (such as ext4 since Linux 3.8 use 0 blocks for tiny files (just a few bytes) that entirely fit in the inode.
Macroscopic complications
Generally, as seen above, the total size reported by du is the sum of the sizes of the blocks or extents used by the file.
The size reported by du may be smaller if the file is compressed. Unix systems traditionally support a crude form of compression: if a file block contains only null bytes, then instead of storing a block of zeroes, the filesystem can omit that block altogether. A file with omitted blocks like this is called a sparse file. Sparse files are not automatically created when a file contains a large series of null bytes, the application must arrange for the file to become sparse.
Some filesystems such as btrfs and zfs support general-purpose compression.
Advanced complications
Two major features of very modern filesystems such as zfs and btrfs make the relationship between file size and disk usage significantly more distant: snapshots and deduplication.
Snapshots are a frozen state of the filesystem at a certain date. Filesystems that support this feature can contain multiple snapshots taken at different dates. These snapshots take room, of course. At one extreme, if you delete all the files from the active version of the filesystem, the filesystem won't become empty if there are snapshots remaining.
Any file or block that hasn't changed since a snapshot, or between two snapshots was taken exists identically in the snapshot and in the active version or other snapshot. This is implemented via copy-on-write. In some edge cases, it's possible that deleting a file on a full filesystem will fail due to insufficient available space — because removing that file would require making a copy of a block in the directory, and there's no more room for even that one block.
Deduplication is a storage optimization technique that consists of avoiding storing identical blocks. With typical data, looking for duplicates isn't always worth the effort. Both zfs and btrfs support deduplication as an optional feature.
Why is the total from du different from the sum of the file sizes?
As we've seen above, the size reported by du for each file is normally is the sum of the sizes of the blocks or extents used by the file. Note that by default, ls -l lists sizes in bytes, but du lists sizes in KiB, or in 512-byte units (sectors) on some more traditional systems (du -k forces the use of kilobytes). Most modern unices support ls -lh and du -h to use "human-readable" numbers using K, M, G, etc. suffices (for KiB, MiB, GiB) as appropriate.
When you run du on a directory, it sums up the disk usage of all the files in the directory tree, including the directories themselves. A directory contains data (the names of the files, and a pointer to where the file's metadata is), so it needs a bit of storage space. A small directory will take up one block, a larger directory will require more blocks. The amount of storage used by a directory sometimes depends not only on the files it contains but also the order in which they were inserted and in which some files are removed (with some filesystems, this can leave holes — a compromise between disk space and performance), but the difference will be tiny (an extra block here and there). When you run ls -ld /some/directory, the directory's size is listed. (Note that the "total NNN" line at the top of the output from ls -l is an unrelated number, it's the sum of the sizes in blocks of the listed items, expressed in KiB or sectors.)
Keep in mind that du includes dot files which ls doesn't show unless you use the -A or -a option.
Sometimes du reports less than the expected sum. This happens if there are hard links inside the directory tree: du counts each file only once. Use du -l switch to count files N times if they have N hard links.
On some file systems like ZFS on Linux, du does not report the full disk space occupied by extended attributes of a file.
Beware that if there are mount points under a directory, du will count all the files on these mount points as well, unless given the -x option. So if for instance you want the total size of the files in your root filesystem, run du -x /, not du /.
If a filesystem is mounted to a non-empty directory, the files in that directory are hidden by the mounted filesystem. They still occupy their space, but du won't find them.
Deleted files
When a file is deleted, this only removes the directory entry, not necessarily the file itself. Two conditions are necessary in order to actually delete a file and thus reclaim its disk space:

The file's link count must drop to 0: if a file has multiple hard links, removing one doesn't affect the others.
As long as the file is open by some process, the data remains. Only when all processes have closed the file is the file deleted. The output fuser -m or lsof on a mount point includes the processes that have a file open on that filesystem, even if the file is deleted.
even if no process has the deleted file open, the file's space may not be reclaimed if that file is the backend of a loop device. losetup -a (as root) can tell you which loop devices are currently set up and on what file. The loop device must be destroyed (with losetup -d) before the disk space can be reclaimed.

If you delete a file in some file managers or GUI environments, it may be put into a trash area where it can be undeleted. As long as the file can be undeleted, its space is still consumed.
What are these numbers from df exactly?
A typical filesystem contains:

Blocks containing file (including directories) data and some metadata (including indirect blocks, and extended attributes on some filesystems).
Free blocks.
Blocks that are reserved to the root user.
superblocks and other control information.
Inodes
A journal

Only the first kind is reported by du. When it comes to df, what goes into the "used", "available" and total columns depends on the filesystem (of course used blocks (including indirect ones) are always in the "used" column, and unused blocks are always in the "available" column).
Filesystems in the ext2/ext3/ext4 reserve 5% of the space to the root user. This is useful on the root filesystem, to keep the system going if it fills up (in particular for logging, and to let the system administrator store a bit of data while fixing the problem). Even for data partitions such as /home, keeping that reserved space is useful because an almost-full filesystem is prone to fragmentation. Linux tries to avoid fragmentation (which slows down file access, especially on rotating mechanical devices such as hard disks) by pre-allocating many consecutive blocks when a file is being written, but if there are not many consecutive blocks, that can't work.
Traditional filesystems, up to and including ext4 but not btrfs, reserve a fixed number of inodes when the filesystem is created. This significantly simplifies the design of the filesystem, but has the downside that the number of inodes needs to be sized properly: with too many inodes, space is wasted; with too few inodes, the filesystem may run out of inodes before running out of space. The command df -i reports how many inodes are in use and how many are available (filesystems where the concept is not applicable may report 0).
Running tune2fs -l on the volume containing an ext2/ext3/ext4 filesystem reports some statistics including the total number and number of free inodes and blocks.
Another feature that can confuse matter is subvolumes (supported in btrfs, and in zfs under the name datasets). Multiple subvolumes share the same space, but have separate directory tree roots.
If a filesystem is mounted over the network (NFS, Samba, etc.) and the server exports a portion of that filesystem (e.g. the server has a /home filesystem, and exports /home/bob), then df on a client reflects the data for the whole filesystem, not just for the part that is exported and mounted on the client.
What's using the space on my disk?
As we've seen above, the total size reported by df does not always take all the control data of the filesystem into account. Use filesystem-specific tools to get the exact size of the filesystem if needed. For example, with ext2/ext3/ext4, run tune2fs -l and multiply the block size by the block count.
When you create a filesystem, it normally fills up the available space on the enclosing partition or volume. Sometimes you might end up with a smaller filesystem when you've been moving filesystems around or resizing volumes.
On Linux, lsblk presents a nice overview of the available storage volumes. For additional information or if you don't have lsblk, use specialized volume management or partitioning tools to check what partitions you have. On Linux, there's lvs, vgs, pvs for LVM, fdisk for traditional PC-style ("MBR") partitions (as well as GPT on recent systems), gdisk for GPT partitions, disklabel for BSD disklabels, Parted, etc. Under Linux, cat /proc/partitions gives a quick summary. Typical installations have at least two partitions or volumes used by the operating system: a filesystem (sometimes more), and a swap volume.
Some computers have a partition containing the BIOS or other diagnostic software. Computers with UEFI have a dedicated bootloader partition.
Finally, note that most computer programs use units based on powers of 1024 = 210 (because programmers love binary and powers of 2). So 1 kB = 1024 B, 1 MB = 1048576 B, 1 GB = 1073741824, 1 TB = 1099511627776 B, … Officially, these units are known as kibibyte KiB, mebibyte MiB, etc., but most software just reports k or kB, M or MB, etc. On the other hand, hard disk manufacturers systematically use metric (1000-based units). So that 1 TB drive is only 931 GiB or 0.904 TiB.
Comment: I know that 'thank you' is discouraged in SE, but Gilles you deserve a huge 'Thank you' for this terrific post.
Comment: `du` **does** account for indirect blocks. That's the main difference from the file size as reported by `ls -l`.
Comment: @Kiwy `tune2fs` requires having read access to the block device that contains the filesystem, which in general requires being root since that lets you read the content of any file.
Comment: I remember seeing a card catalog when I was like 6.  I wonder how many won't know what they are?
Comment: @illuminÉ That's too advanced Solaris for me, I don't know at what level it fits.
Comment: And the output from ls includes un-allocated (sparce file) blocks, but excludes allocated space at the end of the last block.  du counts the allocated space in the final block twice when that block is shared by two files.  Disk space is also reserved for bad-block management and SMART data, as well as for the partition table itself.  File systems often doesn't start at the start of the partition because it can sometimes overlap boot loader code.
Comment: @comethapaxd'ajax Solaris Zones do not affect the way space is measured. However, datasets can be delegated to non global zones. In such case, they won't be able to see other datasets sharing the same pool and then won't have all the information needed to understand the underlying disk usage. Zones also often use lofs. This file system, not mentioned in Gilles's answer, is similar to Linux bind mounts. The issues with lofs is similar to the ones that can occur with network mounted file systems, and be even more complex when combined with ZFS, which is mandatory with modern Solaris releases.
Comment: This article from RedHat gives good options for RHEL/CentOS systems https://access.redhat.com/solutions/2316
Comment: does the use of `tune2fs` implies to be root ? I tried on a system on which I'm not root and no luck :-(
Comment: You discussed snapshots. I was wondering if something like a Solaris container/zone affects the analysis of the space?
Comment: This answer should go to Wikipedia :)
Answer: A short summary of complications to calculating file sizes and disk spaces:

The space the file takes on disk is a multiplier of the number of blocks it takes against the size of each block + the number of inodes it takes. A 1 byte long file will take at least 1 block, 1 inode and one directory entry.
But it could take only 1 additional directory entry if the file is a hard link to another file. It would be just another reference to the same set of blocks.
The size of the contents of the file. This is what ls displays.
Free disk space is not the size of the largest file you can fit in or the sum of all file content sizes that will fit on the disk. It's somewhere in between. It depends on the number of files (taking up inodes) the block size and how closely each file's contents fill blocks completely.

This is just scratching the surface of file systems and it is overly simplified. Also remember that different file systems operate differently.
stat is very helpful at spotting some of this information. Here's some examples of how to use stat and what it is good for: http://landoflinux.com/linux_stat_command_examples.html
Comment: That's because 1 ext2 block = 8 stat blocks, if the ext2 filesystem uses 4kB blocks: stat counts in 512-byte blocks for historical reasons. See https://unix.stackexchange.com/questions/14409/difference-between-block-size-and-cluster-size/14411#14411
Comment: A 1-byte file would typically take one block, not 8. Creating a hard link doesn't create an inode at all: one file is one inode no matter how many links there are to the file. Creating a hard link only requires space for the directory entry.
Comment: Thanks for the corrections, admittedly my memory re: studying ext2 in depth is now a little fuzzy. I was following the output of stat re: the block count - it did feel excessive but that's what's there. I'll correct the answer.
Answer: df is generally used to see what the file systems are, how full each is and where they're mounted. Very useful when you're running out of space in a file system, and maybe want to shift things around among the file systems, or buy a bigger disk, etc.
du shows details of how much cumulative storage each of one's directories is consuming (sort of like windirstat in Windows). Great for finding where you're hogging up space when trying to do file cleanup.
Aside from small numerical differences explained by others, I think the du and df utilities serve very different purposes.
Answer: I will illustrate here different cases that causes du being different from df.
df counts the file system allocated blocks, du use the size information of each file.
A difference can have many causes:

Unlinked (deleted) files that are still open by application. The file information are missing, the block are still allocated.  lsof +aL1 <filesystem> will helps you to identify the processes. Most of the time you have to kill the processes to free the space (it depends on the process, sometimes a configuration reload is sufficient).

Files beneath mount points hidden to du but not to df. debugfs can help you to read the file system.
$ sudo debugfs
debugfs 1.42.12 (29-Aug-2014)
debugfs:  open /dev/xxx    (the desired file system  device)
debugfs:  cd /boot
debugfs:  ls -l
 1966081   40755 (2)      0      0    4096 26-May-2016 16:28 .
       2   40555 (2)      0      0    4096 11-May-2016 10:43 ..
 1974291  100644 (1)      0      0       0 26-May-2016 16:28 bob   <---<<< /boot/bob is hidden by /boot fs

Sparse files that looks bigger than the reality. Non allocated blocks are not counted by df but the apparent file size is counted by du.

Note that Hard links do not fool du.


Getting error : Error Code: 0x80070643 (1603)

Question: While am installing SQL server development version am getting an error as follows:

There was an unexpected failure during the setup wizard. You may review the setup logs and/or click the help button for more information.

I checked in the log file and get the error code as

0x80070643 (1603)

I checked in MSDN site and get it is because of invalid folder arrangment. So i created Servers and Tools folder and copy the files to both folders. and try to install it again.
THen also am getting the same error.
Please help someone.
thanks in advance
Comment: http://support.microsoft.com/kb/916760
Comment: Check this out http://support.microsoft.com/kb/916760
Comment: i do the same what explained there. Not working.
Answer: First please understand that this is an microsoft error, it has nothing to do with your internal software problems.
This problem will not go away in 1 day. You just have to update the sytem as per the lastest update, go to settings >update > run the update and install all the updates related to windows.
Keep your system open whole day and keep it connected to internet and all the updates will be installed after you  start installing updates.
Then run the troubleshooter or donwload from below link :-
https://support.microsoft.com/en-us/help/4027322/windows-update-troubleshooter
and run it until the problem go away. It will take 2-3 days at most, or it could go away the same day if you have a good internet connection and better system.


What are the equivalent focal lengths for iPhone digital zoom?

Question: I would like to know what the equivalent focal lengths are when in digital zoom on an iPhone 13 Max Pro – greater than 3X to 15X.
Comment: I can't answer specifically, but an idea: take some photos and examine the meta data, with most cameras the focal length is listed.
Answer: The equivalent focal lengths of the three cameras in the iPhone 13 Pro Max are:

[ultrawide] 13mm [1/3.4" sensor, 8.18x crop, so really a 1.5mm lens]
[primary] 26mm [1/1.65" sensor, 4.46x crop, so really a 5.8mm lens]
[tele] 77mm [1/3.4" sensor, 8.18x crop, so really a 9.4mm lens]

I referred to this dpreview article for the sensor sizes and equivalent focal lengths; and this chart to help calculate the crop factors.
The optical zoom factors are all calculated relative to the primary camera:

13mm/26 = 0.5x
26mm/26 = 1x
77m/26 ≅ 3x

so just take the zoom factor, multiply it by 26mm and you'll get the equivalent FoV focal length. E.g., 15x26mm = 390mm.
But, of course, digital zooming is really just cropping and upscaling, so it's not really equivalent to using a different focal length. See also: What is crop factor and how does it relate to focal length?


How do iOS Jailbreaks work?

Question: I know that iOS Jailbreaks are just simply exploits for iOS to get root on the device, but what files do they modify/what techniques are used in order to gain root on the device? Can't you just log in to the root account in iOS? The password for root is well known (alpine). Why is a special method needed in order to jailbreak an iOS device, and what is that method?
Comment: You do not have anything even remotely like a remote shell or ssh server runing on an iOS device when its still not jail-broken. So how does the password of the root eve help you?
Comment: iOS specific answer is given. Also, for generic answer operating systems can be exploited mostly with subsystem interfaces, exploiting privileged applications, vulnerabilities which leads to hijack kernel program flow, unsecured device drivers, or reading and writing system files.
Answer: The password is known, yes, but you can't run binaries from sideloaded apps. You need to modify the root filesystem to put an app into /Applications and make it tun root code.

How do iOS Jailbreaks work?


does a wireless adapter work in my tv android box to boost wifi signal

Question: I would like to boost the wifi signal coming into my tv android with a Tp-Link 600 does this work.
Answer: Probably not. I'd expect the Wi-Fi transceiver and antenna in your TV to be higher-gain than that in a USB Wi-Fi adapter, simply because the TV has more room for a large antenna and more stable power. Using an external Wi-Fi adapter would only improve things if

the TV is in a fully enclosed case, and you can mount the adapter outside the case; or
the TV was very cheap and badly designed.


How to use encryption on a site that only uses an IP address, no domain name?

Question: You can use SSL/TLS certificates and etc. on sites with domain names, but I don't know if it's possible to use them for IP addresses. If this is the case, would I have to use a self-signed cert and install it in the browser? This only needs to work for specific client browsers, so it is feasible to install self-signed certificates if necessary.
Comment: Why the requirement not to assign a name to the IP address? Its not particularly expensive - certainly cheaper than an SSL certificate in most cases.
Comment: @symcbean It's a private site, and will only be used by a small number of people with preconfigured browsers. No need for a domain name.
Answer: The only obligation is that the content of the certificate's Common Name (CN) field must be equal to the host name part of your URL.
So, if you want to protect a URL such as https://192.0.2.123/path/to/resource, then your browser will expect a certificate with a Common Name set to 192.0.2.123. No problem if it is a an IP address instead of a Fully Qualified Domain Name (FQDN).
Regarding the Certification Authorities, they may add supplementary requirements for such a request (for instance you will most probably need to own the IP address, ie. it must be a public IP address assigned to you on the RIPE registry or the local equivalent and not a local or a loaned one). So if you don't really need this you may prefer to go with a self-signed one.
As a side note, while using CN fields is the traditional and most widely compatible way to do this, it is now deprecating in favor of using Subject Alternate Names (SAN).


python 3.5 visual c++ redistributable detecting vcvarsall.bat -license of visual studio

Question: I have visual c++ redistributable 2015 installed for python 3.5 but python can not detect vcvarsall.bat should I install visual studio for it?
Can you use visual studio Community to just compile I mean for example if your team is more then 5 people and you create a program with python but you compile it with nuitka that uses visual studio compiler to compile is that legit?
Comment: What are you trying to compile? Python itself, or an extension? But in general yes, you can use the free version of Visual Studio 2015 to compile Python.
Comment: I am just asking about that.did you read my example?(license:In non-enterprise organizations, up to five users can use Visual Studio Community.)
Answer: As per the documentation, you need Visual Studio 2015 to build Python 3.5:

The source tree contains a build solution and project files for Microsoft Visual Studio 2015, which is the compiler used to build the official Python releases. These files are in the PCbuild directory.
Check PCbuild/readme.txt for general information on the build process.

The readme tells you this:

Quick Start Guide

Install Microsoft Visual Studio 2015, any edition.
Install Subversion, and make sure 'svn.exe' is on your PATH.
Run "build.bat -e" to build Python in 32-bit Release configuration.
(Optional, but recommended) Run the test suite with "rt.bat -q".

So yes, you can use any version of Visual Studio 2015, including the free version.
This is also further confirmed by the developer guide:

Python 3.5 and later use Microsoft Visual Studio 2015. You can download and use any of the free or paid versions of Visual Studio 2015.

When trying to build, note that you need to run the scripts from within the Visual Studio developer command prompt in order to have the proper environment variables set so that all the required files can be found (e.g. the vcvarsall.bat).
Comment: So can what my example can you use visual studio community edition to do that because in the license: in non-enterprise organizations, up to five users can use Visual Studio Community? Thank you answering.
Comment: Well, if you just use it to build Python which is then used by other people in your company then I wouldn't say that the usages of the compiled product count toward the license limitations of VS. So if it's just you who builds Python, you should still be able to distribute Python in your company (assuming the Python license allows that of course).
Comment: Thank you. Not building python I mean building a software that is created with python with it(for example using nuitka that compiles python to c++) or using it compile some modules of python like for example cx_freeze?
Comment: I'm not a lawyer, but as long as only up to 5 persons do that in your company, you should be fine I guess.
Comment: Thank you anyway for answering.