What is the difference between Ubuntu and Debian server?

Question: I know Ubuntu is basically Debian, and I know Ubuntu releases every 6 months, Debian every 2 years. However, I want to know more the advanced differences between Ubuntu server and Debian. If they have the same base, what is the difference between them?
Comment: see http://superuser.com/questions/154333/what-is-the-difference-between-debian-and-ubuntu
Answer: Some of the differences:

Debian uses SystemV style init, and inittab;
Ubuntu uses Upstart
Debian has root account enabled by default, but can be configured to use sudo;
Ubuntu uses sudo and has no root account enabled
Debian has a release cycle not predefined;
Ubuntu has a release cycle of six months (two years for LTS)
Debian has a rolling unstable release, called sid;
Ubuntu has nothing similar
Debian has a testing release that is destined to become the next stable;
Ubuntu has a development release, initially based on sid that becomes the stable
Debian uses gnome2/metacity by default;
Ubuntu uses gnome2/compiz+unity by default;
Debian is released for several architectures (more than every other distro);
Ubuntu essentially only for x86, ARM and amd64

this is what comes to my mind, something might be inexact or wrong, and I might have missed something big. I wait to see other answers.
Edit
missed the word "server" in the title:
Debian has not a server version, you get a so called server not installing a desktop environment.
Comment: +1 Debian has also removed nonfree firmware from its kernel starting from squeeze, so it's harder to install on some machines.
Answer: Like Enzotib mentioned in his answer, Debian uses a SystemV style init, while Ubuntu uses upstart. Since servers aren't restarted very often (or at least they shouldn't be :P), the init system doesn't really matter. That's about where the differences end.
Most of Ubuntu's packages are just recompiled from Debian, so the software defaults (like the Apache web server configuration) are identical. I have two servers, one running Ubuntu Server 11.04 and one running Debian 6.0 and there hasn't been a single instance where I couldn't just copy a configuration file between them and have it work correctly.
Answer: The difference is that there's an ubuntu server but not a debian server.
Ubuntu server comes with a variety of packages predefined by the maintainers, debian let these choices to its administrator.
As far as I Know there's no special patches to the kernel made by canonical to the default kernel.


Will there be current induced in a coil placed in a time varying Magnetic Field?

Question: If a circular coil is placed in a time varying Magnetic field ,emf is induced but will there be induced current?
Answer: Of course yes. Since you know about the Faraday's law, then you may know about the Lenz's law. It says that the polarity of the induced emf is such that the current produced by it, gives rise to magnetic field which opposes the external time varying magnetic field. The emf is the one that is "induced" and it drives the current and not the other way around.
Answer: Yes, a changing magnetic flux will induce a current in a complete conducting loop.  If there is a gap in the loop, then current cannot flow and the emf will appear as a voltage difference across the gap.  Without a gap, the emf is dissipated by the current in the resistance of the loop and there will be no voltage difference between any two points in a circular loop in a symmetrical magnetic field.


Let $s_{n} := 1 + 1/2 + \cdots + 1/n - \ln(n+1)$ and show that $s_{n} \leq 1 - 1/(n+1)$.

Question: This is in a Riemann integration section of a practice sheet from real analysis. I know that if $f(x) := \frac{1}{[x]} - \frac{1}{x+1}$, where $[*]$ is the floor function, then $\int_{1}^{n} f = s_{n}$. But I'm not sure where to go to get the quantity on the right-hand side of the inequality. I feel that I should compare $f \leq g$ for some $g$ where $\int_{1}^{n} g = 1- \frac{1}{n+1}$, but I am having trouble doing that!
Answer: We have
$$s_n=\sum_{k=1}^{n}\frac1k-\ln(n+1)=\sum_{k=1}^{n}\left(\frac1k-\int_k^{k+1}\frac{dt}{t}\right)\le \sum_{k=1}^n\left(\frac1k-\frac1{k+1}\right)=1-\frac1{1+n}$$
where the last equality is obtained by telescoping.
Answer: Induction does the trick
Assume it true for $n-1$, i.e.
$$1 + \ldots + \frac{1}{n-1} - \ln n < 1 - \frac{1}{n}$$
Then
$$1 + \ldots + \frac{1}{n-1} + \frac{1}{n} - \ln (n+1) < \ln n + 1 - \frac{1}{n} + \frac{1}{n} - \ln (n+1) = 1 + \ln (\frac{n}{n+1}) = 1 + \ln(1 - \frac{1}{n+1})$$
Note that $$\ln (1-x) < -x$$ for $0 < x < 1$, hence
$$ 1 + \ln(1 - \frac{1}{n+1}) < 1 - \frac{1}{n+1}$$
We conclude
$$1 + \ldots + \frac{1}{n-1} + \frac{1}{n} - \ln (n+1) < 1 - \frac{1}{n+1}$$
Answer: If you want to use Riemann integration, then I suggest you integrate the funcion $1/x$ on the interval $[1, n+1]$. On the one hand, it is $\ln(n+1)$, on the other hand, $1+\cdots +1/n$ is clearly an upper estimation for it. In fact, if you partition the interval into $n$ subintervals of length 1, produce the rectangles for the upper Riemann sum, and cancel the area from those that are below the graph of $1/x$, then you can shift all these irregular areas into a unit square, but all those little parts are above the horizontal line that intersects the $y$ axis at $1/(n+1)$. So the "surplus" is at most the area of the rectangle with sides $1$ and $1-1/(n+1)$.


Can I use two conjunction 'but' in a sentence?

Question: There are instances when I want to use a "but" in a sentence that starts with "but". Is that grammatically correct?
Comment: Would you care to give us an example? And could you perhaps explain why you think it might or might not be correct?
Answer: There is nothing wrong with a sentence like that.
But if you were concerned you could break the sentence into constituent parts, and you would see that it was correct,  but might still want to consider splitting the sentence in two to make it more readable.
Comment: Now I like it more. +1.
Answer: English writers have been doing it for centuries. For example from Edmund Burke, A Philosophical Inquiry into the Origin of Our Ideas of the Sublime and Beautiful (1757):

The swan, confessedly a beautiful bird, has a neck longer than the rest of his body, and but a very short tail : is this a beautiful proportion? we must allow that it is. But then what shall we say to the peacock, who has comparatively but a short neck, with a tail longer than the neck and the rest of the body taken together.

And from M. F. Sadler, The First and Second Epistle to the Corinthians, with Notes Critical and Practical (1889), quoting (I believe) the King James edition of the Bible at First Corinthians, chapter VI, verse 11:

And such were some of you: but ye are washed, but ye are sanctified, but ye are justified in the name of the Lord Jesus, and by the Spirit of our God.

And from John Fox, Of Free Justification by Christ (1583):

If you would have this common to you with Christ, that you can be without sin, what do you leave him, that is peculiar to himself? But if not, what remains then, but that those high mountains of righteousness with which you are so puffed up, should not only fall, but also vanish.


How to "resync" commits in GitLab after fetching from remote repository?

Question: I've created GitLab project by cloning remote repository. During a few days my colleagues pushed their commits to the original repository (not GitLab). Now I did 'git fetch --all' from GitLab repository but commits do not show in GitLab web UI. What should I do to resync GitLab project with its repository? Is there rake task for that? I can't simply recreate the project as we already imported issues from an external source, created labels, milestones, etc.
Answer: There is no GitLab feature to fetch the upstream updates. What you did was import an already existing repository, and that is a one time feature.
But you can fetch the upstream updates into your local repository, then push them to GitLab. You'll need to add the orginial/upstream repo as a remote to your local repository by running git remote add upstream {path to original repo}, then fetch the upstream repos by running git fetch upstream, then merge git merge upstream/master, then git push master origin.
GitHub has a decent help section on adding the upstream remote, and doing the merge.
Comment: Thanks. I already solved my problem by manual execution of update hook (commit by commit)
Answer: Only the EE version of GitLab has the repository mirroring feature which supports automatically pulling down updates from the import source repository.
If you are using the free CE version, you'll have to manually update or create a custom process.


how custom list inherits the permissions?

Question: I created a custom list. Then I created a page (wiki) when I used this list as a web part.
I'd like to limit the edit permissions for the list (it should be read-only for most users) - so, should I broke the inheriting of permissions on page level and the list will inherit the rights from the page? Or should I manage the rights on the list level?
What would you suggest? what would be the best solution?
thx.
Comment: No, the page inherits from the page library and the list inherits from it's subsite. Break the permission on the list.
Answer: Do it on the list level.
As limiting the access to your list seems to be the primary goal, you will want to prevent users from editing the list from elsewhere as well. This means, that if an end-user figures out the list's original source (the .aspx to the list itself), the user would have the non-restricted permission-level still applicable there as permissions wouldn't inherit from a page to a list.
Additionally if you one day want to have some content on the page which the users should be able to interact with (e.g. contribute), the page-level actions for restricting interacting with its elements would cause a headache.
Comment: Thanks! This sounds reasonable. Would it be a good approach as a first setting?: 1. to broke the inheriting for the list 2. add the users groups used on page level to the list level as read-only rights (so at least for now I manage the rights on page level as this will change more often) 3. add additional users to the list that needs more rights (this will change very rarely) ?
Comment: Sorry @Elliss, missed your comment. That seems like an OK approach. Just note that if your user needs to see the list on your page, the user needs to have an access to that page despite already having a read-only (or such) permission to the list.


If a sequence of bounded operator converges pointwise, then it is bounded in norm

Question: $\newcommand{\vertiii}[1]{{\left\vert\kern-0.25ex\left\vert\kern-0.25ex\left\vert #1
    \right\vert\kern-0.25ex\right\vert\kern-0.25ex\right\vert}}$
Let $\left(V, \|\cdot\|_V \right)$ be a Banach space and $\left(W, \|\cdot\|_W \right)$ a normed vector space. Show that if a sequence $(T_n)_n\subset \mathcal{B}(V,W)$ converges pointwise then $\sup \vertiii{T_n}<\infty$.
So we know that $\sup\limits_{x\in V} \frac{\|T_n x\|}{\|x\|}=\vertiii{T_n}$, thus
$$\lim_{n\to\infty}\sup\limits_{x\in V} \frac{\|T_n x\|}{\|x\|}=\sup\limits_{x\in V} \frac{\|T x\|}{\|x\|}=\vertiii{T}<\infty$$
I'm wondering if I didn't miss something, since this seems a bit too simple. Please let me know.

