What is causing these ceiling cracks?

Question: So I recently purchased this home and moved in about four months ago. These cracks have been showing up and slowly spreading. I don't remember them being present during inspection or during walk through and moving in.
Comment: 1 - Could have been painted shortly before the sale/inspection, covering up old damage. Which would not be a good thing, and which could be cause for compensation if you can prove it (which is not so easy, of course); 2 - What is above this ceiling?
Comment: The attic. It is an open attic, unfinished with a HVAC unit. This was a two family which was converted to single family.
Comment: Which rules out - lots more use of the room above than previous owners, causing settling, etc. Unless the HVAC unit was recently replaced and isn't mounted securely, causing vibration, etc.
Comment: The people who lived here did the conversion about 7 years ago and were actively living here, so nothing has changed in terms of usage since I moved in. The HVAC unit was installed in 2011.
Comment: Are you sure the cracks recently appeared, or are you just now noticing them? They're fairly severe for something that's just now happening.
Comment: I think they're growing, which is why I'm noticing them more and more.
Comment: Is the sheetrock damp from possible condensate? My first thought was a water leak above that section.
Comment: Doesn't seem damp but then again there's a pretty big problem I'm dealing with simultaneously. The second floor baths were redone and they both vent into the attic. Coupled with that, there are only two box vents, no soffit vents, and a 90% efficiency HVAC system in there as well. There's also vermiculite insulation up there.
Comment: It's also happening in pretty much every single upstairs room, not just the one.
Answer: There is a very good chance that these cracks were covered up before you bought the house.   From the general looks of it, they look cosmetic.
What is causing them is the change in temperature of the attic.
Now the co-conspirators here could also be a little moisture (I am doubting the venting of bathrooms are the culprits on that front), could be bad tape job, and I am going to guess the biggest is that extra weight.
I am going to guess you have a standard attic with joists either 18 or 24" spaced.  I am going to guess that they put a pad down for the HVAC but the rest of the attic has no subfloor.   It is this subfloor that helps bind and disperse weight through the joist system causing less variance during seasonal movements.   Me thinks these cracks started appearing 7 years ago and they basically ignored them before.   Looking at your pictures and I would need better ones but looks like there are perpendicular mud or paint strokes by the cracks (should have been taped).
So what can you do?

You can put in cross braces for the joists to disperse movement.   You could certainly put in a subfloor but that might be overkill.
Then you also want to make sure this space is very very insulated.   This is probably the easiest thing to do.
Then when the cracks are at the worst, and you have insulated and put in cross braces around the joists in question - tape and mud.   And in a different question you can get techniques and mud types best for this.

Or you can just look at your cracks because it is just drywall.   You have to understand this isn't a huge deal, you need more information to fix it right and quite frankly to fix it right might cost a bit and I doubt someone will give you a 100% warranty the cracks won't somewhat reappear.
Comment: The problem I have with doing anything in the attic is because of the vermiculite insulation. It's unevenly distributed everywhere up there probably because of the HVAC guy just shoving things around. I'm also experiencing horizontal cracks in my walls as well.
Comment: Also, there is almost no ventilation up there. No soffit intake vents and only two cap vents at the top. I had a humidity problem on the second floor this summer when I was reaching 75% or higher.
Comment: @ChrisKramer - Even if you fix the insulation issue there is a pretty good chance you are not 100% in the clear.       It seems to be the first logical steps are a ridge vent which is pretty cheap to do - and can be DIY and then insulation.   If those two things are helping you can then work on mud/taping the cracks.   Also where is the HVAC outputting?    I know this might sound ghetto but a low cost solution is to do something then paint - maybe light mud no tape.   If the cracks come back right away with no temp variance you have a movement/weight issue.
Comment: Unfortunately I can't do a ridge vent because my roof basically is a pyramid shape. The ridge is is only about four feet long. My only option is the square vents near the top of the roof on three sides.
Comment: Also, the HVAC unit is located directly in the center of the attic, this room is on the corner so I don't think it's a weight issue.

What is causing these ceiling cracks?


QR reader app that interacts with an api

Question: I have created a database on a web server where there is a table called USERS and they have a flag whether yes or no, and each user is related to a QR code.
I will create a wifi network between a server and iPhone device.
Is there an iPhone app I can use, when I scan the QR code, it can interact with the database I created to turn the flag to ON? What API I can use for this purpose?
Answer: Normally, a mobile phone application reading a QR Code will start a browser to open the URL in the QR Code. (Similarly, it will call a phone number or prepare a text message or store a contact code, if the information in the QR Code is encoded correctly for those purposes.)
So, what you (rather simply) can do is make a web application to act on incoming HTTP requests. The QR Codes related to your users should contain the URL to that application, and it also contains some ID for the user. Once your application registers an incoming request with a valid ID, you update your database record.


multi-user communication

Question: For a multi-user communication, I do many signals $s_i(t)$ with $i \in \{1,...,N \}$, $N$ the user number. The bandwith for each $s_i(t)$ is the same.
But when I do the Fourier transform of $s_i(t)$, $FT(s_i(t))=S_i(\nu)$. The $S_i(\nu)$ are not centered in the same place. For example $S_1(\nu)$ is centered at $1$ Hz and $S_3(\nu)$ is centered at $10$ Hz.
Here is my question:
In digital communication, can we transmit signals simultaneously (multi-user communication) whose fourier transforms are not centered at the same point?
Answer: Yes. Multiple users can communicate simultaneously on different carrier frequencies. FDMA

multi-user communication


Does DoorDash have the right to collect order prices from users who took advantage of a bug in the app that made all orders appear to be free?

Question: Apparently DoorDash had a glitch that made everything free. Of course, lots of people took advantage of it. DoorDash is now charging people for their orders, some of which were for several thousand dollars worth of goods. Who is legally "right" and who is "wrong"? Presumably it was not legal to take advantage of something like this that was obviously unintentional, and DoorDash has the right to collect the money?
Comment: I recall a case of airlines accidentially offering plane tickets for a handful of dollars due to missing a zero or two on the price and then losing the law suits afterwards because the buyers successfully argued that they assumed the offer was legitimate.
Answer: united-states
tl;dr: DoorDash can probably void the contract, and not perform the service (delivery) for the price advertised. However, if they have already delivered the product, they are entitled to restitution, but cannot charge full price unless the customer agrees.

