How do you maintain good posture when working on things on the floor?

Question: Over the past few days I've been working on some aluminum frames which are fairly large and don't fit on any tables (without stuff piled on them) I have.  Now, my back is starting to hurt from being hunched over for so long.  (How) can I work on things on the floor without causing myself much pain?
Comment: Similarly, some repairs (under sinks for example) seem to require both an awkward body position and excess usage of normally unused muscles for extended periods.
Answer: Don't spend more than 15 minutes in that position at a time. Get up, stretch your back, take a drink of water. Stretch forward, backwards, side-to-side, and twist both ways. Roll your shoulders forward and back. Stretch neck in a similar pattern. Be gentle to yourself.
Also, you can do some back-strengthening exercises (when you've recovered from this project) to get you ready for next time. See https://fitness.stackexchange.com/q/153/234
Comment: And pay attention to when your joints start complaining.
Comment: I can see those instructions turning into some kind of dance. We could call it 'The Home Improvement'!
Comment: Set an alarm clock, or an mp3 playlist with built-in reminders...otherwise you WILL get sucked into flow and forget to stretch.
Answer: Generally, I find the following tips helpful, depending on the job:

A mover's dolly makes a great seat
Never kneel.  Kneeling kills. Sit Cross legged.
Go down and stay down.  It's the transitions that kill.
Don't lean and stretch.  Move.  See bullet #1
There is a spot, about 8 inches from your "Plumber's cleavage" that will not be searched by any blind hand sweeping.  This is where all the tools you put down will end up.
Comment: Not kneeling is a good one. If you must kneel, wear knee pads.
Comment: Now you tells me... After six years as an auto service tech doing brake jobs in an earlier carreer.  The lift was great when available. And No. 5 is a universal constant along with No. 6 Any dropped socket will due to mass distribution in the vehicle, roll to the exact center in an area where it's hardest to reach.
Answer: Squat. Squat with your heels flat. Trust me, everything else will fall into place. In the meantime, wear 1 knee pad and take a break on your knee, then the other.
Do yoga, from now until you die. Also, strengthen your lower abs or resign yourself to a life of back problems.
Answer: The easiest solution is where you're helping re-distribute the weight. You can find short height adjustable work stools that you can lean forward on.
There's also the idea of reducing the amount of work by upgrading to more task specific power tools. The less time you spend in that position the better for your back.
Make sure you're doing the more obvious things such as not working in the same position for an hour without a break.
Another might be to think about a solution that is similar what mechanics do lying flat on their back, except you want to be suspended above. You could also build a custom 'table' that you lay upon(maybe with 2x4s, a wood pallet, and a sheet of ply on top). It might worth building custom work tables that would hold the work to a height where you do not have to bend over.
If you don't mind sharing the exact purpose and circumstances of the project, people may be able to give more specific tips.


Does pulling over a vehicle by police without reasonable suspicion constitute false imprisonment in California?

Question: When a police officer pulls over a vehicle without reasonable suspicion required for this stop to be lawful is that considered false imprisonment? Or would that require the driver also to be arrested to constitute false imprisonment?
Comment: Your stipulation that they lacked any reasonable suspicion will be most likely wrong. The bar is *incredibly* low, but yes, some police officers *still* miss it
Comment: @ZizyArcher your guess would be incorrect.
Comment: I would guess police officers everywhere are allowed to do random traffic checks.
Comment: In the US, for stops of this nature: Consult *Terry v. Ohio* for the relevant Constitutional issues. State constitutions may provide additional protections, but the federal Constitution is generally a good place to start. It's such a good baseline that stops of this nature are called [*Terry* stops](https://en.wikipedia.org/wiki/Terry_stop).
Answer: england-and-wales
NO
Unlike some other jurisdictions, there is no requirement for an officer to have "probable cause1" or suspect an offence as the police can stop a vehicle for any reason under section 163 Road Traffic Act 1988:

(1) A person driving a mechanically propelled vehicle on a road must stop the vehicle on being required to do so by a constable in uniform or a traffic officer.
(2) A person riding a cycle on a road must stop the cycle on being required to do so by a constable in uniform or a traffic officer.
(3) If a person fails to comply with this section he is guilty of an offence.

There is no associated power to search the vehicle or its occupants but under section 164 and section 165 the driver must produce inter alia their licence, name, date of birth, address, insurance details and other relevant documents as the case may be.
Note that although vehicle stops can be random, police officers are subject to the public sector equality duty under section 149 Equality Act 2010 and not permitted to stop a vehicle solely based on the occupants' protected characteristics.

1The term "probable cause" is not used in the UK, but roughly equates to somewhere around reasonable suspicion / reasonable belief
Comment: Answered in accordance with: *we expect and encourage answers dealing with other jurisdictions ... please tag your answer using the tag markdown: [tag: some-tag]*". From the [Help centre](https://law.stackexchange.com/help/on-topic)
Comment: > there is no requirement for an officer to have "probable cause1"
This seems to be the case in the UK, but I specifically asked for the law in California, where a probable cause is always required for a Terry stop.
I improved the question wording to help understanding the issue.
Comment: @GabrielDiego probable cause is required for an arrest.  A Terry stop requires only reasonable suspicion, which is a less stringent standard.
Comment: The requirement to show vehicle tax, insurance and MOT documents is just about obsolete now. It's been several years since a 'tax disc' had to be displayed in the windscreen, and MOT and insurance status are available to officers electronically.
Comment: True, but as PNC and MID aren't always 100% up to date (and alas, accurate) the powers are still available just in case.
Comment: I don't think you ever *had* to carry anything except identity (perhaps driver's licence).  If required at a 'stop' you have the opportunity to present the documents at a police station within 5 (?) days. I always used to carry *copies* of insurance and MOT but now there does not seem to be a need. Of course s**t can always happen.
Comment: @WeatherVane  Yep, no requirement to carry / produce at the time but it's seven days not five for a [*Hortie*](https://www.google.co.uk/amp/s/www.motordefencesolicitors.co.uk/offence-guides/hort1-producers/amp/)
Comment: The quote explains that if a police officer pulls you over, then you have to comply. But it doesn't explain whether a police officer is allowed arbitrary pull-overs or not.
Comment: @phoog Then, does a Terry stop without a reasonable suspicion constitutes false imprisonment or not? I wonder if a Terry stop deprives someone's personal liberty, or is there also a lower standard to what a Terry stop constitutes.
Answer: Police have the authority to stop a vehicle if they have a reasonable suspicion of a crime. That means that there must be an articulable ground for believing that there probably was a crime, which includes a specific fact (like "seeing a trail of blood", and not "it's suspicious that an old car would be driving in this neighborhood"). Without a reasonable suspicion, the detention is not with legal authority. PC 236 states that

False imprisonment is the unlawful violation of the personal liberty
of another

The stop is a violation of the personal liberty of a driver, and without lawful authority, the stop is unlawful. Although the doctrine of qualified immunity might suggest that police officers cannot be prosecuted, there is no qualified immunity for California police officers accused of false arrest or imprisonment.
Comment: It's not necessary to conclude that there "probably was a crime"; that's probable cause, which is explicitly distinct from reasonable suspicion.  Reasonable suspicion is a lower standard.  It can also be suspicion that a crime is imminent; it needn't be in the past or present.  There is another element of reasonable suspicion that this answer omits, which is that the person being stopped must be reasonably suspected to have some connection to the crime.
Comment: I find it very hard to believe that your police isn't allowed to stop a vehicle for a general inspection. In my country this is called "general traffic control" - they check your drivers license, the vehicle registration, in my country they also check the stickers showing your next technical inspection and exhaust checkup. Additionally they ask you to show your first aid kit and your warning triangle - everything requested by law. Under special circumstances like mountains and icy roads they will check your tires and snow chains. Which of course depends on the local traffic laws
Comment: @eagle275 Yep, that's true also in Italy. You have no intrinsic right to be "left alone" by police on public roads (that's different if you are driving on private property). If you are on public roads police can stop and check your papers (license, insurance, etc.) and your vehicle any time at their will. They cannot *search* the vehicle (that requires a warrant), but they can *inspect* it to check it meets the traffic code requirements. So they can make open the trunk to see if you have the mandatory spare "fifth wheel", but they cannot, for example, make you open a bag you are transporting.


Keep nodes within specific clusters

Question: I've been looking over the GraphViz docs and stackoverflow for the last hour, but can't find a solution to this problem. I have several clusters in my dot file, and I need certain nodes to stay within specific clusters. Some of the nodes have relationships with nodes in other clusters. It seems every time I save the file, a few of the nodes jump between different clusters. Is there a way to define a node as always being part of a specific cluster?
Comment: I've never seen that behavior. Every time I've added a node to a correctly declared cluster, it has always stayed in that cluster. Also when you say "every time I save the file, a few of the nodes jump", are you using a text editor and processing the text file with dot, or are you using some other tool? If you are willing to share your problematic dot file, we might be better able to help.
Answer: I figured out how to avoid this issue.
I was defining both the nodes and the edges within the subgraphs, so I think it was getting confused when edges included nodes that should not be contained within the subgraph.
Instead, I just only define the nodes (all the nodes) within the subgraphs, and define the edges afterwards all together at the end of the file. Works like a champ :)

Keep nodes within specific clusters


How to determine if a User has update access to a RecordType In apex

Question: I'm changing the ownerId of a record though Apex to another User. Thi The code is running in system context and isn't initiated by a user. Hence even if the user does not have access to the record type, the assignment works.
How do I ensure that the user has update access on this record Type before assigning her as the owner?
Currently we have option to check id user is having access for records .. i want to the same thing if user having new user is having access for record type..
Do we have this option in salesforce
<code>List<UserRecordAccess> listResults= ([SELECT RecordId  FROM UserRecordAccess where UserId = :userid and recordId IN :[recordId] AND HasReadAccess= true]);
</code>
Answer: Check this out
You need you see if the user's profile has access to the record type since record types are not assigned on per user basis.


How use custom validation on forget password in Partner Portal