Update (version 3):

Since $V$ is a complete metric space, it is Banach, and $T$ is defined on $V$. Since $\{(T_n(x))\}_n$ converges pointwise, it is bounded, so that there exists a function $C:V\to \mathbb{R}$ such that
$$\sup_{n\in \mathbb{N}} \|T_n(x)\|<C(x)$$
for each $x\in V$. By the Uniform Boundedness Principle, we deduce that there exists $M>0$ such that
$$\sup_{n\in\mathbb{N}} \vertiii{T_n} \le M <\infty.$$
Comment: You are missing the fact that in general pointwise convergence does not imply uniform convergence, and so you need an argument, or a theorem that already made such an argument, to justify why you can take the limit of the sup when you are only given pointwise convergence. Consult the uniform boundeness theorem.
Comment: Well, yes, you cannot interchange lim and sup like that. That's a general fact of analysis, it is not limited to linear operators. Take for example the sequence $$a_n=(\underbrace{0\ldots 0}_{n\, \text{places}}, 1, 1\ldots).$$
Then $\lim_{n\to \infty} a_n = (0,0,0\ldots)$ but $\lim_{n\to \infty} \sup a_n =\lim_{n\to \infty} 1 = 1.$
Comment: Getting closer, but you don't know if $C(x)$ is bounded. That's the whole point of the UBP. A pointwise bound $\|T_n x\|\le C(x)$, with the right hand side **depending on $x$**, suffices to give a uniform bound $\|T_n\|\le M$ for some $M>0$. That's a *miracle*.
Comment: @GiuseppeNegro I don't seem to be interchanging lim and sup. Can you please clarify?
Comment: How can you say that $\lim( \sup \|T_n x\|)=\sup \|Tx\|$? (forgive my sloppiness, please). Since $\|Tx\|=\lim \|T_n x\|$, you are interchanging lim and sup.
Comment: @GiuseppeNegro I see it now, thanks.
Comment: @GiuseppeNegro I've updated my post. Can you please check if it's okay now?
Comment: It is not ok. The uniform boundedness principle tells you that if you can bound T_n pointwise then you have a uniform bound on $\|T_n\|$.
Comment: @GiuseppeNegro Can you please clarify which part of my proof is invalid?
Comment: All of the Update is nonsense. What is $B$? How do you know that $T$ is a bounded operator? Actually, you did not even explicitly define $T$. I *guessed* that $Tx:=\lim_{n\to \infty} T_n x$. I would erase everything of the "Update" and start again. To apply the UBP you need to show that $\| T_n x\|\le C(x)<\infty$ for all $x\in V$, where $C(x)$ is a number that is independent of $n$ (but may be dependent on $x$).
Comment: @GiuseppeNegro I have redone the proof. Can you please take a look?
Comment: @GiuseppeNegro Fixed again.
Comment: But if $T_n(x)$ is pointwise convergent then it is boudned, so for every $x\in V$, shouldn't it be true that $C(x)<\infty$? I'm realizing that the supremum of $C(x)$ does not necessarily exist, like for $x^2$ on all of $\mathbb{R}$.
Answer: The last update contains a correct solution to the exercise.


How to name planets in a sci-fi setting?