Details
Contract is voidable
Legally, this would be considered a unilateral mistake (made by DoorDash) when entering into the service contract.
In the USA, contract law is generally governed by state common law, so details may vary between states.
However, usually contract law allows voiding a contract because of an unilateral mistake, if the other party knew (or should have known that there was a mistake:

Unilateral mistake as to the terms of the contract
The three requirements that will render a contract void for unilateral
mistake in relation to the terms of a contract are:

One party is mistaken as to a term of the contract, and would not have entered the contract but for this mistake
The mistake is known or reasonably ought to be known to the other party
The mistaken party is not at fault

Law Teacher -  Mistake Lecture
The site goes on to cite a case similar to this question (Chwee Kin Keong v Digilandmall.com Pte Ltd [2005] 1 SLR(R) 502), where a computer printer was accidentally priced too low on an e-commerce website. The court held that the contract was void for mistake.
One crucial element is the last part (mistaken party is not at fault). This is generally interpreted to mean that the mistaken party was not grossly negligent in making the mistake. So if the wrong price was caused by gross negligence on DoorDash's part, the contract might not be voidable. Whether this is the case would need to be decided in court.
Consequences of voiding the contract
As explained above, DoorDash can probably void the contract due to their mistake. However, that does not mean they can just charge full price.
Voiding the contract means basically winding back things as if the contract had never been entered into. This usually means each party must return anything they received.
So DoorDash could ask the customer to return the delivery. The can offer to charge their regular price instead, if the customer wants to keep the delivery, but they cannot demand full price.
If returning the delivery is not practical (e.g. for perishable items, or food that has already been eaten), DoorDash is probably entitled to restitution, which in this case would mean money. Generally, restitution means paying the money value of the benefit received. Whether the DoorDash delivery is indeed
worth the full price, or whether the value is actually lower, is something that a court would have to decide.
Terms of service
To avoid the legal uncertainties mentioned, most businesses address the problem in their Terms of service (TOS).
I did not find anything addressing mistakes of fact in DoorDash's TOS.
However, the TOS does say:

(s) You will report any errors, bugs, unauthorized access
methodologies, or any breach of our intellectual property rights that
you uncover in your use of the Services.

DoorDash may argue that customers violated the TOS by taking advantage of the obvious pricing error, instead of reporting it.
Answer: According to Business Insider :

A spokesperson told Insider: "On the evening of July 7th DoorDash
experienced a payment processing issue, and as a result, some users
were able to check out without an authorized form of payment for a
short period of time. We were subsequently notified that some users
were placing fraudulent orders, and we immediately corrected the
issue.

which suggests a valid legal argument that a contract had been established. With this interpretation, orders were not "free", and payment could be collected later.
The reference to fraud (for "some users") would involve DoorDash demonstrating that those users had had no intention of making the payment. A good defence would be that the user had intended to make payment - at a later time if thwarted by technical problems - though that would mean the contract was valid and enforceable (or subject to breach).
There seem to be [at least] two mutually exclusive interpretations - either an intention to defraud, or an obligation to make payment.
I've not found anything that would have suggested to the users that no payment would be due (though I'll edit if that's wrong) - just that it was not collected at the usual time by the usual processes.


How to write this sentence in passive voice?

Question: "they awoke on hearing a strange noise"
Comment: *They **were woken** by a strange noise.*
Comment: Is this homework by any chance? If so you are asking us to help you cheat. If not I advise you to avoid the passive voice when the active voice is clearly adequate, and, in my opinion, better.
Comment: Depends on the circumstances of the text. If it is a formal text, then using the passive voice can increase the sense of formality. Also, if the OP has already written a lot of their text in the active voice, they might just want to switch it up for variety's sake (or at least know how to). @David
Comment: @A.Kvåle — Of course, there are times when the passive is to be preferred. When I write a scientific paper it avoids the repetition of I or We, which can sound too self-important. But this just sounds like an English exercise or a misguided attempt to sound formal.
Comment: You can't awake somebody; you can only wake them.
Answer: Any answer to this question about the usage of
awoke
As in:

"They awoke on hearing a strange noise"

in its conversion to passive voice will be tricky.
As has been pointed out, passive transform lends itself best to transitive verbs. However, these different forms of the same verb have a history.
For example...Collins On-line describes "awoke" as both transitive, and intransitive.

BrE. a past tense or (now rare or dialectal) past participle of awake

and

AmE. verb transitive, verb intransitive
    pt. of awake

There is a lot of confusion about these verbs.

At this point in time, our evidence shows that the most common inflections of awake are awoke in the simple past ("he awoke") and awoken as the past participle ("she was awoken"). The most common inflections of awaken continue to be awakened in the past ("he awakened") and awakened as the past participle ("she was awakened").
It helps if you remember that awaken and awake are different verbs, and that awakened is regular. Maybe just don't think about it too hard when you first wake up.

-Merriam Webster

In summary: Awake and awaken are two distinct verbs that mean the same thing. The verb forms for awake are irregular, but the most common choices are awake, awoke, and was awoken. The verb forms for awaken are regular: awakens, awakened, was awakened.
: to arouse from sleep or a sleeplike state
He was awoken by the storm.

As John Lawler said in a comment:

In a word, Don't. There are four verbs: wake, the adjective awake, which can be used as a verb, the causative waken meaning 'cause to wake', and the causative awaken meaning 'become (or cause to become) awake'. The first two verbs are deponent; there is disagreement on the form of the past participle of wake -- woke, woken, waked, waken, and what have you. So mostly people avoid the perfect and passive with these verbs because nothing sounds right.

In general...
"en" with a verb indicates "cause, or make so"
"a" is more or less "to become" .
Since both verbs are accepted, I agree with John, except I would also accept "awoken" as the PP.
In other words...

"They were awoken upon hearing strange noises."

But the verb does not actually lend itself well to passive transform.
Answer: Upon hearing a strange noise, they were awakened
Comment: In a word, Don't. There are four verbs: _wake_, the adjective _awake_, which can be used as a verb,  the causative _waken_ meaning 'cause to wake', and the causative _awaken_ meaning 'become (or cause to become) awake'.  The first two verbs are deponent; there is disagreement on the form of the past participle of _wake_ -- _woke, woken, waked, waken,_ and what have you. So mostly people avoid the perfect and passive with these verbs because nothing sounds wright.
Comment: Erm...[wrong verb](https://www.merriam-webster.com/words-at-play/usage-awaken-awoken-awakened)...although they pretty much mean the same thing
Answer: To have some fun with the exercise of converting an active verb to passive, it's best to start with a transitive verb.  A transitive verb takes a direct object.  Examples of sentences with verb-object: She saw the crime.  I will ask a question.  She's making a cake.  We can now do the fun conversion to passive, where we flip our point of view and focus on the object: The crime was seen (by her).  A question will be asked (by me).  A cake is being made (by her).
Examples of sentences that don't have a direct object: I like to read.  I'm cooking.  She can't see.  These don't work for conversion to passive.  There's nothing to grab hold of to do the flip with.
"They awoke" has exactly that problem.  The only way to make a passive version is to use a slightly different formulation, as suggested by Will.
Comment: OK...I understand about the suggestion for a transitive verb,   but what is wrong with "awoken"? [ie "They were awoken" as suggested by M-W](https://www.merriam-webster.com/words-at-play/usage-awaken-awoken-awakened)
Comment: @Cascabel - Where's the object?  When the sentence is "They awoke," they did the action themselves.  When the sentence is "The loud noise awakened them," *then* you can convert to passive without making any other adjustments: "They were awakened by the loud noise."  Converting to passive makes me think of judo.  You have contact with the opponent and use their momentum to throw them.
Comment: I gotta process that. To me it seems like the 2 forms are still in free-fall, amd a definitive answer will not be in the offing. As John said below...maybe better to " avoid the perfect and passive with these verbs because nothing sounds right" M-W accepts both forms.


Is fiber to computer(without the use of any other cables in between) possible?? Are any further developments getting carried out towards this goal?

Question: All of us know well that the fiber to home(FTTH) connections are a trend nowadays. Every nation is planning to replace the existing metal wires with optical fiber cables. But we also see that the fiber is only used till the networking device and not the client nodes like PC or laptop. LAN cables made up of copper wires are used for this purpose. So, is there any possibility to directly link our devices through optical fiber cables with networking devices replacing the metal LAN cables and is there any ongoing effort being carried out to eliminate this need of LAN cables and insert optical fiber cables directly into the client machines like our home PCs or laptops?
Comment: Unfortunately, questions about home networking are explicitly off-topic here. You could try to ask this question on [su].
Answer:
we also see that the fiber is only used till the networking device and not the client nodes like PC or laptop.

That isn't really true. Technically, running fiber to the desktop isn't a problem. However, fiber cables are very delicate and deploying fiber when there's copper you can use is an expensive luxury.

LAN cables made up of copper wires

Technically, there is no such a thing as a "LAN cable". Patch cables used for LAN connections can be twisted pair or fiber (or coax, potentially).
Practically all higher-grade network devices, servers, ... feature SFP ports at least optionally. You can add an SFP NIC into any desktop, a laptop would likely require an external adapter. Those SFP ports can be fitted with optical transceivers in a matter of seconds. Fiber transceivers are readily available for any common speed from 100 Mbit/s (100BASE-FX) to 400 Gbit/s (e.g. 400GBASE-SR8).


Ubuntu only allow incoming access from 192.168.0.0/8 or server IP address

Question: How can I make it that only approved IP addresses have access to my Ubuntu server 12.04 I only just set it up.
Answer: You can achieve this with following commands provided you have UFW install:
To allow by a specific IP address use,
sudo ufw allow from XXX.XXX.XXX.XXX

To allow by a specific subnet we invoke netmask and use,
sudo ufw allow from XXX.XXX.XXX.XXX/XX

To allow by a specific port and an IP address you can use,
sudo ufw allow from XXX.XXX.XXX.XXX to AAA port YY

Please refer community documentation for advance help.

Using tcpwrappers,
/etc/hosts.deny is checked before /etc/hosts.allow, so you can go

hosts.deny
ALL : ALL

first, we block everything from everyone,

hosts.allow
ALL : localhost
sshd: 192.168.0.2

which means only 192.168.0.2 on your local network can access ssh server on that machine.
Comment: I suspect you might be able to do it with tcpwrappers (/etc/hosts.allow) too.
Answer: This would be accomplished with iptables (netfilter), the built-in firewall utility for Linux.
Depending on what you're doing with your server (and what you're serving), this will need to be (carefully) configured to permit the appropriate traffic.
There's a good tutorial on this at Ubuntu's official help website and there's also ufw (Uncomplicated Firewall) that's built in to Ubuntu to handle the basics.  For example if you wanted to only permit SSH (TCP 22) access from 10.0.0.15, you'd do this:
sudo ufw allow proto tcp from 10.0.0.15 to any port 22
You can also use one of several handy iptables rule generators to generate an entire iptables ruleset.
Another suggestion (especially if this Ubuntu host will be on the Internet) would be to use SSH key pairs for authentication instead of passwords; I'd also disable root logins.
Answer: Worth noting - to catch the private address range (RFC1918) you probably want 192.168.0.0/16, -not- /8.
Comment: +1. That RFC recommends to limit the network part to not less than 16 bits for the 192.168 based networks. You could even take 192.168.0.0/24 which provides 254 possible addresses. More than enough for most private networks.


Why are charged pions are heavier than neutral pions?

Question: Why are charge pions heavier than neutral pions, whereas protons are lighter than neutrons?
Comment: Nice question! Related: [What's with the very slightly larger mass of the neutron compared to the proton?](https://physics.stackexchange.com/q/85/226902),  [What is the cause of the minor mass difference between the proton and the neutron?](https://physics.stackexchange.com/q/264420/226902), [Number of gluons inside a proton/neutron](https://physics.stackexchange.com/q/652758/226902).
Answer: Look at this illustration of the proton to get an idea of how complicated a hadron is.

There are the valence quarks that define the quantum numbers of the particles but the greatest effect on the mass comes from the additions of the innumerable four vectors of all those sea particles, up an down quarks have small masses and in addition in the bag of the hadron all quarks are off mass shell and obey quantum mechanical probability constraints.
So the answer is not simple. As you note , neutrons are heavier than protons, and the same is true for neutral kaons with respect to charged.  The Sigma baryons, have small mass differences and their study could help to  show which effects are dominant in determining the mass.
I believe the answer can only come through calculations, taking into account all factors, electromagnetic and strong. The masses of hadrons are an ongoing research in QCD on the lattice. , and maybe someday there will be a calculated answer for this behavior of pions.
Comment: Can you please tell me protons and neutrons are a different example because they are made up of different valence quarks. But pions and charged pions are made up of the same valence quarks, though, charged (EM) are heavier. Kaons are made up of the same valence quarks as charged kaons, but the neutral one is heavier. Does this mean that their mass depends more on the strong force then the EM charge?
Comment: @ÁrpádSzendrei  Yes, it s as the other answer says, it is a combination of electromagnetic repulsion and strong atrraction and I suppose the Pauli exclusion, that is why something  like lattice qcd is needed to calculate the total. The masses of the valence quarks do not add up even to t0 mev, but the mass of the pions is at a 100+ mev
Answer: As anna v says, hadrons are really complicated and you're not going to be able to do a full calculation without a lot of computer time. But you can get at least an idea by thinking about the quark model. The proton is $uud$, the neutron is $udd$, the $\pi^+$ is $u\bar{d}$ and $\pi^0$ is $\frac{1}{\sqrt{2}}(u\bar{u} - d\bar{d})$ (the - sign so that it's an isospin triplet).
The charge of the up quark is $+\frac{2}{3}$, and the charge of the down quark is $-\frac{1}{3}$. Their "current masses" are $m_u=2.2$ MeV and $m_d=4.7$ MeV (I'm not bothering with the uncertainties on these). If the up and down quarks had the same mass, and if we could turn off the electromagnetic interaction, then protons and neutrons would have the same mass, and charged and neutral pions would have the same mass. But they don't, and we can't, so they don't.
Now, let's look at the pions. The contribution of the quark masses to the $\pi^+$ mass is $m_u+m_d = 6.9$ MeV (the antiquarks have the same masses as the quarks), and the contribution to the $\pi^0$ mass is $\frac{1}{2}(2\times 2.2 + 2\times 4.7)=6.9$ MeV. (Note that this is nowhere near enough to explain the full mass of the pion. For that you need a full QCD calculation. But it is relevant for understanding the mass difference.) The contribution of the quark masses is the same in both pions, so the difference is most likely due to electromagnetic effects. In this case, we expect the charged pion to have some self-repulsion and so have a larger mass. As a rough estimate, the electrostatic energy of a uniformly-charged sphere of charge $Q$ and radius $r$ is $U=\frac{3}{5}\frac{Q^2}{r^2}$. The charge radius of the pion is something like 0.66 fm, so plugging in the numbers gives roughly 2 MeV, which is at least the right order of magnitude to explain the pion mass difference of 4.4 MeV.
Now to the nucleons. The contribution of the quark masses to the proton mass is $2\times 2.2 + 4.7=9.1$ MeV, and the contribution of quark masses to the neutron mass is $2.2 + 2\times 4.7=11.6$ MeV. Here we see that the neutron gets more contribution from quark masses (by 2.5 MeV) because it has more $d$ quarks. But the proton is charged, and so should have some electrostatic repulsion. Taking a charged sphere with radius $r=0.84$ fm, this gives an electrostatic repulsion of 1.2 MeV. So combining the 2.5 MeV excess for the neutron due to quark masses with the 1.2 MeV excess for the proton due to electrostatic repulsion suggests that the neutron should be heavier by 1.3 MeV.
This just so happens to be about the right value, but this was a very hand-waving calculation. At least it gives an idea of how the mass differences could come out as they do.
Answer: Best guess is that they have different quark compositions, and due to the strong interactions that take place within them, the combination of a d and u quark to make a charged pion is at a higher potential energy than having two d or two u to make a neutral pion, and since e=mc^2 the rest mass is also higher. Do correct me if this is wrong, though : )
Comment: Your answer lacks quality, as you are just guessing. Look at @annav's answer for a more realistic model.


Creating an Object Matrix in Blender 2.82

Question: To create an array of object in C4D, I would select the object, select a modifier, and enter the number of objects needed in the X, Y, and Z directions. Is there a similar method in Blender? Using the Matrix Modifier works but is not that simple.
Comment: did you test the "mirror" or "array" modifiers?
Answer: To get something that looks like this;

You can use a modifier stack that looks like this;

An array only goes in one direction at a time.


Is there an electric field due to a neutral current carrying wire?

Question: Consider an electrically neutral wire carrying a uniform current $I$ driven by a dc battery. It definitely produces a magnetic field at points around the wire which we can calculate using the Biot-Savart law or Ampere's law. I was wondering whether it also produces an electric field. My guess is "No". Though the mobile electrons are moving through the wire, at any instant of time each little piece of the wire remains electrically neutral. There is no unneutralized charge. So it produces no electric field outside. Does it stand to reason?
Comment: What do you mean by a "neutral wire"? It has a definite meaning in AC power distribution systems. But I'm not sure how you are using it in a battery circuit.
Comment: I mean that the wire is not charged by rubbing it, by induction etc.
Comment: In reality, yes. There are induced surface charges on the outside of the wire. Hence why you get a shock when you touch it. If no E field existed outside of a wire, you would feel no shock. However we mostly model wires as having no net charge density but non zero current density [a positive charge density, and occupying the same space , a sea of moving negative charge]. Even if there was no surface charges then there would still be an E field, but net zero average.I would like to add that a changing curent produces an induced electric field which cannot be ignored when analysing wave behavour
Answer: If the wire is at a different electrical potential than surrounding objects, it will have an electric field. The electrons in the wire will position themselves to support this field.
The charge imbalance in situations like this is extremely small (picocoulombs) from a material science or chemical perspective. A coulomb is only about 10^-5 mole of electrons. So, it is common to consider charge to be in balance in these problems.
This is a case where potential is a much more illuminating concept than charge.


Batman Arkham Knight 2015 Question about the controller

Question: I am curious as to what controller works with Arkham Knight PC, I have no issue using other games using x360ce. This is a screenshot that shows the controller map but what controller is it. http://steamcommunity.com/sharedfiles/filedetails/?id=687551726
Like it seems to be showing an LCD screen on the controller for Waynetech.
If anyone can help me figure this out it would be great I use a ps2 type gamepad and I use x360ce program for use with games that require the Xbox controller but i have no idea what kind of controller it's showing me nor have any idea what controller I should be trying to get or what software I could use.
Comment: That's a PS4 controller.  The screen is actually just a trackpad/button
Answer: The controller in your screenshot is easy to identify, for many reasons.  One is that it says "DUALSHOCK 4 Wireless Controller" at the top.  It's a PlayStation 4 controller, which has a trackpad.  It seems like touching the trackpad brings up WayneTech.
I played Arkham Knight on PC with an Xbox 360 controller and an Xbox One controller.  It seems like anything that can emulate an Xbox 360 controller (like your x360ce software ought to) would work.
Comment: I have never seen a controller like this before DualShock controllers are common being a 4 said nothing to me about what console it came from.I have never used consoles, in any case, thanks for identifying it for me, the odd thing is I can't get a controller to work for this game. Perhaps I'll try buying the actual 360 and Xbox 1 controllers to try and get it working.I have never used a controller before but had bought one for GTA V it was advertised as something like DualShock 2 or 3 USB gamepad.


owasp crs 3.0 rule functuonalityconsult

Question: I have built a waf and using CRS 3.0, this waf can inspect the request body to limit the file size that upload to the server, I am wondering ,if I just disable this feature manually, it will cause any CRS rule work unproperly? really appreciated for the answer .
Answer: CRS co-lead here. First, I would recommend to use the newest release of CRS 3.2.2: https://coreruleset.org/installation/ Usually you can just delete your old coreruleset files (maybe keeping your crs-setup.conf) and unzip the new ones over your old copy.
You can definitely limit the file size that's inspected. This will protect against DoS by sending huge requests. In mod_security2.conf, you have the variables:
SecRequestBodyLimit 104857603
SecRequestBodyNoFilesLimit 104857603
SecRequestBodyLimitAction Reject

The first ones limit the requests to a little more than 100MB (Internet Explorer uses a few more bytes). This should be enough for most applications, but if your app requires bigger requests you can increase this value.
The last line will tell the firewall what to do with larger requests: do you want to block all larger requests? If you use Reject, it will keep your security high, but large requests will be rejected. This may not be acceptable for you. If you use ProcessPartial, only the first 100MB will be scanned so you still have some protection but not completely.
Comment: Really appreciated the feedback, if I just disable the option "inspect the request body". what value should be in the below three lines?       SecRequestBodyLimit "what value should be"
SecRequestBodyNoFilesLimit "what value should be"
SecRequestBodyLimitAction "what value should be"
Comment: Hi, I don't understand your message, could you try explaining it to me again?

owasp crs 3.0 rule functuonalityconsult


Is there a spell checker. I couldn't find one

Question: I always have trouble spelling, or more likely, getting the letters in the right order.  I can't look up a word in the dictionary if I can't spell it.  I could use a spell checker that looks at the first two letters and suggests spellings.
Comment: Many websites that accept text entry do not have a separate spell-checker because most browsers have the ability to detect spelling errors and to suggest alternatives. Which browser do you use to view SE?
Comment: I call those "auto-complete" features.
Comment: Are you talking about texting spell checkers-- those that offer suggestions before the word is complete?
Answer: The StackExchange sites do not have a spell-checker, so it depends on your browser...
I've recently become a convert to Chrome, and one of the features I really like is its built-in spell-checker.
Answer:
It's been awhile since I used a web browser that did not provide an integrated spell-checker. So I would say, increasingly, that spell-checking has become a client-side issue rather than something that every website should have to provide.
It would simply be a waste of the development team's resources.

I wrote that over three years ago.
Such a basic tool should be available through your browser. If it isn't, it's time to switch browsers or upgrade. There's no value to having each website spend resources providing that is already available (and much more functional) elsewhere.
Comment: I don't think suggesting someone upgrade their browser is being beastly. This is solid advice. ;) Here's a link to [Google Chrome](https://www.google.com/intl/en/chrome/browser/), which is an awesome browser.
Comment: Robert "Three years ago" is three years longer than Sharon H has been a member. I found the comments on Podcast 33 about the initial experience of new users very instructive.
Comment: @Gene G : Robert reproduced the material he produced 3 years ago, so (I suspect) recognised that Sharon H hadn't been a member that long. He also explained why it wasn't a good idea for Stackexchange to duplicate browser functionality. I can't see anything beastly.
Comment: @RobertCartaino let's please not be beastly to the newbies
Comment: I guess I was reacting to the note a bit.


Share internet connection from a pi 4 to a pi 0 non W via USB

Question: I connected a raspberry pi 0 to a raspberry pi 4b+ via USB and i would like to know how can i share the internet connection. The pi4 is connected to the internet via the ethernet port.
P.S.: I did all the configuration needed for the pi0 (loaded dwc2, gether and the rest), also both pi run lattest version of raspbian
Answer: This is how I achieved it:

on the pi4
to /etc/dhcpcd.conf [before the first line that starts with interface or to the end of the file, if no such lines exists]
denyinterfaces eth0 usb0

to the end of the file, add
interface br0

create the following files in /etc/systemd/network - note, the names of the files are unimportant, the important thing is the extension (.netdev/.network) and the content
bridge-br0.netdev
[NetDev]
Name=br0
Kind=bridge

br0-member-eth0.network
[Match]
Name=eth0

[Network]
Bridge=br0

br0-member-usb0.network
[Match]
Name=usb0

[Network]
Bridge=br0

enable systemd-networkd
systemctl enable systemd-networkd

Thats it for the pi4

on the pi 0
add the following the end of /etc/dhcpcd.conf
interface usb0

Though, I've done the following (as fallback in case DHCP fails)
profile static_usb0
static ip_address=192.168.1.122/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

interface usb0
fallback static_usb0

Obviously, you'd need to use your own local ip address, router and dns address as required
Comment: i tryed this 2 times , one time i couldnt connect my pi4 to the internet, and the other one i got the pi 0 connected to the internet, but the pi 4 could connect again
Comment: Not sure what part you did wrong then - works great for me
Answer: I tried the Solution from @Jaromanda X but unfortunately it didn't work for me. This instruction helped me very much: Cannot get internet from pizero connected to pi3 via USB (eth0 to usb0)
This is what I did:

on the pi 3/4

The RaspberryPi needs a static IP-adress. You can either configure it in your Router (what I did) or you can set a static IP-adress in /etc/dhcpcd.conf like this:

# [/etc/dhcpcd.conf]

interface eth0
static_routers=192.168.178.1  # The IP-address of your router
static domain_name_servers=192.168.178.1
static ip_address=192.168.178.XX/24  # replace XX through any IP-address you want

You need a network interface for your USB-connection which you can also add in /etc/dhcpcd.conf:

# [/etc/dhcpcd.conf]

# Subnet for usb0 (where the piZero is plugged)
interface usb0
static ip_address=10.0.11.1/24

enable IP-forwarding by uncommenting/adding the following in /etc/sysctl.conf:

# [/etc/sysctl.conf]

net.ipv4.ip_forward=1

Configure the firewall of the RaspberryPi by executing the following commands in the terminal:

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o usb0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i usb0 -o eth0 -j ACCEPT

Consider that these changes are only temporary. I put these commands into /etc/rc.local so that they are executed at every start of the pi.
(I don't know if this is the best and recommended way to make the firewall settings persistent but it works)
on the pi zero
Setup the USB-inteface in /etc/dhcpcd.conf like this:
interface usb0
static ip_address=10.0.11.2
static routers=10.0.11.1
static domain_name_servers=22.214.171.124  # (Google DNS)

I also enabled dwc2 but I'm not sure if it's required.
Now you should be able to ping other devices in the internet or in your local network (e.g. 192.168.178.xx) from your RaspberryPi zero.

Consider that you are not able to access the RaspberryPi Zero from your local network because it is in the subnet (10.0.11.xx).
To solve this I added a static route in my FritzBox
(Home Network --> Network --> Network Settings --> IPv4-routes)

I used this to setup the clusterhat manually. It was very difficult to create a setup like this because there are barely tutorials on the internet according to the clusterhat respectively to connecting a RaspberryPi zero without WLAN to another RaspberryPi via USB.
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).


Wondering if it's possible to 'extend' a texture beyond the mesh without altering the mesh itself

Question: I'm in Blender and working with a pre-existing 3D model- I want to add more length to it, but I don't want to mess with the mesh- Is it possible to extend the texture beyond the mesh without changing it, or will I have to change the mesh anyways? Are there any shortcuts around changing the mesh?
Answer: Textures are applied to the faces of a mesh, so textures cannot be anywhere there isn't a face for it to appear on. "Adding more length" to a mesh pretty much implies moving some of the vertices. I don't think you're going to get around that.
Now if you are assembling a game world, it's quite common to have modular mesh pieces that can be aligned end-to-end, or placed intersecting each other, to form larger structures—like a wall panel that can be duplicated several times to form a longer wall, for instance, without needing a new mesh to be built specifically for that wall.


How to treat '' error?

Question: After installing pypfopt and u-numpy, dataframe.info() command shows this error.
TypeError: Cannot interpret '<attribute 'dtype' of 'numpy.generic' objects>' as a data type

Answer: I happened to mix my versions and I encountered the problem today. I managed to fix it.
Both codes in jupyter gave me an error: TypeError: Cannot interpret '<attribute 'dtype' of 'numpy.generic' objects>' as a data type
df.info()
df.categorical_column_name.value_counts().plot.bar()

I got the error: TypeError: Cannot interpret '<attribute 'dtype' of 'numpy.generic' objects>' as a data type
This is how i fixed it
Inside jupyter:
Check numpy version:
import numpy as np
print(np.__version__)

To upgrade:
!pip3 install numpy --upgrade

Inside Command line check numpy version:
python
import numpy
print(numpy.__version__)

if versions are not the same choose whether to upgrade/downgrade:
To upgrade:
$pip install numpy --upgrade

To downgrade just specify the version
If you have python environment installed:
Go to the right folder:
Check the installed version:
$pipenv --version

To verify if you have a pip environment installed for that folder:
On your terminal Go to the folder and type:
$pipenv --version

If there is a pipenv it will show the version and if there is none it won't.
check numpy version
$python
>>> import numpy
#prints the version
>>> print(numpy__version__)

To upgrade the version:
>>>exit()

#To install the latest version don't specify the version
$pipenv install numpy

#if you want to downgrade specify the version
$pipenv install numpy=version_type

Do the same for pandas. Note that with pandas if your pandas environment is 1.2.3 on the jupyter notebook upgrade with !pip install pandas==1.2.3 or just !pip install pandas --upgrade --user.
Note that if the commands are giving you an error always include --user at the end of the command.
To create a new environment using miniconda and install updated packages follow the link [https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html][1]
Run the following commands from a terminal window:

conda create -n name_of_my_env python
This will create a minimal environment with only Python installed in it. To put your self inside this environment run:

source activate name_of_my_env
On Windows the command is:
2. activate name_of_my_env
The final step required is to install pandas. This can be done with the following command:
conda install pandas
To install a specific pandas version:

conda install pandas=0.20.3

I prefer using the latest version of pandas 1.2.3
However the first method should solve your problem. Always restart your notebook by closing and reopening it.
I will stick around to see if you are winning. But this will resolve your problem. The problem is caused by the versions of numpy and pandas
[1]: https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html
Answer: I fixed this type error downgrading numpy version to 1.16.5.
Try it!
Use code below in your jupyter notebook to downgrade your numpy:
!pip install numpy==1.16.5
My pandas version: 0.24.2
Comment: My pandas version is 1.0.x and also required numpy==1.16 to work..
Comment: Solved the problem even in Datbricks. Thanks!
Answer: downgrading to numpy==1.19.5 works
Use below command to downgrade in anaconda prompt:
python -m pip install numpy==1.19.5
Comment: You can use the jupyter notebook to downgrade the NumPy version. Use command: pip install numpy==1.19.5
Answer: Here's a link to the numpy issue associated with this error:  https://github.com/numpy/numpy/issues/18355.  A succinct fix is given there (in https://github.com/numpy/numpy/issues/18355#issuecomment-1029684903):
pip install --upgrade numpy
pip install --upgrade pandas

Answer: The issue is because of the non-compatibility of NumPy and pandas versions. I couldn't downgrade my NumPy for some odd reasons as others suggested from Anaconda. But found this link helpful
Downgrading pandas
to 1.3 and with the existing NumPy version set at 1.20.1, helped me to overcome this issue.
Answer: In my case, restarting the kernel fixed the error. Hope it saves someone time as I was reading pandas source code to figure out what the hell was happening :))
Answer: Just go to the terminal provided in Jupyter Notebook by clicking "New" and then "Terminal" inside "New" and type:
pip install pandas --upgrade
this will fix the error
as it worked for me.
Answer: I fixed it by updating all packages in my Anaconda Navigator Environments
Answer: U might have the latest version of NumPy which may not be compatible, so downgrade your NumPy version. I have downgraded to 1.17.2
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).
Comment: This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/30690957)

