I am using bind9 on a dedicated vps with ip: xx.xx.xx.xx  And i have vps server with webserver and its ip: yy.yy.yy.yy  Question: it is correct to point nameservers, e.g. ns1.domain.com/ns2.domain.com to bind9 server with following ip: xx.xx.xx.xx then on bind9 server create a zone file with a following values:  ; BIND data file for domain.com ; ;$TTL 14400 $TTL 3600 @ IN SOA dns1.domain.com. srv.domain.com. ( 2014241000 ; Serial 7200 ; Refresh 120 ; Retry 2419200 ; Expire 604800) ; Default TTL ; @ IN NS dns1.domain.com. @ IN NS dns2.domain.com.  @ IN MX 1 ASPMX.L.GOOGLE.COM. @ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM. @ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM. @ IN MX 10 ALT3.ASPMX.L.GOOGLE.COM. @ IN MX 10 ALT4.ASPMX.L.GOOGLE.COM.  mail IN CNAME ghs.googlehosted.com.  @ IN A yy.yy.yy.yy  dns1 IN A xx.xx.xx.xx dns2 IN A xx.xx.xx.xx www IN A yy.yy.yy.yy ftp IN A yy.yy.yy.yy @ IN TXT "v=spf1 a mx ip4:yy.yy.yy.yy include:spf.mandrillapp.com include:_spf.google.com ?all"   In a short: pointing nameserver (ns1,ns2) to bind (DNS server) then pointing bind to another server (webserver without bind).


Should I put a comma before the last item in a list?     I would like crackers, cheese and some soda.   I would like crackers, cheese, and some soda.


Why does a proof of $\exists f: X\to Y$ injection $\iff \exists g: Y \to X$ surjection requires the axiom of choice?  This question is answered here:   I'm not interested in a proof itself of this theorem, I want to know why this requires the Axiom of Choice.


