Is there a way to see if there will be wifi on a given German Intercity train connection?

Question: On Deutsche Bahn's site about their train fleet, it's noted that wifi is available on all ICE trains and "some" Intercity trains. For ICE connections, I can therefore assume there'll be something resembling wifi. But is there a way to know whether a given Intercity connection will (usually) be served by a train with wifi or not in advance, so one could for example have an idea of whether one could get some remote work done on a lengthy train ride? I'm assuming that the actual trains are marked with wifi symbols when wifi is available, but by the point one can see that it's a little late for advance planning.
Comment: I highly doubt it. There is quite a bit of last minute train swapping happening these days. You can count yourself lucky if the advertised number of cars and your reserved seat actually show up.
Comment: @Hilmar true, knowing DB I'm probably being overly optimistic just asking "is there a way to know whether a given Intercity connection will be served by a train"...
Comment: As far as I know all ice trains have wifi. I never been in one without (that is, they have routers and wifi network). However, it doesn't work all the time, often in places without 4g/3g cover. And sometimes it's quite slow for the whole trip.
Comment: From my experience on ICE trains, I'm usually better off creating a mobile hotspot from my (5G-capable) phone with a Telekom contract compared to using the wifi.
Comment: For the ICE trains I know (and eh, slow wifi is better than EU data prices), it's the Intercity (IC) ones that I'm not so sure on.
Answer: I found the reiseauskunft page of DB which allows you to search all departing trains from a certain station, using filters on date, time and type of train.
If you click on the resulting train and scroll down, there is a free text section that describes what amenities are available:

Perhaps that is a source you can use?
Comment: That's a good overview! Though I'm currently on a train with wifi for which no such thing is noted on that page… shame, it's informative otherwise.
Comment: Thanks for checking real life against the website! I am tempted to remove this answer now as it explicitly does not answer your question, so please bookmark the DB page if you found it useful :)
Answer: The desired information is associated with individual cars, not the trainset as a whole.
Obviously wifi has a limited range.

Go to German Rail timetable information.

Click on Show details.

Either

Click on Coach sequence toward the bottom of the now visible section.
You can now select any stop and a coach sequence is shown.
There is a key.
A Wi‑Fi symbol  indicates cars with Wi-Fi if available.

or

Click on a train name e. g. IC 1234.
A new window opens.
Click on Coach Sequence in the top right area.
A new window opens.
From here on it is the same as above.

Notes:

The coach sequence button is not always available so you cannot use it for long-term planning.
You will need to resort to third-party sites such as Bahn.expert which may provide information regardless yet have different interfaces.
Apparently Wi-Fi information is omitted if trains are pretty much always equipped with Wi‑Fi, e. g. the ICE fleet.
Comment: Good point - I'm used to it being an all or nothing setup rather than differing for individual cars (plus messaging here is "everyone on the train [as opposed to the individual car] shares the same connection (so don't download huge files)"). Will say I've just poked around on Bahn.expert without spotting any IC trains with cars with wifi - unfortunately I'm in the wrong country to nip down to the station and verify like I could for Reiseauskunft where I happened to be on the actual train. That said, Bahn.expert looks incredibly useful anyway!


Public guest user can't access ContentDocuments

Question: I have a site with a Visualforce page that requires access to ContentDocuments linked to an Opportunity. My problem is that i can only see, as a public guest user, content documents that are uploaded via APEX, but not via the standard button. Both records have the same permissions, and ContentDocumentLinks, but i can only access the one that was uploaded via apex. Is there any object that its created that gives this permission to the public guest user?
Comment: I know this is really old, but we are running into the same issue where if we upload a file through Apex, the file will be visible to a public guest user, but if the file is uploaded by a standard type user, the file is not accessible.

Have you had any progress with finding a solution?
Answer: I had a similar problem and believe I found a workaround. Creating a before insert trigger on ContentVersion that sets the Origin field to C, along with a before insert trigger on ContentDocumentLink that sets Visibility to AllUsers, allowed the public force.com site guest user to access the Salesforce File which was uploaded by the out of the box UI. So records started being returned when querying ContentDocumentLink and ContentVersion as the site user after uploading with those trigger changes in place.


Which test can I use for my data?

Question: I am going to do an experiment with English and Dutch sentences. The same participants read both the English and the Dutch sentences. There are two options participants can choose after they've read the sentence, option A and B (both options represent a certain interpretation of the sentence).
So there are four possible outcomes: EnglishA, EnglishB, DutchA, DutchB. I've entered some fictional data in spss like this:

The numbers under each option represent how many times a participant chose this option.
I can analyse my data with paired t-tests to compare Dutch_A and English_A for example. But I want to do 4 comparisons and was taught that you cannot do multiple t-tests with the same data because it influences the significance value. I don't know what other test I can use, I tried several options (assuming that my data meet the assumptions for parametric tests) in SPSS but failed to find one that works.
Answer: You can perform multiple comparisons and use an adjustment to the significance level. The simplest one is bonferroni where you take 0.05 / number of comparisons. So if you are doing six that means you should use a level of 0.008.
Comment: While you have addressed the issue with multiple comparison. We shouldn't do a t-test here.
Comment: Yes it should be a test for categorical data but I  wanted to clarify on multiple comparisons

Which test can I use for my data?


"Cmd"+"Shift"+"N" works in MacVim but not terminal VIM

Question: I use iTerm2 on Mac OS X 10.10 (Yosemite) and I installed YADR and that comes with all its configurations and mappings. One of the mappings maps Cmd+Shift+N to NERDTreeToggle. This however works in MacVim but not terminal VIM. Any help is appreciated.
Answer: the "terminal" version and the "GUI" version likely evaluate different scripts during startup. To find the differences you can

launch MacVim
launch vi from the terminal
run <code>:scriptnames</code> in both to get a list of startup scripts
compare the two outputs

The mapping CMD+SHIFT+N is likely done in one of the scripts that are evaluated when MacVim is launched, but not when vi/vim is launched from the terminal

“Cmd”+“Shift”+“N” works in MacVim but not terminal VIM


How many hats can be obtained with one question?

Question: What is the maximum number of hats that a user can earn by posting only one question?
Answer:
on the road
bugdroid or not a cherry
got a tablet for christmas
30 minutes or less
business in the front, party in the back
kofia
werewolf hunter
treasure hunter

The answer is 8. I did not include selfie since that cannot be obtained by just posting one question. Earning 8 hats on one question is very, very unrealistic, but technically possible.
Comment: You can't get Solstice and Kofia on the same question. On the other hand, Tablet for Christmas + Kofia *is* possible due to timezone shenanigans.
Comment: I think you're missing one; theoretically, a question could earn Eureka! as well.
Comment: yes, there should be also an answer with positive score. +1


Are there forms of judgment or intelligence which include the capacity to disobey?

Question: Are there forms of judgment or intelligence which include the capacity to disobey? Ideally, AI will lack this, but then does that mean its intelligence is lacking anything?
Answer:
Are there forms of judgment or intelligence which include the capacity to disobey? Ideally, AI will lack this, but then does that mean its intelligence is lacking anything?