Question: So, I'm working on a Sci-Fi story called The Dark Edge. It focuses on two unlikely friends from different species, the Qualians and the Humans. They discover a Von Nuemann probe from outside the galaxy is planning on destroying all life in the Milky Way. They have to convince both of their specifies respectively that they must join together to fight the alien threat. After 167 billion sentients are killed, they finally win. I plan on including many different human and Qualian owned planets existing, but I don't really know how to name them. I have names like Kelstar, Amon and Tengelle already names, but I need more. Do any of you guy methods I could try to use in order to name my planets?
Comment: Let me put that another way... all the methods humans use are open to your Qualians, but without knowing everything about Qualian language, culture, religion, and history (especially language), there's no way to answer this question.
Comment: @JBH: I'll deal with the Qualian planets myself. I need names for human controlled planets
Comment: [Start here](https://worldbuilding.stackexchange.com/questions/113675/naming-fictional-places-cities-towns-etc) and follow the duplicate links.  Planets (and places, any place really) are named to honor people, places, diety, mythos, to reflect its locale or the hopes/dreams of the settlers, etc.  Almost any proper noun in any language could be used and, in tandem, any adjective (you can see why these questions get closed, there's no "best way" to do this).
Answer: I'm typing on my phone right now, so I can't make this a long answer and I can't access some of the formatting features to make it look pretty.

Planets can be named for a variety of reasons, like:
Religion - the ancient Romans named the planets after their gods, because that is what they thought the planets were. Later, when we knew planets were planets, we kept naming celestial bodies in that way, e.g. Pluto.
Discovery - nowadays, humans are boring and we just name planets with the telescope that found them and a series of letters and numbers, e.g. Gliese 124B.
People - this hasn't been used on planets before, but places are often named after the person who discovered them, e.g. America.
Nationality - if the people who discovered a planet hailed from a certain area, they could name the planet after their former home, e.g. New Zealand
Features - the Arctic was so named because it is under the constellation of the bear (Arctos is Latin for bear). When the great southern continent was discovered, they called it Antarctica because it was at the opposite end of the Earth to the Arctic.
Inhabitants - when the Amazon rainforest was first explored by Europeans, they encountered tribal warriors with long hair. These reminded them of the Ancient Greek Amazons, a fierce tribe of fighting women, so they named the jungle Amazonia.
That's all I got for now, I could've written a better answer if I had more time and my PC, though I might edit it tomorrow when I do.
Answer: Would you be interested in conlanging?
Pretty much create a language for the species and name it based on that language. It does not have to be an extensive language a simple naming language should fulfill the need.
There is a great video made by Artifexian to start you off
You may later even use it not only to name planets but other locations like cities or significant events in the history or slang that they use maybe even swear words they call each other.


Ubuntu Connect To SSTP VPN

Question: Does anyone have any experience with connecting an Ubuntu 10.10 machine to a SSTP VPN server? I haven't found anything too great of information on how to do it.
Comment: A google search suggests that maybe this project might have, or might be working on having what you want.  http://sourceforge.net/projects/sstp-client/
Answer: May be sstp-client can do it? And here is network-manager support for it.
There are now Ubuntu packages for recent distributions, so you should be able to add the PPA for eivnaes/network-manager-sstp and install the packages:
$ sudo add-apt-repository ppa:eivnaes/network-manager-sstp
...
$ sudo apt-get update
$ sudo apt-get install sstp-client
$ sudo apt-get install network-manager-sstp-gnome # NM configuration GUI

Answer: Example
Here is an example of an entry in /etc/network/interfaces:
auto work
iface work inet ppp
    provider work
    options pty "sstpc vpn.example.com --ca-cert /path/to/example.com.ca.crt --nolaunchpppd" \
            plugin sstp-pppd-plugin.so sstp-sock /var/run/sstpc/sstpc-uds-sock \
            lock nodefaultroute noipdefault noauth user myusername \
            refuse-pap refuse-chap refuse-eap nobsdcomp nodeflate novj \
            nomultilink \
            persist maxfail 0 \
            debug logfd 2
    pre-up touch /etc/ppp/peers/work

Usage
Then you just use ifup work and ifdown work to connect or disconnect.
Installation
You'll need to compile the sstp-client and install it. This can be used by following the instructions on http://sstp-client.sourceforge.net/ or building a deb package using these instructions:
apt-get install build-essential dpkg-dev debhelper ppp-dev libevent-dev libssl-dev
mkdir sstp-client.build && cd sstp-client.build
wget -o sstp-client-1.0.10.tar.gz http://sourceforge.net/projects/sstp-client/files/sstp-client/1.0.10/sstp-client-1.0.10.tar.gz/download
tar xzvf sstp-client-1.0.10
cd sstp-client-1.0.10
dpkg-buildpackage -b -us -uc
cd ..
dpkg -i sstp-client_1.0.10-0ubuntu2_amd64.deb \
        libsstp-client0_1.0.10-0ubuntu2_amd64.deb \
        libsstp-client-dev_1.0.10-0ubuntu2_amd64.deb
cd /usr/lib/pppd/2.4.5 && ln -s ../2.4.6/sstp-pppd-plugin.so .

Fix symlink
The pppd lib dir is hard-coded to use 2.4.6, and not the installed version, which is why the symlink is required. This is a bug in the debian build description for sstp-client.
Typical connection timeout issue
If you use the pppd pty option (which the example uses) it is vital that the parameters plugin sstp-pppd-plugin.so sstp-sock /var/run/sstpc/sstpc-uds-sock are specified. If you don't specify these, you'll end up getting the famous Connection aborted, reason not known error after approximately 60 seconds, and the connection will not transmit packets.
CA certificate requirement
You also must have the CA certificate for the Active Directory domain the Microsoft SSTP VPN server is part of in the local file /path/to/example.com.ca.crt. This can usually be found in the CertEnroll SMB share on one of the Domain Controllers. Export it as a Base64-encoded X509 certificate and rename as appropriate. Use certtool -i <example.com.ca.crt to verify you have the correct certificate with the correct information.

Ubuntu Connect To SSTP VPN


have ever a trial been appealed for the court system used being considered "unfair"?

Question: As far as I understand, a person has the right to a "fair trial" in most countries. This is considered a human right and a constitutional right in many countries. Now in relation to this, there are different types of trial systems. 2 of them are jury trials and bench trials. In my country is always being used a jury trial. Now in some cities/provinces, it's being optional to have a bench trial. This could become mandatory someday. In my personal opinion, this type of system which is used in countries like United States I believe, it's flawed and unfair. In my opinion, common people dont have the knowledge to make a fair judgement and most of them judge according to prejudices and beliefs. Apart of this, when you take a bunch of random people to judge, who are never going to judge again, and which they dont have judging as a source of labor income, they dont have a reason to be responsable other than their own moral which in some people is unexistent, they arent in the spot if they take a bad decisition because they are part of a group of several people and they havent been formed to judge, they dont have a job to lose, and they dont have a record of bad jugdments if they are bad at judging, so bad people judging arent removed of the system as bad jugdes in jury trials are. So my question is, have ever a trial in the world have been appealed and succesfully reverted the judicial decisition, because of the court system used being considered "unfair"?
Answer: While the answer from @K-C is correct as far as it goes, the decision regarding whether a jury trial is or is not a fair way to go about making decisions, which is the type of issue that you single out, is a political one that cannot be used be individuals to invalidate a jury's decision.
Ultimately, the large scale pros and cons analysis that you conduct in your post is a policy decision that courts are not free to hold is invalid.
While you are of the personal opinion that a jury trial is unfair, your view is not widely shared in places where jury trials are used as an important part of decision making.
If you don't like jury trials, the only way to change that is to change the law and possibly the constitution, before you are involved in one.
Answer: Yes, an unfair trial is at the root of a lot of appeals: ineffective assistance of council, closed court during voir dire, Batson challenges (relating to racially motivated veto of a jury member), long delays before trial, being denied counsel of choice, etc.
Except for structural errors, the defendant must show that the error caused them prejudice. For structural errors, prejudice is deemed to have occurred. Especially for structural errors, the question is whether the error has rendered a trial "fundamentally unfair".


The more common pronunciation of "buoyancy"

Question: Which is more common pronunciation of "buoyancy" in AmE?http://www.oxfordlearnersdictionaries.com/definition/english/buoyancy?q=buoyancy
In the dictionary above, there are two pronunciations. One  is /ˈbɔɪənsi/ and the other is /ˈbuːjənsi/. Which one is more common in AmE?
Comment: Bare *buoy* exhibits the same variation in pronunciation, /bɔɪ/ vs /ˈbuːi/.
Comment: (AmE) To be honest, I can hardly tell the difference between the two. Although the first one does sound more natural to me.
Comment: Yes, that is correct.
Comment: In this case, "buoy" should be pronounced same as "boy". Is it correct?
Comment: Related at EL&U: *[The pronunciation of buoy](http://english.stackexchange.com/questions/24318)*
Answer: To me, I had to listen to them several times before I could tell the difference. It sounds more natural to say "BOY-in-cee", like the first recording. In the second recording, it sounds like she says "BO-yin-cee". However, since the "y" comes right after the "o", it's a very subtle difference. I bet most people would hardly notice a difference unless you put an exaggerated pause between the first two syllables, or if they were listening very closely.
Answer: You'll hear both, and I don't think either would be perceived as erroneous by any hearer, regardless of her own pronunciation. I suspect that in most cases the difference wouldn't be perceived at all, as DJ McMayhem's answer suggests.
I suppose if you had a very large corpus of recordings, or had the funds to design and carry out a focused research program, you could determine which pronunciation is more common. But I cannot imagine that it would be worth the effort.


Export all subsites

Question: I am looking for a quick way to export all sub-sites from a web application and exclude the root url, is there a quick way to accomplish this?
Answer: maybe this can help :
<code>Get-SPSite http://yourwabapp/sites/sitecol | Get-SPWeb | Where-Object  { $_.ParentWeb -Ne $null } | ForEach-Object { Export-SPWeb -Identity $_ -Path $_.ID }
</code>
you will need to adjust the export params according your needs
Comment: great thanks this works, is there a way to make it a single export or does it need to export each subsite individually?
Comment: I would need to import the sites as well as there are a lot, i would like to do it with a single import command
Comment: Just loop through the exported sites using PowerShell, and import each one. Something like dir $folderpath | For-Each {Import-SPWeb -Path $_.FullName -(Additional import parameters...)

Export all subsites


Deleted System Dialer app

Question: I have a CUSTOM rom. I deleted system Dialer app. Is it possible to recover it, or fix it? I can't get calls, can't make calls, but I can write & receive messages. Other dialers don't work and it says "this device does not support this function"
Comment: Reinstall the ROM. You probably still have the ZIP file on your device.
Comment: You can probably just copy the required files and folders from the ZIP and fix their permissions, but reflashing is still the easiest solution (you don't lose your data, by the way, only if you choose to wipe `/data/`).
Comment: Is it possible to fix it without reinstalling?
Comment: You should be able to just dirty flash the ROM... Meaning flash it and do not wipe anything. May have to reflash Gapps as well.
Answer: https://play.google.com/store/apps/details?id=com.google.android.dialer&hl=en
Does this kind of dialer also dowsn't work??
If it doesn't, the your only choice is to dirty flash your current rom from rcovery

Deleted System Dialer app


reference to view property is retaining the view controller

Question: I am having memory leaks when I m using a view controller's view
My code sequence is like this
<code> viewController1 = [[ViewController alloc] init];
   destinationViewController = [[DestinationViewController alloc] init];
   [destinationViewCOntroller useView:viewController1.view];
   [viewController1 release];
   [destinationViewController release];
</code>
And for testing purpose I have empty implementation in useView method. So my problem is viewController1 is never getting deallocated. I have made sure that no other place has any reference to viewController1.
When I remove the method call(useView) where I pass viewcontroller1.view then viewcontroller1 is deallocating properly.
Any ideas why the behaviour is like this?
Comment: How did you check that vc1 does not get deallocated?
Answer: This seems to be a rather academic problem. Just enable ARC and forget about it.


Maintaining chatter history

Question: How do I maintain users chatter history(posts, followers, feeds,etc) when the user is given is downgraded from salesforce to a chatter license? Normally a new user has to be created when license has to be downgraded and hence all his chatter history gets lost. Any workaround for this?
Answer: You'd need to export all of the data and then import it using the id of the new user.  There is a Salesforce feature activation that will let you set the createddate of the imported records so that things appear in the timeline in the correct order.  I've done this with followers, group membership etc but not for posts/comments, so I can't say for sure that aspect of things will work.
I've never known Salesforce to agree to downgrading a user license - its always required a new user and data fixes.  I suspect they don't want to make it an easy option as more people would do it, affecting their license revenues.

Maintaining chatter history


Router logs showing something strange

Question: I had been playing a game earlier when I started lagging, not abnormal though it was happening sporadically over the period of about an hour, which is pretty weird for me. I went to check my router to see if someone was pinging me, and I saw a ton of requests blocked from my own IP, all coming from the 50-55k port range. Does anyone have an idea what might have caused this?
Comment: do you have public IP address on your own?
Answer: This sounds like someone may have been spoofing your IP address to obscure their actual source address, and sending extraneous data your way to saturate your connection.
This is just speculation, as without knowledge of your network, or even what you consider 'your IP' (the local IP address on your system, the public IP of your broadband connection, the IP of your router's WAN interface), I can't say for sure if the dropped traffic was sourced by your devices, or came from the Internet.

Router logs showing something strange


Small sample in categorical explanatory variable vs overall sample size

Question: In a statistical model e.g. regression, we have to ensure the sample size is sufficient to estimate  a given number of parameters. Rules of thumb e.g. n=10 per parameter, or a power analysis, will give us the total sample size needed to fit the model. However, I was wondering how these sample size estimates apply to categorical variables which are usually coded as dummy variables, with a parameter estimated for 1 less than the number of groups (factor levels). Supposing we have a sample size which, on the average, has 30 data points for each parameter to be estimated (overall ratio = 30:1). However a categorical variable has one factor level with a very "small" number of occurances e.g. 4, giving a ratio = 4:1. This is much less than the overall ratio and even less than the rule of thumb of 10:1. I was wondering how to best proceed in such circumstances? Would it matter so much that the sample size / number parameters ratio is very small in one factor level if overall the ratio is sufficient?
Answer: The 10:1 rule of thumb is highly approximate and doesn't include the sample size needed to just estimate the intercept.  For example in binary logistic  regression you need n=96 just to estimate th e intercept (i.e., when there are no predictors needing to be modeled).  If you have a single categorical predictor with 3 levels you'd need at least n=96 in each of the levels.
Comment: That's roughly correct but a much better approach is by Richard Riley et al.  Here's the paper for continuous Y: https://onlinelibrary.wiley.com/doi/abs/10.1002/sim.7993 for which there is an R app to help.
Comment: You can use confidence intervals even without shrinkage.  I would suppress p-values.
Comment: To clarify, are you saying that the minimum sample size per parameter (assuming we have calculated this correctly) should be applied to EACH parameter (including all dummy variables) to be estimated rather than as an average ratio across the entire data set to be modelled?
Comment: Your example sounds a bit extreme. Would it not be a baseline minimum of n = 96 to estimate intercept with 10% MOE, and then plus x for each additional parameter estimated? Suppose x was calculated as 15, would it not be n = 96+15+15 = 126 required for categorical predictor with 3 levels?
Comment: Thanks @Frank Harrell. Is there an argument that we can still run a multiple regression model with one or more categorical predictors having low counts in one or more levels, and just let the confidence interval reflect uncertainty in our estimates? I think that would work if we apply shrinkage e.g. mixed effects model to help avoid overfitting?


Using the same private network address ranges on all routers

Question: My setup: 2 desktops (Desk1 and Desk2) and 1 laptop (Laptop1).  Both desktops are plugged into the back of my AT&T      BGW210-700 modem/router.  I also have a Linksys EA9300 wireless router connected to the modem, which Laptop1 connects to.  The modem hands out IPs in the 192.168.1.x range- Desk1 is 192.168.1.67 and Desk2 is 192.168.1.75.  The Linksys shows up as 192.168.1.79 on the modem's device list.  Laptop1 doesn't show up at all on the modem.  According to the Linksys, its IP is 10.25.142.4, and Laptop1 is 10.25.142.83.
I share files across my computers, and all I have to do from, say, Desk1 is go to <code>\\Desk2\[folder]</code> in explorer. However, I can't reach Laptop1 the same way because it's behind the Linksys.  Laptop1 can still see and access both desktops.  I also use Ultra VNC to control the desktops and laptop from any of them, and the situation is the same: Laptop1 can control both desktops, but neither desktop can control Laptop1.  Is there a way to have all devices, even those attached to the Linksys, assigned a 192.168.1.x IP so they can all talk to each other?
Answer: In case someone else has a similar situation, the answer is very simple: I set the Linksys router to bridge mode.  Now it acquires IPs from the AT&T modem for all devices connected to it (instead of assigning them itself), and they are all 192.168.1.x.  Also, in order for other computers on the network to see my laptop, I had to change the network profile to private- I guess Windows sets networks as public automatically for security.  Now all devices see each other.


Is colonization through underground tunnels possible?

Question: I am thinking of a scenario in which a tunnel linking Hungary to Morocco is built around the 1500s by the King of Hungary in an attempt to colonize Morocco to get a border with the Atlantic ocean. What I am asking for is, could it be feasible in real life?
Comment: Is the tunnel in a straight line from one to the other? So then is the question about the engineering feasibility of a country from around the 1500s building a couple-thousand mile tunnel, crossing under a sea for a substantial length of it?
Comment: @user535733's answer is great.  As for feasibility of construction, that's already [answered elsewhere](https://worldbuilding.stackexchange.com/questions/131728/how-long-to-dig-through-my-tunnel).  Spoilers: not feasible.
Comment: Can you edit your query so that you pick either a) "possible" or b) "feasible". They're not the same thing.
Comment: If besides this tunnel the rest of your story follows real history, they'd better hurry with the project and do it at the very beginning of the century. Hungary was indeed one of the great powers of Europe in the 15th century and the beginning of the 16th, but they got set back by a civil war in 1514 and then suffered such a blow from the Ottomans in 1526 that they never completely recovered from it even to this day. (hm, maybe all that great effort wasted into the construction of this tunnel led to their downfall? ;) )
Comment: I voted to close this as a duplicate of that older question because it's intrinsically the same problem in the same time period with the same answer (I was considering simply duplicating my answer here... but that's the essence of a duplicate question). Note, however, that your title and your post ask *two different questions.* Is colonization through a tunnel possible? Of course. Can a 1,000+ mile tunnel be built in the 1500s in a reasonable time period for a king (or his grandchildren) to use it? No.
Answer: Only with magical assistance.
The shortest possible great-circle route from Hungary to Morocco is 2040km (1260mi).
An average reasonably-fit adult human can march about 35km each day on a long journey. Since we're assuming a roadway in this tunnel, let's be charitable and bump this up to 45km each day for each of the 45 days it will take them to traverse the tunnel.
In other words, each person traversing the tunnel must carry 45 days' supply of food, water, storage for their bodily wastes (they cannot leave it in the tunnel -- that would be disgusting!), and a source of light that won't asphyxiate them.
Let's see how much water that is: 4 liters per day means about 180 liters of water. For the average person in the 1500s, that's over three times their body weight. Of just water. That they must slog 45km every day. For a month and a half. And the weight doesn't decrease by too much, since they must carry their wastes back out of the tunnel!
Let's say folks get clever and pile their food and water on an oxcart. Same problem: The oxen need fodder and water too, and their cart cannot carry a 45-day supply for themselves, let alone any cargo.
So finally one of the King's advisers turns it into a rocket problem: Every couple hundred kilometers, the tunnel is widened into a tremendous supply depot. An army of oxcarts hauls cargo to the nearest (and hauls out the waste!), a smaller army forwards to the next, and so on, until a single colonist can stumble out the African end, barely alive and smelling utterly foul. If you do the math, you will conclude that the entire population (and all the oxen) of Hungary are inadequate to this task.
But it's all academic anyway. They don't have a source of light that does not involve combusting oxygen, so the miners building the tunnel will keep mysteriously dying of asphyxiation while still under their first mountain of the Alps.
Comment: +1 for addressing not the feasibility of the tunnel's construction ([already addressed in a different question](https://worldbuilding.stackexchange.com/questions/131728/how-long-to-dig-through-my-tunnel)) but just the problems with traversing it.  Very nice.
Comment: Great answer, however if the tunnel is almost perfectly level and well-paved then there is no reason that the people can't push their own supplies in carts rather than adding beasts of burden.  Not that it helps much - they won't be able to make 45 km/day pushing a heavy cart all the way and they need domesticated animals at the other end to establish their colony.
Comment: I'm not sure they need light.  Do it with train carts (pushed, no engine) and each cart is "connected" to the one in front by poles suspended from ropes.  Get too far from the one in front, the pole pulls forward, a noise maker touches the wheel.  Get too far back, a different noisemaker touches.  Unfortunately, they still asphyxiate, breathing alone will make it deadly.
Comment: @LorenPechtel Oh, I'm pretty sure folks will want light so they can avoid stepping in all the human waste and other garbage left behind by tens of thousands of previous colonists who weren't diligent enough to clean it up and pack it out. And to step over the corpses of the colonists who died in the tunnel and maneuver around the endless stuck and broken carts, of course.
Comment: @user535733 Ouch on the breakdowns.  I was figuring they would use chamber pots.
Answer: Nah, it was more feasible to build two tunnels...
Another answer explains well why the Hungarians built two tunnels.  One starts from a river at the surface and slopes ever downward, and one is very deep and slopes ever upward.  The design allows water to fall from the high tunnel to the low tunnel at a vertical tunnel near the site of active excavation.  These vertical tunnels are blocked off and replaced further on every year or so as the miners move out of range.  The falling water turns the shaft of a primitive machine that bores out the rock, and men slide it onto rafts that they send out on the waters of the low tunnel.  A constant stream of rafts arrives in the upper tunnel loaded with things for the workers and overseers: food, clothes, drill bits, opium, drabs ... everything a productive underground colony needs.  But I hope you didn't need to finish your project by 2022. :)
The less said of the massive ever-turning slave-driven shaft that lifts all that excrement-laden transport water and sledges of excavated stone and garbage back up out of the abyss, the better. :)


How can I color in this picture?

Question:
I'm making this on adobe illustrator, it's one shape (minus the eyes) and several lines. How can I color the bottom half of the whale, not using the paintbrush tool?
Answer: Select all
Grab the Live Paint Bucket Tool
Pick a color
start clicking
When done, click the Expand button on the Control Bar across the top of the screen.

How can I color in this picture?


What are the main differences between the reference temperature and the average air temperature?

Question: Last week when I was dealing with the North American Multi-Model Ensemble (NMME) seasonal forecasting system, a variable named "tref," or Reference Temperature, caught my attention.
I read some articles that used reference temperature but couldn't understand this variable.
My main question is, what is the definition of the reference temperature? And what is the difference between it and average air temperature?
Thank you all.
Comment: Thank you @gansub
Answer: I have the same question and found a satisfying answer recently.
The reference state, including wind, temperature and pressure, is a dynamically-steady state to the equation of motion of the atmosphere.  It is a steady-state solution only when the flow is adiabatic and inviscid (no external forcings).  More specifically, the reference state is:

zonally uniform,
vertically in hydrostatic balance, and
meridionally in gradient-wind balance

everywhere in the domain.
Although scientists knew there exists such state, only Nakamura and Zhu (2010) and Methven and Berrisford (2015) provided numerical methods to calculate such reference state, given any instantaneous atmospheric state.  This is equivalent to a conservative rearrangement, schematically shown below:

This rearrangement conserve mass between any two isentrops and circulation along each PV contour, which can be called conservative zonalization.
Before these numerical algorithms were proposed, most people use Eulerian average of atmospheric state, like long-term time mean or zonal mean, to give a diffuse estimate of this reference state.  As a result, the jet and temperature front in the averaged state are usually weaker than those in the reference state.
Another reference state, motionless and horizontally flat pressure surface in hydrostatic balance, is also a steady-state solution to the (adiabatic and inviscid) equation of motion.  However, it is a trivial resting state that does not have circulation at all.  Therefore, we may not be interested in this resting reference state.
Comment: You suggest this is what the NMME plots then?  Any insight on why it would be an output (something to do with how things are setup in the model?  Or it has a common use?)  Or maybe there are multiple definitions for the term (yuck) (gansub's comment suggesting it is a historic time average seems reasonable, what I might have guessed)
Comment: @JeopardyTempest This is not a NMME plots.  Just a schematic plot showing how to get the reference state (right) corresponding to an instantaneous eddying atmospheric state (left).
Comment: right, sorry, wasn't suggesting your plot was from NMME... but wondering if the reference temperature in it that Behzad is asking about is different from what you suggest


How many lives an organ donor with brain death who is otherwise healthy can save on average?

Question: Considering all of the probabilities including the probability of the rejection of the transplants, how many lives could this donor save on average if we transplant his organs to other people who need them to survive?
Answer: Organ donation and utilization in the USA

States about 3.6 organs are gathered from every deceased donor

Organdonor.gov says a organ donor can save up to 8 lives and Mayo Clinic says you can save or improve up to 50 lives. Some sites say you can save over 50 and even a 100 though.
liveonny.org

One organ donor can save up to eight lives. The same donor can also
  save or improve the lives of up to 50 people by donating tissues and
  eyes.

However, most deceased organ donors are brain dead about 5% have experienced cardiac arrest though. This does not affect the amount of organs donated usually, both donors give around the same amount. As for possible rejection of organs any patient with a donated organ could do that, there are some people who may have greater risk, but usually everyone needs to take meds to be safe from this.
Survival rates:

Kidney:

About 98 percent of people who receive a living-donor kidney
  transplant live for at least one year after their transplant surgery.
  About 90 percent live for at least five years. About 94 percent of
  adults who receive a deceased-donor kidney transplant live for at
  least one year after their transplant surgery. About 82 percent live
  for at least five years.

Liver:
The 3 year survival rate was 78% and the 71% survival rate was for 5 years.
list of survival up to 10 years. I would have added the list, but it's very big as it includes all organs.
Comment: Nice answer. However I would also like to know about the average survival rate of the patients who receive the transplants if possible.
Comment: @didam I added the average for kidney and liver, and added a link for the rest.


de Lubac's Medieval Exegesis online?

Question: Question probably self-evident from the title but wondering if anyone knows of an online copy of de Lubac's Medieval Exegesis (in English trans.) Thanks!
Comment: I didn't see the English version online for free anywhere (it is fairly recently published), and the French version (*Exégèse médiévale*) was not freely available on any *legitimate-looking* websites, either.
Answer: There seems to be only a partial copy of volume 2 of the Jesuit Henri de Lubac's works on Medieval Exegesis that can be found online. Here is the only partial copy for free of volume 2 in English of Medieval Exegesis that I am aware that exists online.

de Lubac's Medieval Exegesis online?


Brand new MBP waking/heating issue

Question: I have a 2 day old Macbook Pro, quad core i7, Yosemite. I closed the lid this morning with the power supply plugged in and iTunes, iTerm, and Safari idling. I opened the lid tonight and the screen and back of the computer were warm and it wouldn't wake from whatever 'power saving' state it was in. I had to hold down the power button for about 15 seconds before it restored. Any idea what this could be? I am very anxious about this behavior given Macbook Pro's reputation and price tag and the age of this computer. Thanks.
Answer: One thing for sure: it shouldn't act like that.
Beside that it'll be hard to say what was going on -  seems like it was overheating (was the fan running?) and didn't want to start working before cooling at least a bit.
There might be a lot of reasons for that, but keep a close eye on your machine behaviour - should it happened again - definitely get it serviced since it's a brand new machine.
Comment: Make sure vents are not covered and you've taken off all the packaging.
You can also check logs for any error/alarm messages (use 'Console' app).
Comment: I have been looking for log info without success. Do you know where I can read up on mac error reporting or where the logs might be? Thanks!

Brand new MBP waking/heating issue


How many days to wait before fixing someone else's question

Question: Motivation
Fedorqui wrote:

Si no vuelve, en unos días ya podríamos operar sobre [la pregunta].

I'm looking for a rule of thumb, a number of days to wait.
Comment: I would play by ear depending on post (content), user, etc We probably should not have a number or rule written in stone.
Answer: It is nice you ask this in Meta because 1) I forgot to answer to your comment in the linked question, and 2) immediately after writing that comment I asked myself the same question :)
To 1) I am sorry, these are busy times.
To 2) I agree with walen that one week can be some reasonable amount of time: it gives enough time for the OP to come back and not enough for us to remember that question exists. However, to me the underlying idea here is what mdewey explains in this related question of yours:

