Loss function for KNN Regressor

Question: What is the Loss function for KNN Regressor? Would it be similar to OLS? If so what would be the main difference?
Answer: You can use your preferred loss function for regression problems. Mean-squared error (or equivalently, sum of squares) is one of the most commonly used ones, but there are many others depending of the specifics of your problem, in particular, of what counts as a big mistake compared to an acceptable one.
You can find some alternatives to mean-squared error here https://heartbeat.fritz.ai/5-regression-loss-functions-all-machine-learners-should-know-4fb140e9d4b0
Anyway, the fact that you are using KNN-regression instead of any other regression method makes no big difference
Comment: So this is not a classification problem, this would specifically be for KNN Regressor as opposed to KNN Classifier
Comment: Oops, sorry, I read it the other way for some reason. Editting into the right answer in a few minutes

Loss function for KNN Regressor


How do you beat Talbot in Uncharted 3?

Question: I have already beat Uncharted 3 on Normal and I am trying to do it on Hard. I have gotten to the final boss fight with Talbot and nothing I do seems to work. I can only attack him at the very beginning of the fight. After about 30 seconds of fighting, every time I press square to attack him he puts me in the hold where he holds my arm behind my back and tries to stab me. I press circle as fast and as many times as possible but Nate never bites his arm. Talbot always just throws me out of the hold. This just happens over and over again for sometimes longer than 10 minutes or until I get frustrated and start over. I must be doing something wrong or there is a glitch in the game. Please help me out?
Comment: none of the answers to that question helped
Comment: You sure you're tapping the Circle button fast enough? See here: http://community.us.playstation.com/message/37138237. Sounds like the same issue.
Answer: When he gets you in a hold, or on the ground, you need to press the circle faster than is humanly possible, for longer than a human can possibly do it. Well, not quite. If other people in the house get worried and ask "what's going on ..", you may be doing it fast enough.
In between holds, I gave up camera control and used the 1st three fingers of my right hand to more or less simultaneously mash the square, triangle and circle buttons, which seemed rather effective. This didn't have to be done as fast as the circle to break a hold, but it still had to be done rapidly. I did this initially for a couple of minutes and Talbot wasn't able to get one hit on me (on crushing even), but this turned out to be a Bad Thing; you need to let him get you into a hold at least once, b/c the story depends on it.
Both of these are very fatiguing, and if you don't get him right away, your button rep rate will go down, Talbot will start winning, and 20 minutes later you'll give up with incipient carpal tunnel syndrome.
Also, in my opinion, the fight with Talbot in the middle of the game (near the fountain) was equally as difficult, so if you can beat him there, you should be able to beat him at the end.

How do you beat Talbot in Uncharted 3?


Remote code execution over WAN

Question: Say I am on a a computer behind a NAT and I want to execute an RCE exploit on another computer behind a different NAT(note that no ports are forwarded to the victim's computer on his/her NAT) Could I then run an exploit like this(assuming that I already know that the target computer is vulnerable to that exploit) and hope to get a shell, if yes what changes are to be implemented such that the exploit is successful?
Comment: Consider basic networking: how will you address the target computer?
Answer: This boils down to a basic networking problem: if the exploit requires you to connect to a listening network service on the target (e.g. exploiting BlueKeep requires you to connect to the RDP service running on the target), you need a way to connect to the target by IP address. You mention the target is behind a NAT, and that port forwarding is not configured. So how would you address the target?
If you launch your exploit directly at the WAN address of the NAT device, it doesn't have any rules set to deal with the traffic, so it will be dropped or rejected. If you launch your exploit directly at the internal address of the target, it won't get anywhere since it shouldn't route across the internet.
Basically, you are out of luck unless port forwarding is configured (either manually or through something like UPnP), or if you can get a shell on another device on the target's internal network to pivot with.
Answer: Well, there are basically 2 types of shell that one uses, bind shell and reverse shell. In this case when the target is behind another NAT it would not be possible to get a bind shell which opens a port on the victim's system. Since the victim is on another network it would not be possible for us to access the bind shell that would be opened by the exploit.
However, a reverse shell is definitely possible in this scenario. A reverse shell opens a port on your system and listens for any incoming connections from the target machine. The challenge here is the listening server's IP address to use while creating such an exploit, so that the shell reaches us. We can overcome this problem in the following ways:

Port forwarding on your router - If you know the public IP address (say x.x.x.x) of your router, and you are able to change the settings on your router to forward the incoming requests to a particular port (say 4444) to your system, then you should be able to use your router's IP and port in your exploit, i.e (x.x.x.x:4444).
Keep in mind that the above IP address (x.x.x.x) will not be static if you are planning to use your home network or any other type of personal internet connection. You might need a static IP address to ensure that the exploit runs and of course, for persistence. In this case, you can turn to servers hosted on cloud such as AWS or Digital Ocean and get a static public IP address for your instance. You can also use services such as ngrok to create a TCP tunnel for your exploit with a known domain name and port pointing to your server and the corresponding listening port.
Comment: I don't think this answers the question. Discussing the type of payload only becomes relevant after a successful exploit, but the question is asking about the initial exploit in a constrained scenario.
Comment: how will the target be exploited if it cannot be reached on the network? That's the nature of the question.
Comment: The questions says that the target is assumed to be vulnerable to the exploit. So the only parameters that will change in the exploit are the connection variables, that is which host and port to connect back to.

Remote code execution over WAN


Track scrubbing in webkit controller based on time control is clicked and held?

Question: What I'm essentially trying to accomplish is track scrubbing in a webkit controller. What I'd like to do is set the onClick function to skip forward or back when the appropriate directional button is clicked, but also scrub backwards or forwards if the control is clicked and held.
However, I'm thoroughly stuck on the JS necessary to not only differentiate the clicks and click holds but also measure the time held. Once the time held is determined, it should be as simple as setting time to iTunes.playerPosition +/- clicktime
For the onclick event, do I simply use settimeout to determine the difference between clicking and clicking and holding?
Also, how would I measure the time held using javascript?
I apologize for the vagueness of my question, but I'm a bit new to JS and any help you can provide would be hugely, hugely appreciated. If more details are needed, I will do my best to provide them.
Answer: I'm not sure about onClick, but I'd use onMouseDown and onMouseUp. You would set the time onMouseDown that dragging has started, and check that flagged time onMouseUp.


will it freeze if i leave it overnight with no antifreeze or water

Question: will my engine block freeze with no antifreeze or water? I just replaced the water pump and i am stuck on the power steering pump mounting brackets i am hoping to find a diagram or a link to a website. the vehicle is an 83 dodge d150 318 2wd.
Comment: Of course it'll freeze if it's below freezing outside. Whether it damages your engine block depends on if there's water inside that can also freeze, expand, and crack things.
Comment: @elrobis Sidewalks, roads, and all manner of things are not closed systems, but still crack due to water. It's much less likely that an engine will crack if it's been mostly drained. I wouldn't risk it though.
Comment: @cory, if the system isn't closed (i.e. some hoses and or components remain disconnected), or if it's closed yet considerably low on coolant, won't any freezing action just push fluid out or into cavities, as opposed to freezing in place, expanding, and cracking components? ......even then, if closed and full, I would expect the lowest-tolerant components to take the punishment, like, the lower or upper radiator hoses. No?
Answer: With no antifreeze or water, there is nothing to freeze so it will be fine to leave it drained of all coolant overnight.
Answer: If you had antifreeze in there before you started your repair, your motor will be fine. The antifreeze ISN'T so the ENGINE doesn't freeze, it's just "winter-grade" coolant.
Basically, during normal operation, the engine makes way too much heat for it's own good. Modern car engines are designed to be "water-cooled," but the problem in cold climates is that the water (not the engine) will freeze when the engine isn't running. We've been adding chemicals to water to keep it from freezing, so we've been calling the mix "antifreeze."
If water is what you've have in there before your repair, there's always some left behind after you drain it, so whatever is left will freeze. But like I said before, if it was coolant, the left over coolant won't freeze.


Profiting on merchandise

Question: Is it a sin to over charge on merchandise, say a movie costs 5 dollars but I sell it for 20. Of course some of that goes to expenses.
Comment: https://www.yeshiva.co/midrash/40180
Comment: I see, so it's market value
Answer: No. The definition of Ona'ah, or charging more than the market price, is defined by the market price. The reason why is because the ability to charge a high price encourages people to supply said asset.
What would be forbidden is restraining competition to enable you to charge an unreasonably high price.

Profiting on merchandise


Principal and Vector bundles over stacks

Question: I am reading some papers concerning the moduli stack of vector bundles and there is some notion that I don't understand. Let us consider $\text{Vect}_{n}$ the stack of vector bundles with isomorphisms over the category of $k$-schemes, being $k$ an algebraically closed field of characteristic $0$. Given another stack $\mathcal{X}$ over $\text{Sch}_{k}$, some authors considered a vector bundle over $\mathcal{X}$. My question is, what is a vector bundle of rank $n$ over $\mathcal{X}$? A priori I thought that maybe a vector bundle over $\mathcal{X}$ is just a morphism of stacks $\mathcal{X}\rightarrow\text{Vect}_{n}$, but after this first impression, people start to work with a $\textit{vector bundle}$ $E\rightarrow \mathcal{X}$ as in the usual case of $k$-schemes. They even consider the pullback of a vector bundle on $\mathcal{X}$ by a morphism of stacks $\mathcal{Y}\rightarrow\mathcal{X}$.  Could you help me to grasp this notion or at least give me some references?
Answer: I am trying to answer (or rather discuss) your question.
Yoneda lemma for stacks  says the following:
Let $\mathcal{S}$ be a stack(differentiable, algebraic, topological,..etc). Let $\bar{\mathcal{M}}$ denote the canonical stack associated to a space $M$. Then there is a canonical equivalence of categories between $\mathcal{S}(M)$ and $\rm{Mor}_{stacks}(\bar{\mathcal{M}},\mathcal{S})$ where the later denote the category of morphism of stacks.
Now, consider the stack $\rm{Vect}_{n}$ over algebraic spaces. Now applying the above Yoneda lemma of stacks we get an equivalence of categories between $\rm{Vect}_{n}(M)$ and $\rm{Mor}_{stacks}(\bar{\mathcal{M}},\rm{Vect}_{n})$.
I think you are asking whether we can extend this result for any general stack $\mathcal{X}$ or not. (i.e not necessarily stacks of the form $\bar{\mathcal{M}}$).
PS: I am not completely aware of such "generalised form of Yoneda lemma" as of now. If I find anything in that direction I will add it in the answer. You may find something in that direction in the page 10 of SOME NOTES ON DIFFERENTIABLE STACKS by J. Heinloth https://www.uni-due.de/~hm0002/stacks.pdf


Kinect V2 Exception in VisualGestureBuilderDatabase

Question: We have a problem with the Kinect V2.
We use Google and the Microsoft documentation to find a solution but we found nothing.
We get a Exception when we try to load the gesture from the database:
private readonly string gestureDatabase = @"Database\ChiMoGestures.gbd";

.
.
.
    VisualGestureBuilderDatabase database = new VisualGestureBuilderDatabase(this.gestureDatabase)

When the program comes to this position,it throws a System.InvalidOperationException , exactly:

An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Kinect.VisualGestureBuilder.dll
Additional information: This API has returned an exception from an
  HRESULT: 0x80004005

Maybe the database self is not correct but we got it with the VisualgestureBuilder?
I am glad if anyone has a solution for this problem?
Answer: Not sure if this is relevant since the question is quite old, but I will answer it anyway.
The Visual Gesture Builder dll is throwing this error because it is missing some files it needs to work. Specifically, it needs the dlls of the two algorithms that perform the gesture recognition - AdaBoost and RFRProgress. These two dlls are available under your Kinect SDK folder, usually located at:
C:\Program Files\Microsoft SDKs\Kinect\v2.0_1409\Redist\VGB\x86\vgbtechs

or
C:\Program Files\Microsoft SDKs\Kinect\v2.0_1409\Redist\VGB\x64\vgbtechs

depending on your platform.
Luckily, there is a way to automate this process via Post-build command in Visual Studio. Go to Project -> Properties -> Build Events -> Edit Post-build ...
and paste
xcopy "$(KINECTSDK20_DIR)Redist\VGB\$(Platform)\vgbtechs" "$(TargetDir)\vgbtechs" /S /R /Y /I

This will ensure that you have the dlls in your Build directory no matter what your platform setting is.
Answer: In addition to the previous comment you must have your database added to your project solution and click on the database inside the solution and set its Copy to Output Directory property to Copy always and Build Action property to Content


long keys and data are same size

Question: I'm trying to make a symmetric encryption algorithm. My key is 256 bits, and the block size and resulting ciphertext are also 256 bit. Is there a disadvantage because the key, plaintext and ciphertext have the same size?
Answer: Do not use home-brewed cryptographic algorithms for anything worth protecting. This is a complex area, where techniques that you'd never dream of are routine for crackers. There are plenty of time-tested and expert-vetted algorithms around, use one of those (after looking it up for kwnown weaknesses, and possible recommendations).
Answer: Most (if not all) block ciphers assume that the message size is a multiple of the block size, much as yours. There's no intrinsic disadvantage to that, AFAIK, and it makes it much easier to process the data. If you don't want to process the data in blocks, you need a stream cipher.
As @vonbrand has mentioned, you should never use such a custom cipher to encrypt any kind of sensitive data, as it will be trivially broken. If all you want is to have a working block cipher, you're looking forAES, which is uncrackable, as far the top universities know.

long keys and data are same size


How does Toya give his magic to Yue?

Question: I know that, in Cardcaptor Sakura, Yue starts needing more magic after Sakura collects all of the cards, which begins to negatively affect Yukito. Toya gives his magic to Yue to save Yukito. How does he pass the magic on? It makes sense that Sakura would have a connection to him, considering that both of them are connected to the cards, but why would Toya have a connection that allows him to give his magic to Yue?
Answer: I don't know the how part since in the anime, it was when Yukito was slowly vanishing due to his lack of powers and that's when Touya admitted to Yukito that he knows about his alter-ego (Yue) and his need for power. If I remember correctly, Yue appeared after that then Touya gave his power to him, sacrificing his ability to sense danger and see poeple who has passed away like their mom Nadeshiko. Touya just fainted after that. It happened on this episode. I haven't seen the manga so I probably missed something on the how part (if a ritual was done to transfer Touya's powers to Yukito).
With regards to Touya having the powers to be able to maintain Yue's power, remember that in the manga