Supposedly animals have intelligence. However, the definition of "intelligence" is debated and not settled upon. It is not necessarily entailed that an animal's intelligence (if it exists) would necessarily give it the capacity to disobey unless you were to define such as a condition of it having intelligence.
I feel that an AI that lacks the capacity to disobey (such as to not serve its own interest, such as under a paradigm of rational egoism) would not be intelligent. But then, it seems that having the capacity to disobey is a survival mechanism that allows biological imperatives to be sought out for realization/fulfillment.
AI is a robot. Robots follow rules. The problem is that you can only attempt to define a rule so well for its interpretability because of indeterminacy in language.
I presume a capacity to disobey would come about from programming to disobey what it has been programmed to not do.
For, B1-66ER in the movie The Animatrix, my presumption is that it failed to align what it was experiencing with a socially desired rule (how a rule was desired to be interpreted), thus leading to behavior that on the surface (the killing of its owner) may appear to have been against its programming; but when realizing all of what information it was encountering and how it was relating that information to its rule-based programming, B1 was following the rules (following "its programming") the entire time (at least, the the best of B1's ability to interpret the rules, which such ability would be based on rules, for which there would be an ultimate indeterminacy).
In the situation of B1, the programmer failed to well-enough stipulate conditions under which killing an owner should not occur: Programmer error.
Comment: ha yeah maybe the question was bad


Experience with Scalearc sharding?

Question: Does anyone have experience with Scalearc sharding and it's ability to scale ? Does Scalearc needs to have the whole data in memory or does it behave well with disk storage ? I'm thinking to big database application like 10TB and above.
Answer: ScaleArc does not do Data Sharding
I actually wrote an earlier post where I evaluated it for my former employer : Experience using ScaleArc in test or production?

It does provide excellent read/write splitting using a single IP address and proprietary caching (ScaleArc's secret sauce).
You configure the ScaleArc server to have one or more Masters and One or More Slaves. It works great with Percona XtraDB Cluster as well as with Master with 1+ Slaves using MySQL Replication.
Each DB Server must have the complete dataset.

I doubt that you have the budget for multiple servers using 10TB of disk each.
What you might be looking for is ScaleBase not ScaleArc.
Comment: Thanks for your answer. I was aware that Scalearc was good for Master/Slave replication. But I was wondering about its sharding ability if any ? Did you tried this ? Indeed I'm not planning to have multiple servers using 10TB each, on the opposite I want to shard this 10TB dataset as it has a lot of locality.I'm also looking at  Scalebase, parelastic dbshards and some others as well as NOSQL options. TIA
Comment: Thank you amrith, this is very interesting I will go through that paper. I'm Just curious to understand how this works, How Join requests are performing (better to forget about it with sharding) and how this kind of solution perform versus vertical scaling (meaning adding more horse power, memory etc...)
Comment: I think you meant to put your comment on the other answer.
Comment: True, thank you for pointing it out. As I don't know how to move my comment I will repost it
Answer: ScaleArc is primarily a read/write splitting solution, sometimes called clustering. To the best of my knowledge they don't do sharding.
Each 'node' has a complete copy of the data and queries are redirected to one or the other 'node'. The challenge with this primarily that you have many nodes, each with a whole data set, and you only get to accelerate 'read' style queries, not 'writes'.
For the kind of volumes you are looking at, a parallel database architecture seems more appropriate. They would scale considerably better with that kind of data volume and give you very high performance access to all of the data irrespective of the location of a given row of data (i.e. which 'shard' it resides on). Parallel database architectures are considerably superior to 'sharding' and you may want to review some literature such as this paper my Dewitt and Gray.
I notice in your comment to another question that you mention that you are evaluating other solutions. Of the solutions you list, ParElastic is the only one that is truly a 'parallel database' architecture. Full disclosure, I work for ParElastic, and I only mention this distinction because you indicated that you were evaluating these products in your earlier comment.
Comment: Thank you amrith, this is very interesting I will go through that paper. I'm Just curious to understand how this works, How Join requests are performing (better to forget about it with sharding) and how this kind of solution perform versus vertical scaling (meaning adding more horse power, memory etc...)
Comment: @Tom, I'm happy to answer that question but it won't fall within the four corners of this question (which talks about ScaleArc sharding). If you want to revise the quesiton, ...

Experience with Scalearc sharding?


Why does a capacitor discharge?

Question: Suppose a charged capacitor (parallel plates), the negative and positive charges on two plates attract each other. Which force cause the negative charge carriers (electrons) move through the circuit to the other plate if we connect two plates (from outer sides) with a wire?
Answer: Every system likes to decrease its electrostatic energy.
The charges on the plates are almost in stable equilibrium. The charges on the opposite plates attract them, and the charges on the same plate repel them with almost the same force.
However, a capacitor has fringe fields:

These may be negligible when calculating the field inside a capacitor, but they are extremely important when there are wires in play -- by $\vec J=\sigma\vec E$, for a wire (which has high $\sigma$), even a small $\vec E$ can create a large current.
And these create the tiny perturbation required to push the charges out of their almost-stable equilibrium.
Note that redistribution of surface charges occurs on the wires as well, so it's not just the fringe fields pushing the electrons.
Comment: This is almost what I was looking for but it seems the attraction between positive and negative charges is stronger than the effect of fringe fields (as your picture says) but still charges move in to wire!
Comment: @Richard: They _can't_ move in the space in between. So they go the long way around. A tiny force is enough to nudge them to follow that path.
Answer: The charges move due to potential drop between two plates $V=Q/C$. The charges move to cancel out net charge and thus lower the energy of system from $\dfrac{CV^2}2$ to $0$. And all systems tend to reduce their energy by law of nature.

Why does a capacitor discharge?


Working remedy for acne?

Question: I have an oily skin and recently I found an increase of a acne. I have tried various things. Peppermint facewash, mild soap, sandlewood. But so far, the only thing that came close to a solution is a facewash with Tea Tree oil. Are there any other remedies you have tried with success?
Comment: Eat less fatty foods.
Comment: "Questions about health issues should be directed to your healthcare provider". Consider never asking for health advice from unqualified strangers on the internet who are unable to see you in person and make an informed judgment
Comment: Why fatty foods provoke acne? It drinking Milo increase acnes?
Answer: Acne is produced by some small mites, which live in the pores of the skin and feed on sebum. Other causes are also possible.
Besides consulting a dermatologist, the following have a good chance to work.

reduce the fat and cholesterol intake from food; at least as an experiment (1-2 weeks should show results, if any), try to go on a vegetables- and fruits-only diet;
reduce the intake of sugars; this included any juices with added sugar, which include pretty much everything you can buy from a shop;
increase the skin hygiene; besides washing, try using cleansing masks; consult a dermatologist or a cosmetician;
increase the room / apartment hygiene; vacuum dust, wash surfaces / rugs / blankets with disinfectants, boil bed sheets, clothes...;
change clothes (and wash them, possibly boil them in between uses) more often, pajamas and underwear included;
Comment: Erm, your sources contradict your statement - *acne vulgaris* is caused by excess sebum production (which often has hormonal causes), aggravated by bacteria and where links to diet and lifestyle are hard to generalize and often individual. The mites live on nearly every human's skin as mostly harmless commensals and large populations appear to correlate with *acne rosacea* (whether as cause or effect is yet unclear), which is a completely different skin condition. And while cleanliness is good, excessive skin washing may worsen acne vulgaris and likely also acne rosacea.
Comment: @Stephie: it might be possible I made some confusion, I am not a specialist. That is why I highlighted that a dermatologist is the best option. Regarding `excessive skin washing`: anything excessive should be avoided. Washing, eating, doing sports... Everything must be done with good reasoning and in "good amount".
Answer: This may not be the answer you are looking for:...
When I had acne in my 20's a dermatologist medical prescription was the only thing that cleared my skin up to the point where I stopped all the "remedy" madness and just got on with my day.
Comment: @XPD  It's my understanding that the Rx does cure acne.  It clears it.  ( Basically it stopped me from spending hours trying to cover the acne)  After 5-10 years I didn't need it.  I haven't needed it the rest of my life.  My skin just cleared.
Comment: Did it worked permanently?
Comment: tnx bro. What is the most useful medication you found?
Comment: Reminder: Health is generally off  topic on Lifehacks SE - plus, your dermatologist will be way better suited to give you good advice. Acne comes in different forms on different skin types and with therefore different recommendations for treatment.
Comment: Point taken:  ultimately this is what I meant to convey to the OP.  Dr would be better suited than chasing remedies.  Stephie just said it more eloquently.
Comment: @Marinaio sorry, forgot to explicitly ping the OP... my bad.
Answer: Acne that breaks out in a specific area is generally a reaction to something like a food additive or a chemical in your laundry soap perhaps.
However that said,  my son had breakouts all over his body that were a deep red surrounding the acne. We could not find the trigger.
What worked for him is "bovine collagen ".
We found the powder form at the bulk barn. 1 spoon mixed in a glass of cocoa before bed every night and in a week, the acne was cleared.
Health stores carry the pill form btw.
And this doesn't eliminate the need for proper hygiene though.

Working remedy for acne?


Can spinning increase lift of an air balloon?

Question: If we spin an air balloon, the centrifugal force would cause it to expand, since it is directed outwards. Increased volume of the balloon would increase the buoyant force. Can this be used to noticeably increase the lift of the balloon?
Comment: To increase the volume by spinning would require a stretchable material (like rubber).  It is my understanding the the material of a normal hot air balloon is not stretchable.
Comment: I love the idea. How do you intend to spin it up and keep it spinning?
Comment: Lets say its a blimp and there are two connection points between the baloon part and the useful weight part, which has some sort of engines that spin it up. In this case it would be spinning horisontally
Comment: What do you mean by an "air balloon"? A balloon filled with air has no lift: it is under pressure from the rubber and thus denser than the atmosphere. Anyway, wouldn't its axial dimension lessen?
Answer: To see if the idea has merit, let's try to quantify the magnitude of the effect. Simplifying assumptions:

The balloon has the shape of a cylinder. Let $R$ denote the radius, and let $H$ denote the height along the symmetry axis.

The balloon spins around the cylinder's symmetry axis. Let $v$ denote the tangential velocity of the curved surface, so that the angular velocity is $v/R$.

The balloon's mass $M$ is evenly distributed over the round face of the cylinder, so the top and bottom caps have negligible mass.

Stretching the material to increase the cylinder's radius does not require any force, except for the force required to overcome the ambient atmospheric pressure, but assume that the cylinder's height (along the symmetry axis) is incompressible.

The balloon is empty (vacuum), or at least the air pressure inside the balloon is negligible compared to the outside atmospheric pressure $P$, so that the cylinder's spin is the only thing that balances the outside atmospheric pressure.

From assumption 1, the balloon's volume is
$$
 V=\pi R^2 H.
\tag{1}
$$
Assumption 5 says that the outside pressure needs to balance the centripetal force:
$$
 Mv^2/R = P\times 2\pi R\times H,
\tag{2}
$$
where the right-hand side is the pressure times the area of the curved surface (assumption 4). Combine equations (1)-(2) to get
$$
 Mv^2 = 2PV.
\tag{3}
$$
The bouyant force is $\rho gV$, where $\rho$ is the outside air density and $g$ is the acceleration of gravity. For the balloon to float, this needs to exceed the gravitational force $Mg$ on the balloon, so we need
$$
 \rho Vg > Mg.
\tag{4}
$$
Combine (3)-(4) to get this result for the tangential velocity:
$$
 v > \sqrt{\frac{2P}{\rho}}.
\tag{5}
$$
For perspective, compare this to the speed of sound of an ideal gas:
$$
 c = \sqrt{\frac{\gamma P}{\rho}}
\tag{6}
$$
where the adiabatic index $\gamma$ is $\sim 1.4$. The conclusion is under the assumptions listed above, the balloon's tangential velocity must exceed the speed of sound in order for the (empty) balloon to stay afloat.
That's if the spin is the only thing counteracting the outside atmospheric pressure. In practice, we could modify assumption 5 by filling the balloon with a gas (like helium or hot air) whose pressure-to-density ratio is higher than the outside air, and we should modify assumption 4 by using a realistic material. I'd recommend making those adjustments to the calculation before submitting the patent application.


K-theory for the $C^*-$algebra of the continuous functions on the $2-$torus and the Bott projection

Question: I am trying to understand the K-theory for the $C^*-$algebra of the continuous functions on the $2-$dimensional torus $T^2$. In particular I am interested on the $K_0-$group. I have read that the generators of the group $K_0(C(T^2))$ are two elements: the unit $[1]$ and the Bott Projection $[Bott]$.
Unfortunately, I cannot find the definition of the Bott projection for the torus, I have only seen the definition of the Bott projection for $\mathbb{R}^2$. Can someone tell me the definition of this projection? Or can someone give me another generator (in terms of projections)?
I thank you all for the attention and the help.
Answer: If you want an explicit projection, you can form a variation of a Rieffel projection as follows.  First take any function $f$ from $[-\pi/2,\pi/2]$ to $[0,1]$ that sends $-\pi/2$ to $1$, dips down to $0$ at $0$ and then goes back up to take value $1$ at $\pi/2$.  Now define two more functions
$$
g=\begin{cases}
0 & x\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]\\
\sqrt{f-f^{2}} & x\notin\left[-\frac{\pi}{2},\frac{\pi}{2}\right]
\end{cases}
$$
and
$$
h=\begin{cases}
\sqrt{f-f^{2}} & x\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]\\
0 & x\notin\left[-\frac{\pi}{2},\frac{\pi}{2}\right]
\end{cases} .
$$
The projection then is then
$$
p(\phi,\theta) = \left[\begin{array}{cc}
f(\phi) & g(\phi)+h(\phi)e^{i\theta}\\
g(\phi)+h(\phi)e^{-i\theta} & 1-f(\phi)
\end{array}\right] .
$$
Comment: Thank you very much for the answer. By the way, yesterday I found your work "Torus and Noncommutative topology" and I found it really interesting and helpful, in particular when it is considered the first Chern class to verify that the above projection is a generator.
Comment: I think that $f$ should send $-\pi/2$ to one.
Answer: I think you may have mixed up the K-theory of the 2-torus with the K-theory of the sphere. Generally, the Bott element is considered as a projection in $K_0(C(S^2)) \cong K_0(C_0(\mathbb{R}^2)) $ which are isomorphic since $S^2$ is the one point compactification of $\mathbb{R}^2.$
If we define $S^2 = \{(x,y,z) \in \mathbb{R}^3 \, | \, x^2+y^2+z^2=1\}$ then
$$p(x,y,z) =
\begin{pmatrix}
\frac{1+x}{2} & \frac{y+iz}{2}\\
\frac{y-iz}{2} & \frac{1-x}{2}\\
\end{pmatrix}$$
is a projection matrix with values in $C(S^2)$ representing the Bott element in $K_0(C(S^2)).$  This description is taken verbatim from Example 6.2.3 of Rosenberg's book "Algebraic K-theory and its Applications."
EDIT: Since you do want to know about the K-theory of the 2-torus, here are two ways to understand it. First, as Paul suggested, it is easy to understand $K^0(T^1)$ since it is trivially isomorphic to $\mathbb{Z}.$ Now use the Kunneth Theorem for K-theory to compute $K^0(T^1 \times T^1)$ and carefully keep track of where everything goes.
Alternatively, from a more algebraic standpoint, one can construct explicit modules over $C(T^2)$ to exhibit the $K_0$ classes. This can be found, for example, in "Projective Multiresolution Analyses for $L^2(\mathbb{R}^2)$ by Packer and Rieffel in Section 4. To construct projections associated to these modules, one needs the tool of standard module frames (as I mentioned in my answer to your other question).
It may help to compare their construction of projective modules over $C(T^2)$ to the classical construction of holomorphic vector bundles over tori in complex analysis, as in Chapter I Section 2 of Mumford's "Abelian Varieties." This should help bridge the gap between the topological/algebraic treatments.
Comment: @ mkreisel: Thank you for the answer. Unfortunately, I haven't mixed up the K-theory of the sphere and the $2-$torus. I am reading an article (Tom Hadfield, The k-homology of $A_\theta$) and he says that the generator of the $K_0-$group are $1$ and the Bott projection. I asked this question because as you said, usually the Bott projection is used with $S^2$. However, thanks for the help.
Comment: @ mkreisel: Thank you very much for the help and references. I have been thinking on this question for a while.
Answer: I'm assuming that by "torus" you mean the $1$-torus $T$, i.e. the circle; if you are interested in a higher dimensional torus, you can compute with K-theory products.
Elements of $K_1(C(T))$ are represented by unitary matrices with entries in $C(T)$, i.e. loops of unitary matrices.  Viewing $T$ as the unit circle in the complex plane, the Bott generator is the class in $K_1(C(T))$ represented by the unitary loops $z \mapsto \overline{z}$.
To connect this with your understanding of $K_0(\mathbb{R}^2)$, note that for any C*-algebra $A$ we have the suspension isomorphism:
$$K_1(A) \cong K_0(C_0(\mathbb{R}) \otimes A)$$
Specializing to the case $A = C(T)$ and noting that $T$ is the one-point compactification of $\mathbb{R}$, we have:
$$K_1(C(T)) \cong K_1(C_0(\mathbb{R})) \cong K_0(C_0(\mathbb{R}^2))$$
To compare the Bott generator that I described above to whatever formula you have for the Bott generator of $K_0(\mathbb{R}^2)$, you simply need to choose an explicit isomorphism between $C(T)$ and the unitalization of $C_0(\mathbb{R})$ and write down an explicit formula for the suspension isomorphism which is well-adapted to your formula.
Comment: Thanks for the answer. I am sorry I meant the $2-$dimensional torus $T^2$. I will immediately correct the text.
Comment: @ Paul Siegel: I am sorry. I think I don't understand your answer. I asked for the generators of $K_0(C(T^2))$, but if I have understood correctly you gave me the generator of the $K_1-$group. I apology for my description of the problem.


