I have a html page.This is the code:  &lt;script src="jquery-1.10.1.min.js"&gt;&lt;/script&gt; &lt;script&gt; $('document').ready(function(){     $(".class-1").click(function(){         id=this.id;         alert(id);         $("#"+id).removeClass("class-1");         $("#"+id).addClass("class-2");     }); }); &lt;/script&gt;  &lt;style&gt; .class-1{color:red;} .class-2{color:blue;} &lt;/style&gt;  &lt;div class="class-1" id="id-1"&gt;sth&lt;/div&gt;   When I click the div for the first time, page alerts the id, and the class and color changes.   The problem: When I click on it for the second and third time, it alerts the id again, But it shouldn't. Because the class is changed. So what is the problem?
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
Individual ColorFunction with RGBColor What does "can only heal so much" mean in this sentence? I found the following sentence in an American novel (this one:  you can read the whole paragraph). A woman broke her wrist and just had her cast removed. She thinks she can start playing piano again, but her wrist still hurts too much. I'm not sure I understand the meaning of the final sentence:  But a body can only heal so much, so fast.  Can someone help me, please? How can I safely create a nested directory in Python? What is the most elegant way to check if the directory a file is going to be written to exists, and if not, create the directory using Python? Here is what I tried:  import os  file_path = "/my/directory/filename.txt" directory = os.path.dirname(file_path)  try:     os.stat(directory) except:     os.mkdir(directory)         f = file(filename)   Somehow, I missed os.path.exists (thanks kanja, Blair, and Douglas). This is what I have now:  def ensure_dir(file_path):     directory = os.path.dirname(file_path)     if not os.path.exists(directory):         os.makedirs(directory)   Is there a flag for "open", that makes this happen automatically? In calculating work done by a constant force over a constant distance, why doesn't the subject's initial velocity matter? Assume a point-mass $m$ is travelling in a straight line, and a force $F$ will act on $m$ (in the same direction as $m$'s velocity) over a constant distance $d$; why doesn't $m$'s velocity matter to the calculation of work done on $m$ by $F$? Work is defined such that, in this example, the work done by $F$ on $m$ is equal to $Fd$, but it seems that if $m$ were moving slower, it would spend more time in the field, allowing $F$ more time to act on $m$, thereby doing more work. In fact, if $m$'s velocity were very great, it would hardly spend time in $F$'s field at all (so very little work done). Maybe I misunderstand work; can someone address this confusion of mine? Aborting evaluation when the memory exceeds a certain limit 'pyrcc5' is not recognized as an internal or external command Evaluate the following limit of finite sum In viewing the weekly list of rep change, I see  on top: razpeitia2 5 16  member for: 2 years, 7 months link #1 week rank +8529 change 727 total reputation 2,286 week reputation    How can someone with 727 total have 2286 for the week with no bounties?  Call me curious.  Is this a bug or something else here? I get the following error in my log files every time I try to upload a large file.  a client request body is buffered to a temporary file /var/lib/nginx/body/0000000001   Although the file uploads successfully, I always get the above error.  I increased the client_body_buffer_size to 1000m which is what I expect the largest file uploaded to be. However, this is was just a guess and although I don't get that error anymore I am wondering if this is an appropriate value to set for the client_body_buffer_size?  I would appreciate it if anyone can shed some light on this directive and how it should be used. Is the simulation hypothesis outside of science? On the question of the  (i.e. that reality is a simulation), a friend of mine once remarked he didn't accept it on the grounds of . To me (with my admittedly instrumentalist view of science) this seems a misuse of Ockham's razor in that all my friend is really claiming is that it isn't empirically necessary (and hence outside of science).  Is the simulation hypothesis outside of science? If so, then does it pose a problem for scientific realism? If not, is it falsifiable? Is it an empirical question? Word for a person who knows two or three languages A polyglot is a person who is fluent in many languages, but what do we call a person who is fluent in only two or three languages?  Is bi-glot a proper term for this?  I don't think the words bilingual / trilingual fit the bill, because I am looking for a -glot word. I haven't played Magic: the Gathering since the days of Onslaught and Mirrodin, and I would like to try to catch back up. Since all my cards are quite dated now, I may be more interested in formats other than the most up-to-date one.  Rather than ask what is currently legal in various formats (since that is likely too localized), I would rather pose the question of how can I tell which sets/cards are legal in each format. Sometimes I need to upload, embed, or display inline an image in a question or answer. How can I do that? I've compiled a java project into a Jar file, and am having issues running it.  When I run:  java -jar myJar.jar   I get the following error  Could not find the main class: myClass   The class file is not in the root directory of the jar so I've tried changing the path of the main class to match the path to the class file and I get the same issue.  Should I be flattening the file structure? if so how do I do this. I'm using Ant to build the Jar file if thats of any use.  UPDATE   Here is the contents of the jar and the relevant Ant sections, I've changed the name of the firm I work for to "org":  META-INF/ META-INF/MANIFEST.MF dataAccessLayer/ dataAccessLayer/databaseTest.class org/ org/eventService/ org/eventService/DatabaseObject.class org/eventService/DatabaseObjectFactory.class org/eventService/DbEventClientImpl$HearBeatMonitor.class org/eventService/DbEventClientImpl.class org/eventService/EmptyQueryListException.class org/eventService/EventHandlerWorkItem.class org/eventService/EventProcessor.class org/eventService/EventTypeEnum.class org/eventService/EventWorkQueue$MonitorThread.class org/eventService/EventWorkQueue$PoolWorker.class org/eventService/EventWorkQueue.class org/eventService/FailedToLoadDriverException.class org/eventService/IConnectionFailureListener.class org/eventService/InvalidEventTypeException.class org/eventService/JdbcInterfaceConnection.class org/eventService/NullArgumentException.class org/eventService/OracleDatabaseObject.class org/eventService/ProactiveClientEventLogger.class org/eventService/ProactiveClientEventLoggerException.class org/eventService/PropertyMap.class org/eventService/SQLServerDatabaseObject.class org/eventService/TestHarness.class org/eventService/Utilities.class   And the ant target:  &lt;target name="compile" depends="init" description="compile the source "&gt;     &lt;javac srcdir="src" destdir="bin" classpathref="project.class.path"/&gt; &lt;/target&gt; &lt;target name="buildjar" description="build jar file" depends="compile"&gt;     &lt;mkdir dir="dist"/&gt;     &lt;jar destfile="dist/myJar.jar" basedir="bin" includes="**/*.class" &gt;         &lt;manifest&gt;             &lt;attribute name="Main-Class" value="org.eventService.ProactiveClientEventLogger"/&gt;         &lt;/manifest&gt;      &lt;/jar&gt; &lt;/target&gt; Maximum length of tags Possible Duplicate:        Is there a maximum limit on the length of tags? I noticed that the tag for SQL Server Management Studio is truncated to sql-server-management-stu.  It seems like this should be an easy thing to correct, if not to allow the creation of new longer tags, but to correct existing tags that have been truncated. What i did?   [root@mdfdevha1 ~]# Group_ID=`/opt/keycloak/bin/kcadm.sh get groups -r TEST`  [root@mdfdevha1 ~]# echo $Group_ID [ { "id" : "57c86153-11ba-4d19-aafb-9903ee00086b", "name" : "Admin_UserGroup", "path" : "/Admin_UserGroup", "subGroups" : [ ] } ] [root@mdfdevha1 ~]# SURE_USER_ID=`echo $Group_ID | cut -d : -f2 | awk -F\" '{print $2}'` [root@mdfdevha1 ~]# echo $SURE_USER_ID 57c86153-11ba-4d19-aafb-9903ee00086b   In this case i am able to get the id but my requirement little bit complex  I run below command   [root@mdfdevha1 ~]#  Group_ID=`/opt/keycloak/bin/kcadm.sh get groups -r My_Realm`   and then   [root@mdfdevha1 ~]# echo $Group_ID   Output was multiple record in JSON format  [ { "id" : "e27206c0-aeb6-43db-acda-c4ba43233071", "name" : "A1", "path" : "/A1", "subGroups" : [ ] },  { "id" : "89f3bd6a-33a9-4e02-9fe3-eae660c5a6cf", "name" : "Admin_UserGroup", "path" : "/Admin_UserGroup", "subGroups" : [ ] },  { "id" : "cdc2bce5-c3bb-4b88-bdaf-d87b8bb6c644", "name" : "Group104", "path" : "/Group104", "subGroups" : [ ] },  { "id" : "a0d749f2-ab6c-4c27-ad55-3357eaab9527", "name" : "Group105", "path" : "/Group105", "subGroups" : [ ] },  { "id" : "fbf99c34-d50d-408b-8d19-9713f9af3e3a", "name" : "Group106", "path" : "/Group106", "subGroups" : [ ] },  { "id" : "ebd8336f-4017-4fb1-8035-153ae1d9ba37", "name" : "Group201", "path" : "/Group201", "subGroups" : [ ] },  { "id" : "38f4aef7-caf0-4430-9e61-1ae7026e872f", "name" : "Group202", "path" : "/Group202", "subGroups" : [ ] },  { "id" : "436a0f4a-8b1b-4d7d-a014-fcec3513644e", "name" : "Group203", "path" : "/Group203", "subGroups" : [ ] },  { "id" : "41962c5f-e7e9-4748-b81f-e3f1880b78de", "name" : "Sure_Groups", "path" : "/Sure_Groups", "subGroups" : []}]   Now from the above output i want to get the ID where name = Admin_UserGroup.  How can this will achieve ? I can't get the coordinates on my computer because it keeps changing the brightness.  I have a windows 8 Samsung, and I'm playing Minecraft version 1.6.4. Prove $\gcd(a+b, a-b) = 1$ or $2\,$ if $\,\gcd(a,b) = 1$ I want to show that for $\gcd(a,b) = 1$ $a,b \in Z$   $\gcd(a+b, a-b) = 1$ or $\gcd(a+b, a-b) = 2$ holds.      I think the first step should look something like this:      $d = \gcd(a+b, a-b) = \gcd(2a, a-b)$   From here I tried to proceed with two cases. 1: $a-b$ is even, which leads to $\gcd(a+b, a-b) = 2$ 2: $a-b$ is odd, which leads to $\gcd(a+b, a-b) = 1$  My main problem I think is, that I do not know how I should include $\gcd(a,b) = 1$ in the proof.  Any help is appreciated. Thx in advance. Cherio Woltan Making separate Python installation that can call ArcPy? Start script on open blender file