How do you know if you are competent in your job?

Question: To my understanding, Buddhism teaches humility, humbleness. I am trying to practice this quality. But I have started to feel that no matter what I do, I am not good enough. How do you know whether you are competent in your job or not? Where is the root of this confusion?
Comment: Asking your boss? Who else would know whether good in reward of the given sacrifices or not?
Answer: Doing a good job starts with proper attention and words of another:

AN2.126:1.3: The words of another and proper attention.
AN2.126:1.4: These are the two conditions for the arising of right view."

Doing a good job, we ask questions:

AN3.20:6.2: It's when from time to time a mendicant goes up to those mendicants who are very learned—knowledgeable in the scriptures, who have memorized the teachings, the monastic law, and the outlines—and asks them questions:

Doing a good job, we work in harmony with others by practicing self-effacement:

MN8:12.1: Now, Cunda, you should work on self-effacement in each of the following ways.
MN8:12.2: 'Others will be cruel, but here we will not be cruel.'
MN8:12.3: 'Others will kill living creatures, but here we will not kill living creatures.'
MN8:12.4: 'Others will steal, but here we will not steal.'
MN8:12.5: 'Others will be unchaste, but here we will not be unchaste.'
MN8:12.6: 'Others will lie, but here we will not lie.'
(...omitted for brevity)

Doing a good job continuously requires proper attention:

DN34:1.2.17: What one thing leads to distinction?
DN34:1.2.18: Proper attention.

Doing the best job requires working to the benefit of all. Instead of asking "am I doing a good job?", we might ask "what work can I skillfully do now to benefit all?"

AN4.95:4.2: In the same way, the person who practices to benefit both themselves and others is the foremost, best, chief, highest, and finest of the four.
Comment: Thank you very much for the write up. I really appreciate it
Answer: I don't know about Tibetan Buddhism unfortunately.
To me, "Buddhism teaches humility, humbleness" means the following:

Beware (be aware of and avoid) the kind problems and behaviours described here: Wikipedia: Māna

Māna (Sanskrit, Pali; Tibetan: nga rgyal) is a Buddhist term that may be translated as "pride", "arrogance", or "conceit". It is defined as an inflated mind that makes whatever is suitable, such as wealth or learning, to be the foundation of pride. It creates the basis for disrespecting others and for the occurrence of suffering.

Apparently this is in the Theravada and Mahayana doctrines.

Conversely "beginner's mind" is seen as a virtue -- Wikipedia: Shoshin in Zen Buddhism

I've considered posting a question on this site to ask about "self-confidence" -- because that seems to me kind of necessary or helpful for working -- but I decided not to:

Theravada talks about "confidence in the Buddha, Dhamma, Sangha", and maybe that's "verified confidence" -- and perhaps that's enough, and is the right kind of confidence -- and what's called in the West "self"-confidence is not quite right
Theravada has related terms like Wikipedia: Vīrya -- which may be akin to self-confidence and are beneficial but which don't require any unwise reliance on "self"

This answer related to Tantrayāna (Tibetan Buddhism) perhaps suggests:

Something like confidence or self-confidence is indeed beneficial
It's something you can practice

Also as suggested in a comment, "ask your boss" is a partial answer (but not exclusively a Buddhist answer) -- whether you're (seen as) "good at your job" isn't entirely a matter of "self-evaluation" -- and might also be judged (subjectively) by other people who know your work, or judged (more objectively) by various more-or-less imperfect "performance metrics" defined by managers.

You might also set metrics for yourself -- "how well did I accomplish what I tried to do?" -- to the extent that you're a "manager"  of your own behaviour.
A more-explicitly Buddhist metric might be something like, "how much gap is there between what's wanted and what is/was" -- because the size of that gap might be a measure of "craving" and "suffering" and is what you're trying to minimise.
From a more Mahayana perspective a related question might (I'm not sure) be something like, "how skilfully, how effectively, did I behave with other people?"
Comment: I agree that's a related question but should have a different answer. May I ask you to post that as a [new question](https://buddhism.stackexchange.com/questions/ask)? Because its' difficult to answer using comments, and so that others may answer it too.
Comment: Thanks! My mum is here visiting so I'll try to answer next week.
Comment: Hi, Thank you so much for the write up. My question actually is from a student's perspective. A student who has no teacher (self-taught), how will he harvest the virtue of self-confidence. I am struggling to grasp how confidence can be considered a virtue. Could you suggest me any practice?
Comment: Hi, I have posted a question: https://buddhism.stackexchange.com/q/46147/17846 . I look forward to your response :)


Best way to solve Codeword puzzle

Question: I always find it hard to do codewords puzzles. Whenever I fill in all the spaces with the starting letters, it doesn't really help. I always end up looking at the answer sheet.
Does anybody know a good strategy for codewords?
Comment: Years ago I wrote a codeword *generator* program for a publishing house. They specifically asked for it to be configurable for any given puzzle, to maximise or minimise the number of times any given letter appeared in the grid. ***And*** that no puzzle should be "ambiguous" (as, for example, if the only instances of  the letters **K** and **L** were in a position where the word could be **KALE** or **LAKE**). My father used to do the Daily Mail codewords every day, but he *always* started by assuming the most common number must represent **E** (so he *hated* most puzzles made by my system! :)
Answer: Codeword puzzles are usually designed to have an approachable way of starting. (I am fairly sure it would be possible to make one that was solvable in principle but really hard to find one's way into, but the people who make them aren't aiming for that.) I think usually there is at least one word in the grid that (1) has one or more letters that are already known at the start and (2) has repeated instances of some other letter or letters that narrow down its options. Or else there's a word that has #1 as above and (2') at least one of those already-known letters is unusual and itself narrows things down a lot.
For instance, I just looked up a random Codeword puzzle available on the web, and it has starting letters D,L,Z and one of the words in the grid is --Z-D. There aren't a lot of posibilities for this; I see DAZED, FAZED, LAZED, RAZED; maybe FUZED in American English (but this is a UK newspaper so probably not). At any rate, that E is very likely and the A is quite likely.

Technique: spot a word with an unusual letter or letter-combination in it, think what possibilities there are for it, and try out some that seem likely.

At this point, the thing to do is to look at the grid and see whether there are words that become either easy or impossible if these guesses are right. If you're doing it online, you can put those guesses in and easily undo them if they turn out to be bad guesses. With pencil and paper, either do it in your head or write lightly and be prepared to erase.
With the puzzle I'm using as an example (I'm deliberately not linking to it because (1) I don't know whether it will be available online for ever and (2) the approach is the important thing rather than these details), if I enter the A and E, the next interesting things I find are D----EED, which seems like it should be very informative but nothing springs instantly to mind, and D-A-. The latter is interesting because we already have half the letters, and because when we have a vowel and a consonant with only one letter between them it's often quite restrictive. Here, the letter in between is probably E (impossible because we already have E), R (possible), or I or U. (Any others? Haven't thought too hard. We're just trying things out.) Let's try R first. Ah, that gives us the R of RAZED, which also tells us that a vowel will be no good so actually R is probably the only option.

Technique: places where it's impossible for vowels and consonants to alternate are often quite restrictive. Look at those.
Technique: when making a guess, look to see whether it interacts usefully with other words you've already got.

In my current example puzzle, this annoyingly still doesn't make anything super-obvious, but we now have -A-L-R as a word. Between L and R there needs to be a vowel; we already have E and it seems like O is the only possibility. TAILOR, SAILOR; anything else? Dunno, let's try putting in the O and the I, and see what happens.

Technique: between two consonants you often have to have a vowel; there aren't very many vowels so this is a useful constraint. (But be aware that consonant-triples are possible!)
Technique: the ends of words are sometimes more stereotyped than their beginnings, and may be useful places to look.

At this point I notice that there are some very long words in the puzzle. One of them is -LO-ALI-A-IO-. There's an obvious word to put here, but let's pretend I don't see that; at any rate, it seems like there's an obvious suffix: ATION. So put that in and see whether everything still makes sense. It does, and at this point in fact there are enough fairly obvious words that I'm pretty sure my guesses so far are good and I can solve the puzzle from here.

Technique: very long words can be quite restrictive.
Technique: look for likely suffixes. (And prefixes, but I think suffixes are commoner.)