How to treat '' error?


Does Wind Demon card 648 cause it to attack twice if it can spend wind?

Question: Wind Demon card #648 shows a template attack and then says "[spend wind] +1 Attack [different template]". If wind is available to spend, does it make two attacks (one with the first template, the second with the larger template)? Or is the "spend wind" effect meant to modify the first attack (so it gets +1 attack and uses the larger template instead of the smaller)? It is not clear from the card and we cannot find clarification in the rule book.
Answer:
The rules say

Elemental infusions can be used to augment the effects of certain abilities.

So if wind is consumed the wind demon will perform move + 0 and Attack +1 with the greater AOE.
If it was to perform at attack again it would say Attack +X, If you look at this Cave Bear card for comparison which has two attacks.
Comment: Re "*If it was to perform at attack again it would say Attack +X*", Succinctly, *Attack X* and *Attack +X* add an attack action, while *+X Attack* adds to an existing attack action.


When you play poker in Red Dead Redemption, is the "look around" option actually useful?

Question: In Red Dead Redemption, during the poker game, you can look around at other people's faces. I assume there's a use of this option, but I wasn't able to get any hint when it may be. Does it actually have a purpose, or is it just for game immersion ?
Answer: Well technically it has a purpose and also adds to game immersion ;)
In all seriousness the NPC players give off tells as well as change their tones/mannerisms slightly depending on past hands and their current hands. The look around option gives you a chance to watch for those tells and play accordingly. It can also give you a better idea of when to cheat, since most of the time the other players will catch you (if you're as bad at it as I am).
Comment: do you have any examples of such behaviors ?
Comment: I don't have specific gameplay footage (I'm sure youtube has some) but I've seen NPCs act differently as [this thread](http://reddeadfans.com/viewtopic.php?f=17&p=1430) mentions.
Answer: If you look around after several hands you can tell who is bluffing and who has a good hand. You can also use it to determine if you can get away with cheating.
Comment: ? If i could downvote i would. Op is asking *how* to do this
Comment: If you want I can delete my response. I was just agreeing with the first answer and since I cant up vote or put in a comment I just added it as an answer.