Question: i have requirement where we need to add custom validation when a partner user forgets password and clicks on forget password link, and partner will be asked to enter the username so that they will receive a password reset link.So the requirement is to run few validations before the reset link is sent to the Partner. Can we do this using custom apex code? if so please mention the steps how to achieve it. Thanks
Answer: You can use custom forget password controller in Apex to control your behavior.
Here is the source URL for the same.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_sites.htm


Trying to remove a shelf in a corner cabinet to install a lazy susan, can't figure out how to remove shelf!

Question: I'm installing a Rev A Shelf lazy susan but for the life of me I can't figure out how to get the shelf out short of cutting it in 1/2. I'm wondering if it was put in the cabinet before the countertop was installed. I've tried twisting it every way I can figure, but I'm stumped at this point. Maybe a circular saw is the answer ♂
Comment: Can you lift the back of the shelf at all? (The corner part.)  Or the front?
Answer: You can't get that shelf out without cutting it in half. There is no way to tilt it out.
I used to build these lazy susan corner cabinets. The only way to get the shelf into the cabinet was to put it in before the cabinet was fully assembled, thus sealing it in.
If you think you may remove the lazy susan one day and can live with the shelf thickness' loss of height, you could screw down the shelf in the far corners so the screws aren't easily visible, then pretend the shelf is the bottom of the cabinet and attach the lazy susan hardware to it. On removal of the lazy susan hardware, you can unscrew the shelf from the bottom and restore the shelf to proper usage. Or screw the shelf to the top of the cabinet and pretend the shelf is the top for attaching the lazy susan. Putting the shelf up top would hide the lazy susan mounting holes if the shelf is returned to service later.
Otherwise, chop away. It's the only way. A jigsaw may be safer than a circular saw.
Comment: That's exactly what I'm preparing to do. I'll lose a little over 1/2" of vertical space, but no big deal. I'm just going to put a secret message in between the shelf and the bottom of the cabinet for some future DIYer to find lol. Thanks!
Comment: Collect a full set of 2023 coins and tuck those in with the message. You can drill shallow holes in the way-back if the thickness of the coins feels like too much to lose...
Answer: Hard to tell from a picture, but either you can stand  it up under the countertop near-enough vertical to slide out, or you can't. Basically slide and pull the end near one side up the side until the edge touches the countertop underside. If it won't turn and slide out the door at that angle, probably it's saw-time.
Comment: Closest I can get to vertical is 45 degrees. Believe me, I've tried every which way! I may just put it in the bottom of the cabinet and install the lazy susan on top of it instead of destroying an expensive piece of cabinetry! Thanks for the answer, I appreciate it.


Could ethernet wire interfere with phone wire?

Question: If I install 20meters of ethernet unshielded utp wire (rj-45) together with a phone twisted pair wire (rj-11), one touching the other, will create interferences between them?
Answer: No, it is extremely unlikely. This is done everywhere. It is very common to use the "unused" pairs in typical 10-Base T ethernet connections for either traditional analog or even digital phone service. The construction of "category" ethernet cable has precision twisting of the four pairs exactly to minimize any crosstalk between the ethernet and the telephone signals.
Comment: On top of this, the phone signal is something like 0-20 kHz, while the Ethernet signal is probably something like 1-100 MHz (no DC content due to encoding).
Answer: Shouldn't be a problem generally speaking.  The ethernet carries digital signals on the wires and the two-pair POTS wires carry analog signals.  If crosstalk or other interference did occur I think it would most likely be during ringing of the phone, when current was being drawn through the wire to ring the phone(s).


Why do electrons occupy in discrete energy states?

Question: Why can't there be any continuous energy band in an atom?
Comment: There is. It's called electron scattering.
Comment: Possible duplicates: http://physics.stackexchange.com/q/39208/2451 , http://physics.stackexchange.com/q/65636/2451 and links therein.
Comment: @jinawee That's very misleading.
Answer: Let $E = KE +U$ be the total energy . We know the momentum operator & total-energy operator are $$\hat{p} = \frac{\hbar}{i} \frac{\partial}{\partial x} \\\\\\\\\\\\ \hat{E} = i\hbar\dfrac{\partial}{\partial t}$$ . This prompts us to write $$\hat{E} = \hat{KE} + \hat{U} \implies \hat{E} = \dfrac{\hat{p}^2}{2m} + U \implies \hat{E} = i\hbar\dfrac{\partial}{\partial t} = - \dfrac{\hbar^2}{2m}\dfrac{\partial^2}{\partial x^2} +U$$ This special operator is the Hamiltonian operator $\hat{H}$.
Steady-state Schrodinger's equation is given by: $$\dfrac{\partial^2 \psi}{\partial x^2} + \dfrac{2m}{\hbar^2} (E - U)\psi = 0$$. In order to solve the equation, "boundary conditions" will have to be satisfy which restrict the values of $E$ which only do satisfy the equation.  This is more evident in this form of equation $\hat{H} \psi_n = E_n \psi_n$ . For every hard $\psi$, there must be a corresponding eigenvalues of energy. Thus there are only certain energy states which is valid for certain "boundary conditions$^1$".

$^1$ Let you take the famous particle in a box problem.
Here the boundary conditions are that the particle's probability to find outside the box is $0$ i.e. $\psi = 0$ for $x \leq 0 \quad \& \quad x \geq L$; $L$ being length of the box. . When you solve the equation using this condition $$\psi = A\sin\dfrac{\sqrt{2mE}}{\hbar} x$$; using the condition it is infered that $\dfrac{\sqrt{2mE}}{\hbar} L = n\pi$ which eventually provides the energy $E = \dfrac{n^2\pi^2 \hbar^2}{2ml^2} \qquad n=1,2,3\cdots$. Thus, you can see energy can take only certain values owing to satisfy the "boundary conditions."
Answer: An electron in an atom is in a bound state. Since it is a bounded particle,  can analyse the problem with particle in a one dimensional potential box. Consider a one-dimensional crystal lattice with lattice constant $L$. We assume that the particle is free to move within this distance and cannot go outside. So we have two potential barriers that tend to infinity at the points $x=0$ and $x=L$ as shown in the figure. This infinite potential is to mention that the electron is well confined in that region and cannot go outside.

Inside the region, the potential energy is zero and outside it is infinite. So, we can define the potential as
$$V(x)=0\space for\space 0<x<L;\space V(x)=\infty \space for\space x<0, \space x>L$$
Now, we define the wave function of an electron as a function of distance $\psi(x)$. Then, the Schrodinger's equation can be written as
$$\frac{d^2 \psi(x)}{dx^2}+\frac{2mE}{\bar h^2}\psi(x)=0$$
We assume the general solution be of the form :
$$\psi(x)=A\sin kx+B\cos kx$$
where $A$ and $B$ are arbitrary constants, to be determined from the boundary conditions.
Now, we are going to apply the boundary conditions:
At $x=0$, the potential barrier is infinite. Hence the wave function vanishes at $x=0$ since there is a zero probability of finding the electron. Also the electron cannot be present at $x=L$ and hence there also the wave function vanishes. We have already mentioned that the electron is allowed to move between the lattice points only. So the wave function is localized at the region 0

$$\psi(x=0)=0; \space \psi(x=L)=0$$
The first boundary condition gives us the constant $B=0$. So, we need to find the value of $A$ only. The second boundary condition yields $A\sin kL=0$. But $A\neq 0$ since this will yield us nothing. Hence
$$\sin kL=0$$
which gives $\displaystyle{kL=n\pi\Rightarrow k=\frac{n\pi}{L}}$
where $n=1,2,3,\cdots$. $n\neq 0$ since $n=0$ ($k=0$) means the wave function $\psi(x)=0$ everywhere within the box and we came all the way for nothing. So $n$ can have only positive integers.
Also, it is to be noted that the propagation constant is having integral values corresponding to different values of $n$. Hence the wave function also have integral values given by
$$\psi_n(x)=A\sin \frac{n\pi x}{L};\space\space\space 0<x<L$$.
Our electron is well confined within the region $0<x<a$. Hence the probability of finding an electron in this region is 1. This is called normalizing the wave function, which will give us the value of $A$.
$$\int_0^a |\psi_n|^2 dx=1$$
or  $$A^2\int_0^a sin^2 \left(\frac{n\pi x}{L} \right) dx=1$$.
On integration, we get
$$A=\sqrt{\frac{2}{L}}$$
So the normalized wave function becomes
$${\color{green}{\psi_n(x)=\sqrt{\frac{2}{L}}\sin \frac{n\pi x}{L}} };\space\space\space 0<x<L$$.
and $n=1,2,3,\cdots$
Now, using this value and substituting it in the Schrodinger equation yields us the value of the energy of the electron corresponding to the wave function $\psi_n(x)$.
Thus, $${\color{blue}{E_n=\frac{h^2n^2}{8mL^2}} } ;\space \space \space n=1,2,3,\cdots$$
Thus, we have the electron energy levels are quantized. So the energy levels are discrete, not continuous as expected from a classical point of view.
The lowest energy level possible is
$$E_1=\frac{h^2}{8mL^2}$$.
From the above equation of energy it is clear that
$$E_n=n^2E_1$$
This means the spacing between two consecutive energy levels increases as
$$(n+1)^2E_1-n^2E_1=(2n+1)E_1$$
Thus the energy level diagram looks like this

So, as classical mechanics says, there can't be continuous range of energy levels or bands. However, if the particle becomes heavier and the length of the crystal is very large, the energy levels will be spaced very close together and eventually may become continuous. for example, if $L=1cm$, then
$$E_n-E_{(n\pm 1)}\sim 3.5\times 10^{-19} eV$$
The energy spectrum for such cases seems practically continuous. Thus the wave equation predicts that the bound particles (electrons) are associated with a discrete energy spectrum and the free particles with a continuous spectrum.
An electron is a quantum mechanical particle and hence it must obey quantum mechanical principes. Discreteness is one speciality of quantum mechanics which gradually appears as continuum as we see in our everyday life. This is the essence of Bohr's correspondence principle which states that the quantum mchanics gradually reduces to claasical mechanics at the limit of large quantum numbers.
Answer:
Why can't there be any continuous energy band in an atom?