It could happen, instead, that you get an obviously impossible situation. That means that one of your guesses was wrong. Pick whichever guess you were least confident about, and undo it or, probably better, replace it with your next-most-likely guess and see what happens.
How well any of these techniques work for you will depend on how good your vocabulary is and how good your brain is at answering questions like "are there any words matching these letters?". I don't think there's much I can do to help improve those :-), but solving Codeword puzzles probably helps at least a little bit with both.
Comment: With `--Z-D`, you can't have `DAZED` (since the leading `D` would be known).  This also eliminates `DOZED`.  `ADZED` and `OOZED` can be eliminated by similar reasoning.
Comment: True enough. (I was just documenting my thought processes as I went. I'm sure I missed a thing or two.)
Answer: My favourite CodeWord trick is to find several partial words with the same uncoded number, and this can often reveal the letter.
For example, say you have:

_EST, BE_T, _ICE

Each option has several words that fit:

best, gest, lest, nest, pest, rest, west
beat, beet, belt, bent, best
dice, lice, mice, nice, rice

and only _=N and _=L fit them all, which narrows it down a lot, and other clues often reveal the answer completely.
Answer: Once you've inserted all of the starting letters, I normally see if any of the words (or certain sub-strings of them) pop out to me. For example, given ----I-G, you can be confident that the penultimate letter is a N. Comparing words in the puzzle with common prefixes and suffixes often gives a few more letters.
Also, when checking a word, remember that double letters will be discernible since they are both clued with the same letter. If you ever find a letter, immediately fill in the other letters with the same number.
From there, your first priority is to get the common letters out of the way, in particular, the vowels. For larger grids, this can be done through frequency analysis. Count up the number of occurrences of each number. Suppose that the most prevalent numbers are 15 (24 occ.), 9 (17 occ.), and 26 (15 occ.) in a grid with just under 200 letters.
Since we expect e to be the most common letter, appearing 12% of the time, we could reasonably guess that 15=e. The next two letters, t and a, could be either way around, considering the small size of the sample, but you should be able to do it by looking at the board. Suppose one word is -IN*, where *=26. We would thus guess that 26=t.
Note that one source finds the most common letters in a codeword to be, in order, eairtonslcup.
Other than these strategies, trial and error can prove fruitful. In particular, short words can reveal possibilities, while longer words are useful for checking and eliminating the possibilities (since, while it is harder to think of words that fit, it is easier to verify that no word matches -n-at-e-n. If you find this difficult, use an online solver at first).
Try to forget about the uncommon letters until you have gotten a large chunk of the puzzle out of the way. Generally, they'll only appear in one position. Keep in mind which letters are left. When you get down to the last ten or so, I write them in a list beside the Codeword. Remember that these remaining letters are the only ones that you can insert.
If you run your mind through the options for a--t, it is useful to recall that u may be the only remaining vowel. Since three consonants in a row is unlikely in such a short word, we expect the u to be present, which almost instantaneously reveals two common options: aunt and abut.
My final piece of advice is to simply ensure that your vocabulary is up to scratch.
Good luck, and be persistent. The only way to improve at these puzzles is to practice.
Answer: I am not very good at word games. I regularly use a hand-held crossword solver to help me finish quick crosswords. (Forget about cryptic crosswords. Well, I did finish one, but it took me a week, and my evenings were completely free because I was on holiday [vacation] at the time.) I occasionally can use this for codewords as well, particularly if there are multiple starting letters in a single long word, which narrows down its output considerably. I still have to manually check for appropriately duplicate letters in the results though. (I also have to watch out with this particular model as it omits lots of standard endings, such as plurals, and its dictionary is not that large, and it uses -ize endings which are unhelpful when solving British codewords.)
When I get really stuck, then there's a website that can look up words based on the duplicate letters. This is really helpful not just for ensuring that letters are the same when they should be but also that they are different when they should be!
Answer: I start by looking for the numbers that appear most often. I then look to see which of those in the short list appear at the ends of words. That often (but not always) helps to identify the E.  (A frequent number that does not appear often at the end of a word may be an A, or sometimes an R,S,T etc.  If there's a problem distinguishing between an A and and E, look for "doubles" (EE).  AA is unlikely (exception: bazaar).
If really stuck there are two escape routes. The first is to try locating the combination (QU). That is occasionally possible by simple inspection, with one or generally no more Qs, with their following U. Many possibilities for Q can be eliminated (if the letter is no more than 2 at the end of a word. The combination -QUE is quite common on the end of  a word.  Last solution (time-consuming) is to make a list of all the numbers and count up the number of times they appear, and then try and decide if the most common are from the shortlist "ARIESTA" or similar. It's usually possible to pinpoint the QU from such a list, by looking at numbers that appear just once or at most twice.
I hope that helps. I've done scores, possibly hundreds of codewords, and using the above tricks only had to look up the answer (where supplied) on a single occasion. (No, I'd never dream of paying to access clues  over the phone...).

Best way to solve Codeword puzzle


Hyundai Santa Fe limited 2016

Question: The recommended tire size for my Santa Fe limited (2016) is 235/55 R19.
I have a set still as new 235/45 R19 tires.
Am I safe changing to the smaller size?
Answer: It's probably "safe" since the tire width (235) has not been changed.  But your speedometer and odometer will be off by quite a bit.
The 10% change in aspect ratio (55 minus 45) will amount in almost a 2" difference in diameter, and 46 more revolutions/mile - the increase is roughly a 6-7% error.  If the VSS "Vehicle speed sensor" is not separate from the transmission output speed sensor, this may also interfere with transmission shift points - in your case causing early "short" shifts.  If you are concerned about resale of the vehicle, know that you will be putting about 107 odometer miles on the vehicle for every 100 actual miles driven.
Sometimes there are ways to reprogram the sensors/instrument cluster/ECU to eliminate the error, but I'm not certain how to do it on a Santa Fe or if it's even possible.  It's certainly a "dealer" task.  I would inquire with the service department if it's even possible.  They may likely avoid the question and just tell you "not approved".
There are "in-between" boxes such as the "Yellow Box" which intercept the speed sensor signal and remodulate it so that it reads correctly.  Quite the hassle and expense for regular folk.
Depending on road conditions, you are also putting your [expensive] 19 inch rims at risk.  Potholes will have a lot more bite with the reduced sidewall height "cushion".
You will have to operate the engine at a 7% higher RPM in top gear cruise to achieve the same speed, resulting in increased engine wear.  Your fuel mileage will suffer as a result as well.
You will, however, have better torque and acceleration, if that's your thing...
Best of luck!
Comment: Thank you SteveRacer very much.
your answer is very detailed and very informative.
I am going to stick with 55 to be safe.

Hyundai Santa Fe limited 2016


Rushing water sound

Question: A sudden continuous water rushing sound coming from what appears to be from the water heater to the outside water pipe. Sounds like a fire hydrant was opened but no water entering the house. We have turned off the water supply valve awaiting plumber. Any suggestions as to what is happening?
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comment: Maybe including a few pictures of the areas in question would help.
Comment: Is the pipe you suspect the noise is coming from warm to the touch? Before you turned off the water did you have normal hot and cold water pressure at a nearby sink?
Answer: First, you should also turn off the gas or electricity to the water heater.  It shouldn't be heating if it is leaking or less than full.
Water heaters have a pressure and temperature relieve valve that looks like this:

Sometimes they are on the top, sometimes they are on the side.  It should have a pipe coming off of it going... somewhere.  Sometimes the pipe is tied into a drain line in the wall, and sometimes it's a separate drain that runs outside and drains on the ground.  If the water heater is in the garage, sometimes its not connected to anything (but it should be).
Anyway, when these fail, it normally starts to drip, but if it is plumbed into the house drain, you might not see anything.  They normally just drip, but its possible the valve has dripped for some time and has now failed so much that you can hear the water.  If that's the case, the pipe connected to it should be hot when water is flowing.
You might not be comfortable changing it yourself, but it's a relatively easy job and an inexpensive part.  They can get stuck, and the threads can be damaged and that can lead to replacing the heater, but usually thats not the case.  If that is the problem, a competent plumber should have it replaced quickly (should have the part on their truck).

Rushing water sound


Weird light fall of on spheres

Question: I've been experimenting with making planets in Blender with Cycles. However, I've run into this strange issue that I'm not even sure if it is an issue with the way that light is falling off of a sphere in Blender. I'm using a sun with a strength of 10. I've tried setting things up using just a blank sphere with no difference. I've also tried just starting over with no luck. I've messed with the max bounces, step size, and max step options. It seems as if these things aren't changing anything. Even if this is how it's supposed to work I would like to make the light fall-off more gradual. Especially in the render included, I think it really harms the look with the dramatic fall off. All hep is appreciated, thanks!
No atmosphere (Sorry I had to crop)

atmosphere
Comment: I can see nothing wrong abou that.
Answer: I find sun lamps to never be very realistic in many cases. Try swapping the sun lamp for a large (proportionally) area light. You might have to make it relatively powerful given the distance, but I think it gives a better look:

Weird light fall of on spheres


Can you run a VPN connection over HTTP?

Question: Is it possible to connect to a VPN Server having a tunnel over port 80, thus eliminating all the port blockings of a firewall?
Comment: which vpn server, pptp, opsenvpn, ipsec ... ?
Comment: Pick your poison, just want an explanation how it is done
Comment: Can you?  Possibly with OpenVPN. Should you?  Absolutely not - port 80 is a target for HTTP traffic on the universe and you may get some nasty evils that may break OpenVPN.  You really should not run VPNs on HTTP ports.
Comment: If your firewall uses DeepPacketInspection, you may want something that uses http like in question: http://serverfault.com/questions/163768/vpn-through-only-http/815723#815723
Comment: To counter @ThomasWard's point; You absolutely can run openvpn on port 80, without any trouble. Your server won't be able to serve HTTP traffic, but it's a great (and totally legit) way to get around draconian firewalls. Standard ports are just defaults, but there's nothing magic about them. Feel free to mix and match! OpenVPN can handle it.
Answer: Let's start. I preferOpenVPN solutions
OpenVPN Access Server supports a wide range of configurations, including secure remote access to internal network and/or private cloud network resources and applications with fine-grained access control. It has a mobile app for Android and iOS, so that you can access the VPN server from your smartphones too.
Install OpenVPN AS on Ubuntu/Debian
OpenVPN AS is quite easy to install and configure compared to other VPN servers.
Download the latest version of OpenVPN AS with the following commands.
wget http://swupdate.openvpn.org/as/openvpn-as-1.8.5-Ubuntu12.amd_64.deb

Install it with the following command:
xx@server1:~$ sudo dpkg -i openvpn-as-1.8.5-Ubuntu12.i386.deb
[sudo] password for xx:
 Selecting previously unselected package openvpn-as.
 (Reading database ... 53813 files and directories currently installed.)
 Unpacking openvpn-as (from openvpn-as-1.8.5-Ubuntu12.i386.deb) ...
 Setting up openvpn-as (1.8.5-Ubuntu12) ...
 The Access Server has been successfully installed in /usr/local/openvpn_as
 Configuration log file has been written to /usr/local/openvpn_as/init.log
 Please enter "passwd openvpn" to set the initial
 administrative password, then login as "openvpn" to continue
 configuration here: https://ip-address:943/admin
 To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool.

Access Server web UIs are available here:

Admin UI: https://ip-address:943/admin

Client UI: https://ip-address:943/

Now OpenVPN AS has been installed.
Setup OpenVPN Admin User and Password
During installation, a default Admin user called openvpn will be created by OpenVPN AS. Set the password for the user openvpn with the following command:
 xx@server1:~$ sudo passwd openvpn

Accessing Admin Web UI
You can access the OpenVPN Access Server Admin UI with the URL https://ip-address:943/admin/ from your browser. If you want to access it from your remote systems, allow the port 943 through your router/firewall.
A SSL warning message will appear, ignore the warning by click On the Proceed anyway button. You will be prompted to enter username and password. Enter openvpn as your username with password that you have created earlier.
After login click on Agree to accept the License Agreement.
Now you will able to access the OpenVPN Administration Console. In this Admin Console, you can do various VPN administration things. Go through every menu/tab and change the required values as per your liking, although default settings will work fine.
On the left panel on the page go to Server Network Settings.
Change TCP Port number to 80
Change UDP Port number to 80
Click save settings and on Update Running Server
This is it, our server running only on port 80 but use tcp and udp protocols.
Client setting
Create new user on sistem
 sudo useradd vpnvpn

do not use adduser because you not need /home/vpnvpn folder ...
Set passwd for user
 sudo passwd vpnvpn

Navigate to https://ip-address:943/ from your browser and login with OpenVPN with u: vpnvpn and p: vpnvpn
On new page go to link on it Yourself (user-locked profile). You will download client.ovpn
Install openvpn package in your client system:
yy@yy:~$ sudo apt-get install openvpn

Now connect to VPN server with following command:
yy@yy:~$ sudo openvpn --config Downloads/client.ovpn
 Thu Jun 27 11:36:43 2013 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Feb 13 2013
Enter Auth Username:vpnvpn
Enter Auth Password:
 Thu Jun 27 11:36:50 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
 Thu Jun 27 11:36:50 2013 Control Channel Authentication: tls-auth using INLINE static key file
  -- omitted the rest --

End. You have vpn server on port 80
On admin you can change a lot of parameters aka network range, routing, etc.
Answer: SoftEther VPN runs its VPN protocol over HTTP/HTTPS, specifically so you can tunnel through proxy firewalls that only pass well-formed HTTP traffic. I think that this is what you want.
OpenVPN can be configured to camaflogue its traffic over HTTP, but in practice this can be hard to do. (I do not think that @2707974's answer will get you there; you need to add the http-proxy configuration as documented on the OpenVPN site.)

Can you run a VPN connection over HTTP?


UIActionSheet taking long time to respond

Question: I am creating a UIActionSheet on actionSheet:clickedButtonAtIndex delegate method.
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
 if(buttonIndex == 1){

        [self.myFirstView removeFromSuperview];

        if (!self.mySecondView) {
            [[NSBundle mainBundle] loadNibNamed:@"MySecondView" owner:self options:nil];
        }
        [self.mySecondView setFrame:CGRectMake(0, 0, 320, 480)];

        [[UIApplication sharedApplication].keyWindow addSubview: self.mySecondView];

        UIActionSheet * action = [[UIActionSheet alloc]initWithTitle:@""
                                                            delegate:self
                                                   cancelButtonTitle: nil
                                              destructiveButtonTitle: deleteContacts
                                                   otherButtonTitles: cancel, nil];
        action.tag = 102;
        [action showInView:self.view];
        [action release];

    }

I handle the click event of this UIActionSheet in the exact same method as above.
if(actionSheet.tag == 102){

    if(buttonIndex == 0){
        if([[NSBundle mainBundle] loadNibNamed:@"MyThirdView" owner:self options:nil]) {
            [self.myThirdView setFrame:CGRectMake(0, 0, 320, 480)];
            [[UIApplication sharedApplication].keyWindow addSubview:self.myThirdView];
        }
        [self.mySecondView removeFromSuperview];

        [self.doneButton.target performSelector:self.doneButton.action withObject:self.doneButton.target];

        [self performSelector:@selector(RemoveView) withObject:self afterDelay:3.0];

    }
}

The problem I am facing is that, the UIActionSheet takes too much time to respond. When I click on the UIActionSheet button, its in a frozen state for 2 or 3 seconds, before myThirdView loads. I am not able to understand, whats the response delay in this case as the first thing I do in the UIActionSheet button click event method is to load myThirdView. The rest of the code is executed only after the code to load the myThirdView. But even the first line of code seems to execute after a delay.
Any suggestions?
Comment: does it work when you change `[action showInView:self.view];` to `[action showInView:self.mySecondView];` ?
Comment: It works. But no significant change in response speed of action sheet.
Comment: I think the right answer should be combining the answers of The Saad and Andrew Zimmer. The code that should be running on the background thread is this line of code `[self.doneButton.target performSelector:self.doneButton.action withObject:self.doneButton];`. The rest of the code including the `RemoveView` method should be running on the main thread. Special mention to Gabriel for simulating a button touch action.
Comment: First, I'm an anti-ARC coder myself, so I have some tips. Second, I'm kinda edgy about the way you wrote navigation, it looks messy but I can't give any suggestions with this minimal viewpoint. Tiptime: 1st, breakpoints to see what thread stuff is happening with. 2: performSelectorOnMainThread instead of performSelector. 3: Don't release the UIActionSheet until after callbacks are executed. 4: Ensure "self" still exists. 5: use breakpoints and step-thru to measure speed of handling functions
Answer: this is perhaps due to this
[self performSelector:@selector(RemoveView) withObject:self afterDelay:3.0];

make an other methods and do this in that method. like this
[self viewRemover];

and in viewRemover
-(void) viewRemover
{
    [self performSelector:@selector(RemoveView) withObject:self afterDelay:3.0];

}

so your code will be like this now
if(actionSheet.tag == 102){

    if(buttonIndex == 0){
        if([[NSBundle mainBundle] loadNibNamed:@"MyThirdView" owner:self options:nil]) {
            [self.myThirdView setFrame:CGRectMake(0, 0, 320, 480)];
            [[UIApplication sharedApplication].keyWindow addSubview:self.myThirdView];
        }
        [self.mySecondView removeFromSuperview];

        [self.doneButton.target performSelector:self.doneButton.action withObject:self.doneButton.target];

    [self performSelectorInBackground:@selector(viewRemover) withObject:nil];

    }
}

Comment: Oh and btw, if viewRemover is editing visible objects on the screen, DON'T do it in a background thread. This causes intermittent problems, not fun to debug.
Comment: While debugging, the control doesn't enter the RemoveView method. Maybe it has something to do with `withObject:nil` in `self performSelectorInBackground`. Anyways the delay problem is still not sorted.
Answer: User interface actions run in the main thread and only occur when your method ends. So, MyThirdView will not appear until the other instructions have finished. The only thing I can figure is delaying that is:
[self.doneButton.target performSelector:self.doneButton.action withObject:self.doneButton.target];

If you are doing any heavy calculation or net conection, for sure that is the reason.
OTOH, I think you'd better modify that line:
[self.doneButton.target performSelector:self.doneButton.action withObject:self.doneButton];

if you want to simulate a button touch action.
Comment: No significant difference made.
Answer: Question.  Does the UIActionSheet freeze, or does it disappear and the 3rd view isn't visible for 2-3 seconds?
This could be due to 1 of 2 problems.

If the entire action sheet freezes, then you are doing some heavy lifting when you init that 3rd view, you are loading some core data, or a lot of assets, or something that is taking a long time.   If this is the case, you'll need to reformat HOW you load that 3rd view.  I'd suggest pushing any heavy loading to the background (this means if you have a lot of images in your xib, you may need to load them in code).
The other possibility, is you are adding the 3rd view BELOW the 2nd view, and then not hiding the 2nd view for 3 seconds (done by performing the selector with a delay). If this is the case, simply remove the delay.

I made a couple of classes to help me time executions and find the bottlenecks in my code, it seems like they might help you now.
http://forrst.com/posts/Code_Execution_Timer_for_iOS_Development-dSJ
Answer: How big is your third view. if the nib file needs to load too much, you may be waiting for a lot to happen, also if you have to change some UI elements and your blocking the UI thread, you will hault your app until a timeout occurs and the app will shift some things to compensate..
the route I take with this is dispatch_async and dispatch_sync
// This will release the UI thread which may be blocking your calls.
// You can use any of the DISPATCH_QUEUE_PRIORITY_.... values to set how important this block is.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
    // this command will get added to the stack and return without a hitch.
    // the block will be run the next time the main runloop ends.
    dispatch_async(dispatch_get_main_queue(), ^{
        // do some UI work that can happen without a hitch, and does not impact the calling block
    });

    // this command will act much the same. but will pause the background execution
    // of this block until the runloop has executed this and returned.
    dispatch_sync(dispatch_get_main_queue(), ^{
        // do some UI work that must be completed to continue.
    });

});

doing too much in the UI thread will pause the execution of things that get stacked on the queue. Shipping all code to the background thread and only skipping to the UI thread when you need to alter the UI is a better and more responsive way to code your iphone app.
I hope this helps :)
Comment: This block of code has been a life saver for me.  MAKE SURE TO NOT PASS AUTORELEASE OBJECTS TO IT.  Since it's a block, sometimes you feel like you can.
Comment: I am currently using arc. But I believe the block retains and releases the objects it has a hold on all by itself. Does it not ??
Comment: I'm not sure if it does when you are using ARC, so you might be fine.  Passing autoreleased objects between threads is rather disastrous if you aren't on ARC though. I've been burned by this in the past.
Comment: but a block is not quite a thread. the block freezes the current objects that are used across them. handling the retain and release itself. using dispatch you should be ok. as long as the block is created while the objects are still alive.
Comment: Hmm, looking elsewhere it seems that you are correct. I wonder what cause all those object released crashes.. Maybe because the object was outside of the scope of the method?

