Prove that there are at least 100 pairs of usable boots

Question: A store has 200 boots of size A, 200 boots of size B and 200 boots of size C. Among these 600 boots, 300 are of the left foot and 300 are of the right foot. Knowing that usable pairs of boots have the same size and are for different feet, prove that it's possible to find at least 100 pairs of usable boots.
Comment: @MartinSleziak yes, it was from Mathematical Circles. I couldn't understand the solution.
Comment: What have you tried so far? How can you arrange the left and right boots among sizes (or vice versa) to get the *fewest* number of pairs of usable boots?
Comment: @ConMan I'm trying to apply the pidgeonhole principle somehow, but I can't manage to put in all those constants (invariant sum) and combine them in the two requirements
Comment: Calling $a_L$ the number of size $A$ left foot boots, $b_R$ the number of size $B$ right foot boots, etc. Have you tried to take advantage of the fact that the number of pairs of boots $p$ is given by

$p = \min\{a_L,200-a_L\} + \min\{b_L,200-b_L\} + \min\{c_L,200-c_L\}$?

Alongside the fact that $a_L + b_L + c_L = 300$ you should be able to complete the proof I believe.
Comment: This problem appears in the books Fomin, Genkin, Itenberg: Mathematical Circles-Russian Experience on [page 37](https://books.google.com/books?id=8bXkoKSbN9YC&pg=PA37) with a solution on [page 225](https://books.google.com/books?id=8bXkoKSbN9YC&pg=PA225). Did you get it from the same source or from somewhere else. (Including the source of the problem in the question would be nice.)
Answer: If any size category $A,B,C$ has equal numbers of left and right boots, there are the required $100$ pairs of usable boots and we are done.
Otherwise every size will have a majority of one foot. Since $101\times 3>300$, these cannot all be the same foot, so without loss of generality we can assume that there are two right-foot majorities and one left-foot majority. Now the number of right boots in the right-foot majority sizes is at most $300$, so there are at least $100$ left boots in those two sizes, which can all be matched to right boots, giving us $100$ usable pairs as required.
Answer: To give you a feel for the problem, here is a proof by cases. Calling $a_L$ the number of size $A$ left foot boots, $b_R$ the number of size $B$ right foot boots, etc.
We first note that the number of pairs of type $A$ is given by the $\min\{a_L,a_R\}$. Now, we have $a_L + a_R = 200$, hence $a_R = 200-a_L$. We can use this to say the number of pairs of size $A$ is given by $\min\{a_L,200-a_L\}$.
Now, calling $p$ the number of pairs we see clearly that
$p = \min\{a_L,200-a_L\} + \min\{b_L,200-b_L\} + \min\{c_L,200-c_L\}$.
Assume that the left-footed shoe is the lesser quantity in all of these terms then we get $p = a_L + b_L + c_L$, but we know there are 300 left-footed shoes, hence $p=300$. Assume that the left-footed shoe is the lesser quantity in two of the terms of $p$. Without loss of generality, assume that this is true for size $A$ and $B$. Then we have that
$p = a_L + b_L + 200 - c_L = 300 - c_L + 200 - c_L = 500 - 2c_L$,
but $c_L \leq 200$ hence, $p\geq 100$. Assume that the left-footed shoe is the lesser quantity in one of the terms of $p$. Without loss of generality, assume that this is true for size $A$. Then we have
$p = a_L + 400 - (b_L + c_L) = a_L + 400 - (300 - a_L) = 100 + 2a_L \geq 100$.
Lastly, assume that the left-footed shoe is the lesser quantity in none of the terms of $p$. Then
$p = 600 - a_L - b_L - c_L = 300$.
Answer: (Alternative solution)
Let $\alpha, \beta,\gamma \in \mathbb Z\leq 100 $
Number of boots are tabulated as follows:
$$\begin{array}&&
\hline
\bf\text{Left}&\bf\text{Right}&\bf\text{Total}&\bf\text{Usable Pairs}\\
\hline
\bf\text{Size A}&100+\alpha &100-\alpha &200&100-\alpha\\
\bf\text{Size B}&100-\beta &100+\beta &200 &100-\beta\\
\bf\text{Size C}&100+\gamma &100-\gamma &200 &100-\gamma\\
\hline
\bf\text{Total}&300 &300 &600&300-(\alpha+\beta+\gamma)\\
\hline
\end{array}$$
For total Left and Right boots to equal $300$ each,  $\alpha-\beta+\gamma=0 \Rightarrow \beta=\alpha+\gamma$.
Number of usable pairs is given by
$$\begin{align}
N=300-(\alpha+\beta+\gamma)&=300-2\beta\\
N_{\text{max}}=N\big|_{\beta=0}&=300\\
N_{\text{min}}=N\big|_{\beta=100}&=100\\
\end{align}
$$

(Original solution below)
Consider the extreme case where

all 200 size A boots are Left (L),  and
all 200 size B boots are Right (R),

i.e. all unusable.
This leaves 100 R and 100 L boots. These must all be of size C.
Hence there are 100 pairs of usable boots.
Answer: There are three categories- size A shoes, size B shoes, and size C shoes. We are going to place 600 boots into these three categories. Since 300 shoes are of the left foot, by the pigeon-hole principle, at least one category will contain 100 left boots. Now we add in the 300 right boots.
Here's the kind of naive way I thought about this problem. The category containing at least 100 left boots has between 100 and 200 left boots- call this category $c_1$. Now there are around 100 cases.
If $c_1$ contains 200 left boots, then the remaining 100 are contained in the second two categories which when we fill with right boots will yield 100 pairs of working shoes since neither of these categories will have fewer than 100 spots for right boots.
If $c_1$ contains 199 left boots, then the remaining 101 are contained in the second two categories, and we get 1 working pair from $c_1$. If all 101 are contained in one of the remaining two categories, then that category will yield 99 additional working pairs after being filled with right boots. If neither of the remaining two categories contain all 101 left boots, then we get an additional 101 working pairs, since both categories have at least 100 remaining spots for right boots.
If $c_1$ contains 198 left boots, we repeat the above argument.
This kind of argument will work for $c_1$ containing 200 down to 100 left boots.
There is probably a more elegant way of proving this, but I find this first glance type of reasoning more intuitive and still reasonably rigorous.


Unexpected behaviour with nested location, alias and php-fpm upstream

Question: Good evening,
~ What I would like to do ~
I need a default location block matching anything, location / {} I guess, this block has its own root directory. it has to serve any static file and interpret any php files inside its document root or subfolders. (I set this up and it seams to works fine)
And here is where I need some help :( …
Inside this same server block, I would like to host a php symphony application served when hitting mydomain.foo/panel/ area. So I added a ^~ /panel/ location (uri starts with /panel/)
My problem is that the try_files does not behave as I expect ( internal redirect to the last nested location in case uri do not match the nested location) . See code comments below.
~ My configuration as is … ~
upstream phpfcgi {
    server unix:/var/run/php5-fpm.sock;
}

server {
    listen 80;
    server_name domain.tld;

    ## Default locations
    location / {
        root /home/me/sites/default/www;
        index index.php;
        location ~ \.php$ {
            include fastcgi.conf;
            fastcgi_pass phpfcgi;
        }
        location ~ /(.+) {
            try_files $uri $1 =404;
        }
    }

    ## panel area
    location ^~ /panel/ {
        # Public files are located in sf/web sub-directory
        alias /home/me/sites/sf/web/;

        # Since uri starts with '/panel/', I expect NGINX to execute try_files as a last resort.
        # if nested location do not match, and uri is not an existing file,
        # shouldn't nginx do an internal redirect with the 2nd try_files argument
        # and finally hit the nested location (triggering fastcgi_pass) ?
        # But try_files is ignored and nginx falls back to "/" location above instead.
        try_files $uri /panel/app_dev.php$is_args$args;

        # FastCGIpass to upstream
        location ~ (app_dev|config)\.php(/|$) {
            try_files $fastcgi_script_name =404;
            set $path_info $fastcgi_path_info;
            fastcgi_param PATH_INFO $path_info;
            include fastcgi.conf;
            fastcgi_pass phpfcgi;
        }
    }

    # Custom errors
    error_page 403 404 =404 @null;
    error_page 324 500 502 503 504 =500 @null;
    location @null {
        root /home/me/sites/_;
        rewrite ^.+$ /$status.html break;
        try_files $uri 444;
    }
}

If my configuration is too clumsy, then how can I fulfill my requirements ? (default location with document root, and a special area serving my php application, on the same server) ?
NGINX documentation is getting better, but there still are things I do not understand in the request processing flow.
Any solution / suggestion / improvement ?
Thank you :)
Answer: You're using nested location blocks. I haven't used them because I don't really understand them, but they seem to be adding complexity. Try using location blocks that aren't nested. Your config looks quite different to any other I've seen, but my nginx experience is limited.
I have an example of my config in this question.
Nginx HHVM Wordpress issue with PHP Execution in one intermediate subdirectory
There's some best practice here.
That question also includes an example of how to debug these things, by adding headers and looking at them. Makes things a lot easier to understand and debug. If that's all you get from my answer I think it will be valuable.
Comment: Thank you @tim, I finally split up `/panel` into two distinct location blocks and set up my configuration based on [this post](http://serverfault.com/questions/334517/symfony2-app-in-subdirectory-nginx).


iTunes Connect: What happens on devices when I delete an app?

Question: We've got an application that we're overhauling and putting a new skin on.  Marketing within our company has made the decision to cut ties with the previous application and try to market this new application instead.  Because of this, we have to delete the current application on iTunes Connect.  This I can do.  What is being asked is what kinds of ramifications are there to deleting the application?  What will happen on a customer's device that has already downloaded the app?  Obviously, if they never connect to the internet, it can continue to work as before.  But does Apple do anything special when a cert is canceled or removed or an application is deleted?  Do they wipe away the application if you try and sync the device to iTunes?
Answer: No matter if you delete it on your developer account, the users will continue with that app until they will update or delete it. No more options here.
Answer: When an user buy an app he become the copy owner so he own his copy on his device and ipa on iTunes and he can continue using and installing it forever as he want.
He simply stop receiving updates.


High adjusted r square

Question: I am running a pooled OLS regression for my thesis. My adjusted R square is 0.74, which is quite high compared to other published studies. I have checked for normality of residuals, serial correlation and homoscedasticity. All the 3 tests meet the conditions for OLS. Should I be concerned about the high adjusted r square? Is there any test I could do to know whether the regression model has no other flaws?
Comment: Have you generated graphical diagnostic plots for the regression?  If not, that's what you should do next.  Look in particular for outlying regressor values (*e.g.*, those with large mahalanobis distance from the mean): a *single* such outlier can create an artificially inflated $R^2$ (which will inflate the adjusted $R^2$).
Answer: The adjusted R square is what it is.  Differences with other published studies cold be due to differences in the data and/or the predictor variables.

High adjusted r square


How to use more VRAM?

Question: I recently bought a graphics card with 12 GB in memory, but when I model complex scenes I see very little amount of VRAM in use, and some times it gets very laggy in the viewport at less than 25% VRAM usage. I don't know why. Is that normal?. Should I find a way to use more VRAM? I think maybe there is something wrong in my Blender's settings or in Windows configuration. I'm using Blender 3.5 and Windows 10, rendering in Cycles with GPU and Optix enabled.  I want to take more advantage of my 12gb of graphics card's memory, if possible.
Answer: So, at render time, your computer will take the final version of everything in your scene and package it all up and ship it over to your VRAM, that way your GPU has the fastest possible access to all the information it needs.
Then it just fires away rays and your computer accumulates all that into an image.
Just consider that 12gb the maximum possible scene complexity that you can cram onto your card at render time.
The viewport is taking a lot of shortcuts to get to a very good approximation of the result, and may or may not use vram efficiently, I haven't really looked into it, maybe someone can add to this answer.  In any case I don't think it would be surprising to anyone here for the viewport to run below the desired framerate.
Comment: I don't think this answer is worth a checkmark or anything, I just wanted to ease your feelings on the situation

How to use more VRAM?


Linear Phase Response

Question: In many cases, it is demanded that filters have a linear phase response (like in the case of FIR).
Why is linearity so important? Why not a constant phase response, or anything else (any other shape)?
Answer: In some (communication) systems a linear phase response is desired because of the group delay (group delay is nothing else than the negative SLOPE of the phase function).
Hence, a linear phase gives a constant group delay.
By the way: A "constant" phase is possible for a pure resistive circuit only (without frequency dependence).
However, there are many applications (filters) which do not require linear phase functions because group delay is not of primary concern.
Answer: A linear phase response simply amounts to a time delay, and that delay is equal at all frequencies for which the phase is linear.
If you can think of phase as a time delay at each frequency, and accept as a given that phase that is linear across frequency is a constant time delay, phases that don't vary linearly have different delays for each frequency component.
So, when phase is linear, the signal at the far end of the filter  (especially in the flat part) looks like what went in -- only time delayed.  No distortion. In fact, you even know what this time delay is. This can be useful for things like anti-aliasing filters.
Answer: I don't know much about FIR filters.  But (to me) choosing a flat phase delay in a filter (such as a Bessel) is when you care more about the time domain, and not just the frequency response.  You will see more (step response) ringing from a Butterworth compared to a Bessel filter.
This is nice though old.

Linear Phase Response


How can I detect a touch event in a computer-vision blob-tracking system?

Question: Say I have a computer vision system capable of tracking multiple colored blobs. Further, assume I want the blobs to represent "fingers" in a multitouch system. Now, I have many examples I can look at to see how to make multitouch gestures. However, I cannot seem to find a clear explanation of how a "touch" event is defined in the first place. Best case scenario, the system can detect blob size and I can say something somewhat like "blobSize>minSize=touch". Worst case scenario. I can only detect position. Do I wait for the blob to stay still for some amount of time, or what?
Answer: A touch event, equivalent to a mouse click, would be a blob that appeared and then disappeared with minimal movement in between that happened on, or near enough on a clickable item.
You will have to have some tolerances for:

Minimum & maximum blob size
Minimum and Maximum duration, > maximum becoming a click and hold
How much movement is allowed before it becomes a drag event
How close to the clickable area you need to be.

It is possible that, when using a computer vision system that is tracking objects to represent finger tips, i.e. some tracking targets, they may be tracked from the edge of the field of view which is, of course, dissimilar to touch tracking, where you can lift your finger off to end the touch.
For this sort of system you will have to implement either a stateful system where there is a threshold size for the target, or even a delta size, representing the distance from the camera to the target as either a fixed distance from the camera as an invisible surface or as a motion towards it, then a motion that does not change the target size by more than a given threshold would constitute a drag and one that reduced it by more would be a button up event.
Alternatively, could also use a mechanism, similar to the eye tracking systems, where a pause on an active area of the screen is regarded as a button down and a longer pause as a change to button held then a pause at a drop target because the button release.
In either case I would strongly recommend also implementing a user training mode where the user and the system adjust to each other tailoring the thresholds for either target size or pause length that constitutes a click and hold. Remember people have different sizes of fingers, motion rates, habits, etc., and it is always better for the system to learn from the user rather than the other way round. Also remember that most people can never hold their fingers absolutely still for any amount of time so you will need to allow a threshold for how much movement doesn't count.
Comment: But thats just the thing - they dont appear or disappear spontaneously. They can enter or leave the screen via an edge, but they never just vanish.
Comment: @jamesson Addressed in the answer.


How can I evaluate $0.01 \cdot \sum^{n}_{t=1}t \cdot (0.99)^{t-1}$?

Question: How can I evaluate the summation $$0.01 \cdot \sum^{n}_{t=1}t \cdot (0.99)^{t-1}$$
I am aware that this is almost in the form of a geometric summation, but I am unsure how to proceed and what to do. Any help would be greatly appreciated.
Answer: Hint:
Define the function $f(y)=\sum_{t=1}^n ty^{t-1}$, $y\in[0,1]$
Integrate on $[0,x]$ term by term, take the sum, then differentiate it.

Notes.
$$F(x)=\int_0^x f(y)dy=\sum_{t=1}^n\int_0^xty^{t-1}dy=\sum_{t=1}^nx^t=\textrm{you know how ...}$$
Then
$$
0.01\cdot f(0.99)=0.01\cdot F'(0.99)
$$
Answer: We recall the power rule, which states:
$$\frac{d}{dx} \left[x^n\right] = nx^{n-1}$$
Hence:
$$\frac{d}{dx}\left[\sum_{t=1}^n x^t\right] = \sum_{t=1}^n tx^{t-1}$$
Recalling that $\sum_{t=1}^{n} x^t = (x-x^{n+1})/(1-x)$ (see if you can derive this yourself! Hint: multiply both sides by $(1-x)$) to get your desired expression we solve for:
$$0.01\left(\frac{d}{dx}\left[\frac{x-x^{n+1}}{1-x}\right]\right)$$
evaluated at $x=0.99$.
The first time you see term-by-term differentiation or integration to manipulate a series it seems like such an illegal, out-there move, but it's actually a regular tool in the toolbox. Once you see it once, you see it everywhere.
Answer: If $S=0.01 \cdot  \sum\limits^{n}_{t=1}t \cdot (0.99)^{t-1}=0.01 \cdot  \sum\limits^{n-1}_{t=0}(t+1) \cdot (0.99)^{t}$
then $0.99S=0.01 \cdot \sum\limits^{n}_{t=1}t \cdot (0.99)^{t} $
so by subtraction $0.01S = 0.01 + 0.01 \cdot \sum\limits^{n-1}_{t=1}  (0.99)^{t} - 0.01 \cdot n \cdot (0.99)^{n}$
i.e. $S = 1  -  n \cdot (0.99)^{n} +  \sum\limits^{n-1}_{t=1}  (0.99)^{t}$
and then $0.99S=0.99  - 0.99 \cdot  n \cdot (0.99)^{n} +  \sum\limits^{n}_{t=2}  (0.99)^{t}$
so by subtraction $0.01S = 0.01 - 0.01  \cdot n\cdot(0.99)^{n} +  0.99 -  (0.99)^{n}$
i.e. $S=1-n\cdot(0.99)^{n}+ 100\cdot  0.99 -100\cdot  (0.99)^{n}$
or more tidily:  $$S= 100 -(100+n) \cdot (0.99)^{n}$$
Comment: @user62487108 Subtracting the second line from the first you get  $$S - 0.99S = 0.01 \cdot  \sum\limits^{n-1}_{t=0}(t+1) \cdot (0.99)^{t} - 0.01 \cdot \sum\limits^{n}_{t=1}t \cdot (0.99)^{t}$$ which gives the third line with $0.01S$ on the left hand side
Comment: Sorry, am a little lost here. I understood everything up until line 3. What do you mean by subtraction? I can't really see how you got $0.01S$.


Dangers of Heating a Bedroom up to High Temp

Question: In order to kill bedbugs and clothes moths, I was thinking of putting portable heaters in my bedroom and raising temperature to 120 degrees for an hour or so.   If I take out thinks like alarm clock and radio's, would it be safe for other structural elements, furniture, and lamps in the bedroom?
Thx in advance,
J
Comment: Bedbugs hide in well-insulated areas.  You would probably need to heat the room for a good day to raise the temperature of the areas where the bugs hide.  Are you sure that 120 degrees will reliably kill them?
Comment: I don't think you're going to catch anything on fire at 120F.  Drywall paper should be around 450F flashpoint, wiring insulation should be 350F or so.

One thing I'd watch for is overdrawing your circuit in that bedroom if they're electric heaters.  Resistively heating a room to 120F is going to take some current, and you might trip breakers.
Answer: You mostly want to protect yourself and pets from harm:

As you can imagine, you do not want to be in the home while it is this hot. Not only does this give the bugs a way to escape by climbing onto you and the going with you when you leave, but it can pose health problems.
Even when you are in a sauna that reaches these same temperatures, you are not inside for nearly so long. You will have to find a time when no one needs to be home for the duration of the treatment if you want to begin killing bugs with heat. If you have the time, this is very much worth it.

Obviously you'll want to remove anything sensitive to heat, such as candles, personal products, and food.
However, you'll need to do a fair bit better than 120 degrees:

Generally speaking, your home will have to be heated up to 140°F and held at this temperature for two hours. Alternatively, you could have the home brought up to a temperature of 130°F and held at that level for three hours.

So 120 degrees probably won't do it. Also, if you're just doing one room, you're probably going to see a quick resurgence of the critters.
http://www.bedbugs.org/heat


Is water taste an indication that my softener is failing?

Question: My softener uses potassium chloride and it seems to affect the taste of the water when it recharges.  The bad taste would come and go after a few days time.  I put it on bypass and the bad taste has gone away.  I put a small piece of the potassium chloride in a glass of water to let it dissolve and sampled it and it seems to be the culprit.  Do I need a new softener?
Comment: A new softener unit, or a softener based on a different salt?
Comment: One good thing about a potassium chloride unit is it is better for someone with blood pressure issues, I had this type in my last home, it may need a service to adjust the regeneration cycle it sounds like it is not flushing the excess out.
Answer: I have a water softener unit that would put a bad taste in the water after the regeneration cycle, although I could flush it out in a few minutes versus a couple of days. I fixed it by replacing the valve mechanism at the top of the tank - the valves had become clogged with sediment and weren't closing properly, thereby allowing the salt-infused water to enter the drinking water pipes. Replacing the valve system cleared up the problem for me.
I found the product I needed and instructions by searching for the water softener model on the internet. This may be an easier and less expensive fix than replacing the whole unit.
Answer: I agree with Ed on PCR, check for build-up problems. However for me, losing the water softener after it rotted out was the real & best answer. My water softener only "worked" for its 1st 5-years, after that all the charm & benefit was gone regardless of how often I forced a backwash or had the charcoal replaced. I went to a Pelican whole house filtration system, because they were the best designed, cheapest & longest lasting that I could determine at the time.
I never liked the backwashing & salt nonsense of mostly just treating the water like most water softeners do. I was never impressed with the amount of carbon filtration that was in mine. But, actually removing the minerals entirely not only makes the most sense, but also not adding anything else to the water makes for vastly much better water overall. I'll never go back to a water softener.


why do soft magnetic materials have narrower hysteresis loops?

Question: If I wanted to reduce hysteresis losses in a system, I know that I would need to choose a ferromagnetic core made from soft magnetic material. Do soft magnetic materials have smaller permeability compared to hard magnetic materials? And is the permeability directly related to the area of the hysteresis loop?
Answer: A magnetically hard material has a large coercive field, so a wide hysteresis loop. It is what hard and soft means in this context.
Permeability is not well defined when there is hysteresis, as the magnetization is not proportional to the external field. When hysteresis can be neglected, such soft magnets have huge values of the permeability (for example mu-metal).


Designing a shared-role web apps

Question: I have several Django services which all have their own login portal, and colleagues have a user/pass for each portal (if we've given them permission). We'd like to unite all of these portals and there are a couple different options:
1) Just create a new service that is one giant consolidated tool, and get rid of the old ones. Might be a headache integrating this with the databases and other functionality of each service (both technically, and organizational overhead since teams will have to be in sync).
2) Keep each service (and its login portal) separate, and have some login layer in front.
We want to avoid reinventing the wheel if an RBAC system is to be involved. We also want to keep things as simple as possible. The only major requirement is to have one login per user (across all admin tools), and to customize permissions for each user. Permissions goals, in decreasing order of importance, are:

Access on a per-service level
Access on a per-feature
(i.e. individual settings within a service) level
Integration with something like Azure Active
Directory

Are there any tools that exist that would allow us to keep this as simple as possible?
Answer: Try using something like a BPM business process manager such as jBPM or Websphere process engine and move your admin processes as well defined workflows that integrate with each other.

Designing a shared-role web apps


Tension force and Newton's third law

Question: When a horse pulls a cart, suppose connected by a string, it produces a tension $T$ in the string. The cart in turn pulls the horse by an equal force $T$ in the opposite direction. If this T>f, the friction on the cart, it moves forward. But how does the horse move with the cart pulling it? From what i have understood the horse presses the ground in an inclined direction and the horizontal component of the corresponding reaction is the force with which it pulls the cart i.e the tension T. So the more effort it puts, the same magnitude of force will pull it back.  I do have the intuition for Newton's third law, that action and reaction are on different objects, for eg incase of a gun firing a bullet, the bullet exerts the same force to the gun, but the gun is much heavier so it can only nudge the gun a bit in the opposite direction. It makes sense. But I'm having a bit of an issue with tension. Can anyone please elaborate?
Comment: " the horse presses the ground in an inclined direction and the horizontal component of the corresponding reaction is the force with which it pulls the cart i.e the tension T"  If you mean that the magnitude of the reaction force is equal to the tension if they are moving at constant velocity, then yes, that's true.  If you mean that the reaction force *is* the tension force, then no.
Comment: i'm saying, the ***Tension force*** is because of the reaction
Answer: This  issue eternally confuses beginning students. It certainly confused me when I was a teenager learning mechanics  in high school.
The two forces in Newton's third law are on different things ($F_1$ on mass $m_1$, $F_2$ on mass $m_2$ ) and each responds by moving $F_1=m_1a_1$ and $F_2=m_2a_2$ due to the force on it without regard to what the other object is doing. In the abence of any any other forces (not the case with the horse + cart as there is friction) we have
$$
0=F_1+F_2= \frac d{dt}(m_1v_1+m_2v_2),
$$
so what does add to zero is the total change of momentum of the two objects.  In other words the third law gives you momentum conservation.
In the case of the horse and cart there are additional friction forces that make the horses hooves not slip on the ground, and friction in the cartwheel bearings, and it is the sum of these forces that determines how  the combined horse+cart moves.
Answer: You have to focus just on the forces on the cart to decide if it'll move.  If the force $T$ on the cart is greater than the friction force resisting the cart, then it'll accelerate in the direction of $T$.
Comment: ya, i realize that now. thank you. But a different issue just popped up. I edited the question. Will you please re-read and try to answer my query?

Tension force and Newton's third law


How can I get list of users which have documents stored in My Sites?

Question: How can I get list of users which have their own documents stored in My Sites (MOSS 2007)? Or even better, all their documents together with names? It dosen't matter if it will be via script or GUI. I just know that we have some users with documents in old portal and I must transfer it somehow to the new My Sites on SP 2010. Thank you.
Answer: I would create a powershell script that loops through all the user profiles. Retrieves the PersonalSite of that user and list the files that reside in a certain document library. The script below should be able to list the URL of all the files that are inside the document libraries 'Personal Documents' and 'Shared Documents'.
<code>#Load the required SharePoint DLL's for this script
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")

$siteUrl = "http://yourdomain"
$documentLibrariesToScan = "Personal Documents", "Shared Documents"

#Get the UserProfileManager
$site = New-Object Microsoft.SharePoint.SPSite($siteUrl)
$serverContext = [Microsoft.Office.Server.ServerContext]::GetContext($site)
$userProfileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serverContext)