Leave a gentle comment and then wait. If the OP does not come back to clarify the post and narrow down the questions within a few days then the question should be flagged for closure as too broad.

That is: we are here to solve problems. If someone enters this site and has a question, it is his responsibility to express it in a clear way. We can help them to express it better, improve its format and many other things, but the core of the question is still theirs.
If they happen to just vanish, we have some options:

If the question already has some potentially good answers, try to polish it to future readers.
If the question does not have any answers, vote to close it.
If the question does not have any answers and you feel that you can express the question in a better way, just ask a new one and the older will be marked as a duplicate of the new one. This has the feature of being able to have a full control over comments of other users to improve it, also to accept a good answer, etc.

As they say, Spanish Language Stack Exchange is moderated by you. We together can build a better place in the internet. It is our choice to improve things: if you do, tons of people (+10K every day!) will silently thank you. If you don't, please do not feel bad. So neither feel the urge to ask something the OP did not really ask, nor to clarify what others do not make clear.
As I once read in Stack Overflow:

Don't polish turds
The purpose of editing is to make a post easier to understand, and easier to find. If a post should be deleted, then flag to close/delete instead.
  Editing these posts is sometimes called "turd polishing" - no matter how much you polish a turd, it'll always remain a turd. Similarly, if a post is inherently worthless, it'll always remain worthless, no matter how much you edit it.