This is the basic reason quantum mechanics had to be invented.
Once the existence of positive and negative charges was discovered, Maxwell's equations when solved for a planetary model of a central positive charge  and an orbiting negative one, are completely unstable, in contrast to the gravitational problem. This is due to the fact that accelerated charges radiate electromagnetic radiation and lose energy. An orbiting electron in the field of a nucleus will continually radiate energy and fall on the nucleus as far as a classical model goes.
This means that atoms would be a soup of positive and negative charges and when an electron fell on an ion, a continuous spectrum would be observed.
This is not what was observed. Hydrogen atoms had a distinct electromagnetic spectrum, made up of lines that could be mathematically fitted very well by the Balmer and Lyman series.

That is why the Bohr model, a planetary model of the hydrogen atom was proposed, which forced stable, quantized, orbits and could derive the series appearing experimentally.
After that came the Schrodinger equation and quantum mechanics, which gave a theoretical model that describes nature in the microcosm, and is the underlying level of all classical theories.
Comment: Minor point: "*This is the basic reason quantum mechanics had to be invented*" or that classical mechanics was inadequate and quantum mechanics was discovered?


What's the difference between economies of scale and increasing returns to scale?

Question: Can anyone tell me the difference between economies of scale and increasing returns to scale. It seems to me that observationally they would be equivalent.
Answer: Economies of scale are normally understood to refer to a situation in which, as output is increased, the cost per unit of producing that output falls (see here and here).
Increasing returns to scale are normally understood to refer to a situation in which, as all inputs are increased k-fold, output increases more than k-fold (see here and here).  This is equivalent to saying that a k-fold increase in output can be achieved by increasing all inputs less than k-fold.  The difference from economies of scale is that returns to scale are about the relation between inputs and output and nothing is implied about costs.
If a firm producing a good X is a price-taker in the markets for all the inputs it uses to produce X, and if those markets do not offer any form of discount for bulk purchases, then a k-fold increase in input quantities will imply a k-fold increase in cost, and vice versa.  In those circumstances, the firm will benefit from economies of scale if and only if it enjoys increasing returns to scale.


FTP file into docker container on remote server

Question: How can I transfer transfer files into a Docker container running on a remote Ubuntu server using an FTP client? I can SSH into the server and use docker cp, which works fine. But I have a client who needs to be able to do so with something like FileZilla. Is this possible?
Answer: Im not an expert with docker, but you could try this:
You can expose several ports when you run the container.
So, you can expose the FTP port also, something like this.
docker run --name containername -p 3000:80 -p 3001:21 -d dockerimagename

In this example with the -p 3001:21 you are exposing your port 21 of the container to your port 3001 of the Server, so you can enter with filezilla with the ip of your server for host, and 3001 as port.
Comment: If anyone was able to use, what default username and password you gave? I am not able to connect to the Windows nanoserver container.
Answer: You should not transfer files into a running container image.
It's a really bad idea.
Containers come and go all the time, most container orchestrators auto-restart containers, so the files you upload will be wiped as the container restarts cleanly form its original image.
Best-practice: Rebuild and redeploy the container image every time you need to make a change to a production application running inside a container.
If you need for testing purposes: Docker containers don't expose a FTP server, because containers are supposed to run only 1 process (i.e. your ENTRYPOINT application). However, you can use commands like docker cp to copy files from/to running containers.
Comment: I agree with the point of container volatility, but I would try a different approach. I would map a volume with the host machine and create a individual FTP user pointing to the host's mapped directory.


How does a website with user provided content get started?

Question: I was wondering, How does a website that is based around content uploaded by users get started? When the website launches there is no content for the users to view or use/interact with so there really is not much of a drive for the user to make a account and use the website. How do I get started? Dummy content? Or just good SEO and patience? In case it's not clear what I mean; think of it as day 1 of Youtube(Example site) what motivated people to still upload content and continue to visit/use the site? I hope I'm posting in the right Stackexchange. Thanks in advance.
Answer: There are usually two methods to getting users, and deciding which one to focus more into or what balance you will strike is, as always, up to you. There is no magic method, no algorithm, no howtoforge.com article you can follow.
As always, content is king, so if your content isn't what people want you can do everything in your power to get visitors but nothing will help. That said, here are some tips.
Something I have heard dubbed, "organic growth" which is usually under the banner of "word of mouth". I have always found this method of growth to be far more reliable because it is not just a potential user learning about a website, they are learning about it while hearing someone else talk about it in a positive light. The more the person is trusted, the more likely they are to participate or buy. One way to get this type of growth is to just start sharing on social media. Get it in front of the right people on Twitter, post links on Reddit or Hacker News or some other site. This isn't always a reliable method as you can't control how many people see it.
The other method, which is the one that costs money, is to buy advertising to sites that fit the demographic of the user base you are trying to build. Some times you can pay a price for a certain period of time at a single site, other times you may have to pay more but you get many sites that your ad is featured on.


How to send objects in NIB files to front/back?

Question: How can I adjust the "z"-positions of objects (e.g. sending UIImageViews to the front/back) in the integrated interface builder in Xcode?
Answer: Just to give a clean, up-to-date answer to this:

Select an interface object, then "Editor | Arrange | Send to back/front/etc", OR
Select the window object, then click on 'Window' above the interface editor and select the objects it contains

This pic shows where to click:

Or you can expand the object browser, use the disclosure triangle on the window object, and select from the list there: http://i.imgur.com/041xz.png
If the option to send to front/back is greyed out, try double-clicking the object to select it.

Thanks to Bryce Thomas for this suggestion in the comments

Alternatively, the objects are listed from back to front in the order that they appear in the object browser list.

Drag an object in the list to the last slot in  the list to bring it to the front, for example.
Comment: Protip: if you're selecting the view/object in the list of objects on the left hand side (I don't know what version of XCode it was introduced in), you have to *double* click the object for it to become selected(?), which seems to resolve the issue of XCode greying out the send to front/back options.
Comment: Your last tip there about the greyed out objects really helped me.  Thanks!
Comment: I wanted it to be completely unambiguous as to where they should click.
Comment: @BryceThomas excellent double-click tip!  You should submit this as a formal answer so other users don't miss it.
Answer: I know originally, this question was for Xcode 4, but it is linked from a Google search.
In Xcode 5, 6, and 7, you can still go to the Editor menu and select and move the items around.

But you can also rearrange by simply changing the order in the document outline.

They're in reverse z-index order: the top of the list is the back of the stack, the bottom of the list is the front. Simply drag your UI item to the bottom to bring it to the front.
Answer: Found it: Click on the object you want to move and in the menubar, select Editor > Arrangement
Answer: Also, click on the triangle (open) at the bottom of the column showing the view/objects/placeholder/window.  Then you have the full hierarchy of objects, like from IB, and can rearrange by dragging.
Answer: Click on the item you want to send back. From the top menus choose: Editor -> Arrange -> Send to back/front.
Answer: You can also drag and drop view items in the left menu to change the order. The z-order matches the order of the items in the menu.


At what percent can I land a perfect combo with Captain Falcon?

Question: It is commonly accepted that the easiest way to set up for a f-air combo with Captain Falcon is to use a running down throw into the forward air. More often than not, this actually ends up failing. At what percent is the knockback from the down throw perfect to set up for a forward air, especially hitting with the sweetspot?
Comment: It is usually easier to string up air into forward air
Answer: I don't think this question can get a concrete response due the fact that all the characters got diferent weight so they perceive different knock-back at the same percentage.
I would gess it's close to 30%, before the grab.
Comment: Assuming the character was one of average weight, do you think the 30% would work?
Comment: That is fairly accurate! Thanks for your response!
Comment: @TrentonJames If you found the answer useful, please feel free to mark it as the accepted answer by clicking the small tick icon under the vote arrows.
Answer: The higher the weight the higher the percentage necessary. On average, depending on your timing, 30% is a good starting point. Higher weight characters take around 40 to 50 percent, accounting for the heavier characters, fast falling, etc. Lighter characters only take 25 to 35 percent, again depending on other factors.
I experimented and this is accurate and makes the falcon knee hit at least 75% of the time depending on player skill.


Will moving a magnet through cupped hands change the nerve signals through the hand?

Question: Basically nerve signals are electric impulses travelling from the brain to body parts. What would happen if we move a magnet through cupped hands. Would it somehow interfere with the current of the nerve impulses?
Comment: It depends on how fast you could move the magnet. If you could do it fast enough, you would feel a noticeable tingle and there would be serious health effects at even higher speeds. The only place I ever felt an induced voltage from a switched magnetic field was in an MRI machine (the gradient coils produce a sensation), but there seem to be magnetic neural stimulators that are much stronger than that, still.
Comment: Check out "transcranial magnetic stimulation."
Answer: Basically, nothing would happen. Your nerves aren't unbroken wires, nor are they coiled for maximum effect like in a generator. Nerves only transmit signals electrically within the neuron, between neurons you have a largely chemical process. Even with incredibly powerful magnets, such as in a MRI tube, or a particle accelerator, the induction would still be negligible, and we know this because these environments aren't instantly fatal, or even incredibly damaging. Errant electrical pulses in the body are very dangerous, especially to the heart and the brain, and it only takes a tiny charge before it's lights out.


Names for automatic machines' programs

Question: A machine can be programmed, and different programs can be chosen for different tasks. One such task may be to initialise the machine, while the main purpose of the machine is to manufacture something. Could such a program, that causes the machine to process/manufacture something be called a "work program" or "working program"? What other scenarios / classifications of programs can you think of?
Answer: The terminology I'm familiar with is that housekeeping programs (boot, reset, shutdown) are called routines and mechanical processing instructions are either called jobs or simply programs. That may be specific to the CNC (Computer Numerical Controlled tools) world, but it seemed to be universal in the shops I've worked in.
Answer: Instead of work, how about a word that has a clearer (more restricted) meaning, like production program, or manufacturing program, or building program?

Names for automatic machines' programs


Cursorcerer, change delay from terminal