Related: http://stackoverflow.com/questions/4983729/multithreading-and-autorelease-pool
Answer: in Swift 4:
I wrapped the code with this block
DispatchQueue.main.async {

// your code to show action sheet.

}

for example
DispatchQueue.main.async {

            let alert = UIAlertController(title: "Options", message: String("What do want to do?"), preferredStyle: UIAlertController.Style.actionSheet)

            alert.addAction(UIAlertAction(title: "Open", style: UIAlertAction.Style.default, handler: {(action:UIAlertAction!) in
                self.myOpen(code: self.codes[indexPath.row])
            }))
            alert.addAction(UIAlertAction(title: "Delete", style: UIAlertAction.Style.default, handler: {(action:UIAlertAction!) in
                self.myDelete(indexPath: indexPath)
            }))
            alert.addAction(UIAlertAction(title: "Cancel", style: UIAlertAction.Style.default, handler: {(action:UIAlertAction!) in
                print("Cancel")
            }))

            self.present(alert, animated: true, completion: nil)

        }


How to quickly revoke all titles?

Question: This is more of a how-to-use-the-interface question. I am a nomad and have just won subjugation of Arabian empire. For some (to me unfathomable) reason, all vassals of the previous ruler become my vassals. Since clan leaders don't get upset about revoking titles, I want to revoke every single title in the Arabian empire (including baronies, mosques and cities). That sounds like a lot of clicking though. Is there any way to do this quickly?
Comment: It'll get more interesting when you try to revoke all those titles...
Comment: PS. Playing as a nomad seems very easy compared to other types of government. Maybe that's the point but I would expect them to have more trouble in places where it's hard to either feed or move a very large number of horses (such as forested northern Europe).
Answer: There's a warning shown while game is loading...Choose your Casus Belli wisely. You must have chosen a casus belli which retains the vassals of enemy in case of your victory. I have the horselord DLC but I haven't yet played it (Just had a test run, didn't quite like it). Anyways, to answer your question, no you can't just do that.
You either have to manually revoke all the titles. Or you could write a custom event which would be triggered as a result of a successful invasion to revoke titles of all vassals which are not from your culture group (Which would be your newly conquered vassals, to be precise but I am not sure if it is possible to revoke ALL titles held by a vassal. Event could work for primary title at least). But that would be modding. In original game, nopes, you can't.

How to quickly revoke all titles?


How do I remove the T shaped metal device that is holding my fluorescent ballast cover on?

Question: I'm trying to take the cover off of my fluorescent fixture, but I can't seem to figure out this fastener. I've tried rotating it to no effect.
Comment: You might want to replace that broken lamp holder before something ugly happens.
Answer: Turn it 90 degrees and it will release same with the one at the other end if it has one.
Answer: Turn it 90 degrees.
As you turn it, you'll find one position is more relaxed (sloppy) than the other.   That is the release position.   It goes into an oval hole in the upper part.
It may take some rattling to get it to let loose, or possibly prying.  Sometimes the leaky tar from the ballast glues the lid on.
Those lampholders are done for.  The one is broken, but most likely the plastic is fatigued on all of them and they are all fragile.  That's a standard lampholder type and they cost as little as 60 cents apiece at 1000bulbs.com.  That's a normal/tall type intended for T12 bulbs, if you're switching to T8 you can stay with those or use the shorter ones.  If you're going LED or rapid/programmed start ballast, remember to get non-shunted type.
Honestly I think the best light available today is actual fluorescent tubes, driven by an electronic ballast, either the T8 90+ CRI (at your choice of color temp). Or the T12 98 CRI type.
Answer: Rotating it into alignment (quarter turn) is the normal procedure.
If it still won't come off, then just use a screwdriver in the center to pry with.
They are made to be able to snap into place even when not aligned and the screwdriver can bring the two sides together enough to pop it out.  It is made of spring steel so you are unlikely to break it.


Will SoftkeyZ Root app work on the device Yureka out of the box?

Question: Softkeyz is a root app. Yureka runs CyanogenMod out of the box but I don't know if it's rooted or not. Is it safe to install softkeyz root app and use it?
Answer: First of all, there is a glaring error in the question which needs to be removed. Yu Yureka doesn't come with Cyanogenmod (CM; a community ROM) but with Cyanogen OS (COS12) which is a stripped out CM12 ROM meant to suit the needs of an OEM (a commercial software). Read this XDA thread for more.
As one would expect, COS12 doesn't come with su binary or a superuser app. In simpler terms, NO, your device isn't rooted yet. You can verify this with any root checker app and they should give you negative result.

Is it safe to install softkeyz root app and use it?

The app has full network access (read: can connect to Internet and send or receive data) and has access to your storage (ability to read or modify your data). Besides, it needs superusers access as well.
If the app isn't open source and and its source independently verified by people, I say your part of question is speculative since there is not much can be said with surety.
Coming to the point of this app's usage, if your need is to get the navigational bar then why bother installing a third-party  app. Cyanogen OS comes with in-built navigational bar (yes, those virtual buttons at the bottom of screen). Simply go to Settings -> Buttons -> Enable on-screen navigational bar. Done. You can somewhat modify the buttons as the other answer by Sonickyle27 noted.
Otherwise, setup ADB in PC, enable USB debugging in device, connect the device into PC, open a CMD/Terminal and enter:
adb shell settings put secure dev_force_show_navbar 1

This would enable on-screen navigational bar. Change 1 to 0 to disable it.
Answer: CyanogenMod comes with root support, however it needs to be enabled first from the settings app in the developer options section.
Also, CyanogenMod cones with the ability to modify the navigation bar already, unless you are talking about modifying the actions of physical navigation buttons, then you'll need the Softkeyz app.


Regarding creating a data set in accordance with a given data format

Question: I am learning to use topicmodels package and R as well, and explored one of its example data set by using

str(testdata)
'data.frame':   3104 obs. of  5 variables:
$ Article_ID: int  41246 41257 41268 41279 41290 41302 41314 41333 41344 41355 ...
$ Date      : chr  "1-Jan-96" "2-Jan-96" "3-Jan-96" "4-Jan-96" ...
$ Title     : chr  "Nation's Smaller Jails Struggle To Cope With Surge in Inmates" "FEDERAL IMPASSE SADDLING STATES WITH INDECISION" "Long, Costly Prelude Does Little To Alter Plot of Presidential Race" "Top Leader of the Bosnian Serbs Now Under Attack From Within" ...
$ Subject   : chr  "Jails overwhelmed with hardened criminals" "Federal budget impasse affect on states" "Contenders for 1996 Presedential elections" "Bosnian Serb leader criticized from within" ...
$ Topic.Code: int  12 20 20 19 1 19 1 1 20 15 ...

If I want to create a data set according to the above format in R, how to do that?
Comment: Not sure I understand your question... the data set is right there.  `head(testdata)` will show you its first few rows.  If you're wanting to see its string representation, `?dput`. Or you can write it out to disk with `write.table`.
Comment: @user288609: Do you now know enough about SO and R that you can either clarify your question, accept my answer, or delete your question? Thanks.
Answer: test.data is a data.frame, one of the few fundamental R objects. You should probably start here: http://cran.r-project.org/doc/manuals/R-intro.pdf.
Some functions for creating data.frames are data.frame, read.table, read.csv. For each of these you can access their documentation by typing ?data.frame for example. Good luck.


Photoeffect with relativistic electrons

Question: I know that general relationship between the frequency $f$ of the photon, the potential $U$ and thw work function $\phi$ is given by:
$$eU=hf-\phi$$
I wondered if this relationship would be still true if we accounted for relativistic electrons? I'm sadly not that strong in speical relativity and searching on the web for this question doesn't give me a result which I can understand. It would be awesome if someone with a bit more knowledge on the subject could give me some thoughts.
Comment: Interesting questions. Does the is get close https://physics.stackexchange.com/questions/502393/covariant-relativistic-photoelectric-effect
Answer: The relationship would be very similar. The only difference is that you have to consider the conservation of the 4-momentum instead of the classical conservation of energy.
Note that in order to have a relativistic outcoming electron the energy of the incoming photon has to be in order of $\sim 30 keV$. This means that those photons are in the range of X-Rays. At those energies the cross section of the photoelectric process is much lower than the Compton cross section meaning that this process would be much more likely to happen.
If we consider the typical energies of the photoelectric effect (UB photons are around 3-4 eV) and the typical work function of metals (few eV) the kinetic energy of the electron extracted is in the order of few eV meaning that the electron is not relativistic. You could still use the relativistic formula but you would have a very small correction (less than 1‰)

Photoeffect with relativistic electrons


Using a 2TB SSD on a 2016 MacBook Pro

Question: My MacBook Pro was filled up by old iPhone backups. I need to clear them up before I can use it to do backup for the 4th phone of my family. I found I had a 2 TB external SSD and tried to copy things on it but failed. The system said the SSD was read-only. Disk utilities said the 2 TB SSD was formatted in NTFS format. Was that the reason that my MacBook Pro refuses to copy things onto it? Do I need to reformat that into Mac format, but was there a 3rd solution that I can share the SSD among my computers?
Comment: If you want to spend a little bit of money to solve this, Paragon has a NTFS driver for MacOS:  https://www.paragon-software.com/home/ntfs-mac/
Comment: Careful. There's not a lot of options if you want to have your mac write to a disk that other operating systems can read (there's no overlap in compatibility between Linux or Windows except exFAT). If practical you may be better off using SFTP (set up a server on one of your other PCs, or a spare PC sitting around), or cloud file storage (Google Drive, Github/Gitlab etc.). I personally would not trust third party filesystem drivers for critical data.
Comment: That is a job for multiple partitions.  All my USB sticks have a small partition that is FAT32.
Comment: If I had the ability, I wish to build a distributed system among my home, my sister-in-law's home and my mother's home. I wish to build a compact system like the top box of cable TV systems. When I was still young, my mother refused my proposal for afraid of "burning down her home".
Comment: I just found the Paragon NTFS driver is in fact an affordable solution, as compared to the price of the portable hard drive. I will try to clear up my computer before trying. Thanks a lot!
Comment: But ultimately I bought a NAS server several months ago, with four pieces of 2TB HDD. That might be another better solution.
Answer: macOS is able to read NTFS by default, but it doesn't come with write support. There are third-party solutions for that, like NTFS-3G (there are multiple questions dealing with this product here on Apple.SE).
If you are using this SSD only on your Mac, using NTFS would be a poor solution (performance, feature support). Instead, just reformat the SSD with APFS.
For pure data transfer, another option would be to format the disk with exFAT which has read and write support natively on both Windows and macOS. This filesystem is lacking features you would expect on a modern system, but if all you want is transfer images, videos, ZIPs, and the like, it is sufficient.
Comment: FAT32 is an outdated suggestion at this point. exFAT has all the benefits of FAT32, with none of its drawbacks. The only downside to exFAT is that not all older devices like game consoles support it, but if you're talking Mac and PC cross use it's the best.
Comment: To add, note that one of the main practical limitations of FAT32 is the maximum file size of 4GB. This can become a serious problem when you want to use the drive for transferring large video files.
Comment: @Logarr: Thanks, you're right. I've updated the answer. The comment from Emil has the main point why exFAT is better than FAT32 (no 4GB limit).
Answer: You could try shrinking the partition containing NTFS volume and create a new FAT32 writable volume in the free space. To do this, you would need either a computer with Windows installed or your existing Mac. Do to this with your existing Mac, you would have to use the Boot Camp Assistant to make a bootable Windows 10 USB flash drive installer. Instead of installing Windows, you would boot from this installer, open a Command Prompt window and use the diskpart command to shrink the NTFS volume and create the new writable volume. If you want the new volume to be ExFAT or Mac OS Extended (Journaled) format, then you would have to erase the new FAT32 volume from macOS using either diskutil or the Disk Utility.
Comment: Just FYI, FAT32 has some very harsh limitations, [max file size: 4 GB](https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits). I'd only use FAT32 for interfacing with older devices these days.