Do immigration official check return ticket status, whether it is cancelled or not?

Question: One must have return ticket at immigration. Do immigration official check return ticket status, whether it is cancelled or not?
Comment: immigration officials (and airline staff, who won't board you if they feel you won't be admitted) vary wildly. Some will simply take your word for the existence of a ticket, or accept something nonofficial like a printout of your itinerary that you made yourself. Others will demand an official thing from an airline and perhaps they actually check that you didn't cancel it yet. Asking about the officials in just one country (ideally in just one airport) might make this answerable, but as written it is far too broad.
Comment: "One must have return ticket at immigration." That certainly not true everywhere. You must convince the immigration officer that you'll leave at the appropriate time and possessing a return ticket may be part of that. But this question is unanswerably broad. There are over 200 countries in the world and most of them have their own rules and policies.
Comment: @KateGregory Really?  I would find it exceedingly unlikely that an immigration official anywhere in the world would check whether a ticket is really valid, unless you've already aroused a lot of other suspicions.
Comment: @DavidRicherby furthermore, in some places, it's only true for certain visitors.  For example, in the US, visitors with B visas have no return ticket requirement, nor do visa waiver program visitors arriving by land.  VWP visitors arriving by air or sea do need one, but I don't think it is checked routinely.
Answer: Do they? Usually not.
Can they? Yes. If you've presented concerns that you may not have been truthful or that you may have immigration or other intent, then immigration officers have very broad powers - including verifying your itinerary with airline, hotels, your receiving party, your workplace, etc.
Their computer may or may not have a direct link to the airline ticketing systems, but it's easy enough for them to verify by phoning the airline.
If you're at any risk for this, buy a refundable ticket that you can cancel at any time or date such as after you've entered. Or simply don't lie to immigration officers. Lying to an immigration officer can lead to a multi-year or lifetime ban.