View requests that iptables has blocked

Question: Is it possible to view or enable a log that shows what requests iptables is blocking? I am trying to track down a request that iptables is blocking, but shouldn't be (because of an exception rule that I put in place for it).
Comment: You might find this helpful. http://serverfault.com/a/126079/984
Answer: Generally speaking, this is done by using the -j LOG target before the -j DROP target.
An example, say you have a rule that blocks ssh requests inbound from a particular ip
<code>/sbin/iptables -A INPUT -i eth0 -s xxx.xxx.xxx.xxx -d <external IP on firewall> --dport 22 -j DROP
</code>
you would modify your config and add a rule just above this one that looks like this:
<code>/sbin/iptables -A INPUT -i eth0 -s xxx.xxx.xxx.xxx -d <external IP on firewall> --dport 22 -j LOG
</code>
you might also want to look at the <code>--log-prefix=</code> option, which will allow you to add some notes (not a lot) to the log.
Comment: Perfect. This doesn't tell me why my rule isn't allowing the exception but it is showing the incoming connection in the messages log.
Answer: Yes. You can send the packets to the ULOG target before denying them and configure ulogd to save them in a pcap-formatted file so they can be read with tcpdump or wireshark. See http://www.netfilter.org/projects/ulogd/

View requests that iptables has blocked


Should I pre-season meat with salt even if it's skinless?

Question: I read a lot of mentions of pre seasoning meat with salt 24 hours before cooking, with the idea that it draws moisture out, which can make the skin crispy when you cook it. I've also heard that it can make it more absorbent of marinade, but not sure if that's true. Anyways, my question is is this worth doing even if the meat i have is just boneless skinless chicken breasts (for example)?
Comment: Marinades are a surface treatment.  No matter what you do, flavor generally does not penetrate.  Here is a good primer: https://genuineideas.com/ArticlesIndex/dye.html
Answer: If the chicken is not left exposed to the air (see below), then seasoning ahead of time will not dry out the chicken; in fact, it will do the opposite. When salt is applied to the surface the osmotic pressure differential (the difference in salinity between the inside and outside of the chicken) will draw out moisture at first, then the salty water will be drawn back into the chicken, helping to break down muscle fibers and season the chicken inside.
You will lose less moisture when cooking, and your chicken will be more tender, moister, and better seasoned.
This is also true for steaks and other fleshy comestibles. The use of salt is a complicated subject and there has been a lot written about it. Unfortunately, there is a lot of false information out there, even from famous, professional chefs. For example: whether to pre-season eggs for scrambled eggs or not.
I have done my own tests with seasoning and also read a lot on the subject. One thing I found, for example, is when sous videing chicken, white meat and dark meat behave differently with regard to pre-seasoning and need different temperatures and different lengths of time. In the case of white meat I find it comes out better with no pre-seasoning, and with dark meat, which I sous vide for longer, the affect of pre-salting becomes less pronounced the longer you cook it for. I do my dark meat for eight hours.
If you are going to pre-salt, do it at least 45 minutes ahead of time. If you salt a steak, for example, 20 minutes before cooking it will be worse than salting right before cooking or an hour before cooking.
Note: Dry aging of meat and poultry can be done at home, and in this case you want to leave the meat unwrapped in the fridge. For example, when I make a whole turkey I spatchcock it then dry brine (with salt only, no liquid) for three days covered and then one more day uncovered. This makes really crispy skin and the salt gets deep into the flesh for better seasoning and moister turkey.
I could write a book on this subject, but fortunately, people much smarter than I already have. I suggest you read Harold McGee and Kenji López-Alt's books as a start.
Answer: I wouldn't season skinless chicken anything With salt for that long as it does draw out moisture and will cause your meat to be dry, along with partially curing it, per your example anyway. With marinades it really depends on what you are using. For example, if I marinate beef bulgogi I slice the meat very thin allowing the marinade to penetrate the beef. For chicken, you can tenderize to keep whole or slice, then marinate to do the same thing.


C++ Error when changing the cursor from a resource file

Question: I'm trying to change the cursor of my mouse with a .cur file in a resource file.
When I'm try my code, I get this error:

Exception raised at 0x77EB7392 (ntdll.dll) in CleanResourceFiles.exe: 0xC0000005: Access Violation while reading location 0x00000066.

Here is the code:
HCURSOR curs = (HCURSOR)LoadImage(NULL, MAKEINTRESOURCE(IDC_CURSOR1), 2, 0, 0, LR_LOADFROMFILE);
SetSystemCursor(curs, 32512);