Using a 2TB SSD on a 2016 MacBook Pro


Fundamental group of $S^2\cup\{xyz = 0\}$

Question: We want to compute the fundamental group of $S^2 \cup \{xyz=0\}$. It is easy to see that it retracts to a sphere joined with three disks. How can I show that its fundamental group is trivial?
Comment: How **exactly** is that sphere "joined" with three disks? Where are the disks "joined" to the sphere...?
Comment: The three disks are the coordinate disks joined to the sphere in the points $(1,0,0)$, $(-1,0,0)$ and so on...
Comment: "Coordinate disks"? I don't think that even means anything. What you do can do is to shrink each coordinate *plane* to a unit circle around the unit sphere, so that we'd have the sphere and three disks around *and inside* it. You though don't need to shrink the coordinate planes...
Answer: Note that
\begin{align*}
&\ \{(x, y, z) \in \mathbb{R}^3 \mid xyz = 0\}\\
=&\, \underbrace{\{(x, y, z) \in \mathbb{R}^3 \mid x = 0\}}_{yz-\text{plane}}\cup\underbrace{\{(x, y, z) \in \mathbb{R}^3 \mid y = 0\}}_{xz-\text{plane}}\cup\underbrace{\{(x, y, z) \in \mathbb{R}^3 \mid z = 0\}}_{xy-\text{plane}}.
\end{align*}
So the space you are interested in, call it $X$, is the union of the unit sphere and the three coordinate planes. You can use the Seifert-van Kampen Theorem by choosing one set, $U$, to be a connected open neighbourhood of the three planes, and the other, $V$, to be a connected open neighbourhood of the sphere; $U\cap V$ is an open neigbourhood of three great circles on $S^2$ which, if $U$ and $V$ are chosen correctly, is also connected. However, $U$ is contractible (again, if chosen correctly), so it has trivial fundamental group and therefore $X$ has trivial fundamental group.
An explicit choice of suitable $U$ and $V$ is as follows:
\begin{align*}
U &= \{(x, y, z) \in X \mid |x| < 0.1, |y| < 0.1,\ \text{or}\ |z| < 0.1\}\\
V &= \{(x, y, z) \in X \mid 0.9 < \|(x, y, z)\| < 1.1\}.
\end{align*}
Alternatively, by 'shrinking' the planes to the origin, one can see that $X$ is homotopy equivalent to a bouquet of eight spheres (i.e. a wedge product of eight copies of $S^2$). It follows from the Seifert-van Kampen Theorem that $\pi_1(Y\vee Z) = \pi_1(Y)*\pi_1(Z)$, so $X$ is simply connected (i.e. has trivial fundamental group).