Sakura's father, is one of Clow Reed's reincarnation (the other is Eriol). So Touya probably inherit his magical powers or spiritual awareness from him. Though this fact was completely removed from the anime, though it can only be the reason for Touya having such powers.

How does Toya give his magic to Yue?


How is the word 'meme' pronounced in english? Or how would a native pronounce it?

Question: As a spanish native I've always pronounced putting emphasis in every single letter, but when it comes to english... I have no clue of how to say this word.
Comment: For a more general answer, read http://ell.stackexchange.com/questions/960/when-to-pronounce-e
Comment: **Where you're lucky**: Spanish has a regular, intelligible orthography; **where you're unlucky**: you're trying to learn English, which is about as far from that as can be imagined.
Comment: @Robusto well, actually we study english since we are 4-5 years old, I was just wondering if it had a different pronunciation as it is a non-formal (?) word.... also, I started german lessons, that it is way far from spanish :D
Comment: @Sergi: Well, then would you say you've learned it already? ^_^
Comment: Just wanted to say that because I (a native BrE speaker) only encountered this word in written form for about 10 years before hearing it said aloud, I have only recently learned it's correct pronunciation. My internal monologue still pronounces it me-mae and I have to correct myself if I want to use it aloud.
Answer: If you can understand the International Phonetic Alphabet, the pronunciation is
/ˈmiːm/
Otherwise, in simpler terms, it rhymes with team, as in, 'football team'.
Comment: This isn't IPA. I've seen e with macron used for the English "long e" sound in some dictionaries' own phonetic systems, but IPA uses the more typical Latinate pairs of vowel signs and vowel sounds, in which the "long e" of "meme" (and "team") is [i].
Comment: @Tim: actually it's [mi:m] to show the long vowel. So mike made four mistakes in six glyphs: (i) using backslashes; (ii) showing the stress on a monosyllabic word; (iii) [e] instead of [i]; and (iv) indicating vowel length with a macron instead of a colon. Mistake number (iii) is the most heinous, because it will leave the OP genuinely confused about how to pronounce 'meme'.


What would be the long-term result of driving without a thermostat?

Question: Would there any damage done to an engine if you run it without a thermostat permanently?
Let's assume the vehicle is driven in a climate that is warm and temperatures never drop below freezing.
Comment: Do you mean the coolant thermostat?
Comment: If the t-stat is left off an EFI engine, the coolant sensor simply informs the ecm of a cold engine resulting in a rich running engine. This means wasting fuel and lower fuel mileage. The engine may never get up to operating temperatures with increased emissions that may turn on the check engine light with more than one error code. If the cel remains on for emissions errors, state required emissions inspection will fail this vehicle.
Answer: Engines are designed to run within a specific temperature range.
The components of the engine expand as the engine warms up.  The designed clearances within the engine will be correct around the temperature that the thermostat maintains.
If no thermostat is installed, the engine will take longer to reach the optimum designed temperature and probably wont ever reach it if the rest of the cooling system is operating efficiently.
With the engine running cooler than designed for, there may well be increased wear due to the non-optimal clearances between the moving parts.
Comment: Another factor is if the engine never warms up properly, water/vapor (biproduct of the combustion process) which would normally evaporate out of the crank case, will stay in the oil and could cause corrosion issues on the metal parts it comes in contact with.
Answer: Most of the wear in the engine occurs while cold. Only when the operating temperature is reached, the metal part clearances are where they should be and oil is at the correct viscosity.
If you take off the thermostat, your coolant will always flow in the "big loop", which will delay engine warmup significantly and cause a lot more wear over time.


Determine a modal logic formula which a connective that is not valid but is true

Question:

