While doing a problem I came across something interesting. I accidentally proved $-1 = \pm1$. I rechecked, but calculation was correct. Yet I knew I was going wrong in some basic concept. The following is how I did it:  $$ -1=(-1)^{2(3/2)}= ((-1)^2)^{3/2} =1^{3/2}=1^{1/2}=\pm1 $$ Also, I think I have done it in a different way(e.g : I didn't use imaginary numbers as in :  Can somebody help ?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


I have previously created a 13.10 USB startup disk, following  to do so from Ubuntu 12.4 LTS. All went fine. That was a while ago.  Now I’m trying to create a 12.4.4 LTS startup disk, following the same procedure. I opened the Startup Disk Creator, and saw that it still had the 13.10 iso file selected (even though that file no longer exists). I clicked on Other, and selected the 12.4.4 LTS iso file instead. It ignored me. It absolutely refuses to recognise that the iso file it has selected does not exist, and it refuses to allow me to select a new file. No matter how many times I select the 12.4.4 LTS, I still see the 13.10 selected.  What should I do?

I recently downloaded the Lubuntu 12.04 LTS ISO for Power PC (I want to install it on an old iBook G4), but when I go to select the ISO in Startup Disk Creator, it just remains blank in the Source disc image (.iso) or CD: area.   Here is the screenshot from before (and it looks the same afterwards) selecting the ISO.     As you can see, the ISO is on the desktop separate from any other ISOs, IMGs, etc.  I read this question: , but that didn't help. Neither did  or .  Two of those are 12.04 and one is 12.10, so they are both not my version, if that changes anything.  Does anyone have any clue why this is? I am going to attempt it with Unetbootin and if that fails, manually via the terminal and dd.


Sometimes values will have an "&" in them, and when this occurs, my syntax does not error, but it stops parsing the passed value at the "&".  How can I handle the "&" character so that it keeps the string together?  http://www.bakedzititipsforanyonewithlittleknowledge/first.aspx?vax=Red%20&%20Black,Fire,House,Basket,Blanket  string fulladdress = HttpContext.Current.Request.Url.AbsoluteUri; string encodedString = System.Web.HttpUtility.UrlEncode(fulladdress); string Information = Request["vax"]; Information = Information.Replace("&", "%26"); Response.Write(vax);   And I am calling this from an external program so I can not use the + Server.UrlEncode(value)); at the end of my website in the call.  I have to format a different way.  EDIT --- Sample output:  Red & Black Fire House Basket  Blanket  What I am getting is ?vax=Red%20&%20Black Fire House Basket Blanket

I need to redirect to a url passing a parameter as a query string.  This can include an Ampersand in the value. such as  string value = "This & That"; Response.Redirect("http://www.example.com/?Value=" + Server.UrlEncode(value));   This however returns   What should I be using to encode this string?  EDIT: Thanks Luke for pointing out the obvious, the code does indeed work correctly. I Apologise, my question was not a valid question after all!  The page I was going to had a lot of old legacy code which is apparently doing some kinda of encoding and decoding itself making it appear as if my urlencode was not working.  My solution unfortunately is to completely drop use of an & until the code in question can be re-written. Don't you just hate old code!


I am having a use case where I've to do both Trigger and workflow field update.  There are 2 objects. One is Case and other one is Case_child__c and Case is master and other is child.  I'm having an issue, where a Case Trigger is calling a method caseAssistanceMethod. There we are inserting new Case_child__c record based on some conditions. (Business Logic)  trigger Case_afterUpdate on Case (after update) {      CaseTriggerUtils.caseAssistanceMethod(Trigger.new, Trigger.oldMap);   }   Public class CaseTriggerUtils {      public static void caseAssistanceMethod(List<Case> newCaseList, Map<Id, Case> oldCaseMap){         // Here we are writting our business logic.     { }   But, here is my question, above logic is working fine unless there is no workflow field update. If we have any workflow which is updating any Case field, then After_Update Trigger on Case is getting called again.  Because of this I am getting duplicate Case_child__c records. Where I 'm supposed to get only single Case_child__c record.  So, is there any design where we can do both Trigger call and workflow field update on Case, without creating Duplicate Child Record.

I need to be able to detect that the trigger execution is happening because of a workflow field update. There is a suggestion in the cookbook:  But this solution is not properly bulkified. If my batch of records is split up (200, 100, 50 whatever the server decides) the 2nd to nth batches are not processed correctly because the flag has already been set. The second part of the problem is: This is part of a managed package. I have no control of the customer's workflow rules, supporting and configuring a flag/last changed field on a record is not realistic, our company doesn't have the support resources to be walking each customer through the configuration. Has anyone been able to solve this problem for large batches of records? Edit (In Response to Calebs Answer) Separate trigger batches do not run in separate contexts trigger AccountTriggerContext on Account (before insert) {     System.debug('counter='+TriggerContextCounter.getCounter()); }  . global without sharing class TriggerContextCounter {      private static Integer counter = 0;          public static Integer getCounter() {         Integer value = counter;         counter++;         return value;     }      private static testMethod void testTriggerContexts() {         List<Account> accounts = new List<Account>();         for(Integer i = 0; i < 250; i++) {             accounts.add(new Account(Name='testTriggerContexts: ' + i));         }         insert accounts;     } }  Unit test debug messages  USER_DEBUG|[2]|DEBUG|counter=0 USER_DEBUG|[2]|DEBUG|counter=1  Both counters should have been 0 if the batches were running in separate contexts Edit Further explanation of background for @Ralph This is a generalized explanation, but when certain conditions are met, some date fields on other objects are updated. The trigger runs and updates the dates. If a workflow rule causes a field update on the object, the same trigger is run again and the dates on the other objects are updated for a second time. And because this is an increment operation the dates on the other objects are off by a factor of 2.


When I run ifconfigon my Macbook air 2018 with MacOS Mojave 10.14.6 I get this:  lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384     options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>     inet 127.0.0.1 netmask 0xff000000      inet6 ::1 prefixlen 128      inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1      nd6 options=201<PERFORMNUD,DAD> gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 stf0: flags=0<> mtu 1280 XHC20: flags=0<> mtu 0 XHC0: flags=0<> mtu 0 VHC128: flags=0<> mtu 0 en3: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     ether xx:xx:xx:xx:xx:xx      inet6 xxxx::xxxx:xxxx:xxxx:xxxx%en3 prefixlen 64 scopeid 0x7      nd6 options=201<PERFORMNUD,DAD>     media: autoselect (100baseTX <full-duplex>)     status: active ap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500     ether xx:xx:xx:xx:xx:xx      media: autoselect     status: inactive en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     ether xx:xx:xx:xx:xx:xx      inet6 xxxx::xxxx:xxxx:xxxx:xxxx%en0 prefixlen 64 secured scopeid 0x9      inet xxx.xxx.x.x netmask 0xffffff00 broadcast 192.168.1.255     nd6 options=201<PERFORMNUD,DAD>     media: autoselect     status: active p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304     ether xx:xx:xx:xx:xx:xx      media: autoselect     status: inactive awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484     ether xx:xx:xx:xx:xx:xx      inet6 xxxx::xxxx:xxxx:xxxx:xxxx%awdl0 prefixlen 64 scopeid 0xb      nd6 options=201<PERFORMNUD,DAD>     media: autoselect     status: active en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500     options=60<TSO4,TSO6>     ether xx:xx:xx:xx:xx:xx      media: autoselect <full-duplex>     status: inactive en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500     options=60<TSO4,TSO6>     ether xx:xx:xx:xx:xx:xx      media: autoselect <full-duplex>     status: inactive bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     options=63<RXCSUM,TXCSUM,TSO4,TSO6>     ether xx:xx:xx:xx:xx:xx      Configuration:         id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0         maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200         root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0         ipfilter disabled flags 0x2     member: en1 flags=3<LEARNING,DISCOVER>             ifmaxaddr 0 port 12 priority 0 path cost 0     member: en2 flags=3<LEARNING,DISCOVER>             ifmaxaddr 0 port 13 priority 0 path cost 0     nd6 options=201<PERFORMNUD,DAD>     media: <unknown type>     status: inactive utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000     inet6 xxxx::xxxx:xxxx:xxxx:xxxx%utun0 prefixlen 64 scopeid 0xf      nd6 options=201<PERFORMNUD,DAD> ipsec0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1400     inet xx.x.x.xxx --> xx.x.x.xxx netmask 0xff000000    I'm not very good at networking stuff but this seems strange to me due to the fact that I never saw this many network interfaces on my old macbook air.  Question: Is this normal or could this be something bad? What can I do about it if it is something bad?  Edit  All the "x"s were not there originally, I changed the addresses to them instead

When I run ifconfigon my Macbook air 2018 with MacOS Mojave 10.14.6 I get this:  lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384     options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>     inet 127.0.0.1 netmask 0xff000000      inet6 ::1 prefixlen 128      inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1      nd6 options=201<PERFORMNUD,DAD> gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 stf0: flags=0<> mtu 1280 XHC20: flags=0<> mtu 0 XHC0: flags=0<> mtu 0 VHC128: flags=0<> mtu 0 en3: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     ether xx:xx:xx:xx:xx:xx      inet6 xxxx::xxxx:xxxx:xxxx:xxxx%en3 prefixlen 64 scopeid 0x7      nd6 options=201<PERFORMNUD,DAD>     media: autoselect (100baseTX <full-duplex>)     status: active ap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500     ether xx:xx:xx:xx:xx:xx      media: autoselect     status: inactive en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     ether xx:xx:xx:xx:xx:xx      inet6 xxxx::xxxx:xxxx:xxxx:xxxx%en0 prefixlen 64 secured scopeid 0x9      inet xxx.xxx.x.x netmask 0xffffff00 broadcast 192.168.1.255     nd6 options=201<PERFORMNUD,DAD>     media: autoselect     status: active p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304     ether xx:xx:xx:xx:xx:xx      media: autoselect     status: inactive awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484     ether xx:xx:xx:xx:xx:xx      inet6 xxxx::xxxx:xxxx:xxxx:xxxx%awdl0 prefixlen 64 scopeid 0xb      nd6 options=201<PERFORMNUD,DAD>     media: autoselect     status: active en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500     options=60<TSO4,TSO6>     ether xx:xx:xx:xx:xx:xx      media: autoselect <full-duplex>     status: inactive en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500     options=60<TSO4,TSO6>     ether xx:xx:xx:xx:xx:xx      media: autoselect <full-duplex>     status: inactive bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     options=63<RXCSUM,TXCSUM,TSO4,TSO6>     ether xx:xx:xx:xx:xx:xx      Configuration:         id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0         maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200         root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0         ipfilter disabled flags 0x2     member: en1 flags=3<LEARNING,DISCOVER>             ifmaxaddr 0 port 12 priority 0 path cost 0     member: en2 flags=3<LEARNING,DISCOVER>             ifmaxaddr 0 port 13 priority 0 path cost 0     nd6 options=201<PERFORMNUD,DAD>     media: <unknown type>     status: inactive utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000     inet6 xxxx::xxxx:xxxx:xxxx:xxxx%utun0 prefixlen 64 scopeid 0xf      nd6 options=201<PERFORMNUD,DAD> ipsec0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1400     inet xx.x.x.xxx --> xx.x.x.xxx netmask 0xff000000    I'm not very good at networking stuff but this seems strange to me due to the fact that I never saw this many network interfaces on my old macbook air.  Question: Is this normal or could this be something bad? What can I do about it if it is something bad?  All the "x"s were not there originally, I changed the addresses to them instead


What is the perfect word for the clicking sound which happens when you stretch your bones?  When chiropractors try to do adjustments, we can hear a clicking sound on the bones.  What is that sound called?

When I wake up and do stretching I hear some sounds from my joints. What do you call this crunching sound from bone joints?


I am measuring serverPerformance.  Right now I get this in milliseconds but I want to convert this into seconds when it is more or equal to 500 milliseconds.  I Accomplish this like this     public static string ConvertMillisecondsToSeconds(long milliseconds)     {         if(milliseconds >= 500)             return Math.Ceiling(TimeSpan.FromMilliseconds(milliseconds).TotalSeconds).ToString() + "s";          return milliseconds.ToString() + "ms";     }   My problem  When I return totalseconds without Math.ceiling I get for example: 0,846 seconds When I use math.Ceiling method I get 1 second.   Desiered result     0,8 seconds.   basically im searching for a method that will return a decimal value, with 2 decimals.

I want to do this using the Math.Round function


according to the test(1) manpages:           -n STRING               the length of STRING is nonzero   so I expected this to run fine:  [ -n ${var} ] && echo "var is not empty"   I used this logic in a real case, a script like this:  [...] dne() {     echo DEBUG: wc -c: $(echo -n $peopkg |wc -c)     echo DEBUG: pdir: $pdir     echo "Error: ${package}: doesn't exist in local repos"     exit 1 }   # packages are listed as such:  # p/pname/package-version-release-distrelease... # pname is inconsistent, but it is guaranteed that the first word in package # (all to lowercase) will match at least one pname. # NOTE: package-[0-9]* matches package-32bit. *-32bit is a subpackage we want # to match later, but not when it's not already in pcase. # So that must be negated too  pfirst=${pcase%%-*} for pdir in ${p}/${pfirst}* do     # check if the glob matched anything at all     [ ${pdir} = "${p}/${pfirst}*" ] && dne      peopkg=$(find ${pdir} \         -name ${package}-[0-9]* \         ! -name *.delta.eopkg \         ! -name ${package}-32bit* |sort -rn |head -1)     echo DEBUG: in-loop peopkg: $peopkg     echo DEBUG: in-loop wc -c: $(echo -n $peopkg |wc -c)     echo DEBUG: in-loop test -n: $(test -n $peopkg && echo true || echo false)     #------------------------------------------------------------#     # break on ANY match. There's supposed to be only one anyway #     [ -n ${peopkg} ] && break # <--- [issue here]                #     #------------------------------------------------------------# done [ -z ${peopkg} ] && dne [...]   what matters here is that when I run this, I get these messages:  DEBUG: in-loop peopkg: DEBUG: in-loop wc -c: 0 DEBUG: in-loop test -n: true DEBUG: wc -c: 0 DEBUG: pdir: a/alsa-firmware Error: alsa-utils: doesn't exist in local repos   This makes zero sense to me.. DEBUG: pdir: a/alsa-firmware indicates that the loop exits always on the first iteration. Which can only happen if the glob pattern a/alsa* matched something AND peopkg was nonzero length.  PS: I'm trying to be POSIX compliant.

I understand test -n <expression> to return false if the expression evaluates to a string length of greater than 0.  Why then does the following happen?  Macbook:~ echo ${#undeclared_variable} 0 Macbook:~ test -n $undeclared_variable && echo Foo Foo   Bash 4.x  My expectation is that since test -n $undeclared_variable should evaluate false, that Foo should not be echoed.  If I use [[  ]] instead of test, it works as expected.


Hi should I say "I am declaring [a country] my children and I’s ordinarily resident country" or should I use another phrase for "my children and I's" ?  Thank you

I just stumbled upon a :     My wife and I's seafood collaboration dinner. How does it look?   Sure enough, the top comment immediately points out that it should be "my wife's and my". However, a cross-post to the Grammar subreddit produced :     It's fine as it is written. "my wife and I" is a noun phrase, functioning as a subjective pronoun in the singular and made possessive with the apostrophe. It is exactly the same as "our".      It seems weird because you would never use "I's" on its own but it is not on its own here - it is part of a noun phrase.   That's a rather intriguing argument. Does it hold any water?


We know that newtonian mechanics is described by a set of second order differential equations. This leads also to the principle of determinism that every trajectory is determined by initial conditions on position and velocity. How good is the experimental evidence on that that there is no third derivative term? (In the same spirit like ppl try to look for an electric field inside a conductor to test Coloumbs law).  Edit: to the downvoters: please comment what is the problem with this question? Using experiments to determine null-results is part and parcel of physics.  Edit: my question is not a duplicate of  but related. The other question asks about theoretical grounds. I am asking about experiments conducted and the limits they impose on higher order derivative terms.  Edit: To clarify the question: we generally accept Newtons second law of motion $$ m \ddot {x}  = F(x, \dot{x}, t) $$ this implies that specification of position and velocity uniquely defines a solution (so called principle of determination).  How precisely do we know this to be true in the sense of what if we assume instead $$ const\dddot {x} + m \ddot{x} = F $$ then what are the experimental limits on the constant 'const'. How close to zero is it determined from actual experiments.  Note: I still diagree this is a duplicate. For example one answer which goes in the direction from the linked question:  is 'Because the second derivative is fully determined by the external force, it is an experimental fact.' This goes in the right direction, but my question really is: which experiment gives the highes accuracy on this, where was it published and to what precision does it prove this fact. My question is in the same spirit like questions 'what is the current upper bound on the photon mass' except for a different topic in physics.   Thought experiment to test this: build a rail-gun, place it in a vacuum-chamber and shoot a parabola using the earth gravitational field. Use constant acceleration while still on the rail. Now place the object at a different start position on the rail but also change the constant acceleration so that at the release point (exit nozzle of the gun) the object has the same velocity. Will the object alway hit the same spot? (of course, if the equation of motion is a second order differential equation; it wont if the trajectory depends on the initial acceleration). Of course we know that it will not depend on initial acceleration, but to what precision do we know that?

Why is the Lagrangian a function of the position and velocity (possibly also of time) and why are dependences on higher order derivatives (acceleration, jerk,...) excluded?  Is there a good reason for this or is it simply "because it works".


Is $\bigcup_{n\geq 1}\left(q_n-\frac{1}{n},q_n+\frac{1}{n}\right)=\mathbb{R}$?. Here $\{q_n\}_n$ is the enumeration of rational numbers.

The exercise is from Stein-Shakarchi's  (Chapter 1, ex. 24).      Does there exist an enumeration $\{r_{n}\}_{n=1}^\infty$ of the rationals such that the complement of $\bigcup_{n=1}^{\infty}{\left(r_{n}-\frac{1}{n},r_{n}+\frac{1}{n}\right)}$ in $\mathbb{R}$ is non-empty. [Hint: Find an enumeration where the only rationals outside of a fixed bounded interval take the form $r_n$, with $n=m^2$ for some integer $m$.]   While, I understand that we probably need some enumeration of the rationals such that the only rationals outside a fixed bounded interval are of the form $r_{m^{2}}$ for some $m$, I'm having trouble seeing how to get such an enumeration.  As always, help is very appreciated :)


I am asked to prove that  $$ A \setminus (B \cap C) = (A\setminus B) \cup (A\setminus C). $$  However I am only finding this to be not true. How would I prove this?

First part :  I want to prove the following De Morgan's law :  ref.(dfeuer)  $A\setminus (B \cap C) = (A\setminus B) \cup (A\setminus C) $    Second part:  Prove that $(A\setminus B) \cup (A\setminus C) = A\setminus (B \cap C) $    Proof:  Let $y\in (A\setminus B) \cup (A\setminus C)$     $(A\setminus B) \cup (A\setminus C) = (y \in A\;  \land y \not\in  B\;) \vee (y \in A\; \land y \not\in C\;)$      $\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;= y \in A\ \land (  y \not\in B\; \vee \; y \not\in C ) $      $\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;= y \in A \land  (\lnot ( y\in B) \lor \lnot( y\in C) )$   According to De-Morgan's theorem :  $\lnot( B \land C) \Longleftrightarrow (\lnot B \lor \lnot C)$ thus     $y \in A \land (\lnot ( y\in B) \lor \lnot( y\in C) ) = y \in A \land y \not\in (B \land C)$   We can conclude that  $(A\setminus B) \cup (A\setminus C) = A\setminus (B \cap C)$


I'm using 4 layers PCB, with the following stuck-up:  Signal1 GND VCC Signal2  the GND layer flooded with GND Not all the VCC layer flooded with VCC because I needed to route some nets there  I've some free spaces on layer 2&3&4... What should I do with it?  To flood with GND any free space? or can I just leave it without flooding...        There are more nets in the VCC layer:

I'm working on a 4 layer PCB with internal 2 layers being power and GND... 2 outside layers are signal. Is it better to have a pour on the outside layers or just leave them empty except for the signals?


I recently removed the Windows part of my dual boot drive. I now just have Ubuntu 16.04 LTS.  I now want to maximize the amount of disk space my remaining Ubuntu partition has and to tidy things up.  I am looking at Gparted:    I see that:   Ubuntu seems to be installed on sda5 The swap-space is on sda6 and is 15.88 GB. Is this too large? I have RECOVERY on sda7. Is this related to Windows? Do I still need this. I have lots of free space after removing Windows   I want to remove anythings that I don't need and want to maximize the space for my Ubuntu partition.   I'm aware that I need to make any changes while using a bootable USB drive version of Ubuntu.   Any help in the steps to do this would be gratefully received.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


The scenario is simple.  The astronaut twin takes off, and travels at 67,000 mph (0.0001c) relative to the Earth, in a direction directly "backwards" along the earth's orbital path.  She then hovers in place, using rocket thrusters to prevent her from falling towards the sun. Her velocity with respect to the sun and the "fixed" stars is zero. 1 year later, the Earth comes around and she rejoins her brother by powering her thrusters to acheive the same velocity as the Earth. The astronaut twin says that she will be older than her brother on Earth, because the Earth moved from her at 0.0001c.  She says her brother's clock will lose 0.16 seconds based on 1 year * $\sqrt{1-.0001^2}$.  The brother says no, you will be younger by that 0.16 seconds because he was still and his sister was moving at 0.0001c.    (Aside:  the impact of the lower gravity being so far from Earth works out to just 0.02 seconds, which both twins agree is extra aging for the sister.  The 0.16 seconds they disagree on has only to do with velocity.) The sister argues further that she was the still one.  Ask the sun and the stars.  The brother responds "But you are the one who accelerated!  That makes you the one with the slow clock." We start to agree with the brother, but then the sister floors us:  Well, let's say that we started both hovering in space side by side, still with respect to the sun and stars.  Then you lasso'd the Earth as it went by, and traveled around the sun on it.  By your reasoning, your clock would now be 0.16 seconds slow compared to mine because you accelerated.  But it would then be 0.32 seconds slow compared to the Earth's! How could your clock be running at a different speed than one that is in your same reference frame? Hah! The poor brother is forced to admit, that does present a problem to his theory that who accelerates is important. Can you help the brother out?  (Hint:  I think not.)

The usual simple statement of geodesics is that when moving from point $(x_o,y_o,z_o,t_o)$ to point $(x_1,y_1,z_1,t_1)$ the object will follow the path of greatest proper time experience, i.e., a clock traveling the geodesic will record more seconds than one going another path.  I believe that is true even if you allow rocket thrusters or other energy addition devices. But what if you consider a circular orbit which, after 1 year, results in going from $(0,0,0,0)$ to $(0,0,0,1)$?  Wouldn't the proper time be maximized by simply sitting still, i.e., traveling only through time and not space?  The orbiting clock would presumably run slower just as the orbiting clock in the international space station runs slower than one on Earth.  In fact, if you want a physical model, assume a clock on a 400 km tall flag pole synchronized with the ISS during a pass-by (the ISS orbits at 400 km above the planet surface).  One orbit later, wouldn't the ISS clock record less time than the flag pole clock? Is that a violation of the concept "orbits are geodesics, for which the shortest distance between two 4D points is the path of greatest time"?


I am really curious as to what the current research is in complex space time. Because in "The theory of Everything". Stephen Hawking does talk about imaginary time. Is there any mathematical background for this yet? I ordered the book "Complex Geometry: An Introduction - Daniel Huybrechts" It treats complex manifolds. Is this what I need to understand complex space time?

I am not professional physicist; but I am curious about Stephen Hawking's "imaginary time". It would be better to elaborate exactly what it is. I am not confused because of the word "imaginary" but I find it confusing to imagine a two dimensional "plane time". If we express time in a plane instead of a one dimensional axis, then what does the movement of an observer along the imaginary axis signify physically?


When I type cd /home,  terminal goes there but when I type cd /home/myusername/downloads (or any address) terminal doesn't go there. It says no such file or directory.   Can somebody tell me what causes this?

How do I change directories to downloads, from the home folder, in the latest version Ubuntu 12.10? I tried cd /downloads, but it gave an error saying that there is no such directory.


An alternative formulation of this question is: why is the set of four axioms that define a group so fundamental, rather than, for example, the same four axioms except that associativity is interchanged with commutativity?  What makes this particular set of 4 axioms so special that abstract algebra is based on it?  The four axioms for a group $(G, +)$ are:   Closure: $\;\forall a, b \in G$, $\;(a+b)\in G$ Associativity: For all $a, b, c \in G,\,$ $\;a+(b+c)=(a+b)+c$. Identity: $\;\exists e \in G$ such that $\forall a \in G,\; a+e=e+a = a$. Invertibility: $\forall a \in G, \exists b = -a$ such that $b+a=a+b= e$.   If we add commutativity we have a commutative group. Why not for example make commutativity the key axiom and speak of an "associative group" as a special case? Or why not something else entirely?  What's so special about this combination of 4 axioms?  Edit: For example, is there a theory of "commutative non-associative magma's with an identity and inverses"?

I've only just begun studying group theory (up to Lagrange) following on from vector spaces and I am still finding them almost frustratingly  arbitrary. I'm not sure what exactly it is about the axioms that motivated them defining groups.  My textbook asks you to list 'common features' of vector spaces and then later defines a set of axioms for vector spaces under addition, scalar multiplication and both, noting that the axioms under addition form an Abelian group. So are groups just a generalisation of vector spaces under any binary operation?  My main problem is that the book notes that 'the axioms may seem rather arbitrary' and links groups with vector spaces but doesn't elaborate.   When introducing groups, you are tasked to complete Cayley tables for the symmetries of an equilateral triangle and square.  Then, similarly to the delivery of vector spaces, notes that the tables have common properties (Closure, Identity, inverse and association) and defines a group as a set of elements under a binary operation that has these features.  So what's so important about these 4 properties? For example, if 1 or 2 the properties were excluded form the  axioms, or we added an extra few properties as axioms how would that cripple the effectiveness of groups?  Are the group axioms ever difficult to work with or do they always work, forgive the crude Littlewood analogy, like a mathematical skeleton key?  What is it about these 4 properties that make groups such a powerful tool in mathematics and physics?  My best guess is that a group is the best way to express our sense of  symmetry and what is symmetric mathematically, but I would prefer some elaboration.


So I was on an aimless stroll through the  and planning to usurp the Shog  when I figured I'd shift to another site to be more productive. Only my productivity was shot when I saw this:    Yes indeed, randomly ordered sites in the horrible Windows default font causing incredible confusion and inability to actually use the menu to migrate. While the main leaderboard site is fine since you can search, this dropdown certainly isn't near as user friendly. So I was forced to point out this horrible travesty. Please put it in alphabetical order for the dropdown, so that it operates in a manner that anyone sane would expect it to. In reality I doubt that feature is used often, if ever, and navigating by typing the first letter of the site name does work, if oddly, so it isn't as if it's something urgent, but yikes that's a badly designed dropdown!

The  site picker seems to be ordered on-site statistics instead of alphabetically:  This makes it very hard to find Photography, Physics, and Philosophy (for example) since they are nowhere near each other in the list. I’m open to a better solution, but as it stands, this feels a little too user-hostile to assume everyone is only interested in the first 3 to 5 top visible hits in the ordered list.  Scanning pages of unorganized contents is not optimal Keyboard input should filter and not just jump around  It also breaks accessibility when someone wishes to access the list from a keyboard (or a slower input control) as opposed to a mouse and visually.


Would anyone know how to maintain 8-bit pixels when computing raster calculations in ArcMap?  This is part of a model so I need to keep the image with the original 8 bit, do the calculations, convert it into 32bit and do some other calculations and then output it.   The problem is to keep it at 8 bit for the first set of calculations.

I have a simple model that calculates the NDVI from bands 3 and 4 of a raster dataset.  The input bands are 8-bit unsigned, whereas the default output NDVI is signed 32 bit.  How can I specify the pixel depth for the output NDVI as 8 bit unsigned?


I need to generate an atlas based on a polygon shapefile, but I'd like to see just what is inside the polygon itself. Maybe with rules that involves other shape's attributes. Any suggestion?

I want to create an atlas map where I have some 40 polygons, 100 points and 200 lines as different shapefile. Now I want to automate the atlas map preparation for each polygon and needs to show the points and lines which is falling inside of the polygon.   Can anyone help me?


I saw some posts that were edited by community yesterday. When I checked the revision history, the edit was edited http to https.  Does the Community User only change links from http to https, or are there other automated tasks created to perform this edit?

I see the  on the user page.  It seems to edit posts sometimes.  What is it? And why has it downvoted over 1800 times? See also:


So I wan't to have a generic function which works on any enum which is a flag and do a bitwise operation on it.  something like:  [Flags] public enum MyEnum: long {  A = 0,  B = 1 << 0, }  public void Something<T>(ref T first, T other) where T : Enum/Flags/watever {  first = other << 1; }   So how do I make this work? I can't use long nor Enum instead of T and I really don't want to duplicate this function because it's silly

I'm building a function to extend the Enum.Parse concept that  Allows a default value to be parsed in case that an Enum value is not found Is case insensitive  So I wrote the following: public static T GetEnumFromString<T>(string value, T defaultValue) where T : Enum {     if (string.IsNullOrEmpty(value)) return defaultValue;     foreach (T item in Enum.GetValues(typeof(T)))     {         if (item.ToString().ToLower().Equals(value.Trim().ToLower())) return item;     }     return defaultValue; }  I am getting a Error Constraint cannot be special class System.Enum. Fair enough, but is there a workaround to allow a Generic Enum, or am I going to have to mimic the Parse function and pass a type as an attribute, which forces the ugly boxing requirement to your code. EDIT All suggestions below have been greatly appreciated, thanks. Have settled on (I've left the loop to maintain case insensitivity - I am using this when parsing XML) public static class EnumUtils {     public static T ParseEnum<T>(string value, T defaultValue) where T : struct, IConvertible     {         if (!typeof(T).IsEnum) throw new ArgumentException("T must be an enumerated type");         if (string.IsNullOrEmpty(value)) return defaultValue;          foreach (T item in Enum.GetValues(typeof(T)))         {             if (item.ToString().ToLower().Equals(value.Trim().ToLower())) return item;         }         return defaultValue;     } }  EDIT: (16th Feb 2015) Christopher Currens has posted  below, which is well worth a look, and an upvote. I will remove this edit if the solution bubbles further up the page. EDIT 2: (13th Apr 2021) As this has now been addressed, and supported, since C# 7.3, I have changed the accepted answer, though full perusal of the top answers is worth it for academic, and historical, interest :)


I'm working on a program where I search through two text files and compare them (It's a task from JetBrains Academy). At the end I'm tasked to output the time it took to execute this, in the format of "mm:ss:ms". Picture as reference:  This is the code I've written to try to achieve this. I imagine it's pretty far from correct, so I apologize for this, I have been learning Kotlin and programming for not long. val millis = System.currentTimeMillis() val time = String.format("%1\$tM min. %1\$tS sec. %1\$tL ms.", millis);  println("Start searching...") println("Found $number. Time taken: $time ")  The output I get is this: > Start searching... Found 864 / 864. Time taken: 19 min. 53 sec. 611 ms.   The minutes and seconds are wrong, as it took less than a second. I have doubts about the ms, as they would fit on how much time it took. Can someone help me with what I'm doing wrong? Thanks!

How do I get a method's execution time?   Is there a Timer utility class for things like timing how long a task takes, etc?     Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want.


In my applied regression course I was given the following equation for the Newton-Raphson's method: $$b_{n+1}= b_n - \frac{\nabla f(b_n)}{\nabla^2 f(b_n)} $$ Reading further, I found that the Wikipedia article  defines it as $$b_{n+1}= b_n - \frac{ f(b_n)}{\nabla f(b_n)} $$ I was quite confused why they would give me a different equation than what seems usual and then found a different article  which provides the first formula. What are the differences between these two? When do I use which?

Different publications provide different equations for Newton's method or the Newton-Raphson method. In Giudici, P., Givens, G. H., & Mallick, B. K. (2013). Wiley Series in Computational Statistics. Wiley Online Library, p. 26 the updating equation is given as $$ x^{(t+1)}=x^{(t)}-\frac{g^{\prime}\left(x^{(t)}\right)}{g^{\prime \prime}\left(x^{(t)}\right)} $$ whereas elsewhere on the internet (), it is given as $$ x^{(t+1)}=x^{(t)}-\frac{g\left(x^{(t)}\right)}{g^{\prime}\left(x^{(t)}\right)} $$ Are these equivalent? How can I make sense of the difference?


I have a data set on which I want to run a machine learning algorithm. Some of the columns are skewed.   If I apply a transformation (let's say log) to those columns and I want to display the matrix of correlations, should I do it before or after transforming the skewed columns, or should I not do it all?  Does it become meaningless after this transformation?  (original:)       J'ai un jeu de données avec des colonnes "skewed" sur lequel j'applique de l'apprentissage automatique , après une transformation log sur ces colonnes , si je veux la matrice de corrélation dois-je la faire avant ou après la transformation ou ne pas le faire du tout ? perd-elle tout sens après cette transformation?

I have a data set on which i want to run a machine learning algorithm , some of the columns are skewed. If I apply a transformation (lets say log) to those columns and I want to display the matrix of correlation , should i do it before or after handling skewed columns or should i not do it all ?


Disclaimer: I've already completed the game, so I know what to expect in the final mission.  That said, the fight right at the end was (almost) a complete balls-up. I managed to      kill the first 2 avatars, but then I got pinned down in the open area after the bridge by the constant waves of reinforcements. In the end I took the last avatar down after exhausting all my grenades and with everyone in the squad wounded.   And that was just on Rookie.  So, I'm wondering what the best approach is for that fight, for my second playthrough on Veteran. Should I charge in and try to eliminate each boss as fast as possible, or draw them out on to the bridge? What squad composition would people recommend?

How am I supposed to defeat three codexes and three archons, and three heavy robots without using counted ammo like grenades and not being hit? I'll need grenades and medkits it the last fight, and this is not the last fight. I can put one archon to stasis, dominate second archon, try to hack one of the heavy robots (~70%), set both of my heavies to overwatch. But obviously, it is not enough.  Update: i'm asking this question because of final mission. Enemies will respawn in the final fight, so i must conserve ammo and medkits, otherwise i will be overwhelmed by packs of codices, cryssalids, mutons, those big daddy suits etc etc.


Nodes are points in space around a nucleus where the probability of finding an electron is zero. However, is there a reason for the existence of Nodes? I'm looking for an intuitive explanation if possible and links to any literature that gives the math behind :)

I have seen similar posts, but I haven't seen what seems to be a clear and direct answer.  Why do only a certain number of electrons occupy each shell? Why are the shells arranged in certain distances from the nucleus? Why don't electrons just collapse into the nucleus or fly away?  It seems there are lots of equations and theories that describe HOW electrons behave (pauli exclusion principle), predictions about WHERE they may be located (Schrödinger equation, uncertainty principle), etc. But hard to find the WHY and/or causality behind these descriptive properties.  What is it about the nucleus and the electrons that causes them to attract/repel in the form of these shells at regular intervals and numbers of electrons per shell?  Please be patient with me, new to this forum and just an amateur fan of physics.


I have a project I'm working on where each content manager/author would have a different set of allowed values on a select input for each node created.  Is hook_form_alter the best method for me to dynamically generate the options?  And what would the syntax kind of look like?

I need to have a select widget but with custom allowed values per user. Since in D7 I cannot use php code, I was wondering if there is some kind of hook I could use to achieve that functionality.  Thanks


My iPad 2 froze up and went into recover mode, I gave t to a friend to fix and it has come bk restored but I can't get on it because there is a passcode on it.  I've tried all the obvious ones I would have used but it will not let me in to set it up. Please help me! Is there a factory '4 digit' passcode it would reset to or would it be my friends passcode?

I have just fitted a new screen to my iPhone 5s, and i need to restore it to factory settings.  One problem though, it's disabled for over 23,000,000 minutes and the home button doesn't work.  Does anyone know how I can restore it?


I had this problem once, creating a procedure and then when I want to alter it I used to drop it first then re-create it again. Then I thought that was taking a lot of time. I had to find a better way!  which is the best way, to ease the time. and also incase you need to Alter it later??

I found that SQL stored procedures are very interesting and useful. I have written stored procedures but i want to write well crafted, good performance tuned and concise SPs for any sort of requirement and also would love to learn about any tricks or good practices for stored procedures. How do i move from the beginner to the advanced stage in writing stored procedures?  Update: Found from comments that my question should be more specific. Everyone has some tricks upon their sleeves and I was expecting such tricks and practices for SPs which they use in their code which differentiates them from others and more importantly spruce up the productivity in writing and working with stored procedures.


I'm wondering whether there's any way to enter the academic world, do research at a university for a living, without an undergraduate degree, but instead with several years of experience in industry (the same field of the research).  This is actually my situation. After 8 years of software development in several professional environments, I want to enter the academic world. But I'm frustrated about having to go back to the basics.

I've been working in the "private sector" since my late teens. I've gathered good web-development experience to be able to find work quite easily thankfully. I was never really interested in getting a degree, I only have a high-school diploma. I was passionate enough to study for myself and learn new things from colleagues and friends.  Web-development is still my passion, however recently I've been thinking about the actual work that I've been producing over the years for the companies I've worked for. It seems as though that even if the work is fun and challenging, I still get very little recognition for it: once the work is produced, my name is barely ever mentioned. I've been asking myself if all these things I'm building are really going to change someone's life.  Then I look at academia and research. Here people are doing things they actually love and study those subjects deeply with passion and generate new knowledge to help others within a specific field.   Has anybody ever switched from an industry job to an academic job? I'm wondering if it's possible to do research without a degree. What suggestions might you have for someone in my situation that wants to get a glimpse of the life of an academic where you can build and study something you actually love and not always do what "the company" wants.


I have to prove the statement in the title. As a lengthy hint the following is given:      Hint: let $a \in G$ $\not= e$. Suppose $a$ has period $p$ (for period   $p^2$ the answer is trivial), then consider the subgroup $H = <a>$.   Prove $b \notin H$ implies $G = <a, b>$. Is $H$ normal? Prove $a$ and   $b$ commute and conclude $G$ is abelian.   Getting to the point where I prove that $G = <a,b>$ is no problem. However, I don't see on how to proceed to prove that $H$ is normal and assuming that, that $a$ and $b$ commute. Some help would be greatly appreciated.

I have a group $G$ with $p^2$ elements, where $p$ is a prime number. Some (potentially) useful preliminary information I have is that there are exactly $p+1$ subgroups with $p$ elements, and with that I was able to show $G$ has a normal subgroup $N$ with $p$ elements.   My problem is showing that $G$ is abelian, and I would be glad if someone could show me how.   I had two potential approaches in mind and I would prefer if one of these were used (especially the second one).   First: The center $Z(G)$ is a normal subgroup of $G$ so by Langrange's theorem, if $Z(G)$ has anything other than the identity, it's size is either $p$ or $p^2$. If $p^2$ then $Z(G)=G$ and we are done. If $Z(G)=p$ then the quotient group of $G$ factored out by $Z(G)$ has $p$ elements, so it is cylic and I can prove from there that this implies $G$ is abelian. So can we show theres something other than the identity in the center of $G$?  Second: I list out the elements of some other subgroup $H$ with $p$ elements such that the intersection of $H$ and $N$ is only the identity (if any more, due to prime order the intersected elements would generate the entire subgroups). Let $N$ be generated by $a$ and $H$ be generated by $b$. We can show $NK= G$, i.e every element in G can be wrriten like $a^k b^l $. So for this method, we just need to show $ab=ba$ (remember, these are not general elements in the set, but the generators of $N$ and $H$).   Do any of these methods seem viable? I understand one can give very strong theorems using Sylow theorems and related facts, but I am looking for an elementary solution (no Sylow theorems, facts about p-groups, centrailzers) but definitions of centres and normalizers is fine.


My netbeans IDE shows ignored files on a different color. I presume, the IDE is knowing this by using some git command.  I wish to know what files on a project folder and subfolders are being ignored.  What command should we use?

I am getting my feet wet with Git and have the following issue:  My project source tree:  / | +--src/ +----refs/ +----... | +--vendor/ +----...   I have code (currently MEF) in my vendor branch that I will compile there and then move the references into /src/refs which is where the project picks them up from.  My issue is that I have my .gitignore set to ignore *.dll and *.pdb.  I can do a git add -f bar.dll to force the addition of the ignored file which is ok, the problem is I can not figure out to list what files exist that are ignored.  I want to list the ignored files to make sure that I don't forget to add them.  I have read the man page on git ls-files and can not make it work. It seems to me that git ls-files --exclude-standard -i should do what I want.  What am I missing?


I am very curious to know how to implement the Ctrl-K (code sample) feature against code.  For example:  public static void main(String args[]){             System.out.println.out("welcome"); }   Will that be nicely formatted?   Do we require any package to implement this? Any ready made code available to do this?   I am planning to develop a site where this feature would be really helpful.

How does the code  work with Ctrl + K? I am new to Stack Overflow.   I can't get it with Ctrl + K. I  press space button for 4 times in each line I post.


A have a lot of B classes, a class A has one object b. This object b has a function (calc) that needs a pointer to a method in an object of A. This method (fun) acess private variables in class (in my example just return 3).  class A;  class B { public:   virtual int calc ( int (A::*fun)())  {    return 2*fun();  }; };  class A {   B* b;  public:   A (B* b_) : b (b_) {};   int fun() { return 3; };   int run(){ return b->calc(&A::fun); }; };  int main() {   B* b = new B();   A a(b);   a.run();   return 0; }   How can I use a pointer to a method correctly in definition of calc method in class B?  I am getting this error message:  teste.cpp:10:58: error: must use ‘.*’ or ‘->*’ to call pointer-to-member     function in ‘fun (...)’, e.g. ‘(... ->* fun) (...)’    virtual int calc ( int (A::*fun)())  {    return 2*fun();  };                                                       ^

I want to create a function that performs a function passed by parameter on a set of data. How do you pass a function as a parameter in C?


Prove that for infinite set $A \setminus B$ and countable set $B$ it is true that $A \setminus B$ and A equinumerous.  Have tried to apply fact that every infinite set contains countable one, however don't understand what to do with elements enumeration needed for bijection.. P.S Problem topic has changed

This seems evident, but I cannot come up with a reasonable proof for:  Question: show that if $X$ is an infinite set and $Y$ is a countable set, then $|X \cup Y|=|X|$


I'm a beginner at java and I just recently started to study interfaces so I triead to make a program that had classes which implemented intefaces. Anyways, i ran into a problem with the while loop in my program. I'm tryng to give the user the opportunity to choose between talking to a robor or a person, and as far as i understand && checks for both of the conditions (If either one of them is true it runs the loop).  import java.util.Scanner; public class App {  public static void main(String[] args) {     Scanner ai = new Scanner(System.in);     Conversation guy = new Human();     Conversation rox = new Robot();     System.out.println("What do you want to talk to?");     String choice = ai.nextLine();     while (choice != "Robot" && choice!= "Person"){         System.out.println("Option not available, choose again.");         choice = ai.nextLine();     }     switch(choice){     case "Person":         System.out.println("What's my name?");         guy.greet();         guy.conv();         guy.bye();         break;     case "Robot":         System.out.println("What's my name?");         rox.greet();         rox.conv();         rox.bye();         break;     }     ai.close();      } }   I'm trying to make it so that if the input is neither "Person" or "Robot" it scans again for new input but despite the input being either one the program always runs the loop, Why?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


What is an intuitive explanation for the fact that the remainder of a Taylor polynomial has this equivalency? Why is z necessarily between x and c? Why does such a value for z exist in the first place?

Could you provide a geometric explanation of the Taylor series expansion?


I am currently testing in Java whether the use of a custom class or int arrays as a datatype is faster and ran speed tests for that purpose (see below).  int repetitions = 1000000000;  for (int i = 0; i < repetitions*10; i++) {     Move move3 = new Move(2, 3);     int sum3 = move3.x + move3.y; }  // object block long start = System.nanoTime(); for (int i = 0; i < repetitions; i++) {     Move move2 = new Move(2, 3);     int sum2 = move2.x + move2.y; } System.out.println("Object took " + (System.nanoTime() - start) + "ns");  // array block long start2 = System.nanoTime(); for (int i = 0; i < repetitions; i++) {     int[] move = new int[]{2, 3};     int sum = move[0] + move[1]; } System.out.println("Array took " + (System.nanoTime() - start2) + "ns");   Swapping around the timing blocks basically decides what is faster. This was by a factor of 4 originally, but running the meaningless first block beforehand reduced it to a factor of about 1.1. Why is this? Is there a "warmup period" for the JVM? And how could I get completely rid of the issue?   (I know, I can get all performance-related information from the fact that swapping changes the advantage, but I am curious what is happening here.)

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


Can someone tell me how to change table cellpadding and cellspacing like you can do it in html with:  <table cellspacing="0" cellpadding="0">    But how is it done with css?

In an HTML table, the cellpadding and cellspacing can be set like this:  <table cellspacing="1" cellpadding="1">   How can the same be accomplished using CSS?


This comes courtesy of one of the episodes of Friends:     There's lots of flavors out there.   Shouldn't 're be used here in lieu of 's?

For example:     There's two options here   or     There are two options here   I hear a lot of people say the first line (or something similar), but isn't that incorrect? Isn't it plural and therefore you should use "there are"?


It shows error like file size is too large, I am using through my institution Internet connection its limited access. so I need help to how could install the spark???   My system is Ubuntu 12.04 32-bit version.  Reply me even whatever mistake in my communication don't mind that...

I tried downloading the zip file but I couldn't find any binary or install file.  Is it available via apt or can we access the latest .deb file somehow?  edit  uname -a      Linux XXXX 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:17:25 UTC   2011 x86_64 x86_64 x86_64 GNU/Linux


When someone edits a post on Stack Exchange, there's a dropdown menu that says "Revision", the editor, the time, and a note.    But that dropdown menu does nothing at all. This is what the current revision looks like:    I select from the menu:    Now here it is:    That was just an example. I tried to revert my edit on my own posts, and the revision dropdown does nothing. So to revert my own post, I have to manually type it again.  Is there a reputation requirement? If so, why can't I use the dropdown on my own posts?

I only see this on sites where I don't have edit privileges, and only where there have been multiple revisions:        What exactly is this supposed to do?  Intuitively, I would expect it to change the text in the box to what it was at that revision, but it doesn't. And, if that's it, why only where I need to suggest edits?


I would please appreciate help showing: For $m$ a fixed integer          $\sum_{j=0}^\infty \frac{j+1}{m^{-js}}$ converges to $\frac{1}{(1-m^{-s})^2}$      There is a hint to treat the sum as a power series in $m^{-s}$.  A power series in $m^{-s}$ itself would converge to $\frac{m^s}{m^s-1}$ (for $m^s>1$).  Even if this is correct, that's as far as I could get, although the $(1-m^{-s})^{-2}$ looks like  a derivative was taken.  Thanks

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


Lets say I have a site at "myrandomdomain.com". I want to target a keyword "my keyword" and so I buy "mykeyword.com". Can I still have the keyword benefits of having mykeyword.com when it just forwards to myrandomdomain.com? The domain would not be masked. My guess would have been no but SEO Moz seems a bit unclear about it:     A 301 redirect is a permanent redirect which passes between 90-99% of   link juice (ranking power) to the redirected page.   I'd just like to make sure before I switch my site over. If it would have the same effect to forward it I'll just do that.

Lets say I have a domain already, for example www.automobile4u.com (not mine), with a website fully running and all.  The title of my "Website" says:    <title>Used cars - buy and sell your used cars here</title>   Also, lets say I have fully SEO the website so when people searching for the term buy used cars, I end up on the second or first page.  Now, I want to end up higher, so I go to the google adwords page where you can check how many searches are made on specific terms.  Lets say the term "used cars" has 20 million searches each month.  Here comes the question, could I just go and buy that domain with the search terms adress, in this case www.usedcars.com and make a redirect to my original page, and this way when people search for "used cars", my newly bought domain name comes up redirecting people to my original website (www.automobile4u.com)?  The reason I believe this benefits me is because it seems search engines first of all check website adresses matching the search, so the query "used cars" would automatically bring www.usedcars.com to the first result right?  What are the downsides for this?  I already know about google spiders not liking redirects, but there are many methods of redirecting...  Is this a good idea generally?


I am trying to put commas in the bibliography in between the names of the authors in Latex but it isn't working. Also, I have putted "and" between their names in the bibtex but it didn't work (it is showing me the word and when compiling instead of a comma!) I am using unsrt style. Does anyone have an idea what to do in that case?  @book{Emile,     title={The River},     author={Emile Colombos, Rita James and Tom Hardy },     volume={7},     year={2000} }

The code for reference is this  @article{matcontcl,  title= {MATCONT and CL MATCONT},  author = {A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and  B.Sautois},  year = {2006},  journal = {Continuation toolboxes in matlab}, }   This is the error that follows  This is BibTeX, Version 0.99d (TeX Live 2015/W32TeX) The top-level auxiliary file: PropuestaInvestigacion.aux The style file: abbrv.bst Database file #1: biblio.bib Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1049 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1049 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1090 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1090 of file abbrv.bst (There were 4 error messages)   How could I fix it?


I have problems with UTF-8 encoding in MySQL DB. I use HTML form to insert data in MySQL DB and PHP code to represent the data from DB. When I insert string "ąčęėįšųū" using HTML form, I see such “Ä…ÄÄ™Ä—Ä¯Å¡Å³Å«” symbols in DB in PHPMyAdmin. I don’t have problem with data representation on the WEB, the string “Ä…ÄÄ™Ä—Ä¯Å¡Å³Å«” is represented trough select function as "ąčęėįšųū".  My goal is to store data "ąčęėįšųū" not “Ä…ÄÄ™Ä—Ä¯Å¡Å³Å«”. Do you know how to solve this problem?   MySQL setting > my.ini   init-connect=SET NAMES  utf8 collation_server=utf8_unicode_ci  character_set_server=utf8  DB settings:  Database Collation > utf8_general_ci  Table Collation > utf8_general_ci  Field “Title” collation > utf8_general_ci  Apache > php.ini:   default_charset="UTF-8"  HTML form to submit data:    <!doctype html> <html>  <head>   <meta charset="utf-8">   <title>Untitled Document</title> </head>  <body>   <form id="form1" name="form1" method="post" action="tournaments-action.php" accept-charset="utf-8">     <p>       <label for="textfield">Text Field:</label>       <input type="text" name="title" id="textfield">     </p>     <p>       <input type="submit" name="submit" id="submit" value="Submit">     </p>   </form> </body>  </html>     PHP form for submiting data:    <?php include("../config.php");  $title = mysqli_real_escape_string($db, $_REQUEST['title']);  // attempt insert query execution $sql = "INSERT INTO tournaments (title) VALUES ('$title')";  if(mysqli_query($db, $sql)){    $msg="Records added successfully.";    echo "Loading"; } else{  $msg="ERROR: Could not able to execute $sql. ";     echo "Loading"; } // close connection mysqli_close($db); ?>

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I found answer for this question but not getting the satisfied answers. I am using Windows 7.

I have a harddisk with two partitions: one for windows and one for data. I've reinstalled windows on the first partition and formatted the data partition with full format (without /Q option) making sure that all my data is backed up. After that I've created the same folder structure (without files inside) on data partition as it was before formatting.   I then realized that all my photos were NOT backed up :((((  I've tried several tools to recover my data without any success:   Wordershare Photo Recovery Active File Recovery R-Studio PhotoRec from CGSecurity Recuva   There are max 50Mb of new data on that partition, so data overwriting is minimal.  What is the reason why I'm not able to recover my data with data recovery tools: full format or same folder structure?  And... can I get my photos back or they are lost forever?


Math isn't rendered on my Galaxy Note II in Math.SE when I access it through the new Android app. Is this a bug or has it just not been implemented yet?

MathJax isn't currently working on the Android app, which makes it totally useless for the 'technical' sites like  or .  For example, in the Android app:    Same post in a (mobile) browser:     Please add this functionality!


I was going some testing and decided to delete some library files in       /usr/lib/x86_64-linux-gnu/   (Horrible idea I know) The side effect of deleting those files is that I am unable to open the gnome or unity control center for Ubuntu.  When I open the control center by running unity-control-center -v  /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37: undefined symbol: sqlite3_errstr Failed to load module: /usr/lib/x86_64-linux-gnu/unity-control-center-1/panels/libinfo.so ** (unity-control-center:9666): DEBUG: Enabling debugging /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37: undefined symbol: sqlite3_errstr Failed to load module: /usr/lib/x86_64-linux-gnu/unity-control-center-1/panels/libinfo.so   I have everywhere for this error and tried reinstalling many many diffrent libs but none seem to work. This is different from other questions because the libraries can be restored by installing the right packages Using Ubuntu 16.04.3 LTS

I know this is something I shouldn't do, but it happened(Ubuntu 12.04.1 LTS) as a root user I deleted /usr/lib folder. Any ideas how to restore it?


I have a question regarding two-weapon fighting (5e). My player group had a discussion about this, and answers on the internet seem to yield different interpretations. Suppose the first (light) weapon is already drawn. Can you throw your first weapon, then draw your second (light) weapon in your other hand, and using your bonus action attack with that weapon? If so, does this allow you to get the bonus damage from dueling on both attacks? Two-Weapon Fighting in the PHB reads:  When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a different light melee weapon that you’re holding in the other hand. You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative. If either weapon has the thrown property, you can throw the weapon, instead of making a melee attack with it.  Does this have to be interpreted as:  Hold a weapon in each hand -> attack with one weapon -> able to use bonus action to use the other weapon.  Or can it be interpreted as:  Hold weapon in one hand -> attack with it -> able to use bonus action if, at any point, you wield a different weapon in your other hand.  If the second interpretation is correct, do you get the bonus damage from the dueling fighting style on both attacks, if you draw your second weapon after you attacked with the first one?

Say a Champion fighter has the "Two-Weapon Fighting" fighting style and the "Dual Wielder" feat. At 10th level, they pick up "Dueling" (+2 to damage rolls when wielding a single one-handed melee weapon) for their 2nd fighting style. Since they're 10th-level, their Extra Attack feature lets them make 2 attacks as part of the Attack action. Can they have one weapon drawn for their first attack, to benefit from Dueling - and only then draw another weapon for their second attack in the Attack action, in order to meet the requirement for Two-Weapon Fighting (and thus deliver another attack with their bonus action)?


I have a question about the top panel in gnome 3. I'm new to linux and want to remove the inner shadow of the top panel that appears when a window gets near the top panel. I use ubuntu 18.04. do you guys know how I can remove that shadow shown in the picture under here:    I want it to look like the picture under here even when a window is near the top panel like in the picture above.

In my Ubuntu 18.04 Top Panel becomes fully transparent when any window is not maximized.  When the window is Maximized    When the window is not Maximized   How can I resolve this issue?


Is it true that the implication $A \to \neg A$ is logically satisfiable if $A$ is false?  I beg your pardon if it is trivial but my logic is rusty.

How is the statement $\bot \to \top$ true? If, for example, I take the statement  $P = 2$ is an odd number $Q = 5$ is an odd number Then $P$ is false and $Q$ is true.  Clearly, false implies true translates to  if $2$ is an odd number then 5 is an odd number  which means that  if $2$ is not an odd number (i.e. even) then $5$ is not an odd number  which is clearly false as $2$ is indeed an even number. Please help me to find what I’m missing out in this. Thanks for your help!


So I freshly installed Ubuntu 18.04 alongside Windows 10. At installation I mounted C: and D: at home/drives/C - home/drives/D. I want to keep my working files in D therefore I am using git there, but every time I try running git status, git clone etc, the terminal wants me to use sudo.   Did I mount the volumes correctly? How can I get rid of the mounted volumes permissions?

I have a number of drives internal and external. Some are partitioned. Most mount automatically at boot (all did at one point).    One partition is owned by root and therefore does not mount automatically. I know how to mount it as root.   I do not know how to take ownership of that partition as user X. I have tried changing permissions using the gui in Nautilus as root. They are not accepted and immediately revert.  The partition is NTFS. The other parition on that drive is owned by me as user and mounts automatically


I can run a command like this:  tim@Hairy:~$ echo Hello Hello   Then I can run the command !! and it does it again:  tim@Hairy:~$ !! echo Hello Hello   I can even run it with another argument to the previous command:  tim@Hairy:~$ !! World echo Hello World Hello World   So what is the !! actually doing? I have struggled to search for it because a .

I am a user of Ubuntu with not much experience and I have been using sudo.  What does sudo !! do and how?


Can we actually prove with 100% accuracy that there are more than 3 dimensions plus time?  In the news there are always articles like "there are probably 7, 11 or more dimensions", "time is actually not a 4th dimension" etc.  My question is:   Could we be 100% sure that there are more than 3 dimensions and what field of physics except some theoretical or hypothetical branches of physics and mathematics take that in count that there are more than 3 dimensions plus time?  I know the example of a 2D "creature" being unable to see 3D creature (maybe only the interference when the 3d object collide with the 2d world. But I can argue that there are no 2d or 1d beings like in that episode of Star Trek. So, this proof is only an illusion and all we see is 3d and not 1d or 2d. the light itself is bending in space-time depending how the object looks.   I think that 1d or 2d objects can not exist in 3d world at all and it's just an illusion we created, the same way as we speak about 4th,7th etc. dimensions and probably it's all 3d (or chose the name as you wish).  Is this guy correct that 3 dimensions and time is all we need?  Could it be that we are creating other dimensions only because we don't understand our Universe good enough?  I mean, don't get me wrong, but the whole 7,11,21,1000-dimensions seems to me like a marketing, something too provincial (as Feynman would say), something like... religion ;D.

As human beings, we observe the world in which we live in three dimensions. However, it is certainly theoretically possible that more dimensions exist.  Is there any direct or indirect evidence supporting a fourth dimension?


Header file for a simple template, trivial_template.hpp.  // Import packages from the C++ STL #include <string> #include <cstring> #include <stdio.h> #include <utility> #include <limits.h>         // For std::LONG_MIN  #ifndef __TRIVIAL_TEMPLATE_H #define __TRIVIAL_TEMPLATE_H using namespace std;  template <typename T> class trivial_template {     public:         trivial_template();         ~trivial_template();         static bool is_non_negative(T a_num);         T square_given_number(T a_num); }; #endif   Implementation file for a simple template, trivial_template.cpp.  #include "./trivial_template.hpp"  template <typename T> trivial_template<T>::trivial_template() { }  template <typename T> trivial_template<T>::~trivial_template() { }  template<typename T> bool trivial_template<T>::is_non_negative(T a_num) {     return (0 <= a_num); }  template<typename T> T trivial_template<T>::square_given_number(T a_num) {     return (a_num*a_num); }   The C++ main file that uses it.  #include <iostream> #include <iomanip> #include <string> #include <cstring> #include <math.h> #include <climits> #include <cfloat> #include <ctype.h> #include <stdio.h> #include <stdlib.h>  #include "../../elements/trivial_template.hpp"  using namespace std;  int main(int argc, char *argv[]) {     cout << "   ###" << trivial_template<int>::is_non_negative(493) << "===" << endl;     trivial_template<int> *a_ptr;     cout << "   ###" << a_ptr->square_given_number(5) << "===" << endl;     // 0.25^2 = 0.0625     trivial_template<long double> *b_ptr;     cout << "   ###" << b_ptr->square_given_number(-0.25) << "===" << endl;     // 16.25^2 = 164.0625     cout << "   ###" << b_ptr->square_given_number(-16.25) << "===" << endl;     return 0; }   My commands to compile, link, and run it are:  g++ -std=c++0x  -c  ../src/elements/trivial_template.cpp g++ -std=c++0x  -c  ../src/test/temp/test_templates.cpp g++ -std=c++0x  -o  ./test-boilerplate-code *.o   During linking, the following error message is produced:  Undefined symbols for architecture x86_64:   "trivial_template<long double>::square_given_number(long double)", referenced from:       _main in test_templates.o   "trivial_template<int>::is_non_negative(int)", referenced from:       _main in test_templates.o   "trivial_template<int>::square_given_number(int)", referenced from:       _main in test_templates.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [template] Error 1   When I tried this simple example using different paths for the location of the C++ source file, it works. Its output is:      ###1===     ###25===     ###0.0625===     ###264.062=== real         0.22 user         0.00 sys          0.00   Why is there this discrepancy? What is going on?   In addition, can you please kindly help me fix the linking error?  Thank you very much, and have a good day!

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Every day I see many of such accounts being created. They rarely post spam (probably because they get blocked by the system) and if they do post spam content they are sometimes nuked by mods. I am not sure what is the purpose of creating them if the profile pages are rarely seen by anyone unless they post some content. They do contain spam in their profiles quite often, though.  It would not be very difficult to write an automated bot to watch these accounts and catch any content as soon as it is posted. My question is however, should we even bother to pre-emptively look for such spam accounts and watch what they are doing or mod-flag them before they do anything. (Mods could decline such flags based on lack of evidence).  Some examples from the past 20 minutes:

Super User got hit by another batch of spammers creating profiles. They've got accounts on other sites from what I've heard from other mods and from the comments here.  Last time it was streaming. Now it's  (as of december, looks like they're spamming scammy finance too). I have 160+ pages of users from that search, and a quick look suggests most of them are spammers. Comments from this post indicates it's network wide - and a quick check indicates Stack Overflow has a handful of these too, though not as many as we have.  While the powers at be have been taking action, both directly, and indirectly, it feels like between shared IPs and search, mods might be able to take a good chunk of these out if we can somehow have a way to delete accounts somewhat in bulk. You guys are awesome. But these... People keep doing it still, and it would be nice to see their works undone.  Unlike our streaming spammers, they've switched to phone numbers, presumably because Adam so kindly blocked links.    There's a few good suggestions at mitigating these - but ideally - I've heard from fellow mods that we want them gone.  They add to the broken window effect - which we can't do anything about due to sheer volume, and they probably poison our search engine results.  We can probably reduce the risk of oops by filtering by IPs (clearing everything on an IP lets me whack, 10, or so users at once, rather than clicking through 3-4 pages a user) and optionally selectively not deleting accounts that seem legit, we can probably clear out a bunch of these without really needing CM intervention. It does make it a little too easy, but these incidents, well kinda need a flamethrower's gentle warmth.  I'm cool with a no. I'm probably going through the usual channels in future. Would be nice to have something that lets mods deal with this effectively though.  Related:    - Actually goes into the impact of this  by a user - so clearly these are discoverable to an average user


As I'm relatively new to Java, i'm still not sure about the basic pass-by-value/pass-by-reference thing. I've read this question on SO: , which seems to have some very good answers. One of the articles referenced in one such answer was .   After reading the answers, and the article, I thought:    Everything in Java is pass by value, there's no pass by reference (follows from the readings). Primitives are always passed by value (my thought) Objects are passed by reference (my thought) The point above(3) is actually wrong and Object references are passed by value (follows from the article).   So now, I'm struggling between points 3 and 4. I wrote this simple class to clear things a bit:  package Chap_1;  /**  * Created by user1 on 7/18/15.  */ public class JavaTest1 {      private double balance;      public JavaTest1(double amt) {         balance = amt;     }      public double getBalance() {         return balance;     }      public void method1() {         JavaTest1 obj1 = new JavaTest1(300.00);         System.out.println("Balance in method1 before method2= " + obj1.getBalance());         method2(obj1);         System.out.println("Balance in method1 after method2 = " + obj1.getBalance());     }      public void method2(JavaTest1 o) {         o.balance -= 100.00;     }      public static void main(String[] args) {         JavaTest1 j1 = new JavaTest1(500.00);         System.out.println("Balance in main before= " + j1.getBalance());          j1.method1();         System.out.println("Balance in main after = " + j1.getBalance());      } }   With this code, I get the output:   Balance in main before= 500.0 Balance in method1 before method2= 300.0 Balance in method1 after method2 = 200.0 Balance in main after = 500.0   My observations are:   In main, things get started with one JavaTest1 object j1, with a starting balance of 500. j1 then calls method1(). In method1(), another JavaTest1 object is created, with starting a balance of 300. method1() then calls method2().  In method2(), an object of type JavaTest1 is passed. This method then deducts 100 from the balance of the object reference that was passed to it.  When I run the code, I see that the balance of the object created in method1 is reduced to 200 in method2().   Now this is where my confusion lies. If object references are passed as values, then the balance deduction in method2() should not have modified the object created in method1(). But since it did modify the balance, doesn't it essentially say that objects are always passed as references, proving that both method1() and method2() operate on the same object. Otherwise, method2(JavaTest1 o) should have created another object of type JavaTest1 with it's reference being called o.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I currently have a B1/B2 visa valid till 2020. My Husband is in the US currently working under his OPT. I would like to visit him on a tourist visa. Can I travel on my B1/B2 visa? Am I allowed to stay for 6 months or 1 year? Can I by any chance extend it from the US itself? Also do I need an invite letter/ sponsorship from my husband for me to travel on B1/B2 visa?

I got a B1/B2 visa earlier this year when I traveled to the US for a business trip from my company. It expires in 2013 and I'd love to visit the United States again, but for no other purpose than traveling.  I wonder:        If I can legally travel to US with B1/B2 visa without a real business need (assuming I'm honest);   If I have to work at my current company to be able to use it.      I live in Russia.


Some creatures, such as the Specter (MM, p. 279), have a feature that reduces a victims maximum hit points:     Life Drain. Melee Spell Attack: +4 to hit, reach 5 ft. , one   creature. Hit: 10 (3d6) necrotic damage. The target must   succeed on a DC 10 Constitution saving throw or its hit point   maximum is reduced by an amount equal to the damage taken.   This reduction lasts until the creature finishes a long rest. The   target dies if this effect reduces its hit point maximum to 0.   Say someone dies from this effect, and his/her companions want to revive the victim. What would, therefore, happen if they tried this with a spell such as Revivify, Raise Dead or Resurrection, neither of which mention a removal of such an effect? (True Resurrection would remove the effects, but that's a 9th level spell. Dying from max hit point reduction when you have access to level 9 spells seems unlikely).  Raise Dead in particular states:     This spell doesn’t, however, remove magical diseases, curses, or similar effects; if these aren’t first removed prior to casting the spell, they take effect when the creature returns to life.   Hit points can only assume a value between  0 and the maximum value (PHB, p. 196).  Would a creature with 0 maximum hit points that is revived therefore return with 0 hit points - alive, but unconscious? Or is it impossible to revive the creature?

So, a character died from Draining Kiss of a succubus and his Max HP is 0. Can he be restored by Raise Dead, or does he need a higher level spell? Or a Greater Restoration cast on his lifeless body before Raise dead? I'm probably interested in RAW interpretation, since the character is in Adventurerer's league.


I am working on the following proof:     Prove that $f_n(x)$ is irreducible over $\mathbb Z$ for all $n\in$ Z, with $n\not=4$, where $f_n(x)=1+(x-1)(x-2)\cdots(x-n)$.    I found that $f_4(x)$ can be factored into $(x^2-5x+5)^2$.  I was thinking of proving cases, 1, 2, 3, and 5, and then performing induction to get the rest, but I have come to a roadblock. After assuming irreducibility in the $k^{th}$ case, I arrive at:  $f_{k+1}(x)=1+(x-1)(x-2)...(x-k)(x-k-1)$.   I honestly have no idea how to proceed from here, or if induction will work for this proof.   Thanks for any ideas.   -MathUser3

I try to solve this problem. I seems to come close to the end but I can't get the conclusion. Can someone help me complete my proof. Thanks          Show that the polynomial $h(x) = (x-1)(x-2)\cdots(x-n) + 1$ is irreducible over $\mathbb Z$ for all $n\ge1$ and $ n\ne4$.      Suppose $h(x) = f(x) g(x)$, then we must have $f(i)g(i) = 1$ for all $i = 1,2,...n$. So both $f(i)$ and $g(i)$ are $1$ or $-1$. In either case, $m(x) = f(x) - g(x)$ has degree smaller than $n$ and have $n$ different roots ($1,2,...,n$). So we must have $m(x) = 0$. Then $h(x) = f(x)^{2}$. So $n$ must be even. Let $n = 2k$. Because $f(x)$ has degree $k$, there are $k$ values from $\{1,2,...,2k\}$ at which $f(x)$ is $1$ and $k$ values at which $f(x)$ is $-1$.  This is where I got stuck. Hope some one can help me solve this. Thanks.


For random variable $X$, entropy is calculated as $H(X) =-\sum_i p(x_i) \ln p(x_i)$. Differential entropy, not shown, is its continuous counterpart. Both use log probabilities which convert the original probabilities, whose range was $[0,1]$, to the log scale which changes the range to $[-\infty,0]$. It not uncommon to see exponential entropy being used instead, $\exp( H(X))$, I think to circumvent a singularity at $H(X)=0$. As we know, taking the exponential of a log will undo the log. Given that the raw probabilities have been upgraded to log probabilities in the entropy measure, what is the intuition behind further upgrading the entropy measure by undoing its logs using $\exp$?

Differential entropy (the continuous version of Shannon's entropy measure) is $$ H = - \int_{-\infty}^\infty f(x) \log f(x) \mathrm{d}x, $$ where $f(x)$ is a probability density function. What is the intuition behind computing the exponential entropy of this? Are the properties of the original improved? $$ \exp(H) = \exp\Bigg[ -\int_{-\infty}^\infty f(x) \log f(x) \mathrm{d}x \Bigg]  $$ I'm guessing that the exponentiation means something, but what?  According to Cover and Thomas (1991), entropy as a measure of uncertainty is:  homogeneous not left bounded not sub-additive  therefore, it lacks three of four desirable properties of coherent risk measures. The exponential function attempts to account for these issues but does not achieve this adequately.


I saw this problem here . Can anybody explain why I am getting different results using the following method. Notations: S(x4) = sum of all terms (each having coefficient 1) consisting of only one variable to the power 4 = x4 + y4 + z4 = A S(x3y) = sum of all terms (each having coefficient 1) consisting of 2 variables where one of them has power 3 and the other one has power 1 = x3y + x3z + y3x + y3z + ….  = B Similarly, S(x2y2) = C and S(x2yz) = D 14 = (x + y + z)4 = S(x4) + 4S(x3y) + 6S(x2y2) + 12S(x2yz) [you can use this website to verify if you have doubt: ] Or, 1 = A + 4B + 6C + 12D  …………………………………….(1) 22 = (x2 + y2 + z2)2 = S(x4) + 2S(x2y2) Or, 4 = A + 2C     ………………………………………………..(2) 3.1 = (x3 + y3 + z3)(x + y + z) = S(x4) + S(x3y) Or, 3 = A + B   …………………………………………………...(3) 12.2 = (x + y + z)2(x2 + y2 + z2) = S(x4) + S(x2y2) + 2S(x3y) + 2S(x2yz) Or, 2 = A + C + 2B + 2D  ………………………………………..(4) Eq(4) - Eq(3) gives -1 = C + B + 2D ………………………………………………….(5) Eq(1) - Eq(3) gives -2 = 3B + 6C + 12D Or, -⅔ = B + 2C + 4D …………………………………………….(6) Eq(6) - Eq(5) gives -⅔ + 1 = C + 2D Or, ⅓ = C + 2D ……………………………………………………(7) Eq(1) - Eq(2) gives -3 = 4B + 4C + 12D Or, -¾ = B + C + 3D ………………………………………………(8) Eq(8) - Eq(7) gives -¾ - ⅓ = B + D Or, -13/12 = B + D Or, -13/6 = 2B + 2D …………………………………………….(9) Eq(4) - Eq(9) gives 2 + 13/6 = A + C      or, A + C = 25/6 Or, 25/3 = 2A + 2C ………………………………………………..(10) Eq(10) - Eq(2) gives A = 25/3 - 4 = 13/3 Ans is x4 + y4 + z4 = 13/3 . But in this video  They say the answer is 25/6. I didn’t understand nor want to understand how they reached that solution. All I want to know if my answer  13/3 is correct or wrong. If wrong then please explain why my method gives incorrect result. I tried to solve by similar method for x5 + y5 + z5  and got different result from what is shown in the video.

Please help me. There are equations: $x+y+z=3, x^2+y^2+z^2=5$ and $x^3+y^3+z^3=7$. The question: what is the result of $x^4+y^4+z^4$?  Ive tried to merge the equation and result in desperado. :( Please explain with simple math as I'm only a junior high school student. Thx a lot


How can we find all invertible elements of $\mathbb Z[i]=\{a+bi | a,b \in \mathbb Z\} \subseteq \mathbb C$?  The idea is: let $u=a+bi$ be an invertible element and let $v=c+di$ be the inverse element of $u$ over $\mathbb Z[i]$. This implies that $uv=1$, but how do i continue from here on out? Are there any more elegant solutions to this question?  And shouldn't be every element invertible in $\mathbb Z[i]$ since $\mathbb C$ is an integral domain? I appreciate your help, thank you!

How can we show that $\pm 1, \pm i$ are the only units in the ring of Gaussian integers, $\mathbb Z[i]$?  Thank you.


Assume $\mathbf{U} = (U_{1}, U_{2}, U_{3})' \sim unif(S^{2})$. How would I show that $U_{1} \sim unif(-1,1)$?  I don't know if I'm confusing myself, because I can't see this as being true for higher dimensions.

If $X=(x,y,z)$ is a random point uniform on the unit sphere in $\mathbb{R}^3$,  Are the  coordinates $x$, $y$, $z$ uniform in interval $(-1,1)$?


I have a following question:  I know I have to use first place then time. But I want to make sure about following sentence :     That was a great experience to teach them at Yale University in (the) winter semester 2017.    Do I need to say "the" winter semester?

Reading an old  I found this sentence (you must hover the mouse over the picture to see it):     There are probably children out there holding down spacebar to stay warm in the winter!   I've never heard "in the winter", only "in winter". I've found a discussion on , where they seem to say that there is not much difference and it comes down to personal taste, but they don't sound like they are sure. The user that asked the question suggests that this might be a difference between American English and British English, but at that point no one answered.  So, what's the difference between "in winter" and "in the winter"?


We can access the value of a certain index in a list like so:  letters = ['a','b','c','d','e','f'] print letters[1]   The code above will print the letter 'b', because it is in the index 1 of the list, letter. So in this way, we can access a certain object in a list.  Now, if we assume that letters = ['a','b','c','d','e','f'], what code should we type to access the index of a certain object (assume it is the letter, 'c') in the list, letters?  Any and all help will be appreciated.

Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?


I need a hint (just a hint please, not a full answer) to proving that $(2, 1+\sqrt{-5})$ is a prime ideal in $\mathbb{Z}[\sqrt{-5}]$. I'm trying to prove it via definition of a prime ideal and deriving equations but it just gets too complicated and equations are just so long. Anyone might suggest another way?  Thanks

I am working with the ideals $\mathfrak{p}=\left<2,1+\sqrt{-5}\right>, \mathfrak{q}=\left<3,1+\sqrt{-5}\right>, \mathfrak{t}=\left<3,1-\sqrt{-5}\right>$ and I am trying to prove that they are prime in $\mathbb{Z}[\sqrt{-5}]$.  I understand a good method to do this involves taking norms of each element that generates the ideals. This gives, for instance, the norms of the generators of $\mathfrak{p}=4,6$. These are both divisible by $2$. I have also calculated $\mathfrak{p}^2=\left<2\right>$. I get the feeling that since both norms are divisible by the generator of the ideal squared this proves it is prime, but I am not quite sure why.   In a similar vein, the norms of the generators of $\mathfrak{q,t}=9,6$ which are both divisible by $3$. I know $\mathfrak{qt}=\left<3\right>$, but I am not sure if this is relevant, since it is not either ideal squared. I think the norm of the ideal itself being prime implies the ideal is prime, but I am not sure how to find the norm of the ideal from the norm of its generating elements.  This question is similar to: , but I don't quite understand the reasoning behind the chosen answer. I am not sure how the answerer deduces that the example there is prime either. Following their reasoning as far as I can, the  fact that $2$ divides both norms means that $\left<2\right> \subset \mathfrak{p} \subset \mathbb{Z}[\sqrt{-5}]$ but I'm not sure how, and then I don't know how this proves it is prime.


A client sent me a 420 KB photo, saying the file size was too low for a web form with a minimum requirement of 1 MB.  I opened it in Preview app, chose File > Export… and the JPEG quality slider was initially at roughly 80%. At that setting, the new file size was higher at 503 KB. If I dragged the slider to Best quality the file size increased to 1.5 MB.  Unless I'm incorrect in thinking this, the app can't add any new image data to increase the quality of the JPEG, right? I understand it might add some for a thumbnail but the photo already displays one of those. So what's Preview adding to the file that would increase its file size at all, let alone by over 300% for Best quality?

I was experimenting with JPEG quality loss upon resaving and noticed that not only (even after four resaves) did the quality not degrade (down to pixel level), but the file sizes actually increased by 200 kb or so each time.  Can anyone give an explanation for this?  Where is this newly created information that increases the file size even coming from?  I would have expected at least slight degradation and a decrease in file size. I saved using Photoshop’s save for web function and 100 % quality.      *Original (top) - 798kb *After 5 saves (bottom) - 1020kb


I have a date time string formatted as follows:  2012-12-03T02:00:00Z  I want to split the date and time up and display it as follows: 03/12/2012 02:00:00  How can I do this in python in as few a lines as possible?? (The 'T' and 'Z' will be removed)

I need to parse  strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type.  I have found  in the Python standard library, but it is not very convenient.  What is the best way to do this?


Is there a way I can set particle size equal to a texture map in Blender? I can't find any setting to do it in the particles tab. Maybe this is a feature that could be added to Blender?

I'm trying to make a forest with a particle system, but I want a controlled variation in tree size. Is it possible to use a displacement texture or something similar to control the size of the particles?


First lets consider that a species is a group of individuals that can reproduce by breeding fertile offsprings.  It's usually said that evolution takes a very long time. Lets say that 1000 generations are required for species A to evolve into species B.  Which species would generation 999 belong to, A or B ? If A then it means that there was no evolution in 999 generations and that the entire evolution is going to happen in a single generation from 999 to 1000. If B then which specie does generation 998 belong to ? etc etc  In the end it seems to me that if there is evolution it can only be instantaneous, but that requires many improbable things, one of them being that the spermatozoids and ovules of species A contain DNA of species B !  How does that work ?  EDIT this is not a duplicate I'm not asking what a species is I'm asking what is the genetic process of evolution, how do we move up in the evolution tree.

To be clear, I'm not doubting that homo sapiens and homo neanderthalensis did interbreed: of that much I'm convinced.   Within the past few years I've seen an upcropping of pop-sci articles discussing the interbreeding between pre-historic species of humans. In everything that I see in these articles, as well as in scientific literature (my college Bio textbook, among others), I see these different humans being referred to as separate species.   This conflicts with my understanding of a species. Given the following definition, wouldn't homo sapiens and homo neanderthalensis be the same species?     A species is often defined as the largest group of organisms where   two hybrids are capable of reproducing fertile offspring, typically   using sexual reproduction.      Is this definition incorrect?  Are the publications using "species" colloquially, as opposed to scientifically?  Is "species" still a poorly defined concept? (see )   Thanks!


I am parsing a log file with 3 variations of a line and I'm trying to build a regex that matches and groups all variations.  Here are the line variations:  StatementId: [12345], UserId: 8756  StatementId: 12345, UserId: 8756  StatementId: [12345,6789], UserId: 8756   The current expression I have matches all cases, except #3.  I am expecting 2 groups. Using the lines above, the first group would be either 12345 or 12345,6789 The second group would simply be 8756  The problem I'm having is with line variation #3. The closing bracket ] being included in the first matching group.  Thus for line #3 the first group result is:  12345,6789]   I'm using this site for testing:    Here is my regex:  (?:StatementId: \[?)(.*)(?:\]?, .*UserId: )([0-9]*)   What am I doing wrong?  EDIT:  I've attempted the suggested non-greedy solution(s) in several variations but that doesn't appear to solve the problem.  The expression variations I've tried will work on a single line variation, but not on all 3.  SOLUTION:   in the comments had 2 suggested solutions, both of which work.

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I work three days a week and need to set an out of office for Mondays and Thursdays, but I do not remember to set it each Friday and Wednesday before I leave. Can I set up a recurring out of office for just these days?

I have a lazy colleague who always forgets to put her Out of Office on two days during the week when she is not at work. My question is, Is there a way in Microsoft Outlook via VB or a rule to send the auto replies on on certain days during the week?  For example person A is not in Tuesday, therefore a script triggers and the OOF is activated.  Is this possible?