Two accounts; up voting from one to another

Question: I have to accounts on this site( from two different addresses of course) ; am I able to use one to up vote the others Q's or A's
Comment: That happened to me. You should merge the accounts - SE staff can do that for you. See StackExchange FAQ.
Answer: Definitely not. Doing so is likely to get your accounts suspended and all the votes undone.
This is known around here as sockpuppetry. Read here about SE's policy on the matter. Note especially the "rule of thumb" for what you can't use your second account to do:

if the second account allows you to do something on the site that your normal account would be prevented from doing, it is abuse.

Basically, don't use your new account to circumvent any regular rules, such as not being able to vote on your own posts. If you stick to that then we'll leave you alone.


Resizing columns in adobe flex AdvancedDataGrid

Question: I'm using an AdvancedDataGrid without the header row (AdvancedDataGrid.showHeaders="false"), my AdvancedDataGrid has 2 columns, where the first one will show a hierarchical data (tree).
The tree may be very long and very deep or may contain a long string in the node label so the user will not be able to see the whole vale of the tree node, I want to be able to resize the column using the vertical separator of the gris (the one displayed/separates between columns) or to be able to define a horizontal scroll bar only for the first column!
How can I accomplish this?!....Any idea ?!
Answer: Try to set the Advanced Datagrid tag's attribute 'wordWrap="true"'.


Fill a hole in a donut

Question: I am trying to make a donut and I created this hole - how can I fill it up?
Comment: Hey , no problem. The only issue this introduces though, is that I can see you're using a Subdivision Surface modifier, which generally benefits from fewer subdivisions, instead of more as we introduced here.  You might now find that some of the sides of your donut are more "blocky" than intended. A better solution perhaps , is to un-subdivide the icing, but that is a slightly more involved process, possibly involving "separating" the icing into its own object, using a Decimate Modifier Set to "Unsubdivide" (2 iterations), and then joining it back up again. It's up to you what looks best.
Comment: Your connection will not be ideal unless the two "sides" have the same number of subdivisions (ie all the points on the "icing" have their own point to connect to on the donut.) Select all the faces on the bottom part of your mesh (large squares) and press right-click then select "subdivide. once that's done, you should be able to select the top and bottom "edges" of the "hole", right click and select "bridge edge loops".
Comment: Very helpful - thank you :)
Answer: Just click the polygons around the hole and press F
Comment: Hi, thanks for the post. This site is not a regular forum, answers should be substantial and thoroughly explain the solution and required workflow. One liners and short tips rarely make for a good answer. If you can [edit] your post and provide some more details about the procedure and why it works feel free to restore it, otherwise it may be deleted or converted into a comment. Perhaps add a few [images](https://blender.meta.stackexchange.com/questions/963) illustrating the workflow and final results. See [How do I write a good answer?](https://blender.stackexchange.com/help/how-to-answer)

Fill a hole in a donut


What is the correct MSD function for a biased random walk on a triangular grid?

Question: I am trying to determine the mean squared displacement $\langle r^2\rangle$ as a function of time for a discrete random walk process on a triangular grid, where each step is of size $\ell$ over a time $\tau$. For each step, there is one of six possible points to move to, with a probability of $p_n$ to move at an angle of $(n-1)\cdot \pi/3$, $n\in\{1,2,3,4,5,6\}$. The probabilities are not equal in general, but of course, they must add up to $1$.
I am getting a familiar form of $\langle r^2\rangle$ as$^{*}$ $$\langle r^2\rangle=\left(4D-v^2\tau \right)t+v^2t^2$$
where $D=\ell^2/4\tau$, and the vector $\mathbf v$ as $$
\mathbf v=\frac{\ell}{\tau}\left[\begin{matrix}
(p_1-p_4)+\frac12(p_2-p_5)+\frac12(p_6-p_3) \\
\frac{\sqrt{3}}{2}(p_2-p_5)+\frac{\sqrt{3}}{2}(p_3-p_6) \\
\end{matrix}\right]
$$
The fact that I end up with a $\langle r^2\rangle$ equation similar to what I have seen in the simpler case of a random walk on a square grid gives me hope that I am on the right track here. However, when I try to simulate this process$^{**}$, the $\langle r^2\rangle$ function from the simulated random walk is always less than the theoretical computation as outlined above and in the footnotes.
So then, am I missing a crucial step, assumption, method, etc. here? Are there any references where something similar has been looked at? References I have found so far are either way over my head, or do not look specifically at this question in the context of random walks on a triangular grid.

$^*$I obtain this form by following similar steps to those in slides 7 and 10 of this presentation. Basically, 1) directly deriving $\langle r^2\rangle$ in terms of the probabilities, and 2) then using a "master" equation to determine a convection-diffusion partial differential equation that defines what $D$ and $\mathbf v$ are in terms of the probabilities. In the latter step, in order to remove a $\frac{\partial^2}{\partial x\partial y}$ term, it must be the case that $p_2+p_5=p_3+p_6$. Then, in order to give the $\frac{\partial^2}{\partial x^2}$ and $\frac{\partial^2}{\partial y^2}$ terms equal "weight", it must be that $p_1+p_4$ is equal to the previous two probability sums as well (such that now each sum must be equal to $1/3$). So then at each step there is an equal probability for one of the three possible directions of motion, and then there is bias from there depending on the direction of $\mathbf v$ for which way the step goes along that direction.
$^{**}$ My simulation actually uses a set $\mathbf v$ magnitude and a randomly chosen $\mathbf v$ direction, and then determines what the probabilities need to be in order to achieve that. Since those are not enough to specify all probabilities (the directions of motion are not linearly independent), I have chosen to force $p_1=p_4=1/6$.
Answer: The presentation link is broken, but I am still able to independently verify quite a bit.
Sanity checks:

Dimensional analysis checks out
Extreme/particular cases check out (when $p_1=1$ or all $p_n$ are equal give expected correct results)

Experimental data from my own hand-written code shows that for $l=1$ and $\tau=1$ the results are mostly likely correct and reasonable.
This leads me to believe there is a probably a bug in the code rather than your math, unless it was something silly involving $l$ and $\tau$. Can you confirm that everything works when $l=1$ and $\tau=1$? Can you share any specific runs that break, providing the corresponding $\textbf{v}$ and $p_n$ values from your simulation? We can check if your data matches mine.


Wireless AP on different routers

Question: I have a Linksys WAG320N Wireless N router and a Belkin Wireless N router. The Linksys is acting as a modem and DHCP server, and I want to set up the Belkin as an AP. Is there any reason this shouldn't be possible? Am I right in thinking it's a case of connecting the two routers via ethernet and setting up the Belkin as an AP only and giving it a static IP? Do I need to set up the Belkin with the same wireless settings or is there a way to mirror them automatically?
Answer: You will have to set the Belkin to act as an access point - it's important to disable the DHCP server on the belkin because if there are 2 DHCP servers operating on the same network, you will have conflicts. also important to set the belkin ap with an ip that is in the range of the other router/modem and configure the linksys to reserve an IP for the belkin - this can be done by going to DHCP reservations and adding the MAC address of the belkin. In this way you can control all the IP pool on the network from the DHCP server on the Linksys
Answer: I'll just trot out the line from the FaQ: Server Fault is for system administrators and desktop support professionals, people who manage or maintain computers in a professional capacity. If your question is not about <snip> Networking outside the professional workplace then you're in the right place. So, if this is a home network please say so where it can be migrated to SuperUser when home networking topics are more suited. If this is a workplace network I'd think about something a bit more robost than SOHO routers and basic equpiment (budget pending, naturally).