What were the bolts on Frankenstein's Monster for?

Question: We've all seen them, but what were they for? Were they fasteners used to hold Mary Shelley's creature's head on, which would be suspicious, since she didn't use bolts to attach it's limbs, or were they merely used as conduits to route the energy needed to reanimate Dr. Frankenstein's creation?
Comment: I don't think Mary Shelley came up with the bolts.  They seem like a Hollywood addition.
Comment: @Wad_Cheber, can confirm, wrote an essay on the fact xD incidentally too much English Literature is making me desperate to edit "monster" in the title to "creature" hah
Answer: This article credits The man who invented Frankenstein's Monster's Bolt to Jack Pierce a make-up artist for the classic Hollywood adaptation. The bolts themselves are described as:

"actually electrodes used to conduct the electricity used to bring the monster to life."
Answer: The bolts, green complexion and low IQ are all attributes that were added in the films. In the original gothic novel, Shelley's creature is loving, well-read, and intelligent. He becomes vengeful and monstrous only after his repeated attempts at acceptance and love are rejected.
Answer: I think it was a way to transfer the electricity from the lightning through the creature's body, and into it's heart, reanimating it thusly
Comment: Do you have anything extra that isn't covered in NominSim's answer?


Java derby over socket

Question: I have this new project in java. I connected the client to the server via TCP/IP over port 3000. It connects successfully... However, I also want to embed a database into the the server application and be able to query the database from the client end.
What is the syntax for sending statements via a socket to the server application, which should query the database and send the data back to the client end?
e.g. "SELECT * FROM users"
Answer: If you're writing your own application networking protocol, you can use any syntax you want, though beware: this is a big project.
If you instead use the Derby Network Server and Derby Network Client to perform the client-server aspects of your application, you can use JDBC as the API for sending statements to the server and retrieving results back. See http://db.apache.org/derby/docs/10.9/getstart/twwdactivity4.html for a tutorial which demonstrates this.
Note that this is the most advanced of the Derby tutorials, so if you're unfamiliar with Derby and with Java, you should start with the first tutorial and work your way through them.

Java derby over socket


2002 gmc sierra 2wd rpms rise when applying brakes

Question: Truck is 2wd 5.3 v8 non flex fuel
When driving anywhere from 60mph to 80mph rpms rise when I lightly tap or touch the brake pedal.
I also get intermittent abs and brake warning lights when hitting bumps
Answer: I think you have two different issues here.
The first one sounds like you have a vacuum leak in your brake servo/booster.  When you press the brake, the booster uses vacuum provided by the air intake of the engine to assist with braking.  If there is a leak in the booster, unmetered air will be allowed into the engine air intake which will make the engine act as though you have pressed the throttle slightly causing an rise in revs.
The second fault is likely a faulty ABS electrical cable running from the vehicle body to the sensor on one of the wheel hubs.  The wire is likely snapped internally causing an intermittent connection when it flexes when going over bumps.
Comment: Just replaced wheel hubs and sensors. I have checked for vacuum leaks. would it be possible it could be a booster damaged internally? Also my brake pedal is firm but not hard or spongy and abs still works. my wheels don't lock up
Comment: Bad grounds? Possibility?
Answer: When cruising at a steady 60-80 mph on level ground you'll be in overdrive and your torque converter should be locked up. If you hit the brakes even momentarily, either overdrive or the torque converter or both will disengage. This is the normal and intended behavior, and either will cause your RPM to rise while maintaining a constant road speed.
When overdrive disengages, RPM will rise at the same instant that you tap the brakes. When the torque converter lockup disengages, RPM will rise as soon as you get back on the gas pedal. In both cases, RPM should fall to its previous reading when the algorithm decides that the excitement is over and it's time for a steady cruise again.
To diagnose the ABS problem, you need to read codes. Come back with codes and someone will help you.
Comment: No codes present when scanned. lights are random could take 3- 4 days or twice a day. even with the lights on no code.
Comment: Faulty ground/s maybe ?
Comment: @Joe. Check your brake fluid level. If the vehicle has a brake fluid level sensor and the fluid is low, bumps would cause sloshing and a low fluid warning.


java.util.logger.Logger.getAnonymousLogger() throws NullPointerException

Question: I just upgraded my Java plugin to 1.7.0_25, which caused a fatal error with an applet I wrote several years ago (and have been maintaining since).
Early in the applet's init() method I call
logger = Logger.getAnonymousLogger();