Question: I use Cursorcerer to hide my pointer, and find that I cannot turn it off completely unless I set the delay to 0 sec; otherwise it pops up when I change app &c. On the other hand, if I need it, I also need it to change the setting in the præference pane. Can the delay be changed from terminal?
Answer: From Terminal, you should be able to do
defaults write com.doomlaser.cursorcerer idleHide -float 0

and then
killall Cursorcerer
~/Library/PreferencePanes/Cursorcerer\ 2.prefpane/Contents/Resources/Cursorcerer.app/Contents/MacOS/Cursorcerer &

to quit and relaunch the Cursorcerer daemon with the updated pref

Cursorcerer, change delay from terminal


Analyze Windows executable

Question: How can I see which files, ports, URLs, etc that are used by a suspicious Windows executable.
Comment: What you really need to answer is how savvy do you want to go with it? Do you want to dig deep and reverse engineer executables manually? or do you want to rely on automated analysis? Ofcourse, automated analysis will be defeated by polymorphism, metamorphism and and so on. If you want to rely on automated then use things such as http://camas.comodo.com/ and Process Monitor from Microsoft Technet and so on. If you're going to dig deep then PEiD, IDA PRO, LordPE and HookShark. If you expand your question then I'd happy give you a better suited answer rather than a brief answer.
Answer: This depends on how savvy the programmer of the malicious binary decides to be.
If it's a simple binary I would suggest first downloading Strings for Windows.  It's a version of the Linux programs of the same name.  It runs through and prints out all strings in a binary.  If the binary isn't encoded or packed this should give you what you want to know.  Once installed:

Bring up a command prompt: WindowsKey + r, type cmd and hit ENTER
cd <directory/of/binary>
strings <binary_name>.exe

A lot of output will be printed to the screen.   You can use strings <binary_name>.exe > output.txt to write it to a file.
If the binary is packed or encoded the easiest way to analyze a Windows binary for these things is a tool called PE Insider or CFF Explorer. PE Insider allows you to quickly look at the Portable Executable's headers, performs quick decompilation, and simple analysis.  CFF Explorer allows you to decode and unpack other resources within the binary.
The links provided should give you enough resources on how to use those tools.  For more information on malware analysis you can checkout How to Analyze a Piece of Malware, and Topics to Know When Analyzing Malware.
Answer: You can start by submiting your file to virustotal or to Cucko Sandbox
It will provide you some informations on your malicious file which can be interesting.
For example, with a search on the hash of the file, you can find people who has already reverse the same file.

Analyze Windows executable


What are the units of dark energy?

Question: Popular literature seems to equate dark energy with the cosmological constant of the Einstein field equations. We know however that the dimensions of any constituent of the field equations is ${\rm length}^{-2}$, and that the metric tensor itself is dimensionless. This means that the dimensions of the cosmological constant are ${\rm length}^{-2}$. These are certainly not the units of energy!  Are we to understand that "dark" energy has different dimensions than "normal" energy?
Comment: Very helpful answer. My thanks to Kyle Oman.
Comment: Welcome to the site. If you find an answer helpful, you upvote it(+1), or if you decide it is the best you check it  as the best, the v below the votes on the left of the answers to your question
Answer: It is customary to include a term $\Omega_\Lambda$, the density of dark energy relative to the critical density for closure, in the Friedmann equations. It is defined:
$$\Omega_\Lambda = \frac{\rho_\Lambda}{\rho_{\rm crit}} = \frac{c^2\Lambda}{3H_0^2}$$
Since the critical density is $\frac{3H_0^2}{8\pi G}$, the (mass) density associated with $\Lambda$ comes out to be $\frac{c^2\Lambda}{8\pi G}$. The energy density would then be $\frac{c^4\Lambda}{8\pi G}$.
Indeed, the cosmological constant itself has units of ${\rm length}^{-2}$, but this is really just convention. One could just as easily define the constant with dimensions of ${\rm energy}$, then it would have a different numerical value, and a few extra constants would appear in the equations (e.g. $c$, $G$) to get the dimensions to work out correctly.
Comment: One way to think about it is to move the $\Lambda$ term to the other side of the Einstein equation and then divide the whole equation by $\dfrac{8\pi G}{c^4}$ to change all terms into energy density dimensions.

What are the units of dark energy?


How Do I Show External Disks on Second Display's Desktop?

Question: I can see my external drives on all the spaces on my MacBook Pro's display, but I cannot see those drives on my external display. Is there a way to make them show up?
Answer: The external display is not set as a mirror of the main display but rather as an extension of it.  So you can drag the external drive icon (or any file/folder/window) from one display onto the other.
However, this will not 'stick' as when you disconnect the drive and reconnect it, the system will mount the drive icon back onto the primary display (the one with the Dock).
Also, when you disconnect the external display, the system will move any files/folders/icons that were showing on the external display onto the main display.
Comment: I wish Apple had implemented external displays more consistently. It would be nice to be able to allocate some spaces to the external display. Then the drives would show up and things would work more consistently. In Mavericks the external display is not quite an extension of the main desktop anymore.
Answer:
Right-click on the drives on the main display
create an alias
move alias icon to second screen

As I've only one screen, I can't verify whether this works in all situations.


Does the Druid's prohibited armor rule affect abilities gained from Prestige Classes?

Question: Hypothetical situation: A druid has been captured by evildoers, who slapped a metal breastplate onto the Druid, causing a violation of his no-metal-armor rule and thus render him unable to cast spells, use supernatural or spell-like abilities for 24 hours. This particular Druid has four levels in Planar Shepherd, granting him Plane Shift (to one particular plane) as a spell-like ability. But since this is granted by a Prestige Class, rather than levels in Druid, is this ability blocked by the Druid's rule on no metal armor?
Answer: I'd argue the answer is no, Plane Shift is not affected and is still usable.
The Druid restriction says this:

A druid who wears prohibited armor or carries a prohibited shield is
  unable to cast druid spells or use any of her supernatural or
  spell-like class abilities while doing so and for 24 hours thereafter.

The wording says Druid spells and class abilities specifically. Planar Shepard is a different class, and the ability comes from there. So you can still use it.
You also still meet the prerequisites for Planar Shepard, as you still have Wild Shape, even if you're not able to use it at that time. (See this answer for discussion on prerequisites.)
Note that you do still lose your spellcasting. Planar Shepard doesn't give you new spellcasting, it advances your Druid spellcasting:

At each level, you gain new spells per day and an increase in caster
  level (and spells known, if applicable) as if you had also gained a
  level in a divine spellcasting class to which you belonged before
  adding the prestige class level.