Saying that, what you want to do should be fine. The Linksys router, acting as the DHCP server and gateway could be on 192.168.1.1, and then the Belkin could be set on a static IP of 192.168.1.2 (bearning in mind you'll have to change the DHCP server to start handing out addresses from 1.3 rather than 1.2 to avoid problems. Typically, when two wireless networks with the same SSID are in range it should act as a fail-over (or so I understand it anyway) but I don't know if something so basic would support "roaming" access, that is, automatically switch between the strongest signals rather than loose access.
The best way, really, is back up the configuration of your hardware, and give it a go.

Wireless AP on different routers


should I store common data between two tables in a third separate table in my database?

Question: If I have 2 tables in my database, let's say for instance 'buyers' and 'sellers' but I collect a common set of data for both for instance telephone number, email address, address etc. Is it  better practice to have one common table for 'contact_details' with a reference to the table and row that the contact details are for, or as they are seperate entities are they better off in seperate tables entirely?
Answer: If 'buyers' and 'sellers' share a lot of data, maybe they're actually just 'contacts', with associated contact information. Whether each contact is a buyer or seller would depend how they were used.
For example, you might have both 'sales' and a 'purchases' table. Each would have a 'contact_id' column, that linked to the primary key in the 'contacts' table.
Answer: I would suggest three tables: contacts, buyers and sellers. All of the common data are kept in contacts and anything specific to being a buyer and/or a seller would be contained in those tables with some sort of 1:1 relationship. The fact the relationship exists categorizes them as a buyer and/or a seller.
If you never needed a combined list of the two (of course you can union two tables) or the ability to maintain a single contact that may belong two both, you wouldn't have to worry about it.
Answer: Impossible to say in general.
The more fields your contact data have, the bigger the risk that maintaining these data requires duplicated code. But the more often you retrieve buyer and seller records, the bigger the risk that the JOIN required by having a separate table becomes a performance bottleneck.
As you see, the decision has both run-time and development time consequences, and the thing to do is to estimate what your typical usage pattern will be. Then you will know whether normalizing your schema is an overall advantage or not. (When in doubt, measure - performance trade-offs are notoriously hard to predict.)
Comment: Normalize for now.  You're too early in your learning to worry about optimizing for performance.  The db server will do a much better job if you spend your time learning to design entities and relationships according to expectations.  There's also the premature optimization lesson.  Search for it, it's worth learning early.
Comment: Thanks for this, my feelings are that it seems unnecessary to over complicate the query by normalizing the tables; However as I'm still very much in the learning phase, I would like to adhere to best practises where possible and wanted to check whether this sort of denormalization would be frowned upon should I ever build my tables in such a manner - with the answer being 'no it won't' provided I can justify that normalization would have a greater than negligble impact on performance?
Answer: My two cents:

Contact can be a buyer, a seller, both or just a contact.
Contact can have multiple phone numbers and addresses.
Contact table has basic contact attributes.
Buyer and Seller have attributes that only apply on that role.
A Contact that is neither a buyer or a seller has no related row in those tables
Comment: This makes a lot of assumptions about multiples.
Answer: Is it common in your system for the 'buyer' and 'seller' to share an address?
I'd bet it isn't and because of that I would argue not to have a separate table.


What can I do to identify the bass note that's not on guitar?

Question: I am practicing finding the chord of songs by my ears and I only play guitar. However, I see some pop songs(where uses pianos) have low C chords which the guitar doesn't have (The guitar can't go as low as piano as you know E is the lowest bass). When I am trying to match the bass note by playing every note on my guitar, I can't tell that was the C base chord since I will have to play C that has a different octave from the original chord. How can I figure this out by my ear(that it was C although the octave was different)? I know ears of practice will help me but does this mean I should start playing the piano to help my musical sense of listening? Is there any tips at least I can try to convince myself to tell the chord was right?
Comment: I understand you to mean that if you hear a low C and a high C (for example), you aren't able to tell by ear that both notes are C; is that correct?
Comment: @Aaron Correct! Especially when  I am trying to figure out the chord!
Comment: It could be alternate tuning, or produced by a pedal or other effect.
Answer: All C notes have a certain 'C-ness' about them! That's why they're all C!
It will be experience that helps you to discern which C is which, and while it's entirely possible to match Cs exactly using piano, which has the lower ones too, compared to guitar, there's really no need. Just get accustomed to recognising various octaves of the same note, high and low.
Playing the chord you think is right is the best way - if it matches what you hear, then it's good. But also get used to hearing the blend of the three notes in a triad, and recognising which is the root. Playing only three notes in a chord will help that - as there are various inversions which have an uncanny knack of throwing you off the scent.
Also be aware of 'chord families'. There's little point in trying a C♯ chord while the song's in key C - there are far more likely candidates, namely the 3 majors and 3 minors that occur diatonically. Always a good start point.
Comment: Wouldn't recognizing 'C-ness' requires having a perfect pitch? Can I get that without it? Oh, also, when you hear the inversion of the chord, can you tell which chord that is even the base is different(inversion)?
Comment: Certainly not. Most musos (and most others) will understand that one octave C has a relationship with C in another octave. An inversion will, with some practice at listening, sound like the chord itself hasn't changed - only its voicing.
Comment: @Backrub32 No, no perfect pitch required as long as you know what key the song is in already. If you know it's in C major, for example, then you can figure out that all the tonic notes are C, all the mediant notes are E, etc. for the entire song!
Comment: Thank you for the tips @Tim @user45266! I will try to practice in those ways!
Answer: Just a technical term to help the discussion: pitch class. When you talk about a particular pitch and all its various octaves they are all collectively called a pitch class. Also, octaves can be identified by number, for example, E2 is the low E string on guitar, E1 would be the low E on a bass guitar.
Eventually you want to hear the pitch regardless of octave, the pitch class. Also, you want to hear pitch in relative terms too, relative to the tonic, relative to a chord root, relative to pitches before/after.
So, as you listen to the bass part you ideally want to not only match the pitch with your guitar, but recognize it in ways like: it's the third of the chord, or the bass descended a fifth, and so on. If you can do that, you don't need to literally match the pitch on your guitar.
Some things you can try in the meantime, while trying to train your ear are: shift the whole bass line up an octave so that you can play it on guitar while maintaining the melodic shape of the line. So, for example if the bass guitar played E2 D2 E2 you can't play that low D2 on guitar, so instead play it up one octave as E3 D3 E3. You may need to get used to the octave shift, but keeping the shape of the line may help you figure out the changes. Try palm muting the guitar string while you play, it will cut a lot of the higher overtones and may make it match a bit better with the bass guitar, at least it helps me sometimes. One other thing is, if you're feeling really stuck, get a cheap little  electronic keyboard and use a bass sound to figure out bass lines.
Patterns are really important in music. Learning some common bass patterns will surely help with figuring out bass parts. At a certain point you want to stop thinking about identifying each note separately and hear patterns, for example the bass walked up to the fourth scale degree in half steps.
You don't need to learn piano, meaning you don't need to become a pianist, but for ear training the common instrument to use is keyboard. Playing the basic chords and scales on keyboard will be helpful to ear training.
Comment: Thank you so much for the tips! I guess I will have to work on my skills!


Import bulk email addresses

Question: I have 700 email addresses in an Excel doc. How can I import them en masse to a single smart folder for a one-off mailing?
Comment: Phillip - we are all volunteering here to help each other out. it would be polite to at least acknowledge that someone has tried to help you by providing an Answer
Answer: When you import you can specify 'add to group' or 'add to new group' on the final step of the import wizard
It doesn't make sense to me why this should be a 'smart group' per your OP ah but you said 'smart folder'. shrug. hope my answer helps :-)

Import bulk email addresses


Solution to route packages of different machines to different gateways

Question: I have the following scenario:
I have N gateways N1,...,N5
and M machines M1,...,M5 , with N > M.
I want all machines to connect to the internet via diffent gateways.
In example :
M1 should connect through N1
M2 should connect throught N3
M3 should connect through N5
M4 should connect through N6
M5 should connect throught N7
and the rest gateways should be available.
Between the machines and the gateways should be a server that 'forwards' each machines traffic to the correct gateway. Also this servers should be able to assign a new gateway
(from the unused ones ) to the machine that requested it.
Do you have any ideas of how to implement this idea?
I am thinking using firewall rules but maybe there is already an existing solution to this problem.
Answer:
I want all machines to connect to the internet via diffent gateways. In example : M1 should connect through N1 M2 should connect throught N3 M3 should connect through N5 M4 should connect through N6 M5 should connect throught N7

Is there something wrong with assigning a different Vlan and subnet to each gateway, and configuring the default-route on Mx for the appropriate gateway?


Safety of cake in oven with faulty thermostat

Question: My new apartment's electric oven has a faulty thermostat.  I made a cake from scratch, which took two hours to bake. Yesterday, I made a box mix cake as a gift, which took well over an hour to bake.  I'm now concerned for the safety of the recipient. Is it safe to eat a cake that took so long to bake?  Are the eggs in it safe?  Eventually the cake cooked through, and is not raw in the middle, but I'm worried about the eggs not cooking at the correct temperature.  Should I throw it out and go buy one at the bakery, or is it safe to give it as a gift?
Comment: If it is a rental you should tell the landlord, maybe get it fixed. If it overheats it could start a fire.
Comment: Your question should be changed to "safety of cake" not "safety of eggs"; as pointed in rumtscho's answer, you're not _cooking eggs_ but _baking cake_.
Comment: Oven thermostats are often wildly inaccurate.  Purchase and use an accurate oven thermometer.  That way you can adjust your oven's temperature dial or settings to the true temperature that the oven is reaching.
Answer: First, we have to clear up a common misconception here. The safety of a food product is not the same thing as the sum of the safety of the ingredients that went into it. Neither is it the same as their minimum, nor is there any easy-to-apply rule where you arrive at the safety of the product by looking at the safety of the ingredients. You always have to regard the product as a whole, period. In that sense, egg safety has nothing to do with your situation, because you are dealing with a cake, not with eggs.
From here, you have to apply standard food safety rules for any "cooked" food (and merely mixing ingredients before cooking them counts as cooking for that definition). This means that, before you ended up with a baked cake layer, you are allowed a total of 4 hours of unrefrigerated shelf life. So if the time from starting with making the batter to the time the cake left the danger zone (= it had an internal temperature of 60 C throughout), you are safe. If you didn't use a thermometer and clock to find out the exact time your cake passed the 60 C mark, you have to go with the first moment at which you were sure that it was passed, which is the time you took the baked cake out of the oven (since being baked proves that the cake has had an internal temperature of 96 C).
Answer: To bake a cake, I usually have a temperature of 180 °C (360 F). Even if your temperature is lower than that, or fluctuates, this is well above boiling (100 °C) and even more above 60 °C, which is the point of protein denaturation, i.e., everything above 60 °C kills bacteria etc. I'd say the cake is safe to eat, but you should get your oven checked nonetheless, because cooking with a faulty oven is a) inconvenient and b) potentially unsafe (fire hazard)


What does my boss mean

Question: When I had my 1:1 with my boss today, I told him at the end of the meeting that I would start my vacation after today. He said "Try to be relax and enjoy your vacation". I replied "Sure I will". Then he said "No. You won't. Nice try though". What did he mean by "No. You won't. Nice try though"? Was he just joking?
Comment: Based *purely* on the exchange (and not knowing more about the context or history of the conversation), it sounds to me more like he was saying that he wasn't giving you permission to go on vacation. That *nice try* was in reference to you pulling a fast one on him and simply telling him you were going on vacation tomorrow. Of course, if it was already a given that you *were* going on vacation, then the first comment makes sense. (Although I find *nice try* to be an odd thing to say, if it was meant that way.)
Comment: My guess.  He knows your personality well enough to tell that you will never be able to relax and enjoy anything!
Comment: Whatever the boss may have meant was awkwardly expressed and does not illustrate any general feature of English language and usage.
Answer: nice try M. Webster Dictionary