foreach($userProfile in $userProfileManager)
{
    Write-Host $userProfile["AccountName"]

    #Get the personal site of the user.
    $personalSite = $userProfile.PersonalSite
    if($personalSite -ne $NULL)
    {
        foreach($documentLibraryName in $documentLibrariesToScan)
        {
            #Check the specified document libraries.
            $documentLibrary = $personalSite.RootWeb.Lists[$documentLibraryName]

            if($documentLibrary -ne $NULL)
            {
                foreach($item in $documentLibrary.Items)
                {
                    #Write all the urls of the files found in the document library.
                    Write-Host $item.File.Url
                }
            }
        }
        $personalSite.Dispose()
    }
}
$site.Dispose()
</code>
Comment: I'm sorry, I'm not able to run this script. If I substitute variables with almost everything that come to my mind, I get only "web application could not be found" error. Address in what form must be typed in please?
Comment: You should use the address of your SharePoint site, so not your SSP. If it runs on a specific port then also add that, like 'http: //your.domain.com:54321>'.  It will create an SPSite object and retrieve the the SSP / UserProfileManager that is used for the SPSite.
Comment: > It works! The trick was to run this script on the right server. My apologies, I tried to run it from our maintenance server with administration & migration tools all the time. Thank you!
Comment: The only one thing, script listed only public (shared) documents, can I somehow get all docs in libraries please ? Some users have "Unable to index into an object of type Microsoft.SharePoint.SPListCollection" error in log, is it possible, that they have another library with another documents beside the shared ones ?