E/AndroidRuntime: FATAL EXCEPTION: main                   Process: dev.game.adventure, PID: 21482                   java.util.ConcurrentModificationException                       at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966)                       at java.util.LinkedList$ListItr.next(LinkedList.java:888)                       at dev.game.adventure.Troll.wakeup(Troll.java:32)                       at dev.game.adventure.Simulation$1.run(Simulation.java:29)                       at android.os.Handler.handleCallback(Handler.java:789)                       at android.os.Handler.dispatchMessage(Handler.java:98)                       at android.os.Looper.loop(Looper.java:164)                       at android.app.ActivityThread.main(ActivityThread.java:6541)                       at java.lang.reflect.Method.invoke(Native Method)                       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)   I got the above trace after running in the emulator for some time. What does it mean? How can I resolve it? I can't even reproduce it because it only happens after some time. This is the offending code:  thing = i.next(); (Troll.java:32)  Class Troll.java  package dev.game.adventure;  import android.os.Handler; import android.widget.Toast;  import java.util.*;  public class Troll extends WalkingPerson {      private boolean hasCoke = false;     private AdventureActivity target;      Troll(Simulation s, World world, String name, AdventureActivity app) {         super(s, world, name, R.mipmap.lobgoblin, app);         this.target = app;         goTo("Kulverten", target);     }      public void wakeup() {          Person victim = (Person) (place.persons.toArray()[((int) (Math.random() * place.persons                 .size()))]);           if (victim instanceof Troll) { // Don't commit suicide         } else {             say("Victim is " + victim.getName() + ".", target);             Thing thing;              for (Iterator<Thing> i = victim.things.iterator(); i.hasNext(); ) {                  thing = i.next();                  if (thing instanceof CocaCola) {                     hasCoke = true;                     victim.things.remove(thing);                     world.update(place, target);                     say("Now I take your Coca Cola!", target);                     //TODO: Actually take the drink                 } else {                     drop(thing.name, target); // drop all items so that the key doesn't end up in heaven                 }             }              if (!hasCoke) {                 say("Now I kill you!", target); // TODO: Take all the items of the victim                 //  this.getWorld().playAtPlace(place, "effects/gong");                 final Person victim2 = victim;                 Handler handler = new Handler();                 handler.postDelayed(new Runnable() {                     @Override                     public void run() {                         victim2.goTo("Heaven", target);                         world.update(victim2.place, target);                         world.sayAtPlace(victim2.place, "-- Game Over --", target);                         if (victim2.getName().equals("You")) {                             target.ag.setBackground(world.getPlace("Heaven").getImage());                             final Toast toast = Toast.makeText(target.ag.getContext(), "GAME OVER!\n", Toast.LENGTH_LONG);// duration);                             toast.show();                         }                      }                 }, 1500);             }         }         Handler handler = new Handler();         handler.postDelayed(new Runnable() {             @Override             public void run() {                 if(Math.random() > 0.3)                     go(place.randomDoor(), target);             }         }, 2500);         s.wakeMeAfter(this, (80 + Math.random() * 1000));     } }


Multiple regression - singularity issues


How to prove that $p-1$ is squarefree infinitely often?

How to prove that $p-1$ is squarefree infinitely often, where $p$ is prime?  I had thought of using Dirichlet's theorem on arithmetic progressions.  The number of squareful values of $p-1$ less than or equal to $n$ is bounded by $\sum_{q}{\pi_{q^2,1}(n)}$, each term $\pi_{q^2,1}(n) \approx \frac{\pi(n)}{q \cdot (q-1)}$, and $\sum_{q}{\frac{1}{q \cdot (q-1)}} \lt 1$.  But using for example , the possibility is open that the error in each approximation for $\pi_{q^2,1}(n)$ may continue to increase with $q$, and since the sum runs up to $\sqrt{n}$, this argument is invalid.  Is there a more refined version of Dirichlet's theorem that can be used to circumvent this issue?  Or an entirely different way to prove this statement?


Basically, I've taken the current badges on StackOverflow, and broke them into actions you can perform on the site. (Posting, Editing, etc).   Once I decided on the actions, I gave each action a gold, silver, and bronze badge, and saw which badges actually fit into those categories.  This left me with a list that shows which site actions don't have certain levels of badges in them. I'm not saying that we should put these badges in place, I'm just giving an overview of where the disconnects are.  Enjoy!  Posting   Question   Views    [b] Popular Question - Asked a question with 1,000 views    [s] Notable Question - Asked a question with 2,500 views    [g] Famous Question - Asked a question with 10,000 views    Votes    [b] Student - Asked first question with at least one up vote    [b] Nice Question - Question with score of 10 or more    [s] Good Question - Question with score of 25 or more    [g] Great Question - Question with score of 100 or more    Favorite    [b]    [s] Favorite Question - Question favorited by 25 users    [g] Stellar Question - Question favorited by 100 users    Tagging    [b]    [s] Taxonomist - Created a tag used by 50 questions    [g]   Answers    Votes    [b] Nice Answer - Answer with score of 10 or more    [s] Good Answer - Answer with score of 25 or more    [g] Great Answer - Answer with score of 100 or more     [b] Teacher - Answered first question with at least one up vote    [s] Enlightened - First answer was accepted with at least 10 up votes    [s] Guru - Accepted answer and voted up 40 times    [g]    Commenting    [b] Commentator - Left 10 comments    [s] Pundit - Left 10 comments with a score of 5 or more    [g]     Bounty    [b] Altruist - First bounty you manually awarded on another person's question     [b] Benefactor - First bounty you manually awarded on your own question     [b] Investor - First bounty you offered on another person's question     [b] Promoter - First bounty you offered on your own question     [s]    [g]    Low-vote accepted answers    [b]    [s] Tenacious - Zero score accepted answers: more than 5 and 20% of total     [g] Unsung Hero - Zero score accepted answers: more than 10 and 25% of total   Reviewing   Voting   [b] Supporter - First upvote   [b] Critic - First downvote   [s] Civic Duty - Voted 300 times   [g] Electorate - Voted on 600 questions and 25% or more of total votes are on questions   Editing   [b] Editor - First edit   [s] Strunk & White - Edited 80 posts   [g] Copy Editor - Edited 500 posts   Retagging   [b] Organizer - First retag   [s]   [g]   Rollback   [b] Cleanup - First rollback   [s]   [g]   Flagging   [b] Citizen Patrol - First flagged post   [s] Deputy - Raised 80 helpful flags    [g] Marshal - Raised 500 helpful flags   Deleting   [b] Disciplined - Deleted own post with score of 3 or higher   [b] Peer Pressure - Deleted own post with score of -3 or lower   [s]    [g]  Site   Viewing   [b]   [s] Enthusiast - Visited the site for 30 consecutive days   [g] Fanatic - Visited the site each day for 100 consecutive days   Reputation   [b] Mortarboard - Hit the daily reputation cap for the first time   [s] Epic - Hit the reputation cap of 50 days   [g] Legendary - Hit the daily reputation cap on 150 days   Membership   [b] Autobiographer - Completed "About Me" section of user profile.   [s] Beta - Actively participated in the Stack Overflow private beta   [s] Yearling - Active member for a year, earning at least 200 reputation   [g]   Misc  [b] Scholar - First accepted answer on your own question  [b] Self-Learner - Answered your own question with at least 3 up votes  [b] Tumbleweed - Asked a question with no answers, no comments, and low views for a week  [s] Generalist - Provided non-wiki answers of 15 total score in 20 of top 40 tags  [s] Necromancer - Answered a question more than 60 days later with a score of at least 5  [g] Populist - Provided an answer that outscored an accepted answer with 10 votes by 2x  [g] Reversal - Provided answer of +20 score to a question of -5 score   Hopefully this may be of use to someone.


Saw two different tires. One marked 700c 38mm 40 622 measured 1.25 " wide.Other tire ,same markings but with addition of marking, one and five eighths x one and a half,measured 1.5" wide. If both 38mm wide why quarter inch difference in width?


no graphic card performance on Mate desktop

I just installed Ubuntu 12.04 and installed my Nvidia graphic card proprietary drivers  ! and that worked fine with the compiz effects ! then i installed Mate desktop but there those effects disappeared seems like the graphic card driver doesn't do job anymore on Mate !


How do i open a Terminal with a command ready?

I really want to know this. I don't always want to open a terminal then press Up arrow a couple of time or copy paste


Weird error: use of \rotatebox command causes boldface text to become persistent in xetex

Please see this MWE given below (excerpted from a much larger document) where we are using two languages. English is the main language, and  is the second language.  \documentclass{article}  % For bilingual document \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{english} \defaultfontfeatures{Ligatures=TeX}  % Times New Roman used \setmainfont[Mapping=tex-text, Ligatures=TeX]{Times New Roman}  % Bangla \setotherlanguage[numerals=Devanagari]{bengali} \newfontfamily\bengalifont[Script=Bengali,AutoFakeBold=4.0,AutoFakeSlant=0.4]{SolaimanLipi} \newfontfamily\bengalifontbf[Script=Bengali,AutoFakeBold=4.0,AutoFakeSlant=0.4]{SolaimanLipi} \newfontfamily\bengalifonttt[Script=Bengali,AutoFakeBold=4.0,AutoFakeSlant=0.4]{SolaimanLipi} \newfontfamily\bengalifontsf[Script=Bengali,AutoFakeBold=4.0,AutoFakeSlant=0.4]{SolaimanLipi}  \usepackage{graphicx}  \begin{document}  \begin{bengali}    \textbf{Text One}    \textbf{টেক্সস্ট এক}    % If the following line is commented out, the problem will disappear   \rotatebox{90}{rotated text}    Text Two    টেক্সস্ট দুই  \end{bengali}  Text Three  \end{document}   The problem is, the line containing the command, \rotatebox{90}{rotated text} is causing the \textbf to become persistent. After long agonizing hours, it has been detected that if the said line is commented out, the problem disappears.    As you can see from the above output, the "Text Two" and subsequent lines are in boldface. But they are not supposed to be like this.  The problem is not remedied even when the  \rotatebox line is put between curly braces.  The problem will not happen in a monolingual English document.  How do we tackle this problem?  (The Bengali font used can be found .)


On the , there will occasionally be somebody who adds or updates a link.   If most of the reviewers are like me, they're too lazy to actually hover over the link and just think "cool, they're fixing link rot and adding links to relevant documentation" and just approve it without actually seeing where the links go.  This can be abused easily. I'm willing to bet a small fortune that it would be easy to get edits that add  or  links through edit approval.  To prevent this, when a link is added or edited, the url should appear in the edit summary.


I am trying to find a book (young adult) where the devil is the protaganist, and other gods appear as characters

I believe it was written by a teenager, and might have a sequel.   It has been many years since I read it, but I believe it had the devil acting like a regular human. He wasn't evil. I think it incorporated a lot of (gods/characters) norse, roman, Christian, and pagan.


How do I calculate what resistors I need for RGB LEDs with 3.7V?

I have a total of .  I am hoping to power these as well as a  with a 3.7V lithium rechargeable battery.  I was just wondering how I would go about calculating the resistors needed for these RGB's?   I'm confused because I've seen this example of using 150ohm for Red and 100ohm for Blue and Green.    I guess I'll have to eventually get my head around resistance. There's a great app called Circuit Playground, but I wasn't 100% sure on what the forward voltage and supply voltage (Vf) meant.


prove that the product of 4 consecutive positive integers is divisible by 24

How can I prove that prove that the product of $4$ consecutive positive integers is divisible by $24$, ie for any positive integer $n$ : $n(n+1)(n+2)(n+3)$ is divisible by $24$. I've noticed that: $24$ = $2^3 * 3$ $n(n+1)(n+2)(n+3)$ is divisible by $2*2$ so by $4$ (as there are at least 2 even numbers, obvious) $n(n+1)(n+2)(n+3)$ is divisible by $3$ (as there is the product of 3 consecutive integers, easily provable using congruences) so I've proved that you can divide it by $12$ until now. What am I missing here?


I'd like to encrypt all my urls on a sharepoint site. I'm running on Sharepoint Server 2013. and I'd like to have instead of  something like


Here is a table of isospin conservation in certain reactions. It is often loosely stated that 'isospin is always conserved in strong interactions', but it is never clear whether they mean total isospin I or its component I3. Also in the table below for the middle reaction it appears that sometimes a superposition of I=0,1 can react into just I=1, suggesting I may not be conserved. In this question isospin conservation for total isospin or third component of isospin? it confirms that I3 is conserved but just says 'I is an approximate symmetry', not being clear to whether that means I itself is conserved or not while another answer says it is conserved but is downvoted.


So I am currently going over some old calculus concepts and ran cross the exponential function expressed as a limit:  $$e^x = \lim_{n\rightarrow \infty}\left(\!1+\frac{x}{n}\!\right)^n $$  Where exactly does this come from? How can we show that this is true?  Additionally, I have also seen this:  $$e^x = \lim_{n\rightarrow 0}(1+xn)^{\frac{1}{n}} $$  How can we show that this is true?


Let $F$ be a finite field. If $f : F \to F$, given by $ f(x) = x^3$ is a ring homomorphism, then    $ F = \mathbb{Z} / \mathbb{3Z}$ $ F = \mathbb{Z}/ \mathbb{3Z}$ or  $ F = \mathbb{Z}/  \mathbb{2Z}$ $ F = \mathbb{Z}/  \mathbb{2Z}$ or characteristic of $F$ is 3. Characteristic of $F$ is $3$   For ring homomorphism, $f(x+y)= f(x)+ f(y)$ and $f(xy)= f(x) f(y)$ for $x,y \in F$. So, Charcteristic of $F$ must be 3 so that $ 3x^2y + 3xy^2= 0$, so $4$ option should be true but how to discard option 1?


I have the problem, that all my object look very unrealistic, even with shaders on them. I broke the problem down to copying a template object to my Blender file. In the original, it looks very realistic, but after copying to my project, it also looks like crap. I guess, that this has to do something with my world or render settings. Can someone help me fixing this problem?


I want to disable the Super key, when I press Super nothing should happen.  How can I do that?


How can I fix an out of focus photo? Is there an app for that? I don't have Photoshop

Someone else took this picture of me and didn't focus. :(   How can I fix this? Is there an app for that? I don't have Photoshop.


Setting an environment variable in Windows PowerShell

I am having trouble replicating this command from CMD  set APPDATA=D:\.  The best equivalent I have is Set-Variable -Name $env:APPDATA -Value D:\. This does not work!  The full script is:  set APPDATA=D:\ start java -jar D:\.minecraft\minecraft.jar   This sets it so Java looks in D:\ for .minecraft instead of APPDATA.  The full PowerShell version (which doesn't work right) is:  & Set-Variable -Name $env:APPDATA -Value D:\ & 'C:\Program Files\Java\jre1.8.0_66\bin\java.exe' -jar D:\.minecraft\Minecraft.jar   It still looks at the read-only version of $env:APPDATA. I don't see why it can't be changed in the running environment for the shell's session, like cmd and most *nix shells!  I'm sure there are more uses for this than just running Minecraft. :P


Hose sealers seem to be typically sold in a   with two types.  When are garden-hose washers used and when are the O-rings appropriate?  I've been kind of winging it with my own hoses, depending upon which seems to fit better.  Is there more to the logic than that?  Pictures would be particularly helpful.


Just installed Ubuntu 12.04 64-bit on my ACER 5742 laptop. The performance is really slow.    While browsing pictures in Google, occasionally my system just freezes for about 5 seconds. Also, installing applications takes a lot of time. For example, installing "Skype" took me about 30 min or so.  In October, I installed earlier version of Ubuntu, and that version did not display any of these symptoms, so my laptop isn't to blame. And, my laptop's specs aren't that bad:  Model: Acer 5742g Processor: Intel Pentium P6200 2.13GHz (duo-core) Graphics Card: AMD Radeon HD6370M, 512 MB RAM/Memory: 6GB 1066Mhz Hard drive:: 500GB (5200 RPM)    I tried both a USB HDD and my 5200 RPM 500GB HDD.  I installed all the drivers that were displayed in Additional Drivers. But still, there is no improvement in performance.  Is it better to just install earlier version of Ubuntu or what?


Decimal validation in the textfield using javascript or jquery

i Want to validate a text field in keyup event .  in the field it should accept money type decimal like   (12.23) (.23) (0.26) (5.09) (6.00)  if i enter some wrong value then it should return to the previous value and remove the wrong one


My runtime is still the same after rerunning it a few times, may I know how to fix this?

public class withloop {     public static void main(String [] args) {         long start = System.currentTimeMillis();         int a [] = new int [5];                  for (int i=0; i < a.length; i++) {             a[i] = i + 1;         }                  for (int j = 0; j < a.length; j++) {             System.out.print(a[j] + " ");         }         long end = System.currentTimeMillis();                  System.out.println(end - start);     }  The is a simple code from my exercise to generate the runtime. After running it a few times, the runtime was suppose to change however, it did not and it stays the same no matter how many times I run it again. The output of the runtime is 0 millisecond.


I feel like I can't be barefoot around him because every time I'm in the same room as him without my shoes on, he'll find some excuse to sit next to me and he'll start to tickle my feet. He isn't disobedient, so I can tell him to stop and he stops but the very next day he tries to tickle me again. Just last summer we were at the pool and I noticed he sat next to me while I was dangling my bare feet in the water and he began to tickle my feet while I was talking with my friend! Also, every time i sit in the recliner with my feet up, he will come and grab my ankle and tickle my foot for a long time until I can get it loose. I'm very ticklish, and this is inappropriate. How can I tell my son not to tickle my feet without upsetting or otherwise embarrassing him?


Can't refresh packages in Update Manager

In Update Manager I try to update the list of packages and I get a window titled synaptic with the following output    Failed to fetch   404  Not Found [IP: 2001:67c:1360:8c01::18 80]  (many more lines like this)  Some index files failed to download. They have been ignored, or old ones used instead.    How do I fix this?  Please answer with complete step by step instructions. Thanks.


How to make programs minimize when you click on them on the launcher

I am running Ubuntu 12.04 LTS. I just want the programs to minimize like they do on the Windows 7 taskbar, if that gives you a idea of what I am talking about.


How to generate a random alphanumeric string that's limited to 10 character in netbeans?

How to generate a random alphanumeric string that's limited to 10 character in netbeans, im trying to save an attachment file as a random alphanumeric filename.


What interface mockup programs are available?

Are there any interface mockup design applications for Ubuntu? I need one in order to design programs or interfaces (internet sites and more).


Connecting square vertexes with minimal road

I have four cities in $A=(0,0),B=(1,0),C=(1,1),D=(0,1)$. I am asked to build the shortest motorway to connect the cities. How can I do that?  I was thinking that first I need some compactness argument to prove that there really is the shortest way to connect cities. Or if one can prove that one can travel via finitely many line segments, the existence of minimal way migth be possible to prove via some olympiad-level inequalities.  Then I think I need to find points $E,F$ such that $\angle AEB=\angle CFD=120^\circ$. But I think it is difficult to prove that such a configuration is really a minimal.  Could anyone give hints/solution how to fill the details?  Bonus: Has anyone generalized this problem to $n$ cities in a regular $n$-gon?


Python 3.5.1 regex doesn't match as expected

I tested my regex with Regex101 already, but when I tried in Python 3.5.1 it returns None  Here's my   And here's my Python code. Not sure if I miss anything.  Python 3.5.1 |Anaconda 2.4.0 (x86_64)| (default, Dec  7 2015, 11:24:55) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> p = re.compile('([01]?[0-9]+:?[0-9]*(?:[AP]M)?)-([01]?[0-9]+:?[0-9]*(?:[AP]M)?)', re.MULTILINE) >>> m = p.match('NO PARKING (SANITATION BROOM SYMBOL) 7AM-7:30AM EXCEPT SUNDAY') >>> print(m) None >>>


How to round a decimal output to two places?

In this program I'm printing a value from a calculation of type double to the screen.But at present the calculation is giving 14 decimal places.My question is,is there a facility in Java to wrap the output statement in that could specify the amount of decimal places?For example round(mark1,2)    The way it is printed at present is like this:   double markOne = intent.getDoubleExtra("number1", 0);  result1.setText(String.valueOf(markOne)+"mm");   Is it possible to wrap the setText in a Java method or would I have to create a custom format?Could someone give me an example of this with my code? Thanks


how can i forward requests to my own IP address to a local IP address in my network (possibly using named)?

My setup  I have a linux server running in my basement. I currently have my router looking to that server for DNS lookup, so I can use named to spoof a bunch of domain names to point to my local server's local address, 192.168.0.111. This works great.  I also am running Apache and PHP on this server, and have forwarded port 80 on my router to this machine, so my public IP xx.xxx.x.xx is sent to the basement server.  This is a great development set up for me, because I can develop websites in my local network and pull them up on numerous devices with a *.mylocal.net address. I can also quickly share a website on my public IP with others that are outside of my network.  I have a static IP, so that makes this even easier.  The problem  Some applications need to have an absolute URL. My spoofed DNS doesn't work outside my network, and neither does my internal IP address.  I need to be able to access the sites at the same IP that they are accessed publicly, which is my public IP: xx.xxx.x.xx    For some reason, I can't access my own public IP address from within my own network.  My router's public IP is xx.xxx.x.xx, and when I hit xx.xxx.x.xx from outside my network I see exactly what I want -- my development website. But, when I hit xx.xxx.x.xx from inside my network, the connection times out.    I assume my ISP has a firewall that blocks requests from xx.xxx.x.xx to xx.xxx.x.xx where the origin and the destination are the same IP (or maybe this is impossible on any network?)  So how can I set up my network to forward the internal request to my public IP to the local IP of my basement server?   I would like to do this within the local DNS server I set up, or in my router, so the change can be applied to all devices in my network, and not just the basement server or the windows tablet/laptop, etc individually.


I just purchased .  I'll be installing it in my RV.  Current will be supplied by a 12VDC to 120VAC, 3000W inverter.  I'll be using Single-Pole Type BR breakers.  Here's a picture of the box:    My current understanding is that I must install a grounding bar to the box.  This is my current understanding of how to connect the breaker to the main supply.:    Here is my understanding of how I would wire in new circuits:    Does this look right?  I would really appreciate your help -- I've been beating myself over the head about this.


How to prove that you can choose an element from a set in ZF?

Let's say we're in ZF. How would we prove the following theorem?     Let $S$ be a set such that $S \neq \emptyset$. There exists some   function $f$ such that $f(S) \in S$.   It seems easy if you can start with     Let $a \in S$, define $f = \{S\} \times \{a\}$.   But I'm not sure how ZF allows you to do that.


Proof that $\sum\limits^{\infty}_{i=0}{iP(X > i)} = \frac12(E(X²)-E(X))$ for $X$ nonnegative and integer valued

The following is a homework example:  For a nonnegative integer-valued random variable $X$, show that  $\sum^{\infty}_{i=0}{iP(X > i)} = 1/2(E(X²)-E(X)).$  The only way I could think of doing this proof is to rewrite the left side starting with:  $(1).$    $\sum^{\infty}_{i=0}{i} \sum^{\infty}_{j=i+1}{P(X=j}) = 1/2(E(X²)-E(X)).$  and continue from there to get to an expression similar to:  $(2).$    $1/2 * [\sum^{\infty}_{i=0}{i²*P(X=i)} - \sum^{\infty}_{i=0}{i*P(X=i))}] = 1/2(E(X²)-E(X)).$  However I don't know how to continue to transform $(1)$ into $(2)$. Could you give me a hint there? Is the approach even correct?


In RTL mode do icons need to be mirrored?

I am working on a website that has both an English and Arabic version, and the site has a lot of icons. Can I flip all images in right to left direction for the Arabic version as shown below?


Unable to assign value to variable using "document.getElementById.value"

I am trying to make a countdown timer in which the user can set day, hour, minute and seconds values.  The setlength() function takes the values from the textboxes then sets the variables.  Then when the user clicks the start button, the time in ms (variable lengthms) is calculated and added to the current time.  Then the countdown timer just counts down.  I am quite sure the counting down bit works but I don't understand/know why the script is unable to fetch the values from the input boxes and assign them to the variables.  Any help or another solution to varying the value of the hours minutes and seconds is appreciated.  Thank you in advance!    function setlength() {   var lengthd = document.getElementById("lengthd").value;   var lengthh = document.getElementById("lengthh").value;   var lengthm = document.getElementById("lengthm").value;   var lengths = document.getElementById("lengths").value; }  function start() {   var lengthms = (lengthd * 24 * 3600 + lengthh * 3600 + lengthm * 60 + lengths * 1) * 1000;   var deadline = new Date(Date.parse(new Date()) + lengthms);   initializeClock('timerdiv', deadline); }  function getTimeRemaining(endtime) {   var t = Date.parse(endtime) - Date.parse(new Date());   var seconds = Math.floor((t / 1000) % 60);   var minutes = Math.floor((t / 1000 / 60) % 60);   var hours = Math.floor((t / (1000 * 60 * 60)) % 24);   var days = Math.floor(t / (1000 * 60 * 60 * 24));   return {     'total': t,     'days': days,     'hours': hours,     'minutes': minutes,     'seconds': seconds   }; }  function initializeClock(id, endtime) {   var clock = document.getElementById(id);   var daysSpan = clock.querySelector('.days');   var hoursSpan = clock.querySelector('.hours');   var minutesSpan = clock.querySelector('.minutes');   var secondsSpan = clock.querySelector('.seconds');    function updateClock() {     var t = getTimeRemaining(endtime);      daysSpan.innerHTML = t.days;     hoursSpan.innerHTML = ('0' + t.hours).slice(-2);     minutesSpan.innerHTML = ('0' + t.minutes).slice(-2);     secondsSpan.innerHTML = ('0' + t.seconds).slice(-2);      if (t.total <= 0) {       clearInterval(timeinterval);     }   }    updateClock();   var timeinterval = setInterval(updateClock, 500); } <!DOCTYPE html>
Countdown Timer

Days

Hours

Minutes

Seconds

     Days: <input type="number" id="lengthd"> Hours: <input type="number" id="lengthh"> Minutes: <input type="number" id="lengthm"> Seconds: <input type="number" id="lengths">
     <button class="button set" onClick="setlength()">Set</button>
<button class="button start" onClick="start()">Start</button>


How to find $\lim\limits_{x\to0}\frac{x^2+2\cos x-2}{x \sin^3x}$

How to evaluate  $$\lim_{x\to0}\frac{x^2+2\cos x-2}{x \sin^3x}?$$  I tried using L'Hospital but it seemed that there is an infinite loop of 0/0 form


OpenLayers Plugin not working in QGIS 2.8.1

I am using QGIS 2.8.1. I have installed the OpenLayers Plug, however it is not showing up in my list of plugins. I confirmed it's installed in the plugin manager.  Is anyone else having this issue?


As per title, bit also what do different numbers mean?  I don't know what the name is of that number - feel free to improve the title.


Simplify $\sin(\alpha)+\sin(\alpha+x)+\sin(\alpha+2x)+\sin(\alpha+3x)+ \dotsb +\sin(\alpha+nx)$

$n$ is known, $\alpha$ is irrelevant, and you are looking for $x$? How do you simplify:  $$\sin(\alpha)+\sin(\alpha+x)+\sin(\alpha+2x)+\sin(\alpha+3x)+ \dotsb +\sin(\alpha+nx)$$


If $f$ is bounded and $\lim_{x \to c} g(x) = 0$, then $\lim_{x \to c}g(x)f(x) = 0$

Let $g:A\rightarrow \mathbb{R}$ and let $f$ be a bounded function on $A$. Show that if $\displaystyle\lim_{x \rightarrow c}g(x)=0$, then $\displaystyle\lim_{x \rightarrow c}g(x)f(x)=0$ as well.   Since $\displaystyle\lim_{x \rightarrow c}g(x)=0$, we know that $\forall \epsilon>0 $ $\exists \delta >0 $ so that whenever $0<|x-c|<\delta$, it follows that $|g(x)-L| < \epsilon$. And $f(x)$ is bounded, then there is a number $M>0$ satisfying $|f(x)|\leq M$ $\forall x \in A$  $f(x)$ is bounded it means all sequences in $f $ are less than $M$, so it doesn't seem like a stretch to say that   $|g(x)f(x) - L| < \epsilon$, where, as the problem stated, $L=0$  Then $|g(x)| < \frac{\epsilon} {M}$, since $M$ is an upperbound for $f$  And I'm not quite sure what to do next, any help would be greatly appreciated.


Present Perfect usage instead of Past simple

I cannot understand why tutorials, examples, etc. contain examples like this:  I have played  or  Have you been to Moscow?  Why Past Simple cannot be used in these sentences? Where is the "border" when I can use Past Simple?


Partition of real numbers into dense subsets of positive measure

Does there exist a partition of real numbers (with standard topology; Lebesgue measure) into two measurable sets $A$ and $B$, satisfying the following properties:   $A$, $B$ are both dense in the real numbers. $A$, $B$ both have positive measure.   Edited: as pointed out by Henry, actually I am looking for A B such that for any open interval I, the intersection of I and A, the intersection of B and I both have positive measure. Sorry for the confusion.


Why is "virtualenv venv" not working on Ubuntu 18.04?

I'm having trouble creating a virtual environment for python on my Ubuntu desktop. I have installed virtualenv by: sudo pip3 install virtualenv and verifying it gives the following output: $ pip3 show virtualenv Name: virtualenv Version: 15.1.0 Summary: Virtual Python Environment builder Home-page: https://virtualenv.pypa.io/ Author: Ian Bicking Author-email: ianb@colorstudy.com License: MIT Location: /usr/lib/python3/dist-packages Requires:   However, when I try to create a virtual environment, I get one of these...  Command 'virtualenv' not found, but can be installed with: sudo apt install virtualenv  Why is that?


I am looking for the best way to make a model comprising of many thin layers.. each with their own unique shape and editability...such as this:    Would it be best to model the object first then divide down into layers? Or to avoid having thousands of seperate objects and risk crashing.. could something be achieved with modifiers such as the array tool? Thanks


Java Inner Loop of Nested loop doesnt excecute correctly

I have a List with 2 lists inside , like a matrix, after I populate this list, I excecute some calculations with a Loop, to populate a third List, but this doesnt work correctly. I have an if statemnt to check if the values are the same, but it only works once, after it found a match it doesnt find another match again, sorry for the code im a begginer Here is the code: List<List<String>> dynamic2D = new ArrayList<List<String>>(); dynamic2D.add(new ArrayList<String>()); dynamic2D.add(new ArrayList<String>());  dynamic2D.get(0).add("type2"); //populate first inner list dynamic2D.get(0).add("type3"); dynamic2D.get(0).add("type1"); dynamic2D.get(0).add("type2");  dynamic2D.get(1).add("1"); //populate second inner list dynamic2D.get(1).add("3"); dynamic2D.get(1).add("5"); dynamic2D.get(1).add("6");  ArrayList<String> amountOfTypes = new ArrayList<>(); //After deleting repeated values I get the amount of types existing on my first inner list amountOfTypes.add("type1"); amountOfTypes.add("type2"); amountOfTypes.add("type3");   ArrayList<Integer> amountOfValuesOfTypes =new ArrayList<>(); // I populate this list with 0 values to later make a Sum of each value existing in the second inner list that correspond to the first inner list  for(int i = 0; i<amountOfTypes.size();i++){ // Here I have a list with 3 zero values, {0,0,0}, because there are 3 types of values     amountOfValuesOfTypes.add(0);  }  // Now here is the problem, Im trying to sum the respective values of each type, that correspond with the second inner list. in order to get the raw amount.  for(int i = 0; i<amountOfTypes.size();i++){     for(int j = 0; i<dynamic2D.get(0).size();j++){ // a second inner loop to compare the value of my main list(that has all the values) with the filtered list (that only have values that do not repeat)         if(amountOfTypes.get(i) == dynamic2D.get(0).get(j)){             int secondListIntToString= Integer.valueOf(dynamic2D.get(1).get(j)); // Here I get the corresponding match Integer Value             amountOfTypes.set(i,amountOfValuesOfTypes.get(i)+secondListIntToString); // Here I take the values that match by THE CRITERIA OF HAVING THE SAME VALUE IN THE FIRST INNER LIST, and make a sum to have the full value, but when there is a match it only sum ONCE, and it doesnt happen again          }     }  }  Thanks for any help.


I am reading about 'interaction effects on linear regression'  and came across 'stepwise linear regression'.   There are originally 5 predictors in the model. This means to say that by using the ordinary linear regression, we have $ Y = c + a_iX_i$ where $i = 1,...,5$.  Then it says here: For the initial model, use the full model with all terms and their pairwise interactions.  The succeeding steps involve what it calls 'stepwise linear regression'.  I am confused by this statement. Can anyone please give an insight on what 'stepwise linear regression' is all about? What are its advantages and why does it need to be done?


Why I cannot read List object from my file (Java IO)

I have a method writing List<String> into file like this: public static void main(String[] args) {     List<String> data = Arrays.asList("1", "2", "3", "4", "5");     writeObjectToFile(data, "demo.dat");          List<String> result = null;     readObjectFromFile(result, "demo.dat");     System.out.println(result); }  with the writeObjectToFile method: public static <T> void writeObjectToFile(List<T> obj, String fileName) {     File file = new File(fileName);     FileOutputStream fos = null;     ObjectOutputStream oos = null;      try {         fos = new FileOutputStream(file);         oos = new ObjectOutputStream(fos);         oos.writeObject(obj);     } catch (Exception e) {         e.printStackTrace();     } finally {         // close fos, oos, ...      } }  and readObjectFromFile method: public static <T> void readObjectFromFile(List<T> obj, String fileName) {     File file = new File(fileName);     FileInputStream fis = null;     ObjectInputStream ois = null;      if (file.exists()) {         try {             fis = new FileInputStream(file);             ois = new ObjectInputStream(fis);             Object readObject = ois.readObject();             obj = (List<T>) readObject;             System.out.println(obj);         } catch (Exception e) {             e.printStackTrace();         } finally {             // close fis, ois,...         }     } }  The writing data to file is OK, but the reading step is not working as expected. I got the result list is null: // console output [1, 2, 3, 4, 5] // --> this is result of System.out.println(obj); null            // --> this is result of System.out.println(result);  But when I change the reading method to return a list: public static <T> List<T> readObjectFromFile(String fileName) {     File file = new File(fileName);     FileInputStream fis = null;     ObjectInputStream ois = null;      if (file.exists()) {         try {             fis = new FileInputStream(file);             ois = new ObjectInputStream(fis);             Object readObject = ois.readObject();             List<T> obj = (List<T>) readObject;             System.out.println(obj);             return obj;         } catch (Exception e) {             e.printStackTrace();         } finally {             // close fis, ois,...         }     }     return null; }  Then I get the expected result: // console output [1, 2, 3, 4, 5] // --> this is result of System.out.println(obj); [1, 2, 3, 4, 5] // --> this is result of System.out.println(result);  I don't know why is it. Why when I passed the result list as a parameter, I could not get the expected result? Please help me.


How can a question banned user fix their questions if they're deleted?

If a user is question banned  and the , how can the user fix this on their own?  Until recently, advice has been to improve their questions, but since they can't see the questions on their question screen, they can't improve them:     Feature request: Allow a question banned user to see their own deleted questions, or warn them that deleting questions could lead to a question ban.


Performance of storing multiple meta fields vs one JSON encoded field

I have several custom post types. For some i need to query them based on a single meta field, but for others i have a dozen individual meta fields. If i create an array and convert it into JSON, will it be faster if i call 12 meta fields one by one or call the JSON, parse it and then have the variables?   A quicker alternative i was thinking would be to save all of the meta fields one by one, but then also create a JSON version of them all. In cases where i need to query by meta i can do it and when displaying a list i dont neet to perform 12 queries * num posts.


Disable a user's login without disabling the account

Let's say I create a user named "bogus" using the adduser command. How can I make sure this user will NOT be a viable login option, without disabling the account. In short, I want the account to be accessible via su - bogus, but I do not want it to be accessible via a regular login prompt.  Searching around, it seems I need to disable that user's password, but doing passwd -d bogus didn't help. In fact, it made things worse, because I could now login to bogus without even typing a password.  Is there a way to disable regular logins for a given a account?  Note: Just to be clear, I know how to remove a user from the menu options of graphical login screens such as gdm, but these methods simply hide the account without actually disabling login. I'm looking for a way to disable regular login completely, text-mode included.


Could you please tell me whether this conversation is grammatically correct or not.  A : Where were you last week ? or Can I ask like this "Where have you been in the last week ?"  B : I went to Swiss on a holiday trip. I have just got home. or can I just answer like this "I have been to Swiss."  A : With whom did you go ?  B : I went with Harsh. I first planned to go with Harsh and Chris but as Chris has been to that place many times, he was not interested and didn't join with us.  A : What about your dad ? I can't see him anywhere. Where did he go ?  B : He has gone to Australia on business. He will reach home at weekend.  A : When did he go ?  B : He went yesterday.  I had some doubts on "have been", "have gone". I searched more about it and learned the difference. Now, I framed up this conversation using those words. If there are any mistakes, please let me know. Thank you!


Is it possible to set up a server to mirror a distro's repository, but only download/store requested upgrades or new packages rather than download them all?  So all computers on the LAN can connect to this server for all upgrades so they only have to be downloaded once.  I've looked at apt-mirror but that seems to download everything.


setting global font scaling (which will affect menu bars, editors, such as gvim)

I remember setting something that affected the font size in GUI elements such as menu bars as well as text areas in editors (such as the default font setting in gvim).  I tried to look into the "appearance" settings but could not find it.  Do you remember that setting? How to tweak it?  thanks!


Why are so many energies represented by $\frac{1}{2} ab^2$?

Why are so many energies in our universe mathematically represented by the equation $\frac{1}{2}ab^2$.  For example:    Kinetic energy $$\frac{1}{2}mv^2$$ Energy stored in a capacitor $$\frac{1}{2}CV^2$$ Energy stored in an inductor $$\frac{1}{2}LI^2$$   These are just some I can remember off the top of my head ,I remember that there are more like this. Is this just a coincidence or is there a reason behind this ?  I tried to google it but couldn't find any relevant results.


How install elementary os desktop on ubuntu 14.04

I found that this command install elementary os   $ sudo apt-get install elementary-desktop    but the package cannot be located so please help.


In Java, how can I foresee round-off errors if the rounding is inconsistent? e.g. 0.03 * 100 = 10.029999 but 10.05 * 100 = 10.0500001?

So, I'm just starting out learning and I'm aware that rounding-error questions are the most common on here. But I am unable to find one that gives a clear answer about why this particular thing happens, or rather, how will I know what to look for? I understand that it happens because of the way the variable are stored, and that there's a limit for how much decimal places they can hold, but I'm unsure why its different for each digit. Other than that explanation, I can't find anything further. My textbook warns me to be careful with rounding errors, and I do know how to correct them to the decimal place that I want. But still, I want to know how we can brace ourselves for what numbers it is likely to happen. We can ask the console to print to check and make sure that our numbers are correct, during the programming process, but is there some way to 'detect' it before it even happens or be weary of which numbers do what? Some numbers have no rounding error. Example: 10.02 * 100 = 1002. But 10.03 * 100 = 1002.9999999999999 10.04 * 100 = 1003.9999999999999 10.05 * 100 = 1005.0000000000001 If it has to do with binary, why isn't 4 safe?


I'm using the latex package  because the  package isn't using APA style version 6 yet.  Now I'm trying to add a table with notes right underneath it, like in this table for instance:    Since the \caption{} is used as a title above the table, I have to add an extra row for the notes that goes over the whole table width. The problem is that the notes won't fit into one line so I need multi-line cell. How can I accomplish that? Or am I doing it totally wrong and there is a much easier way? I guess footnotes don't work here.  \documentclass{apa6e}  \begin{document} \shorttitle{} \begin{table} \caption{title} \begin{tabular}{cc} foo & bar\\ \hline \multicolumn{2}{l}{Notes. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras lacus orci, porttitor et posuere sit amet, tempor non justo. Ut quis aliquet turpis. Ut dictum nulla eget purus elementum a lacinia libero varius. Donec malesuada nulla ut odio rhoncus convallis. Aenean faucibus sollicitudin sapien, a vestibulum ante rhoncus sit amet. In vitae mi justo. In arcu metus, porta et lacinia ut, ultricies sed eros.} \end{tabular}  \end{table} \end{document}


How to non-interactively configure the Linux kernel build? (Marked incorrectly as duplicated)

Is there any method to configure linux kernel in such way (just an example):  make config CONFIG_OPTION=y && make config CONFIG_OPTION1=no CONFIG_OPTION3=64 CONFIG_OPTION4=/path/   and all the dependencies and alternatives of these configuration options will be set automatically in non-interactive mode.    Note: This question was asked previously () but was marked as duplicated (although it is not, it asked a different thing). As I can't answer the original question, I am answering here.


Going from Ubuntu willy 15.10 to xenial xerus failing

I wanted to install docker on my ubuntu 15.04 (vivid) but it seems not supported so I upgraded to 15.10 (willy) by using this sources.list:  deb http://old-releases.ubuntu.com/ubuntu/ wily main restricted deb http://old-releases.ubuntu.com/ubuntu/ wily-updates main restricted deb http://old-releases.ubuntu.com/ubuntu/ wily universe deb http://old-releases.ubuntu.com/ubuntu/ wily-updates universe deb http://old-releases.ubuntu.com/ubuntu/ wily multiverse deb http://old-releases.ubuntu.com/ubuntu/ wily-updates multiverse deb http://old-releases.ubuntu.com/ubuntu/ wily-backports main restricted universe multiverse   and apt-get update and apt-get dist-upgrade. It did not show any error and my apt-get update is working.    I then started doing a do-release-update towards 16.04 (Xenial), however some downloads are always failing and it won't proceed to the end. How can I fix it ?


How to use workarounds for a broken LCD screen? Is there such a thing as valid aspect ratios?

My laptop's 1920x1080 screen has been damaged and about 150 of the leftmost columns are not working. It will be a few weeks before I can replace it, so I would like to change my settings so it doesn't use those columns (I'm on Windows 10, BTW).  Ideally, I'd like to have a 1770x1080 resolution with an offset of 75px to the right from the center, which means only those columns would be cropped.  I tried using the tools suggested on both answers to , but had similar errors on unsupported/invalid settings.  My guess is that I cannot pass these settings as loosely as I'd like, but I could not pinpoint exactly what rules they need to follow.  Any hints on how this should be done or even if there's another better approach for the problem is very much appreciated, thank you.


If statements in javascript, which is better?

When writing javascript or PHP for that matter I use two ways to write if statements.  Return as soon as possible  Below I try to end the function as soon as possible. If the value is not what I expect, return it. The benefit I see here is that I don't need {} and I don't need to nest anything.  function hello(value = null) {   if(!value) return;    console.log("I'm still here!");   console.log("End of function"); }   Do something on match  In this case I don't return at all. Instead I do something if I get a "match". The upside here is that I don't need to return anything.  function hello(value = null) {   if(value) {     console.log("I'm still here!");     console.log("End of function");   } }   So which is better? One of them or equally good?


How to calculate the correlation between categorical ordered and categorical binary variables

How I would calculate the correlation between 9 categorical binary variablçes (0,1) and 12 categorical ordered variables (1-3, 1-5) using R?


How to integrate this : $\int \frac{\cos5x+\cos 4x}{1-2\cos 3x}\,dx$

How to integrate this :   $\int \frac{\cos 5x+\cos 4x}{1-2\cos 3x}\,dx$  My approach :   We know that $\cos A+cosB = 2\cos(\frac{A+B}{2})\cos(\frac{A-B}{2})$ But it is not working here, please suggest, thanks.


What is the difference between apt upgrade and apt -y upgrade?

I want to know why we have two things "sudo apt upgrade" and "sudo apt -y upgrade"


the sharigan question about the fading sharingans and the ones that remain

I am still puzzled guys how come itachi died but sasuke still has his eyes but when obito died kakashi lost his sharingan eyes and all the skills it came with.is there something im missing or its something the writers just came up with on the spot


How to change from address in workflow email?

sharepoint workflow (created using SharePoint designer and the workflow is in 2010)  at the movement sent emails using default email address of the sharepoint in our case it is companyname@mydomain.com can you change this?


How to programmatically create a node when a payment is successful

I have a content type, and  with the help of the UC node checkout module, I am able to successfully add the content to cart once it is created by the user. When the user checked out and had made a successful payment, I want to create another node of another content type.   function gy_mod_uc_checkout_complete($order, $account) {    if ($order->order_status == 'payment_received') {      exit();    }  }    The above is not getting fired; I always get it as "in_checkout." I tried doing it using the Paypal sandbox.   Does anyone have a suggestion on how I should write the code I need?


In JavaScript; trying to loop adding user input name to a list of names

I am trying to update and display a list of names each time the user submits a new name. For example, (first time: "Jim” is displayed, second time: “Jim Bob” is displayed, third time: “Jim Bob Joe” is displayed, etc.) It is required to use closure. I can get the pre-loaded input value, but I guess there is something wrong with my loop and I don't get any further input. Any ideas?  Enter a name and I will add it to the list:           <input type="text" id="newName" value="Doug"/>          <button onclick="closureExample()">closureExample()</button>
Abe,Bill,Charlie


Here’s the final major installment of the mobile web redesign/refresher. We have also fixed or implemented a minimal large part of the issues and requests mentioned in the   questions. Changes Tag list, Badge list and User list  New list style optimized for vertical scrolling Page optimized for human-sized fingers (apparently not everyone is a hobbit) New, more usable subnav UX      User page  Adopted new subnav and vertical list styles for pretty much all the subsection in the User Summary page Equally restyled all the secondary pages (Accounts, Activity, Answers, Badges, Bounties, Favorites, Questions, Reputation, Responses, Tags, Votes)    CAPTCHA page (new)  We now have a mobile CAPTCHA page, previously you would be bounced to the desktop page for maximum pain.   Send your gratitude to  for the design :-) This will be the last major iteration for now. We might develop small feature requests off-band, and we will fix bugs as appropriate. (*) Feedback welcome below! (*) there's no need to repeat feature requests from the other questions as we've already put them on our Trello board.  This is now available on the network. You can browse from your phone or click the "mobile" link below to access it.


Switching Cards Around in Monopoly Deal 2

Firstly, I know that there is a question on switching cards after charging rent on them. However, the case I did is a bit more extreme.  I had 2 green, 2 red, 2 light blue, 1 yellow, and a multi-colour wild property card.  Firstly, I moved the wild card from its original position, with the yellow, to the green and make it a full set. (This counts as 0/3 of my moves.)  Then, I charged everyone 7M each. (1/3)  After receiving the money, I moved the wild card to the red set, and charged everyone 6M each. (2/3)  After receiving the money, I moved the wild card to the light blue set, and charged everyone 3M each. (3/3)  Then, I moved the wild card back with the yellow card.  Is any part of my moves out of the Monopoly Deal rules? Although I don't think so, people are saying that I might have cheated.


Short Story About How 2 Astronauts Who Stop for Lunch Unknowingly Destroy the Only Lifeform on an Arid Planet

In the 70's or 80's I read a short story in which 2 astronauts looking for a nice place to eat lunch choose a spot at the pole of a small desolate planet, overlooking the world's only pool of surface water.  Due to the harsh extremes of heat, and lack of water, this is the home of the planet's single living organism, which has grown slowly over eons,  surviving the daily extremes, moving slowly over the bare rock, dissolving it with acidic digestive juices to get the nutrients it needs for survival. The men watch the organism while eating their lunch, then depart, unknowingly leaving death behind them in their garbage - cigarette butts, tin cans, wrappings - a bonanza that the creature moves over to dissolve and ingest, along with the human-based microscopic organisms that will destroy the alien being. The theme of the story is that although we reach out to the stars to seek life, we are much more connected to the lowest forms of life on Earth, than to any life we may find on other planets. I don't remember the author and title.  Can someone identify the story?


Hi, I wondered what was a good setup for AWS/MongoDB in terms of machines and the sizes of their disks.  Current setup   3 micro machines for the config servers, 1 mongos and arbiters. The 8Gb limit is almost reached. (and I ran the arbiters with --nojournal) per shard : a replica set of 2 machines m1.large with 8Gb for system + 20Gb for data everything is on EBS.   Questions   is 20Gb too big or too small ? Should I go with 100Gb for example ? Am I supposed to inform mongodb about the 20Gb (or other) disk limit ? Do you see anything wrong that I don't see ? Im new to mongodb and aws but Im an ok experienced SWE   Plan of use  My database should allow a 100 qps (mostly writes), and should grow up to 1Tb over the next 3 years. The plan is to add as many shards as needed, more or less manually (with scripts), when we see that more memory is needed on the database.  We will also run a few mapreduce over this and have some scripts that do aggregates with the data over the past 15 minutes, every 15 minutes.  We are a very small company, spending up to a few hundred $ per month on our servers would be ok but we can't go crazy on cash.  We hope that we won't have to manually take care of too many machine failures, manually taking care of things once a month would be fine.  Thanks for telling me what you think about that.  Thomas


Help! 25 unkown apps messing with my phone

These apps keep showing up in my data usage screen. I have no idea what they are or where they came from. There are 25 of them by the way. All they seem to do is use up data and interfere with my phones operation. I.E. slowing it down, closing other programs, opening Google play asking me to download one thing or another, pretty sure they've ended a couple of my calls. Though I can't prove it. NO anti-malware picks them up.  If it is an app I've installed causing the problem how do I figure out which one (short of installing them one at a time)? Is there anyway to get rid of them (short of formatting phone again or performing a factory reset)?  I'm not a pro so I need it simply explained. Not dumb either. My phone is not rooted and I'd rather not if I don't have to. It looks like a pain and I'm not great with Linux systems. My phone it a ZTE Rapido LTE model Z932L, Android version 4.1.2. Any help would be great.  Edit: I don't think the question that is similar to mine answers my question. Tho the are very similar. I did not have my phone updated or messed with by the company I bought it from. Its a straight talk phone. To my knowledge there isn't anywhere I could take it. I have factory reset my phone twice and the problem continues. It could very well be something I did (infact that's the most likely conclusion). If it is I need to know what so I don't do it again lol. Also added screen shot of "removed apps," and two more have popped up since I posted this question. I have not uninstalled anything.    Screenshots (click images for larger variants)


My Microsoft account's full name is displayed with firstName-lastName format in my profile page in Microsoft website, but with lastName-firstName format on my windows computer (on lock screen), is it possible to change which format to adopt on Windows ?  I've tried running NETPLWIZ and then writing my full name how i want it to be displayed instead, but after login-out and in again it returns to the previous state, so i guess this method only works for local accounts.   EDIT : This is not a duplicate question, my problem is not with displaying the full name, but rather how it is displayed.


How can I add some html to my Mail.app signature?

I want to add my company logo and and some juice to my contact information in the signature part in Mail.app. How can I do that with little or no efforts?


How to avoid NaN in using ReLU + Cross-Entropy?

ReLU has a range of [0, +Inf). So, when it comes an activation value z=0/1 produced by ReLU or softplus, the loss value computed by cross-entropy : loss = -(x*ln(z)+(1-x)*ln(1-z)) will turn to NaN. As i know, my variables are run in theano.tensor type which cannot be modified after defined. So, I cannot simply change the values in z which are 0/1 into some approximate (such as 0.001/0.999). How to avoid this annoying situation without replacing the cross-entropy by MSE?


I am working on flag which i am going to use in my game I am stuck on the animation part. I can't get the animation to be seamless I have seen many tutorials but i can't follow I need a detailed tutorial on it with pictures (if possible)  P.S: Please keep in mind, i am new to Blender


How can I show that  $$ \mathrm d(a\wedge b)=(\mathrm d\,a)\wedge b + (-1)^{q}a\wedge(\mathrm d\,b) $$  for a $q$-form $a$ and an $r$-form $b$?


This is a True/False question. and the answer is given False.  A is symmetric and hence we can diagonalize A. say $DAD^{-1}$ gives our diagonal matrix $diag(a_1,a_2...a_r)$ , then by taking n-th power we easily get the $tr(A^n)= a_1^n+a_2^n+...a_r^n$ Now to show the claim is false I should play with $n$ right? In particular, if I put $n=1$, this gives no contradiction because there always exists such a symmetric matrix. I don't know where to go from here.


I'm trying to use the dash instead of gnome-do, but I can't find files. "Find files" only returns "Top Results".  In gnome-do, I was able to set some often-used directories to index. For example, I have a folder called "ToRead" that's full of pdf files. I could search for pdf. Then I can browse the pdf files in ToRead and open files without using my mouse. Ideally, I want to replicate this functionality within the Dash/Places interface. Is this possible?  If not, what's the shortest way to do it?    Clarifications:   "Files & Folders" does not do what I want. It only shows files I've used recently. I'd like to be able to do this without using the mouse and without having to hit Tab hundreds of times. I don't need my search to be indexed. A file system crawl (but only in the directories I set) is fine.


In general relativity, could our curved spacetime be embedded in a higher dimension flat spacetime (5D+1) of the compatible metric?

I took General Relativity at university, years ago and have a question that has recently occurred to me. This might be a dumb one, so I apologise if the answer is a well known negative. Mathematically, it seems to me that our curved spacetime must be mathematically embedded in a flat space of 5D+. I suspect that spacetime satisfies the requirement of a mathematical manifold, and the Witney embedding theorems would imply the existence of such an embedding. The analogy would be like a curved 2D sheet of paper can be thought of as being embedded in flat 3D Euclidean space. Furthermore there are the Nash embedding theorems. I am not too familiar with these, but I think they may be a stronger statement that applies to both Riemann manifolds and Pseudo Reimann manifolds. I think the Nash theorem may imply that, given a manifold (or pseudo manifold) with a metric, then a higher dimensional flat space exist which has a metric compatible with the metric of the curved space; inside which the curved space is embedded. So for instance, if spacetime is a 4D pseudo-Reimann manifold of signature (-1, 1, 1, 1), then a flat space of at least 5D exist, which will contain our 4D spacetime, and which will have a metric that is consistent with (-1, 1, 1, 1) when applied locally to our 4D spacetime. This is in analogy to the fact that metric in 3D space of signature (1, 1, 1) clearly is consistent (vi projection) with the metric of (1, 1) on the tangent plane of a point on the curved sheet of paper. Have I got this totally wrong, or is this a possibility? Please note: I am asking about the technicality of a compatible metric. I have already seen the link, below, and it does not answer my question


Medicating Uvula  resulted  in making   the  tongue  fall out   The proverb means  sometimes   remedying  a  simple  problem  may  turn  out  to  be a  different  problem  of    great  magnitude  I  would  like  to  know  the  equivalent  problem  in  English.  I  believe  that  it  is  not  a  duplicate  of   the  previous  post  because  in the  post  the  Post  The  OP was  saying  that  the  situation  was  getting  worse  every  time  being rectified.But  the  proverb  I posted  does  not  mean it.Trying  to  solve  a  problem  resulted  in  a  some  other  problem  of   great  magnitude  and  danger.Besides, My  proverb  is  a  literal  translation of  a  Telugu  proverb  which  may imply  that  we  must  be  very  careful about  remeding  a  situation  otherwise  it  might  lead  to  a  different  consequence  which  might  be  fatal.It  does  not  mean  that  the  same situation is  getting  worsened  as  a result  of  medication  or  the  metophorical use  of the  same  problem getting  more complicated.


How do I decide how many columns to use in my grid?

I'm trying to create a UI design for my 1024x768 screen.   I know there's a grid system out there. I've read about the benefits, etc. I understand, I think from a fundamental level, why I need to use them.  But I'm so confused about how to create my own grid for my designs.  How, for example, do I decide how many columns to use?  Is there some way to take a look at a wireframe prototype and immediately be able to assess how many columns I'd need to use?  I'm essentially taking wireframes and "skinning" them out in Illustrator.   The other thing I've noticed is that sites that talk about grids sometimes show examples that confuse me a bit.  For example, I've noticed that a site will have 12 columns, but some of the boxes that align to the left side of this column have an overflow on the other side--meaning they don't fit into the column perfectly.    Can anybody help me decipher grids?  I've looked through other threads, but it still answering my questions as to HOW you step-by-step set up a grid to fit your design.


Shutting down the computer- reboots instead

On my Lenovo Yoga 13 with Windows 8.1, quite frequently, when I want the computer to shutdown (by pressing on Shutdown explicitly), it reboots. (it has been like that for 2 weeks I think)  I have checked the registry key PowerdownAfterShutdown, and the current value is 0. I have read on other forums that it might help to change this value to for instance to 1, but, as I recently read on ,      Do not delete this entry from the registry or change its value. These changes can cause serious, unexpected results.   in the Caution section.  Is it that serious If I would change the value of the key, and would you recommend me doing so as a solution to this rebooting problem? Does anyone have a better solution to this problem.


“Require Installation Of Untrusted Packages” while upgrading with the update manager

I realise there are other answers out there, specifically this  but my question is slightly different in that most of the missing keys are from ubuntu-dot-com, Does this suggest the key store may be corrupt?  Error from sudo apt-get update:   W: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32   With similar errors for;   W: GPG error: http://archive.canonical.com trusty Release:  W: GPG error: http://extras.ubuntu.com trusty Release:   W: GPG error: http://security.ubuntucom trusty-security InRelease:  W: GPG error: http://gb.archive.ubuntu.com trusty-updates InRelease:  W: GPG error: http://gb.archive.ubuntu.com trusty-backports InRelease:  W: GPG error: http://gb.archive.ubuntu.com trusty Release:   Is there a quick way to reload these keys or does each one need to be done individually?


Proof involving absolute value and maximums

Given the definition for any real numbers a and b, the max function is   $\max\{a, b\} =  \begin{cases}                                    a \text{ if } a \geq b \\                                    b \text{ if } a < b \\   \end{cases} $  Lemma: for any two real numbers $a\text{ and }b, a \leq \max\{a,b\}$ and $ b \leq \max\{a,b\}$.  Prove that for real numbers, $a, b$, and $x$, if a $\leq x \leq$ b then $|x| \leq \max\{|a|,|b|\}$.  So far, I have  $x \geq 0$ or $x < 0$ by the law of trichotomy  Case 1: $x\geq 0$  $|x| = x$ by the definition of absolute value  and I'm not sure where to go from there. Any hints?


Prove that if $a \mid b$ and $b \mid c$ then $a \mid (bx +cy)$ for all $a,b,c,x,y \in \mathbb{N}$

This problem is very similar to:   So $b$ is a multiple of $a$ and $c$ is $a$ multiple of $b$ $$bk_1 = a$$ $$ck_2 = b$$  But how do I get $ a \mid (bx +cy)$ out of it? I mean, if I substitute I get:  $$\frac{ck_2k_1}{a} = 0$$  out of it.


let $f:[a,b]\rightarrow\Bbb{R}$ be such that $f(x)=0$ except at finitely many points. Show the integral of $f(x)$ equals zero.

I'm working on the following problem:  Let $f:[a,b]\rightarrow\Bbb{R}$ be such that $f(x)=0$ except at finitely many points. Show that $\int_a^b{f(x)}dx=0$.  Am I pointed in the wrong direction for wanting to use contradiction? If I assume $$\int_a^b{f(x)}dx\neq0$$ then can I assume $f$ must contain a variable x such that $f$ is not a constant? Is it that simple? I'm missing a lot of connections.


I found the titular question     Let $A$ be a $10\times 10$ matrix and $A^{10,000} = 0$. Show $A^{10} = 0$   On a practice qualifier. I am very rusty on linear algebra and could not remember any specific theories other than maybe finding the characteristic polynomial of $A^{10}$ and reasoning that if it is not equal to the $\lambda^{10}$ then the characteristic polynomial of $A^{10,000}$ is certainly not equal to $\lambda^{10,000}$ but drew a blank when trying to rationalize why this would be so and why it would matter. So maybe that is a dead end.  Then I saw this post  which included many unique ways of solving that (possibly similar) question. So what are some possible proofs for this question? Ideally I would start completely reviewing linear-algebra but I am catching up on a lot of subjects and won't have the time to dive deep into it until the summer. In the mean time I'd like to do a little targeting refreshing on practice qualifiers like this one. Thank you for any help!  p.s. I included an abstract algebra tag because that is where I have the strongest background so feel free to use generalized theorems and techniques from abstract algebra along with any linear-algebra proofs you like.


Difference between (factor|group) and (1|factor:group) specifications in lme4

I have a repeated measures from clusters, over several years, and I expect the cluster effect to vary each year.  Year is coded as a factor, with '1' as reference level. I have tried the following:  mod1 <- lmer(y ~ x + year + (year|cluster))   and  mod2 <- lmer(y ~ x + year + (1|cluster:year))   My first example specifies the following random effects:  ranef(mod1) $cluster     (Intercept)  year2         year3        year4         year5 AA   0.03721015  0.0573160920 -0.114709171  0.1588302187  0.125329740 AB  -0.12958994 -0.0458997003  0.216455596  0.2345170893  0.248950509 AC  -5.10692972 -0.1311546328  1.130347798  2.5215580167  5.070106525 AD   0.10087455 -0.2677088515 -0.345583355 -0.2442831982 -0.257074662 ....   Second one specifies:  ranef(mod2) $`cluster:year`               (Intercept) AA:year2  0.0838186244 AA:year3 -0.1197284361 AA:year4  0.1944488619 AA:year5  0.1562090690   I assumed they would be equivalent, given year is a factor, but I must not understand the random effect specification of lme4 well enough. Can anyone help me understand the difference between the two parameterizations?


Mathematical induction with an inequality and factorial notation: $n! > n^2$

I'm having difficulty proving $n! > n^2$ for $n \ge 4$ I have previously solved a similar problem but it is $n! > 2^n$. Now I don't know how to solve this. I have only come as far as solving for the base case. Thank you so much for helping a struggling student out.


How do I find unused records using an outer join?


How to match character repetitions spanning across multiple lines?

I want to have a regex query that can match: <A blabla> <B>blabla</B> <C I need to> keep tag C</C> </A>  and return <C I need to> keep tag C</C>  The question  suggests these solutions  <A .+?(<C.*\/C>)\/A> <A(.|\n)*?\/A> <A(.|\n|\r)*?\/A> <A(\s\S)*?\/A>  but none of them works. It seems that the  can only work when the input doesn't contain multiple lines. I can remove all \r or \n, but is there a way to avoid this?


How to set default opening folder for Nautilus file manager?

How do I configure Nautilus to open at my Documents folder instead of my home folder?  I've scoured this site and found answers instructing users to edit the /usr/share/applications/nautilus.desktop file, replacing %U with the path to the desired default directory. I've edited all the variants of nautilus.desktop in the said directory, but none of the edits has an effect. I've checked all the files after editing them to make sure that I saved the edit effectively, and all look good to me.   I've edited every file to read as follows:  Exec=nautilus --new-window /home/judy/Documents   I've also edited the org.gnome.Nautilus.desktop file, just to be sure, with no joy.   I'm running Ubuntu 15.10.  Note: if I enter nautilus /home/judy/Documents from the command line, Nautilus properly opens in the desired directory.  Is there a simple way that I can configure an icon in the launcher bar to run this command and have the Nautilus icon that looks like a metal file drawer?  Thanks. I'm pulling my hair out over this one.


I wanted to test out the following code I had seen in an exam:  void fct(char *s, const char *t) {     while(*s++ = *t++); }   It is supposed to do the same as strcpy(), but when I ran it, it resulted in a segmentation fault at the first time the while-condition was evaluated. There was nothing apparent why it would segfault and others couldn't find the reason either.  I've compiled it with gcc 8.3.0 and gcc 7.3.0 both with the same results. I've also tried to debug with gdb which didn't bring any clarification either.  This is my testing code:  void fct(char *s, const char *t) {     while(*s++ = *t++); }  int main(int argc, char *argv[]) {     fct("hello", "world");     return 0; }   compiled with gcc -Wall -o test test.c. The same happened when the strings were in variables:  int main(int argc, char *argv[]) {     char *a = "hello";     char *b = "world";     fct(a, b);     return 0; }   int main(int argc, char *argv[]) {     char *a = malloc(sizeof(char)*6);     char *b = malloc(sizeof(char)*6);     a = "hello";     b = "world";     fct(a, b);     return 0; }


Can a submerged place in the sea have huge air pockets?

I know that air can be under water if there is something to contain it that prevents its escape. But can a place such as buildings or ancient ruins submerged totally under water hold air pockets as bigger as a room? I recently saw a home-made-video-of-sorts that claimed to have discovered a underwater ruin and showed its interior rooms absolutely devoid of water full of air. Is that even possible, to have an underwater ruin with a room full of air? I mean air has got to escape from somewhere.


please excuse my unfamiliarity with Scala/Java. I'm working with an example twitter streaming app. Below is the code:  stream.foreachRDD{(rdd, time) =>    rdd.map(t => {      Map(        "user"-> t.getUser.getScreenName,        "text" -> t.getText,        "hashtags" -> t.getHashtagEntities.map(_.getText)                )    }).map(_.mkString("\t")).foreach(println)  }   When this prints, I get something like this for hashtags:  hashtags -> [Ljava.lang.String;@651a3f4e   Does anyone know what's going on here? I'd like to print human-readable hashtags...


Table immediately preceded by a bolded line does not render

I have just written  containing extensive quotes from the ECMA-262 specification. One of the elements quoted is a table. xyzzy |foo|bar| |:-|:-| |a|b| |c|d| The table displays correctly in the preview, but in the actual post, raw Markdown appears. Can this be fixed? (By the way, is there a way to have a table <caption>?)


I seem to have proven that $e^{2\pi} = 1$. What is my mistake? See  for proof.


I am connected to friends hotspot via wifi so I want to keep track of my data usage of her hotspot. So I am checking the WiFi data usage, but since its for 3 months its not very useful.  How can I reset the WiFi data usage to zero? That would help. But I dont see how to do it.


Posts flagged for attention but there are none

The comment with the Flagged Posts that seems to be new as of today states there are posts with flags awaiting my attention but the counter shows zero and when I go into flagged posts there is nothing waiting for me.


Comment about the : "yes I had read it, but there are not convincing answers, in particular for multi draft questions. It's not complicated, it suffices to add a drafts space for each users, that's all".      If we want to have many drafts (questions or answers), we can post it and delete it immediately. When we have an improvement to do, we undelete the post, we do the edit, and we re-delete it. When the post is completed, we can choose to undelete it, for good.    Is this process allowed ? Else, how do otherwise ?


Please, what are the ubuntu 16.04 LTS screensaver installation commands? I will be grateful for any help that could help me to properly do the screensaver installation through terminal.


I"m sorry to post again, but I need some help  Let $f:A \rightarrow B$ and C⊂A. Define f[C]={b∈B:b=f(a) for some a∈C}. Prove each of the following statemnts  a)If f is a bijection, then f[A\C]=B\f[C].  let f be a bijection. meaning f[A]= all of B. since f is also 1 to 1 and C⊂A, then $C \rightarrow f[C]$ is also 1 to 1 and no other number touch f[C] and f[C] ⊂B Therefore f[A\C]=B\f[C]  Is this correct? thanks!  B. if f[A\C]=B\f[C] for ever C⊂A, then f is a bijection. not sure how to do this one.   Thanks for any help  Edit: my previous post got no comments or anything, so I'm posting again to try to get more help


How to automatically redirect to another HTML page

I'm doing the Memory Game for school using JQuery and JS. When the game ends, I'd like to redirect automatically to another HTML page but I can't... I tried many ways but none of these works.  I've already tried many commands like   $(location).attr("href", "Page.html"); window.location(...); window.location.href(...); location.href(...); $("body").load("Page.html");   .  if (j==2) {     setTimeout(function() {       if(images[0].attr("src")!=images[1].attr("src")) {         $(images[1]).hide();          $(images[1]).next().show();          $(images[0]).hide();          $(images[0]).next().show();          contatore = contatore + j;          if(contatore > 16) $("body").load("Win.html");       }     }, 200);      j=0; }   The expected results would be the automatically redirect to the secondary HTML page (Win.html) but the actual results are that when the game ends nothing happens.


How does adding Spells Known and Spell Slots work?

I am struggling to understand how exactly a player learns new spells, let's take for example the Ranger class:     At level one they don't get any spell or cantrips. At level two they get to learn 2 spells with level 1 slots available. At level three it says they know 3 spells with level 1 slots available.   Does that mean that at level 3 they know 3 spells of level 1 or are they added to the spell pool of previous levels, so 2 + 3 = 5 spells known in total at level 3?   Can someone please explain this as thoroughly as possible and, if needed, use examples from other spellcasting classes like the wizard and sorcerer as well.   I've looked in chapter 10 and 11 of PHB but haven't found the answer.


Hashirama Senju, a reincarnation of one of the sage of six paths son (Asura) and the only kage who Madara didn't ignore is one of the most overpowered characters in Naruto. Being so powerful (the authors had to make it so that) he had to die of a disease (as anyone who could beat him would have to be stronger than Madara). This is not just a theory as it is confirmed further by one of the data books, can someone help me find where exactly that is stated and what exactly was his disease?


Wifi stops working after suspend, 14.04.2

EDIT: New info - the problem of Wifi not working after suspend is fixed by downgrading to kernel 3.2 - unfortunately the downgrade causes other problems like my mouse cursor freezing and lagging, and ubuntu keeps giving error messages. Only the downgrade solves the problem, an upgrade to kernel 4.0.4 changes nothing.  When I turn on my computer after it has been completely shut down, the wifi connection works fine. However, if I suspend then resume, I cannot detect any networks. How do I get it to work properly? I am a Linux newbie and do not have much experience fixing these kinds of issues.  I am using: Ubuntu 14.04.2. In case it matters, it is set up as a dual-boot with Windows 7.  This issue is not new for me, I have experienced it a while back before 14.04.2. This is the primary reason I do not use Linux - it is inconvenient and wastes time to restart my computer all the time just to use the Internet, so I would greatly appreciate a solution that actually works. I've looked up solutions but nothing works for me (they usually involved making or editing some weird config file that does nothing).  My wireless card is a TP Link TL-WN951N. It is supposedly supported by Linux from what I can find online.  Also, in case it matters, this is the result of typing  lspci -v | grep -A 10 -i "Network Controller"   into the terminal.  Network controller: Qualcomm Atheros AR5416 Wireless Network Adapter [AR5008 802.11(a)bgn] (rev 01) Subsystem: Qualcomm Atheros Device 3071 Flags: bus master, 66MHz, medium devsel, latency 168, IRQ 19 Memory at fbef0000 (32-bit, non-prefetchable) [size=64K] Capabilities: <access denied> Kernel driver in use: ath9k


How to find duplicate files with same content, but with same or different names in linux? How to move them to bin or delete them permanantly?

I often end up with duplicate files with same content, but with same or different names while doing the literature study. How to find and delete the duplicate files from terminal? How to just move them to bin and recover later if necessary and how to delete them permanently?


Does the position of "only" give a different meaning to the sentence?

I've only been there once. ()   Does this mean ‘I’ve just been there not doing particular activities like studying or staying for particular something else, and I have once? (Because ‘only’ is put between verbs, it is different from ‘I’ve been there only once’.)      He has only seen her once. (The Cambridge Grammar of the English   Language)   Likewise, does this mean ‘he has just seen her not talking to each other et cetera, and he has once’?


In C - what does if(ptr->name & 0x10) mean

Newbie on C language. I understand pointers and hex format but I'm not sure what '& 0x10'  is doing. Could someone kindly explain it or advise me on topics to research and teach myself. Thank you.  if(ptr1->name & 0x10) {      prt2->indicator1  |= 0x80;       }


Will loop reference stop garbage collection?

In my class which inherited TreeViewItem  I used a field to store the parent TreeView object  TreeView _parentTreeView   Since TreeView will definitely have a reference to the TreeViewItem while the TreeViewItem holds a reference to the parent. Will this prevent both TreeView and TreeViewItem from being garbage collected?


Why is college tuition high, but academic salaries low?

Where is the money going to?   How can it be that interested students pay so much, but many academic salaries are so low (excluding the obvious full professor in a field where the industry pays for getting research results, like IT).


How to break long lines in python that have no brackets or operators?

This is different from similar questions I have found on this site as the code in question doesn't have any operators or brackets before the character limit to split easily on.  I have several long lines in python without operators or brackets before 79 characters.  As an example:  self.caller.parent.parent.parent.caller.parent.bar.ids.actionview.remove_widget(self.caller.parent.parent.parent.caller.parent.bar.ids.actionview.startbutton)   The above line has 72 characters before a bracket, and is within a function definition within a class so therefore with 4-char spacing per nest level, has 81 characters before a bracket.  What is the preferred way of dealing with this?


I have a corrupt tarball on my hands. My first attempt at recovery went like this:  $ tar --ignore-failed-read --ignore-command-error -xf tarball.tar tar: Skipping to next header tar: Archive contains ‘180738 0’ where numeric mode_t value expected tar: Archive contains ‘0.445647 -9.’ where numeric time_t value expected tar: Archive contains ‘.259273 ’ where numeric uid_t value expected tar: Archive contains obsolescent base-64 headers tar: Archive contains ‘-0.94874’ where numeric gid_t value expected tar: text from a text file is here: implausibly old time stamp 1969-12-31 18:59:59 tar: more text file contents are here: Unknown file type 'p', extracted as normal file tar: Skipping to next header tar: Skipping to next header tar: Exiting with failure status due to previous errors   This didn't extract much from the tarball before erroring out. The exit status is 2 which the tar man page says is a fatal error.  The documentation for "" suggested this:  cpio -F tarball.tar -i -v   This extracted 1.2G of a 1.8G tarball, which is pretty good. It stops with a bunch of garbage entered after the terminal prompt -- it isn't printed to the screen, it's as if I had typed it and didn't hit return yet.  Is there a way to do any better? Is there a way to try and "jump over the bad chunks" of the tarball?  With --ignore-zeros tar seems to be reading through the entire tar file.  tar -R --ignore-failed-read --ignore-command-error --ignore-zeros -xvf tarball.tar [...] block 3670356: ** Block of NULs ** block 3670357: ** Block of NULs ** block 3670358: ** Block of NULs ** block 3670359: ** End of File ** tar: Exiting with failure status due to previous errors   There are a lot of Block of NULs errors so it looks like the contents might be irretrievable.


Caused by: java.lang.NullPointerException MainActivity.onPostCreate

04-03 10:19:34.572    2189-2189/com.techexpert4u.duaaadhkaar E/AndroidRuntime﹕ FATAL EXCEPTION: main     Process: com.techexpert4u.duaaadhkaar, PID: 2189     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.techexpert4u.duaaadhkaar/com.techexpert4u.duaaadhkaar.MainActivity}: java.lang.NullPointerException             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)             at android.app.ActivityThread.access$800(ActivityThread.java:135)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:136)             at android.app.ActivityThread.main(ActivityThread.java:5017)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)             at dalvik.system.NativeStart.main(Native Method)      Caused by: java.lang.NullPointerException             at com.techexpert4u.duaaadhkaar.MainActivity.onPostCreate(MainActivity.java:936)             at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1150)             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2178)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)             at android.app.ActivityThread.access$800(ActivityThread.java:135)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:136)             at android.app.ActivityThread.main(ActivityThread.java:5017)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)             at dalvik.system.NativeStart.main(Native Method)   i NEED HELP ON THIS PLEASE HELP ME.  @Override protected void onPostCreate(Bundle savedInstanceState) {     super.onPostCreate(savedInstanceState);     // Sync the toggle state after onRestoreInstanceState has occurred.     mDrawerToggle.syncState(); }


[HTML][CSS] Div containing another 3 divs won't center

I am having another problem with one of my div containers. I tried every way to fix it but couldn't see the issue so this is why I am posting here again.  I have a big div container that has another 3 divs inside , and I can't find a way to center the big div...  Hope I pasted the html and css codes right , it gets confusing when I have to tap on space for each line lol

             Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do              eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut              enim ad minim veniam, quis nostrud exercitation ullamco laboris              nisi ut aliquip ex ea commodo consequat.

Placeholder_Name

             Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do              eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut              enim ad minim veniam, quis nostrud exercitation ullamco laboris              nisi ut aliquip ex ea commodo consequat.

Placeholder_Name

             Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do              eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut              enim ad minim veniam, quis nostrud exercitation ullamco laboris              nisi ut aliquip ex ea commodo consequat.

Placeholder_Name

   ----CSS---- .section3 {   width:50%;   height:500px;   background-color:#adaba7; }  .section3Container {   margin-top:50px;   }  .person {   width:30%;   float:left; }  .person img {   display:table;   margin:0 auto;   margin-bottom:30px;  }  .person h4 {   text-align:center; }  blockquote{   text-align:center;   font-size:15px;   font-style:italic;   color: #555555;   padding:17px 15px;   border-left:8px solid #b19530;    position: relative;   background:#e2e1dc;   border-radius:50px;   margin-bottom:20px;  }  blockquote::before{   content: "\201C";   color:#b19530;   font-size:4em;   position: absolute;   left: 10px;   top:-10px; }  blockquote::after{   content: ''; }


Using a variable within a regular expression (jQuery)

I'm attempting to replace all instances of a string within a variable, but the string I'm looking for is also a variable. How can I add this string within a regex?  var myVar = HelloWorldHello; var myString = Hello;  myVar = myVar.replace(/\\' + myString + '/g, '');   The above doesn't seem to be working. I need to end up with World.


Damaging inanimate objects in battles to indirectly gain advantage in battles

I was thinking of using Spell damage to knockdown a dead Tree trunk in order for it to land on two/three skeletons and therefore pinning them effectively in place.  Assuming having 1 Torch lit only with an all-human party (and I am Chaotic Evil), I was thinking of aiming my spell on the Torch effectively putting it out and make my quick getaway.   Are these possible scenarios?


If every cyclic subgroup of a group G be normal in G, prove that every subgroup of G is normal in G.  Attepmt  Let G be a group. Let H be a Normal subgroup of G. Let $K=\langle a \rangle$ be a cyclic subgroup of G generated by $a\in G$. We shall have to show that H is normal in G. That is to prove that for $h\in H$, $ghg^{-1}\in G$ for all $g\in G$.   If the steps I have written, please help me to solve the problem.


Most users seem to vote mostly on answers. How can users be encouraged to vote on the questions as well? (This was discussed in podcast 62.)


Internet Accounts spontaneously forgets passwords and I can't reauthorize them

I've had this problem before, but I was able to resolve it that time. macOS 10.13.4, everything up to date. Yesterday, Internet Accounts forgot my LinkedIn password and would not reauthenticate. Today, it forgot my Facebook password.   I've tried:   App specific password. Removing the account and re-adding it. Turning off 2-factor authentication. Deleting associated entries from Keychain. Logging out of iCloud, deleting Keychain entries, removing and re-adding the account, then logging back in.   First of all, what the hell—why does this keep happening?! Secondly, what else can I do to fix this short of reinstalling macOS?


C# casting how these two ways are different

In C# What's the difference in casting if I do  MyType  mytype = (MyType) obj;   Or   MyType  mytype = obj as MyType;


Automatically copy all files from connected usb drive with certain extension to local directory

I'm looking for a script to automatically back up files from a connected USB drive, with a pre-defined file extension, to a local directory on my machine. The script given in the top answer in  basically provides what I am looking for, except that it doesn't provide a way to limit it to files of a certain type. My programming knowledge is limited, I don't know how I would go about modifying the script to suit my needs and was hoping that someone might have a solution. Cheers


can I write c++ main function without return integer value? I am using visual studio 2010.  #include <iostream> using namespace std;  int main() {     cout <<"In main function" << endl;       //return 0;  }    `


Substitution in Definite and indefinite Integrals

Why can't we substitute $(x-2)^2=t$ in the Definite Integral $$\int_0^3(x-2)^2dx$$? And what about the same Substitution in the indefinite integral $$\int(x-2)^2dx$$


How to make browser to redirect a specific URL to another specific URL?

in the other words, I want when I put http://YYY .org/t/1212 on Chrome/Firefox search bar the browser automatically changes the URL (aka redirect) to http://XXX .org/t/1212  Please guide me to write a simple extension to do that.  UPDATE   I personally wrote a extension but still there's a problem :(  var url = window.location.href;     // Returns full URL var rest = url.substring(20); window.stop(); $(location).attr('href', 'http://imdb.com/'+rest)   but the browser load the http://YYY .org/t/1212 completely and then redirect to http://XXX .org/t/1212 . Is there any way to prevent the browser? I took some time and traffic


How to use `ybar interval` without skipping the last value

I have the following code  \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents}  \begin{filecontents}{testdata.dat}   -3.316988309367815e-07 0.07000000000000001   -1.948815911147526e-08 0.13   7.15864175355987e-08 0   1.799432483450127e-07 0   0.0002850606647384129 0   0.0009429559686380238 0.08999999999999997   0.00157188462064142 0   0.005259918700865051 0   0.01739392641273605 0.18   0.06208364670743995 0.55   68.69485148165926 6.970000000000001   31.217611224923 79.12   0 12.89 \end{filecontents}  \pgfplotsset{compat=newest} \pgfplotstableread{testdata.dat}\datatable  \begin{document} \begin{tikzpicture} \begin{axis}[   ybar interval,   width=10cm,   height=5cm,   enlargelimits=false,    xtick=data,   ymin=0, ymax=100,   xticklabels={0 -- 0.063,0.063 -- 0.125,0.125 -- 0.25,0.25 -- 0.5,0.5 -- 1,                1 -- 2,2 -- 4,4 -- 5.6,5.6 -- 8,                8 -- 11.2,11.2 -- 16,16 -- 22.4,22.4 -- 31.5},   x tick label style={rotate=60,anchor=east}   ]   \addplot table[x expr=\coordindex,y=0]{\datatable};   \addplot table[x expr=\coordindex,y=1]{\datatable};  \end{axis} \end{tikzpicture} \end{document}   and the output looks like this:    But the command ybar interval does skip the last value. It should look like:    I prefer to have the last value to show up in the interval 22.4 -- 31.5. How do I achieve this without inserting a row of zeros to my table?


minimal polynomial of powers of a matrix

I am wondering, given the minimal polynomial of $A$, what can we say about the minimal polynomial of $A^n$?  I know that if we were looking at the roots of the characteristic polynomial ie eigenvalues then the roots of the characteristic polynomial of $A^n$ would be $nth$ powers of the eigenvalues so again these are roots of the minimal polynomial also.


So I have a textfile of which I want to remove everything to the first colon (including the colon). So for example if this is the input 0000007ba9ec6950086ce79a8f3a389db4235830:9515rfsvk 000000da2a12da3fbe01a95bddb8ee183c62b94d:letmein2x 000000edf3179a1cf4c354471a897ab7f420bd52:heychudi:rbhai 000000f636f0d7cbc963a62f3a1bc87c9c985a04:cornetti 0000010a15f5b9315ef8e113f139fa413d1f2eb2:3648067PY128  Then this should be the output 9515rfsvk letmein2x heychudi:rbhai cornetti 3648067PY128  Note that the second colon in line 3 remain, only from the start of each line to (including) the first column should be removed. Is there a quick way to do this with grep or awk?


Can anyone teach me about p-adic expansion? especially the case where we have to expand a square root.  I need to know how to construct them. for example: the 7-adic expansion of $\sqrt{305}$.  This is a general question and not an assignment or anything, so i cannot post the progress.   That is just a random example, please use any other example to explain if it's easier to understand.  edit: I'm stuck with the cases where i have to expand the square roots, expanding rational numbers is fine though


I am trying to understand how the orientation is induced on the boundary of a differentiable manifold with boundary. Here is what I have worked out so far:  Let $M$ be a differentiable manifold and let $\partial M$ denote its boundary. Let $U$ be an open set in $M$ with $U \cap \partial M \neq 0$. Similarly let $V$ be an open set in $M$ with $V \cap \partial M \neq 0$. Let $x_i$ and $y_i$ be local coordinates in $U$ and $V$ respectively. On the boundary $x_1 = 0 = y_1$. Furthermore we know that the function $y_i = y_i (x_1,\dots, x_m)$ is differentiable. Then the orientation on $\partial M$ will be the orientation given by $x_i$ and $y_i$. It remains to be shown that this is well-defined that is the same on $\partial M \cap U \cap V$. Assuming what I wrote so far is correct my question would be how to do this final step?


Does this paper falsify the vacuum energy?

If Dark Energy is falsified by this paper, , does that mean the vacuum energy is also falsified?