This call has been running since Java 1.4.2 without a problem. Now, with Java 1.7.0_25 (on Windows 7 at least; I've no Mac or Linux machine to test with here), the first time the applet is loaded, it works just fine. However if the applet's browser page is closed and the page loaded again, the applet fails with the following console message:
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 756747 us, pluginInit dt 76093467 us, TotalTime: 76850214 us java.lang.NullPointerException
    at java.util.logging.Logger.doSetParent(Unknown Source)
    at java.util.logging.Logger.getAnonymousLogger(Unknown Source)
    at java.util.logging.Logger.getAnonymousLogger(Unknown Source)
    at com.optix.applet.viewer.ObjectViewer.init(ObjectViewer.java:214)
    at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Ignored exception: java.lang.NullPointerException

To load the applet again, I must close and restart the browser.
This has never happened with any previous Java release since java.util.logger was introduced in Java 1.4.
There should be no permissions problem: I've added to META-INF/MANFEST.MF the new attributes
Permissions: all-permissions
Codebase: *

as called for in http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/no_redeploy.html.
The applet is signed with a current GoDaddy certificate and timestamped.
I found that if I create the logger with
logger = Logger.getLogger(String);

the applet will load every time.
I can find nothing on this error. Has anyone seen it? Would anyone know what caused it to appear with Java 1.7.0_25 or why the call would work once in a browser session but not a second time?
Comment: Raise a new bug report and see what Oracle says.
Answer: I have exactly the same problem on Linux.
This is the relevant bug report from Oracle.
Comment: Yes, that's it. And duplicate "JI-9004402 - NullPointerException from Logger.doSetParent in applet" is my submission made June 24th, with example, stack trace, etc. At that time, 4 days after this bug report, there was still no listing for it in the bug database. Thanks.


Hole diameter vs Screw Diameter

Question: I am working with a normalized ball-screw drive where the nut has holes for screws to screw onto the moving part. The catalogue says these holes have diameter 13.5 mm. What is the appropriate screw size (metric) to use on such a part?
Comment: Zeus tables will help here...
Comment: 12 mm would be the next common size, I would have thought, but it leaves a lot of play. Is there any other keying or down pin location?
Answer: I would suggest you use the largest diameter bolt you can find that fits through the hole, and that you can be sure you'll be able to install properly. By "install properly" I mean that you leave enough clearance between the bolt and 13.5mm hole to account for misplacement of the holes in whatever you're mounting the nut to.
In my work, when I design a clearance hole for a bolt, I usually go 0.5mm above the nominal size of a bolt, and we feel comfortable going down to 0.2mm above nominal if we need a more snug feet. A 13.5mm hole for a 12mm bolt is a lot of slop, so I would suggest a small washer if you go this route.
If you have imperial sizing available, a 1/2" bolt will have a nominal diameter of 12.7mm, so that would probably actually be your best bet. 13mm bolts do exist, but they're not common.

Hole diameter vs Screw Diameter


Canon 50mm f/1.8 lens won't go down to f/1.8

Question: Bought a 1.8 lens.
Today on manual I realised it won't go down to f/1.8, the lowest is f/2.8, but on other modes it does.
The camera is a Canon 5Ds.
p.s - just moved to canon so is there a setting I've missed?
Comment: To confirm, you are using manual exposure mode (and not manual something else, such as manual focus or manual AF point election)? What metering mode are you using?
Comment: What camera are you using it on? Are you trying to use it in bright light?
Comment: EOS 5DS and not bright light but I turned the light of aswell and won't scroll down to 1.8, but on auto with the light off it takes it at 1.8
Comment: Will the aperture respond to the rear control wheel to go up (to an aperture narrower than f/2.8)?
Answer: Is the "Lock" switch near the bottom on the right side of the back of the camera slid to the right in the 'Lock' position?

If so, is the control you are trying to use to change the aperture selected under Custom Function C.Fn3: Others → Multi function lock?

By default, the rear 'Quick Control Dial' on the back of the camera is locked by the Lock switch. Moving the 'Quick Control Dial' when it is locked will have no effect on the setting it is set to adjust. The 'Main Dial' (directly behind the shutter button) can also be selected to be locked, as can the eight-way 'Multicontroller' (often called the "joystick").
Another possibility is that you have 'Safety Shift' enabled, along with using the camera's "slowest" allowed ISO and "fastest" (shortest) shutter duration. If 'Safety Shift' is enabled and there's too much light at the chosen (or lowest allowed) ISO and fastest allowed shutter speed, then the only thing the camera has left to "shift" is the aperture.
For instance, if you are outdoors in bright light and the camera's fastest Tv is 1/8000 at ISO 100, that may still be too much light to allow a proper exposure at f/1.8. In fact, f/2.8 sounds about right in that scenario. 1/8000, f/2.8 at ISO 100 is EV 15, which is pretty much what direct sunlight with no clouds will give you.
Even if you are in dimmer light, if you have the ISO setting manually selected at a relatively high value, such as ISO 3200 or ISO 6400, and the shutter time at a relatively slow (longer) value, such as 1/60 second, then with 'Safety Shift' enabled and 'Av' selected within the 'Safety Shift' settings menu, the camera will stop down the aperture to prevent overexposure.
Please see pages 405-408 of your EOS 5Ds / EOS 5Ds R Instruction Manual.


How do I inflate this bicycle tire valve?

Question: I inherited this bike with this funny looking stem. Is this broken? How do I inflate it?
Comment: Note what the other answer in the link mentions at the end. The top part must be *unscrewed* first.
Answer: This is what's known as a Presta valve. It doesn't look broken, it looks like it is all there and the valve is in the open position because the captive nut at the very tip of it has been unscrewed.
You can test if it is working by just nudging the end of it upwards briefly, some air should escape. This is good to do before inflating anyway to see that the valve has not become stuck before you pump.
You need a Presta compatible pump (some have a double head and some can be converted), or a small brass 'Presta valve adapter' to convert from a normal car valve (Schrader) type pump.
A 'track pump' is a bicycle specific pump that typically has a head that suits both type of valve and is available from all good bike shops.
Here is an image showing operation of my preferred style of pump head, that I found online on multiple sites with no attribution (but probably Topeak themselves):
Comment: Yes, that's a Topeak pump chuck.


How do I clear history of the bash logs? Also, do not log any of my users' bash logs?

Question: How do I do that?
I want to clear everything as well as not log anything from now on.
Answer: To clear the history
history -c

To stop new bash commands being added to the history
unset HISTFILE

To stop history permanently for you
echo "unset HISTFILE" >> ~/.bash_profile

To stop history permanently for all users
echo "unset HISTFILE" >> /etc/profile

For information the history is stored in your home folder as ~/.bash_history.
Answer: Clear history:
history -c for a single user, find /home -name .bash_history -delete for any user whose $HOME directory is in /home.
Disable history: Put unset HISTFILE in your ~/.bashrc or in the global /etc/bash.bashrc.


Can I remove/hide the "Provide a Menu Link" checkbox when creating new content type?

Question: I am creating a site where authenticated users (not too computer savvy) will be entering in data to the content types we create and the "Provide a Menu Link" may cause them too much trouble.  Is there a way to remove or hide this option when I create my custom content types?
Comment: Yes by using `hook_form_alter` unset the variable.
Comment: @Sumit, _DO NOT UNSET_ form parts, as that risks seriously breaking things further down the chain, instead set `'#access' => FALSE`.
Comment: @Letharion yeah right I forgot about '#access' key. :(
Answer: In drupal 7, go to edit your content type and in the tabs at the bottom there should be 'menu settings'. If none of the checkboxes under 'Available menus' are checked, then the option of creating a menu item is not displayed when creating content of that type.
Answer: You can do this by creating a special role for your non-computer savvy users (go to People menu, then click on Roles tab and add a role). Once you have their role defined, that role will now appear as a long list of checkboxes on the right under the Permissions tab. Scroll down and make sure you uncheck the Menus (Administer menus and menu items) permission. This should prevent them from ever seeing the "Provide a Menu Link" tab when they edit content and/or messing up your menu structure. You can verify this by logging in as that role and then adding/editing content.  This also gives higher-level users with Menu permissions (like yourself) the ability to edit menu preferences and tidy up as needed.
Answer: If the users do not have the rights to add new menu items, the option should not be visible to them.
Comment: Sounds to me like he's talking about menu settings when adding content, not adding a menu item.
Comment: Wheter a menu item is added while editing content or in the menu administration dialogs doesn't matter. It's conrolled by the same access rights.
Comment: ahh, true. Your are correct.


Does Plesk hold statistics about cms used?

Question: I have a server which hosts numerous domains.  Does Plesk have some kind of statistics that allows me to see what each domain has in them in respect to CMS and the like or do I have to go through each individual domain to find this out?
Answer: Using Plesk, it is not possible to know which CMS is installed on your client account.
You need to iterate each of your domains and see the installments.
Answer: If you talking about applications installed on domain from APS catalog, so there is page in Plesk 11 in server settings: Server > Applications & Databases > Application Vault.
Obviously, there is no statistics for custom applications installed by user manually.
But why you need such information? What is the final goal?


Perimeter of tilted latitude of earth

Question: is there any formula for the perimeter (or length) of part of latitude A degree north of earth, which gets sun light, when tilted towards sun by an angle B degrees??
Comment: It sounds like you are asking about the length of a circle of constant latitude.  Of course if the oblate spheroid shape of the earth is taken into account, some measurements of the length of a degree of longitude (at given latitude) will provide an answer.  Are you looking for a table of such data, or for a formula that fits the data?
Answer: If the Sun is at declination $\delta$, then at latitude $\beta$, the semi-diurnal arc $\Delta$ is given by
$$
\cos(\Delta)=-\tan(\delta)\tan(\beta)\tag{1}
$$
Assuming that the Earth is a sphere of radius $R$, we can adjust $(1)$ to get the length of the portion of a parallel of latitude along which the Sun is above the horizon, we get
$$
2R\cos(\beta)\arccos(-\tan(\delta)\tan(\beta))\tag{2}
$$
The arccosine needs to be taken in radians.
For example, at mid-summer, the declination of the Sun is approximately $23^\circ27^\prime$ and the latitude of Bangalore is $12^\circ59^\prime$, assuming the radius of the Earth is $6371$ km, we get a length of $20747$ km.

Computation of Semi-Diurnal Arc
Since declination, latitude, and altitude are all measured from a point $90^\circ$ from the pole, the triangle of relevant angles on the sphere looks like
$\hspace{3.5 cm}$
where co-$\beta$ is the complement of the latitude, co-$\delta$ is the complement of the declination, $\Delta\lambda$ is the difference in hour angles or longitude, and co-alt is the complement of the altitude. The Spherical Law of Cosines says
$$
\sin(\text{alt})=\sin(\delta)\sin(\beta)+\cos(\delta)\cos(\beta)\cos(\Delta\lambda)\tag{3}
$$
When the Sun is on the horizon, it has an altitude of $0$. Thus, we get
$$
\cos(\Delta\lambda)=-\tan(\delta)\tan(\beta)\tag{4}
$$
which is the formula in $(1)$.

Perimeter of tilted latitude of earth


How to switch table prefix in a module in Drupal 6?

Question: I have multiple sites setup on a single MySQL database in Drupal 6. The sites each have their own prefix, such as site1_, site2_, etc. I'm wondering how I can switch the current table prefix inside of a module to check the variables on each site. For example, I want to check the preprocess_css variable on every site by looping through each sites settings file and running variable_get('preprocess_css') and get the variable for each site. I can get the table prefix and get the variable using db_query on the variables table, but I know there has to be a way to set the current table prefix inside a module so I can just run variable_get inside a loop with each table prefix. Does anyone know how this can be done?
Answer: The prefix is stored as one of the variables in the settings.php file, all of which are made global early on in the page build process.
That in mind, you can do something as easy as:
$GLOBALS['db_prefix'] = 'db1_';
print variable_get('site_name', 'default'); // Site name from first set of tables

$GLOBALS['db_prefix'] = 'db2_';
print variable_get('site_name', 'default'); // Site name from second set of tables

Bear in mind that this change won't persist across page loads so you'll need to do your processing in a single load, or implement some sort of system to track which prefix you should currently be using.
Answer: The problem with variable_get() is that it doesn't read values from the database, but from a global variable, which is initialized during the Drupal bootstrap.
function variable_get($name, $default) {
  global $conf;

  return isset($conf[$name]) ? $conf[$name] : $default;
}

What you should do is use code similar to the following one.
$variables = array();
$old_db_prefix = $GLOBALS['db_prefix'];
$GLOBALS['db_prefix'] = 'site1_';
$result = db_query('SELECT * FROM {variable}');

while ($variable = db_fetch_object($result)) {
  $variables[$variable->name] = unserialize($variable->value);
}

$GLOBALS['db_prefix'] = $old_db_prefix;

Then you can read the value of, e.g., preprocess_css, with $variables['preprocess_css'].
You could use code similar to the following one.
function mymodule_variable_get($db_prefix, $name, $default) {
  $old_db_prefix = $GLOBALS['db_prefix'];
  $GLOBALS['db_prefix'] = $db_prefix;
  $value = db_result(db_query("SELECT value FROM {variable} WHERE name = '%s'", array($name)));
  $GLOBALS['db_prefix'] = $old_db_prefix;

  return !empty($value) ? unserialize($value) : $default;
}

Bear in mind that some Drupal variables can be overridden with a value set in the settings.php file, which can contains code similar to the following one.
$conf = array(
  'preprocess_css' => FALSE,
);

What you read from the database could not be the value set for that Drupal site, for the Drupal variable you are reading.


Entity Framework -- How to set properties to special types

Question: I'm new to MVC and Entity Framework, so this may be a relatively simple answer, but I've tried searching around so far and no luck.
I'm using the most recent versions of both tools to my knowledge (MVC 3 Beta and Entity Framework 4.0)
I'm just trying to set up a quick example. Logically, I'm dealing with events -- in this case, an OngoingServiceEvent and a FiniteServiceEvent, which both inherit from ServiceEvent. I have a Locations Entity, which has LongLatLocation and AddressLocation that inherit from it.
I would like to specify a location in ServiceEvent, and have it be of type Location, but the types seem limited to those in the database.
What's the course of action in this scenario? Is this what I want to do, or am I confused on the implementation of what I want?
Thanks in advance for any help you can give!
Answer: You're looking for a feature called Complex Types.  Best answer I can give is the MSDN documentation.


Issuing a synchronous HTTP GET request or invoking shell script in JavaScript from iOS UIAutomation

Question: I am trying to use Apple's UIAutomation to write unit tests for an iOS Application that has a server-side component. In order to setup the test server in various states (as well as simulate two clients communicating through my server), I would like to issue HTTP get requests from within my javascript-based test.
Can anyone provide an example of how to either issue HTTP GET requests directly from within UIAutomation javascript tests, or how to invoke a shell script from within my UIAutomation javascript tests?
FWIW, most of the core objects made available by all browsers are missing within the UIAutomation runtime. Try to use XMLHTTPRequest for example and you will get an exception reporting that it cannot find the variable.
Thanks!
Answer: Folks,
I was able to work around this by sending HTTP requests to the iOS client to process and return the results in a UIAlertView. Note that all iOS code modifications are wrapped in #if DEBUG conditional compilation directives.
First, setup your client to send out notifications in the event of a device shake. Read this post for more information.
Next, in your iOS main app delegate add this code:
[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(deviceShakenShowDebug:)
                                             name:@"DeviceShaken"
                                           object:nil];

Then add a method that looks something like this:
- (void) deviceShakenShowDebug:(id)sender
{
    if (!self.textFieldEnterDebugArgs)
    {
        self.textFieldEnterDebugArgs = [[[UITextField alloc] initWithFrame:CGRectMake(0, 0, 260.0, 25.0)] autorelease];
        self.textFieldEnterDebugArgs.accessibilityLabel = @"AlertDebugArgsField";
        self.textFieldEnterDebugArgs.isAccessibilityElement = YES;
        [self.textFieldEnterDebugArgs setBackgroundColor:[UIColor whiteColor]];
        [self.tabBarController.selectedViewController.view addSubview:self.textFieldEnterDebugArgs];
        [self.tabBarController.selectedViewController.view bringSubviewToFront:self.textFieldEnterDebugArgs];
    }
    else
    {
        if ([self.textFieldEnterDebugArgs.text length] > 0)
        {
            if ([self.textFieldEnterDebugArgs.text hasPrefix:@"http://"])
            {
                [self doDebugHttpRequest:self.textFieldEnterDebugArgs.text];
            }
        }
    }
}

- (void)requestDidFinishLoad:(TTURLRequest*)request
{
        NSString *response = [[[NSString alloc] initWithData:((TTURLDataResponse*)request.response).data
                                                    encoding:NSUTF8StringEncoding] autorelease];

        UIAlertView *resultAlert =
            [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Request Loaded",@"")
                                       message:response
                                      delegate:nil
                             cancelButtonTitle:NSLocalizedString(@"OK",@"")
                             otherButtonTitles:nil] autorelease];
        resultAlert.accessibilityLabel = @"AlertDebugResult";
        [resultAlert show];
}

This code will add a UITextField to the very top view controller after a shake, slapped right above any navigation bar or other UI element. UIAutomation, or you the user, can manually enter a URL into this UITextField. When you shake the device again, if the text begins with "http" it will issue an HTTP request in code (exercise for the reader to implement doDebugHttpRequest).
Then, in my UIAutomation JavaScript file, I have defined the following two functions:
function httpGet(url, delayInSec) {
  if (!delayInSec) delay = 1;
  var alertDebugResultSeen = false;
  var httpResponseValue = null;

  UIATarget.onAlert = function onAlert(alert) {
    httpResponseValue = alert.staticTexts().toArray()[1].name();
    alert.buttons()[0].tap();
    alertDebugResultSeen = true;
  }

  var target = UIATarget.localTarget();
  var application = target.frontMostApp();
  target.shake(); // bring up the input field
  application.mainWindow().textFields()["AlertDebugArgsField"].setValue(url);
  target.shake(); // send back to be processed
  target.delay(delayInSec);
  assertTrue(alertDebugResultSeen);
  return httpResponseValue;
}

function httpGetJSON(url, delayInSec) {
  var response = httpGet(url, delayInSec);
  return eval('(' + response + ')');
}

Now, in my javascript file, I can call
httpGet('http://localhost:3000/do_something')

and it will execute an HTTP request. If I want JSON data back from the server, I call
var jsonResponse = httpGetJSON('http://localhost:3000/do_something')

If I know it is going to be a long-running call, I call
var jsonResponse = httpGetJSON('http://localhost:3000/do_something', 10 /* timeout */)

I've been using this approach successfully now for several weeks.
Comment: looks like quite ugly hack. But it should work :). But I'm looking for tool that allows doing this without changing iOS code...
Comment: If you find one, I'm all ears. There's also http://corner.squareup.com/2011/07/ios-integration-testing.html but it uses undocumented APIs evidently. It's too bad Apple's solution sucks so hard.
Answer: Try performTaskWithPathArgumentsTimeout
UIATarget.host().performTaskWithPathArgumentsTimeout("/usr/bin/curl", "http://google.com", 30);