FPGA TCP Connection

Question: Is it possible to have a TCP connection with an FPGA?  I need a low power device that can control relays based on Ethernet packets that are received and send back confirmation packets.
Comment: FPGA is a general logic device. You can do any digital logic with it. Including TCP connections. I am not talking about effort involved as you haven't asked.
Comment: Yes, although you have to build all the state machine yourself. And they're not particularly low power. A microcontroller would be simpler.
Comment: Developing TCP is hard work. You will need: Ethernet Controller (incl. MDIO controller), MAC layer, ARP layer, IP layer and the TCP layer. TCP is complex because of its flow control. Can't you use UDP? It's much simpler.
Comment: Adding to what @Paebbles said, even a cheap AVR combined with an ethernet-to-SPI chip can do the same, and to control relays high speed is not required. Do yo really need it to be FPGA-based for some other reason?
Answer: Yes it is possible.
For the low end, you could have a look at http://opencores.org/project,tcp_socket (800 LUTs in Spartan 6).
At the high end, see http://dx.doi.org/10.1109/FCCM.2015.12 (slides) for 10 Gbps on Virtex7.
Comment: Wow, the first link just made my day. I've been thinking about implementing that in an open core for a very long time, and there it is. :)
Answer: Is it possible? yes
Are there times when you would want to do it? yes
It it the right soloution for the problem you describe? almost certainly not!
FPGAs are great for doing stuff that is simple and repetitive but needs to happen with very tight timings and where the market is too small to justify custom silicon but for lower speed stuff they tend to be an expensive (both in terms of hardware costs and development time) and power hungry option.
Relays are at the opposite end of the speed scale. So using a FPGA to control them seems pretty crazy. Personally for a networked relay controller I would be looking at either a microcontroller based soloution or an embedded linux based soloution depending on the dev/prod cost balance and the features required (it's much easier to add support for things like TLS or web interfaces on a linux based soloution than a microcontroller based soloution).
Answer: you can use lantronix Ethernet module. and there are lot of companies who makes board using these modules like this one Ethernet controlled relay  so you can get these boards which have relay and Ethernet, which will make controlling relay very easy. all you need to send commands using your master hardware. these lantronix modules also come with inbuilt webpage.

FPGA TCP Connection


Turn off colours temporarily for ansible ad-hoc commands

Question: When I run an ansible (v2.9.9) ad-hoc command, the output is colourized. Green for successful resuilts etc. I am building up a bash pipeline, so how can I tell ansible to not colourize the output?
Comment: What do you mean by building up a pipeline? By default ansible does not colour is output when it is piped to another command.
Answer: Configure ANSIBLE_NOCOLOR. For example
<code>shell> ANSIBLE_NOCOLOR=True ansible localhost -a "date"
localhost | CHANGED | rc=0 >>
Wed 15 Jul 2020 10:03:04 AM CEST
</code>


Restore from iTunes does not restore app data?

Question: I just restored my iPhone from iTunes. At backup time a Bitcoin app was installed on iPhone, with an already created wallet with a balance. After restore, Copay in on iPhone, but when starting the wallet balance is not included in the app. Why?
Comment: Was this an encrypted backup?  Also, does the developer of that app indicate this type of data will be included in any backups?
Comment: *always* use an encrypted backup, even if the password is just "1234." It saves all your passwords, at least, WiFi and others. At worst it is a convenience at best...
Comment: Unfortunately it was not an encrypted backup.
Comment: I don't know for sure, but for unencrypted backups, some app data is not included.  I recommend contacting the developer of that Bitcoin app and ask about this.
Comment: Agreed. But if you forget it, you'll have to be on iOS 11 to remove it and do a newer backup.
Answer: Wallets and apps that store sensitive data usually store passwords/encryption keys in keychain. If the backup was not encrypted, unfortunately, only app developers may be able to help.
Also, some banking apps and wallets don't include this data in the backup and have another way of transferring accounts or passwords.
p.s. @Steve Chambers is right, you should always have an encrypted backup, even with an easy password like '12345', just to back up as mutch data as possible.


Fourier Transform of Heaviside Function

Question: I'm trying to find the Fourier transform of $H(k - |x|)$, where $H$ is the Heaviside step function. I've solved a few Fourier transforms recently, but this one is giving me a bit of trouble. I'd appreciate any help.
Comment: $H(k-\lvert x\rvert)$ is the characteristic function of the ball with radius $k$, isn't it? Are we talking about $\mathbb{R}$ or $\mathbb{R}^n$?
Comment: In that case $$\int_{-k}^k e^{-2\pi i \omega x}\,dx$$ or $$\frac{1}{\sqrt{2\pi}}\int_{-k}^k e^{-i\omega x}\,dx$$ can easily be evaluated directly, I'd say. It gets more complicated (Bessel functions) in higher dimensions.
Comment: I think just $\mathbb{R}$. I know that a sine should pop up in the answer.
Answer: As you said, there is a sinus behind:
$$\int_{-k}^ke^{−i2\pi\omega x}dx=\frac{e^{−i2\pi\omega k}-e^{i2\pi\omega k}}{-i2\pi\omega}=\frac{\sin 2\pi \omega k}{2\pi\omega}$$

Fourier Transform of Heaviside Function


Is studying/reading astrology in purpose of nullifying it haram?

Question: Studying sihr is Haram unless your purpose is nullifying it. But does that goes for astrology too? How about believing that astrology star signs have its own name in order to avoid using them for anything? How about showing people zodiac signs just to tell them not to believe in them? Please answer all my questions. I need answers.
Answer: At first try to find names in Arabic. If you do not find anything then it is just names. These names itself means nothing. You should find about these names in many astrological books written in Arabic or by Arabic writers.


How do you present without showing notes to audience on MacBook Air single screen

Question: How do I present a Google Slides presentation via Zoom on a MacBook Air (2021) while viewing the notes only on my screen. I can also utilize Google Meet format; however, I am not familiar with that option. I am open to suggestions and work arounds! My slide presentation opens in Keynote and or Google Slides and neither seem compatible with Zoom. I do not have a PowerPoint version of this presentation which would make this process simple.
Comment: Welcome to [webapps.se].  What web browser are you using? (Some Google apps features are only available in Chrome, are you open to use Chrome ?) Are you using the Zoom Meeting (the installable app) or the Zoom "online" (the web app)?
Answer: Google Slides has a presenter view. This shows the presentation in presentation mode in the current web browser tab and opens a second window showing the presenter view.
Put each the presenter view and the presentation view next to each other.
Then in your online presentation tool, Zoom, Google Meet, or any other that supports sharing a window instead the full screen, set the share screen settings to share the window showing the presentation.
Another option is to use the Google Slides mobile app to see your presentation notes while presenting on a Google Meet meeting.
Answer: The best way to do this is to only share a portion of your screen on Zoom. Click the Share button in the meeting window > in the sharing options select "Advanced" at the top of the window > select "Portion of Screen."
Once this is done you can just adjust the box to exclude the presenter notes in the view.


What is the purpose of Satan's fall from a reformed perspective?

Question: Did God, in His omnipotence, allow Satan to fall from grace have something to do with His allowing Adam and Eve to fall which provides first hand knowledge to the elect angels / elect humans in a way that our limited minds can understand?  Is this an opinion that is consistent with reformed theology?
Answer: Correct me if I misunderstand, but I think you are asking 'Is the Devil's purpose meant to help us understand X? Where X is various ideas as understood by reformed theology. Reformed theology has a 'system of understanding' to view many of the events and persons you mention, such as the Devil, pre-destination, the fall, etc. and does support your concept that we can't fathom the purposes and mystery of God's will in them. Reformed theology also supports the fact that what God has put into his word truth about these subjects, in order to 'sort of' provide 'first hand' knowledge about them, but it would never understand the 'actual purposes' of those events and persons simply to communicate 'first hand knowledge' of the reformed view of them. That would oppose reformed theology directly a sit places the purpose in men, or their understanding.
The purposes of these things are bound up in 'God's glory' under reformed theology and transcends humanity, or our understanding of them, even in their orignal purpose. Everything was done from, through and to God's glory. This is reformed theology. Our understanding of them plays a much smaller role. However, it is also consistent with reformed theology to recognize God's glory as that which has been manifested to us in Christ. So you seem to be circling around the right concepts just not yet fully arriving as a settled position in terms of reformed theology. One key to reformed theology is to move the attention away from self, including our understanding, and move everything to God in Christ. Then understand that when Christ has all the attention it is the best, glorious and most blessed truth for us.


Phase change of transverse waves

Question: My textbook states that a transverse wave on a string, which has a fixed end, is reflected at the fixed end and the phase is shifted by π. No further explanation is given.
Here I have plotted a wave (blue) given by $y=\sin \left( t-x \right)$ . So the reflected wave should have the equation $y=\sin \left( t+x+\pi \right)$, which is plotted in red. The resultant wave after reflection is the green plot. From what I understand, if the clamped end was at, say, $x=5$, the phase change couldn't have been π, since there would need to be a node at the clamp.

So is the phase change different for different positions of the clamp? If is use trigonometric addition and set the amplitude of the resultant wave equal to 0 at $x=5$ in the above case, I get $\pi-10$ as the phase change of the reflected wave. Is this correct?
Comment: I can't tell what the horizontal axis is in your plot.  If it is $x$, what did you choose for    $t$?   If $t$, what did you choose for $t$?  Is the clamp at $x=0$?
Comment: The horizontal axis is $x$, and its a snapshot of the waves $y=\sin \left( t-x\right)$ and $y=\sin \left( t+x+\pi \right)$ and their resultant wave at a certain time. I have not shown the clamp. My question is if the equation of the reflected wave changes with the position of the clamp.
Comment: The equation plotted in red is what the text says the equation of the reflected wave should be. I'm not sure where they assume the clamp.
Answer:
So the reflected wave should have the equation $y=\sin \left( t+x+\pi \right)$

To get this formula for the reflected wave, you assumed the reflection happens at $x=0$.
If you want to have a reflection at $x=5$, you need to shift the origin before inverting the spatial parameter.
So your incoming wave is $y = \sin(t-(x-5)-5)$, and your reflected wave is $y_r = \sin(t+(x-5)-5+\pi)$ or $y_r = \sin(t+x -10+\pi)$.
Here's the plot showing the situation at $t=0$:

Blue: incoming wave. Green: reflected wave. Red: Standing wave (superposition of incoming and reflected waves).
This shows there is indeed a node in the standing wave pattern at $x=5$.

Phase change of transverse waves


What is a main objective of anecdotes?

Question: I was not familiar with the term of "anecdote" in english. According to the wikipedia, anecdote is a some sort of short story with some point in it. Although in Russian language, for example, anecdote does not necessarily have to convey some wise point, it should be just funny. I quite confused about this term. So could you guys explain what is a purpose of anecdotes and where they are used ?
Comment: Does this answer your question? [What is an "anecdote" as opposed to a "joke"?](https://english.stackexchange.com/questions/5769/what-is-an-anecdote-as-opposed-to-a-joke) The accepted answer refers to native speakers of Russian.
Comment: Anecdotes don't have to have a "point".
Answer: In British English, an anecdote needn't contain a point, but can be used to illustrate a point. For instance, you might tell an anecdote if it describes a specific example of a general trend or phenomenon you are talking about.
In that usage, it is being used as an informal type of "evidence". An anecdote is usually understood to be about an experience that you've had yourself -- as opposed to, for example, an urban myth ("my friend's friend said..."), or a conclusion drawn from a scientific study. Therefore, if an anecdote is used as "evidence" to make a point, you expect the person telling it to be truthful; but your conclusion is "that thing happened to that person", rather than "it happened to them, so it must be true for everyone".
By extension, if someone said "there is anecdotal evidence that wheat can cause stomach ache", they'd mean that members of the public have reported getting stomach ache after eating wheat (perhaps on social media, or in forums for people who often get stomach ache) -- but that there hasn't been a thorough science-lead study of the alleged relationship between wheat & ache. The phrase does imply that, because a lot of people have made the claim, there might be some truth in it, but also implies that this "evidence" must be treated with caution.
However, anecdotes don't have to make points. We also value them if they're funny, in which case they're told just because they're entertaining!

What is a main objective of anecdotes?


Can't Install firefox in OpenBSD/sparc64

Question: I just installed OpenBSD on a sparc64 based pc but when I try to do pkg_add -v firefox it says can't find firefox. I also tried installing nano, which installed fine, so why can't it find firefox.
Comment: I haven't used OpenBSD in a while, but try `pkg_add -v mozilla-firefox`. I think you need to specify that it's mozilla-firefox? That's how it used to be, I'm pretty sure.
Comment: Tried it but still doesn't work by typing mozilla-firefox.
Comment: Huh. That's changed, so I decided to use a search engine. It used to just install with mozilla-firefox, but now there's a giant thread about it [here](https://forums.freebsd.org/threads/installing-firefox.61998/). How bizarre?
Answer: The Firefox browser is available in the firefox or firefox-esr packages.
Unfortunately for you, neither of these can be built on the sparc64 architecture (they are for amd64, i386, and  aarch64 only).
The port was marked "broken" for sparc64 in 2015:

Face reality, mark as BROKEN-sparc64. xpcshell SIGBUSes during fake, and
nobody cares. No point in wasting hours during bulk builds....
If you want a graphical browser on sparc64, try netsurf.

The sparc64 build support for the browser was removed in 2016 with the comment

Remove the build goo for macppc|sparc64|alpha, it's unlikely
this will ever come back...

The port was finally restricted to a small set of architectures in 2017:

Set ONLY_FOR_ARCHS properly - all the world is x86 anyway.
Ditch --disable-debug-symbols on i386, it links fine without it.

An alternative web browser to try may be

dillo ("fast and light graphical web browser"),
midori ("lightweight web browser"), or
netsurf ("lightweight web browser, with GTK interface").

All three of these are available as pre-built packages for the sparc64 architecture.


Does the cross validation implementation influence its results?

Question: As you know, there are two popular types of cross-validation, K-fold and random subsampling (as described in Wikipedia). Nevertheless, I know that some researchers are making and publishing papers where something that is described as a K-fold CV is indeed a random subsampling one, so in practice you never know what is really in the article you're reading.
Usually of course the difference is unnoticeable, and so goes my question -- can you think of an example when the result of one type is significantly different from another?
Answer: You can certainly get different results simply because you train on different examples. I very much doubt that there's an algorithm or problem domain where the results of the two would differ in some predictable way.
Comment: I meant significantly different results. I also think there is none, at least real-world example. Still, I think I'll wait some time more.
Answer:
Usually of course the difference is
  unnoticeable, and so goes my question
  -- can you think of an example when the result of one type is
  significantly different from another?

I am not sure at all the difference is unnoticeable, and that only in ad hoc example it will be noticeable. Both cross-validation and bootstrapping (sub-sampling) methods depend critically on their design parameters, and this understanding is not complete yet. In general, results within k-fold cross-validation depend critically on the number of folds, so you can expect always different results from what you would observe in sub-sampling.
Case in point: say that you have a true linear model with a fixed number of parameters. If you use k-fold cross-validation (with a given, fixed k), and let the number of observations go to infinity, k-fold cross validation will be asymptotically inconsistent for model selection, i.e., it will identify an incorrect model with probability greater than 0. This surprising result is due to Jun Shao, "Linear Model Selection by Cross-Validation", Journal of the American Statistical Association, 88, 486-494 (1993), but more papers can be found in this vein.
In general, respectable statistical papers specify the cross-validation protocol, exactly because results are not invariant. In the case where they choose a large number of folds for large datasets, they remark and try to correct for biases in model selection.
Comment: Interesting distinction. I thought model selection was central to machine learning, in almost all meanings of the term.
Comment: No, no, no, it is about machine learning *not* model selection.
Comment: All those things work for trivial (mostly linear) models when you have few parameters and you just want to fit them to data to say something about it, like you have y and x and you want to check whether y=x^2 or y=x. Here I talk about estimating error of models like SVMs or RFs which can have thousands of parameters and are still not overfitting due to complex heuristics.
Comment: These results are valid for regression of general linear models with arbitrary number of independent variables. The variables can be arbitrary learners. The crucial assumption is that as the number of observations goes to infinity the number of learners describing the true model stays finite. All of this works for regression, so for a classification task like yours I am not sure it helps.
Comment: It does not; GLM is not machine learning. True machine learning methods are wise enough to hold their level of complexity independent of growing number of objects (if it is sufficient of course); even for linear models this whole theory works quite bad since the convergence is poor.


How to get JBoss log directory

Question: We need to display JBoss log files from within our web application. Is it possible to achieve this without using ServerConfigLocator ? The application must be able to run also with Websphere and we don't want dependencies on specific JARs.
Answer: JBoss's defined log directory is held in the jboss.server.log.dir system property. You can resolve that directory to a java.io.File, and read the files inside.
File logDir = new File(System.getProperty("jboss.server.log.dir"));
logDir.list(); // etc etc

You can also get this through ServerConfig.getServerLogDir() (on JBoss 4.x, anyway), but you said you wanted to avoid JAR dependencies.
Answer: You could use a custom log implementation. This would give you complete control over the logging behavior.
JBoss uses Log4j as its logging mechanism. WebSphere uses Jakarta Commons Logging, which can be configured to delegate to Log4j if it isn't already the default. If you already use Log4j in your application then I don't expect that this difference will cause you any new problems.

How to get JBoss log directory


How do I wait for an element to be clickable in WebDriverJS?

Question: Does anybody know how to wait for a WebElement to be clickable in WebDriverJS?
I already know how to wait for the element to be "visible", but I would need it to be "clickable".. Something similar to expectable conditions in Python binding.
I haven't been able to find something similar in Webdriver Js API.
Comment: I dont think 'Expected conditions' are present in webdriver js.
Answer: There does not seem to be a condition equivalent to Python's selenium.webdriver.support.expected_conditions.element_to_be_clickable. However, looking at the source for that condition, I see that it does two checks:

That the element is visible.
That it is enabled.

So you could wait for both conditions to become true. The following code illustrates how that could be done. It first make an element invisible and disables it, sets some timeouts to make it visible and enable it, and then wait for the two conditions to happen.
var webdriver = require('selenium-webdriver');

var driver = new webdriver.Builder().
   withCapabilities(webdriver.Capabilities.chrome()).
   build();

driver.get('http://www.google.com');

// This script allows testing the wait. We make the element invisible
// and disable it and then set timeouts to make it visible and enabled.
driver.executeScript("\
var q = document.getElementsByName('q')[0];\
q.style.display = 'none';\
q.disabled = true;\
setTimeout(function () {\
    q.style.display = '';\
}, 2000);\
setTimeout(function () {\
    q.disabled = false;\
}, 3000);\
");
driver.findElement(webdriver.By.name('q')).then(function (element) {
    driver.wait(function () {
        return element.isDisplayed().then(function (displayed) {
            if (!displayed)
                return false;

            return element.isEnabled();
        });
    });
    element.sendKeys('webdriver');
});
driver.findElement(webdriver.By.name('btnG')).click();
driver.wait(function() {
 return driver.getTitle().then(function(title) {
   return title === 'webdriver - Google Search';
 });
}, 1000);

driver.quit();

The code may look a bit strange due to the fact that we're working with promises. Not that promises are inherently strange but they take some time getting accustomed to when one is used to work with Python.
Comment: Cool that you check the behavior on python's API! If that the case then, problem solved! :D
Comment: THIS is the explanation I've been looking for for a month! I used `.isEnabled()` and ran 100 tests and they all passed, whereas before it was at a 90% pass rate. I hope others find this answer. Thank you so much @Louis
Comment: 6 years are passed but you still saved my arse :D with this:
a) That the element is visible.
b) That it is enabled.
Basically, i was getting mad because I thought the issue was in the promises, but that's not. Issue is on object visibility/enabled. I solved in JS using this:

`const stuff = await driver.findElement(By.xpath('path-to-your-element'));
        await driver.wait(until.elementIsVisible(stuff), 3000);
        await driver.wait(until.elementIsEnabled(stuff), 3000);
        await stuff.click();`
Answer: If you don't care about clicking the object once it's available ** then you can do something like this:
function clickWhenClickable(locator, timeout){
  driver.wait(function(){
    return driver.findElement(locator).then(function(element){
      return element.click().then(function(){
        return true;
      }, function(err){
        return false;
      })
    }, function(err){
      return false;
    });
  }, timeout, 'Timeout waiting for ' + locator.value);    ;
}

** if you just want to check if the element is clickable without having to click it then this snippet is not for you. In that case, I would say webdriver js does not provides the means to do that. (or at least I haven't find it yet, insights welcomed :) )
Answer: UNTIL seems to be the closest thing in webdriver js for this:
Check:
https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/lib/until.html
There are already defined waiting conditions there.
I don't know which one should be considered clickeable.
Comment: Thanks have just changed the link in the comment!


a fun geometric probability problem involving n points on a circle

Question: Given n random points on a circle, find, with proof, the probability that the convex polygon
formed by these points does not contain the center of the circle.
at first i thought it easiest to find probability that the center IS enclosed and then take 1 minus that .
the probability would be that at least 1 point lie on one side of the circle or the semi circle while n-1 points lie on the other . the case fir a triangle , n=3 would mean two of the points lie on the same semi circle and the third lies on another
Comment: I can't make this precise, but I believe that this might be related to the lonely runner conjecture https://en.wikipedia.org/wiki/Lonely_runner_conjecture .
Comment: Not so simple, 2 points can lie within a semi circle with a 3rd point in the other semi circle which still doesn't contain the circle center. Take a look at this previous problem...... https://math.stackexchange.com/questions/2786367/probability-that-polygon-formed-by-n-points-on-a-circle-contain-the-center-of-th?rq=1.
Comment: @PhilH It's not true that all semicircles will contain all of the points but won't there be a partition of the circle in which all of the points are contained in the same semicircle?
Comment: John Douma I was responding to the contributors comment  "the case for a triangle , n=3 would mean two of the points lie on the same semi circle and the third lies on another"  The whole problem is to determine the probability of all points being in a semicircle. With few points, that semicircle "can" be one of many, but the number can and will diminish as points are added and may even become zero. The difficulty with this problem is accounting for a diminishing sector or arc into which a point can be placed for all points to  remain within a semi circle.
Answer: The space of all possible configurations is $C^n$, where $C$ is the unit circle, here identified with the interval $J=[0,2\pi)$ via $J\to C$, $t\to P(t)=\cos t+i\sin t$.
Now fix such a "winning configuration" of points
$$(A_1,\dots,A_n)=(P(t_1),\dots,P(t_n))\ ,$$
so that the center $0$ is not in the convex hull. Now reorder them in cyclic trigonometric order on the circle $C$. Add the $0$ as a new point and build the "bigger" convex hull. Then $0$ is one of the vertices in this bigger convex hull, has two adjacent vertices, uniquely determined, $A_j$ and $A_k$, $1\le j,k\le n$, and exactly one of these two, denoted $A^*$, precedes the other one in the mentioned cyclic order. It is characterized by the fact that on the trigonometrical oriented arc segment $s(A^*)$ from the opposite of $A^*$ to $A^*$ we find all other points.
So to realize a "winning configuration" we have to make the choice of one index $j$, make an arbitrary choice of $A^j$ (which becomes $A^*$ in a second=, then choose arbitrarily the other $(n-1)$ points in the semicircle $s(A_j)$, so that for this configuration $A_j=A^*$. So and only so we can realize a "winning configuration". The corresponding probability is thus
$$
\frac{n\cdot(2\pi)\cdot \pi^{n-1}}{(2\pi)^n}
=
\frac n{2^{n-1}}\ .
$$
$\square$

Note: This seems to be a "high probability" for $n=3$ from our "feeling" of choosing a triangle and a circle around. Let us use some other argument for this special case. (Well, we take the "circle around" first, then three points on it.)
Because of the circular symmetry, we fix the first point $A_1=1+0i$ on the unit circle in $\Bbb C$. A second arbitrary point $A_2$ on $C$ has either positive or negative imaginary part, we split in two cases, "upper" and "lower" semicircle. Where can we take $A_3$ now so that $A_1A_2A_3$ does not cover (in the convex hull) the origin $0$?

one possible choice of $A_3$ is in the "upper" semicircle if $A_2$ is there, this happens with probability $1/4$,
one other possible choice of $A_3$ is in the "lower" semicircle if $A_2$ is there, this happens again with probability $1/4$,
and one final chance is to take $A_3$ in the semicircle from $A_2$ containing $A_1$, so that among the points $A_2,A_3$ one is "lower", and one is "upper",  so we are integrating w.r.t. $A_2$ in the "upper" semicircle, i.e. $t_2\in [0,\pi)$, the length of the corresponding interval for $t_3$, which is $(t_2-\pi,0]$. (Same by symmetry w.r.t. the real axis, or w.r.t. $A_2\leftrightarrow A_3$ if $A_2$ is "lower".)
The graph of the map $t_2\to (\pi-t_2)$ (associating the above length) is simple...
The contribution to the wanted probability from this case is again $1/4$.


why my dimmer in the kithen also dims lights in another room

Question: I have two lights in one room that are turned on with a dimmer switch in that room. I also have a light in the kitchen that is turned on with a dimmer switch in that room. My problem is the dimmer switch in the kitchen also turns on and dims the lights in the other room. The other room was an add on and wired to the existing wiring from the kitchen. How can I make the dimmer in the kitchen work only for the kitchen, while the dimmer in the other room works only those two lights?
Comment: Can you post photos of the insides of the boxes for the dimmers?
Comment: Do the lights in the other room work only when the kitchen light is on?
Answer: Sounds as though the feed for your other room is simply connected to the wrong side of the kitchen dimmer switch.  The kitchen dimmer is in series with the other room dimmer.  This was presumably deliberate at the time.
Move the connections that feed the other room to the other side of the kitchen dimmer.  This will take the kitchen dimmer out of the other room's circuit.
Comment: This sounds like the correct action to take make sure the power is off when moving the "hot" from the load side of the switch to the line side.


Installing Qgis Server on Windows 7 Machine

Question: I have been trying and trying to get Qgis Server to working on my Windows 7 machine with no luck.  I have read every thread out there on the web related to how to install and nothing works.  I'm beginning to think that it's all just a nasty joke that someone is trying to play and that there isn't really a Server available.  If anyone has any step-by-step directions that actually work, would love to hear.
Comment: What osgeo4w installer did you use to install QGIS? Old 32bit one, or the new 32bit or 64bit ones?
Comment: The new 64bit installer includes the qgis-server package, but no apache. So you have to stick to the 32bit versions. By the way, at the time of asking there was only one installer...
Answer: As per QGIS home page Qgis server actually exists. You can try the procedure mentioned by 'underdark' in the following link.
http://underdark.wordpress.com/2012/04/06/qgis-server-on-windows7-step-by-step/
You may be aware 'underdark' is a moderator of gis.stockexchange.com So the procedure can't go wrong. All the best.
Comment: Maybe it will help if it's known what installer the OP used, because the new installers, especially the 64bit ones don't include apache, so that might need to be installed and configured separately. That tutorial might need to be tweaked.
Answer: I ran into the same problem using the old 32bit OSGeo4w installer from september 2013.
Apache installs without error logs, but the service throws only 500-Errors. alternatively, it downloads the qgis.mapserv.fcgi.exe instead of executing it.
After searching around I read about missing libfcgi.dll causing such problems.
The advanced installer of OSgeo4w offers a fcgi library, but that is not selected as dependency when choosing the qgis-server package. Alternatively I took the driver from my running ms4w installation.
The new 64bit installer of OSGeo4w has included the package fcgi as dependency, but is missing the whole apache package (up to now). So that's not working at all. By the way, qgis-server does not include qgis desktop as dependency, but will not run without that, I assume.
So the 32-bit installer is the only one that might run as QGIS server at the moment.


Photoshop merging timeline frames in 1 image side by side

Question: I have created an animation in Photoshop. I want to merge them in 1 image file side by side. Is there an easy way to do it? Because I will do this process about 10-15 times.
My animation timeline (click for full resolution)

I want a result like this:

Edit:
I tried a technic but couldn't be successful.

I made layers from frames

I changed canvas of the image

I made all layers visible and selected all layers

I pressed Layer>Align>Left Edge

Result:

Why can't I get the correct result?
Answer: When you click "Flatten frames into layers", photoshop fill create each frame on a seperate layer. Set your canvas' width and height to dimensions you want and create a new layer below the current one and fill its inside.
By this, you can protect the original weight which can be lose because of transparency.
Let's write like this (for example)
· Your canvas 100x100px
· Your layer is 90x90px (so you can lose 5px each side if you don't create a filled layer below)

· Count your layers (e.g 10)
· Your canvas should be 1000px
· Copy both layers (background fill and your original layer together) to the right until you get something like below:

· Remove all the background fill layers.
· Save the imag
Comment: Because you align all objects to left. You need to order them manually
Comment: I tried something but couldn't get the correct result. Can you look at them?


Where is the positive and negative on an antenna?

Question: What I am wondering is how to build an antenna. Upon unscrewing my telescopic antenna from it's base, I see only a metal screw base, nothing more. The F Connector has a positive and negative (or ground) connector, the outside is negative and the pin in the center is positive, but I don't see how to make an antenna like this. Where do the positive and negative connectors lead to if the antenna is basically a metal stick?
Comment: We are having trouble accepting your terminology: **positive** and **negative**  refer to DC, static voltages or currents. Antennas only radiate power where voltages and currents are changing (very rapidly).
Comment: When the antenna receives a signal that it resonates to, then current will flow out of one end and in from the other. It only resonates to AC signal. A good way to think about it is as if you have an AC signal connected to a capacitor, the capacitor end that goes somewhere will push and pull current.
Comment: On both ends of the antenna, one end is positive and the other negative, then they switch and the reverse happens
Comment: So would that mean that the ground is just a metal surface, and the positive connection is the antenna?
Answer: I think you might be getting confused between monopoles and dipoles: -

Look at the left picture above - it is called a dipole and it requires a balanced two wire connection. It produces and receives radio waves but, along the horizontal centre line the electric and magnetic fields are neutral and you could insert a thin horizontal conducting sheet in that plane and the operation of the dipole would be unaffected.
You can even short that conducting sheet to ground and it would still be unaffected. So then we come to the monopole (on the right). It has taken what I have said and drives just one half of the dipole arrangement with respect to earth. Do you see the difference?
A monopole requires one wire connection to the antenna and one wire to ground. The wire to ground can be very tenuous (as per a transistor radio tuned to FM) and that connection relies on the radio's 0 volt capacitance to ground to form that connection. Sounds unfeasible but it's true - do some math on what capacitance is needed and you'll figure it's true.
Answer: Take this schematic for an example, there is no positive or negative point on the antenna. Whenever RF arrive and resonate with the antenna, then there will be an AC voltage difference across the antenna which in turn will let current flow forward and backward through the antenna.
In the schematic below that current is connected to a capacitor so only the AC component of the antenna gets amplified.

Another kind of antenna that uses two connection points called a Dipole antenna would look like this:

(source: wikimedia.org)
They are probably much easier to understand. And in this animation as well you see an AC current being forced through the center ends. There is no positive nor negative point. If you would flip the antenna horizontally, nothing would change.
The "metal stick" you're talking about works nearly identical to the dipole antenna, only that the RF is polarized 90 degrees. That means that if you have your antenna straight up and send information, then a dipole in the orientation like the animation above won't see it. Ever.
Like these glasses:

I'm looking forward to others with way more knowledge about antennas to correct me.
But the bottom line is this, there is no positive or negative terminal, it's just AC current that you amplify and then read.
Comment: Woaw. Now I finally understand what you're talking about. Woaw. Okay, so the outer "Housing", the "shielding" is just like in a coax cable. An outer layer connected to ground. That is done so the whole cable doesn't work like an extension of an antenna.

But no, not always is there two connections, if the base of the antenna is right next to the circuit then you wouldn't need to shield the line.

But the kind of antenna you are talking about is like a coax cable with a straight metal piece connected to the inner wire. That's essentially what you got.
Comment: Check out https://en.wikipedia.org/wiki/Transmission_line
Comment: @Daniel Yes, the outer part of the SMA should be connected to ground. Otherwise the [characteristic impedance](https://en.wikipedia.org/wiki/Characteristic_impedance) will be wrong, if you don't match the impedance you will get a lot of problems (such as ringing, noise).
Comment: @Daniel I've never worked with this so I'm only going off my gut feeling + academic knowledge. I recommend you to get a second opinion on this. - Yes the same principles applies most likely to that F connector, on the wiki page it says "*It has good 75 Ω impedance match for frequencies well over 1 GHz*", if you screw that impedance up and/or don't match it at the terminals you'll see a lot of ringing everywhere which will be a source of unnecessary noise (ringing and echoing). The shield should definitely be grounded, otherwise that 75 Ω impedance won't be 75 Ω.
Comment: I understand how an antenna receives radio waves, but how would one be assembled? Antenna connectors always have two connections, A twin lead antenna has two wires, hence the term twin lead. An F connector still has two connections, the "negative", the part that screws on, and a "positive", the pin in the center. Telescopic antennas still have two connectors, but it is still just a metal stick. Do both connections lead to a single connection where the stick is mounted? Sorry if you don't understand.
Comment: In this image https://cdn.shopify.com/s/files/1/0068/2142/products/ant500a-2.png?v=1398108159 the antenna connector (SMA) has a "negative", the outer part of the connector, and a "positive", the pin in the center. I have tested this with a VHF cable by using a multimeter. Even though there are two connections, they still lead to one antenna. How is this possible?
Comment: When you shield a signal, then what you got is essentially a transmission line, and if you set up the impedance correctly then you will be able to send whatever is on one side of the transmission line to the other side without any interference.
Comment: I wonder - should the outer part of the SMA be connected to the ground\0 V point of your circuit? Or it needn't be connected to anything and it's enough to connect the center pin to the input terminal \ node of your circuit?
Comment: @HarrySvensson thanks Harry, it's not easy to get reliable information on this specific point, so I appreciate your answer. Besides, SMA, there is also https://en.wikipedia.org/wiki/F_connector (F connector), and I suppose the same principle applies to that type of connector as well?
Comment: Thank you for your help Harry.


Why do ferries have a trucker's lounge?

Question: When on the ferry between Britain and either Netherlands or Ireland, there's a trucker's lounge.  Only truckers allowed.  Why do the ferries have this?  I can understand the point of the Stena Plus Lounge — additional cost for additional luxury — but why the truckers lounge?
Comment: I would say, truckers are a reliable source of income. There is competition and truckers can choose the ferry  company they want to catch. Hence they offer the truckers benefits to get their business.
Comment: Don't forget that the truck is paying a lot more than a regular car.
Comment: @RodneyHawkins I agree, same reason why some hotels have crew lounges.. so airlines would choose them for their crewmembers for overnight layovers...
Comment: @NeanDerThal Interesting, I didn't know about crew lounges.
Comment: Truckers are ferry companies equivalent of airlines Business Class frequent flyers - a good source of regular revenue, if you keep the customer happy....
Answer: Because truckers are a solid source of serious revenue.  If each truck brings in (say) €500 of revenue, and all it takes to get the driver to choose a particular ferry company is a €1 cup of coffee and a spare room with some daggy sofas, offering this as a "trucker's lounge" is a no-brainer.
Incidentally, this kind of thing is pretty common at highway rest areas as well, and long-distance bus drivers in particular know exactly where to go.   Fill up your truck here and get a free cup of coffee, or better yet, drop off a busload of passengers for a break and get a free meal.
Comment: Quite a few highway rest areas come with free showers for truckers as well.
Comment: Or not technically free, but well featured in their membership club programs.

Why do ferries have a trucker's lounge?


ValidationSettings for aspxtextbox to validate decimal

Question: I have written a regular expression for AspxTextBox to validate decimal value as follows
 <dx:ASPxTextBox ID="txtDecimal" runat="server">
            <ValidationSettings ValidationGroup="g" RegularExpression-ValidationExpression="^\d+(\.\d{1,2})?$">
            </ValidationSettings>
        </dx:ASPxTextBox>

When I am entering the digits in the textbox directly it is validating as per required, but I have a group of buttons with 0-9 and a . button where user can input  the text using those buttons, on clicking buttons and appending text in the textbox validation is unable to fire even if I enter wrong input, what might be the problem can some one help me
Answer: I suppose that DevEx library uses on change event to execute validation.
OnChange (and other Javascript events) are executed when control value is changed during user interaction and not when you change value programatically.
So, you need to execute it manually:
<dx:ASPxTextBox ID="txtDecimal" runat="server" ClientInstanceName="tb">
    <ValidationSettings ValidationGroup="g" RegularExpression-ValidationExpression="^\d+(\.\d{1,2})?$"/>
</dx:ASPxTextBox>

<input type="button" onclick="tb.SetValue('10xyz');tb.Validate();"/>


Where are all those unsold vehicles?

Question: Every year, every car manufacturer produces tons of cars. And of course, not all of them are sold during the year. My question is where are all those unsold new cars reside? If I go to a dealership (Honda, Toyota, Mazda, BMW, any dealer) they only have either brand new (regarding year, not a condition) cars or used ones. What if I want to buy let's say 2008 Audi A4 that was never sold to anyone and basically smells like a factory. Where can I find those?
Comment: TL;DR: Sold. You can sometimes get good prices at the end of a model year as dealers clear space for the new models, especially if you are willing to be flexible about exactly which features are installed.
Comment: @GordonFreaman You're making a mistake to equate "lack of unwanted items" with profitability. If they have to discount deeply to clear last year's inventory, they may end up selling at a loss. They still clear all the cars made.
Comment: it's a commonplace that they dump them for a lower price, at the end of each model year. walk in to any car dealer and you will instantly see this.
Comment: @farnsy So you assume that every car that was manufactured is sold even after the newer version comes up? That means that can production industry is extremely profitable once they don't get any unwanted items..
Comment: related: http://www.snopes.com/photos/automobiles/unsoldcars.asp
Answer: When the 2016 models come out, the dealership marks down the 2015 model and then it sells pretty fast.  The process doesn't take that long in the car market because the 2015 models are just as good as the 2016 so if they are just a little cheaper, they will sell quickly.  If you want a 2008 Audi that has never sold, you are going to be looking for a long time.
The same thing happens in every industry.  Where are the older versions of digital cameras?  Cell phones?  Blenders?  Digital pianos?  Any item that changes from year to year sits on shelves for a little while after its replacement comes out until the retailer reduces its price by enough and it sells.  The only exceptions are goods that depreciate very quickly or go bad, which are recycled or thrown away (like fresh produce, for example).
It seems kind of crazy at first that essentially all goods that are produced by the economy are consumed, but that's the magic of capitalism: prices make markets clear.
Comment: Re profitability:  Yes, pretty much all cars manufactured are sold.  Manufacturers normally sell all the cars they make to dealers, but for significantly less than we pay.  Dealers make an ok profit on some cars but lose money (after overhead) on cars that stick around to the next year.  Margins are not real large overall for either the manufacturer or dealership, though, all things considered.  If the manufacturer overestimates demand, they will have to discount sales to retailers and lose money as well, but it all gets sold.
Answer: Other than being reduced to clear as others have suggested quite a few get sold to large motor stores.
You can often go in and find last years model with around delivery mileage at a very knocked down rate because most people would prefer the latest model direct from the dealer.
Doing this allows dealers to clear old stock incredibly quickly so they can promote the newest model exclusively.
Comment: Not sure this really counts as "other". It's still sold by the manufacturer at a knock-down price, just sold to a motor store rather than direct to public. Still, it's true so I upvoted. Personal anecdote: I bought a 9 month car from a motor store which had 12 miles on the clock (20 after my test drive). Its RRP had been £17k new, I paid £9k.

Where are all those unsold vehicles?


Can one study and keep tantra texts at home?

Question: Can one study and keep tantra texts like Kaulajñananirnaya at home without initiation from a Guru?
Comment: Nothing can attain its importance without a Guru, It is difficult to cross the forest of Maya, Only a Guru can help it, So you can have it as just texts but it will get its power when you learn them from a Guru and maybe mispronouncing the words might incur you sin too, So it is better not to read them without the help of a qualified Guru
Answer:
यद्गृहे निवसेत्तन्त्रं तत्र लक्ष्मी स्थिरायते । राजद्वारे श्मशाने च सभायां रणमध्यतः । निर्जने च जले घोरे श्वापदैः परिभूषिते । माहात्म्यात्तस्य देवेशि चमत्कारो भवेत् प्रिये । तस्मात् सर्वप्रयत्नेन गोपनीयं प्रयत्नतः ।।
Transliteration : Lakshmī (who is reputed to be 'Chañchalā' or the fickle-minded one) remains standstill at the house where Tantra resides. O Deveśi ! It's amazing greatness becomes evident at the courts of law, śmaśhana, assembly of people, in midst of battle, while being alone, drowned or surrounded by fierce animals. So care must be taken to keep it concealed carefully. [1st patala of Brihannila Tantra as quoted in the Pranatoshani Tantra]

It means that one can keep Tāntrika texts in one's house but simply considering that text to be mere ink spread over paper will yield no result.
Answer: One may keep an 'n number of scriptures at home, but without the proper guidance of a preceptor (guru), those books will remain mere sheets of paper.
Without a proper initiation from a qualified Guru, any Dīkṣā is useless, and also, any mantra, specifically, the tantric ones is fruitless. On the other hand, with the right guru and the right kind of śiṣya, even a right mantra uttered wrongly, transformed the brāhmiṇa turned thief, Lohajaṅgha, into a Brahma-jñanī whom we today know as Mahaṛṣi Vālmīki (the author of the Rāmāyaṇa), as narrated in the Skanda Purāṇa 6.1.124
This is what the Meru Tantram compendium says.

Verse 606, Section 6, Meru Tantram
गुरु सन्तोषयेत्पश्चात् गोहिरण्याम्बरादिभिः।  गुरौ तुष्टे हि
सन्तुष्ये मंत्रः सिद्धयन्ति मंत्रिणा॥
पुस्तके लिखितान् मंत्रानालोक्य प्रजपन्ति ये।  ब्रह्महत्यासमं तेषां
पातकं परिकीर्तितम् ॥
( प्रकाश 6 - मेरुतंत्रम्)

After receiving the Mantra from the preceptor (guru) one may gift a cow, gold, clothes, etc. for only when the Guru is satisfied, will the Mantra become fruitful.
Some people in haughtiness start self-reciting mantras directly taken from books. Know that such ignorant people incur a sin equivalent to a Mahāpātaka (i.e, Brahmahatyā).

English Translation by Self

So, basically, one may keep whatever book they like at their home (but what's the use, if such a book not be used?), but if they use mantras from it as such, without a proper initiation from a qualified guru, that amounts to a sin, because in a way, that might be a transgression of the lineage system (guru-śiṣya paramparā) and also a disrespect to the original seer of the Mantra, since one is reciting a bonafide mantra without any "adhikāra" (eligibility).
So, No. One should avoid studying Tantras without a qualified guru (and proper initiation).

edit:
Further,
Arthur Avalon (Sir John George Woodroffe) in his work, Shakti and Shakta, says and quotes a relevant text as follows -

Chapter XXVI - Śākta Sādhanā (the Ordinary Ritual), Shakti and Shakta

It is the Guru who initiates and helps, and the relationship between
him and the disciple (Śiṣya) continues until the attainment of
spiritual Siddhi. It is only from him that Sādhanāand Yoga are learnt
and not (as it is commonly said) from a thousand Śāstras.

As the Ṣaṭkarmadīpikāsays, mere book-knowledge is useless.
पुस्तके लिखिता विद्या येन सुन्दरि यप्यते  ।
सिधिर् न जायते तस्य कल्पकोति-षटैर् अपि ॥
IAST
pustake likhitā vidyā yena sundari yapyate । Sidhir na jāyate tasya
kalpakoti-ṣaṭair api ॥

(O Beauteous one!) The one who does Japa of a Vidyā (= Mantra) learnt from a
book can never attain Siddhi even if he persists for countless
millions of years.

Therefore, to the question asked -
Can one study and keep tantra texts like Kaulajñananirnaya at home without initiation?
No, one should NOT, if they haven't been initiated (given Diksha) from a qualified preceptor (Guru).


How can I get Nexus Mod Manager to recognize my Skyrim installation?

Question: I bought Skyrim off of Steam and use mods by subscribing to them using the Skyrim Nexus Mod Manager. However, neither the mod manager nor any of the Nexus mods or files I've downloaded are working.
I signed up, installed the mod manager, and made an attempt to download a mod. It shows on my screen as downloaded, but it will not open: the mod manager reports an error incorrectly indicating Skyrim is not installed on my laptop.
I uninstalled and tried again, but now it says "Unable to get write permission."
How can I fix this problem?
Comment: My issue is I didnt start with Nexus, I started with steam by purchasing the game there long ago. Is it possible to insert Nexus that way?
Comment: All installations of Skyrim are Steam, so that's not the problem. How are you installing the TESNexus mods?
Comment: I don't understand your problem. I'm using Steam copy (English version) of Skyrim and Downguard with Nexus Mod Manager, and it works fine for me, even it runs with SKSE (Script Extender).
Comment: Your always allowed to comment on your own questions and answers, regardless of your reputation. A 50 reputation requirement excists for commenting on OTHER people's questions or answers however. I think its likely your just not seeing the button by normal human error.
Answer: First things first before I get to the advice: Nexus Mod Manager is beta software. If you're experiencing problems with it, consider reporting the problem so that the coders and other users on the official beta feedback forum can read about it and any bugs can be fixed. If there are installation problems, they'll want to know about it and it's more likely to be fixed there than by asking here.

In the meantime, it might help to know that a mod manager is optional—you can install mods without ever touching Nexus Mod Manager. Since it's beta-quality software and you've probably just run into a bug, I'd advise learning how to cut out the middleware and install mods manually. Most mods are simple and it's just a matter of putting the right files in the right place.
Here's the simplified overview of how to install a mod manually:

Download the mod you want to install and unpack it to a temporary folder. You'll want to use 7zip for this, because it can handle the popular archiving formats that Skyrim modders pack their mods with. If you have the option of multiple file formats, pick "7zip", the one that end with .7z. Failing that, get the .zip file.
Look inside the freshly unzipped mod folder. Look for the readme file. This will tell you what you need to do to install the mod correctly.
Sometimes the mod author will tell you to "put the files in your data folder" and you'll swear at them for not explaining what that is. They mean \Steam\SteamApps\common\skyrim\Data. If they tell you to put files in "your Data folder", they mean there.
If they're not clear about what files to put there, you have to look a bit closer at the mod. If you have a folder named like the mod, don't put that folder in your Data folder—you want to put the contents in your Data folder. Same thing if your unpacked mod has a Data folder—you don't want to put that in your Data folder (which would end up with a Data/Data/[mod files] layout that doesn't work), you want to put what's inside it in your Data folder. You want to be looking for folders like textures and meshes, and files that end in .esp or .esm to dump into your Data folder.
(If you're on Windows XP, you may want to disable UAC to simplify this process, since the game folder is in a UAC-protected area.)
Start Skyrim's launcher. If your mod had any .esp or .esm files (these are "plugin" files), you need to tell Skyrim to load these up when it starts. If there weren't any (for example, most texture mods that don't add new items won't have a plugin file), then Skyrim will find the mod files all by itself and you're done.
So if there are plugin files, the launcher will let you activate them if you click on "Data Files". There will be a list of things, including Skyrim.esm, with checkboxes beside them. Make sure your new mod's plugin files have checkmarks, hit OK to close that window, and then click "Play" to enjoy. Once you've told Skyrim about a plugin file, it remembers, so you only have to do this once for a new mod, assuming it has plugin files.

If you want to read that all again using different words (which sometimes helps immensely in figuring this stuff out), there's a short article on the Nexus Wiki: How to install Skyrim mods. Manual installation is covered in item (8).
Finally, the Nexus forums and official Bethsoft Skyrim forums are very helpful when you run into trouble.
Comment: Keep in mind that not using a mod manager is the Worst Idea Ever if you want to be able to uninstall mods.
Comment: @kotekzot This is very true! But learning to install mods manually is the Best Idea Ever for learning how to effectively use a mod manager. When a mod manager screws up (and they do, especially NMM), understanding how mod files work from personal experience makes troubleshooting a breeze.
Comment: This is the Best Comment Ever.
Answer: "Scan games" and manually type your directory.  Most likely the directory you are looking for is: C:\Program Files\Steam\SteamApps\common\Skyrim . I had the same issue as you, but once I did that it worked.
Comment: Be sure to hit the little green checkmark after entering this, before continuing. Otherwise it'll say "No games found, exiting".
Answer: Are you running steam and any other associated neccesary programs as an administrator? It sounds like your issue may rest with read\write privileges. (right click and run as administrator)
Answer: You just need to right click on the Nexus icon and click " Run as Administrator" also make sure Nexus isn't saved in Program Files. Drag the nexus folder to your desktop or something.


I can manage myself

Question: If someone offer his/her help, is it possible to answer in polite form like that - "I can manage myself"?
Comment: http://workplace.stackexchange.com/ might be a better fit, depending on what kind of answers you're seeking.
Answer: You can say one of the following (in your most humble and polite voice ;) ):

Thank you for coming forward to help me, but I am fine.
Oh, thank you so much, but I am fine. (or) Oh! Thank you so much! But I am fine.
I appreciate your help, but I am good.
I appreciate your help, but I am fine.
I appreciate your help, but I can manage myself.
Answer: In this context, myself means by myself (on my own, without assistance, etc.).
To manage oneself can mean to personally handle one's own particular circumstances and problems (insofar as they need to be "managed"). This emphasises the fact of the problems being "personal".
It's my opinion that adding by shifts the emphasis more to the fact of not needing assistance, but actually both forms are often used with this sense. It's also my opinion that both forms are very often spoken in a dismissive/hostile context - you actually want the other person to leave you alone to do whatever you need to on your own. Such a response is often followed by a sarcastic "thank you!" or "thank you very much!"
Leading on from that, I would be inclined to say that...

"I can manage on my own, thank you"

...carries less risk of the hearer feeling that his offer of help has been somewhat rudely rejected.

I can manage myself


Calculating CPU time of process in RHEL 5.3

Question: For a process management,I would need to remove a process that exceeds a certain amount of CPU time, for example 1 hour.In PS command ,it has TIME parameter shows the total CPU time of a process .So is this the correct way to take the CPU time of a process?
Also is there any other commands that could be used in calculating CPU time of process.
Comment: you probably need to use  `ps` or `top` with the right option added to `cut` and then to `kill -9`   but I think nobody will provide you such a script without you showing a bit of your work.
Comment: If you already know what process is exceeding, you could use `sar -X` to monitor that specific PID.
Answer: On most systems, you can use the ulimit command when you start the program to limit the amount of CPU time it can use. Under the hood, this calls setrlimit with the argument RLIMIT_CPU. After the program has used that much time, the program is killed.
(ulimit -t 3600; myprogram)

You can refine further by setting a soft limit after which the program receives the SIGXCPU signal (which it can catch) and a hard limit after which the program receives the SIGKILL signal (which is unavoidably fatal).
(ulimit -t -S 3590; ulimit -t -H 3600; myprogram)

I don't know of any shell utility to change the limit of a running program. You can cause the process to execute the setrlimit system call via ptrace, for example using a debugger. Note that some security frameworks disable this use of ptrace (e.g. it's disabled by default on current Ubuntu releases), I don't know whether RHEL 5 allows it.
gdb -n -pid 1234 -batch -x /dev/stdin <<EOF
call setrlimit(RLIMIT_CPU, {(rlim_t) 3590, (rlim_t) 3600})
detach
quit
EOF

(1234 is the process ID, and the two numbers inside the braces are the soft and hard limit.)
Answer: Depending on the precision you need, invoking ps and some friends may be sufficient.
However, keep in mind that ps gets its data from somewhere; there's nothing magical about that particular application.
Have a look at /proc/$$/sched and specifically the value for se.sum_exec_runtime. That value is the total number of nanoseconds the process has spent on the CPU. I'm not going to spend a lot of time to trace its history, but it looks like the value has been kept track of at least since 2.6.32.
To get a more useful value (milliseconds), take the reported value and divide it by 1,000,000.
There are probably other ways to get the same data, but it might be non-trivial without resorting to syscalls into the kernel, which is not an easy thing to do from a shell script.


Alternative to a potentiometer to regulate 50 W

Question: I want to regulate the input current into an ultrasound transducer (40 kHz, 50W). The signal is being generated by PCB. I read that regular potentiometers are usually employed up to a power of 1 Watt. I have found potentiometers that could be used, but they seem a bit bulky and expensive (ca. 80 EUR). Is there an alternative to a standard potentiometer to regulate the current up to 50W?
Comment: Say what now? Seems like this is an X-Y problem.
Comment: Usually one feeds the signal to a low cost potentiometer, then amplifies it as needed. 1 watt is about the limit for potentiometers that have reasonable cost.
Comment: If one has 30 dB power gain you can use a 0.5W pot.
Answer: Don't try to scale down the 50 W signal coming out of the driver.  Instead, control the driver circuit to produce a lower amplitude signal.
This is the same concept as a volume control for audio.  There isn't some big fat pot between the power amp output and each speaker.  Instead, the volume control adjusts the amplitude of the low power signal going into the amplifier.
Show the power driver, and how it is controlled.  From that we can probably recommend ways to cause it to make less power.  Without those details, there is little to say.
Answer: You could use a MOSFET as a Voltage Controlled Resistor, as long as you use a large heat sink and perhaps a fan.
Answer: Depending on the impedance of the ultrasonic transducer, I have in the past used a signal generator and an audio power amplifier. Some of them do go beyond 40kHz
Comment: Thanks for the answer. Do you have information on the specs/data sheet of the amplifier? I have a signal generator able to generate well above 40 kHz signals. Is it safe to assume that the limiting factor (regarding the frequency) is the audio power amplifier in this case?
Comment: @Keine You can google for an audio amp with 40kHz (or above) bandwidth. The limiting factor is the impedance of the transducer.  Audio amps are rated with loads between 4 and 8 Ohms. Also, in case you are thinking of it, do NOT use an audio tweeter. Their power ratingas are not what they seem.
Answer: Piezo devices are dielectric resonators and as such the current is proportion to voltage and frequency.
If you want to regulate the power, the most convenient way is to have a voltage controlled Vcc to the driver which can be done with a low power pot to an adjustable SMPS or LDO in the feedback ratio.