—usually used in an ironic way to say that an attempt at something was
  not very good or was not a nice thing to do

Meaning, in the limited context given in this question: Nice try though. You will not enjoy your vacation because of x!

What does my boss mean


How to avoid rich blacks on inkjet?

Question: I'm printing a short-run of labels at home on my Epson Inkjet.
I have a CMYK pdf I've exported from Illustrator.  No rich blacks, no color conversion when creating the pdf, Appearance of Black: both options are set to "accurate".
I've opened the pdf in photoshop and looked at the Cyan, Magenta, and Yellow channels.  Color only exists where I've told it to be (no help from CMY to create blacks).
I still get 4-color blacks when I print! How do I stop this? Is there a way?
If not, is there any way I can get more life out of my ink?
Most of the print is black with some green letters, and I've already had to replace Cyan after less than 40 glossy pages, and Magenta is almost empty.
Answer: Unfortunately it has been my experience that most printers will print in full color if there is any color on the print job. To avoid this you would need to print in black and white or grayscale.
Extended life: Try printing in draft mode. This will give a quick print and will use considerably less ink. It will also result in a lower quality print.
Possible workaround: Is it possible for you to turn off "black" elements in your design and print color, then enable the black elements and print in monochrome or grayscale? This would require careful alignment in your printer and may return less than favorable results....

How to avoid rich blacks on inkjet?


Cannot get UISearchBar Scope Bar to appear in Toolbar (or anywhere) on iPad

Question: This is really causing me fits. I see a lot of info on putting a UISearchBar in the top row of a UITableView -- but I am putting the UISearchBar into the Toolbar at the top of my screen (on the iPad).  I cannot find ANYTHING regarding how to handle UISearchBar and UISearchDisplayController using a UIPopoverController on the iPad. Any more info about the UISearchDisplayController using a UIPopoverController would be greatly appreciated.  Please help with this as I am at my wit's end.
Using IB, I put a toolbar on the IUView on the iPad. I added the following: Search Bar (not Search Bar and Search Display) to the toolbar.  I set the options to be as follows:  Show Cancel Button, Show Scope Bar, Scope Button Titles are: "Title1" and "Title2" (with Title2's radio button selected).  Opaque, Clear Context and Auto Resize are checked.  I hooked up the delegate of Search Bar to the "File's Owner" and linked it to IBOutlet theSearchBar.
In my viewWillAppear I have the following:
    //Just in case:
    [theSearchBar setScopeButtonTitles:[NSArray arrayWithObjects:@"Near Me",@"Everywhere",nil]];
    //Just in case (again):
    [theSearchBar setShowsScopeBar:YES];
    //doesn't seem to do anything:
    //[theSearchBar sizeToFit];

    searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:theSearchBar contentsController:self];
    [self setSearchDisplayController:searchDisplayController];
    [searchDisplayController setDelegate:self];
    [searchDisplayController setSearchResultsDataSource:self];
    //again--does not seem to do anything..but people have suggested it:
    [theSearchBar sizeToFit];

Okay, so far, I thought, so good.  So, I made the File's Owner .m file to be a delegate for: UISearchBarDelegate, UISearchDisplayDelegate.
My issue:  I have yet to implement the delegates necessary to do the search but still... shouldn't I be seeing the scopeBar next to the search field when I click into the search field?  Just so you know I DO see the log of the characters I type, so the delegate is working.
Here is a routine I used to check to see if IB really put the Scope Bar (UISegementedControl) in the searchbar:
for (UIView *v in theSearchBar.subviews)
{
    if ([v isMemberOfClass:[UISegmentedControl class]])
    {
        // You've got the segmented control!
        UISegmentedControl *scope = (UISegmentedControl *)v;
        // Do your thing here...
        NSLog(@"Found Scope: '%@'\n",scope);
        NSLog(@"Scope Segments: '%d'\n",[v numberOfSegments]);
    }
}

This shows:
[30013:207] Found Scope: '<UISegmentedControl: 0x68a06b0; frame = (0 0; 200 44); opaque = NO; layer = <CALayer: 0x68a0600>>'
[30013:207] Scope Segments: '2'

So, I know the 2 segments are there.  I also know they are not showing up...
What am i doing wrong?
Why doesn't the Scope Bar appear?  A results UIPopoverController appears with the title "Results" and "No results found" (of course) when i type the first character in my search...but no scope bar.  (not that i expect anything other than "No Results Found".
I am wondering where the scope bar is supposed to appear...in the titleView of the UIPopover?  In the toolbar to the right of the search area?  Where?
Answer: [self.searchDisplayController searchBar] setScopeButtonTitles:[NSArray arrayWithObjects:@"Near Me",@"Everywhere",nil]];

This Might Help.
Answer: UISearchBar does not display it's scope when embedded in a UIToolbar, this is true even in iOS 7.
You must build your own UISegment and add it into the table view of the search results or build your own view to hold the UISearchBar that would display scope.


Cluedo - probability all players having a people card that matches their own counter

Question: The family board game Cluedo involves distributing cards of three types as
evenly as possible to up to 6 players. The numbers and types of card are: 6 people-
cards, 9 room-cards, and 6 weapon-cards. Each people-card is colour coded and has a
matching coloured counter.
In a particular game there are five players. One card of each of the 3 types, is selected
at random and hidden in an envelope for a later part of the game. Each player then
chooses a coloured counter with one counter being left over in this game. The players
choose their counter without knowing the contents of the envelope. All three types of
card are then put together into one pile. The pack is shuffled and the cards are dealt
out as evenly as possible, with the youngest player(s) getting any extra cards from the
deal.
What is the probability that all five players hold the people-card that matches their own
counter?
Answer: The five players will receive $4,4,4,3,3$ cards respectively.  There are thus
$$
\frac{18!}{(4!)^3(3!)^2}
$$
distinguishable deals.
There is from the start a $\frac{1}{6}$ chance that the right color people-card was chosen for the envelope. Assuming it was, then to have success each of the five players must be dealt the specific people card of its color.  You are left with ways to distribute $13$ cards as $3,3,3,2,2$ which is
$$
\frac{13!}{(3!)^3(2!)^2}
$$
So the answer is
$$\frac{1}{6}\frac{13!(4!)^3(3!)^2}{18!(3!)^3(2!)^2 }
= \frac{4^33^2}{6\cdot 18\cdot 17 \cdot 16 \cdot 15 \cdot 14 }=\frac{1}{3\cdot 17 \cdot 15 \cdot 14} = \frac{1}{11220}
$$
The previous answer forgotr the $\frac{1}{6}$.
Answer: Something like $$ {4^3* {{13} \choose {3,3,3}} * 3^2 * {4\choose {2,2}}}/{18!} $$ :
Take all permutations (18!) and the successful ones are where the first 3 players can have either one of their 4 cards their own counter. The others can be random from 13 non-counter-cards. Last two players can only have 1 out of 3 cards their own counter.


Ruby - Unable to call win32-api

Question: I'm new to Ruby and am trying to write a small ruby script to call
win32-api
from scratch, here's what I've done

installed Ruby 2.0 using the ruby installer
(rubyinstaller-2.0.0-p0.exe)
installed the associated devkit
(DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe)
ensure that both bin dirs are on PATH

Here's the error I see when I try to run the script
C:\Ruby\Ruby200\bin\ruby.exe -e
$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
D:/kaira/src/ruby/main/myruby.rb