Answer: Just a small correction.  The answer that suggests using UIATarget.host().performTaskWithPathArgumentsTimeout is an easy way to make a request on a URL in iOS 5.0+, but the syntax of the example is incorrect.  Here is the correct way to make this call:
UIATarget.host().performTaskWithPathArgumentsTimeout("/usr/bin/curl", ["http://google.com"], 30);

The "[" around the "args" param is important, and the test will die with an exception similar to the following if you forget the brackets:
Error: -[__NSCFString count]: unrecognized selector sent to instance
Here is a fully working example that hits google.com and logs all the output:
var result = UIATarget.host().performTaskWithPathArgumentsTimeout("/usr/bin/curl", ["http://www.google.com"], 30);

UIALogger.logDebug("exitCode: " + result.exitCode);

UIALogger.logDebug("stdout: " + result.stdout);

UIALogger.logDebug("stderr: " + result.stderr);

Answer: +1 for creative use of "shake()".  However, that's not an option for some projects, especially those that actually use the shake feature.
Think outside the box.  Do the fetching with something else (Python, Ruby, node.js, bash+wget, etc).  Then, you can use the pre-canned response and auto-generate the ui-test.js on the fly by including that dynamically generated json payload as the "sample data" into the test.   Then you simply execute the test.
In my opinion, the test is the test, leave that alone.  The test data you are using, if it's that dynamic, it ought to be separated from the test itself.  By doing it this way of fetching / generating JSON, and referencing it from the test, you can update that JSON however often you like, either immediately right before every test, or on a set interval like when you know the server has been updated.  I'm not sure you would want to generate it while the test is running, that seems like it would create problems.  Taking it to the next level, you could get fancy and use functions that calculate what values ought to be based on other values, and expose them as "dynamic properties" of the data, rather than that math being inside the test, but at that point I think the discussion is more of an academic one rather than the practical one of how.
Answer: Apple has recently updated UIAutomation to include a new UIAHost element for performing a task on the Host that is running the instance of Instruments that is executing the tests.


How to print on Oracle SQL Developer console using SQLJ

Question: I created and launch the SQLJ Java procedure (using SQL Developer). I have some bugs and I would like to debug Java source code. What is the best way to do this? Is it possible to print to the SQL Developer console some information using System.out?
Answer: The default standard output device in the Oracle Java virtual machine (JVM) is the current trace file.
If you want to reroute all standard output from a program executing in the server--output from any System.out.println() calls, for example--to a user screen, you can execute the SET_OUTPUT() procedure of the DBMS_JAVA package as in the following example.
Input the buffer size in bytes (10,000 bytes in this case).
sqlplus> execute dbms_java.set_output(10000);

Output exceeding the buffer size will be lost.
If you want your code executing in the server to expressly output to the user screen, you can also use the PL-SQL DBMS_OUTPUT.PUT_LINE() 3 procedure instead of the Java System.out.println() method.
Answer: SQL Developer has a built-in PL/SQL debugger.  There is a useful guide on how to use it here.  Pay special attention to the need for DEBUG CONNECT SESSION and DEBUG ANY PROCEDURE privileges.
I admit I don't know whether this works for SQLJ but it seems like the best place to start.


Can an employee receive commission for buying products from a company?