Instead, try to find hidden gems.
Comment: Sometimes my participation ebbs and flows -- there are other obligations and interests besides SE, after all.  I completely understand.
Answer: As a rule of thumb, I would say a week is just enough time.
It's long enough to allow for people that enjoy offline time on weekends to come back on Monday, as well as people with a busy week that can only post in the weekend. Etcetera.
It's also short enough for mods and seasoned users to not forget about it and edit / enhance / split / delete it once this waiting time has passed.
If somebody made a question and then ignored answers and comments for a whole week, I'd say they weren't that interested to begin with.
Answer: I've been going back and forth between two days and three days, i.e. 48 hours and 72 hours.  After all, if OP doesn't like the revision, he can always roll it back.
One of the reasons I like to try to rescue questions that are about to get closed, or have been closed, is to encourage a new user to USE the site.  If their question doesn't get answered at all, he's liable to get discouraged and not come back.  (I realize there's still a good chance of that happening even if I rescue his question, but I still like to try.  Sometimes it turns out well.  I've had some success with this at ELU.)
I'm not going to try to convince anyone else to go around rescuing questions.  But I'd like to be able to rescue some questions here with a bit less interference than I've gotten.  That's my motivation for asking this question.
A week seems ridiculously long to me.
The only reason I was thinking of two or three days was that I was advised to wait a couple of days before rescuing the question.  Frankly I really disagree with that.  When I write a question on any SE site I want as quick and helpful an answer as I can possibly get because 90% of the time I have something on my mind that I want to figure out ASAP.  (The other 10% is intellectual curiosity and there's no hurry for that.)
(A question such as the one I posed here at Meta is completely different.  With this question there's no hurry whatsoever.)
If we fix a new participant's first flawed question or even the first two flawed questions, then after that we can fade away and make it more sink or swim.  That's my view.
I would take this general approach on any SE site but ESPECIALLY Spanish where we need to stimulate more growth.
Comment: @walen - I'll paint two likely scenarios.  (A) OP posts on Sunday evening, the question gets closed by Tuesday morning.  OP comes back -- at any point -- and finds his question closed, and gets nothing positive from the experience.  He's unlikely to come back.
Comment: (B) OP posts on Sunday evening, the question is closed by Tuesday morning, I attempt a rescue-edit and propose reopening, the community reopens it by Wednesday evening, there are three reasonable answers by Friday morning, OP comes back Saturday morning and finds paydirt.  He posts the rest of his questions and there's a good chance he continues to participate.  Or he rolls back his question which then gets closed again.  But he got something out of it and has started to engage with the software by doing the rollback.  His learning process has begun.


QGIS slow on loading project

Question: Is there any work around to mitigate the amount of time QGIS takes when loading projects that have large tables from postgis layers .
I have tried to turn off this large layers so they are not in use , save , close project and then reopen project hoping that the turned off layers would not load on project start again. But nothing it seems that it will always load the tables in memory even though they are turned off.
Any suggestion ???
using 2.8.2 - Wien on windows
Comment: It surprises me a bit that the layers have that much influence. I have layers with millions of geometries and my projects behave fine. It is different though when you want to *add* layers from the dbase manager for tables that have no GeometryType set. Could that be what you mean? Or could it be that there are some old layer references in your QML file to stores that don't exist anymore?
Comment: As far as I understand when you start a project that has layers with no reference qgis warns you and will not load them, the layers do have geometry types set , It indicates on the bottom bar loading and name of the layer loading plus the he progress bar keeps  stainless for wile on every layer that is loading . not sure what your millions are but I'm talking about layers of more than 50 million objects that I display at certain zoom levels only.
Comment: Could you give us a step by step explanation of what you do and notice? It makes it easier to reproduce. Another thing: can you confirm that pressing ' escape'  stops the loading process? Postgis layers that are off should not load data and even when they are on only the geometries that are within the bounding box will be loaded (every time you pan or zoom). I assume the tables are indexed on geometries?
Answer: In the Postgis connection settings, selecting the "Don't resolve type of unrestricted columns (GEOMETRY)" checkbox usually helps.
Comment: Does ticking this option helps for loading layers that are in the layer trees or only for displaying all available layers when connecting to a db? If it is the second case, then it does not really help when opening a project with heavy postgis layers.
Answer: At least as of QGIS 3.18 loading layers from large database tables is still a bit slow (& seems irrespective of how much data the layer view has). Here are a few things that will delegate some of the project loading time to when you use the layers.

Display of layer tree in the UI is not expanded. This should delay loading data.
Set the layers bounding box point to an area with little data.
Ensure db source does not check for key uniqueness as this does not scale with size.
Make sure db source does estimate metadata.
In the db ensure your layer tables have geospatial indices.

In your project.qgs file ensure settings for each layer look like this:
<layer-tree-layer
   providerKey="postgres"
   checked="Qt::Unchecked".        <-- SET
   id="my_table_9aeda51a_d3e9_4eeb_af46_8c577a23ff99"
   name="my_layer_name"
   expanded="0"                    <-- SET
   source="
     dbname='my_db'
     host=localhost
     port=1234
     sslmode=disable
     key='id'
     estimatedmetadata=true        <-- SET
     srid=3347
     type=Point
     checkPrimaryKeyUnicity='0'    <-- SET
     table="my_schema"."my_table" (geom)
  "
>

Love to know if there are other tricks one can use.
Comment: Thanks eliangius , in fact I have been using latest versions on Qgis 3x with estimatedmetada true and it apparently Speeds up the table loading time .
Comment: @JorgeVidinha surely this setting only helps when adding a PostGIS dataset? What about when opening a QGIS project file?

QGIS slow on loading project


I want to match same field of view with different focal length is there any formula?

Question: Trying to get any hard formula so according to that calculation for different focal length i place object accordingly.
Eg.
Comment: Do you mean a formula to calculate the distance at which the subject must be positioned in order to appear the same size in your composition, across different focal lengths?
Answer: If you swap to a lens with focal length twice longer, you have to stand back twice farther, to duplicate the same field of view.  Or (concerned about the nit-pickers) move the subject back twice farther from camera, same math.
Replace twice with any factor, such as 1.3x or 0.5x.
Technically, this is same field of view at the focused subject distance.  Other distances, such as the further background will have a changed field of view, due to the different angle of view of the focal length.
For example, if the distant background is a distraction in a portrait picture, you can use a longer lens and stand back appropriately further to see the same portrait field of view, but with a reduced background area, and then shifting the camera (or subject) slightly sideways can choose to include the best part of that background.
Answer: You can't...
You can change the distance proportionally so that the subject occupies the same area of the image, as described by Wayne. But that will not change the FoV/AFoV, which is an intrinsic characteristic of the lens' focal length (the resulting recorded FoV/AFoV is further influenced by sensor size/crop factor).
So, while the subject may be recorded the same size, what is recorded in the foreground, and more significantly in the background, will be quite different when using significantly different focal lengths.
Comment: Angle of View is an angular measurement. Field of View is a linear measurement of the width, diagonal, or height (usually width) of the plane parallel the to camera's imaging plane at either a specified distance from the camera or at the current focus distance. [Diagram](https://shuttermuse.com/wp-content/uploads/2016/03/Field-of-View-diagram.jpg)
Comment: Actually, it is field of view and angular field of view... they are the same thing except that FoV is at a specified distance. https://www.princetoninstruments.com/learn/camera-fundamentals/field-of-view-and-angular-field-of-view
Comment: AFoV is the same as AoV in that both are angular measurements measured from the point of the camera. On the other hand, FoV, as described in your own link, is an areal measurement of a flat plane at a specific distance from the camera. Of course any rectangular portion of a flat plane has an area that is dependent upon the linear measurements of its two axes.
Answer: As you know:
A camera working at a specific subject distance with a specific lens focal length will image a specific field.
As an example:
35mm FF format 24mm by 36mm with a 50mm lens mounted, 5 units subject distance (may be meters, feet, inches millimeters.
Vertical angle of view 27.0⁰  2.4 units vertical field
Horizontal angle of view 39.6⁰ 3.6 units horizontal field
Formula using EXCEL computes angle of view
=((ATAN((24/2/50)))*180/PI())*2
=((ATAN((36/2/50)))*180/PI())*2
Formula for field of view in this case 5 is camera to subject distance
=(TAN(27.0/2/180*PI()))*2 * 5
=(TAN(39.6/2/180*PI()))*2 * 5
Note: Makes no difference which unit is entered can be millimeters or feet etc.
You asked, I think, if you change to a different focal length lens, can you make an adjustment and maintain the same field of view?
Answer, you can compute a revised camera to subject distance that replicates the original field of view.
This is a simple ratio problem.  Suppose we replace the 50mm lens with a 25mm lens.
The ratio is 25/50 = 0.5
Now multiply original subject distance by this ratio thus 5 X 0.5 = 2.5
Place the camera with the 25mm lens mounted at distance 2.5 and the field of view will be the same as before.


Do the children who were murdered by the Ancient Egyptians have a portion in the world to come?

Question: Technically speaking, Israelites were not yet formed and the Tanakh wasn't given yet. However, I'm wondering if there is some kind of a principle, intuitively speaking, that would extend to them as technically, they were still descendants of Abraham, peace be upon him, as far as I know. So I'm asking as to what the status of these children is?
Comment: The general principle that you are looking for is that they would all be descendants of Shem ben Noach. The line of inheritance to the name Yisroel (that they are considered to be Reishit) comes through him. But you should note that most of the other descendants of Noach also have a portion in the World to Come, different but similar to Yisroel.
Answer: Sotah 12a implies that any baby born in Egypt got a ticket to Olam Haba:

A Sage teaches: Amram, the father of Moses, was the great man of his
generation. Once he saw that the wicked Pharaoh said: "Every son that
is born you shall cast into the river, and every daughter you shall
save alive" (Exodus 1:22), he said: We are laboring for nothing by
bringing children into the world to be killed. Therefore, he arose and
divorced his wife. All others who saw this followed his example and
arose and divorced their wives.
His daughter, Miriam, said to him: Father, your decree is more harsh
for the Jewish people than that of Pharaoh, as Pharaoh decreed only
with regard to the males, but you decreed both on the males and on the
females. And now no children will be born. Additionally, Pharaoh
decreed to kill them only in this world, but you decreed in this world
and in the World-to-Come, as those not born will not enter the
World-to-Come.


Time slowed by gravity

Question: If time moves more slowly on Earth (due to our proximity to a gravitational body) than for someone orbiting Earth in a spaceship, yet the opposite occurs in the frequently cited "twin paradox" of the earth-bound twin vs. the twin in the fast-moving spacecraft, then my question would be this--is the slowing of "time" the same as the slowing of molecular/atomic motion?
Comment: Time goes actually _faster_ on Earth than in low Earth orbit. It's only above ≈ 3170 km that the gravitational effect overweights the effect of orbital speed. C.f. Wikipedia on the [experimental confirmation of gravitational time dilatation](http://en.wikipedia.org/wiki/Gravitational_time_dilation#Experimental_confirmation).
Answer: The twin paradox (at least how it is usually stated) only takes special relativity into account. Time dilation due to gravitational effects is within the domain of General Relativity. Therefore, don't be too worried by the fact that gravitational time dilation is almost always ignored in the statement of the thought experiment.
In addition, the "slowing of time" includes the "slowing of molecular/atomic motion." If it didn't, then there would be an experiment that could be conducted (namely, measuring time against molecular motion) that would allow an observer to determine whether they were in motion - which would imply that absolute motion exists, there is a preferred reference frame, and, therefore, that Special Relativity is incorrect.
That being said, the dilation effect due to Earth's gravity is much, much smaller than dilation due to relativistic motion. This Wikipedia article approximates the time for an observer on Earth as being about $0.0219$ seconds behind an observer in flat space-time after about one year (which is roughly $30,000,000$ seconds long). On the other hand, an observer moving at $80\%$ the speed of light would appear to a stationary observer to be behind by more than $4$ months at the end of a year.
Answer: You are right, the closer we are to a body and the more the mass of the body, the slower time will run. This is owing to the fact that gravity bends space-time.

In the twin paradox time is slowed down for the fast traveling twin because of the dilation of time due to his fast velocity.
This equation gives the time period of an event measured by a frame where the events occur at different places(improper time interval):

The time dilation owing to small velocities(much less than 'c'), is not highly apparent, but because the twin is traveling at high speed( at speeds comparable to the speed of light), time is noticeably slowed down for him.
Here, time is slowed down for everything that is traveling to ensure that within the same frame of reference time passes at the same rate for all objects.
Thus the slowing down of molecular or atomic motions is a consequence of time slowing down due to the high velocity.
Answer: You are correct, time dilation will occur for someone staying on the earth surface relatice to somebody in space. And yes, everything that can be measured by a clock, excepth the speed of light, will be perceived as slower, including molecular motions.

Time slowed by gravity


Calculating uncertainty using a set of measured values

Question: I am hopelessly confused about the very basic question of how to propagate error if you want to take into consideration the error that each data point already has. For example, say I have time measurements in seconds of 30+/-1 s, 32+/-5 s, and 30+/-2 s, and I find a final answer for time by averaging the three values of 30, 32 and 30. Now, I want to calculate the uncertainty of time, how would I factor in the +/-1 s, +/-5 s, and +/-2 seconds?
Comment: You want the standard error on the mean? Can you explain what you did for $\bar t$, and any guesses at, say, the standard deviation (which is not the standard error)?
Answer: The standard error of measurements, $t_i$, is estimated by:
$$ SEM = \frac{\sigma}{\sqrt N}$$
where $\sigma$ is the standard deviation, and $N$ is the number of measurements.
The only nuance here is that each $t_i$ come with a weight:
$ w_i = \frac{1}{\sigma^2_i}$
So you need to compute the weighted standard deviation, via:
$$ \sigma^2 = \langle t_i^2\rangle - \langle t_i\rangle^2$$
where $\langle f(t_i) \rangle$ is the weighted average of $f(t_i)$.
Note that you do not have 3 degrees-of-freedom, because they are not all of the same significance. You need to compute the effective degrees of freedom, which is given by:
$$ N = \langle 1 \rangle \approx 1.56 $$


problem downloading Shutter in 12.04

Question: when I click "download" Shutter for v12.04 in Ubuntu Softwarecenter, a window of Launch Application pops up stating: "This link needs to be opened with an application". I have no clue which application that may be. Do you?
Comment: You can better install it from the software center by tying "shutter" in the search bar in the software center.
Answer: The link you clicked will download the .deb file (the packaged version of a software) and you should open it by browsing to the /usr/bin/ directory and then choosing software-properties-gtk as the application to open the link.
It is easier to install shutter using the software center. Open software center by typing "software center" on the dash and then type "shutter" on the search bar and press Return and then enter your password if prompted and this will install the application for you.
You could also install shutter from the terminal. Open a terminal using Ctrl+Alt+t and then type
sudo apt-get install shutter

and enter your password if prompted and then type Return twice to install the application.

problem downloading Shutter in 12.04


Uploading paper to Arxiv vs double blind review

Question: My peers told me, at least in the field of machine learning, it seems acceptable to upload your (draft) paper to Arxiv before submitting it to a conference. I am confused about how it does not contradict the double blind review practiced by many popular conferences.
Comment: yes somewhat, but it can seem subjective so I want to see more views on this matter
Answer: Conferences try their best to accommodate ArXiv submissions because of the reality of CS publications. For example, NeurIPS says:

The existence of non-anonymous preprints (on arXiv or other online repositories, personal websites, social media) will not result in rejection. If you choose to use the NeurIPS style for the preprint version, you must use the "preprint" option rather than the "final" option. Reviewers will be instructed not to actively look for such preprints, but encountering them will not constitute a conflict of interest. Authors may submit anonymized work to NeurIPS that is already available as a preprint (e.g., on arXiv) without citing it. Note that public versions of the submission should not say "Under review at NeurIPS" or similar.

So you can upload your paper to ArXiv, but not say it's being reviewed at NeurIPS or it may be grounds for rejection.
Do reviewers look for paper authors? This is probably true in at least some cases. For at least some papers I reviewed I knew who the authors were, since I saw the paper presented at a talk/workshop/seminar. This is usually ok, as long as you believe that you can still offer an impartial review of the results. Ultimately, despite ML being a relatively large field, it consists of many small-ish communities (some with maybe 5-10 groups working on the topic), so if you've been a reviewer for a couple of years, you can guess with very high probability whose paper you're reviewing (I can almost immediately identify some authors based solely on their writing style).
Ultimately, the whole reviewing endeavor is a very large exercise in trust. We trust authors to not make up results; we trust reviewers to act ethically; stakeholders trust scientists to do the right thing (and not, say, cause the robot apocalypse).
Comment: this clears things up a lot. thank you for sharing your take on this issue.
Answer: I'm not in that field, but I have sometimes had review requests for venues that have double-blind review. In these instances I was told not to search for the paper online or otherwise deliberately find out who the authors were, but that I could still review even if I happened to have seen the paper before.
It may be that some venues make double-blind work by having a no-arXiv policy for submissions, in which case I would expect this to be very clearly specified in the guidelines to authors. But in my area arXiv is so ubiquitous that this just wouldn't be feasible.
Answer: The reality of review (I know this because my first ever peer review was for a single blind journal) isn't just whether it's double blind. The issue is "can the reviewer be objective". So, assuming you and the author aren't friends or coworkers or it's your advisor, you knowing the identity shouldn't matter or impact your results.
I read over another work by the people who's paper I reviewed. And I liked it! But, I still gave the exact same review I would've given otherwise when it came to their journal submission, even though I'd emailed the authors before.
Of course for specific conferences they'll have their own rules, but for journals at least, the issue is objectivity, not simply "do I know whose name it is".


Another way to say 'list of names'

Question: Another way to say "list of/with names" would be "names list" or "name list" or "names' list"? The last one I suppose is not correct, because possesive is used for persons, am I right?
Comment: Could you provide some context? Depending on where this list is used or what it is used for, there could be different words for it in English.
Comment: This one I needed for naming a variable in a program ;) The variable was a list containing some names. I was wondering if there is some more general rule for the situation where I have for example "container of some things", "bowl of fruits", "dictionary of stupid words" - would it be "fruits bowl" and "words dictionary"?
Comment: In that instance I'd go with nameList as the variable name. Since the names are not for any specific purpose and there's no particular occasion, there's nothing more specific you can use.
Answer: Name list and names list are both valid.  Which one is better might depend on the context.
Names' list is incorrect, but for a different reason.
It's incorrect because when you use the possessive apostrophe s, it suggests that the list belongs to the names, or that the list is intended to be used by the names, which doesn't make any sense. It's not important that names are not persons.  Even with a set of people, we would not use this phrase.  Or if we did, it would have a different meaning.
For example, a presidents' list would not be a list of presidents, it would be a list (of something else) that was made for presidents.

Note: I see a lot of English language learners making comments about the possessive apostrophe s only being correct in reference to people.  This is incorrect; there is no such rule.  I don't know why teachers are telling their students this.  All kinds of inanimate objects can "possess" things: the sun's rays, the ocean's bounty, the food's smell, the paint's luster, the table's finish, the car's make, and on and on and on.
Comment: I would appreciate an explanation what is the difference when saying names list and name list. Im rather asking about general rule so there's no really a context. I have for example "container of/with some things", "bowl of/with fruits", "dictionary of/with stupid words". When would i use fruits bowl, and when fruit bowl?
Answer: Using "name" as an attributive noun is acceptable "a name list" or even hyphenated "name-list". Similarly we can get "fruitbowl" (this compound has become so common that it is increasingly written as one word) and "stupid-word-dictionary".
However "list of names" is a normal and natural way of describing this:

Have you got the list of names for the party?  I want to check if Kathy has been invited.

In particular contexts it may be given a special name. In school, a list of names is a "register", or sometimes a "roll" (from which we get the expression "roll call"; at one time the list of names would have been written on a roll of paper).
Comment: What about names list? Is it the same as name list?

Another way to say 'list of names'


Fox Float RP2 rear shock problem - soft run and hiss sound on first 5-10% of travel

Question: I might have a problem with my Fox Float RP2 rear shock (Giant Reign, 150 mm of travel, bike & shock only 6 months old). When pumped to 200 psi, the shock has a considerably soft run and is making a hissing/sucking noise, both on about first 5-10% of its travel. The rest of shock travel seems to behave OK. What do you think is causing the problem? I read about cavitation (when air/nitrogen penetrates oil chamber) and I think that might be my case. With cavitation, do I need an immediate maintenance or can I use the shock like this for the rest of the year and do the seasonal maintenance afterwards?
Answer: It might not be possible to give you a 100% answer without opening the shock, but it certainly needs service.
6 months of use isn't a great determining factor for service intervals, hours of riding and type of riding (how big, how dirty) are much more important. Have you rebuilt your air can yet? Do you know how many hours you have on the shock?
You can probably run it for a bit (until winter), but it may or may not make it. Either way, the shock needs rebuilt. Sorry dude.
Comment: I sent the shock to the shop for regular annual service/maintenance - the guy in a shop confirmed the problem I described. I guess it was cavitation. After service the shock is OK again.


Does a single-entry visa allow you to do a long transit in Schengen countries then leave to the country that issued the visa?

Question: If I have a single entry visa to France can I plan my trip as follows: I will do a transit for 23 hrs in Greece, then continue my trip the second day to Nice, Cannes, Paris, then to Amsterdam, leave from airport to have another transit for one night in Rome then back home?!
Comment: @Pablo The asker isn't transiting in Schengen: they're travelling _to_ the Schengen area, then travelling within it, then leaving it. If you're not sure enough to post an answer, then don't post an answer -- anywhere. Comments are for requesting clarifications of the question, not for posting maybe-answers that aren't of high enough quality to go in the answer box.
Comment: @Pablo Sorry but your "answer" is incorrect. Greece is part of the Schengen zone so the asker doesn't need to stay in the transit zone in Greece. They enter Schengen in Greece and don't leave again until they leave Rome. This is one of the reasons that answers shouldn't be posted as comments: an incorrect answer can be voted down but an incorrect comment can't.
Comment: This is not really an answer, but as long as you don't attempt to leave the transit area at the airport, I think that's fine, because essentially you won't be entering the countries in which you transit. But you have to remain in there, otherwise, you have to go through migrations. Now, I'm not entirely sure about that because I do remember doing immigration into the Schengen area at the first touch, so, if I go Wherever->Spain->Germany, I would do immigration at Spain and then nobody would ask me for the passport again.
Comment: Well, the reason I posted in comments is that I wasn't totally sure as I had conflicting experiences. Transiting through the Schegen area as far as I know doesn't require a visa, but I did mention that the entry happens at the first Schengen contact in my comment.
Answer: Yes. "Single entry" means you can enter the Schengen area once, as Greece, France, The Netherlands and Italy are all parts of Schengen your itinerary would only mean one entry into Schengen.
You'll go through immigration in Greece, where you'll show your visa - be prepared to document that France is the main destination of your trip, so that your visa is obtained rightfully - and then you'll travel within Schengen, for those trips you'll probably not have to show neither visa nor passport.
Answer: A single-entry Schengen visa allows you to enter the Schengen area once.
This is exactly what you're doing, so you're fine.  Don't think in terms of entering and leaving countries: think of the Schengen area as a whole.  You're entering the area once, in Greece.  You're then travelling within it (France, Netherlands, Italy) and then you leave to go home.  It doesn't matter that you're going to leave Greece (and France and the Netherlands) because you're not leaving the Schengen area.
Since you're supposed to get the visa from the country where you'll be spending the largest part of your stay, the immigration officials in Greece might want to see hotel bookings, plane/train tickets, etc., to prove that you'll be in France for longer than any of the other countries you're visiting.


uinavigationviewcontroller behaviour of not visible view controllers

Question: If I have UINavigationController which currently displays MyViewController "a" and I push AnotherViewController "b" , later if i pop UINavigationController I'll get MyViewController "a" (exactly that MyViewController,not new). How can I get new instance of MyViewController displayed by NavigationController? Just push MyViewController "c"? is that ok that there still will be "a" in ViewControllers stack (memory problems etc)?
Answer: For your b controller, use the view did appear method instead of viewdidload.  Also try to release anything with the view did disappear.  Sorry if this isn't an answer but your question is kind of misleading.


Getting All users from a site

Question: Has anybody have the awareness about to getting all the users from all the site and sub sites. I want to create a access report that will describes each users permission in each and every site and sub site in sharepoint. I am getting all the site and subsites. and i can take the users from each site. But i wish to know that is there any way to get all users firstly and then they involved sites. and what are the permission for each users in that sites.
Answer: This is a painful task to achieve because you have to iterate for each site and get user and permission.
You could use something like this
<code>SPSite siteCollection = new SPSite("site url");
SPWeb site = siteCollection.OpenWeb();

foreach(SPGroup group in site.Groups)
{
  Console.WriteLine(group.Name);
  foreach(SPUser u in group.Users)
  {
     //will give you users in group, you can then grab the roles of the user
  }
}
SPSite oSiteCollection = SPContext.Current.Site;
using(SPWeb oWebsite = oSiteCollection.AllWebs["Site_Name"])
{
  SPMember oMember = oWebsite.Roles["Role_Name"];
  oWebsite.Permissions[oMember].PermissionMask = //permission to check;
}
</code>
Answer: You can always use PowerShell to list all users:
<code>$site = Get-SPSite http://yourservername/sites/yoursitecollection

$groups = $site.RootWeb.sitegroups

foreach ($grp in $groups)
{
    "Group: " + $grp.name;
    foreach ($user in $grp.users)
    {
        "  User: " + $user.name
    }
}

$site.Dispose()
</code>
And when you have all the users, you can use Sharepoint SP2010 - Retrieve all User Permissions via Powershell available on Codeplex.
Comment: Note the 2007 tag on question. I think using PS is not an option
Answer: I would recommend you using powershell.
First, Iterate through all available sites (web) and then just iterate through all users on this site and write to console/file username and his permission to this web. You can also go further and display permissions to specific list on this site. This is imho the easiest approach.
However, if you want different view - list users and to users list all their sites they have permission on, it would need different approach to store date but the idea should be the same.
EDIT:
just a little googling and I've found script that should suit your needs:
https://sp2010userperm.codeplex.com/
Comment: Note the 2007 tag on question. I think using PS is not an option
Comment: Didn't see that. In that case he can create console app and rewrite PS code to .NET, shouldn't be so hard.

Getting All users from a site


How can I run Selenium tests on an Ubuntu server?

Question: I currently have a test machine running Ubuntu server 9.10 with no GUI.  I want to run my Selenium RC test suites which open Firefox and perform a series of operation. I could bloat my test server with Gnome or KDE to run those tests but I'm looking for a lighter solution. Does anyone have some suggestions on how to run GUI tests on an Ubuntu server?
Comment: If the web application isn't javascript-heavy then maybe you should consider using Webrat rather than Selenium.  You'd benefit from being able to test on headless machines and it's nicer to script and it's much quicker to run tests.
Answer: Try this for automating headless server stuff. (Caveat, I wrote the post below)
http://www.semicomplete.com/blog/geekery/headless-wrapper-for-ephemeral-xservers.html
Basic summary is I made a script to run any command within a newly-created headless X server. This also lets you run lots of headless X servers at a time if you need to.
So for starting selenium-rc in a new headless X server, you would do (using the tool described in the above post)
sh ephemeral-x.sh -x "Xvfb -ac -screen 0 1024x768x24" java -jar selenium-server.jar ...

Answer: i haven't tested it by myself, but this sounds promising:
http://www.alittlemadness.com/2008/03/05/running-selenium-headless/
i will try this for myself.
EDIT:
finally i had time to test for myself.
i tested it on suse, but should be the same for ubuntu, except perhaps package and path names.
first install xvfb package, on suse it is called xorg-x11-Xvfb
start xvfb in background with display, screen and resolution parameters:
/usr/X11R6/bin/Xvfb :15 -ac -screen 0 1024x768x8 &
change your display settings:
export DISPLAY=localhost:15.0
and start your selenium rc:
/opt/java/bin/java -jar selenium-server.jar > /var/log/se_rc_server.log 2>&1 &
you could also start selenium rc with a testsuite specified:
/opt/java/bin/java -jar selenium-server.jar -htmlSuite "*firefox3" "http://www.google.com" "/root/google.ts.html" "/root/google_report.html"


Inertia of a box of photons

Question: Suppose a box one light year long (along its x-axis) with some mass M also contained a bunch of high energy photons with energy E that were travelling along the x-axis.  Would the inertia of the box include the energy of the photons while they are travelling freely along the axis (not bouncing off the walls)?
Comment: How do you know where in your box the photons are located?
Answer: The problem with your question is that you're trying to describe inertia in terms of what are, inherently, transient phenomena. Never mind the photons, if you push on a box that large it is going to take a long time for the sound waves to propagate from where you pushed to the rest of the box. So, for the specific limits you've given, you'll find an inertia that is on the order of $$\frac{v_s}{c} L \mu,$$ where $v_s$ is the speed of sound through the walls of the box, $L$ is the length of the box, and $\mu$ is the mass per unit length of the box.
If you really want to measure the inertia of something you have to apply a force for long enough for internal wiggles and jiggles to damp out, including photons bouncing back and forth. Otherwise, you're not really measuring the inertia of the whole object, but the fraction you've been able to affect, with errors for the complicated movements a non-perfectly rigid body can make; and relativity rules out all perfectly rigid bodies because they would permit sound to travel through them faster than light.
Here's a slinky drop demo of how the finite speed of sound through an object can affect that object's dynamics in interesting ways: Veritasium slinky drop.
Answer: When you prepare at t=0 a localized electromagnetic pulse wave containing you photons then the movement of the walls of the box (that are 1/2 light year away) and thus its inertia should not be influenced by the wave pulse (and thus photons) inside. The reason is that no electromagnetic waves would be reflected at the box walls which is necessary for a momentum transfer. On the other hand a small size cavity with standing electromagnetic waves would have an inertial mass contribution corresponding to the energy of the electromagnetic waves (photons) which has been pointed out in 1904 by Friedrich Hasenöhrl.

Inertia of a box of photons


return array of size n

Question: I need a function that willl return an array of size n and have each element be a 1. How do I write this in solidity?
I need something like uint256[] a = makeOnesArray(5) => [1, 1, 1, 1, 1]
Answer: There are fixed size and dynamic array types to choose from. The former are immediately laid out with the requested elements initialized to binary zero values and they have no length property. The elements can be written to within the range of 0 to length-1.
The latter are initialized with zero length and a have a length property. You can append with the .push() method and you must do that to extend the length. You cannot write past the end (length-1) so a write is not possible when the length is 0 - the initial state.
The idea of initializing all elements to 1 is inefficient. The problems will become more pronounced at scale (more rows). You can consider an offset or similar strategy to store zero as much as possible (it is a default, so there are efficiencies there), and a function to translate so you get the effect of initializing everything to 1. The more elements involved, the greater the efficiency improvement.
Using 5 elements (the divergence will increase with the number of elements):

Fixed size array, naively writing 1 to each element: 247K gas
Dynamic array, appending 1 five times: 273K gas
Fixed size using an offset to represent 1: 194K gas
Variable size using an offset to represent 1: 236K

In summary, use fixed when possible and devise a way to minimize writes if possible. Be aware there are different syntax and properties when switching between fixed size and dynamic arrays. If it helps remember what's going on, a fixed array has the length compiled in the bytecode, whereas a dynamic array has a uint256 value stored and it is updated every time an element is pushed or popped, i.e. array.push(1) is two writes (SSTORE) - one to increase the length and one to write the new element.
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

// If the size is known and fixed, elements are writable and there is no length property

contract FixedSize {

    uint256[5] public elements;

    constructor() {         // 246846 gas to deploy
        elements[0] = 1;
        elements[1] = 1;
        elements[2] = 1;
        elements[3] = 1;
        elements[4] = 1;
    }

    function length() public pure returns(uint256) {
        return 5;
    }
}

// If the size is variable, use push() and the length property of the array

contract VariableSize {

    uint256[] public elements;

    constructor() {         // 273420 gas to deploy
        elements.push(1);
        elements.push(1);
        elements.push(1);
        elements.push(1);
        elements.push(1);
    }

    function length() public view returns(uint256) {
        return elements.length;
    }
}

// writing data is expensive. Consider ways to minimize initialization, such as an offset from the default zero value.
// this gives you the "effect" of initializing all five elements to 1 without the expense of 5x write to storage.

contract FixedOffsetValue {

    uint256 private constant offset = 1;
    uint256[5] private element;

    // no constructor because there is nothing to do: 193921 gas

    function elements(uint256 row) public view returns(uint256) {
        return element[row] + offset;
    }

    function length() public pure returns(uint256) {
        return 5;
    }

}

// Combine offset with variable length. Writing zero is cheaper than writing one because it only incriments the array length and doesn't
// need to write a value (it's already zero).

contract VariableOffsetValue {

    uint256 private constant offset = 1;
    uint256[] private element;

    constructor() {         // 235899 gas to deploy
        element.push(0);
        element.push(0);
        element.push(0);
        element.push(0);
        element.push(0);
    }

    function elements(uint256 row) public view returns(uint256) {
        return element[row] + offset;
    }

    function length() public view returns(uint256) {
        return element.length;
    }

}

Hope it helps.
Comment: Whats the best way to go about this for my example. I need an array of 1s to pass into a safeBatchTransfer function (takes uint256[] ids and uint256[] amounts (all 1s since each token is non fungible but still an 1155)). Right now i have a function that takes an int N and returns an array of size N with 1 for each element to use for the transfer function. It will look a lot more confusing for the user but would it be better to get the caller to supply the 1s array as a parameter for my function ? Instead of using a helper function to make it?
Comment: In this case, batchTransfer does indeed have a max N. It doesn't render the contract unusable since a large batch can be split into smaller batches. Take care not to introduce a problem in your implementation.
Comment: I would do it the idiomatic way but as mentioned, you might need to accommodate multiple batches if N is too large.

return array of size n


File size limit for a document in SharePoint is actual file size or file size on disk

Question: The file size upload limit for a document is 50mb by default but is it file size of the document or file size of document on disk.
Comment: Can you elaborate on why this information is relevent? Why not just bump the allotment to a larger size plus a healthy margin for error? Does your SQL store have modified clustering?
Comment: The difference is minuscule, but it is based on the file size not file size on the disk.
Answer: After comparing disk space, to site collection (Adding removing a site collection) The quota is based on the actual file sizes.
To get the site collection totals:
<code>$site = Get-SPSite http://sitecollection
$site.Usage.Storage;
$site.Dispose();
</code>
Answer: There's isn't any big difference at all as said by Hossein Aarabi but limit is for file size not file size on disk as far as I find out by research however couldn't find any reference.


What is the significance of a heat flux value of 1135 W/m^2 when jettisoning the payload fairing?

Question: I have seen that many rockets jettison their payload fairing at an altitude where the aerothermal heatflux is leass than or equal to 1135 W/m^2. What is the reason behind considering this particular number. Anymore information on this will be appreciated.
Comment: `1135 W/m^2` is `360 BTU/(ft^2hr)` or `0.1 BTU/(ft^2s)`
Comment: The other question asked what are the pressure and heat conditions at 110 km, which they had noticed was sort of the mean altitude of several payload fairing jettisons that were looking at the data for. This question is asking why the specific value of 1135 W/m^2 is a common limit for payload fairing jettison, which is a separate question.
Answer: It appears that the original value was 0.1 BTU/ft2-sec, which you can see listed in some documents, for example this is from a Boeing information sheet for a Delta II launch in September 2007:

This value can also be seen on page 23 of an SLS Mission Planners Guide from 2014:

0.1 BTU/ft2-sec converted to W/m2 is 1135.65. In another section of the Delta II document they list both units:

In theory the original calculated value could have been 1135 W/m2 and this was later converted to BTU/ft2-sec. But since 1135 W/m2 converted to BTU/ft2-sec is 0.0998 this would be quite coincidental. Also since the value seems to go back to the early days of satellite launches, the U.S. unit might be more likely as the original (obviously BTU itself originated as a British unit).
0.1 is presumably a rounded number which was based on test or calculation results that fell within a certain range, and the rounded value eventually became the standard. Perhaps comparable to the selection of 100 km as the limit for space, or NASA's designation of 400,000 feet for entry interface, both of which are based on empirical data but are also rounded standards.
Describing the Karman line as 62 miles can give an impression of preciseness that isn't actually there. The same with entry interface as 122 km, and perhaps heat flux as 1135 W/m2.
How the 0.1 value was originally arrived at might be harder to determine since it seems to have been in use as a standard for several decades. But it is apparently a pretty conservative value since it (and the 1135 equivalent) is so commonly used and considered a safe amount of heat flux for satellites.
Comment: @asdfex - that seems possible, 1367 w/m2 is 0.12 Btu/ft2-sec, which in theory they might have rounded down to 0.1 and that became the standard, i.e. getting less heat than standing in the sun at noon. The standard then later converted to SI at 1135.65 which was rounded down to 1135.
Comment: In reality it's even closer: 1367 is the value in space minus 20% losses due to a very clear atmosphere with the Sun directly overhead is very reasonable.
Comment: Interesting. I always assumed the number comes from the solar constant at the equator... I.e. "not getting more heat than standing in the sun at noon"
Comment: Using the January maximum of 1412 w/m2 that would be 0.124 Btu/ft2-sec. 80% of that is 0.0994 Btu/ft2-sec. So if no more than that reaches the surface then it would be less than the maximum possible at sea level on the equator at any time during the year.
Comment: Sidenote, but "BTU/ft2-sec" makes my metric heart hurt.