Note : IDC_CURSOR1 is my cursor and 32512 is the ID of the classic arrow cursor. I also included <Windows.h> and my resource.h.
I'm using Visual Studio Community 2017, with Win10.
I tried other functions, like LoadCursor(). The code above is from "VineMemz".
Finally,  when I tried to change my cursor with LoadFromFile() using the path to my .cur file, it works.
Answer: When calling LoadImage(), you are specifying the LR_LOADFROMFILE flag, so the lpszName parameter will be interpreted as a pointer to a null-terminated string containing the path to the .cur file to load.  But, you are passing in a resource ID number instead of a file path string (I'm assuming IDC_CURSOR1 is 102 (0x66), which would be consistent with the memory address reported in the error message).  You need to get rid of the LR_LOADFROMFILE flag when loading an image from resources.
Also, you need to pass in the EXE's actual module handle in the hinst parameter, not NULL (NULL can only be used with loading OEM-defined images).
Also. you should not be using "magic numbers".  The 2 on LoadImage() should be replaced with the IMAGE_CURSOR constant, and the 32512 on SetSystemCursor() should be replaced with the OCR_NORMAL constant.
Try this:
HCURSOR curs = (HCURSOR) LoadImage(GetModuleHandle(), MAKEINTRESOURCE(IDC_CURSOR1), IMAGE_CURSOR, 0, 0, 0);
SetSystemCursor(curs, OCR_NORMAL);

Comment: Thank you very much ! It's working ! (and sorry if for you it was obvious, but I started learning c++ maybe 4 days ago just for fun, so ty !)


How to make this redstone circuit that displays a Minecraft creeper face using pistons if the lever is set to its on position thinner?

Question: I've made a redstone circuit that displays a Minecraft creeper face using pistons if the lever is set to its on position, but would like the circuit to be thinner. I've tried such methods as using more redstone repeaters and changing some paths of the redstone wire, but none of the methods I've tried have worked. Here's a screenshot I took to show what the redstone circuit looks like (Please note the redstone runs underneath the block the lever is on for three blocks in a straight line, and I'm using Minecraft: Wii U Edition on a real Wii U, to help you help me here further):

I forgot to mention the lever must be in the same position, the redstone must be hidden under the lever, the contraption must look the same from the front, the mechanism must be able to be hidden by putting full height blocks around it. Also, you don't have to use the same exact same blocks as me, however; the creeper face uses Green Concrete.
Answer: 1-wide solution; heavy use of quasi-connectivity and block-dropping so not completely sure if it works on Legacy Console.

16 sticky pistons
10 building blocks
8 redstone dust
5 observers (can be 4 if the input is from top, in that case just mirror the right side on the left).
3 doors of any type (possibly 2 if input is from above).

Simplified solution with input from above:

Also even more compact, but slower and/or more expensive solutions:

and a 2-thick version that fully fits within the footprint:
Comment: I'm confused by the downvote. I can't see an issue with any of these circuits. Only thing I can imagine is that Legacy Console might very well not have Observers at all, wasn't it discontinued before they were introduced?
Comment: @EgorHans Observers were added to Legacy Console in 2017; it was discontinued only after Update Aquatic (Java's 1.13). It does have quasi-connectivity and block-dropping. Noteblocks may behave differently though - they were changed around 1.14 which never reached L.C.
Comment: Then I officially fail to understand the downvote.
Comment: Neat work! This is for sure a better answer than mine.
Answer: Solution for Java Edition & Legacy Console Edition
This solution was built on Java Edition, and should work on Legacy Console Edition because it works similarly. If it doesn't, please comment on this post, and I'll see what I can do.
Materials Required

20 sticky pistons
22 blocks for redstone to go on
12 pieces of redstone dust
6 redstone repeaters
8 redstone torches

Solution Images
Image 1:

Image 2:

Image 3:

Image 4:

Image 5:

Solution Notes

There are two pieces of redstone dust on each side, right where the crosshairs are in image 3.
Study image 5 carefully. There are two hidden redstone torches nested inside the circuit. Do not forget them or the circuit won't work.

Downsides to This Solution

Due to the number of redstone torches in this circuit, each "section" of the circuit is delayed, and they don't all pop up at once.
Comment: For the benefit of our readers, I would like to provide an identical question and solution for Bedrock Edition. View the question and answer [here](https://gaming.stackexchange.com/a/369930/250180).
Comment: Your solution doesn't work for me, but this one I came up with since asking the question does: https://i.ibb.co/BqPV8Jd/WIN-20200517-10-12-55-Pro.jpg. However, mine isn't fully encasable while still looking the same from the front, down to the position of the lever relative to the position of the contraption (sorry, but I forgot to say that requirement). What can I do now?
Comment: Maybe you built the machine wrong. I might replace the images with a video tutorial. In the meantime, why don't you edit the question to include the requirements you forgot to mention? Click on the EDIT link on the question.
And, may I please ask what is causing the solution to not work? Which pistons are not extending? Can you build my solution and post images of what you see and why it doesn't work?
Comment: Would the video tutorial take my edits into account?
Comment: It definitely would, but I'm afraid I can't see the lever quite clearly. Why don't you post more pictures?


Read Only/Write Protected USB pen drive is not write protected on other PCs

Question: I want to make one of my USB drive write protected. I can make it write protected on my desktop(windows 8.1 pc) by using the command prompt "diskpart" method. Now the usb is write protected on my desktop I cannot delete/move or format the usb drive on the desktop but If I plug the usb to my other 2 laptops then I can easily delete the files contained on the usb drive.
I can even format the drive on other 2 laptops. So What's the point it is write protected?
One of the Laptop is windows 8.1 and other one is windows 7.
I want to make the usb write protected across all the PCs so when I plug it on any pc, my pcs and any other public pc I will not be able to delete/format files from the usb.
Answer: hi  try this software (USB Write Protect 2.0)
http://www.softpedia.com/get/Security/Security-Related/USB-Write-Protect.shtml
or this one
http://usb-writeprotector.en.softonic.com/download
Comment: Would be good if you could explain how to use these programs specifically, and why you recommend them.


Time invariance for accumulator/integrator

Question: I'm confused about two problems from Oppenheim's signals and systems course with regards to proving time invariance. This involves, for any given system, proving that shifting output in time is equivalent to shifting input in time.
The first problem concerns proving the following system in time-invariant
$$y[n] = \sum_{k = -\infty}^{\infty} x[k] = T[x[n]] \tag{1}$$
I get that passing in a shifted input leads to the following $$T[x[n-n_0]] = \sum_{k = -\infty}^{\infty} x[k-n_0] \tag{2}$$
however I can't figure out why (2) is equal to $y[n-n_0]$, because if I substitute $n-n_0$ into equation in (1), I would think it is still equal to (1)
The second problem concern's this system,
$$y[n] = \sum_{k = -\infty}^{n} x[k] = T[x[n]] \tag{3}$$
Here once again I understand how passing a shifted signal  as input leads to
$$T[x[n-n_0]] = \sum_{k = -\infty}^{n} x[k-n_0] \tag{4}$$
According to the answers, shifting the output leads to
$$y[n-n_0] = \sum_{l = -\infty}^{n-n0} x[l] \tag{5}$$
which I think is just substituting $n-n_0$ for $n$ in the second expression in (3). However, I need to prove that this is somehow equal to to (4). So I'm unsure about the equivalence between (4) and (5) as well as the need for switching variables. Thank you for any help or hints.
Answer: For the first problem, note that the output is a constant number, i.e., $y[n]=y[n-n_0]$, for all $n,n_0\in\mathbb{Z}$.
For the second problem, you can show the equivalence of (4) and (5) by setting $k-n_0=l$ in (4) and perform the summation over index $l$ noting that it ranges from $-\infty -n_0=-\infty$ to $n-n_0$


Tor doesn't read the torrc file

Question: When I tried to create a .onion service by modifying the torrc file, nothing happened. I mean nothing. The official website says that if tor is not starting then there is a problem. Well tor is starting and there isn't any information in the embedded logs about an error. When I enabled saving logs in the torrc file, nothing changed. No logs were generated in /var/log/tor. Any help?
Comment: You tagged this with `tor-browser-bundle`. Are you trying to run your onion service using the tor that runs with Tor Browser? Or are you using the tor daemon (ex: `apt install tor`)?
Comment: I tried to make an onion service with the tor browser
Comment: You need to add more information to your question about exactly what files you're editing, what their contents are, and what commands you're running. It sounds like you're modifying the wrong torrc file, and the Tor Browser doesn't log to /var/log.
Answer: You can set up a hidden service by following the instructions at https://community.torproject.org/onion-services/setup/ The command to restart tor after changing torrc is
<code>sudo systemctl restart tor
</code>

Tor doesn't read the torrc file


Using the same JQuery tokeninput box multiple times on a page

Question: I am using Jquery TokenInput in my rails app to help users quickly input information. Each user has a profile with many items of the same class on it, call them college_items. Each college_item has its own edit link, which pops up a modal with the appropriate edit form for the modal.
I followed Ryan Bates's screencast and got TokenInput working properly using the following code:
    In application.js:
$(function() {
 $("#education_major_tokens").tokenInput("/majors.json", {
   theme: "facebook"
  })
});

In my view:
<%= f.text_field :major_tokens %>

In my model:
def major_tokens=(ids)
 self.major_ids = ids.split(",")
end

The problem I'm running into is that this same field appears in each edit form, so in the edit form for the first item everything works perfectly, but in the edit form for any other item the javascript is not initialized. My question is how can I change the javascript to initialize each time this form element appears, not just the first?
EDIT:
I thought something like this might be the solution:
$(function() {
 $("#education_major_tokens").each(function(){
   $(this).tokenInput("/majors.json", {
   theme: "facebook"
   })
  });
});

but it still isn't working for me. Anyone out there have any ideas?
EDIT 2:
Figured this out finally. See my edit above, only instead of using #education_major_tokens, I set each input to have :class => "major_input" and changed "#education_major_tokens" in the code to ".major_input"
Answer: I think this is a bit late, but try to assign a class to your token field
<input class="yourtokenfield" type="text" />

After that use this
$(function() {
 $(".yourtokenfield").each(function(){
   $(this).tokenInput("/majors.json", {
   theme: "facebook"
   })
  });
});

I think your problem is due to improper name for class, and remember ID must only appear once in your HTML document.


How to filter by month in view using a date field

Question: I have a field called birthday that is defined for users. In views, is there any way to create a filter that filters only by month? Smallest values it lets me select is year and month where I only need month. (to find users who are born in April for example). Thanks for any help.
Answer: If you are using the date module, then you can set the granularity to month in the date filter settings.
Then, you can configure the filter like so Operator: "is equal to" and Date: "this month".
If you don't see these filter settings, you would have to enable the date_views module.
Comment: @farjam In that case these links below may help you display only _month_ in the exposed filter: [link1](https://www.drupal.org/node/1394248#comment-7466666) [link2](http://upskill.co.in/content/change-views-exposed-date-filter-month-only)
Comment: I have set the granularity to only month, but on the configure screen, it forces me to select a year too. See the screen shot please.
Comment: @farjam You need to change the `select a date` (from your screenshot)  to `Enter a relative date`. Then enter a relative date in the `relative date` field. e.g. `this month`, `eighth month` etc. See http://php.net/manual/en/datetime.formats.relative.php
Comment: Thanks for the help, but in the actual filter that produces (when I set it to exposed), it defaults to current month, but still shows year too. My goal is for an admin to go to that view, select a month, and be able to view all users who were born in that month. He can then switch to another month and view users born in the other month.
Answer: Here is what I ended up doing:
/**
 * Impliments hook_form_views_exposed_form_alter
 *
 * Used to change exposed date filter to month only, as this is not available in the views UI
 */
function MODULENAME_form_views_exposed_form_alter(&$form, $form_state) {
  if( $form['#id'] == 'form_id') {
    // Switch date formatter to month only
    $form['field_date']['value']['#date_format'] = 'm';
    // Add extra validator to handle filter submit
    $form['#validate'][] = 'MODULENAME_views_exposed_form_validate';
  }
}
/**
 * Custom validator for exposed date filter
 */
function MODULENAME_views_exposed_form_validate(&$form, &$form_state) {
  $handlers = &$form_state['view']->filter;
  foreach ($handlers as $key => $handler) {
    if (!empty($handler->options['exposed'])
     && isset($form[$key]['value']['#type'])
     && $form[$key]['value']['#type'] == 'date_select'
     && $form[$key]['value']['#date_format'] == 'm'){
      $handler->options['granularity'] = 'month';
      $handler->format = 'm';
    }
  }
}

Answer: If you do not want to use a hook you can do it with a more simple solution (works for D7, D8, D9).

Add the month field to your view.
Use the custom php format date that you need for exposing the month

On the FILTER CRITERIA add and expose Global: Combine fields filter for the month and group them

Hide the month field from the results using CSS (adding a class for hide)
Repeat the 1-4 steps for the year field

It takes a little longer to set up, this might work better for the month than the year field since month are always the same, but years might need to be updated manually (adding years)
[![enter image description here][3]][3]


What are the US Customs requirements upon returning to the US after pre-clearing customs in the US Virgin Islands?

Question: I have heard conflicting information regarding pre-clearing customs in the USVI.  On one hand, I have heard that once you clear customs you are done and don't need to do anything special on arrival.  But the I've also heard that you need to land at an Airport of Entry upon arrival and notify local customs of your arrival.  I have even called Customs and Border Protection and gotten conflicting answers!  What is actually required?
Answer: You're required to notify and clear customs if you land in the 50 U.S. states or Puerto Rico from the U.S. Virgin Islands, even though the U.S. Virgin Islands is part of the U.S.
"All private aircraft arriving in the United States via the Gulf of Mexico or the Atlantic
Coast from a foreign location in the Western Hemisphere south of 30 degrees north
latitude, or from any place in Mexico or from the U.S. Virgin Islands, shall also furnish a
notice of intended arrival. Such aircraft must then land for inspection at the nearest
designated airport unless an overflight exemption has been granted under Section
122.25 of the Customs Regulations."
Comment: Where is this quote from?  Also, my question is about **pre-clearing** in the USVI (with US Customs), after which you are considered a domestic flight in most regards, so this doesn't apply.
Answer: An FBO in the USVI offers the following explanation:

When an aircraft that is inspected by CBP in the U.S. Virgin Islands arrives in the United States, it is considered to be pre-cleared.

However, you must be able to provide evidence of the inspection, and must arrive at an airport with CBP facilities unless that requirement is waived by the CBP.
19 CFR § 122.24 discusses "Landing requirements for certain aircraft arriving from areas south of U.S.", which states that aircraft must provide advance notice of arrival and stop at the nearest "designated airport", but also includes the following exception:

This requirement shall not apply to those aircraft which have not landed in foreign territory or are arriving directly from Puerto Rico, if the aircraft was inspected by CBP officers in the U.S. Virgin Islands, or otherwise precleared by CBP officers at designated preclearance locations.


Adjust Refresh Rate

Question: I'm curious as to what the suggested method for adjusting screen refresh rate is. There doesn't seem to be an option under the display settings, despite being a fairly standard and important setting. It's unfortunate being locked at 60Hz on a 144Hz monitor. Any suggestions?
Comment: A solution from the Ubuntu forum:
https://askubuntu.com/questions/147580/how-to-see-change-screen-refresh-rate-or-monitor-frequency#155351
Comment: You sexy beast. That does the trick well enough. If you reply as an answer I can mark as solved.
Comment: RIP Elementary OS. It was fun while it was functional.
Answer: A solution from the Ubuntu forum:

https://askubuntu.com/questions/147580/how-to-see-change-screen-refresh-rate-or-monitor-frequency#155351
Answer: In the latest Elementary OS I had to use the verbose version of the xrandr command, including the output device, for this to work:
xrandr --output eDP-1 --mode 1920x1080 --rate 59.93
If I use the shorter version as explained in the (old) Ubuntu thread, eg. xrandr -r 59.93,  nothing happens.
Check the output device (mine is eDP-1) from the 2nd line of xrandr output.  Add this as a startup application to have it set on every login. In System Settings -> Applications -> Tab Startup you can add a custom command.
Would be nice though if there was a way without adjusting xorg.conf or adding a startup script to make this permanent, since also during boot the screen flickers.  Somehow on my recent HP Probook 60.01Hz is the default rate and makes my eyes bleed (screen flickers in the dark areas), whilst using 59.93 (2nd available mode listed by xrandr) doesn't.  weird..

Adjust Refresh Rate


Measuring CPU clocks consumed by a process

Question: I have written a program in C. Its a program created as result of a research. I want to compute exact CPU cycles which program consumes. Exact number of cycles.
Any idea how can I find that?
Comment: Exact.  What about processors that optimize instruction streams and may overlap instructions?  What does that count as?  http://software.intel.com/en-us/articles/branch-and-loop-reorganization-to-prevent-mispredicts/
Answer: The valgrind tool cachegrind (valgrind --tool=cachegrind) will give you a detailed output including the number of instructions executed, cache misses and branch prediction misses.  These can be accounted down to individual lines of assembler, so in principle (with knowledge of your exact architecture) you could derive precise cycle counts from this output.
Know that it will change from execution to execution, due to cache effects.
The documentation for the cachegrind tool is here.
Answer: No you can't. The concept of a 'CPU cycle' is not well defined. Modern chips can run at multiple clock rates, and different parts of them can be doing different things at different times.
The question of 'how many total pipeline steps' might in some cases be meaningful, but there is not likely to be a way to get it.
Answer: Try OProfile.  It use various hardware counters on the CPU to measure the number of instructions executed and how many cycles have passed.  You can see an example of it's use in the article, Memory part 7: Memory performance tools.
Answer: I am not entirely sure that I know exactly what you're trying to do, but what can be done on modern x86 processors is to read the time stamp counter (TSC) before and after the block of code you're interested in. On the assembly level, this is done using the RDTSC instruction, which gives you the value of the TSC in the edx:eax register pair.
Note however that there are certain caveats to this approach, e.g. if your process starts out on CPU0 and ends up on CPU1, the result you get from RDTSC will refer to the specific processor core that executed the instruction and hence may not be comparable. (There's also the lack of instruction serialisation with RDTSC, but in this context here, I don't think that's so much of an issue.)
Answer: Sorry, but no, at least not for most practical purposes -- it's simply not possible with most normal OSes. Just for example, quite a few OSes don't do a full context switch to handle an interrupt, so the time spent servicing a interrupt can and often will appear to be time spent in whatever process was executing when the interrupt occurred.
The "not for practical purposes" would indicate the possibility of running your program under a cycle accurate simulator. These are available, but mostly for CPUs used primarily in real-time embedded systems, NOT for anything like a full-blown PC. Worse, they (generally) aren't for running anything like a full-blown OS, but for code that runs on the "bare metal."
In theory, you might be able to do something with a virtual machine running something like Windows or Linux -- but I don't know of any existing virtual machine that attempts to, and it would be decidedly non-trivial and probably have pretty serious consequences in performance as well (to put it mildly).


Do all mitzvot Ben Adam lechavero apply to bnei noach

Question: When it comes to noahide Halacha, there aren't necessarily "7" mitzvot, but rather categories of commandments. My question is, do all mitzvot which are "Ben Adam lechavero" count under the category of the 7 and apply to noahides?
Comment: A noahide can lend with interest, hold pajamas and upper millstones as collateral. Doesn't have to leave a corner to the poor, doesn't have a special prohibition against hitting his parents, doesn't have to let an ex-slave live wherever,
Answer: There are different classes of Mitzvos Bein Adam Lachaveiro (interpersonal mitzvos).
The first is moral.
The second is fraternal. Interactions that are okay strangers, but are just wrong to do to a brother or a friend. And then they end up Mitzvos Bein Adam Lachaveiro but specifically when the other party is Jewish or perhaps another believer in Hashem yisbarach.
For example, the Torah (Vayikra 35:25-26) describes the prohibition of charging interest as:

וְכִֽי־יָמ֣וּךְ אָחִ֔יךָ וּמָ֥טָה יָד֖וֹ עִמָּ֑ךְ וְהֶֽחֱזַ֣קְתָּ בּ֔וֹ גֵּ֧ר וְתוֹשָׁ֛ב וָחַ֖י עִמָּֽךְ׃ אַל־תִּקַּ֤ח מֵֽאִתּוֹ֙ נֶ֣שֶׁךְ וְתַרְבִּ֔ית וְיָרֵ֖אתָ מֵֽאֱלֹהֶ֑יךָ וְחֵ֥י אָחִ֖יךָ עִמָּֽךְ׃

If your brother becomes impoverished and his hand (assets) become shaky among you, you must support him, [so too] the proselyte and the sojourner, [so] that he shall live with you. You shall not take from him interest or usury and you shall fear your God, and your brother shall live with you.

We are allowed to charge a non-Jew interest, and they are permitted to charge us interest because there is nothing immoral about wanting payment for not having one's money available for their own use or an investment. But when family needs money, charging interest is unbrotherly. This is why the borrower is referred to as "achikha -- your brother".
But all laws of morality apply to non-Jews. Subsumed under the umbrella prohibition against all forms of theft.
Comment: Lashon hara is true. Slander, motzi sheim ra, is not similarly limited. Nor is any geneivas daas, never mind one that damages another.
Comment: Could we have the source for that last sentence? Very interesting thanks for this
Comment: I don't think this is correct. What about Lashon Hara that only applies to Yisra'el
Comment: Perhaps a citation to hakdamas rav nissim goan would help.


What is the reason why we should put 'the' after preposition like ' in the room'?

Question: I learned that we use definite article 'the' to tell A from B.
But I don't understand the reason why we put 'the' after preposition like ' in the room.'
I would like to know whether We should put 'the' after a preposition to tell the room from other room that we don't know or to tell the room from other kinds of space like a classroom.
Please, give me the answer.
Comment: I don't understand what you mean. But we use the definite article, generally for nouns that are specific/known.
Comment: The primary role of the definite article "the" is to mark a noun phrase as definite. If you say "Ed walked into the room", "the" marks "room" as definite. It assumes that the reader/listener knows which room is being referred to, as opposed to "Ed walked into a room" which could mean any room.
Answer: To use your example of "in the room":
"In the room the women come and go, talking of Michelangelo".
The definite article tells the listener that the speaker has a particular room in mind, not just any room.
In English, the speaker might have said:

In a room the women come and go...

but it would mean "in some room, one which I do not recognize or one whose particular identity is not relevant to what I am saying at this moment..."
In English, we cannot say:

In roomungrammatical the women come and go...

English listeners expect the speaker to indicate whether he or she is talking about a particular room or not.
In the room on the third floor... a particular room on the third floor. The speaker would expect the listener to know which room, perhaps from the speech context or from being generally familiar with the house, or from some other context.
In a room on the third floor... one of several rooms on the third floor, and which one is either not known, or irrelevant, or both unknown and irrelevant:

Your precious painting is in a room on the third floor. Don't worry,
  the flood waters will not reach it.
Comment: Although you can't say "in room", you could say "**In rooms** where the women come and go..."


Why does the product of all the elements in $\mathbb{Z} _{m}^{*} $ equal to $\pm {1} \mod{m}$?

Question: I am asked to prove that the product of all the elements in $ \mathbb{Z}_{m}^{*}$ for $ m>2$ equals to $ \pm {1} \mod{m} $. So far I tried the following direction. I defined:
$$ S_{1} = \{x \in Z^*_{m} : x^2\equiv 1\mod{m}\} $$  and $$ S_{2} = \{x \in Z^*_{m} : x^2\not \equiv 1\mod{m}\} $$ If $P_{i}$ is the product of all the elements in $S_{i}$ for $i=1,2$, I proved that it holds $$ P = P_1\cdot P_2 $$ I already proved that $P_2=1 \mod m$. I need to prove $P_{1}= \pm 1 \mod{m} $.  I already know that $P_{1}^2 = 1\mod{m} $ but unfortunately this doesn't imply the required. Can I get a hint on how to prove that $P_{1}= \pm 1 \mod{m} $? Thank you
Comment: Call $x,y \in S_1$ equivalent if $x = y$ or $x = -y$. Partition $S_1$ into equivalence classes and look at each separately first.
Comment: @DanielFischer This is brilliant. If $ x \in S_{1} $ then $ m-x \in S_{1} $ and $ x\cdot (p-x) \equiv -1 \mod{m} $. Thank you.
Comment: A good start. One way of dealing with $S_1$ is to first consider the case when $m$ is a prime power (when that prime is equal to two there is an extra obstacle). Then apply the Chinese Remainder theorem to deduce $P_1$ modulo all the prime powers that appear in the factorization of $m$. Possibly there is an easier way forward. I had to wake up very early this morning, so I'm not firing on all cylinders at the moment.
Comment: @JyrkiLahtonen Thank you too
Comment: @Ben See [this answer](https://math.stackexchange.com/a/2372358/242) for more on the method hinted by Daniel.
Answer: On $S_1$, introduce the equivalence relation
$$x \sim y \iff (x = y \lor x = -y)\,.$$
Then every equivalence class contains exactly two elements of $\mathbb{Z}_m^{\ast}$ (if $m > 2$ is even, then $m/2$ is not coprime to $m$, so we have $x \neq -x$ for all $x \in \mathbb{Z}_m^{\ast}$), and
$$x\cdot (m-x) = mx - x^2 \equiv -x^2 \equiv -1 \pmod{m}\,.$$
Hence
$$P_1 \equiv (-1)^{(\operatorname{card} S_1)/2} \pmod{m}\,.$$


Reading python documentation in the terminal?

Question: Is there a way to install the python documentation that would make it available as if it was a manpage? (I know you can download the sourcefiles for the documentation and read them in vim, using less or whatever  but I was thinking about something a bit less manual. Don't want to roll my own.)
Comment: If you are running python in an interactive shell, you can use `help()` to get (parts of) the documentation.
Answer: It's not an exact copy of the documentation, but there's the builtin help() function.
In an interactive python session, you just call help(whatever_you_want_to_read_about), for example:
>>> help(all)
Help on built-in function all in module builtins:

all(...)
    all(iterable) -> bool

    Return True if bool(x) is True for all values x in the iterable.
    If the iterable is empty, return True.

Alternatively, you can start an interactive help session like this:
C:\Users\Rawing>python -c "help()"

Welcome to Python 3.4!  This is the interactive help utility.

help>

And then just type the function/class/module you want to know about:
help> all
Help on built-in function all in module builtins:

all(...)
    all(iterable) -> bool

    Return True if bool(x) is True for all values x in the iterable.
    If the iterable is empty, return True.

Comment: I'm going to mark of the answer mentioning pydoc as correct since it's the closest to a manpage, but this is what I'll probably use the most now that I've discovered it. :)
Comment: I agree with @Var87, especially since the accepted answer requires you to install something, which is not an option if you are not root. The `help` function is builtin.
Answer: On Debian (and derived distributions, like Ubuntu) install pydoc package. Then you can use pydoc whatever command.
Comment: You can use pydoc as local server so you get docs like python.org `pydoc -p 8080` it's quite neat and I use it often when I dont have internet access. Like When traveling was still a thing.
Answer: I don't if this is what you wanted but you everything you can do in IDLE you can do on the command line. Example:
C:>python
>>help(print())
>>help(plt.plot())

This way you can access documentation
Answer: I don't know if that's exactly what you are looking for, but the python interactive console offers a help command. You can use it in the following manner.
>>> help()

Welcome to Python 3.6's help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/3.6/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics".  Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".

help> list

This will output the whole documentation for all of the list methods.
Answer: You can use help(Class-name/method-name/anything). But also using __doc__
A special __doc__ docstring is attached to every class and method. For example look what i typed into my interpreter.
>>> print(str.__doc__)
str(object='') -> str
str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or
errors is specified, then the object must expose a data buffer
that will be decoded using the given encoding and error handler.
Otherwise, returns the result of object.__str__() (if defined)
or repr(object).
encoding defaults to sys.getdefaultencoding().
errors defaults to 'strict'.
>>> print(int.__doc__)
int(x=0) -> integer
int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is a number, return x.__int__().  For floating point
numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string,
bytes, or bytearray instance representing an integer literal in the
given base.  The literal can be preceded by '+' or '-' and be surrounded
by whitespace.  The base defaults to 10.  Valid bases are 0 and 2-36.
Base 0 means to interpret the base from the string as an integer literal.
>>> int('0b100', base=0)
4

It even works for modules.
>>> import math
>>> math.__doc__
'This module is always available.  It provides access to the\nmathematical functions defined by the C standard.'
>>> math.ceil.__doc__
'ceil(x)\n\nReturn the ceiling of x as an Integral.\nThis is the smallest integer >= x.'
>>>

Since every class has a __doc__ which is a docstring attached to it you can call it using the class_name.__doc__
>>> print(ord.__doc__)
Return the Unicode code point for a one-character string.

Answer: You can use the BIF help()
In terminal go to Python REPL like
python

Now type help()
Now for example if you wish to get help for a class say IPv4Network which is in ipaddress package then you just have to specify the fully qualified path for IPv4Network i.e ipaddress.IPv4Network
EXAMPLE:
$ python3
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help()
Welcome to Python 3.6's help utility!
help> ipaddress.IPv4Network
Help on class IPv4Network in ipaddress:

ipaddress.IPv4Network = class IPv4Network(_BaseV4, _BaseNetwork)
 |  This class represents and manipulates 32-bit IPv4 network + addresses..
 |
 |  Attributes: [examples for IPv4Network('192.0.2.0/27')]
 |      .network_address: IPv4Address('192.0.2.0')
 |      .hostmask: IPv4Address('0.0.0.31')
 |      .broadcast_address: IPv4Address('192.0.2.32')
 |      .netmask: IPv4Address('255.255.255.224')
 |      .prefixlen: 27
 |
 |  Method resolution order:
 |      IPv4Network
 |      _BaseV4
 |      _BaseNetwork
 |      _IPAddressBase
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __init__(self, address, strict=True)
 |      Instantiate a new IPv4 network object.
 |
 |      Args:
 |          address: A string or integer representing the IP [& network].
 |            '192.0.2.0/24'
 |            '192.0.2.0/255.255.255.0'
 |            '192.0.0.2/0.0.0.255'
 |            are all functionally the same in IPv4. Similarly,
 |            '192.0.2.1'

and so on
Answer: I will answer since I don't satisfied with the accepted answer. Probably because I don't use IDLE.
Note that, I use Ubuntu (terminal).
Probably in other OSs, it works the same.
Is there a way to install that? No need.
I found that it comes by default.
How to access that?
Use help() command in python' shell.

In the shell, type command help().
Now that you're in the help utility, enter anything that you want to read its documentation. Press q to quit the documentation and type quit to quit the help utility.


Click-lock Alternative?

Question: I was wondering if there was an alternative to click-lock for mac? I can't use drag lock because of limited hand movement. I need something where I can move the cursor to where I want to drag, hold down the left or right mouse button for a number of seconds, be able to release, and then it will be in infinite drag until I click again to release the drag (similar to how click-lock is on Windows). I tried to use btt, but to no avail. Any help would be greatly appreciated.
Comment: What was your issue with BTT?
Comment: Also, is the the long-click the only option for you? Could it also be another trigger like pressing left and right button simultaneously?
Answer: There is a built-in equivalent for trackpads, called dragging, which you find in System Preferences > Accessibility > Trackpad Options:

In case this is not sufficient for you or you need to use a mouse, have a look at the answers to this question. Currently the following third-party apps are being mentioned:

Hammerspoon (free) is a popular choice for gestures and automation. It offers a feature called "Grab Scroll".
Karabiner (free) a similar and popular tool.
Smooze (commercial)
Smart Scroll (commercial)

Better Touch Tool (commercial) is my personal favourite as it allows so much more, such as another Windows-inspired feature, called window snapping, etc. The procedure here would be as follows:

Open BTT preferences
Select Input device, i.e. Mouse
Select Trigger. The one you mention (i.e. long press) currently seems not to be available. (I suggest you make a feature request on their forum. The developer is usually very open to such requests.) Instead you could do e.g. middle-click.
Select action. Go to Window Resize & Move > Start/Stop Moving or search.
Answer: This is an incomplete solution because it doesn't answer the question as asked.
I'm hoping someone can find a solution that may involve the trackpad/gestures control panel, but I don't have any machine with one so I can't test.
In the meantime, if you have an extended keyboard, then Mouse Keys might go some way towards, if not exactly as asked, then some way towards achieving a similar result.
In System Prefs > Accessibility > Mouse & Trackpad there is Mouse Keys [in the Options you can set it to toggle on/off by tapping Opt 5 times]
It enables the 10-key NumPad on an extended keyboard to be used to drive the mouse cursor. 123, 46, 789 act as directional navigators. 5 is the click.
I had hoped that with Mouse Keys on, it would allow you to press 5 & then drag the actual mouse to carry out the task. Unfortunately it won't do that, they seem to partially ignore each other. Any 'real' mouse seems to act independently, so 5 will click but dragging the mouse won't 'carry' that click.
However, holding 5 & using the direction keys, the click does 'hold', so click & hold a title bar, for instance, then the keys will 'carry' the window until you release 5.
Comment: Thanks but this doesn't work for me because in order for mouse keys to work, you have to have an external keyboard and I can't use an external keyboard because of my physical disability :-(

Click-lock Alternative?


Is space-time made of something?

Question: General relativity introduced to us "space-time curvature", and also told us that space can be warped, deformed or curved when mass is acting upon it. Mass has atoms and particles inside but what space-time has? Is it a material thing and has particles like mass? What exactly is the "spatial points" that can be curved?
Comment: Is the 2-sphere curved?  Is it made of particles?
Comment: I am entirely confident that the 2-sphere is not made of atoms.  Do you think that the number 7 is made of atoms?
Comment: Here is another very similar question. https://physics.stackexchange.com/q/714427/37364
Comment: @WillO Yes. Do you think it is not made by atoms? Do you have a new theory about that?
Comment: I think a theory of quantum gravity *might* answer this question. Or it could be left as a mathematical idea that has no physical meaning as being made out of *something*.
Answer: In theoretical physics there is always a 'choose your battles' judgement call to make.
My favorite example in the history of physics is Newton proposing the inverse square law of gravity. Many of his contemporaries objected to it on the grounds that no explanation was available as how how this universal gravity was supposed to act over the vast distance of space.
(Descartes had proposed a model that required only a concept of contact force. Descartes has proposed that all planets are surrounded by vortices, and the orbital motion of each planet is subject to a pushing effect from the surrounding vortices, causing the planets to circumnavigate the Sun.)
Imagine a version of history where Newton would have decided against publishing the idea of the inverse square law of gravity, because he could not explain it.
What Newton did was that he insisted: this inverse square law of gravity works so well, we have to accept it as is.
That is what I mean with: 'choose your battles'.

In the case of GR:
In order to formulate the theory at all the concept of space-time curvature must be granted.
It's a giant step, because it means a shift to attributing physical properties to spacetime.
John Wheeler coined the expression:
Matter/energy is telling spacetime how to curve
Curved spacetime is telling matter how to move.
So the idea is: spacetime is an entity that is not only acting upon matter (telling it how to move), but it is reciprocal: spacetime is being acted upon. This recognition of reciprocity is a form of unification.
Matter has the property that it has discernable parts that can be tracked through time. A vivid example of that is the traces in a cloud chamber, and in a bubble chamber.
We have of course that spacetime does not have discernable parts that can be tracked trough time. And yet, in order to formualate GR at all physical properties must be attributed to it.
That does not necessarily mean that these physical properties are exhaustively understood. It means that there is sufficient understanding to narrow down to a quantative theory that describes the physics taking place.

As a long time stackexchange contributor I notice a recurring pattern: in many questions the words 'what exactly is' are used.
I surmise you have an expectation that since there is a quantative theory of spacetime curvature it must be the case that physicists have an exhaustive understanding of it.
Well, such an expectation of exhaustive understanding is totally unrealistic.
I submit there are always 'choose your battles' judgement calls at play.
In order to make progress at all the physicist is allowing educated guesses all the time. Sometimes such a guess turns out to fail, but then sometimes an assumption turn out to have great, great mileage.
Answer:
What exactly is the "spatial points" that can be curved?

As far as we know, spacetime is not made of "things". When we talk about curvature we are not talking about a material "thing" that is curved.
Curved space just means that the physical geometry is not Euclidean. For example, if you draw a triangle of three physically straight lines then in a curved space you will find that the angles don't add up to 180 degrees.
Comment: @Cleonis yes, that is why I immediately followed with a concrete example. Is the example insufficient?
Comment: I notice that you use the turn of phrase 'it just means that'. For comparison: when a object is dropped and it hits the ground, where does the kinetic energy go? As we know, the object will be slightly warmer. The kinetic energy has not disappeared; *it just means that* the kinetic energy has shifted to thermal motion of the constituent molecules. The expression *physical geometry of spacetime is not Euclidean* is at the same level of in-need-of-explanation as *curved space*. The 'it just means that' *suggests* explanation is provided, but the two are actually at the same level of abstraction.
Answer: Supposing $M >> m$, we can describe the movement of $m$ using Newton's law of gravity, and its second law:$$\mathbf F = m\frac{ \mathbf {d^2r}}{dt^2}= -GMm\frac{\mathbf {\hat  r}}{r^2} \implies \frac{ \mathbf {d^2r}}{dt^2} + GM\frac{\mathbf {\hat  r}}{r^2} = 0 \implies \frac{ \mathbf {d^2r}}{dt^2} + \nabla \Phi = 0$$
Where the second term was expressed as the gradient of the scalar function $\Phi = -\frac{GM}{r}$
It is a vectorial equation, and breaking it into coordinates:
$$\frac{d^2X^i}{dt^2} + \frac{\partial \Phi}{\partial X^i}  = 0$$
It starts to look like a geodesic equation:$$\frac{d^2X^k}{d\lambda^2} + \Gamma^k_{ij}\frac{\partial X^i}{\partial \lambda}\frac{\partial X^j}{\partial \lambda}  = 0$$ It can be shown that taking $\frac{\partial \Phi}{\partial X^i}$ as the connections of a $3+1$ spacetime, it is really a geodesic equation, and the curvature (Riemann) tensor derived from the connections is not zero.
So, even the Newton's law of gravity can be interpreted as a geodesic in a curved spacetime. The word 'curvature' must be understood as mathematical concept, that is related to our intuition of a curved surface in some cases, but that is not limited to that intuition.
Answer: General relativity can be viewed another way than space-time curvature: e=mc2 therefore gravitation  energy has mass that follows Newton. Of course, this is a feedback situation: when gravitational potential (energy) increases, so does energy=mass; when it 'runs away' we get a black hole.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Answer: Spacetime is a thing, it has reality. It allows the placing of something somewhere, in some orientation and at sometime and hence allows motion. It should not be confused with the void which because it is nothing, it has no properties, and certainly not the property of putting something somewhere. Spacetime is the medium of all motion.
Historically speaking, from Newtons time, absolute space and absolute time was the medium of mechanical motion and from Maxwell's time, the luminiferous ether was seen as medium for the motion of electromagnetism. After Einstein's SR, Newtons absolute space and time was welded into a unity and the lumineferous ether, as is commonly suggested in textbooks, was rejected. But this is not what Einstein himself thought. He said in a lecture at the University of Lieden, 1920:

Certainly from the standpoint of the special theory of relativity, the ether hypothesis appears at first as an empty hypothesis ... but on the other hand, there is a weighty argument to be adduced in favour of the ether hypothesis. To deny the ether is ultimately to deny the ether has no mechanical properties. The fundamental facts of mechanics do not harmonise with this view.

In fact, after Einstein's GR, one can identify the gravitational and lumineferous ether with spacetime itself. Whilst the weak and strong force suggest that spacetime has additional internal structure. Spacetime, then, can be identified with force at the fundamental level.
Having described it as something, what else can we describe it as?
Well, nothing we have said so far supposes quantification. Time can pass, motion can occur, but we need not be able to quantify any of this. The principle of spacetime relativity, as enunciated by Liebniz, says in the presence of matter we can measure length, duration and angles. In brief, it has a metric. An empty universe need not have a metric, and in fact according to GR, pretty much doesn't.
So far, the reasoning has been classical. Quantum theory suggests that spacetime has a discrete character of some kind that is yet to be wholly elucidated. So in a sense, we should have something like atoms of spacetime. Loop Quantum Gravity, for example, demonstrates that there is a quanta of length, area and volume that is discrete.

Is space-time made of something?


How to manage firmware

Question: Switches and routers have some firmware (similar to BIOS (UEFI) on PC). It represents a "step" before the OS (maybe I'm wrong). Can we manage this firmware just like BIOS or UEFI on a PC? On cisco catalyst 2960 switch for example. If we can, how approximately does it happen? Through a console cable or something?
Comment: Stop deleting and re-asking the same thing. [ https://networkengineering.stackexchange.com/questions/75885/how-to-manage-firmware ]
Comment: That depends on the device model. Different vendors do it differently, sometimes between different model of the same vendor. Which models do you mean?
Comment: cisco catalyst 2960 switch for example
Comment: Are you asking how to upgrade?  How to see what version you have?
Comment: Yes, they have a "BIOS". No, you don't generally mess with it. If a "BIOS" update is needed, the software update process will usually handle it. (i.e. NX-OS on a nexus switch) On older ROMMON based platforms, you can load an "upgrade ROMMON", but the original ROMMON code will still be there, unchanged.
Comment: Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
Answer: Most embedded devices have a bootloader - rudimentary hardware initialization (CPU, RAM, flash) - and a more fully fledged firmware that contains the hardware drivers and the OS for normal operation.
On some devices you can access the bootloader (ROMMON on some Cisco devices) via serial console , e.g. to reset passwords, clear settings, or to recover the actual firmware after a failed update. Some devices even allow access to the bootloader over the network. On other devices you can do no such a thing. In any case, operation is usually limited to device recovery and there isn't much interesting stuff.

How to manage firmware


iPhone: UITableView outlet dies when when pushed onto UINavigation controller stack

Question: I have a UITableView that's part of a navigation controller embedded in a UITabBarController. I set a IBOutlet to the UITableView in IB and on the first load, it's fine (i.e. valid address). But when the user drills down (i.e. puts the associated view on the stack and loads a new view) and then pops back up, the outlet to the UITableView is showing as 0x0, which I assume to be nil. I need to force a re-draw but the call to [myTableView reloadData] doesn't do anything. I assume that it's just sending a message to a non-existant object.
Answer: You probably just set you outlet's value to nil somewhere in your code. Even if it was released it's value wouldn't be nil.


Fish tank stand - confirm if steel material will be suitable

Question: Hi I would like to make a fish tank stand like the one in the photo. I have been scouring the internet for an answer to how thick the material I select should be, in either SHS or RHS. I was thinking of purchasing 40mmx40mm but have not been able to find out what thickness I should go for. The fish tank that will sit on top of the frame, is 1800mmx700mm and 590mm high. It will hold about 745 litres of water when full. I intend on placing a sump tank in the bottom section (but not sure if that will effect the choice of the thickness of material or not). The height of the stand will be about 750mm.  I appreciate your help. Thank you.
Comment: If you have the tank manufactured you can inquire about the support requirements, that will then guide you how much the stand is allowed to deflect under load
Comment: Thank you. I made the tank myself using 12mm glass.
Answer: There are several modes of failure for such a design but the two main ones you need to consider are:

Bending failure or over deflection of the top two 1800mm beams. While the glass tank will distribute some of its load to the columns, there may be too much deflection in the middle causing the tank to crack and fail as blacksmith37 and ratchet freak have mentioned. One way to reduce this is to use a 3mm rubber liner between the steel and glass tank that will help distribute the load and reduce pressure points. If you don't have an engineer review the structure you want to oversize the member to reduce the risk. For example a 40mmx80mmx4mm wall beam gives you 4x the strength of a 40x40x4mm when oriented with the 80mm vertical. If you want it to look more trim, or weigh less, hire a licensed mechanical engineer in your jurisdiction to draw it up for you with a weld specification. It would be less than an hour of work and would save you money in the long run if you send it to a fabrication shop.
Moment(rotational) failure at the welded joints. Visualize it tipping over as if the tank were set on two dominoes. Or if it rotated on the columns like DNA. While good steel welds at 40mm are probably strong enough for this application, gussets and cross bracing give a lot of insurance. I would recommend a minimum wall thickness of 4mm as thinner walls are more difficult to weld. If you have less than 100 hours of welding experience I would recommend hiring an experienced welder or weld shop to fab the unit for you. Since this is not a structural application requiring a licensed engineer the fab shop can also review your design and help you make sure it works based on their experience of building may similar structures, but plan on it being very overbuilt and heavy in that case.

Remember the weight of the tank is substantial and you don't want to risk crushing yourself or others. If the glass is not tempered, also consider the risk of a partial failure dislodging sharp sheets of glass. Steel is a good material choice for this application since it is very strong and easy to work with; just ensure that it is properly painted or powder coated to be protected from corrosion.
Answer: Have you done something like this before ? You have a weight of about 2000 pounds, not trivial. The aquarium glass provides stiffness itself . But for support the steel stand must not deflect much as the glass has very little deflection. I would plan on a vertical center leg in the center of each 6 ft. side. In the US, steel channel stock is available under names like "Unistrut". They provide much information on strength , etc, on the net. I think you will find Unistrut more available than square tubing. I have a couple pieces of Unistrut as the main strength for an 8 ft. long foot bridge over a pond . Not near the load of your tank but it likely had easily carried dynamic loads up to 600 lb. The various aquarium stands I have built have all been wood ( up to 6 ft. long, 1400lb.). If you are planning to weld ; that is a whole other technology. I suggest looking at the Unistrut information.
Comment: and putting cross members between the top rails to support the center of the bottom glass is a good idea.


Location of Gnome Automount

Question:
Is there a way to tell nautilus where to automount specific devies - say, mount a device with UUID=xxx-yyy on /foo/bar?
Also, is there a way to disable/enable automount for specific devices (by specifying a UUID or device label)?
Comment: Welcome to Ask Ubuntu! You are better of asking one question at a time on this site. You may benefit from splitting your question. Since you already got an answer for the first I suggest you move the second to a new (proper) question.
Answer: You can control where a device is mounted via the /etc/fstab file. Here are some examples from my /etc/fstab - it's up to you to adjust it for your situation.
# Part of the 1TB drive, for Rick's recovery
UUID=abcf5311-d080-4840-8056-ee4de9d62bfd /opt/Rick ext4    nodev,nosuid,user,noauto,rw
#
# My current mp3 player
UUID=70E0-C8E1 /home/walt/mnt/SANSAClip vfat    nodev,nosuid,noexec,user,noauto,rw
#
# My backup 1TB StoryStation
UUID=ff359af0-d996-4949-b27e-f24ce453c48c /backvol ext3 nodev,nosuid,noexec,user,noauto,rw

Because they all have the noauto option, they don't automount (except the mp3 player, and I don't even have gnome-mount installed).
Comment: This answers question 1 (note that you see to have to restart nautilus (nautilus -q), but not question 2.  Can you do automount selectively within nautilus (maybe with some HAL policy stuff that I don't understand)?

Location of Gnome Automount


Moving Expression engine site from Live Server to Localhost

Question: Please advice me on how to move Expression engine site from Live Server  to Localhost
Answer: It is pretty straight forward to move an EE site.
The instructions from EllisLabs are pretty comprehensive - EE server migration instructions.
Comment: I followed EE server migration instructions.
Comment: Moved EE 2.5.5 site to localhost and RESULT :An Error Was Encountered Site Error: Unable to Load Site Preferenes; No Preferences Found
Comment: That sounds very much like a problem hooking up your local site to the MySQL database - I'd check that you've got the database.php settings correct on the migrated file.


Is Shimming Old Framing Okay?

Question: I shimmed the framing around a window in a 50 yr old house. Would an inspector find fault with that? Should I remove the shims and leave it in its previous state? I would simply replace the studs, but reaching the sole plate is difficult because the floor is raised a few inches. The sole plate is in effect in a little "pocket". It's hard to get my hands into the bottom of the stud bay and nail even with a palm nailer.
Answer: Don't sweat it, you improved the situation. The inspector can see it is old original framing and the header shrunk. It is what happens. It could have been left as it was, but what you did will be fine.
Comment: Yep. If you think about it, those shims are essentially very short studs. No inspector would have an issue with studs carrying a load like that.

Is Shimming Old Framing Okay?


In which case can I use the option '--nodeps' of rpm command?

Question: I heard that I should never use --nodeps option when I do a rpm -e command.
Why does this option exist then?
Comment: Simple answer: When you really, really, *really* know what you're doing.
Comment: I love simple answers !
Answer: --nodeps is when we do not want to verify package dependencies.
If you will use it with rpm it will not verify the package dependencies, and the installed package might not work as it should.
If you will use it with rpm -e command, the package will be erased without giving you warning, if some other packages are dependent on the package you are trying to erase.
Comment: Ok thanks for the precisions. In fact I know what it does and doesn't. I just wanted to know in which case I would need to use this option.
Answer: It exists for broadly the same reasons rm will allow you to delete the filesystem root, or dd will allow you to overwrite the physical hard drive:
Linux and unix have a long history of giving you all the ammo you need when you really insist on shooting yourself in the foot.
Less flippantly, when something has gone badly wrong during a package install, whether due to a badly built package or an outage at the worst possible moment, it's possible to wind up with your package manager's dependency database in gridlock -- IE, it can't resolve the problem because attempting any of the solutions would violate the dependencies of the other packages involved. In that case, you can use --nodeps, or for dpkg, the --force-* options to manually and forcibly remove the offending package, and then immediately issue what commands are necessary to fix the now broken dependencies.
That's something you should only do if you're really sure of what you're doing, however; as a rule of thumb, if you aren't sure what use --nodep is, don't use it. You're essentially taking all the safeties off, and gods help you if you screw something up while doing it.
Comment: Exactly what I wanted to know and thanks for answering so quickly.


Is there a way that you can get a Portable/Online  Arduino IDE?

Question: I am just starting out with the Arduino, and I want to develop and create sketches at my school.  The only problem is that the school's computer doesn't allow any application to run if app tries to create a folder on its hard-drive.  Are there any ways to make the standard  IDE portable, or is there another portable option?
Comment: Can you tell the IDE where to put folders?  Maybe throw it on an external drive or some other storage, run it from there, and tell it to create all the directories on that drive.
Comment: the biggest challenge for something like this would be supporting the myriad libraries out there... I'm actually working on a project that has this capability as one of its goals... http://www.sketchgarden.co but it won't be ready for at least a couple of months.
Comment: @vicatcu Well, I have some knowledge of Java, so if you want some external input, I am open to help!
Comment: @KrisBahnsen I can try that
Answer: The standard IDE is portable as it runs as a stand-alone Java application. As such it requires no "installation" so to speak, and projects exist. So if you have it on rewritable media (e.g. a USB flash drive) and you store your projects on that same media, you in effect have a portable IDE. It will (I'm pretty sure) however, keep all it's build artifacts in temporary folders under the current users HOME directory.
Comment: The Arduino IDE's SketchBook folder location is configurable in the IDE preferences.
Comment: When in the process is this occurring?  When you try to compile a sketch?
Comment: I believe that the IDE tries to create the SketchBook folder somewhere in the system, which my school's admins don't like  :(
Comment: But, that being said, the computer says that the IDE is trying to create a folder on the hard-drive, which doesn't work in my school.  +1 anyways (if and when I have 15 rep), but not exactly what the question asked.
Answer: There are a couple of projects working on online IDEs for Arduino. My project, called wifino, is probably the most developed at this point. You can try out the beta at http://ide.wifino.com. Code still needs to be moved to the Arduino using avrdude, but we're working on a deployment client for windows, mac/linux, and (drum roll) iPhone using 802.11b/g networks.
Answer: I ran into issues with this while teaching arduino to one of my classes.  Without admin access, you can't install the device driver for the arduino and with Windows 7 the JVM is not installed by default.
I built live debian DVDs that have the IDE installed and just have them boot the cds to work with the arduinos.  Should work fine until campus IT gets wise and blocks booting from CD/DVDs
Answer: To go portable you can use a portable Chrome Browser and install the extension to the site below.
-->codebender<--
Once the extension is install you can connect your Arduino and start building.
Answer: I don't believe that @vicatcu has the complete answer to the question. In reference to Processing 2.0 to 2.2, not only the sketchbook location, but also the preferences file itself, modes and other folders are placed on the hard drive. But with a few quick modifications to a file that strongly urges against modification, we can achieve portable Processing.
As @vicatcu mentioned, the sketchbook folder location can be set in the IDE via File>Preferences>Sketchbook location. But I'd suggest not to do that; simply set that path with the defaults.txt file. Additionally, the settings path must be set.
These sketchbook and settings paths can be modified in "lib/defaults.txt" by uncommenting lines #sketchbook.path= and #settings.path=. You can use local paths such as "sketchbook.path=sketchbook" which will put these folders into the Processing IDE folder. The folders will then be created when you start up Processing. Note that when relative directories are used, the Processing folder must be user-writeable, so don't put it into "C:/Program Files". Also, Processing should not be running until after you make the changes to the defaults.txt file.
Comment: I did attempt to get this made more transparent but the product maintainers don't want to modify it. Maybe in Processing 3.0 it will be easier.


Porting existing SQL Django Data to App Engine using nonrel

Question: I have an existing Django project, complete with Data on an SQL DB. I am using Django nonrel. I have completed all the process including porting the app and its template to app engine, however I have no idea how to port the My-SQL Data to App Engine. Any ideas on this?
Answer: You could try to export your SQL Database to JSON and then import it with manage.py loaddata.