C:/Ruby/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
`require': cannot load such file -- win32/api (LoadError)
  from
C:/Ruby/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
`require'
  from D:/kaira/src/ruby/main/myruby.rb:1:in `<top (required)>'
  from -e:1:in `load'
  from -e:1:in `'

I haven't posted the entire script here as I don't think its really important. The issue appears to be that I'm just missing / can't find the 'win32/api' gem that is required on my line 1.
Having googled this for a while, the stock recommendation is to
recompile the win32-api from source, which I did
gem uninstall win32-api
gem install win32-api --platform=ruby

This succeeded but didn't resolve the issue.
Originally I started with the 64 bit versions of Ruby 2.0/DevKit as I'm
running Window 7 64bit, although I have now switched to 32bit
Ruby2.0/DevKit, again no luck.
my installs are in
C:\Ruby\Ruby200
C:\Ruby\DevKit
my PATH starts with
PATH=C:\Ruby\Ruby200\bin;C:\Ruby\DevKit\bin; ...
Maybe I'm missing something obvious here, although I can't spot it. Any
help appreciated.
Thanks!
Answer: I bet it should be win32api instead of win32-api. So probably you just misspelling it.
Comment: This is not the case, and there is no gem called win32api

Ruby - Unable to call win32-api


Unable to update any Apps

Question: I am unable to update any of my apps on my iPad Air and can not add a new app. When I try to update I get a spinning circle. There has been no error notice. Any idea what the problem is?
Comment: Do you have free space on the device? Have you tried restarting?
Answer: That happened to me with my iPad Air. I solved it by backing my iPad up to iTunes and then deleting the app from my iPad through iTunes, then I clicked Apply. I then downloaded the app from the App Store again. This will delete any data the app has on your iPad.
YMMV, as a few months later this app (Pages) was doing the same thing again, so I put it off and put it off and I never fixed it again, but when I updated to the iOS 9 Public Beta on my iPad the app was fixed! So you might just wait a couple of months until iOS 9 comes out and the update should hopefully fix the app for you.

Unable to update any Apps


Is my pork Safe to eat after 3 hours sitting out??

Question: So I put some pulled pork in the crock pot on low for about 5 hours when my boyfriend turned it off without me knowing.. Recipie said 7 hours total on low. So after about 3 hours of it being off we turned it on warm and left it on overnight.. In the morning I turned it back up to low and it cooked for about another 5 hours (I was told you can't really overcook pulled pork, just gets more tender) and I am wondering if it is safe to eat??
Answer: Short answer:  "warm" is not guaranteed to be a temperature where pathogens will not grow--it is just intended to keep food warm for a short period of time as you eat dinner or similar.   It may even be creating conditions that will incubate any pathogens present and help them to grow.
Additionally, you had this food in a completely uncontrolled temperature environment for at least three hours.
You should discard this pork.
See also:  How long can cooked food be safely stored at room/warm temperature?
Comment: Thanks for the catch--the setting was warm.  I invite people to come to the chat and see our discusison there, but on unknown equipment I will not quibble over whether the warm setting was above the safety threshold; I am always conservative in the matter of safety, and there still is the matter of the three hour uncontrolled temperature interlude at which the surface was surely at or near ideal growth temperatures.
Comment: Chat starts at http://chat.stackexchange.com/transcript/message/8896598#8896598 for anyone interested.
Comment: Note that while it's *possible* that enough heat was retained while the slow cooker was off that it wasn't actually in the danger zone for two hours, but without directly checking, you don't really know, so as SAJ14SAJ says, better safe than sorry.
Answer: Any meat that is not completely cooked has a risk of bacteria growing inside it.  Smell is the key to telling if it went bad. Also, you would look in the pot and see if there were any bubbles along side the meat.  If not and the broth was clear your probably in good shape.  Generally three hours is not enough time for the bacteria to  damage the quality of the meat.  If it was sitting in a crock pot for 5 hours it was probably cooked period.  That also depends on the size of the pot and how much you had in there.
Thing to remember.  Even if bacteria had started growing in the meat and you recooked the meat to reach the 172F in the center.  All of the growing bacteria would be killed and the meat would not be a risk to eat. It might not taste the same but it would not hurt you.  All meats have bacteria growing in them from the time they are processed.  Cooking the bacteria is what makes the meat safe to eat.
I have been a chef for 27 years without an incident.  Michael
Comment: -1 This is incorrect and dangerous advice. You can't smell everything that's toxic, and not everything produces bubbles, or discoloration, so you can't simply check if it's "gone bad". Three hours *is* enough to potentially cause problems, [according to the USDA](http://www.fsis.usda.gov/factsheets/how_temperatures_affect_food/index.asp#1). And once food is dangerous to eat, recooking doesn't fix it. Maybe you've been lucky enough not to have anything go wrong, but give this advice to a ton of people online, and some of them won't be as lucky as you.


Should I have a transit visa in Frankfurt?

Question: I  have Syrian passport with USA visa. I will travel from USA to Lebanon but I have one stop in Frankfurt. I want to ask if I need visa to stay in the airport in Frankfurt until I have my next flight.
Answer: You do not require a transit visa.  Reviewing Germany's visa information shows Syria as a nationality that requires possession of an airport transit visa when passing through the international transit area of airports in Germany, but also that since you hold a valid visa for the United States you are exempt from that requirement (item 1 in the exceptions).


Finding a subgraph with smaller clique number without removing a clique the size of the clique number.

Question: Given an infinite graph $G$, with clique number $2< \omega (G) < \infty$, is it possible to remove vertices such that the remaining subgraph has clique number $\omega (G)-1$, under the restriction that you cannot remove a clique of size $\omega (G)$?
Comment: I'm specifying an infinite graph because it would prove it in the finite case as well.  I guess it is just more general, but yes I am assuming $\omega (G)$ is finite.
Comment: Does the restriction "you cannot remove a clique of size $\omega(G)$" simply mean that the induced subgraph of $G$ on the set of **removed** vertices does not contain a clique of size $\omega(G)$?
Answer: First, let me restate the question:

Let $2\lt k\lt\infty.$ Given a (finite) graph $G=(V,E)$ with clique number $\omega(G)=k,$ can we find a vertex partition $V=V_1\cup V_2$ such that the induced subgraphs $G[V_1]$ and $G[V_2]$ both have clique number less than $k$?

(There is no loss of generality in restricting our attention to finite graphs, because, by a slight generalization of the De Bruijn–Erdős theorem, an infinite graph $G$ will admit such a partition if each of its finite subgraphs does. This can be proved by the usual "compactness argument" using an ultrafilter or the Tychonoff product theorem or the compactness theorem of first-order logic.)
For $k=2$ the answer would be negative, as shown by the example $G=C_5.$ In fact, the answer is negative for all values of $k,$ but the counterexamples for $k\gt2$ are not so simple. I will use the following result of Jon Folkman [Graphs with monochromatic complete subgraphs in every edge coloring, SIAM J. Appl. Math. 18 (1970), 19-24 ] which was later generalized by the Nešetřil–Rödl theorem:

Folkman's Theorem. For each positive integer $k$ there is a graph $G_k$, with clique number $\omega(G_k)=k$, such that every coloring of the edges of $G_k$ with two colors contains a monochromatic $K_k$.

Suppose $k\gt2.$ Consider Folkman's graph $G_k=G=(V,E),$ and consider any partition of the vertex-set $V$ into two disjoint subsets $V_1,V_2.$ Color an edge of $G$ red if it has one endpoint in $V_1$ and the other in $V_2$; otherwise color it blue. Then $G$ contains a monochromatic $K_k$. But a red $K_k$ is impossible for $k\gt2.$ Thus $G$ contains a blue $K_k,$ that is, a $K_k$ whose vertices all lie on the same side of the partition. In other words, either $\omega(G[V_1])=k$ or else $\omega(G[V_2])=k.$
Comment: That was rather elegant.


How do I limit content type per role?

Question: I am running a Drupal 5 site with number of roles. Is there a way to assign limits per role? E.g. Authenticated user could upload 10 documents, whilst Paid user could upload 100 documents. Your help is much appreciated.
Answer: The NodeFamily module will allow setting a maximum number of nodes that can be created per user. However it doesn't provide per role maximum number settings.
Comment: Based on further discussions with Budda off line, we have decided to build a custom module to address this issue. I am closing the question.

How do I limit content type per role?


wrapping state variables in struct

Question: I asked this question in OZ forum and I'm asking it here again. The question is Why a state variable is wrapped in a struct in their Counters library. Please see the question in that post. Thanks.
Answer: Struct helps you to reduce the stack height while compiling. For compilations that have many threads, or say many local variables, (where stack support only 16) you may run into this error:-

Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack

But struct helps to reduce the number of local variables and consider them together as a single variable. And thus avoiding the error.
This article may help more about this.
Comment: Hey thanks for the answer. Yes, this is a benefit of using a struct. Put it in a specific context, why is the Counters library using it then? There is only one state variable in the struct, so it is not helping reduce # of local variables. I thought it was used to anti-reading from storage directly, but it appeared not to be the case, after a few experiments.
Comment: Also, you may need keywords 'memory' or 'calldata' along with struct if you are using many variables into a struct.
Eg;-
struct memory myStruct {var1;var2;]

wrapping state variables in struct


Replacing a existing slab door from house to garage

Question: Can I replace the existing slab door from house to garage that is 1 3/4" thick with a door that is same size but only 1 3/8" thick? If so, what modifications do I need to make to the door frame if any?
Answer: You do not want to replace a 1 3/4 inch door (which is presumably a solid core door) with a 1 3/8 door of any type. The reason is that fire codes require a door with a fire break rating between the house and the garage. Fire break doors are generally 1 3/4" thick for standard doors.
Many homes now days may even use a steel clad door in this application instead of just a solid wood door.
Comment: Yes, I've found that out since I posted my question.  The solid core door is just so heavy, I'm having a hard time just moving it around. Don't know how I'm going to get it hung. I guess wedges underneath.  Thank you for your help, I do appreciate it and I will check into the steel doors. I was just kind of leaning away from those because they dent easily.
Answer: First, you may need a smaller set (or different set) of hinges, should they protrude from the outer edge of the new door, due to alignment issues.  Nothing quite like a nasty scrape while walking through the entry carrying groceries to invoke a few special expletives when the bag tears open and drops the carton of eggs on the floor.
Should the holes and door align with the hinge edge with the same distance as the old door, then your new slab door will move "away" from the hinge side of the door, by that 1/8", and in turn, your strike plate's 'sweet spot' may need to move an 1/16" away from the hinge side of the door.  That can be tested and verified once the door is up.
If you do have to replace the hinges, your trim around the door jamb (where it meets the door) may need to be shifted inward, so it meets up with the door again. As Stanwood mentioned, you can usually just put on larger weatherstripping instead to make up the spacing difference.  That is a lot easier than pulling that trim, relocating it, and then repainting the entire jamb.
No matter what, keep your small chisel at the ready to clean up around the hinge placement, as well as chipping away some extra room for the strike plate holes - especially if the deadbolt doesn't align quite right.
Answer: Yes. The latch is centered on the door so the new door will sit imperceptibly at an angle when latched. You will want to confirm that weather stripping around the door provides a good seal. It should notvbe a problem to achieve this and in any case when replacing the slab it's a good time to consider replacing the weather seals.
Answer: Garages are to be separated from single family residences by 1/2" gypsum board on garage side ONLY, provided the garage does not open into a sleeping room. (See 2017 edition ICC Table R302.6.)
Also the door between the garage and house shall be a solid wood door a minimum of 1 3/8" thick and is not permitted into a sleeping room. (See ICC R302.5.1.1.)


How can I make the Video Settings on Windows Media Player take effect?

Question: I have

Windows 7
WMP 12
the latest version of K-Lite Mega
newly upgraded video card

When I slide the pointer in Hue, Saturation, Brightness, and/or Contrast, the pointer stays where it is, but no effects happen whatsoever, even after I close the Enhancements > Video Settings dialogue box.
I tried sliding one at a time to the extreme left and right, to see if any perceptible change happens. Nothing.
The videos are too dark on Windows Media Player, but the color is just fine on Media Player Classic 6 and VLC. But I prefer WMP because it doesn't have the choppy playback and other issues of VLC (now using 2.2.4, but have had the same problems since pre-VLC 2x) and MPC 6.
The other Enhancement settings like Play Speed and SRS WOW Effects work though. Only the Video Settings have no effect whatever position the pointer is at.
Answer: What's the file format of the videos that you tried? It's possible that the Video Settings only have an effect on formats like WMV and MP4.


Capitalisation of pathos, logos, and ethos

Question: Are the words "pathos," "logos," and "ethos," capitalised? I'm not sure if they are proper nouns.
Comment: Looks like an answer, Josh.
Comment: Only ***Logos*** is often capitalised:
(often initial capital letter) *Philosophy*. the rational principle that governs and develops the universe. *Theology * The Word of God, or principle of divine reason and creative order, identified in the Gospel of John with the second person of the Trinity incarnate in Jesus Christ.
EXAMPLE SENTENCES:
This methodology then proceeds 'downward' to the Incarnation, to the event in which the Word or Logos became man in Jesus Christ.
Answer: The fact that you're asking about the 3 together implies a context of Aristotle's Rhetoric.
Are the 3 words inherently proper nouns? No. In fact most translations of Aristotle would not treat them as such.
Should you capitalize them? Yes!... if you're treating them as proper nouns. If you personify them as a rhetorical device, then that frequently implies capitalization. (Lord StyleGuide may demand a specific technique.)
Since we're in the realm of philosophy and intellectual debates the style may be a bit fluid, and allow for some artistry; turning pathos into Pathos to imply the universality of an Ideal.
Note:
This would be different from the biblical capitalization of "Logos" or "The Word" which occurs because it is used as a title.