Question: My husband works in a company where he has to purchase products for the company. Vendor gives commission on every product they purchase. Like if the product is 850$ then they will make a receipt of 950$. 100$ is purchaser commission. They do so to make their clients permanently. Is this commission is halal or haram?
Comment: Sorry question is confusing. Is he purchasing it for $850 then selling it for $950, or acting as a middle man by delivering the product and charging $950 taking $100 for himself and $850 for the company?
Comment: Does the company your husband works for pay monthly salary for the job he is doing?
Comment: No, actual price is 850 but the receipt for company will be made of 950. 100 for my husband. Company will give extra 100.
Comment: And this is not my husband's duty to purchase. This is his extra work.
Answer: Well as far as i understand (please correct me if i'm misunderstanding), we have the following Situation:
The Products value is 850$
The Price the Company of your Husband pays is 950$
The vendor gives your Husband the difference right?
Now as your Husband is or should be payed from his company this would be a bribery and this is clearly haram as this should be his job. Now if he wasn't payed for such things the matter would be different. As i know -from telling- that this even happens in Muslim countries this is a very dark twilight zone and to me it sounds and feels like bribery, but Allah knows best!
See also this fatwa
Normally it would be Halal if the Vendor made a better offer proposal (for example Market price 850$ and your Price 800$) to the company. And maybe small gifts would be OK, as i know that for building up a relationship between two companies this is more or less usual for example when you visit the "partner" and both give each other some small gifts like souvenirs and stuff reciprocally.
And if your husband was not working for the company who buy the products then he could get a commission if he can convince the company to buy the product even from both company's as reward for his effort.
Answer: Salaam to my brothers and sisters out there.
Everyone has their own ethics and beliefs - Islam leaves nothing in the middle - our mind has the power to understand if it is wrong or right -
Wrong - If somebody is facing troubles - emotionally or financially to your husbands decisions or not.
Right - if everyone is okay knowing about it.
I work in an organization where I sell something for a certain price - whatever price I sell at - I get a %age on that amount.
I am not hiding from everyone - the company pays me this %age and basic salary both - Company knows
The customer I'm selling to, knows I earn something from what they pay - they know
As far as I have nothing to hide from the people of Allah, I may not need be afraid of my decisions - yes if I was doing sales for this company, taking commissions from the company and on the side taking it from the client too - without the consent of the company then it would have been wrong.
There is a very thin line between haraam and halaal in commissions that is why it is recommended to rather than asking around - be honest to yourself and know if its wrong or right.
Answer: Assalaam Aleykum
The commission will be halal only if the  company knows about it and allows the buyer/their employee to keep the $100, the person buying from the vendor is a servant of the company but the actually buyer is the company/his master. Hence Islam prohibits all forms of deceit and anything got through deceit is haram. And Allah knows best.


Can you do your PPL solo time in an ultralight?

Question: I've been thinking of getting an ultralight as a low cost way to pursue flying.  And I've been wondering, when my instructor finally signs me off for a solo flight, am I allowed to do that in an ultralight?  And, if so, is there equipment I would be required to have that isn't standard on an ultralight?
Comment: [Ultralights in the USA are not classified as aircraft and don't need a pilot's license.](https://en.wikipedia.org/wiki/Ultralight_aircraft_(United_States)) That would mean 1. probably no and 2. there wouldn't be any point if you want to fly ultralights.
Comment: @DJClayworth -- actually, the FAA does consider ultralight to be "aircraft".  But of course you are right that you don't need a pilot's license to fly them.  See https://aviation.stackexchange.com/questions/56294/in-the-united-states-are-ultralights-legally-considered-aircraft/56295#56295
Comment: @quiet flyer 14 CFR 103 describes ultralights as vehicles, not aircraft.
Comment: @RetiredATC-- re "14 CFR 103 describes ultralights as vehicles, not aircraft." -- see this https://aviation.stackexchange.com/questions/56294/in-the-united-states-are-ultralights-legally-considered-aircraft/56295#56295
Answer: Nope.
Your solo time must be done in the category and class of aircraft for which you are seeking a pilot certificate (the FAA doesn't come out and say it in those words, but that's what the "aeronautical experience" requirements basically boil down to). You must also pass a pre-solo knowledge exam and receive instruction in the particular make and model of aircraft you will be solo-ing in (the second of which is impossible in an ultralight: You cannot receive dual instruction in that aircraft as by regulation it can only have one seat).

As you don't need a pilot certificate to fly an ultralight you could just get one, get some basic instruction on flying it (from someone who has flown them before), and go fly. Some ultralights are pretty fine basic aircraft thanks to modern materials and construction techniques.
Your private pilot training & solo experience would be helpful in flying certain types of ultralight aircraft, but it's not required as long as you abide by the regulations applicable to ultralights.
Similarly experience in the more "airplane-like" ultralights may help you out in the rest of your private pilot training, but that experience isn't required (and not really "loggable" toward your training, through you can put it in your logbook if you wish -- just log the time as "Ultralight Flying" or something similar.)
Comment: @JayCarr [14 CFR 61.109(a)(5)](http://www.ecfr.gov/cgi-bin/retrieveECFR?gp&r=PART&n=14y18.104.22.168.2#se14.2.61_1109) "10 hours of solo flight time **in a single-engine airplane**, consisting of at least..."
Comment: Any chance you could cite or inline the regulation you are referencing in the first part of your answer?
Comment: @casey Ultralights have a single engine?  So wouldn't this imply that you could use an ultralight if "having a single engine" is the only litmus test?
Comment: @JayCarr and for the pre-solo requirements he mentions, see [14 CFR 61.87](http://www.ecfr.gov/cgi-bin/retrieveECFR?gp&r=PART&n=14y188.8.131.52.2#se14.2.61_187).
Comment: @JayCarr an ultralight is not an "airplane" according to the FAA - it's not even an "aircraft", but rather an "ultralight vehicle" (this is kind of like how the tomato is "legislatively a vegetable": It looks like an aircraft, it flies like an aircraft, so it must be...an "ultralight vehicle"). If your ultralight is registered as an "Experimental: Amateur-Built" aircraft (with an N number) that might change things though.
Comment: @voretaq7 Ah, I see :).  Any chance you could inline those links or the text or something?  I'd feel better about accepting the answer if you did that...
Comment: @voretaq7 -- re "an ultralight ... according to the FAA ... it's not even an "aircraft"" -- for a different view see https://aviation.stackexchange.com/questions/56294/in-the-united-states-are-ultralights-legally-considered-aircraft/56295#56295
Answer: Under 14 CFR § 61.51 (j) Aircraft requirements for logging flight time, the aircraft must have an airworthiness certificate, be registered in the US or with an ICAO member state; or be a military or law enforcement aircraft.
FAR 103 vehicles, by definition, do not have airworthiness certificates and can not be registered.
So while I agree that some FAR 103 vehicles are literally airplanes; for the purpose of logging flight time, by law they are not considered unless you somehow convince a police department or branch of the military to employ you to fly one.
Answer: This is possible in one situation: if you were to build an ultralight kit and register the plane as a homebuilt. Then it would get an N-number and be an aircraft. However, if you were going to build, it probably makes more sense to upgrade to the LSA level, even with an ultralight-style plane.
Comment: If it were N-numbered, it would no longer be an ultralight *as far as the FAA is concerned*.     I suspect you are aware of that; answer might benefit from including that.  (Still might meet the OP's intent of a low-cost way to fly.)  However, saying that getting an N-number makes the difference as to whether it is considered "an aircraft" reflects a common understanding, but is not really accurate-- for a different view see https://aviation.stackexchange.com/questions/56294/in-the-united-states-are-ultralights-legally-considered-aircraft/56295#56295.
Comment: Yes, this is why I used the terms homebuild and ultralight-style.


Determine Reason for Deadlock in MySQL

Question: We've been seeing some deadlocks occur but have not been able to reproduce.  Is there any way to determine, after the fact, what queries were running, etc to figure out why deadlock occurred?
Answer: SHOW INNODB STATUS will give you the last detected deadlock.
Comment: FYI, "SHOW INNODB STATUS" is deprecated. Instead, use "SHOW ENGINE INNODB STATUS" as of MySQL 5.x
Answer: I found this link in dba.stackexchange.com about deadlocks. In stackoverflow.com, user @Omry addressed how to avoid deadlocks and why they happen March 11, 2010 at 9:48 AM. User @ewernli adresssed this as well.
This involves the queries that access the same set of tables in different order from one query to the next.

Determine Reason for Deadlock in MySQL


What makes an object to be at rest?

Question: We understand both motion and rest are relative. But me and my friends always discussing about this kind of thought experiment involving a single object (for example, a particle with mass or massless particle) with nothing else existed (no other objects, no force, no gravity, no quantum field, etc.). Because motion is relative, then someone can say the lone object is at rest. It is motionless, and someone can also say the natural state for this lone object is to be at rest. But for me, in my opinion this kind of thought experiment is actually impossible in reality and this thought experiment is purely imaginative. It is impossible and irrational because both motion and rest (motionless) are relative so this lone object with nothing else existed is actually neither moving nor not moving thus a single object universe is purely imaginative. What do you think?
Comment: Massless particles can never be at rest. E.g. Photons will always travel at the speed of light relative to everything else. On the other hand, for a particle with mass there will always be a reference frame relative to which the particle is at rest. Actually, the mass of the particle is the mass measured in the reference frame in which the particle is at rest.
Comment: I think that in this kind of Universe (Single-particle Universe) motion cannot be defined. In general, an object is considered to be at rest relative to a reference frame if the object is not moving with respect to that frame. But in this hypothetical Universe there is no other object relative to which the considered object can be at rest or in motion.
Comment: Another reason why this kind of thought experiment is impossible is, let's say for the sake of discussion, that the lone object is absolutely motionless and the lone object is an object with mass with nothing else existed (no gravity, no force, no quantum field, everything, etc. besides the lone object), what makes that lone object to be at rest? Is it something external or internal? If it is because of something internal, then the single object universe is irrational. If it is something external, then the assumption is irrational too. So, that means there must be a multiplicity of objects.
Comment: My friend say it is possible for the single object to be at rest with zero velocity, zero friction or zero net force, for example like an apple stays still on a table. But he doesn't aware at all that the apple is at rest in relation to the table and gravity is still acting on both of these objects (i.e, apple and table). In order for the single object to be at rest, there must be something other than the single object so it is possible for the single object to be motionless. Motion is always there and there are always a multiplicity of objects. What do you think?
Comment: Ask your friend: What does it mean for a single object to be at rest, what does it mean to have zero velocity? The whole notion of "being at rest" or being in motion makes sense only if there is something relative to which you can have that state of motion. So I think you're on the right path.  This is getting way too philosophical, but it is also important if this kind of Universe is finite or infinite because if it is finite, you can have a state of motion relative to the edge of that Universe.
Answer: You're right, motion is only a relative concept and without another reference body (or what we physicists would call a "reference frame") the notion of motion cannot really be defined. A fundamental but often implicit assumption in physics is that measurement can be made and reproduced. Only with measurement then we can unambiguously and meaningfully describe our physical world and talk about physics at all. But to make meaningful measurements, you unavoidably need to bring in a measurement device hence a reference body to your universe. So your question is really more a philosophical one than a physical one.
Comment: Of course, my friend is still defending this kind of thought experiment by saying this thought experiment is possible in reality and the single object is necessarily at rest without any force at all and it is at rest all by itself. Whereas, both motion and motionless are relative.
Comment: Tell him that, at least, he should be there too
Comment: The point is with the whole universe consists of only that single object, that universe will only have one single physical law - "there exists this object." - and nothing else. So if you don't even have the physics of motion in that universe, how can you talk about the "motion" occurs in there? Well, again this is really more philosophy than physics.

What makes an object to be at rest?