As that's still a Druid feature, you lose access to it due to the armor restriction.
Comment: Yes, I pretty much expected that you'd lose all caster levels gained by Planar Shepherd when you get hit with the armor thing. But what happens when the 24 hours wear off while you still have a good chunk of your casting left? Can you pick up where you left off, or will you need to do whatever you normally do to gain your spells?
Comment: @ThomasJacobs The rules don't cover that explicitly. [They do say that prepared spells stay until you use them, death, or certain events/attacks remove them](http://www.d20srd.org/srd/magicOverview/arcaneSpells.htm#preparedSpellRetention). It doesn't say if forcibly wearing armor is such an event. I would personally rule that yes you do lose them (as you currently don't have access to spellcasting ability), but that's a DM decision.
Comment: If you read it entirely as it is written, it says you "can't cast druidic spells" and "you can't use supernatural or spell-like class abilities".

Planar Shepard is a class, and as such you couldn't use its abilities. However, this doesn't really seem to be the way they intended it to read, as that would mean you could also no longer use any supernatural or spell-like class abilities from classes that are not in the slightest bit related to druid.


Connecting OSX + Python + MSSQL

Question: I'm new to Python development and I am trying to set up a Python/Flask project on my Mac (Mavericks) to connect with an MSSQL server via pyodbc + freetds + unixodbc.
I can connect and query the server using isql and osql, but I can't get pyodbc to connect.
How I got isql and osql working:

install python via brew: brew install python
installed pip and virtualenv
install unixodbc via brew: brew install unixodbc
install freetds via brew: brew install freetds --with-unixodbc
update freetds.conf, odbc.ini (odbc.ini pointing directly to driver)
update permissions on lib to make executable: chmod 554 /usr/local/lib/libtdsodbc.so

At this point, I can successfully connect. Now, for the pyodbc part...

from within my virtualenv, install pyodbc sudo pip install pyodbc

Depending on my connection string, I get some variation of this error:
DBAPIError: (Error) ('IM002', '[IM002] [iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded (0) (SQLDriverConnect)') None None

It looks like it's trying to use iODBC instead of unixODBC, which is probably my first problem.
How can I get pyodbc to use unixODBC?
Answer: For anyone trying to figure this out, I got it to work my using pymssql instead of pyodbc.

Connecting OSX + Python + MSSQL


Mysterious DocumentRoot using Apache2.2.22 on RaspberryPi (Debian Wheezy) whilst trying to setup SVN

Question: I'm attempting to run an SVN repository over SSL using Apache2.2.22 (Apache from now on!) on a Raspberry Pi running Debian Wheezy.
I'm new to Apache and am experimenting with various configurations. What I really want to do is just have Apache serve up the SVN repository and nothing else i.e. no DocumentRoot and use SVNParentPath instead.
This may not be possible but if nothing else I want to know why after deleting all sites in the sites-enabled and sites-available directories and checking all other files in the /etc/apache2 directory and subdirectories for the term DocumentRoot the default /var/www DocumentRoot is used.
After restarting the Apache2 service when I go to
http:\\raspberrypi

I get the It Works! page.
I also get no warning about a missing DocumentRoot when restarting Apache. I have reinstalled Apache, every time I make a change to a .conf file I restart the service and I clear the browser history as well.
This is a Debian setup so there is no httpd.conf file.
The dav_svn.conf file only contains comments.
The /etc/apache2/apache2.conf looks like this (anything that is commented out is not shown):
LockFile ${APACHE_LOCK_DIR}/accept.lock

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_event_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>

DefaultType None

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

Include mods-enabled/*.load
Include mods-enabled/*.conf

Include ports.conf

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

Include conf.d/

Include sites-enabled/

The ports.conf file (with comments):
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

As mentioned there are no files in the sites-enabled or sites-available directories.
I would be very grateful if anyone can shed light on why I'm not getting a DocumentRoot error  or no page when going to the
http://raspberrypi
URI.
Thanks,
Rich
Answer: Apache defines a default value for DocumentRoot property to use when no value is set in the configuration.  As stated in the documentation, the default value is /usr/local/apache/htdocs (hardcoded), but it can be changed at compile time.
However, you're using Debian.  Most Debian packages has several minor adjustments to meet their own goals and criteria.  Just to cite some, in Apache 2 they include:

the use of separated .conf files;
customized default folders;
creation of the www-data user.

Also, if you take a deeper look into Apache 2 Debian Package source code (Wheezy specifically), you will notice the default folders of Apache 2 were changed to make it FHS compliant.  This is why they are located in /var/www.
In addition, it is important to note that there is a recent commit in Apache 2 Debian Package changing the DocumentRoot to /var/www/html.  You should expect this change to appear in future releases.
Answer: Apache has a default document root of /usr/local/apache/htdocs . If not specified in any config, it will use this value.
Comment: Thanks for the speedy reply. I don't have this directory on my system - so don't see how it can be serving a html page from it.


Do stray photons become interstellar daggers to a space traveler near the speed of light?

Question: Suppose I am traveling through space, accelerating closer and closer to the speed of light. As I speed up, photons traveling towards me become blue-shifted to higher and higher frequencies. When I am traveling fast enough, even what used to be visible light would all be shifted into very high energy x-rays or gamma rays.  This seems like a big problem for my ship. Would my ship get torn/radiated pieces? How slow would I have to go to avoid this issue?
Comment: Yes, one can shift visible light into the x-ray and gamma ray-region. That's what some gamma-gamma collider experiments are proposing. The interstellar space traveler, on the other hand, will long be atomized by hydrogen and small dust grains that are eating away on his ship. Nobody will ever build fast spaceships, anyway. A 0.1c ship is fast enough.
Comment: Another concern is the aberration of light during acceleration, which results in your field of view (i.e. the angle of photons incident upon you) being concentrated to the front of you, so not only is the radiation more damaging due to blue-shifting, but also more concentrated on certain faces of your ship.
Comment: This is a very reasonable concern, pertinent to anybody building a near light-speed spaceship without a warp drive. Maybe the interstellar or intergalactic gas would inflict much greater damage than photons; and unlike photons, it could do so even without relativistic effects.
Answer: Yes, but you'll have to go really, really fast. And even then, don't worry about the photons.
The relation between velocity $v$ and the observed and "true" wavelength $\lambda_\mathrm{obs}$ and $\lambda$ of the light is
$$
\lambda_\mathrm{obs} = \sqrt{\frac{1-v/c}{1+v/c}} \lambda.
$$
If you consider optical (i.e. visible to humans) light with a wavelength of, say, 5000 Å (green/bluish), then to be observed in your reference frame as a gamma-ray of, say 0.5 Å (roughly the wavelength of the softest gamma-rays) you'll have to go at
$$
v = \frac{(1-\lambda_\mathrm{obs}/\lambda)^2}{(1+\lambda_\mathrm{obs}/\lambda)^2} c = 0.99999998 c.
$$
The bulk of photons in space aren't optical, though. Optical photons are outnumbered by photons of the cosmic microwave background by roughly four orders of magnitudes (see this question on the number density of photons). In order to blueshift these photons to gamma-rays, you'll have to go at $v=0.9999999999999988c$.
At this velocity, your biggest worry won't be radiation: Let's start by assuming that you are in intergalactic space. Galaxies are dispersed in space with typically a few Mpc$^\dagger$ between them, or very roughly $L = 10$ million lightyears as measured by an observer in one of the galaxies. However, your extreme speed means that, in your reference frame, relativistic length contraction ensures that the average distance is $L\sqrt{1-v^2/c^2}\sim0.5$ lightyears, i.e. you will hit a galaxy once every six month. Galaxies are typically 100 kly ("kilolightyears") in size, or, in your reference frame, roughly two lightdays. Your risk of hitting a star is small, but you'll go through a column density of roughly $10^{20}$ hydrogen atoms per cm$^2$, all hitting you with almost the speed of light. I assume the cross section of your space ship is 10 m, so you'll be hit by $\sim10^{26}$ hydrogen atoms. Although this has a mass of only 200 g, its total energy is
$$
E = \frac{10^{26}m_\mathrm{H}c^2}{\sqrt{1-v^2/c^2}} \sim 10^{23}\,\mathrm{J},
$$
or $\sim10^{18}\,\mathrm{J}\,\mathrm{s}^{-1}$, roughly corresponding to being hit by a pyramid at 20 km/s. Every second.
On second thought, you're probably not even going to make it to the nearest galaxy…
$^\dagger$1 Mpc = 1 million parsec ~ 3.3 million lightyears.
Comment: Pretty sure the interplanetary and interstellar dust would destroy the ship long before one got to another galaxy...  Micron sized dust is capable of cutting kevlar cables on spacecraft moving at very slow speeds with respect to Earth (thus, the dust is moving at ~10-30 km/s), let alone _light speed dust_!
Comment: @honeste_vivere: Yeah, that's why I ended by saying "You're probably not even going to make it to the nearest galaxy". But since it's a well-known fact that near-light speed space crafts need a couple of kpc to accelerate, it will be in the intergalactic medium before reaching fatal velocities :)


Excel: re-open most recently closed workbooks on next startup

Question: I commonly work multiple workbooks simultaneously (5, 6, 7+) and this usually deters me from restarting my computer b/c I don't feel like going through the hassle of saving, closing and then re-opening the workbooks I was recently working on.
I'm wondering if there is a way for Excel to remember which workbooks I had open before exiting the program (all workbooks at once) and then having the option to open all of those workbooks the next time Excel starts; essentially, this would be a "session restore". To add the cherry on top, it would be great to have a checklist at startup prompting me to choose which workbooks I want to open, in case I don't want to open all of them. Any help would be appreciated!
Comment: Are you looking for a vba solution or something that's part of vanilla excel?
Comment: `Workbook_Open()` + `Application.RecentFiles` + `FileSystemObject` checking last modified date or a recent file = a solution I am too lazy to fully write up.
Comment: @FairlyLegit: I assume VBA is the only way to go about this, which I am perfectly comfortable with. I just don't know where to get started.
Answer: What you could do is you could create another workbook, which would be your open close workbook. Then you could use some code along the lines of
Dim wb as Workbook
Dim TotalNum as Long
For Each wb in Application.Workbooks
    TotalNum = TotalNum + 1
    Range("A" & TotalNum) = wb.FullName
    If wb.Name <> ActiveWorkbook.Name Then
        wb.close
    End If
Next wb

This code will write out the locations of each file you have open on the workbook. Please note it will also close every workbook that you have open. If you don't want it to do that remove the wb.close line.
This following code opens all of those workbooks that were written on the sheet by the previous code.
Dim wb as Workbook
For i = 1 to Range("A" & Rows.Count).End(xlUp).Row
    Set wb = Workbooks.Open(Range("A" & i))
Next i

How I would use this is make a blank workbook and put two command buttons on it. One will be the "Save Open Workbooks" button and the other will be the "Open Saved Workbooks" button. Then simply click the "Save Open Workbooks" button, save the current workbook, restart your computer, open up the workbook where you placed the two buttons, then click the open button. That should do the trick.
Comment: the "SaveOpenWorkbooks" macro is not working properly. It opens the first wkbk in the sequence (i=1) but fails for the second wkbk (i=2). Error message: **Run-time error '1004':
" could not be found. Check the spelling of the file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files, make sure that the file has not been renamed, moved, or deleted.**
When debugging, I see that after the first "Set wb" command, an unrelated add-in I have is called & ran, probably the reason for '" could not be found.'
Answer: if you want, you can adjust this function, I have used comment by Brad to do it for the purpose of my job and I do not have much time to adjust it to general case

Private Function offer_recent_IF_SPEC() As Workbook
Dim file As Variant, ans As Boolean
Set offer_recent_IF_SPEC = Nothing
For Each file In Application.RecentFiles
 If file.Name Like "*_COMPLETE_*" Then
    ans = False
    ans = Application.InputBox(Prompt:="IF SPEC document is not opened, do you wish to open " & file.Name & " ?", Title:="IF_SPEC to open", Default:=False, Type:=4)
    If ans Then
        Workbooks.Open file.Name, UpdateLinks:=0
        'Debug.Print Mid(file.Name, InStrRev(file.Name, "\") - 1)
        Set offer_recent_IF_SPEC = Workbooks(Mid(file.Name, InStrRev(file.Name, "\") + 1))
        Exit For
    End If
 End If
Next file
    If Not ans Then
        MsgBox "You do not have opened GBL_COMPLETE excel", vbCritical, "GBL_COMPLETE not opened"
        End
    End If
End Function
Answer: I would like to suggest a modifications to FailyLegit code, on the part that you open the files:
Dim wb As Workbook
Dim sWorkbook, sWorksheet As String

sWorkbook = ThisWorkbook.Name
sWorksheet = ActiveSheet.Name

For i = 1 To Workbooks(sWorkbook).Worksheets(sWorksheet).Range("A" & Rows.Count).End(xlUp).Row
    Set wb = Workbooks.Open(Workbooks(sWorkbook).Worksheets(sWorksheet).Range("A" & i))
Next i

When the macro opens the first file of the list it looses focus, making the reference to the next file be searched on the recently opened file, not the listing.
This fixes it.
Thanks for the code FairlyLegit!


Meaning of "Crises involving a tick."

Question: Here is the place where I saw this: http://feltron.com/ar11_04.html (in the right-bottom corner of the first page).
Comment: What on Earth have you been reading?  This appears to be either the musings of a highly intelligent being, or the ramblings of a schizophrenic!
Comment: Here it is http://i.imgur.com/XW9swEf.png. Text is following: "Crises involving a tick. One. Spotted by Olga, removed by Mom."
Comment: See below, I've improved my answer.  Should help.
Answer: A tick is a small blood sucking arachnid.
Crises is the plural of crisis.  As they are listing countable items, they are using crises instead of crisis.  This is a bit confusing since there is only one item on the list.
In essence she could make a list like so:

Crises involving ticks: 1
  Crises involving monkeys: 0
  Crises involving bees: 32

The crisis involving a tick is described as Olga found one attached to her and her mother removed it.
It is a use of hyperbole, as the finding of a tick attached to you would never be considered an actual crisis.  But, rather, this person was highly distressed at having a small parasite attached to them.

Meaning of "Crises involving a tick."


Specific account validating transaction

Question: I am trying to create a system using blockchain for a "firm". What I am looking to do is for an employee to enter some data into the system but before it is uploaded have a manager sign off on it being true. Is there a way to make it so that everybody can enter data but it has to be verified by specific people before it is okay?
Thank you in advance.
Answer: You can do this by having the manager include a cryptographic signature of that transaction as well. Assuming you're using a smart contract, you could do something like this:

Keep a list of addresses of the managers in the contract (e.g., mapping(address => bool) isManager).
Before sending the data to the contract, have a manager sign a hash of the employee data.
In the function where you add the employee data, take both the data itself and the signature of the manager.
Use ecrecover to get the address of the signer, check that it matches one of the manager addresses (e.g., isManager[signer] == true).

You can use something like EIP-712's eth_signTypedData for signing the employee data.
Comment: Thank you for responding!
But this would require the manager to be the one to upload the data to the chain right? Is it possible to do it after the data has been deployed to the chain? And by that ensure that the data is not modified by the manager.
Comment: An employee can upload the data as long as they have the signature of the manager. You can also split it into two functions, one that adds the employee data to the contract, and another where a manager can approve that data (with something like a simple `approveData` function).

Specific account validating transaction


how to remove some data from pe (exe) file in C

Question: in first exe i have defined array of char with some special bytes as label, i mapping it to memory from another exe, finding needed label and putting in it new data, but this data could be shorter then defined array, so i want to cut this array to needed size! how can i do it?
Comment: There's almost certainly a better way of achieving what you want to do without resorting to ugly non-portable hacks like this. Maybe you could say what it is that you are *really* trying to achieve ?
Comment: i working on file encryption program, and first exe is like a stub with defined big array of "nops", it is big because a i dont no size of data that will be inputed in it from second exe. SO if inputed data will be much smaller then that array, i must cut it for reduce exe file size. I know that it will change offsets but dont know how to update them correctly. that's it!
Comment: Why not implement your encryption as a library and link to it...
Answer: There is no fine and simple way to cut out pieces of PE file.
Obvious solution is to additionally define a length field in the original (in your terms first) exe and mark it with another label. Then additional work of second exe would be to write to this field actual data length.

EDIT: If cutting is your primary goal you must also keep in mind that:

Control sum of a PE will change. Location of control sum field in PE header is not hard to find though.
PE file is aligned. All sections are aligned. The alignment could be found in the header too.
If you cut one section it would cause great consequences. Take a look at PE file header structure.

Reference:
http://msdn.microsoft.com/en-us/library/ms809762.aspx


Bread question regarding malt

Question: I'm looking at a bread recipe that doesn't have any diastatic malt powder in it, but does have a small amount of regular malt syrup. I'm going to add some diastatic malt powder to the recipe, so I was wondering if that should replace the malt syrup or should I just leave it in and have both?
Comment: That depends on what you're trying to accomplish with your modifications. Why are you adding diastatic malt powder, and why are you using a recipe that doesn't include diastatic malt powder?
Comment: I'm using it because I feel like my starter isn't as good as it should be (I might be wrong,) and apparently the diastatic malt powder is like a super feeder for yeast and I get better results with it so far using this starter. I'm just not sure if the if the malt syrup in this recipe is just there for flavour, or if it serves the same purpose as the diastatic malt powder.
Comment: This isn't quite a full answer, but King Arthur Flour writes of diastatic malt powder: "Especially useful when flour does not have barley malt added."  Seems to suggest that there may not be much purpose in adding two kinds of malt.
Comment: Good enough for me, I'll leave it out. Thank you!
Comment: All bread flours that I know of have been adjusted at the mill with diastatic malt. It may be listed on the side of the bag like "1/10 % barley malt added". Malt syrup just acts as a sugar substitute, not providing the same results as diaststic malt. Adding diastatic malt is best done at the mill, where they have the experience and equipment to measure the results.
Answer: Two different substances here.
Non-diastatic malt powder is mostly used for flavor.
Diastatic malt contains the diastase enzyme used to promote more of the starches to be broken down into sugars that yeasts can use as food. Too much Diastatic malt will make your bread come out gummy inside. For flours that do not have barley malt already incorporated in them (i.e rye flours) a recommended amounts of diastatic malt powder is less than 2.0% of the total flour weight.

Bread question regarding malt


Photometer / Colormeter

Question: I am wondering if there is a photometer/colormeter sensor that would be easily plugged into a raspberry pi.
I am looking at driving my Philips HUE from the exterior light color, to brighten my apartment with very natural colors. Any help highly appreciated
Comment: I think a light or color light sensor would be disappointing. You would mostly get some whitish color, when measuring outdoor lighting. If you want more hue, you should use a webcam and compute a segmentation / find out colored parts. OpenCV might help in that respect, but that is just a wild guess.
Answer: There is a lot of sensors you could use. The only restriction is that they can not be analog devices since RaspberryPi does not have analog to digital converters (unless you use some external A/D chip, which isn't that hard).
You should search for something like i2c light sensor. Just ensure it is 3.3V compatible. Here's an example from Adafruit. They even have a thread on their forum about using it with RaspberryPi.

Photometer / Colormeter


what will happen to built in apps in galaxy note 1 n7000 after hard reset such as s pen?

Question: my gt n7000 is getting slow, sometimes it restarts by itself and some application close by itself. i presumed the low device memory was behind all f this.i want to ask if hard reset will solve my memory problem and what will happen to my built in apps such as S-pen? will they still working or i have to reinstall it again? please i need your suggestion. thanks.
Answer: The types of problems you're describing are generally best solved by, indeed, factory resetting. If you can't find another solution, it's pretty much always the last resort. So if you're willing to do it, it's all but guaranteed to fix the problem, unless the problem is being caused by a hardware issue.
Built-in apps will all remain. Anything that shipped with the phone will still be there. Some may have updates that need to be reapplied, but you won't lose anything that was there when you first turned on your phone after buying it.
Comment: so i just go to setting- backup and reset- factory data reset? so the only missing apps are the additional one which i downloaded from google playstore? how do i backup my apps to my sd card?
Comment: sorry i was too exited to hear your answer, thanks so much for your reply.
Comment: That's correct. And unless you're rooted, you can't backup your apps to your SD card. But you may wish to try the app Helium which has some limited app backup abilities without root.


Pause/Stop an embedded YouTube video with an onclick event?

Question: I'm building a small video gallery where each video has an icon. When clicked it opens up a lightbox with an embedded YouTube iframe in it. The lightbox also has an X in the upper right corner to close it. Here's a simplified version of the CSS:
.lightBox { width: 646px; height: 405px; z-index: 1001; }
#video1Box { display: none; }

.playIcon { width: 100px; height: 100px; }
#video1Icon { background-image: blah blah blah; }
#video1Icon:hover { background-image: blah blah blah 2 }

iframe { display: block; margin: 15px auto; }

.x-button { position: absolute; top: 5px; right: 5px; }

...and the html:

         X

Right now almost everything works perfectly. You click the icon, the lightbox pops up, the video displays correctly within it, the video plays fine, and when you click the X the lightbox disappears. Only problem is that the sound for the video keeps playing.
I tried giving the iframe its own ID and then adding a getElementById call to the x-button onclick event to change that Id's display attribute to hidden and none, but neither worked.
I'm pretty novice with javascript, but is there a function I can add to the onclick event for my x button that will pause or stop the video, or like "reset" the iframe, or something?
It would also be a huge bonus to be able to autoplay the video when the icon is initially clicked, but that's not absolutely necessary at the moment.
Comment: Does this answer your question? [Stop a youtube video with jquery?](https://stackoverflow.com/questions/2128535/stop-a-youtube-video-with-jquery)
Answer: you should read this post :
Youtube api - stop video
tell me if you still have issues after


Dense sift vs sift?

Question: What is the difference between the dense sift implementation compare to sift? What are the advantages/disadvantages of one to another? I'm talking in particular about the VLFeat implementations.
Answer: The obvious difference is that with dense SIFT you get a SIFT descriptor at
every location, while with normal sift you get a SIFT descriptions at the
locations determined by Lowe's algorithm.
There are many applications where you require non-dense SIFT, one great example is Lowe's original work.
There are plenty of applications where good results have been obtained by computing a
descriptor everywhere (densely) one such example is this. A descriptor similar to dense SIFT is called HOG or DHOG, they are technically not the same thing but conceptually both based on histograms of gradients and are very similar.
Comment: This is a good answer, but the remark about dense SIFT being called HOG is incorrect. Though they are both based on gradient bins, HOG and SIFT are two different descriptors (dense or not; though HOG is typically sampled densely).
Comment: @Jotaf: you're right I was oversimplifying. I've edited my answer a bit.
Comment: If you compute original SIFT at each point you don't get denseSIFT http://www.vlfeat.org/overview/dsift.html
Answer: Generally, for generic object category recognition, better results are obtained using dense feature extraction rather than keypoint-based feature extraction.
Answer: On http://www.vlfeat.org/overview/dsift.html you can find in detail how the image features are extracted for both SIFT and dense SIFT implementation as well as a comparison of their execution time. The main advantage of the VLFeat dense SIFT descriptor is the speed.
In MediaMixer Deliverable D1.1.2 a concept detection technique where both SIFT and dense SIFT descriptors are used is presented, and the experimental results have shown that this combination provides more accurate classification. For further information you can join the MediaMixer community portal on http://community.mediamixer.eu/.
Answer: Dense SIFT collects more features at each location and scale in an image, increasing recognition accuracy accordingly.  However, computational complexity will always be an issue for it (in relation to normal SIFT).
If you're using SIFT for classification, I recommend using normal SIFT with multiple kernel functions (for clustering) as oppose to using Dense SIFT with a single linear kernel function.  You'll get the obvious speed/accuracy trade off, though.
I recommend checking out this paper which explains the implementation differences in Big-Oh.
Comment: Please eleborate on clustering step.
Answer: You can read more about DenseSIFT in VLFeat implementation details.
DenseSIFT is more fast (x30-x60 speedup).
http://www.vlfeat.org/overview/dsift.html
http://www.robots.ox.ac.uk/~vedaldi/assets/pubs/vedaldi10vlfeat-tutorial.pdf

Dense sift vs sift?


Where can I ask question about offshore USA medical school or colleges?

Question: I would like to know which part of stackexchange is most suitable for posing a question about credibility of offshore medical schools, their accreditation and acceptance in USA and if it is easier to get in residence program via them faster and easier in contrast to regular outside of USA graduate procedure?  DO YOU think maybe expat forum or medical forum can be suitable?
Answer: Medical school is a form of postgraduate education that is certainly within scope of this site.  Asking for evaluation of particular schools would not be, nor would asking something highly opinion-based like "which is better?" or highly personal like "which is easier for me to get into?"  Accreditation and acceptance in the USA would be on topic.
Note that your questions might not be answered as quickly as PhD-centric questions, but that should be no barrier to asking them.
Comment: "What is law and regulation regarding off shore departments in general?" would be too broad, since it's not clear which of the *many* possible issues you're asking about..  "Are there significant barriers to getting offshore medical degrees recognized in the US?" would probably be fine.
Comment: So concretely, accreditations of medical USA offshore schools, if someone had experience with these kind of institutions and how they menage to recognize their studies back in USA. What is law and regulation regarding off shore departments in general? This would be my question, do you think it is opinion based?
Comment: thank you! "Are there significant barriers to getting offshore medical degrees recognized in the US and if there are not, is it beneficial for residency application? Is this ok question? I will than further explain  about why students decide to apply for off shore departments and how they validate their diplomas for residency entrance more quickly in contrast to foreign diplomas...blabla...in global, this can be acceptable question and explanation of question?
Comment: @SSimon I would recommending one question at a time, rather than making compound questions.  Sometimes, however, compound questions are OK.


2018 Diamondback bottom bracket size

Question: Does anyone know what size a 2018 Diamondback Line bottom bracket is?
Answer: A couple things to start.  First, are you looking to replace the bottom bracket and keep the same crank set? This is significant because the crank set choice largely guides the bottom bracket type and length of the spindle in a bottom bracket(BB).  Thus, if you're looking to mount a different crank set, you'd be looking to the requirements for that. Second, a major factor in determining BB compatibility is the width of the bike's BB shell. A Diamondback Line will have either a 68mm or 73mm BB shell, and you should determine that measurement right off the top as it, too, determines the BB required.
Despite numerous hits from a Google search, the best anyone, including the manufacturer, can say is that the stock crank has alloy arms and a single, 30 tooth, narrow-wide chainring. The specs list only, "cartridge bearing bottom bracket" for that part, and I could not find reference to the BB shell width despite multiple postings on the geometry.
However, one can get enough information from the bike to guide a correct replacement purchase.  To obtain a direct replacement cartridge bearing BB, you'll need to know the width of your shell, the length and type of spindle it has and the type of threading the bike's BB shell has to accept the BB. Regarding the spindle, the length is measured end to end WITHOUT including the crank arms in the measurement. This can be a little tricky without removing the cranks. You could remove the crank fixing bolts that thread into the spindle to secure the crank arms. This will give you access to each end of the spindle and from here you can use a tool that measures outside diameters (a spring outside diameter caliper or a long reach digital caliper) or measure the distance from the outside of each crank arm to the end of the spindle of that side, then measure the overall distance from outside to outside of the crank arms and subtract the sum spindle end to outside crank arm measures.  You'll then that's the BB spindle length. By type of spindle I'm referring to the shape of the ends where they interface with a crank arm.  It will be either a square shape (termed a square taper spindle) or the spindle will have splines (Octalink and ISIS are two possibilities).
Here's what I can say based on experience.  A Diamondback aluminum frame will most certainly have a BSA threaded shell (that's 1.37 inch diameter x 24 threads per inch-TPI), and requires the same BSA threading from a BB. Most decent mountain bikes from the late 2010's have a 73mm shell. You likely are dealing with a square taper spindle.

2018 Diamondback bottom bracket size


Simple Inequality for holomorphic functions

Question: Let $g:D \longrightarrow \mathbb{C}$ be holomorphic on an open set $D$. Let $B$ be a disk with centre $c$ such that $\bar{B} \subset D$. Then $|g(c)| \leq \max_{z \in \partial B} |g(z)|$. Why is this statement true? Does it follow from Cauchy's integral formula?
Comment: Okay I think I got it. Nevermind then
Answer: This is a consequence of the maximum principle:

Proposition. Let $f\colon U\rightarrow\mathbb{C}$ be a holomorphic function on an open connected subset of $\mathbb{C}$ and let $z_0\in U$. If $|f|$ has a local maximum at $z_0$, then $f$ is constant.

Proof. This follows from the fact that non-constant holomorphic functions are open, which itself is derived from the fact that holomorphic functions satisfy the identity principle and the existence of a complex logarithm in $D(1,1)$. $\Box$
From there, one can derive the following:

Proposition. Let $f\colon U\rightarrow\mathbb{C}$ be a holomorphic function on a connected and bounded subset of $\mathbb{C}$ such that $f$ is continuous on $\overline{U}$, then $\sup\limits_{z\in U}|f(z)|\leqslant\sup\limits_{z\in\partial U}|f(z)|$.

Proof. Since $\overline{U}$ is compact and $|f|$ continuous on it, $|f|$ reaches a maximum on $\overline{U}$. If its maximum is reached in $U$, then using the above proposition, $f$ is constant and the desired equality holds. $\Box$
The last proposition is stronger than the result you aimed for.


Can't change the language when phone screen locked

Question: I am using Samsung Galaxy Core. I have given Password to my mobile in English. Today for some reason I changed my Language to TAMIL and forgot to change back to English. My Phone got locked when i try to give the password the keyboard appears in Tamil and I can't do anything. How can I change it
Comment: Press and hold the spacebar to change the keyboard language. (as shown on [this instruction](https://videotron.tmtx.ca/faqs/item/?lc=en&p=samsung_galaxycorelte&a=changing_the_keyboard_language))
Comment: This works if the keyboard remains the default Samsung Keyboard. Other keyboards may, or typically may not, have this capability. Hackers Keyboard, my preference, specifically does NOT. YMMV.
Answer: Press the space button and hold the English language, and other languages will appear. Choose the language as you like and it will change the language.
Comment: That only works with the default keyboard (e.g Samsung). Third party keyboards usually miss this functionality.
Answer: If you have registered on Samsung. Then log in to your account using other computer. And reset Samsung mobile.
Now first tell me have enabled find my device on your mobile. If yes then log in to your account on any device and you an unlock your devices.
Hope this can solve your problem.
Answer: Get a wired keyboard and plug it into the phone using OTG. It is working for me.
Answer: I had the same issue that I was unable to login into my phone due to the default language (keyboard layout) being non-English. The bad thing is when you try to change the language preference (by pressing space and hold) it again asks you for the password. The problem repeats itself. I solved this problem in this way:

I login into "safe mode" first (follow the link to the official Samsung Support).

Then I changed the default keyboard layout into Samsung keyboard (which is English)
Then I restarted it. This time the keyboard is English.


How can a trade secret thief avoid being caught?

Question: The story is about someone who uses advanced technology (think Batman) to steal trade secrets (food recipes, chemical ingredients, manufacturing processes) from other companies and uses them to create his own versions of the products which his company then sells at lower prices (or whatever he can do to benefit from the trade secrets). How long can this last before other companies start to notice someone's been stealing their trade secrets and what can he do to prevent being discovered or prosecuted or otherwise having his business stopped?
Comment: "Prosecuted" for what? The entire point of a trade secret is that it is not public. So the thief can be prosecuted only if he is caught actually *stealing* someting, as in physically breaking and entering, or being caught misusing the target's computer systems, or other such. A company cannot come in court and say "we had this secret knowledge which we won't tell you because it is secret but believe us that we know this thief stole it from us".
Comment: *"Prevent other companies to stop whatever he's doing":* I would think that other companies are *already* and *always* trying to stop what he's doing...
Comment: A Batman-like figure would be making a physical security breach if he tries to steal something. This would be noticed immediately. However it is hard to tell when the corporations would be able to make a trap that he wouldn't be able to escape.
Comment: Maybe not exactly prosecution, but just to prevent other companies to stop whatever he's doing.
Comment: Heh heh. Respond through the courts?  Or with an advert in https://en.wikipedia.org/wiki/Soldier_of_Fortune_(magazine) ?
Comment: That would depend.  If the secrets are for products not yet released and he's first to market...  Not ethical in any way but if the company hasn't a patton the technology and it is sufficiently different it woudl take a few occurrences of this happening before someone caught on.
Comment: If the secret is not patented then they are not breaking the law.
Answer: Just before his first product comes out
Firstly, court has discovery so as soon as you're about to release a product, they can put an injunction on you and demand all confidential data. You then need to argue why they shouldn't see it. At best you'll have a court appointed expert comparing your product to their product.
This happens even if you didn't copy anything and even if the products are not alike. This happened to me several years back. We developed a product that was light years ahead of anything else on the market. Just as we were about the release, one competitor claimed we stole their design and demanded all our designs, source code and documents. We had to fight them despite being nothing alike. If we didn't they would have gotten everything.
Court isn't about justice, it's just as easily used as a weapon to kill off competition.
Your best bet is to sell the info off to a competitor and let them fight and leave your thief in peace.
Answer: They'll notice as soon as he's actually moving enough goods to come to their attention or advertising into their markets. Companies with IP to protect tend to keep a close watch on such things, but not always so much in markets where they have no activity.
Avoiding legal issues is easy, all he has to do is be a Chinese national operating out of mainland China. It's been standard business process there for decades, hence the phrase "cheap Chinese knockoff", it's exactly that, a cheaper copy of a product, usually to lower build standards that comes out of China.
The main quirk of this being that often the original product is also made in China, sometimes in the same factory or even on the same production line.
Comment: Which "same production line" is a big part of why it's easy for them to steal the tech. If you are *making* something it's pretty easy to figure out *how* to make that thing.
Comment: It's not necessary to be such Chinese national. Thief could **sell** secret to such people. And if he is cautious enough to sell anonymously then there is no legal issues: someone else are using trade secret, not thief personally.
Comment: There's nothing illegal about copying a design (unless it's patented) and nothing illegal about making something that looks similar (unless it violates a trademark) and nothing illegal about selling information that is a trade secret to some company (unless it was acquired by illegal means) so this reads more like a rant than a serious answer. People start up competing companies all the time, especially after NDAs expire. Western custom is to usually somewhat differentiate it, at least superficially, more than in Asia, but that's not really the point.
Comment: @SpehroPefhany, I didn't make any suggestions of right or wrong, just statements. One could simply state that western concepts of copyright or patent law don't apply in China.
Comment: @SpehroPefhany. it's no more a rant than stating that the Catholic church spent decades covering up child abuse is a rant. It's a statement of how the world works. Like it or not, that's just how it is.
Comment: @Separatrix Except that everyone agrees that child abuse is wrong. Not so with making stuff that looks the same. They even share designs in mainland China between makers. It's just not black and white.
Answer: They wouldn't have to fear much
"Trade secrets" fall into two broad categories: technological and, for lack of a better word, "cosmetic"
"Cosmetic" trade secrets derive their value not from the actual information that's being protected, but from intangible effects like brand recognition. Food and drink recipes, for example, are guarded so jealously because of the marketing effort that went into popularizing the specific recipe. Now, any major soda company can at least approximate the Coca-Cola recipe closely enough that a human consumer wouldn't be able to tell the difference. However, Coca-Cola can always claim that "it's not the real deal", and many would believe them. If, on the other hand, the official recipe were public knowledge, it would not take long for competitors to bring a provably identical product to market at a significantly lower price.
In cases like this, you don't gain much from stealing the recipes unless you use them in marketing, which would be rather obvoius unless done cleverly. So, if you absolutely want to avoid getting caught, skip this category altogether. Anonymously leaking data to the general public might work, though, and carry limited risk unless you get caught in the very act of stealing the data.
Technological trade secrets concern know-how and techniques that aren't common knowledge and can serve to improve your products or production processes. In order to remain secret, these have to be non-obvious (i.e. not easy to discern via reverse engineering, chemical analysis or by hiring your competitor's ex-employees), otherwise the know-how would quickly spread. Consider, for example, the code for an in-house toolchain, or the plans for a not-yet-released product. Stealing those would not only be profitable but, because customers don't interact with them directly, difficult to prove. Anything that allows the other company to keep the details secret can be used by yours as well.
Now, there will always be suspicion, there will be legal battles and patent trolling, but that's an issue regardless of whether any kind of industrial espionage has taken place. The legal system is just another weapon in any corporation's arsenal, and having an information advantage on your competition can only be beneficial.
Comment: Patents and trade secrets are sort of mutually exclusive, since the whole *point* of a patent is to put the knowledge out in the open (in exchange for a temporary monopoly on whatever the patent describes).
Answer: [These are a common occurence in infosec - inspired from there]
He simply puts it on the internet. With no way to trace back to him. In the background, he keeps his production assembly almost ready, to just start producing at the right time, yet with enough delay, so that no fingers get pointed at him. Soon others may join, but he is first to market, so he kills the competition.
If there are large number of trade secrets, he chooses the top X he wants to use for himself, and be prepared for them. The rest, he just releases on the internet in the hope that someone else will pick it up, so as to confuse the owners.

what can he do to prevent being discovered or prosecuted?

So he does nothing like that. He goes on the offensive rather staying defensive.
Answer:
...what can he do to prevent being discovered or prosecuted or
  otherwise having his business stopped?

 Read about capacitor plague where the formula for making capacitors was infected with a fatal ingredient/process (or was it a vital, missing ingredient?). In this case, it took a few years for these faulty capacitors to self-destruct, and many millions became embedded into a broad range of electronic devices before discovery.
These stolen-formula capacitors were trademarked with bogus manufacturers to obscure the real maker. Was the manufacturer obscuring their identity because they feared reverse-engineering might trace to themselves? Or did they know that their product was inferior? It seems they've escaped (so far).
Comment: Seems like it was a worker at Rubycon in Japan and the info found its way to Taiwan where it was used.
Answer: Look for products which haven't been fully trademarked or copyrighted, copyright and trademark the products, and then sue the companies for copying them.
https://www.cultofmac.com/627330/apple-pulls-ios-game-chinese-steals-name/
It has long been a tradition of people to take other's work and then make them pay.
So, have them have contacts within the companies and hacking and such, and aggressively get copyrights and trademarks on their stolen tech. Then, if the company releases the products, they can sue them for either a licensing fee, or pull them off the market for stealing his product.
Comment: Doesn't really work like this. A patent of invention requires novelty; one cannot patent something which is already know. A trademark application can be (and often is) challenged if it attempt to use an existing mark.
Comment: You claim that you invented it first of course, and that they just copied you. They can take you to court, but that is quite expensive.
Answer: The thief would have to be on the lookout for a "honey pot" intended to trick them into either revealing that they breached security in an illegal manner, or to physically capture them.
Most companies are not going to publicly announce that their trade secret has been found out, since that reduces the value of their product. For example, suppose the exact formula of Coke was "stolen". There is no advantage to Coca-Cola in announcing to the world that competitor X has the exact same product, they would be better off to allow consumers' imagination to tell them that the product in a different color can and different logo is slightly "off".
A deliberately created incident could allow them to shame competitors who financed the exploit, get the thief to admit the info is stolen, or even to capture the invisible man or however your character is getting into secure areas and acquiring information.


How to access a method and pass an argument within the template?

Question: In my template I want check whether an entity has a relation to another one. Meaning one object is in an attached Object Storage of another one.
In the controller I can simply call:
if ($product->getCategory()->offsetExists($category) {
    print 'In category ' . $category->getName();
}

But I can't figure out the correct syntax in the template. I tried those without luck (both evaluate to true everytime):
<f:if condition="{product.category.offsetExists(category)}">true</f:if>
<f:if condition="{product.category.offsetExists({category})}">true</f:if>

Is this even possible within the template?
Answer: You can only access properties via Getter from Fluid with no parameters, but you can implement an own ViewHelper to check that. As parameters you can use your Product and the Category. Then you can call your ViewHelper from Fluid this way:
<vh:checkOffset product="{product}" category="{category}" />

or inline
{vh:checkOffset(product: product, category: category)}

Within your ViewHelper you can check this in the way you've done it in your Controller:
public function render($product, $category){
    return ($product->getCategory()->offsetExists($category));
}

Comment: Thanks a lot again - I totally forgot to come back here and give a thumbs up.
Answer: Additionally to sretuer's answer, I'll only mention that you can create VH which will display block conditionally like:
File typo3conf/ext/your_ext/ViewHelpers/CheckOffsetViewHelper.php
<?php
namespace VENDORNAME\YourExt\ViewHelpers;

class CheckOffsetViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
    public function render() {
        return ($product->getCategory()->offsetExists($category))
               ? $this->renderChildren()
               : '';
    }
}
?>

So you can use it in the view:
{namespace vh=VENDORNAME\YourExt\ViewHelpers}

<vh:checkOffset product="{product}" category="{category}" >
    Display this only if product is in category
</vh:checkOffset>

Of course you need to fix VENDORNAME and YourExt according to your extension, can be found at the beginning of every controller, model, repository etc.
Comment: Thanks a lot again - I totally forgot to come back here and give a thumbs up.
Comment: I do not dare to touch you code. @thomas-hörner did add a comment for you as NAA: *You forgot the brackets for the method renderChildren. It did not run without the brackets in my code.

return ($product->getCategory()->offsetExists($category)) ? $this->renderChildren(): "";*
Comment: @bummi and Thomas thank you for pointing missing brackets, that's StackOverflow feel free to edit other's answers/questions especially if they contains nasty bugs; btw sorry for this ;) I wrote from top of the head
Comment: according to the [book](https://docs.typo3.org/typo3cms/ExtbaseFluidBook/8-Fluid/8-developing-a-custom-viewhelper.html) the class file has to be under `typo3conf/ext/your_ext/Classes/ViewHelpers/CheckOffsetViewHelper.php`, otherwise the autoloader will not find the class by namespace
Answer: You may consider https://fluidtypo3.org/viewhelpers/vhs/master/Condition/Iterator/ContainsViewHelper.html which is designed for creating conditions in Fluid that check if an array or Iterator contains another object and works exactly like f:if regarding then and else arguments and f:then and f:else child nodes.


What are the special Blades Gramps mentions (and how are they unlocked)?

Question: After getting your first Core Crystal, Gramps mentions that with a high enough luck stat, you could spawn a special Blade. What kind of luck threshold is there and what Blades can you unlock this way?
Comment: Most probably, Gramps means 4-5 crowns Blades, which are unique, have personality, and are displayed in Blades Album. Seems to be completely random - on lvl 20 Rex, with only base Luck skill purchased, without any Luck trinkets, I've got my first unique blade from common crystal core without a single booster. It might have some percentage chance, but it's too early for community to figure it out.
Comment: Agreed. I've gotten a few since then. I got 2 out of my first 2 Rare Core Crystals, but since then I've gotten ~5 from common ones, without using boosters. I guess boosters only influence the element or something.
Answer: It would appear that special Blades are rare, "named" Blades that can be gotten from any core crystal. Some specific crystals give these Blades, but they can also be gotten from common and rare core crystals - rare ones have a higher base chance to give a "special" Blade.
Special Blades have their own unique intro and graphic. Some unlock specific merc missions (Azami comes to mind) where they are at the forefront.
A listing of every unique Blade (story and special) can be found here - spoilers beware.