I'm trying to understand how a formula can not be valid but also true in the above question.
Comment: See [Kripke semantics : Basic definitions](https://en.wikipedia.org/wiki/Kripke_semantics#Basic_definitions): We read $w\Vdash A$ as "w satisfies A", "A is satisfied in w". A formula A is valid in a model $\langle W,R,\Vdash \rangle$ , if $w\Vdash A$ for all $w ∈ W$. You have to map "your" true/valid" on "satisfiable/valid in a model".
Answer: So, let's consider your task at hand.
We need to write some "properly satisfiable" formula with modalities which is not valid (i.e., there can be some models wherein it can be false) but true in the model on the picture (i.e., it is true in every world of this model).
We assume that we work in K, i.e. in minimal normal modal logic where there are no additional conditions on reachability relation (arrows). I also assume that you know relational (Kripke) semantics for normal modal logics.
Let's list some modal formulas of one variable that are true in $x_1,\ldots,x_4$.

$x_1\vDash\diamond q$ (i.e., you can move one step along an arrow and arrive to $q$); $x_1\vDash\diamond p$ (i.e., you can move one step along an arrow and arrive to $p$);
$x_2\vDash\Box\Box q$ (i.e., if you make exactly two steps from $x_2$, you'll arrive to $q$)
$x_3\vDash\Box\Box p$ (i.e., if you make exactly two steps from $x_2$, you'll arrive to $p$)
$x_4\vDash\Box A$ with $A$ being any formula you want (because, you cannot go anywhere from $x_4$ and formulas with $\Box$ will be vacuously true)

Now, I claim (and leave it to you as an easy exercise) that $$\mathfrak{K}\vDash\diamond q\vee\Box\Box q\vee\Box\Box p\vee\Box A$$ with $\mathfrak{K}$ being your model and $A$ being arbitrary formula.
I also claim (and leave it to you as an a tiny bit more difficult) that this formula is not valid, i.e. we can find a model where it is false (for some $A$).
Comment: Thank you so much for your detailed answer. It really helped.
Comment: Tbh, there is an even easier answer: simply write $\Box\neg r$: it will be true in every world of your model.


Drupal combine nodes and comments in view

Question: I have a view with nodes of the type 'Note' (custom CT). I have A view with comments that are associated with those nodes. How can I combine these views into one view so that I can filter them individually on the date ?
Answer: Add 'Comment' as a node type to display in the view but keep your 'Note' content type filter. You should get both the nodes and the comments associated with any of those nodes, which you can then add an exposed filter to for date.
Answer: There is no combine views together you will need to add more content fields in the view showing the Note type nodes. It sounds like you just want to add more comment fields in your view such as the comment body, title and author.
Comment: No, what i want is a list of rows, where each row can be a node OR comment, rendered by display suite
Answer: http://sethsandler.com/code/drupal-6-creating-activity-stream-views-custom-sql-query-merging-multiple-views-part-1/ describes a (code-heavy) way of accomplishing this.


Purpose of cc to self

Question: I noticed that some people inculde themselves in "cc" when they send out an email. What is the reason for this? A quick search on google showed that several people want to learn how to be able to do this automatically.
Comment: Because Outlook doesn't work like Gmail.
Comment: Is this causing you problems?  Right now you are asking for a list of reasons for doing something.  That is not very constructive.
Comment: Outlook 2010 added that feature.  It will show all related emails in the chain including ones that you sent.
Comment: @David Unfortunately (at least with an Exchange inbox), enabling conversation view resulted in lagging and jerky scrolling in the messages list.
Comment: To make outlook work like gmail (by arranging the emails as conversations - no need to go to sent items) & to choke the company internet bandwidth !!!
Comment: I use a self-CC when I'm BCCing multiple people.
Answer: Most people I know that exhibit this behavior is so they have an email in their inbox that continues the chain, and they can see their response in the timeline continuity of the chain.  If you don't CC yourself, most email clients do not show your response, as it goes to the "Sent" folder, and does not appear in your Inbox or the same folder the email chain is in.
Answer: We tend to have multiple projects live at any given time. We use subject headers like:

[Project A]: Discussion on blah

I set up rules in Outlook where if an email contains "Project A" in the subject, it should be routed to the "Project A" folder in my inbox. When I CC myself in these emails, I can be sure that my "Project A" folder contains all related emails, including those that I sent.
It also means that I can periodically clear out my Sent Mails folder without worrying about losing project specific emails.
Comment: I find it useful to keep emails and reports segregated by Project in my inbox. It is a way in which I use CC-ing myself in the email. I think it is relevant to the question since the OP asks why people CC themselves in an email.
Comment: If it's a very particular use case how does it answer the question?
Comment: @enderland, maybe you can explain how you think it doesn't answer the question. The question was what is the reason people use CC, and Luhar explained why. I think this is clear, but if you disagree, maybe providing more/better feedback can help Luhar improve this post. Hope this helps.
Comment: @jmort253 I just don't think an answer where someone specifically says their answer applies to a "very particular use-case" can even remotely be considered a generalizable answer to this question. The point of SE isn't to see how many obscure and specific situations we can get, it's to answer a question. Lots of answers like this one do NOT answer the question because there are millions of specific reasons people do this.
Comment: @enderland - Does my edit fix the problem? What about the other answers? Aren't they sort of listing specific uses as well?  1. See responses without going to sent mail.  2. Using it as a task management system.  Let's not get too lost in keywords, especially when removing them can easily fix the problem. Hope this helps. :)
Answer: Some people use their email inbox (and sometimes other tools in their email client, such as Outlook's Todo list) to manage work tasks in a central location. In this case, putting emails that indicate that something requires action (a task, something to follow up on, etc.) in their inbox is a way to make it more visible than in their sent items folder. Adding a CC to themselves immediately puts the item as unread in their inbox until they process it appropriately.
Answer: I only CC myself when I need to create a "paper trail." Most of the time it is sufficient to wait for the other person's reply before I think about the thread again, but if I find that the other person is being unresponsive or if I need to follow up if the other person does not respond in a certain amount of time I will CC myself. Once I have CC'd myself it is easier to reply to myself later and anyone reading the thread later can see the gap in response between my two emails. Usually people see this happening and want to reply so that it does not look like they are the problem.

Purpose of cc to self


how to control state space when it is not controllable?

Question: I have the matrix A and B and I computed the controllability matrix and found the rank is lower than n. I know I can't apply pole-placement , how else can I solve the system?
n is the order of A
Answer: Controlability means that a state-space feedback is able to assign closed-loop eigenvalues of a linear system to anywhere in the complex plane. However, the stabilizability of a system is a weaker notion, requiring only that the closed-loop eigenvalues all end up on the left half-plane.
Consider \$A\$ is of order \$n\$. For all \$\lambda \in \mathbb{C}\$ that are eigenvalues of \$A\$ with positive real parts (\$\Re (\lambda )\geq 0\$):
\$\text{rank}\begin{bmatrix}\lambda I-A&B\end{bmatrix} = n\$ \$\iff\$ the system is stabilizable
Example:
$$
A = \begin{bmatrix} 1 & 1 \\ 4 & -2\end{bmatrix} \qquad B = \begin{bmatrix}1\\1\end{bmatrix}
$$
This system is not controllable. Its controllability matrix, with rank 1, is
$$
Co = \begin{bmatrix} B & AB \end{bmatrix} = \begin{bmatrix}1 & 2 \\ 1 & 2\end{bmatrix}
$$
However, this system is stabilizable. There are 2 eigenvalues of \$A\$: \$\lambda=-3\$ and \$\lambda=2\$.
$$
\text{rank}\begin{bmatrix}2I-A&B\end{bmatrix} =
\text{rank}\begin{bmatrix}1&-1&1\\-4& 4 & 1\end{bmatrix} = 2
$$
One way of stabilizing this system, using state-feedback with pole placement ideas, is to keep the stable (yet uncontrollable) eigenvalue \$\lambda=-3\$ in its place for the closed-loop system. If one wishes for the closed-loop eigenvalues of
\$\lambda=-3\$ and \$\lambda=-5\$, then it follows the characteristic equation:
$$(s+3)(s+5) = s^2+8s+15$$
Gain calculation:
$$K = \begin{bmatrix}k_1 & k_2\end{bmatrix}$$
$$|sI-(A-BK)| = \text{det}\begin{bmatrix}s-1+k_1&-1+k_2\\-4+k_1&s+2+k_2\end{bmatrix}=$$
$$ = s^2+s(k_1+k_2+1)+3k_1+3k_2-6$$
$$\begin{cases}
k_1+k_2+1 = 8\\
3k_1+3k_2-6 = 15
\end{cases}
$$
This system has infinite possible solutions. Assuming \$k_1 = 0\$, then \$K=\begin{bmatrix}0&7\end{bmatrix}\$ achieves the desired closed-loop eigenvalues.


why federal fund rate vs treasury bond yield generally move in the same direction?

Question: My own thought is, if the fed lowred federal fund rate, peoole should look for investment with greater return, like treasury bond. More demand=decline in yields but why do they generally move in the same derection?. Same goes for Mortgage rate during 2001-2005, why would mortgage rate go down if all the fed did was just lowering federal fund rate which has nothhing to do with mortgage?
Answer: Federal funds rate is a rate at which banks can borrow extra money at an overnight market. This can be viewed as 'banks' cost' since when people want to lend from certain bank, the bank will often get the money not from some new deposits it itself attracts but from the overnight market.
Consequently if the Fed funds rate drops they can afford to lend money more cheaply. The reason why they also do so instead of pocketing all the difference as a higher profit is the competition amongst the bank.  If you want to completely see the mechanism laid bare you can have look at chapter 3 of Freixas and Rochet, Microeconomics of banking. Hence this is the reason why mortgage rates will fall as well. Banks simply can create those mortgages more cheaply now.
The bond yield is also affected by the above. The current bond yield ($Y$) is given as:
$$Y = \frac{C}{A}$$
where $C$ is the annual coupon payment and $A$ is the asset price. The coupons are already fixed so bond which pays ${\\\$}100$ coupon and trades for ${\\\$}1100$ will have yield of $\approx 9\%$. Now whether that $9\%$ is a lot or not depends on prevailing interest rate. If the interest rate  is $10\%$ then yield of $9\%$ is small and if interest rate is $5\%$ yield of $9\%$ is high.
If the interest rate falls relatively to the yield the bond will get more desirable (like the situation when interest rate would be $5\%$ and yield $9\%$. In such case people will simply demand more bonds and then you will get the standard supply-demand story. People will bid the bond prices until $A$ increases sufficiently enough so people are indifferent between buying bond and putting money in some deposit account bearing that $5\%$ interest (or some other instruments). As you can clearly see from the formula above, higher bond price will imply lower yield. Hence when interest rate falls yield prices fall as well.
Comment: "Indifference between holding a bond and deposits" understates the mechanism. The repurchase rate (repo rate) on Treasurys is the rate at which one can finance a position. Bond yields are thought of as the break even rate of the expected cost of financing a position, plus a term premium to account for the associated risk. Treasury repo rates (general collateral) are normally very close to Fed Funds, since they are competing money market instruments backed by Federal Government collateral.
Comment: @BrianRomanchuk you are right that repo rate matters here as well,  and I would agree it is even more important then just having access to deposit accounts, but I did not wanted to unnecessarily include another new concept. In many introductory textbooks you will get the simplified story where bonds compete just with deposits. Of course, that is not 100% realistic but it does not change the point. This being said I amended my answer to stress that bonds also compete with other instruments as well


What's the way to check a mushroom for worms

Question: Is there a way, and if so, what's the best practice for checking a mushroom to verify it is clear of worms?
Answer: The way to go is to cut the shroom into slices (including the stem) and to check if they have needle-size brown tunnels. Also good to know - there is no need to peel the shroom.
Comment: Citing a source for your answer would, as always, make it more valuable to those of us who don't know you well enough to simply take your word on it.
Comment: "Shroom"??? Is dat dee common "shlang" term used for this type of fungi? Also, there are different types and shapes of mushrooms. Some, like the portabello, are pretty much flat and don't have much of a stem. Is a different method required? How about pre-sliced mushrooms? Do they need to be checked?
Answer: According to the CRC
"Mushrooms – Fresh mushrooms must be rinsed and a cursory inspection is needed. Portabella mushrooms should have the brown under part removed. All dried and frozen without any added kosher sensitive ingredients are acceptable. Canned or jarred mushrooms must have a reliable hashgacha."
Source: http://www.crcweb.org/fruit%20&%20veg%20guide.php
According to the Star-K
"H. Mushrooms (all types)
1) Wash well, especially the fan area under the crown.
2) No further checking necessary."
Source: http://star-k.org/bugcheckingquickreference.pdf
According to the OU
"MUSHROOMS
Type of insect: Small white or red worms
Location of insect: Imbedded in underpart or inner sections of the mushroom
Method of Inspection:
Shitake and Button: Wash thoroughly.
Oyster: Break apart in several places, especially the base; examine inner sections. If insects are found, discard mushroom.
Portobello: Remove stem; examine detached cap. Remove entire brown fanlike underpart. Wash thoroughly."
Source: https://www.ou.org/jewish_action/12/2006/kosherkopy_debugging_your_home/
Comment: @DanF  In what ways do you think pre-sliced might differ from whole, with respect to checking for infestation?  My reading of the quotes in the answer above is that there is no practical difference.
Comment: Good work. Now I know what to do with the portabellos. If possible, see if you can locate anything regarding pre-sliced fresh mushrooms. They're quite common.
Comment: WHole mushrooms often have a lot of dirt on them, thus, worms may be hiding in the dirt. Pre-sliced tend to be washed, which may reduce the likelihood of worms and bugs being there. Also, esp. related to OK method, pre-sliced doesn't have a "fan", esp. the common button mushrooms.


Action-reaction pairs with electromagnetic waves

Question: Suppose that a tower is releasing radio waves. These waves are received by an antenna. The radio waves apply force to the electrons in the antenna. My question is that by newton's third law, every action must have an equal and opposite reaction. But in the above case of the antenna, I am able to identify only the action forces. Where are the reaction forces? Do the electrons also apply force to the receiver?
Comment: Are you asking about something like this:  https://physics.stackexchange.com/a/136499/59023
Answer: It is hard to discuss the interaction of the electromagnetic wave with an antenna in terms of newton laws, since the latter were designed (and applicable) for strictly mechanical systems. Let me however consider possible ways to consider various options.
Quantum point of view: photon momentum
Momentum conservation is the most obvious representation of Newtonian mechanics when talking about the electromagnetic radiation, since we identify the momentum associated with a photon $\mathbf{p}=\hbar\mathbf{k}$, and use this relation extensively in discussing quantum processes, e.g., the Compton scattering. What may pass as annoticed here is that radio waves emitted by a tower are not plane waves, and have mode structure spread over hundres of kilometers. In other words, the momentum of photons absorbed by the antenna is poorly defined and mostly negligeable from the point of view of accelerating electrons. The components of this momentum are necessarily perpendicular to the antenna, which absorbs the waves with electric field parallel to it (the antenna). This causes some deflection, that could be compensated by the elastic forces in the antenna, if it were significant. (The place where such photon absorption is actively exploited is laser cooling of atoms - but we speak tehre of bigger EM momentum and much smaller objects.)
Classical point of view: induced current
Quantum point of view is impractical, since we are talking about the electric field inducing a macroscopic current in the antenna. Electrons are made to oscillate with the frequency of the electric field, dissipating its energy via the antenna resistance (i.e., the Joule's heat) and passing part of their energy to the receiver circuit. In this sense the deleted answer by the OP author was probably the closest to truth: electrons emit the radiation giving the moment back to the electromagnetic field. This however would account only for the part of the force acting on the antenna. The missing element is that the motion of electrons is in fact nothing but screening of the electric field, i.e., eliminating it (which is what we implied when talking about the absorption of photons in the quantum picture). In other words, the electrons act back on the electromagnetic radiation by cancelling it.
More formal way to restate this: when discussing the interaction of an electric field with electrons in terms of Newton's laws, one usually treats the EM radiation as an external force. The consistent description is provided by the Maxwell equations, which depend on the dynamics of the currents and the charges, together with the material equations, i.e., the equations describing response of the currents and charges to the electromagnetic fields (which are essentially the Newton's equations). Only together these form a complete system of equations correctly describing the action-reaction.
Simplified discussion
To clarify the concepts, we can consider a simpler situation of a metallic 2D sheet/mirror (instead of the antenna) with a plane electromagnetic wave incident on it perpendicularly.
Photon description
In terms of photons, a photon reflected by the  mirror us scattered elastically, i.e., changes its momentum from $\hbar k$ to $-\hbar k$, transferring momentum $2\hbar k$ to the mirror. An absorbed photon is a case of inelastic scattering, transferring momentum $\hbar k$. This is no different from the situation with gas molecules creating pressure on the walls of a container.
Classical description
In classical terms the pressure on the mirror can be expressed in terms of the Poynting vector (see radiation pressure). If the mirror is perfectly conducting, the incident wave is complitely reflected. The reflected wave has the same Poynting vector, but directed in the opposite direction. The net energy flux is therefore zero. If the mirror is not perfectly reflecting (due to resistance and losses to the downstream electruc circuit), the energy loss can be described as the Joule heat due to the induced current, as covered by the Poynting theorem.
Comment: is the deleted answer somewhat correct ?
Comment: @AStudent4ever Yes, as I say in my answer, reemitted radiation is a part of the reaction force.
Answer: The photons absorbed by the antenna carry momentum, The reaction is removal of momentum from the wave.  Radiation pressure is what separates the tail from a comet, and could in theory be used to drive a space ship with a sail.
Comment: What about the force that makes the electrons move perpendicularly to the direction that the wave propagates?
Answer: The thing that pushes the receiver antenna electrons has disappeared after doing the pushing work. That is why it may be difficult to locate the reaction force.
But the electrons pushed back on the EM-wave that pushed the electrons, and by pushing back caused the EM-wave to vanish.
Hmm, I forgot two things: That the EM-wave is not very massive, and that the receiving antenna contains positive charges too.
So when the EM-wave is pushing the electrons, it is also pushing the protons. So when the electrons are pushing back on the EM-wave that is pushing the electrons, the electrons are actually using the light EM-wave to push the heavy protons.
Comment: But the E field is transversal. You need to explain a forward force.
Comment: @my2cts  Well forward force was explained already, and it seemed to me that the question was more likely about the transverse force. And it still seems like that to me.
Comment: I apparently missed the explanation of the forward force. Where is it?
Comment: @my2cts The answer by  R.W. Bird, that mentions radiation pressure.
Answer: "Forces" are things which act on massive particles. But there is a deeper formulation than $\vec{F}_{12} = - \vec{F}_{21}$ which is more widely applicable. It's called the conservation of momentum, of which $\vec{F}_{12} = - \vec{F}_{21}$ is just one special case. When charges wiggle, and radiate off light, some of the momentum of the particle is sapped and goes into the electromagnetic field, creating a light wave moving off in some direction.
The equal and opposite force stuff can't really be made meaningful in electromagnetism, because "forces" aren't instantaneous. The influence of a particle moves through the electromagnetic field at the speed of light.


Combining yagi and J pole for airband

Question: I use a J Pole for air band (122 MHz). I get superb aircraft reception but a very weak signal from my local airport 20 miles away. Is there a way to set up a yagi, or other gainy directional antenna, pointing at the airport and combine it with the omnidirectional J Pole ?  I assume I'd need to get the impedance back to 50 ohms. Could this be done with a phasing harness ?  Would I be able to mount both antennae on the same mast and have only one feeder coming to the receiver. Help appreciated.
Answer: They can be combined, but if you are thinking by combining them you'll get the best of each antenna, that's not how it works.
Besides signal, each antenna picks up noise. The two combine to be, in effect, a single antenna with a different directional pattern.
A cheap option is to put the two on a switch, and you can then manually select whichever antenna works best for the situation.
If you want to get more sophisticated, if you have two phase coherent receivers you can write an algorithm which dynamically combines the amplitude and phase of the two for best reception. Such an arrangement is called an adaptive antenna.
Comment: actually, if it's a (digital) algorithm, that would actually be digital beamforming!
Answer: Your question is very similar to this one, except decent coaxial cable for the air band is much cheaper than decent coax for 1 GHz.
In addition to the suggestions given in the other question, you might try just mounting the antenna up higher.  Or even just a few feet over, because your antenna could be in a local null.  You've surely experienced local nulls before—you're sitting at a red light and your FM broadcast band reception is suddenly terrible; then the light turns green, you roll just a few feet away, and the reception is good again.
Comment: terminus technicus for these local variations of receive strengths is *fading*, by the way :)
Comment: Hi @MarcusMüller, fading implies varying signal strength over time, but I'm talking about a permanent null, perhaps in the diffraction pattern of an obstacle between the transmitter and the receiver.
Comment: fading doesn't imply varying over time, just over *any* dimension, be it time, or distance from the transmitter, or actual place in 3D, or any combination.

Combining yagi and J pole for airband


In which ways did geometric flows and variational methods from Riemannian geometry enter the symplectic world?

Question: I am interested to learn about the role of geometric analytic methods for solving problems in symplectic geometry, In particular, I would like to know what results heavily rely on this machinery (incl. references to the original papers and alternative explanations of the proof of technique).
Comment: Hi warzasch, and welcome to the Math.SE. I upvoted your question but nevertheless I voted also to close it: the reason is that symplectic geometry is extremely broad subject, with many applications and result. It would be almost impossible to give an exhaustive answer to such a broad question, so I invite you to consider narrowing its scope a bit, in order to provide a possible answerer the hope to give a nice answer.
Comment: I have not asked for an exhaustive answer, only for examples, a starting point.
Answer: Symplectic Floer theory  is  essentially a variational technique.  The energy functional is the action functional on  the space of loops. Its critical points are periodic orbits of the  Hamiltonian used to defined the action  functional. The variational theory  of periodic solutions of Hamiltonian equation resembles  from this point of view the variational theory of geodesics.  The similarities stop here since the indices of these critical points are infinite so traditional Morse theory seems inapplicable.
To make  things worse, the gradient flow lines of this functional, are described by nonlinear elliptic equations similar to the Cauchy-Riemann equation. Viewed as evolution equations, the elliptic equations are ill posed.  This is a no-go  for  p.d.e. experts and explains  why people   have not investigated the gradient flow  of this action functional until Andreas Floer did.
To quote  Freeman Dyson "the history of mathematics is a history of horrendously difficult problems being solved by young people too ignorant to know that they were impossible".
Symplectic Floer theory  is very challenging analytically.  As for references, you could go to the original papers of Floer. His writing is challenging but full of great ideas.


Initial Topology on a Locally Compact Hausdorff Space

Question: If I consider the initial topology generated from the continuous functions out of a locally compact Hausdorff space into $\mathbb{R}$, is this initial topology the original topology? I know it's Hausdorff, how could I show that it is once again locally compact?
Comment: The continuous *functions* (plural)?
Comment: Yeah, let me fix that.
Answer: If $(X, \mathcal{T})$ is Tychonoff ($T_{3{1 \over 2}}$) then the initial topology (say $\mathcal{T}'$) w.r.t. $C(X)$, the set of all continuous functions from $(X, \mathcal{T})$ to $\mathbb{R}$, is the original topology of $X$. And locally compact Hausdorff spaces are Tychonoff.
The Tychonoff fact is not too hard to see: clearly $\mathcal{T}' \subset \mathcal{T}$, as the functions in $C(X)$ are all continuous w.r.t. $\mathcal{T}$.
And if $x \in O$ and $O$ is in $\mathcal{T}$, then by $X$ being Tychonoff we have a continuous function $f \in C(X)$ such that $f(x) = 0$ and $f[X \setminus O] = \{1\}$. But then $O' = f^{-1}[(\leftarrow, \frac{1}{2})]$ is in $\mathcal{T'}$ and $x \in O'$ and $O' \subset O$ (if $x \in O'$, $f(x) < \frac{1}{2}$, so $x$ cannot be in $X\setminus O$, as all those map to $1$ under $f$, so $x \in O$). This shows that $\mathcal{T'}$ forms a base for $\mathcal{T}$, so $\mathcal{T} \subset \mathcal{T}'$ and we have equality.
One way to see that locally compact Hausdorff spaces $X$ are Tychonoff: the one point compactification $\alpha X$ is compact Hausdorff (so normal $T_1$, hence Tychonoff) and Tychonoff is a hereditary property, so $X$ is too.
Answer: Given a locally compact Hausdorff space $(X, \tau)$, I assume that the initial topology $(X, \tilde \tau)$ are the weak topology generated by ALL continuous functions from $X$ to $\mathbb R$.
To show $\tau = \tilde \tau$, it suffices to show that all $U\in \tau$ is generated by elements in $\tilde \tau$.
Let $x\in U$. As $X$ is locally compact, there is a compact $K$ so that $x\in K$ and $K \subset U$. By Urysohn's lemma, there is a continuous function (with respect to $\tau$) $f: X \to \mathbb R$ with compact support so that $0\leq f\leq 1$, $f\equiv 1$ on $K$ and $f\equiv 0$ outside $U$. As a result, the set
$$V_x = f^{-1} (1/2, 3/2)$$
is in $\tilde \tau$ and $V_x \subset U$. Thus
$$U = \bigcup_{x\in U} V_x$$
and so $\tau \subset \tilde \tau$.


What do different dissociation constants mean?

Question: What does first, second, third etc. Acid dissociation constants mean? They are written as $pK_{a_{1}}, pK_{a_2}$ etc. If any one would explain it that would be good.
Answer: Acid dissociation constants in general are the equilibrium constants that describe acid dissociation reactions. So for:
$\ce{HA + H2O <-> H3O+ + A-}$
the equilibrium constant would be
$K_a = \frac{[\ce{H3O+}][\ce{A-}]}{[\ce{HA}]}$
This is enough for monoprotic acids, compounds that can donate a single proton.  However, some acids, like the common inorganic acids $\ce{H2SO4}, \ce{H3PO4},$ and many, many organic acids can donate more than one proton.  They are called polyprotic.  The issue with their protons is that they are not all donated at the same time, or under the same conditions.
So what we do not see is:
$\ce{H2A + 2H2O <-> 2H3O+ + A^{2-}}$
with an equilibrium constant of
$K_a = \frac{[\ce{H3O+}]^2[\ce{A2-}]}{[\ce{H2A}]}$
Instead there are two (or more, if there are more protons to be donated) equilibria, each of which has its own equilibrium constant.
Dissociation 1:
$\ce{H2A + H2O <-> H3O+ + HA^{-}}$
$K_{a1} = \frac{[\ce{H3O+}][\ce{HA-}]}{[\ce{H2A}]}$
and
Dissociation 2:
$\ce{HA- + H2O <-> H3O+ + A^{2-}}$
$K_{a2} = \frac{[\ce{H3O+}][\ce{A2-}]}{[\ce{HA-}]}$
Each of these acid dissociation constants can be acted on by the p operator such that:
$pK_{a1} = -log_{10}(K_{a1})$
and
$pK_{a2} = -log_{10}(K_{a2})$
Note that there are polyprotic bases as well, substances that can accept more than one proton, and they are described using $K_{b1}, K_{b2}$, etc, where $K_b$ is the equilibrium constant for the base reacting with water to form hydroxide and a conjugate acid.
Answer: The first, second, third, etc... acid dissociation constants refer to the equilibrium constant for loss of the first, second, third, and so on proton. For example, $H _2SO_4$ can lose one proton to make HSO4–,  which can then lose another proton to generate SO42–. Ka1 and Ka2 would be the equilibrium constants for these reactions. pKa1 and pKa2 are, of course, -ln(Ka1) and -ln(Ka2).


In chess, why is 1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Bxc6 rarely visited?

Question: This opening begins by copying the Ruy Lopez/Morphy Defense for the first three moves, but White branches off with 4 Bxc6.  I've read that 4 ... dxc6 5 Nxe5 Qd4 is effective for Black to recover his pawn - but what if White does not play 5 Nxe5, say 5 O-O instead? In short, why has this opening been largely ignored?  Is there a disadvantage to White after 4 Bxc6?
Answer: This is called the "Exchange" Variation of the Ruy Lopez. Not only is there an early exchange of bishop for knight, but it usually soon leads to an exchange of queens on d4.
This queen exchange brings about an early "endgame," effectively cutting out the middle game. Most players are not particularly fond of the endgame, so they don't consider this an advantage, and therefore don't play this variation.
But in a famous game in St. Petersburg in 1914, the world champion, Emmanuel Lasker, played this variation against future world champion Jose R Capablanca---and won. By Capablanca's own admission, "Lasker had no superior in [the endgame]" at the time. On the other hand, he already (and later) feared Capablanca's middle game.
Comment: @drm65: I wouldn't say mediocre play; but yes, like most openings where neither player made a mistake, it doesn't confer an "advantage" to either player, it just gives them different imbalances to work with; for instance, black now has more space due to his open D file, while white has a better pawn structure.  At this point the "advantage" will go to whichever player can make better use of the imbalances they have.
Comment: So the opening does not necessarily disadvantage either player; it merely makes for mediocre play - is that it?  Thanks!
Comment: @blueraja: I don't like to see things happen this way. But it does happen from time to time. But an upvote for you, too.
Comment: @drm65: "Mediocre," in the sense of "unexciting" play without the queens. Of course, either side can win, but it's a little harder. But that's EXACTLY what Lasker wanted, and got!
Comment: @Tom: as I mentioned in my answer, 5. Nxe5 is extremely rare at higher-level play (only 6 out of the 2693 master games on chessgames.com).  *Much* more common is 5. O-O, in which the queen's don't get traded right away.
Answer: It hasn't been ignored; this is called the Ruy Lopez Exchange variation, and is extremely popular in tournament play.
5. Nxe5 is considered a small mistake (for the reasons you mentioned), but moves like 5. O-O and 5. Nc3 are perfectly acceptable, and are played by grandmasters all the time.
Comment: I wish I could divide my acceptance between these answers; they each address a different facet of the question.  I didn't know it was popular.  Then again, I only have old books.
Comment: I think you meant to type Ruy ...


How do I kill the Treasure Goblin in Hell?

Question: I've been playing through Hell mode on Diablo 3 for the better part of a day and have come across 3 Treasure Goblins. On all the lower difficulties you can either stun or disorientate him to cancel the portal. I've tried doing everything I can to stop him on Hell mode, though, and he still travels through. Is there a way, apart from blowing him up and killing him before he teleports, to stop Treasure Goblins from teleporting away?
Comment: Any info about closing the portal would be appreciated [here](http://gaming.stackexchange.com/questions/66349/how-do-the-treasure-goblins-work)
Comment: My guess is that the whole point is that you have to kill him really fast in hell mode (or higher difficulties)
Comment: @Nevir As stated before in a previous comment, there have been times where you can cancel the portal, im pointing out that you cant anymore in hell difficulty.
Comment: The Treasure Goblin can't be interrupted in any game mode. At the lower difficulties, he simply dies faster. As soon as the portal comes up, you have a set amount of time to kill him.
Comment: @Domocus Not sure. In one game, my team was able to somehow cancel the portal and the goblin ran elsewhere and started a new portal.
Comment: @Domocus I've also cancelled the goblin's portal on Normal before. I can't remember exactly how, but I know my Monk is very fond of Cyclone Strike, which is a skill that pulls all nearby enemies to me, so that could have been what cancelled it.
Comment: @Domocus I have as well canceled his portal.  I am a wizard and used 3 arcane orbs (that each hit) which canceled his portal.
Comment: Hm...ive attempted every form of CC known to a monk and yet never cancels
Comment: My monk cancels portals on _every_ hit; I'm not sure which skill/item/??? is causing it
Comment: Fists of Thunder does a short knockback on every finishing move (3rd hit).  That and Lashing Tail Kick can both interrupt treasure bandits pre-hell.
Answer: For information on Treasure Goblins, take a look at this previously asked question.
From my testing, there is no other way to effectively close the portal besides interrupting the cast and/or destroying the treasure goblin.  In Hell mode, all enemies have increased resistance and increased HP.  Therefore, you HAVE to output more DPS to prevent him from getting away.
From what I have noticed, once his portal is down, you have a set amount of time to kill him or make him run away from the portal before it doesn't matter: He will get into the portal and your loot is gone.
A few recommendations:

Try cornering him.  This will obviously try to prevent him from running away and allow you (and your team if applicable) to dump all of your DPS in a concentrated area.
If you have a mercenary or other teammate(s) with you, attack him from both sides - in attempt to not allow the treasure goblin from running away.
If you have not attacked the treasure goblin yet, DON'T ATTACK HIM UNTIL YOU CLEAR THE SURROUNDING AREA.  He will only run away once you start attacking him and if he, you, or any of your teammates aggro more enemies on the harder difficulties - it will get harder -practically exponentially per enemy - to take him down before he gets away.
Lastly, and obviously, make the treasure goblin your party's main priority [if applicable].  Notify everyone in your party that you see a treasure goblin and wait until everyone is ready to take him down (and the area surrounding him is clear).
Comment: I'd like to point out that the Treasure Goblin does seem to have a counter of some sort that will cause him to create a teleport if you have not damaged him. I've seen this happen several times when clearing out the surrounding area.
Answer: The goblin will open a portal if either of these two occur:

He gets far enough away
A set time has passed

If it's the former, you can cancel the portal; if it's the latter, you can't.


Vonnegut's "Address at Rededication of Wheaton College Library, 1973"

Question: This essay was published in (perhaps among other places) in "Wampeters Foma and Granfalloons". There are two Wheaton Colleges in the U.S., one in Norton MA and the other in Wheaton IL. Does anyone know (and can you provide a reference) as to which of these two colleges this address was delivered at?
Comment: [You aren't the only person who is confused](http://www.chicagotribune.com/news/ct-wheaton-college-hate-mail-confusion-20160114-story.html).
Answer: It appears to be the one in Massachusetts. The essay is frequently cited as being published in Wheaton College alumnae magazine, which is the magazine of the Wheaton College in Massachusetts.
I note, however, that the library's own history page does not make any mention of a rededication in 1973. There was a renaming of a room after a key alumna in 1972.
Comment: @rogerl it's weird though, because you would think they would brag about someone as famous as Vonnegut being at their rededication.
Comment: @JoshuaEngel Interesting point. He does end with "Thus ends my speech. I thank you.", though.
Comment: I too checked the library page at the Wheaton (MA) college and saw no reference to a rededication. 1973 was a while ago, though, so I could easily imagine that it was forgotten when the webpage was written.
Comment: In the Wheaton College Alumnae Magazine, it was titled "Essay for the Wheaton Library". It sounds as if he wrote the essay, but didn't actually appear there. That would make sense, since I gather he made few public appearances. I don't know why he would have permitted the re-titling when it was published in his book; perhaps he simply forgot?


How to filter a list by hour

Question: I am on SharePoint 2013 and do not have access to Designer, as a preface.  I am trying to create a list view that filters items by whether or not they were added in the last hour.  I had done this earlier, only with items that were added in the current week, by creating two columns, 'Week Start' and 'Week End', and filtering by Created falling between those two.  Simple enough.  However, filtering list views does not allow for complex functions, nor does the [Today] function recognize time, causing an issue.  Is there any workaround for this?  Thanks.
Answer: Create a calculated column and use the HOUR function, =HOUR(Created)
Comment: [ViewMaster365.com/functions](http://www.viewmaster365.com/functions) is an up to date list of Functions & Syntax I compiled recently out of the (*sometimes incorrect*) resources on the Web.
Comment: Thanks so much, I had been trying to use a Date/Time column and couldn't get some of my more complex functions to work.
Answer: You should create a new calculated column with NOW() function, as I show you in the following screenshot

Make sure you select "date and time" under "Data type returned"
This will return the current time, acording the regional settings of the server.

How to filter a list by hour


Rails refuses to add associated record

Question: I have a table with 2 foreign key relationships - to a Timeline and a Phase.  When I create a record in my development database it all works 100% as expected, but when I do it in test mode it refuses to add the Timeline - you can see from the INSERT statement that it flatly refuses .. it doesn't even try to add it.  When I run the exact same sequence below in development it's fine
I can add/update timeline_id but then it doesn't reference the timeline through the parent phase_timeline object as it should.  I repeat that this all works fine in development, but not in test.  Its driving me mad.  Is it failing a validation possibly.. or could the database be corrupt.  Are there some console commands I could run to check out the foreign key relationship further?
<code>[33] pry(main)> t = Timeline.last
  Timeline Load (0.3ms)  SELECT  "timelines".* FROM "timelines" ORDER BY "timelines"."id" DESC LIMIT $1  [["LIMIT", 1]]
=> #<Timeline:0x0055fd716dcfa8 id: 1, title: "England", timelineable_type: "Global", timelineable_id: 1, created_at: Thu, 24 Sep 2020 14:46:28 UTC +00:00, updated_at: Thu, 24 Sep 2020 14:46:28 UTC +00:00>
[34] pry(main)> p = Phase.last
  Phase Load (1.3ms)  SELECT  "phases".* FROM "phases" WHERE "phases"."deleted_at" IS NULL ORDER BY "phases"."id" DESC LIMIT $1  [["LIMIT", 1]]
=> #<Phase:0x0055fd717f8450
 id: 1,
 name: "First phase",
 development_id: 1,
 created_at: Thu, 24 Sep 2020 14:46:28 UTC +00:00,
 updated_at: Thu, 24 Sep 2020 14:46:28 UTC +00:00,
 developer_id: 1,
 division_id: 1,
 number: 1,
 deleted_at: nil,
 total_snags: 0,
 unresolved_snags: 0,
 business: "core">
[35] pry(main)> pt = PhaseTimeline.create(phase: p, timeline: t)
   (0.2ms)  BEGIN
  SQL (0.5ms)  **INSERT INTO "phase_timelines" ("phase_id") VALUES ($1) RETURNING "id"  [["phase_id", 1]]**
   (1.8ms)  COMMIT
=> #<PhaseTimeline:0x0055fd719ef9c0 id: 5, phase_id: 1, timeline_id: nil>
</code>
Comment: Can you please post the association in the models
Answer: After a LOT of head scratching and diving into the bowels .. this problem was caused by having 2 model classes with the same name.  The classes were in 2 separate folder but had the same scope and were identical but removing the errant one sorted the problem

Rails refuses to add associated record


Archimesh is missing

Question: I downloaded Blender from the official website two days ago to make a VR project, and I saw someone on YouTube using Archimesh add-on to build a room and objects. I pressed ⎈ Ctrl⎇ AltU and tried to find Archimesh add-ton to activate it. But it's not there. I even tried to install it manually from GitHub, but still doesn't appear. Any suggestions?
Comment: From his repo: *** NOTICE *** Archimesh is now part of Blender official releases, so this Git repository is only for reference. If you want download last versions or report a bug, please uses Blender website.
Comment: @WhatAMesh he said he used an official website download...
Comment: I have this blender-2.79b-linux-glibc219-x86_64.tar.bz2 (md5sum 099555c6c8cb16bfcc0745dd303d692c) and "archimesh" is there: are you sure to have "community" addons setting enabled, just under the search box?
Answer: Archimesh in Blender Version2.79
Go to File > User Preferences menu. A new dialogue will appear showing User Preferences.
Click on Add-ons, in search and type Arch , below the search go to Supported Level and click Community.
Wooo, finally you will see Add Mesh: Archimesh on the right panel.

Archimesh is missing


Why is my document duplicating to multiple document libraries

Question: I have 4 subsites on my Sharepoint site for different departments within our company.  One is for the Sales Department, inside of that I have three Document libraries set up for each division within sales. When I upload a document to one of the libraries it duplicates to the other two.  How can I set it so that each library is separate and contains different documents?
Answer: It sounds like you have one document library but are using three web parts to represent the same library.
To create a new library for each division go to Site Contents -> Add an app -> Document Library.


The "OK" button is deactivated in creating new AVD although I have provided all details. So what is the problem?

Question: The "OK" button is deactivated in creating new AVD although I have provided all details as below:
Answer: It is something to do with the CPU type you have chosen (Android Wear) and the Skin? Do Android wearables really support up to HVGA screens?
Answer: I agree with user61926, you have the the CPU type for an Android Wearable but the display type is not set for an Android Wearbale.
Taken from developer.android.com

2. Set Up the Android Wear Emulator

Launch the Android Virtual Device Manager. 1a. From Eclipse, select Window > Android Virtual Device Manager.  1b. From Android
  Studio, select Tools > Android > AVD Manager.
Click New.
For the AVD Name, enter "AndroidWearSquare" or "AndroidWearRound", depending on whether you want to create an emulator with a square or
  round display.
For the Device, select Android Wear Square or Android Wear Round.
For the Target, select Android 4.4.2 - API Level 19 (or higher).
For the CPU/ABI, select **Android Wear ARM (armeabi-v7a). Note: Android Wear is designed to support multiple processor
  architectures.**
For the Skin, select AndroidWearSquare or AndroidWearRound.
Leave all other options set to their defaults and click OK. Although real Android wearables do not provide a keyboard as an
  input method, you should keep Hardware keyboard present selected so
  you can provide text input on screens where users will instead provide
  voice input.
In the list of AVDs, select the one you just created and click Start. In the following window, click Launch.

The Android Wear emulator now starts. To begin testing your app's
  notifications, you must now pair the emulator to your development
  device that has the Android Wear Preview app installed.
Tip: To improve the emulator startup time, edit your AVD and enable
  Snapshot under Emulator Options. When you start the emulator, select
  Save to snapshot then click Launch. Once the emulator is running,
  close it to save a snapshot of the system. Start the AVD again, but
  select Launch from snapshot and deselect Save to snapshot.
Caution: Do not install apps on the Android Wear emulator. The system
  does not support traditional Android apps and the result of running
  such apps is unpredictable.
Answer: The AVD Name cannot contain spaces. Heaven knows why the programmers didn't raise an error in this case (or simply highlight the field and provide an explanation).


bought computer with ubuntu program messed up

Question:
Possible Duplicate:
bought computer with messed up Ubuntu

i recently got a dell inspiron B130 with an ubuntu prgm on it and the main users desktop is scattered allover the place , files everywhere but not in folders,how do i fix this? i am new working with this operating system ,used to windows versions. if i go into a guest profile the desktop is perfectly fine and everything works but i cannot make the system fix itself or  don't really know where to start help???????
i have the user name and password and can get to terminal screen , but not sure how to remove and add myself to admin use
Answer: Welcome to Ubuntu
Personally I would want to start afresh and completely reinstall Ubuntu. This way you can shape it to how you would like it and not put up with someone else's stuff on it.
full installation instructions can be found here  https://help.ubuntu.com/community/Installation
You can download the image from here
http://www.ubuntu.com/download/desktop
Have fun with Ubuntu and if you are not sure of anything don't hesitate to ask.
Answer: Linda if possible connect your computer to your router with a cable before you start the fresh install http://www.linlap.com/wiki/Dell+Inspiron+B130


Relocating from India to Las Vegas on L2 visa

Question: I am relocating to Las Vegas from India with my husband. What will I need to do to get an Employment Authorization? I am a post graduate in Psychology from India.
Comment: You need to apply for an [EAD using the I-765 form](http://www.uscis.gov/i-765).
Answer:
USCIS I-765, Application for Employment Authorization
Certain foreign nationals, who are eligible to work in the United States, use Form I-765 to request an employment authorization document (EAD).
The filing fee for Form I-765 is $410. You must also pay an $85 biometric services fee, for a total of $495, if you are:

Requesting consideration of Deferred Action for Childhood Arrivals (DACA);
  A -  beneficiary of an approved employment-based immigrant petition and you are facing compelling circumstances; or
A spouse or unmarried dependent child of a beneficiary of an employment-based immigrant petition who is facing compelling circumstances.

There is no biometric services fee for any other eligibility category.
Some individuals may be exempt from paying fees. See the form instructions for more information.
Instructions for Form I-765 (PDF, 332 KB)


4-Pin Fan with PWM dc motor controller(not a fan control unit)

Question: Can I use a DC PWM module (not a fan control unit) for a 4-pin fan (directly to 12v and GND)? something like this module
wiring will be motor+ to red and motor- to black. does this method shorten the life of fan?
Comment: Some fans that have 4 pin connections dont start properly at low duty cycle PWM (on the power input), and the ramp isn't necessarily linear. While it could work perfectly, it could also not work at all, or only at some duty cycles. So if your fan is constantly trying to start and stalled, I'd say yes it could shorten its life. But also if its not working its lifespan isnt even the issue.
Comment: well it works perfectly. only the normal sound of motor which all of the motors do.
Comment: Usually it will not work- there is a small contrler in a fan, so it's a bad idea to toggle it's power input.
Comment: Post this question to the eBay seller.  EE.SE isn't his volunteer application support.
Answer: The answer depends on what DC fan controller is used in the four wire fan you have.
There are MCU controlled fans, and there are logic controlled fans. Let's look at one of each:

Freescale have an MCU controller (MC9RS08KA2) that use an external regulator, and this type of fan would certainly not like it's 12VDC to be a PWM signal. The likelihood is that the fan may actually work where the PWM signal is close to 100%. Low PWM ratios of say 50% are more likely to result in erratic operation, though unlikely to damage the fan. The controller has a complex startup routine to set the fan direction, and stall protection implemented in firmware.   If the external fan PWN used had a low frame rate (say less than 1 kHz) you'd likely be in real trouble if the controller started to reset often.

On Semiconductor has a much more primitive fan controller, the LB8503 that is less likely to be upset by the 12V PWM modulation. But again, you have no idea what value C5 is and whether the controller will not enter it's softstart during the low period.

Your question therefore cannot be answered with any certainty at all, but you'd have to say modulating the 12V supply is likely to not deliver a good end result. It is unlikely to shorten the life of the fan (since they are stall proof), but may result in erratic operation.
You could however use the controller you bought and feed it into the CTL signal wire of the fan and reasonably expect good results (you might need to put a resistor of 1k Ohm or so across the output terminals). This way you let the in-fan controller do it's job and provide the speed control and other functions, while the external board provides the PWM to the 4 wire fan. Many of the fans I've seen are capable of supporting a 12V control signal (this gets somewhat complicated since most of the fan manufacturers recommend OC drivers).
If you have not bought the external PWM controller yet, then this may be a better type of controller for a 4 wire fan. Be aware this has no adjustment pot, it has a button to increase/decrease speed (it remembers the settings in the onboard MCU).

Another question that is asked quite regularly (do you need a diode across a computer type fan), and even those considered skilled get it completely wrong. If you look at this answer from some time ago, you can see the confusion this causes with folks saying with conviction that you even need to use Schottky diodes across the fans!!
Let me re-iterate: You don't need to install diodes across BLDC fans with internal controllers EVER.


How can men become pregnant?

Question: Apparently men can get pregnant now? I'm a man; how can I have a baby? I don't have a uterus; doesn't that mean I can't be pregnant?
Answer:
Apparently men can get pregnant now?

Yes, in two very different cases:
Trans men can have a uterus, can get pregnant and bear children.
It is theoretically possible for an XY male to have an embryo implanted in their abdomen and it to develop as an ectopic pregnancy.  This is discussed in wikipedia, and as they highlight that it is only a theoretical possibility, it would probably be fatal for both the parent and child:

Robert Winston, a pioneer of in-vitro fertilization, told London's Sunday Times that "male pregnancy would certainly be possible" by having an embryo implanted in a man's abdomen – with the placenta attached to an internal organ such as the bowel – and later delivered surgically. Ectopic implantation of the embryo along the abdominal wall, and resulting placenta growth would, however, be very dangerous and potentially fatal for the host, and is therefore unlikely to be studied in humans
Comment: While I don't doubt Prof Winston's credentials or his expertise, I think his statement could do with a gigantic "Citation Needed" sticker - I've found nothing reputable on this at all - not even in animal research. Though having said that, it is the male seahorse that gestates the eggs in a special brood pouch.
Comment: I would add a third possibility which is an intersex person who is not trans

How can men become pregnant?


Is there more, less, or equal overhead for elisp, as for a bash script, to call awk, ps, etc?

Question: Hopefully the question explains itself well enough. I'm referring to exta time and system resources involved for one vs. the other... I tend to think it would be the same, but I want to go beyond just think. Do the both make the same system calls?
Comment: You seem to be asking two separate questions -- one, are the overheads the same, two, are the system calls the same... the answer doesn't have to be the same to both of them.
Comment: I'm basically just wondering if calling `awk` or a `bash` script from `elisp` is going to slow things down more than if I was making similar calls from a bash script.. I've just started elisp-ing and wondered if, for example, bash-calling-bash skips the need to load the bash interpreter, but emacs-calling-bash must load it.. Maybe that's the only time it makes a difference (or maybe there is no difference?) ... The more I think about it, it seems that calling `awk` for example, would be the same from either *bash* or *elisp*.. so it is probably a quetion about what happens when bash calls bash
Answer: This will highly depend on what is happening on the system besides your elisp program running, because the bash program (and all required libs) may or may not be cached at that moment in time. Same goes for awk. In the case where you call bash from bash, the bash must already have been loaded into memory.
Comment: Okay, thanks.. so there's nothing dramatically different going on.. It is just one interpreted language calling another.. I think I'm still getting my head around the fact that elisp is not an addon language subordinate to the editor, but rather the editor is an *awk* or *python* program :), well, you know what I mean: the *awk/python* just happens to be *elisp* in this case, and emacs is a script... all of which puts elisp on an even keel with other languages. Got it!


How do I display the "recently created node" block using Views?

Question: I am trying to show the recently added content data in a block, using the Views module, but I can't see any record even if I recently added some nodes.
Answer: You need to check the views output settings. Notice there is a preview option. You wrongly select either fields either the filter doesn't match. You need to filter by Content Date Field and order it desc.
Answer: Ok I guess you are having problem with the content type selection. Use the right content type in the Filter criteria ( Content: Type= xxxxx) where xxxxx is your content type you are working with or created for the node. While Field display is set to fields.
Answer:
check Filters
If you have set display to fields, Don't forget to add some fields in the Fields section
Answer: The issue must be within the views settings. Please check whether your content which you want to see is published or not and the permissions for different users to see the content. If that is not the case, check what Content Type you are selecting in the view..it should appear in left hand side once you are in the view settings...you should be able to follow from there onwards...also, check what field you have added, if you haven't then add them of type content:node


How can I locate who took my money?

Question: Need help to try locate where my bitcoin went to. Was given a company wallet address to send my money to. I realise now I was scammed. Would you be able to help me locate exchange that my €5700 went to?
Answer: It is unlikely that anyone can help.
Anyone wanting to avoid being traced is likely to follow best-practise: Bitcoin addresses are only used once. transfers of money can be forwarded to other addresses owned by the scammer and can be forwarded through bitcoin mixers which make it pretty much impossible to follow where the money went.
You can type the address into a blockchain explorer but this doesn't help identify the person who controls that address.
As you know, Bitcoin is intended to be fairly anonymous. Just as it can be very hard to find out the names of all the people who have handled a $5 bill before or after you, even if you know the serial number printed on it. This is by design, for privacy.
If you are the victim of fraud, you should report it to your local police. Even if they cannot help you recover your money it helps them and politicians to be aware of the level of such crime and helps them decide whether more resources are needed.

Other web-pages that may be of interest (this is not an endorsement)

Where to report Bitcoin Scams

Update:
Oops, I see you asked the same question last year and got a good answer, voting to close as duplicate.

How can I locate who took my money?


What are the various forms of heteroscedasticity?

Question: Is this picture below indicating a form of heteroscedasticity? According to the definition of heteroscedasticity, heteroscedasticity exists when the variance is not the same. But here the variance is the same but the average increases.
Comment: Jdging variance from scatter plots is often difficult. In addition to edge problems as mentioned by @Glen_b, overplotted points can be consistent with inconstant variance, even when the pattern looks the same. You should calculate and plot variance too. All that said, your most obvious problem is the overall tilt of the residual plot. It appears also that you have many tied values in the response. For better advice, you would need to tell us much more about the data and your model, but you may be fitting a linear model when the observed response cannot be negative. Log or logit link?
Comment: The conditional variance is not constant at the left hand end of that display - between 0 and 0.05 on the x-axis the spread of the residuals increases quite clearly.
Answer: Non-constant variance in the residuals can arise as the result of different Gaussian violations. For example if the residual series has Pulses/Seasonal Pulses/Level Shifts or Local Time trends the variance of the errors can exhibit non-constancy. If there is auto-correlation in the residuals then this will lead to a non-constant error variance . If the model parameters vary over time this can lead to non-constant error variance. If the error variance is proportional to the expected value then this leas to non-constant error variance. If the error variance changes deterministically at different points in time this also is a de facto case of non-constant variance. If the variance of the errors can be represented by an ARIMA model this is also a case of non-const variance. The conclusion is that one needs to evaluate some of the alternative states-of-nature in order to determine that approach that is minimally sufficient. As @nick states one might need to actually have more information and nearly always in my opinion the raw data.
Comment: Glad we agree on the general points. This assumes that the data are time series; that is not mentioned either way. The Gaussian is unlikely to be a reference distribution for this thread as the data appear to be bounded as necessarily positive. Again, the absence of a full description inhibits a really good response.
Answer: The fact that your residuals are trending might suggest an issue of autocorrelation rather than heteroskedasticity (whether they are heteroskedastic or not, which they may well be and which could be tested by, say, White's test),


What should I do about a hole in my dryer hose?

Question: My cats tore a hole in our electric dryer vent hose, and I used the dryer to dry-clean a sweater using one of those sheets that you put in the dryer.
Now I'm really worried about the fumes in the house and how it will affect us.
I dried a couple of loads of clothes. I'm trying not to freak out!
Comment: The fumes from an electric dryer are not toxic. It is just warm air, and lint that is coming out. If it was a gas dryer, then I would be concerned. It definitely must be replaced regardless though.
Comment: My husband said the opening into the wall is not round , its oval , so can we still find a metal dryer vent to fit it at stores like Lowes / Home Depot ? We need to fix it asap so I can do these mountains of laundry and I don't want to worry about fire hazards ! Thanks so much for all your help .
Answer: If your cats tore a hole in it, it has to be flex hose.
Do yourself a huge favor and replace every inch of flex hose with solid metal dryer vent. Flex hose collects vast amounts of lint that get past the lint filer and is impossible to clean effectively (not to mention being delicate enough to be torn by cats.)
As a one-time event I would not be overly concerned about the dry-cleaning sheet. But I would definitely scrap the hose and replace it with solid metal before using the dryer again.
Comment: The elbows for solid metal can be adjusted by rotating the individual sections around. It's not very hard to make them line up, though it can be a bit tricky to figure out how they interact the first time.
Comment: How do you line up the dryer to connect to the dryer vent in the wall with solid metal dryer hose? I have always used flexible dryer hose and it never got plugged with lint. Our present washer and dryer are only 3 years old and two retired people in their 70s don't do a lot of laundry so I'm sure it is free, but still if there is a better alternative, I'm open to it.
Comment: I gotta go with jim on this one I use flex to be able to pull the dryer, I usually blow my hard pipe once a year and at that time I shake out the flex, even prior to doing this I never had an issue .with the short piece of flex.


Interrupting a connecting windows wsa socket

Question: I was just wondering if it is possible to interrupt call to windows socket "connect" function?
The problem is that my code requires that to be done in a different thread (so GUI thread keeps running). But when the programm is closed there my still be threads calling "connect" that are wating for a WSAETIMEDOUT exception.
Any ideas?
Update/Hint: i cant call close() since i only have a valid handle when connect() returns. the latter one is not the case when using blocking sockets and having a tcp-connect to a firewalled location (for example) :/
Answer: If the socket is in blocking mode, the only way to abort connect() call is to close the socket from a different thread context than the one that is calling connect().  connect() will return an error, and the thread can then exit itself normally.
If the socket is in non-blocking or overlapped mode, connect() will return immediately with a WSAEWOULDBLOCK error, and you then have to call select(), WSAAsyncSelect(FD_CONNECT), or WSAEventSelect(FD_CONNECT) to detect when the connection has been established before continuing with your socket work.  Since the calling thread is not blocked on connect(), it is free to periodically check for any termination/abort signals from the rest of your code, and if detected then close the socket (if needed) and exit itself normally.
If you write your socket code in non-blocking or overlapped mode, then you do not really need to use a thread.  You can do your socket work within the main thread without blocking your UI, then you can just close the socket when needed.  It takes a little more work to code that way, but it does work.  Or you can continue using a thread.  It will keep your socket code separate from your UI code and thus a bit more managable.
Comment: theres one big problem, i cant call close() since i dont hav any handle to operate on. i will only have this handle when the initial socket connect() call has terminated.

so its a chicken-egg problem here
Comment: You close the handle that was returned by `socket()`.  `connect()` takes an existing socket handle as input.  It does not return a new socket handle. So just make sure you store the socket handle from `socket()` in a place that both the connecting thread and the closing thread can reach.


Choosing the right email server

Question: My company is switching email servers and I wanted more input from people who know more about IT. We are a small company that would only have 7-8 users. We use MS outlook and need a compatible solution. Im not sure what server we are switching from but i have been looking at google apps. Exchange is a little more expensive but we are considering that as well. Any suggestions/ recommendations regarding these two or others????
Answer: Get exchange, hosted. Self-hosting is not cost efficient - it is a pretty big resource hog downscaling. 7-8 users put you around 120 USD per month, without any need to handle backups etc. And to have the know how - exchange is pretty complicated all in all.
Alternative - smartermail (http://www.smartertools.com/)
Google apps sucks for that - you WANT something that fully integrates outlook (2010 soon) AND allows smartphone integration. Exchange is a LOT better for companies - integrated timeplanner, contacts and all that also real time on phones. Push. There is a reason companies go for exchange. Plus, depending how much you install, it can read you emails over the phone and you can move appointments with voice control - nice if you are in a car ;)
Comment: Apps is a little cheaper. We may not really need to be able to change cal appointments over the phone, just basic email and calender use. In what ways is G-apps not compatible with outlook? Ive heard a couple of good things about smartermail as well, ill def check that out thanks>>>>
Comment: Not outlook. I personalyl can not really live anymore wihtout a decent smartphone - happens I travel a lot, and - well - the exchange/smartphone integration is terrific.
Comment: +1, definitely go external with a company that size.
Answer: Well, you're making a pretty broad request.  Without knowing exactly what you're company is doing and what sort of IT staff you have available to you, it's hard to make a good recommendation.  That said, here are a couple of things to consider.
Microsoft Small Business Server 2008
SBS2008 is an exceptionally good way to get a lot of MS technology at a fairly affordable price.  If you're already running a Windows Server, this can be purchased for not a lot more than Windows Server Standard.  Much of the administration can be handled through wizards and it offers office staff a means of accessing their desktops remotely.  In many ways, it provides a nice packaged solution for the most common tasks that small businesses have.  Assuming you're already using office (as evidenced by your Outlook comment), it could easily fit into what you've got now.
The major downside to Exchange is that you'll probably need someone to come into the company and help set it up.  Once it's configured, you probably won't have to mess with it a whole lot.
Google Apps
Google offers a lot of cool tools to people at low prices.  You're essentially paying a recurring monthly fee to outsource your software and services to them.  It does limit your ability to integrate Outlook and some third party tools/software but you also don't have the startup costs and issues.  If you're already office users, the differences may not be thrilling to your users though.
The major downside to Google is that you're giving up control of certain aspects of your IT infrastructure in exchange for less management on your side.
Answer: Zimbra is actually pretty good too and free depending on the number of users.  It works with smartphones / does a push and has a slick web interface as well
http://www.zimbra.com/
Answer: For a small company, let Google do the heavy lifting. They can handle it and free you up to handle more important things.
Answer: Zimbra all the way.  It's easy to configure, works with windows machines if you must us them and is powerful enough for us to use for 60 users.
Answer: Much of your decision must come down to the level of expertise available to support any in-house server. While I will always opt for self hosting, the very fact that you've asked the question suggests to me that you should be looking only at a hosted solution. The small number of staff you have just doesn't warrant the headaches and expense of doing it in-house. If possible try and get evaluation accounts for likely looking possibilities and give them a test drive. Make sure that whatever you choose has the features you really want.

Choosing the right email server


PostgreSQL efficient database structure

Question: I am scraping products from a website. Each product has a price history table that contains a historical price with the associated date and store name. I would like to store this information in a database (it will be used to create graphs for each product). I was thinking of creating two tables. One would be a Product table with a product_id column [PK] and name column. The other would be a Price History table with a product_id column [FK], price column, date column, and store column. Is there a more efficient structure I could adopt?
Comment: No, that is the correct set of tables to use given the use case you've described.
Comment: More efficient from what perspective?
Answer: If you need a relational structure (you intend to query PRODUCT_HISTORY), then what you described is the way to go.
If you want a more document-oriented structure (you never query PRODUCT_HISTORY and only work with it as part of Product), then you can turn it into a structure like JSON and store it directly in PRODUCTS table.
Answer: Your setup is a good option to do it. If you need more information about the stores (store name, street address, city etc), you could add table store with needed fields and have store_id in history table a FK to it.
Don't use spaces and capital letters in table names, your main table name could be for example price_history

PostgreSQL efficient database structure


Can black holes really evaporate?

Question: Stephen hawkings black hole evaporation theory assumes evaporation of black holes by losing mass through virtual particle radiation. As far as i know, the theory isn't based on mathematical foundations, assumes evaporation to take uncomprehensible number of years, no comment on the information lost to black hole and no comment on what happens inside. Despite all these, why people treat it like a Law of nature? Why black holes canNOT evaporate? Any counter argument/comment against stephen hawkings theory is especially welcome.
Comment: Related: https://physics.stackexchange.com/q/26605/2451 and links therein.
Comment: Welcome *New contributor* A. A.! I've downvoted your question for the "it is unclear" reason.  Much of your post seems to me to be on the 'rant' spectrum. It isn't clear what you're looking for with "Why black holes canNOT evaporate?"
Comment: Alfred Centauri i believe the question is quite clear. Maybe you are bored of physics that started to downvote questions
Comment: G.Smith and John Rennie, why did you tag the question as duplicate? I never asked an explanation into the theory. Maybe i should do the same with your questions. Then you'll be happy
Answer: Hawking radiation is theorized through the mathematical formalism of Quantum Field theory in Curved spacetime.
What is interesting about Hawking radiation is that it's a kinematic effect of General Relativity, not a dynamical one. This means that you don't need to have a full theory of a back-reacting quantum field and Einstein's Equations to derive Hawking radiation-a quantum field on a fixed Schwartzchild background is sufficient.
In fact, when you put a quantum (eg. phonon) field on a fluid background (eg. Bose-Einstein Condensate in certain regimes) with an event horizon (i.e. fluid flow faster than speed of sound), you get thermal radiation coming off the event horizon (Reference: 1809.00913). What this means is that the idea of Hawking radiation isn't unique to Quantum Field theory in Curved spacetime, but also shows up anytime there is an effective metric, as in certain hydrodynamic systems.
Comment: Pabetism thank you for the answer. I don't agree with you but that you have you used so many terms in your answer, it will take some time for me to give you a good answer. Till then.

Can black holes really evaporate?