I wrote this simple script, and it's seems to work fine, but only once. I click div-container - the radio within gets checked. I click another div - another radio gets checked. But now, when I click the previous div again, the radio won't get checked.  Here's the code:  $('div').click(function () {    $(this).find('input:radio').attr('checked', true); });   And example:   Thanks for suggestions!
I'd like to do something like this to tick a checkbox using jQuery:  $(".myCheckBox").checked(true);   or  $(".myCheckBox").selected(true);   Does such a thing exist?
Resizing Controls in MFC I am writing a program which has two panes (via CSplitter), however I am having problems figuring out out to resize the controls in each frame. For simplicity, can someone tell me how I would do it for a basic frame with a single CEdit control?   I'm fairly sure it is to do with the CEdit::OnSize() function... But I'm not really getting anywhere...  Thanks! :) Is it true that one should not use NSLog() on production code? I was told this a few times in this very site, but I wanted to make sure this is really the case.  I was expecting to be able to sprinkle NSLog function calls throughout my code, and that Xcode/gcc would automatically strip those calls out when building my Release/Distribution builds.  Should I avoid using this? If so, what alternatives are most common between experienced Objective-C programmers? In the book , at page 27 we find the exercise asserting that       Exercise I.XXXVI.   The underlying space of a zero-dimensional scheme is discrete; if the scheme is Noetherian, it is finite.     Thoughts I thought that a zero-dimensional scheme is one such that, in every local ring $\mathscr O_{X,p}$, the only prime ideal is its unique maximal ideal $\mathfrak m_{X,p}.$ Hence, supposing that $X=\operatorname{Spec} R$ is affine, we deduce that every prime ideal is maximal, so each ponit in $X$ is closed. But how does this imply the discreteness? It only implies the Hausdorff-ness of $X$, right? Furthermore, I cannot perceive what the "Noetherianity" has to do with the finiteness claimed here. In the affine case, it seems to be claiming that there are only a finite number of prime ideals in a Noetherian ring, if its scheme is zero-dimensional? For example, $\mathbb Z$ is a Dedekind domain, hence its scheme is zero-dimensional, but it has infinitely many primes: does this contradict the statement?    Thanks in advance for any reference or hint, and point out any inappropriate point if any is presented. Edit I see why my example cannot work now: it is one-dimensinoal: don't forget the pirme $(0)$. But I am still wondering why the statement is true... I need rules to drop some malicious Apache connections I drop all traffic on ports except on 80 for my web server.  I have some rules like this on iptables:  iptables -A INPUT -p tcp -m tcp --dport 80 -m string --string "cgi" --algo bm --to 1000 -j DROP   Someone who have more can share? I know always the bad hackers still updating, but some of them always begin with the same code. I need to Drop the connection based on some criteria. Here are some Apache log (I remove ips but each atack come from the same):  Attack 1: This I don't know what are trying to do, but make it 50 times from the same ip  GET / HTTP/1.1  301 224 -   Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 GET / HTTP/1.1  302 3387    -   Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22   Attack 2: this try to get information about server only.  GET / HTTP/1.1  301 224 http://myip:80/ Go-http-client/1.1 GET / HTTP/1.1  302 3228    http mywebsite  Go-http-client/1.1 GET /es/ HTTP/1.1   200 40947   https mywebsite Go-http-client/1.1   Attack 3: they try get access to a login page vulnerability  GET /userlogin/login.aspx HTTP/1.1  302 186 -   -   Attack 4: this try to access a cgi at first request, (see my first iptables rule to drop this)  GET /hndUnblock.cgi HTTP/1.0    302 186 -   Wget(linux) GET /tmUnblock.cgi HTTP/1.0 302 186 -   Wget(linux)   I'm very new with server this 4 attacks are from only last 12 hours... Have thousands per week. Are there any organised resources available from where I can begin my quantum computing studies? I am a computer science student and am currently searching for resources from where I can learn about quantum computers, quantum computing models, their working principles, their gates and some simple quantum algorithms. Drawing text on an image background that has dark and bright parts Often, I want to write text over a background image. If the background image is bright, I use a dark color for the text, and vice versa. But, often the image has both dark and bright parts. So a dark text is unreadable on the dark parts, and a bright text is unreadable on the bright parts.  I currently use one of several solutions, all of them are imperfect:   Brighten the image and use a dark font, or darken the image and use a white font; the problem is that it reduces the beauty of the background image. Use grey text (as in this question:  ). But grey text often looks unappealing, and is still only barely readable. Use dark text, and try to position it on the bright spots of the image (or vice versa). This takes a lot of time because it requires me to position each word separately.   Are there better solutions to this problem?   In particular: is there an automatic tool that takes an image and a text, and positions the text only on the dark/bright parts of the image? Today I found my first ever (to the best of memory) emoji in a post.        Having no idea this was even possible I came here looking for some history. I found there is an  tag. There seems to be consensus that they add little to no value on SE per  &amp;  we also know they don't translate well on all devices    I don't find any history other then this one post  where there is any focused attempt to support them. I don't find any history of discussion on supporting them.    Two questions   Is it possible to disable emojis across Stack Exchange?   If yes   Should we disable emojis across Stack Exchange? Differences between ways to express future actions Combining randomForests in R, why are the err.rate, mse and rsq components NULL From ?combine in :     The confusion, err.rate, mse and rsq components (as well as the   corresponding components in the test compnent, if exist) of the   combined object will be NULL.   Why are the err.rate, mse and rsq components for the combined NULL? Is there an efficient way to re-calculate these metrics?  I ask because I would like to figure out a way to use the oob re-sampling method with the parRF model in . SELinux preventing Apache from writing to a file SELinux is preventing the apache user from writing to a log file which it owns. When I do setenforce 0 it works. Otherwise it shows this error  IOError: [Errno 13] Permission denied: '/var/www/webapp/k/site/k.log'   The security context of the file:  $ ll -Z k.log  -rw-r--r--. apache apache system_u:object_r:httpd_sys_content_t:s0 k.log   The file was created when the SELinux mode was set to permissive.  How to set the security context so the apache user can write in that directory? I did set that directory security context using chcon but I can't find a suitable file type.  From audit.log:  type=AVC msg=audit(1409945481.163:1561): avc:  denied  { append } for  pid=16862 comm="httpd" name="k.log" dev="dm-1" ino=201614333 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_sys_content_t:s0 tclass=file type=SYSCALL msg=audit(1409945481.163:1561): arch=c000003e syscall=2 success=no exit=-13 a0=7fa8080847a0 a1=441 a2=1b6 a3=3 items=0 ppid=15256 pid=16862 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) I'm using an Android smartphone that I purchased Minecraft PE on; now I want to transfer my world to a iPhone. I have also purchased Minecraft PE on my iPhone. what are the meanings of &quot;treated observation&quot; and &quot;non-treated observation&quot; in this context ?  Further, propensity score matching is a more robust method of matching that quantitative accounting researchers frequently use (Rosenbaum &amp; Rubin, 1983). With this technique, the researcher first estimates a logit or probit regression with the treatment effect as the dependent variable (i.e., S&amp;P 500 membership, continuing with our earlier example) and independent variables that are known determinants of the treatment (possibly economic performance, firm size, age, industry, etc. in our example). From this first-stage regression, the researcher obtains propensity scores. 6 The researcher then matches each treated observation to a non-treated observation based on the distance between their propensity scores (i.e., those observations with the closest propensity scores are matched). 7 Hoi et al. (2013) utilize propensity score matching in their study that links irresponsible CSR activities with tax aggressiveness. They first generate predicted propensity scores for each firm-year using a model of the determinants of a firm engaging in a high level of negative, irresponsible CSR activity. Then, they match a treatment firm (one with a high level of negative CSR activities) to a non-treatment firm (one with a low level of, or no, negative CSR activities) by matching observations with the closest propensity scores. Hoi et al. (2013) then re- test the relation between negative CSR activities and tax aggressiveness using this matched sample. These matching techniques help mitigate the researcher’s potential failure to consider certain firm characteristics that differ between treatment and non-treatment firms (Dhaliwal et al., 2012). If every element of set A ia an element of set B then we say that A is subset of B. A is said to be proper subset if A does not equal B.  My question is - whether the symbol we use to show subset is  same as that for proper subset? I have seen that A is subset of A itself is shown by the same symbol as that for the subset while when we write improper subset, we usually write equal to sign with symbol of subset. So, please help me to know this. Does there exist an automorphism of $\mathbb{C}$ that does not keep $\mathbb{R}$ fixed? What is the difference between 'sudo' and 'su -c' Why doesn't the definition of a category require an explicit notion of morphisms equality? I am learning basics of the category theory (CT).  I do understand that CT is a modern powerful framework to describe various branches of mathematics in a unified way.  I do admit that category's definition tells a lot about the whole thing and focuses on the most important properties, shadowing unnecessary details. However, the more I go forward, the more it feels like it should explicitly require a notion of morphisms equality (like it does with morphism composition). It feels so because equality or inequality of morphisms arises everywhere, since the very beginning: any commutative diagram eventually reduces to an equality of two different paths and many other things involve equality as well. Even composition is defined grounding upon an (implicit) equality!  I'll try to give an example of my concern. Consider $\mathbb{SET}$. Its objects are sets and morphisms are functions. Now, let's recall that functions are sets as well - to be more precise, a function $f : A \mapsto B$ is a subset of a $A \times B$ obeying certain properties, which I omit. Thus, one could argue that $f$ is both a morphism between objects $A, B \in Obj(\mathbb{SET})$ and an object defined as a set of pairs $\{ (a_1 \in A, b_1 \in B), ..., (a_n \in A, b_n \in B) \}$ and those are equal because both are essentially exactly the same thing.  I hope my concern is clear and I need some kind of "conceptual insight" from knowledgeable people to move forward. Please give me the right perspective. Allowing all/different file type uploads How to dismiss the Windows 8.1 Upgrade banner? In formal logic, how is it possible for an argument with a contradictory conclusion to be valid? I've recently been trying to introduce myself to formal logic, and I've hit a stumbling point:  In the text I'm reading, a valid argument is defined as "an argument in which it is impossible for the premises to be true and at the same time the conclusion false."  The text then later prompts me to declare whether it's possible for an argument to be valid with a contradiction for a conclusion. The answer key then claims that yes, it is in fact possible, but offers no further explanation. I'm also supposed to create an example.  I just can't wrap my head around this one.  Here's the example I've worked up, is this a valid argument?   If grass is green then it is raining.  If water is wet then it is not raining.  Therefore: It is raining and not raining.   My head hurts. How can I find local IP addresses (i.e. 192.168.x.x or 10.0.x.x) in Python platform independently and using only the standard library?