My computer has 16GB RAM and 1TB SSD. So I think the swap partition is not really needed.  What's the pros and cons of disabling the swap partition if the RAM is large enough?  Is it recommended to disable the swap partition in such a case?


Macbook air 2011-mid keyboard keys Q W E R T Y U I O working sporadically

I have an issue where only QWERTYUIO keys are working sporadically or just not working. I have to press them a lot of times to start working and they work for a while and stop again. I have tried reseting PRAM and SMC but with no luck. When I use the Keyboard viewer they keys are not even being registered when I press them.   Kind Regards


Theme and UI changed after restart (20.04 LTS)

Yesterday night I shut down my laptop, and today when I turned back it on, it's UI got changed, the bottom bar(Dock) and top bar got white and dock UI also got changed. Also, I am not able to search for apps when I press super(windows) key, only opened apps visible to me in activities. Here are some screenshots    I am completely new to ubuntu please suggest me something.  In activities, its theme color is blue, but my default theme is dark grey. Output of


How to time different parts of a loop in Javascript

Not a duplicate of . Please actually read my question before marking it as a duplicate of something else. Regardless, it's been answered.    I have code like  for (var i = 0 ; i < 10000 ; i++) {      doSomething();      doSomethingElse();  }   And I want to know how much time each function inside the loop is taking overall. How do I measure that?


Difference between inline view and WITH clause?

Inline views allow you to select from a subquery as if it were a different table:  SELECT     * FROM /* Selecting from a query instead of table */     (         SELECT             c1         FROM             t1         WHERE             c1 > 0     ) a WHERE     a.c1 < 50;   I've seen this referred to using different terms: inline views, WITH clause, CTE and derived tables. To me it seems they are different vendor specific syntax for the same thing.  Is this a wrong assumption? Are there any technical/performance differences between these?


Prove that a group of size $\ge18$ people can be assembled from groups of 4 and 7

How can I prove that a group of size $\ge18$ can be assembled from groups of $4$ and $7$ using the well ordering principle?   Well-ordering principle: Every nonempty subset $T$ of $N$ has a least element. That is, there is an $m ∈ T$ such that $m ≤ n$ for all $n ∈ T$.  I have the following unorganized thoughts: I can only prove this by induction not Well Ordering Principle so please let me know how to do that!   Proposition:  $P(n)$: If n $\ge18$, there is a group of people of size $n$ made from groups of $4$ or $7$.   $P(0)$: is vacuously true  Inductive step: assume $P(0)...P(n)$ is true. Then $P(n+1)$ must also be true.  I don't know how to write this part:   ---Unorganized thoughts The rules that I have come up with is:   If the size is $\ge 5$ groups of $4$, then you replace by $3$ groups of $7$.  If the number cannot be represented in multiples of $5$ groups of $4$, replace one of the groups of $7$ by $2$ groups of $4$ Repeat as needed until you get the requested number, which is now made up of groups of $4$ and $7$.    How do I write that as a proof? These are unorganized thoughts.    Please write your steps in detailed order so I can follow. I'm not very proficient in math symbolism so please explain symbols if possible.   Thanks!


I have a problem in the authentication controller in line 25 ret = autRequest.body(); Caused by: java.lang.NullPointerException at com.bfi.bnpparibas.ctrl.PostServiceController.authenticate(PostServiceController.java:25)  What is the cause so that you stop the exception from causing the program to terminate prematurely?  @PostMapping("/authenticate") public @ResponseBody LoginResponse authenticate(   @RequestBody AuthenticationBody ab, HttpServletRequest request,    HttpServletResponse response, ModelMap model) {     String service = "AUTHENTICATION";     String remoteAddress = request.getRemoteAddr();      AuthenticationResponse ret;     String credentialsStr = ab.getUser() + ":" + ab.getPwd();     String authStr = "Basic " + new String(org.apache.commons.codec.binary.Base64.encodeBase64(credentialsStr.getBytes()));       LoginResponse loginResponse = new LoginResponse();     Response<AuthenticationResponse> autRequest = null;     try {         autRequest = api.authenticateUserWithCredentials(authStr, ab).execute();         System.out.println(autRequest);     } catch (IOException e1) {         e1.printStackTrace();     }      try {         ret = autRequest.body();         if(ret == null){                 okhttp3.ResponseBody message = autRequest.errorBody();               loginResponse.setMessage(message.string());            loginResponse.setHasError(true);             return loginResponse;         }     } catch (IOException e) {         throw new RuntimeException(e);     }      Cookie cookie;     if (config.isTestCookie()) {         cookie = new Cookie(config.getCookieName(), config.getTestCookieValue());     } else {         cookie = ControllerUtility.extractCookie(request);     }     String[] cookieTokens = ControllerUtility.decodeCookie(cookie);       String ClasseC2P = cookieTokens[0];     String LangueC2p = cookieTokens[1];      Boolean loginAs = false;      if (cookieTokens.length >= 4) {          loginAs = Boolean.valueOf(ControllerUtility.splitWithEqual(cookieTokens[3])[1]);     }     UserWeb userweb = ret.getUserweb();      BNPAuthentication authentication = new BNPAuthentication(userweb,                                                              ret.getServices(),                                                              ret.getProfiles(),                                                              ret.getParamBEL(),                                                              cookie,                                                              loginAs,                                                              config.isShowMenu(),                                                              config.withCredentialsLogin(),                                                              ClasseC2P,LangueC2p);     if (authentication.isAuthenticated()) {         try {             GlobalDates globalDates = api.globalDates(authentication.getUserWebId(),                                                       "GETDATES",                                                       request.getRemoteAddr()).execute().body().get(0);             authentication.setGlobalDates(globalDates);         } catch (IOException e) {             throw new RuntimeException(e);         }         SecurityContextHolder.getContext().setAuthentication(authentication);     }      loginResponse.setRet(ret);     loginResponse.setHasError(false);     loginResponse.setMessage("");     return loginResponse; }


How can I inset/extrude a face, so that the outer faces have the same width?    Any kind of help is appreciated


I currently have only Ubuntu stored on my new SSD, and am looking to add a dual boot to Windows 10.  However, I can't find much online explaining how to do so when Ubuntu was first. I don't really want to go through the hassle of uninstalling Ubuntu, installing Win10, and then reinstalling Ubuntu.  Anyone know a way around this?  Thanks


Different Packaging Error Problem for General function failure

I am using ArcMap 10.3 and while using Share As > Map Package, I was trying to save the package to disc. There were no errors when I used Analyze. So I hit the Share button and after a little bit of work, the “Save Map Document” pop up window came up. Immediately after saving it I got a “packaging error_general function failure”  First, here at StackExchange, a similar issue was resolved using the Check Geometry function. However, after checking both my layers' geometry, I didn't find any errors.   Second, searching online I found that another user fixed this problem when two feature classes were using the same data source. I deleted one of the layers that I wasn’t using to make sure the data was being drawing from only one table, but I'm still having the problem.  It seems this broad error can indicate a variety of problems.   How do I troubleshoot to figure out why I’m getting this error?   It would be easier if it was a geoprocessing tool creating the issue.


I am in the process of re-branding my company logo, webpage etc. I really like the "copperplate" font for the company name, however it is limited in that there is no bold option or lower-case option. I want to use another font and am curious if this is common practice? If it is, what should I be looking for to ensure the fonts don't clash?  Any help is appreciated!  /m


Determine whether Logic Board has actually been replaced

I recently had the Logic Board in my Retina MBP 15″ 2012 replaced under a warranty extension program and Apple paid for it. I've reinstalled OS X several times and feel things aren't running properly. Also, I also couldn't find a way to merge my Time Machine old backups with new one.  The problem I have is confirming that I actually got a new board installed. I have not found a way to confirm this. My Mac help isn't helpful and Google is even less helpful. Why is it so hard to confirm that new hardware is really installed after this repair?


Expected number of hamiltonian paths in a tournament

The following theorem is from Alon&Spencer's The probabilistic method, in the beginning of chapter 2:  Theorem 2.1.1: There is a tournament $T$ with $n$ vertices and at least $\frac{n!}{2^{n-1}}$ Hamiltonian paths.  Briefly the theorem is proved by looking at $X_\sigma$ the indicator random variable for a permutation $\sigma$ giving a Hamiltonian path, that is, satisfying $(\sigma(i),\sigma(i+1))\in T$ for $1\leq i \lt n$. Then   $\sum \mathbb{E}\left[X_\sigma\right] = \frac{n!}{2^{n-1}}$.  I don't understand where did this value ($\frac{n!}{2^{n-1}}$) came from! could someone explain it please?


How does $\sqrt{2}^{\log n}$ become $n^{\log \sqrt{2}}$

In proving that $(\sqrt2)^{\log n}$ = O(n)$, where log is base 2, the solution is below.  I understand the solution except for the two lines that I starred.  How does the first line become the second line?   $$* \space \space \space \space\sqrt{2}^{\log n}$$  $$*= n^{\log \sqrt{2}}$$ $$= n^{1/2}$$ $ \le n$, for $n \ge 1$ So, $n_0 = 1$ and $c = 1$.


Children's book series: a girl is unique in that she can bond with all animals, can use their powers

I remember reading a series of children's (or possibly young-adult) books some time between 2000 and 2010, about a girl (I think) who was able to commune with animals somehow. She was able to use their powers in the form of conceptualised weapons, although the use of such a weapon often didn't bear any real resemblance to the physical weapon it was named after. For example, I think the "sword" was a way of combining the power of lots of creatures together to do something - I think she used it to heal an animal. Other named weapons were the hauberk (or possibly halberd - I had only a vague notion of what these words meant when I read the books) and (I think) the shield, although I forget what they did. The girl in question has some natural affinity with animals. Over the course of the first book she learns that people exist who are capable of bonding with one particular kind of animal and gaining some of the powers of that animal; but she is special in that she can bond with any animal, and she learns to use this power over the course of the book. She learns that others like her used to exist, but she is the only one known at the time of the first book. I think some of the animals involved might be mythical. In one of the later books, there was something to do with a wind farm, and I remember a scene where it's mentioned that the wind turbines were spinning very fast in a catastrophic storm. There was definitely a kraken at some point in the series. I was in the UK, and I suspect the books were UK in origin. I want to say that the girl's name was Meg, but I'm only about 5% confident on that.


The positive zero of the equation $x^n+x^{n-1}+x-1=0$

The original question follows:  For any natural number $n$, let $x_n$ be the unique nonnegative zero of the equation $$x^n+x^{n-1}+x-1=0$$ Show that the sequence $\{x_n\}$ is increasing and converges to $1$.  I proved that the sequence $\{x_n\}$ is increasing:  Let $f_n(x)=x^n+x^{n-1}+x-1$. $f'_n(x)=nx^{n-1}+(n-1)x^{n-2}+1 \gt 0$   in interval [0, $\infty$) : $f_n(x)$ is increasing $f_n(1)=1+1+1-1=2\gt0 \space\space \rightarrow x_n \in [0, 1)$ $f_{n+1}(x_n)-f_n(x_n)=\left(x_n^{n+1}+x_n^n+x_n-1\right)-\left(x_n^n+x_n^{n-1}+x_n-1\right)=x_n^{n-1}\left(x_n^2-1\right)<0$ Since $f_n(x_n)=0$,$ \space\space f_{n+1}(x_n) \lt 0$, which informs $x_n<x_{n+1}$. Therefore, $x_n$ is increasing.  However, I do not have any ideas for the next questions. Could you please give me some hints for the convergence of $x_n$? Thanks for your efforts:D


Is $A$ similar to $A^T$? Where $A$ is an $n \times n$ matrix   Is this true? If so, we have to show there exists an invertible matrix $P$ such that     $A = P^{-1} A^T P$   How do I approach this?


Proving that for all $n∈\mathbb N$, if $n^2=4q+r$ for $q,r ∈ \mathbb Z$ with $0≤r<4$, then $r = 0$ or $r = 1$.

Prove that for all $n∈ \mathbb N$, if $n^2=4q+r$ for $q,r ∈ \mathbb Z$ with $0≤r<4$, then $r = 0$ or $r = 1$.   The only way I can think is prove that $4|n^2$ or $4|n^2-1$ is true by induction. However it seems not a good idea by this way. Can anyone help?


I need to get the all strings that sit between open and closed parentheses. An example string is as follows     [CDATA[[(MyTag),xi(Tag2) ]OT(OurTag3).   The output needs to be an array with MyTag, Tag2, OurTag3 i.e. The strings need to have the parentheses removed.   The code below works but retains the parentheses. How do I adjust the regex pattern to remove the parentheses from the output?  string pattern = @"\(([^)]*)\)"; string MyString = "[CDATA[[(MyTag),xi(Tag2) ]OT(OurTag3)"; Regex re = new Regex(pattern); foreach (Match match in re.Matches(MyString)) {     Console.WriteLine(match.Groups[1]); // print the captured group 1 }


So I like an idiot wanted to make money and fast so I picked a sugar mamma who I then gave access to my online banking. **After! Agreeing to an amount of 300$ ** she then told me she was going to need me to buy google play cards for her site supervisor. So she sent me 2500 and told me to keep 200$ for myself.. then sent me 1500$. So I called my bank telling them exactly what happened. And now my sugar mamma is threatening me with a lawyer for fraud.. apparently if it was her lawyer txted me with incorrect spelling as well! Saying if I do not go get what my sugar mamma wants he we be calling the Canadian police to tell them about the whole thing.  But what does not make sense to me is that if she herself make a deposit on my account willing that I have in txt msg how is that me frauding her.


The area of four circles at the origin intersecting

The problem asks:    I don't even know where to start. Do I need to find the width of the shaded areas, or something else completely?  UPDATE: Using the information given , I was able to act as if the circles were inside of a square and use those methods.  Thank You


How many times do I need to collect sets of Steam Trading cards?

I managed to craft the Team Fortress 2 badge after trading away a couple of duplicates to friends. However when I went to view my badge progress, I noticed that the remaining duplicate cards had formed an alliance and were requesting more of their friends for another badge.  Just how many levels are there for card badges?


Headphones / internal speaker not detected after upgrading to 20.10

After upgrading my Dell G5 15 from Kubuntu 20.04 to 20.10, the only output device for playing audio is my HDMI monitor. I am not able to play sound using the integrated speakers and my 3.5mm-jack headphones are not detected, when I plug them in the laptop. What can I do to fix my installation, so I can play music through the internal speakers and headphones? I tried switching to internal speakers or headphones using pavucontrol (inspired by this question: ), but I can see only HDMI-related options in pavucontrol as well. No internal speakers, no headphones. Edit: I once managed to make the sound work by restarting the computer, but it was right after the upgrade to 20.10. Now rebooting does nothing.


How to compile Realtek 8188CE wireless driver on Ubuntu 13.04?

I'm on a Toshiba Satellite C660_EL trying to install .   lspci -v Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)   However, I can't get the driver from there to compile (I've installed build-essentials already). Running make (with or without sudo makes no difference) I get  make -C /lib/modules/3.8.0-19-generic/build M=/root/rtl_driver modules make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'   CC [M]  /root/rtl_driver/base.o In file included from /root/rtl_driver/base.c:39:0: /root/rtl_driver/pci.h:247:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl_pci_probe’ make[2]: *** [/root/rtl_driver/base.o] Error 1 make[1]: *** [_module_/root/rtl_driver] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic' make: *** [all] Error 2   There is a relevant PPA here:  but there's no 13.04 build.   Thanks in advance for any help!


Why does finder in some cases show a different directory name than "ls"?

I have been crawling through my "~/Library/Container" contents and noticed an oddity that I was so far not aware could even exist: I have two directories there that have different names in Finder vs Terminal / "ls". How is that possible? Where does the Finder name come from? ➜  ~ ls -dlOe@ Library/Containers/com.docker.docker drwxr-xr-x@ 5 patrick  staff  - 160 Dec 15 17:22 Library/Containers/com.docker.docker         com.apple.metadata:com_apple_backup_excludeItem  61  I find it absolutely horrible. The only way to know which directory is which for me, at the moment, seems to be to drag-and-drom the file to the terminal. There the name magically changes.


How do I add an image in the upper, left-hand corner using TikZ and graphicx

This is perhaps a simple question with a simple answer, but I'm stumped as a tikz novice. What would be the best method to add an image (logo) file to the upper left-hand corner of my document?    MWE:  \documentclass[12pt]{article}  \usepackage{lipsum} \usepackage{showframe} %\usepackage{tikz} %\usepackage{graphicx}  \begin{document}  \section*{Lorem Ipsum}  \lipsum[1]  \end{document}   I wish to avoid using fancyhdr to achieve this result.


Backup of MongoDB collection data and rename the collections

I want to take a collections data backup on a different host, with renaming the Collections.   I am very new to MongoDB. Please help me with this task.


Is there any unique function $c=f(a, b)$ such that if I know only $c$, I can deduce unique $a$ and $b$ from it?

I want to know a relation $c = f(a, b)$ (where $a, b, c$ are real numbers) such that if I only know $c$ I can deduce $a, b$ inputs from it.  As an example consider $f(a, b) = a+b$, then $f(2,3) = 5$ but if I know $5$ as an output only,  I cannot get $2, 3$ uniquely because $f(1,4), f(5,0)$ all of them give the same result $5$.  Does there exist such function which can make me guess input $a, b$ as unique?  also a, b belongs to every real number R. ie. I should be able to pick any a, b from R.


Difference between executing multiple commands with && and ;

What's the difference between executing multiple commands with && and ;?  Examples:  echo "Hi\!" && echo "How are you?"   and  echo "Hi\!"; echo "How are you?"


Help Regarding Fourier Transform of Modified Bessel Function of Second Kind

I am looking for suggestions to evaluate this F.T which involves bessel function of the second kind (of zero order) I = $$\int_{-\infty}^{\infty} K_0(\sqrt{z^2+a^2}) e^{i kz} dz $$ Can this Integral I be solved analytically? Are there any analytical approximations I can use? Thanks


I'm looking for a way to send SMS messages from my Samsung Galaxy Tab 10.1 (Wi-Fi GT-P5113). The unit is connected to the net via Wi-Fi.


Searching element in String array in JAVA?

I have made a JAVA program where I have initialized a 1-D String array. I have used for loop to search any inputted String if it exists in the array(Scanner Class).  Here is the source code :-  import java.util.*; class search {     public static void main(String args[])     {         Scanner sc=new Scanner(System.in);         System.out.println("Enter the name to search :-");         String s=sc.nextLine();         String array[]={"Roger","John","Ford","Randy","Bacon","Francis"};         int flag=0,i;         for(i=0;i<6;i++)         {             if(s==array[i])             {                 flag=1;                 break;             }         }         if(flag==1)         System.out.println("The name "+s+" Exists");         else         System.out.println("The name "+s+" does not Exists");     } }   The class even compiles successfully, but when I enter a valid string(say- Roger), the output is The name Roger does not Exists.  Please help me out with this issue, and for this I shall be grateful to you.  Thanking You,  J.K. Jha,  01.09.2018.


Revision of Borel-Cantelli, $(X_n)_{n \geq 1}$ sqn of $\geq 0$ identical RVs with $E(X) < \infty$ then $X_n/n \to 0$ a.s., are my arguments correct?

I care to understand the concept behind the Borel-Cantelli Lemma better, hence I would appreciate it if someone could take the time to check if my arguments below are clear and rigorous.     Statement: Let $(X_n)_{n \geq 1}$ be a sequence of non-negative random variables that are identically distributed $X_n \sim X \geq 0 $ with $E(X)< \infty$, show that $ X_n/n \to 0$ almost surely     Proof: Since $X_n \sim X$ for some non negative random variables we can easily compute that for $\epsilon >0$ we have $$ \infty>E(X/\epsilon) = \int_0^\infty P(X/ \epsilon > t) dt = \sum_{n=1}^\infty \int_{n-1}^n P(X/ \epsilon > t ) dt \geq \sum_{n=1}^{\infty} P(X/ \epsilon >n) $$ Thanks to the Borel-Cantelli Lemma we obtain that $$ P ( \limsup_{n \to \infty} \lbrace X_n/n > \epsilon \rbrace ) = 0 \iff P ( \liminf_{n \to \infty} \lbrace X_n/n \leq \epsilon \rbrace) = 1 $$     Question: Does the $\epsilon$ in the above depend on $k$?   I think it does and I would argue as follows $$P( \liminf_{n \to \infty} \lbrace X_n/n \leq \epsilon \rbrace )= P  \left( \bigcup_{n=0}^\infty \bigcap_{k=n}  \lbrace X_k/k \leq \epsilon (k) \rbrace \right) $$ Now using the chain of inclusions that state that we have for $\epsilon >0$  $$ \lbrace \limsup |X_n-X| < \epsilon \rbrace \subset \liminf \lbrace |X_n-X| < \epsilon \rbrace \subset \lbrace \limsup |X_n-X| \leq \epsilon \rbrace $$ We conclude that $$ P ( \lbrace \limsup_{n \to \infty } X_n/ n \leq \epsilon(k) \rbrace)=1 $$ Where I choose the same $k \in \mathbb{N}$ as above, and then choose $k^*$ large enough such that $\epsilon(k) \leq \frac{1}{k^*}$, define the set $$ \Lambda_{k^*}:= \lbrace \limsup_{n \to \infty} X_n/n \leq 1/k^* \rbrace \implies P(\Lambda_{k^*})=1$$ and also we obtain that $\Lambda:=\bigcap_{j \geq k^*} \Lambda_{k^*}$ is still an almost sure event, i.e. $P(\Lambda)=1$ but for all realizations $\omega \in \Lambda$ we have $\limsup_{n \to \infty} X_n( \omega)/n \leq 0  \implies X_n( \omega)/n \to 0$ for all $\omega \in \Lambda$ that is$X_n/n \to 0$ almost surely $\Box$  Are my arguments given above correct and more importantly complete? Are there steps where you'd use different arguments?


Why is it that only the particle with negative energy is absorbed into the black hole on the event horizon during Hawking Radiation? What discriminates between the particle or antiparticle?


Let $p$ be an odd prime, and let $g$ be a primitive root modulo $p$. Prove that $g^\frac{p-1}{2} \equiv -1 \ (mod \ p)$.  I've seen this solution on the math stack exchange but most of the solutions use quadratic reciprocity. Unfortunately, I skipped that section because it seemed very hard, but the proof that  $g^\frac{p-1}{2} \equiv -1 \ (mod \ p)$ seems easy with it.  Is there another way to solve this This question is proposed in the chapter of Finite Abelian Groups.  DEF:In elementary number theory, an integer $g$ is called a primitive root for the modulus $n$ if $\mathbb{Z}_n^\times$ is a cyclic group and $[g]_n$, is a generator for $\mathbb{Z}_n^\times$.


Javascript array deep copy not working as expected

I have two javascript arrays. I need to copy the array values from one another. I have used code like below.  javascript    let firstArr = [{name: "one"},{name: "two"}]; let secondArr = [...firstArr]; secondArr[0].name = "three"; console.log(firstArr) console.log(secondArr)     I have changed only "secondArr" values. But first array values are also changed. I have used the spread operator, so it will create a new memory then why the first array values are also changed?  Could you please anyone explain this. Thanks in advance.


How much contribution justifies being a co-author of paper

I am part of a Computer Graphics lab where I got to help a small team already working on a paper, by assimilating/cleaning up some data sets which they required. I was also part of some discussions and shared my views whenever possible trying to help them in analysis phase. I have hardly any other contribution other wise.  Going forward, I am now being offered to be one of the co-authors of the paper. I kind of feel that I haven't really done enough and its almost reaching it's ending stage anyways, so not much chance in future as well.   Other team members are making a point that it won't be just on their part if this work takes up my time even when I don't get to be an author. I am in kind of a moral dilemma as I don't feel my contribution is enough.  Q1. Is just helping out a good enough reason to be a  co-author ?   Q2. How do I justify to myself if I have really contributed enough ? Or should I let the team decide if my work is sufficient ?  Q3. In general, are their any tangible points/guideline I can verify my contribution with ?


Is it possible to identify this chrysalis?

At least I believe it's a chrysalis. I found it hanging from my gate the other day.  I'm in Western Arkansas:


Generate all distinct partitions of `n` balls into bins

Given 3 balls, there are 3 ways to partition them into bins:  (3) (2,1) (1,1,1)   Note that (1,2) is already covered in (2,1), since we don't care about the order of the bins.  I'd like to write a function that gets the number of balls n and outputs all  possible partitions, in an efficient way.  This is what I came up with:  from itertools import combinations from functools import reduce def all_partitions(n):     n_bits_on=set([tuple(reduce(lambda x,y:x[:y]+[1]+x[y+1:],c,[0]*(2*n-1))) for c in combinations(range(2*n-1),n)])     return set([tuple(sorted(filter(lambda i:i>0,reduce(lambda x,y: x+[y] if y==0 else x[:-1]+[x[-1]+1,],p,[0])))) for p in n_bits_on])   What the code does is:   Generate all bit-arrays of size 2n-1 and n bits on (using itertools.combinations) Regard zeros as partitions and ones as balls - sum the number of ones between two zeros (with reduce) Sorting all options, and removing duplicates with set()   The code works, but it is very slow.  Any ideas how can it be improved ?


The following steps to rebuild TikZ's pgfmanual.pdf fail on Windows 7 64 bit using MikTex and bash shell:      1) cp -iar /c/opt/miktex_2.9/doc/generic/pgf  .   2) cd  pgf/version-for-luatex/en   3) Modify line 10 in both files pgfmanual-test.tex      and pgfmanual.tex so that it becomes:        \documentclass[letterpaper]{ltxdoc}    4) mkdir plots   5) make   6) The command "grep gnuplot *log" shows lines such as:       runsystem(gnuplot plots/pgf-x.gnuplot)...disabled.    7) Run gnuplot on each of the 8 files in plots/*gnuplot,      which results in 8 files plots/*table    8) make; make; make; make       The last make reports that there was nothing to do for 'all'.    However,   Page size continues to be A4 (rather than letter) Built document has only 1142 A4 pages (pre-built manual has 1165 A4 pages)   So question:  how to build the TikZ manual in letter size with all the information present?


What characteristics of a MOSFET should I be looking at?

I'm trying to determine a MOSFET for a circuit I'm building which will drive the gate of an N-channel MOSFET at 3.3v with an available current 40mA (**this will be driven using PWM at 4MHz), the MOSFET will be driving a load of 10A at 3.5v. I'm not sure what characteristic I should be looking at to create the most efficient circuit. I know that I'll need a low RDSon but I'm not sure if gate capacitance or anything else comes into play when choosing a MOSFET.   Appreciate any help!


Hardware requirement for video serving to 400 concurrent users

I need to serve at least 400 concurrent users about 150MB of files (video/audio). What kind of hardware would you suggest is required? Planning to use Ubuntu for OS, and Apache for serving.   The usage is for internal network and not over internet.   I'm specifically looking for an idea about the HDD speed, amount of RAM, and Processor you think would be required.


sudo: unable to resolve host shrenik-doshi: Name or service not known

I am getting this error for everytime I am executing sudo.  What can be the possible issue?


Proving that these terms have no common factors

If $m = a_1x + b_1y$ , $n = a_2x + b_2y$ , $a_1b_2 - a_2b_1 = 1$ then prove that $\gcd (m,n) = \gcd (x, y)$   My attempt  Let $c = \gcd (x,y)$ and $d = \gcd (m,n)$   then $c \mid d$  $\frac{d}{c} = \gcd (a_1k + b_1l, a_2k + b_2l) = \gcd \big(k(a_1 + a_2) + l(b_1 + b_2) , a_2k + b_2l \big)$ where $k = \frac{x}{c}$ and $l = \ \frac{y}{c}$  Two observations at this point are that $ \gcd (k, l) = 1$ and $\gcd (a_1 + a_2, a_2) = \gcd (b_1 + b_2, b_2) = 1$  At this point my proof will be complete if I can prove that $\frac{d}{c} = 1$ and hence $d = c$. Unfortunately I don't know how to to do this, so I would appreciate any help.   Update: I thank you all for your answers, although admittedly I don't have enough experience to understand things like Cramer's rule (I guess I'll come back to it once I learn linear algebra).


How can I get the vector value of the normal of a selected face using the Blender Python API?

I found one solution where I can sort-of get it mathematically by getting the cross product of the vectors in the face, but I think I'm losing accuracy since its all in floats, and rounding the array doesn't really work for what I'm doing.   I'm doing because I need a way to compare the angle of each of the faces to tell if faces are 'parallel' to each other. (not sure if 'parallel' is the right word in this case)   This is the math script that's sort-of working for me  p1 = np.array(co_list[0]) p2 = np.array(co_list[1]) p3 = np.array(co_list[2])  v1 = p3 - p1 v1 = p3 - p1  normal = np.cross(v1, v2)   This is my test geometry   And this is an example of the 'parallel' faces I was talking about (if there's a better term for this please let me know.   I feel like the best way to do this is by getting the direction of the normal for each face and comparing them. Does anyone know of a way to extract the normal value of the face using the blender API?


Store table in separate filegroup in SQL Server

I have big SQL Server database, with a lot of blob data in some tables.  For performance optimization, I want to move one table to separate hard drive.  I created new filegroup, and "row data" file.  But, I can't change any parameters in table properties: they are all disabled.  And I don't know a way to enable it.  Can anybody help me?


We have a Windows 2008 server that is connected to a managed switch with about 15 Cat5e connections and three fiber branches that go to different parts of campus. At each of these parts there is another managed switch that branches out to the LAN. Our cable Internet comes into one of these locations, goes through the supplied modem and into a Sonicwall.  Question: Under DNS settings on all the switches, should I list the LAN Server IP and/or just the Gateway IP (Sonicwall)?


The limit of a sum of the form $a_0 \sqrt n + a_1 \sqrt {n + 1} +\cdots + a_k \sqrt {n + k}$

If $ a_0 ,a_1 ,\ldots,a_k  $ are real numbers such that  $$ a_0  + a_1  + \cdots + a_k  = 0$$  Find $$  \lim_{n \to \infty } (a_0 \sqrt n  + a_1 \sqrt {n + 1}  +\cdots + a_k \sqrt {n + k} )$$   I just can't see any solution, can anyone help ?


What's the "right thing to do" when latest version of some gnu software is not available via apt-get

I run Ubuntu 16.04 and need to use ddrescue from the gddrescue package. (NB: this is NOT the same software at all as dd_rescue from the ddrescue package). The latest version available via apt-get is 1.19, and the latest version available via apt-get for ANY version of ubuntu is 1.22. However, the latest version available from gnu.org is 1.23, and I would like to run the latest version. My questions are:   I have no problem to build the latest version from ftp.gnu.org/ddrescue/ddrescue-1.23.tar.lz, but once I do, is there some way to install it on my system so that apt-get "knows" about it? For example, if 1.20 appears in some repository I use, I would not like apt-get to "upgrade"  to this, etc. Would it "decent/correct/good/nice" of me to turn my build of this software into an apt-get installable package and contribute it to the appropriate repositories? I can't imagine that it's all that difficult to do, though I CAN imagine that it might be a bit fiddly and that for security reasons, random unknown users are not in general allowed to upload upgrades of established software packages.    If this is a contribution which is allowed, could someone point me to a. the official directions for producing an apt-get package? and b. the official directions for submitting that package?   I run Ubuntu 16.04, but I'll bet that ddrescue builds identically for any distro that's based on the same debian as that version of Ubuntu. Should I be trying to contribute a package for that debian?  Thanks


Merging 2 raster one with corn data one with wheat

This is my first time working with rasters outside of a class on remote sensing, Im working on learning the vocabulary and hope Im doing a ok job of it.   I would like to merge two rasters both have the same spatial extent one has number of harvested hectares for corn the other for wheat. Each raster cell has a value that gives the number of harvested hectares of corn or wheat. I would like the finished raster after the merge to show different color ramp for both corn and wheat. Each cells should show after the merge the value for harvested hectares area this could be corn or wheat.  I have used the raster calculator to merge the two raster but this gives me one value with a the two harvested hectares summed, I need have one raster with a column for corn harvested hectares and a column for wheat with harvested hectares.  I am using arcGIS 10.3


The Legendre's conjecture states that the inteval $(m^2,(m+1)^2)$ contains a prime $p_n$ for each $m$. I wante to find a negation of it. I have two versions:   (1) There exists an $m$ such that either $p_n≤m^2$ for all $n$, or $p_n≥(m+1)^2$ for all $n$.  or  (2) There is an $m$ such that for all $n$, either $p_n≤m^2$ or $p_n≥(m+1)^2$.  I am not able to choose the right one.


SQL prepared statement returns no result (empty result)

Following prepared statement returns no result if I try like search('samsung').  public function search($searchFor) {         try{             //connect to db             $pdo = $this->_db->connect();             //set up SQL and bind parameters                         $sql = "select * from item where itemName like '%:searchfor%' or description like '%:searchfor%'";             $stmt = $pdo->prepare($sql);             $stmt->bindParam(':searchfor', $searchFor, PDO::PARAM_STR);             //execute SQL             $rows = $this->_db->executeSQL($stmt);             return $rows;         }         catch (PDOException $e)         {             throw $e;         }     }   $rows return an empty array. But if I try   select * from item where itemName like '%samsung%' or description like '%samsung%;   it returns a matched item and works as expected.  I found  $sql = "select * from item where itemName like :searchfor or description like :searchfor"; $stmt = $pdo->prepare($sql); $stmt->bindValue(":searchfor", "%$searchFor%");   works. I had to use bindValue instead. This was a totally different issue in that the SQL was correct but I used bindParam instead of bindValue (which is the correct method), hence this is not a duplicate.


Book series my dad told me about. It involves space travel, clones, and an indigenous people with kangaroo tails

My dad read a book series that he recommended to me last year. Now that I am ready to start it, neither of us can recall the title. He said there were several in the series but he can't recall how many.   The book is about traveling to a new planet, presumably with the goal of colonizing it. The crew are clones who have no memory. I think the goal was for the older original versions of the clones to transfer their consciousness into the clone bodies to be able to live on the new planet but something goes wrong.   There is an indigenous species on the planet who are humanoid but have kangaroo like tails.   The clone crew has markings on them that they don't understand until late. Apparently they are markings to indicate status or role on the new world. The person who they voted as there leader, it turns out, is marked as a servant or slave class.


How do I move the workspace switcher/selector in Activities overview to the left in GNOME?

Is there any way of moving the workspace overview in Activities to the left side of the screen? I've tried looking for extensions and going through the GNOME Tweak tool, but without success.    Having used other DEs in the past (Unity, Xfce, KDE), I am used to efficiently moving the pointer around the top left corner of the screen only, and find it quite annoying to have to move all the way to the middle right to select a workspace, after launching Activities using the hot corner on the top left.


How to show There is no continuous bijection between $[0,1]$ and $[0,1] \times [0,1]$ ?  My Try: I think, between $[0,1]$ and $[0,1] \times [0,1]$, continuous onto function exist. But the one to one continuous map does not exist. Is my guess correct?


what is quote? (quote aaa)and aaa are different form each other

(define (delete-list my-list element)   (if (null? my-list)       '()       (if (eqv? (car my-list) element)           (cdr my-list)           (append (list (car my-list))                   (delete-list (cdr my-list) element)))))  (delete-list '('aaa 'bbb) 'aaa) ; ==> ('aaa 'bbb)   Why doesn't this code output ('bbb)? How to solve this problem?


I am using a laptop with ATI Radeon 8650G. I am unable to install fglrx in Ubuntu 16.04. Can I install the fglrx found in package archives from 14.04?


What is deliberately using complex sentences to confuse people called?

I'm wondering if there's a word, phrase, or idiom to describe the action of deliberately confusing people by using complex sentences. For example, some politicians will throw out some big words and fancy sentences to confuse people what he or she really mean.  In Chinese, we say that the politician is "玩文字遊戲". Direct translation would be "playing a word game". And some English-Chinese dictionaries' suggest "play on word", "play with words", "word play", and "paronomasia". However, upon further researching by Googling, I don't think any of these is correct.


Wikipedia entry on likelihood seems ambiguous

I have a simple question regarding "conditional probability" and "Likelihood". (I have already surveyed this question  but to no avail.)  It starts from the Wikipedia . They say this:     The likelihood of a set of parameter values, $\theta$, given   outcomes $x$, is equal to the probability of those observed outcomes   given those parameter values, that is      $$\mathcal{L}(\theta \mid x) = P(x \mid \theta)$$   Great! So in English, I read this as: "The likelihood of parameters equaling theta, given data X = x, (the left-hand-side), is equal to the probability of the data X being equal to x, given that the parameters are equal to theta". (Bold is mine for emphasis).  However, no less than 3 lines later on the same page, the Wikipedia entry then goes on to say:     Let $X$ be a random variable with a discrete probability distribution   $p$ depending on a parameter $\theta$. Then the function      $$\mathcal{L}(\theta \mid x) = p_\theta (x) = P_\theta (X=x), \, $$      considered as a function of $\theta$, is called the likelihood   function (of $\theta$, given the outcome $x$ of the random variable   $X$). Sometimes the probability of the value $x$ of $X$ for the   parameter value $\theta$ is written as $P(X=x\mid\theta)$; often   written as $P(X=x;\theta)$ to emphasize that this differs from   $\mathcal{L}(\theta \mid x) $ which is not a conditional probability,   because $\theta$ is a parameter and not a random variable.   (Bold is mine for emphasis). So, in the first quote, we are literally told about a conditional probability of $P(x\mid\theta)$, but immediately afterwards, we are told that this is actually NOT a conditional probability, and should be in fact written as $P(X = x; \theta)$?   So, which one is is? Does the likelihood actually connote a conditional probability ala the first quote? Or does it connote a simple probability ala the second quote?  EDIT:  Based on all the helpful and insightful answers I have received thus far, I have summarized my question - and my understanding thus far as so:    In English, we say that: "The likelihood is a function of parameters, GIVEN the observed data." In math, we write it as: $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x)$. The likelihood is not a probability.  The likelihood is not a probability distribution.  The likelihood is not a probability mass. The likelihood is however, in English: "A product of probability distributions, (continuous case), or a product of probability masses, (discrete case), at where $\mathbf{X} = x$, and parameterized by $\mathbf{\Theta}= \theta$." In math, we then write it as such: $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = f(\mathbf{X}=x ; \mathbf{\Theta}= \theta) $ (continuous case, where $f$ is a PDF), and as $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = P(\mathbf{X}=x ; \mathbf{\Theta}= \theta) $ (discrete case, where $P$ is a probability mass). The takeaway here is that at no point here whatsoever is a conditional probability coming into play at all.  In Bayes theorem, we have: $P(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = \frac{P(\mathbf{X}=x \mid \mathbf{\Theta}= \theta) \ P(\mathbf{\Theta}= \theta)}{P(\mathbf{X}=x)}$. Colloquially, we are told that "$P(\mathbf{X}=x \mid  \mathbf{\Theta}= \theta)$ is a likelihood", however, this is not true, since $\mathbf{\Theta}$ might be an actual random variable. Therefore, what we can correctly say however, is that this term $P(\mathbf{X}=x \mid \mathbf{\Theta}= \theta)$ is simply "similar" to a likelihood. (?) [On this I am not sure.]   EDIT II:  Based on @amoebas answer, I have drawn his last comment. I think it's quite elucidating, and I think it clears up the main contention I was having. (Comments on the image).    EDIT III:   I extended @amoebas comments to the Bayesian case just now as well:


What is Chromatic Aberration? Is it a physical part of the lens, or just an optical illusion?


What mistakes, if any, were made in Numberphile's proof that $1+2+3+\cdots=-1/12$?

This is not a duplicate question because I am looking for an explanation directed to a general audience as to the mistakes (if any) in  (reproduced below). (Numberphile is a YouTube channel devoted to pop-math and this particular video has garnered over 3m views.)   By general audience, I mean the same sort of audience as the millions who watch Numberphile. (Which would mean, ideally, making little or no mention of things that a general audience will never have heard of - e.g. Riemann zeta functions, analytic continuations, Casimir forces; and avoiding tactics like appealing to the fact that physicists and other clever people use it in string theory, so therefore it must be correct.)  Numberphile's Proof.  The proof proceeds by evaluating each of the following:  $S_1 = 1 - 1 + 1 - 1 + 1 - 1 + \ldots$   $S_2 = 1 - 2 + 3 - 4 + \ldots $   $S = 1 + 2 + 3 + 4 + \ldots $   "Now the first one is really easy to evaluate ... You stop this at any point. If you stop it at an odd point, you're going to get the answer $1$. If you stop it at an even point, you get the answer $0$. Clearly, that's obvious, right? ... So what number are we going to attach to this infinite sum? Do we stop at an odd or an even point? We don't know, so we take the average of the two. So the answer's a half."   Next:  $S_2 \ \ = 1 - 2 + 3 - 4 + \cdots$  $S_2 \ \ = \ \ \ \ \ \ \ 1 - 2 + 3 - 4 + \cdots$  Adding the above two lines, we get:  $2S_2 = 1 - 1 + 1 - 1 + \cdots$  Therefore, $2S_2=S_1=\frac{1}{2}$ and so $S_2=\frac{1}{4}$.  Finally, take  \begin{align} S - S_2 & = 1 + 2 + 3 + 4 + \cdots           \\ & - (1 - 2 + 3 - 4 + \cdots)          \\ & =   0 + 4 + 0 + 8 + \cdots           \\ & = 4 + 8 + 12 + \cdots           \\ & = 4S \end{align}  Hence $-S_2=3S$ or $-\frac{1}{4}=3S$.  And so $S=-\frac{1}{12}$. $\blacksquare$


Does anyone know how I can get my Canon Pixma MX452 running on Ubuntu 13.04, either via USB or 802.11? I tried to install in 13.04 via USB, but it used a generic text-only driver which didn't work at all. No scanner functionality either.  Thanks in advance!


How do you override the required Create Fishnet parameters in ArcMap 10.1?

I'm writing a python script that creates a fishnet in a specified area (parcel shapefile) that accepts user input to create a polygon shapefile that represents a building, and polyline shapefile that represent parking area in the parcel.  In ArcMap, you're able to choose the optional parameter of "Template Extent" that automatically populates the Y-Axis, and Origin Coordinates that the tool requires.  I keep getting this error when running my script:  ExecuteError: Failed to execute. Parameters are not valid. ERROR 000735: Fishnet Origin Coordinate : Value is required ERROR 000735: Y-Axis Coordinate : Value is required Failed to execute (CreateFishnet).   In my CreateFIshnet syntax, using "#" in the origin_coord and y_axis coord results in an error instead of passing the request to the optional {template}.    Is there a way around this? I'd like the optional {template} parameter to take priority, but I'm wondering if I have to create points within the specified area and pass those coordinates to the fishnet parameters?


Why can't I copy files on a flashdrive between my Xbox 360 and my computer?

I copied a Borderlands save-game (from my Xbox 360) to my flash drive but when I plug it in to my computer, nothing shows up. The flash drive has nothing on it but that file. When I plug the flash drive to the Xbox 360 it works properly.  What's wrong?


How do I change the shortcut-key of show the unity dash?

I don't want to use the Super for that, I want to use Alt+Space instead.


Book where an undercover chess grandmaster is sent to an alien planet so that he can facilitate contact or avoid the forthcoming war

I last read the book in the early 90's, so it would have been written before then. The main plot is about an Earth person being sent on an undercover mission to an alien planet of extraordinarily handsome/beautiful people who resemble humans in every detail but one- the cartilage in their nose. These aliens are either trying to avoid contact with humans, or invade (I can't remember which), but their leader is not 100% decided. Their leader is appointed by being the best player on their world of a game very similar to chess. The human agent is a grand master of chess, and is sent there undercover, to play and win the title of leader, so that he can facilitate contact or avoid the forthcoming war.


g is a list of list, I use it as a 2d array. But when I assign values to g[i][j], it doesn't work.  Here is my code.   m=3 n=4  g=[[0]*n]*m for i in range(m):     for j in range(n):         g[i][j]=i         print(g[i][j])  print(g)   the output is  0 0 0 0 1 1 1 1 2 2 2 2 [[2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2]]


Free Particle Path Integral Matsubara Frequency

I am trying to calculate  $$Z = \int\limits_{\phi(\beta) = \phi(0) =0} D \phi\ e^{-\frac{1}{2} \int_0^{\beta} d\tau \dot{\phi}^2}$$  without transforming it to the , I can show that $Z = \sqrt{\frac{1}{2\pi \beta}}$. However, I have a problem in obtaining the same result in the Matsubara frequency space: \begin{equation} \phi (\tau) =  \frac{1}{\sqrt{\beta}} \left( \sum_{n} \phi_n \ e^{i\omega_n\tau} \right), \end{equation} with $\sum_n \phi_n =0, \omega_n = \frac{2\pi n}{\beta}$. And \begin{equation} Z = \int \prod_n D\phi_n\ \delta\left(\sum_n \phi_n\right)\ e^{-\frac{1}{2} \sum_n \phi_n \phi_{-n}  \omega_n^2  }  \end{equation} which, I think, vanishes.   I guess the problem lies in the measure. Any comments?  Info: I write the Schulman's derivation in imaginary time here. \begin{eqnarray} Z &=& \int\limits_{\phi(0) =\phi(\beta) = 0} D\phi(\tau) e^{-\frac{1}{2}\int_0^{\beta}d\tau\dot{\phi}^2}\\ &=& \text{lim}_{N \rightarrow \infty} (\frac{1}{2\pi \epsilon})^{(N+1)/2} \int d\phi_1 \dots d\phi_N e^{-\frac{1}{2\epsilon} \sum_{i =0}^N (\phi_{i+1} -\phi_i)^2} \end{eqnarray}  Then, we can use the identity \begin{equation} \int_{-\infty}^{\infty} du \sqrt{\frac{a}{\pi}} e^{-a(x-u)^2}\sqrt{\frac{b}{\pi}} e^{-b(u -y)^2} = \sqrt{\frac{ab}{\pi(a+b)}} e^{-\frac{ab}{a+b}(x-y)^2} \end{equation} to evaluate the sum to be \begin{equation} Z = \sqrt{\frac{1}{2\pi \beta}}. \end{equation}


According to Wolfram Alpha: $$\sum\limits_{k=1}^x\sin(k) = \frac{\sin(x)-\cot(\frac12)\cos(x)+\cot(\frac12)}2$$ I know I should show some attempt at proving this problem, however I have no idea where to start at all. The only idea I have is setting $S(x) = \sin(1) + \sin(2) + \sin(3) + {...} + \sin(x)$ and then manipulating it somehow to solve for $S(x)$.


How can I initialize a structure if one field in the structure is itself a structure?


how to make a jquery "$.post" request synchronous

I’ve been googling this and avoiding this error in my bug fix list for a long time now, but I’ve finally reached the end of the list, the last of which I have to make a function return true/false to state whether the validation has succeeded or not.   I'm using ajax to compare certain fields with those that are already in the db and by default the $.post() method does it's operations asynchronously.  I’m setting a variable inside the call onSuccess and the calling method doesn't get a response because of this, so all my js/jquery fails on pageLoad... I would prefer if I could still keep using the $.post method.


Getting back into windows 10 normal boot (as opposed to safe boot) without being able to login

To troubleshoot a problem I used msconfig to set that windows 10 should boot without loading most of the services (safe boot). I rebooted the PC and then noticed that I could not login with the PIN in safe mode. Its my father's laptop and he doesn't remember the original password of his account.  Because I can not login I can not tell windows to start booting in normal mode again. Is there any way to let windows boot in normal mode without requiring me to login?  What I did so far:   Created a windows 10 installation usb drive Booted from the usb drive and followed a trick I found online to rename c:\windows\system32\cmd.exe to c:\windows\system32\utilman.exe (after backing up utilman.exe). This allows me to access a command prompt when logging in from the harddisk again by clicking the accessiblity icon on the login screen. I then created a new administrator account using:   net user myusername /add  and   net localgroup administrators myusername /add  I then rebooted and tried to login using that user, but I get an error when logging in saying: "The service User Profile Service prevents logging in. User profile cannot be loaded" (I translated that from dutch).  Does anyone have a solution? Maybe a file I can edit from the command prompt to tell windows to boot normally again?


Null Object Reference with SharedPreferences

I have been banging my head on the keyboard for hours. I want to store an incremented integer for a separate stats activity in my app. I am trying to use Shared Preferences to achieve this. However in my latest attempt, which is the furthest I have gotten, the program throws an exception.  My code:  public class LootChest extends AppCompatActivity {     public static final String prefName = "prefsFile";     SharedPreferences settings = getApplicationContext().getSharedPreferences(prefName, 0); //line 25     int rollCountS = settings.getInt("Roll Count", 0);     int rollCount = 0; //to be incremented      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_loot_chest);     }      public void openChest(View v) {         SharedPreferences.Editor editor = settings.edit();         editor.putInt("Roll Count", rollCount);         rollCount = rollCountS + 1;   The exception:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context .getSharedPreferences(java.lang.String, int)' on a null object reference at android.content.ContextWrapper .getSharedPreferences(ContextWrapper.java:171) at net.zingrook.mobiloot.LootChest.<init>(LootChest.java:25)   I've read dozens of threads on implementing this, and looked at the Android documentation and I am out of ideas. Thank you for any help.


I'm having problems converting this from Oracle to PostgreSQL. I've tried using STRING_AGG, but i'm not having any success. I believe there's also an issue with REGEXP_REPLACE. Can someone help?  REGEXP_REPLACE(     LISTAGG(column_name, ',') WITHIN GROUP (ORDER BY column_name),      '([^,]+)(,\1)*(,|$)',      '\1\3' )


Here is what i am trying to do:  i created a classmethod that returns either an object of dict if not params are added to this method or an object made of list of dicts if any params are added, as code below:   @classmethod def make_attr(cls, **kwargs):     """     code: do something, generate either a tuple      """      if :         data = {}         """         add k, v in data         """         return cls(**data)     else:         data = []         for k, v in kwargs.items():             _d = {}             _d[k] = v             data.append(_d)         return cls(*data)    Code as above, and the problem i met is if the classmethod returns object of dict, i can use object.attr to get its value, but if the classmethod returns objects of list, i find no way to unpack it or get its attribute or value, such as:   >> result = Class.make_attr(login_name="test") >> print("age: ", result.age) >> age: 25  >> result = Class.make_attr() >> print(result) >> <model._class.Class object at 0x104020358>  >> for i in result: >>     print(i) >> TypeError: 'Class' object is not iterable   So, how can i make this object iterable?


What is the difference between i++ and ++i?

I've seen them both being used in numerous pieces of C# code, and I'd like to know when to use i++ or ++i (i being a number variable like int, float, double, etc). Anyone who knows this?


I am very very new to all of this.   I get it that sudo is some kind of authorisation. When it asks for the password, I can't type anything.   EDIT: OMG GUYS THANKS. I just realized that I might have a solution for my wireless network now!! Well since I had no idea what Sudo was and when I tried to boot up 12.10 I couldn't since I thought I couldn't access to it! YES, I'm gonna try this out!


Proof of $\sin(x) > \frac{2}{\pi} \cdot x $

I want to prove that $\left(\forall x \in \left( 0; \frac{\pi}{2} \right)\right) \left[ \sin(x) > \frac{2}{\pi} \cdot x \right]$. This is quite easy to see when drawing the functions, but I wonder if my proof here is correct:  From $(\sin(x))' = \cos(x)$ and $\left( \frac{2}{\pi} \cdot x\right)' = \frac{2}{\pi}$ and $\cos(0) >  \frac{2}{\pi}$ follows that $\sin(x)$ grows quicker than $\frac{2}{\pi}$ for $x > 0$ and thus is larger right from the beginning.  Furthermore, let's assume there is an $x \in \left( 0; \frac{\pi}{2}\right)$ with $\sin(x) < \frac{2}{\pi} \cdot x$. As we proved that $\sin(0)' > \frac{2}{\pi}$, there needs to exist an $x \in \left( 0; \frac{\pi}{2}\right)$ with $\sin(x)'' = 0$.  $\sin(x)'' = (\cos(x))' = -\sin(x)$  $-\sin(x) = 0  \iff \arcsin(0) = x \iff x = 0$  As $0 \notin \left( 0; \frac{\pi}{2}\right)$, $\left(\forall x \in \left( 0; \frac{\pi}{2} \right)\right) \left[ \sin(x) > \frac{2}{\pi} \cdot x \right]$.  Basically I've found geometrically that the second derivative had to be zero if the sin were larger in the beginning but smaller in the beginning. Is there a theorem for that?  Is there a way to make the proof easier?  Thanks!


Is it possible to have an object ignore a certain light source but still be affected by others?

I want to create an effect on a character where their skin and clothing are effected by two different light sources. The clothing should only reflect a bright bounce light, but have the skin should not be affected by this light source.    In the example image I have two objects a cube, a sphere and three emission  lights . I want the two white lights to hit both objects, and I need the purple light to hit and reflect off of the sphere, but ignore the cube entirely (no reflections).  Someone suggested to composite the layers together, it works... but this is very impractical and cumbersome because it forces the background to be transparent and it will be a pain to try and layer together a more complex scene, especially if its animated which is what I want this effect for.  I know you can have objects ignore shadows and all kinds of other things so im hoping someone knows how to get an object to ignore light with a few settings.


Cannot Upgrade to Ubuntu 14.04 from 12.10

Currently, I am using Ubuntu 12.10. When I open Software Updates, I find new release Ubuntu 13.04 rather than Ubuntu 14.04.  Please Help!


Let $\{f_k\}_{k=1}^\infty\in L^{loc}_1(\mathbb R^n)$, show $\{f_k^2\}_{k=1}^\infty$ does not converge in $\mathscr{D}^\prime(\mathbb R^n)$

Let $\{f_k\}_{k=1}^\infty\in L^{loc}_1(\mathbb R^n)$ be a sequence of real value functions such that  $\mbox{supp}(f_k)\subseteq\{|x|\leq k^{-1}\}$, $\quad \int f_k(x)dx=1$ $\quad for\quad all \quad k=1,2........$  show that the sequence $\{f_k^2\}_{k=1}^\infty$ does not converge in $\mathscr{D}^\prime(\mathbb R^n)$ $as \quad k\rightarrow \infty$


What are common techniques to grade/mark assignments efficiently? Is it better to focus on one question and go through the pile or do them assignment after assignment? Or are there other techniques and tips people have?


How to delete all files with filenames containing spaces on Linux?

cannot delete my own question, overwrite instead


Highlight/Link Author and Year in Citation

I'm currently modifying the Masters/Doctoral Thesis template found . However, it only highlights the year in a citation like (Smith 2016). I would like both "Smith" and "2016" to be part of the link. I have added a MWE below. It includes the main tex file, the cls file and the bib file. What should be changed?  main.tex  \documentclass[11pt]{MastersDoctoralThesis} \usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} \addbibresource{adam.bib}  \begin{document}  This is in \cite{smith2016}.  \end{document}     MastersDoctoralThesis.cls  \NeedsTeXFormat{LaTeX2e}[1996/12/01] \newcommand{\classname}{MastersDoctoralThesis} \ProvidesClass{\classname}[2015/11/08 v1.2 LaTeXTemplates.com] \providecommand{\baseclass}{book}  \RequirePackage{etoolbox} \RequirePackage{xparse} \LoadClass{\baseclass}  \RequirePackage{hyperref} \hypersetup{     bookmarksopen=true,     bookmarksopenlevel=0,     hypertexnames=false,     colorlinks=true,      citecolor=blue,      linkcolor=blue,      urlcolor=blue,      pdfstartview={FitV},     unicode,     breaklinks=true, } \endinput   adam.bib  @article{smith2016,     author={John Smith},     year={2016} }   PDF Output


Why is particle superposition still part of quantum mechanics?

After reading an article on Schrodinger's Cat, it seems that if we take the environment as an observer, that superposition cannot occur because all atomic and subatomic entities would be observed all the time. Thus, something like quantum entanglement cannot occur. So if superposition cannot occur, why is superposition (and by extension quantum entanglement) still part of quantum mechanics?  Updated: In the question , the notion of observer is replaced by measurement. In this context, my question would be: if the system (cat) is constantly being measured by the environment (the observer is watching the cat), how can superposition (the cat is in multiple states; i.e., alive and dead) exist in quantum mechanics?  For example, if a photon passes by a heavy particle and splits into an electron and positron, the splitting process is a measurement of the electron and positron to make sure the total spin is 0. I understand the argument that we might not know which has +1/2 and which has -1/2, but the observation/measurement had to be done to make sure we didn't have 3/4 total spin.


How do I target players with only a certain X, Y, or Z coordinate?

I am trying to test for any player that is on Y level 118.  Here is the command I am using:  /testfor @a[y=118]   The problem is, the command isn't working as expected. In my chat when I type this command, it reads:  Found Boomcrasc078    The problem is, I am not on y=118 when I run this command. What could be the problem?  I have also tested with a space:  /testfor @a [y=118]   but it still doesn't work.


How I can get Digital Height Model (only object heights, DSM - DTM = DHM)?  Many applications can do this, but they convert it to GRID or TIN format. I was wondering if it was possible to keep the data as point clouds.


I know that $$P\left(\bigcup_{i=1}^{n} A_i \right)$$   is the sum of of the probabilities of all the sample points that are contained in at least one of the $A_{i}$'s. This is the probability of sample points belonging to exactly 1 event, exactly 2 events, ...,exactly $n$ events. WLOG this can be written as $$P\left(\bigcup_{i=1}^{n} A_i \right) = P(A_1) + P(A_1 \cap A_2) + \cdots + P(A_1 \cap A_2 \cap \cdots \cap A_n)$$   But the $A_i$'s are arbitrary and we have to account for that. So there are $n$ possibilities for the first probability, $\binom{n}{2}$ possibilities for the second probability, ..., and $1$ possibility for the final probability. So we add and subtract these to prevent overcounting?


So im working on induction proofs but im having a bit of trouble with them. If you guys could help me that would be greatly appreciated, they're just sort of confusing to me.  Use induction to prove the following theorem: Theorem: For each integer $n$, $n^3-n\equiv 0\pmod{6}$


When I was in high school, I had proved that $$\sin^2(x)-\sin^2(y)=\sin(x-y)\sin(x+y) $$  I think it is beautiful since it resembles the identity $a^2-b^2=(a+b)(a-b)$.  But I can not find it in sources,I think it should be known.(of course,it is not something remarkable just beatuful)  If anyone finds it in somewhere,I would be thankful also.  Here is the proof:  $$\sin(x+y)\sin(x-y)=(\sin(x)\cos(y)+\cos(x)\sin(y))(\sin(x)\cos(y)-\cos(x)\sin(y))$$ $$=\sin^2(x)\cos^2(y)-\cos^2(x)\sin^2(y)$$ $$=\sin^2(x)\cos^2(y)-\sin^2(y)(1-\sin^2(x))$$ $$=\sin^2(x)\cos^2(y)-\sin^2(y)+\sin^2(x)sin^2(y)$$ $$=\sin^2(x)(\cos^2(y)+\sin^2(y))-\cos^2(y)) $$ $$=\sin^2(x)-\sin^2(y)$$ If it is already known, it will not be surprise for me. I hope you would like this.


Calculate the limit $$\lim_{n\to \infty} {\sum_{k=1}^{n} {\left(\frac{nk-1}{n^3}\right) \sin\frac{k}{n}}}$$   How exactly do we calculate this limit of the Riemann sum? I am never able to find what is the partition. I know that our $f(x)$ is $\sin(x)$.


Finding remainder when $5^{99}$ is divided by $13$

I have to find the remainder when $5^{99}$ is divided by $13$ without using modular arithmetic. I have to use Binomial Theorem only. Here's my attempt.    My Attempt $$\begin{aligned}5^{99}=125^{33}&=(117+8)^{33}\\ &=\sum_{k=0}^{33}{33\choose k} (117)^{33-k}(8)^{k}\end{aligned}$$  So the answer will be same remainder as obtained when $8^{33}$ is divided by $13$ which would be the same when $5^{11}$ is divided by $13$ which we get by writing $8^{33}$ as $(507+5)^{11}$.     I am not sure on how to proceed from here. Any hints would be appreciated. Thanks


sudo unable to resolve host error message

I changed my hostname in:  /etc/hostname   And then also changed it with:  sudo hostname MATRIX   But I experienced a problem because (and I don't know if this is related or not) none of my applications would launch, not even Terminal, the processes would launch, but just stay in the Sleeping status. So I restarted the machine and all seemed well until I ran something with sudo and I got this error message:  sudo: unable to resolve host MATRIX   Why is this the case and how can I fix it so that sudo can resolve it?    OS Information:  Description:    Ubuntu 15.04 Release:    15.04   Package Information:  sudo:   Installed: 1.8.9p5-1ubuntu5   Candidate: 1.8.9p5-1ubuntu5   Version table:  *** 1.8.9p5-1ubuntu5 0         500 http://gb.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages         100 /var/lib/dpkg/status


How does Twilight Sanctuary interact with other light sources?

The Twilight domain has a channel divinity called Twilight Sanctuary. Among other benefits, it also has the following wording:  The sphere is centered on you, has a 30-foot radius, and is filled with dim light.  Can this actually darken the area if its already in bright light? The wording "Is filled with dim light" is significantly different than most light sources which specify something along the lines of "shed light in 20 feet." And thematically it makes sense that the twilight cleric would make an area of twilight. But I don't know if the wording is strong enough to imply that it resists attempts to otherwise illuminate the area. (such as from the sun).


Is there anything in Ubuntu to change the System Time in a Dual Boot PC

I have a Dual Boot PC with Windows 10 Pro 64 Bit originally and recently added Ubuntu 20.04.2 LTS.  When I am in Windows 10 and Power Off the System Time Holds correctly if I Power on and go back into either Windows or Ubuntu.  When I Power Off from Ubuntu and go back into Ubuntu the System Time Holds correctly.  If I power down from Ubuntu and go into Windows the System Time is ahead by exactly 7 hours.  I am in Phoenix Time Zone which is GMT -7, so it appears to me that it powers on after powering off in Ubuntu and reverts to GMT which would be exactly 7 hours ahead.  I know how to reset the System Date and Time in Control Panel, but would like a permanent fix, if anybody knows how to fix it.


I'm getting command not properly ended for the following script, can anyone tell me what I'm missing? Thanks  SELECT E_name, E_DOB FROM Empl ORDER BY E_DOB DESC LIMIT 3;


Is having five letters of recommendation for STEM PhD programs (math, specifically) ok?

I know the minimum number of reference letters required at many U.S. PhD programs in the STEM fields is three -- and that it is also not uncommon for someone to submit a fourth letter.  What about a fifth letter?  Would a fifth letter of recommendation be perceived as "too many"?


Promote a Windows 8.1 desktop app to be a Modern app?

Trying to get used to the whole windows 8 thing and don't appreciate the bipolarness, like a lot of people do.  I've seen a lot of people try to fix this by making Modern apps windowed (using ModernMix or something), but how about doing the opposite -- making desktop apps modern apps?  Being able to close them and switch them with the same touch gestures.  That's the main thing.  So someone asked this for Windows 8   It's been asked several times actually  Not sure if it's yet possible for Windows 8.1


How to put one symbol (number) above another

I'd like to put one symbol over another? There are some similar things in math, like $\binom{a}{b}$, but I don't want the parentheses, or $\frac{a}{b}$ without the division line.  The closest I've found is $\overset{a}{b}$ (from mathtools) but the a ends up smaller than the b.


How to change columns that show up in global search Napili Community

I want to be modify the columns that show up in these tables when a search is made in a Napili Community.   Anyone know how?


Elementary Diophantine Equation in 5 variables

A student of mine has asked me to solve the following Diophantine equation, but it has been a long time since I looked at these problems. Here is the problem:  Problem: Find the natural number solutions of the equation $$a+b+c+d+e = 2020.$$  Any help is appreciated.


How to identify if textbox have more than one comma?

I think my question is simple. I just need a little character check when I click in one button. If such textbox have more than one comma, I want a message: "Error. Please insert just one comma in the box." I was searching but have not found anything like this. Can someone help me? Thanks all in advance!


Crossing Schengen borders six times during a vacation with different intentions. How to proceed with visas?

Citizen of Russian Federation, permanent resident of the USA needs to travel through Schengen 3 times in a short time span (3 weeks), each time with a different purpose. is traveling on the following itinerary.    USA -> Denmark -> Finland (flight) immediate transfer to a train to Russia. Purpose: Transit. Total presence in Schengen 1 long day. Departing to Schengen for a self guided tour of Europe: Russia -> Finland -> Stockholm -> Copenhagen -> Somewhere north Germany -> Belgium -> France -> Germany, then Germany - Poland - Belarus - Russia by train. Total duration about 8 days. Out of those 8, about 3 days are in France, 3 days are in Germany. You can assume main destination is Germany. Then: Russia -> Finland (train); Finland -> Denmark -> USA (air). Purpose: Transit. Total time in Schengen zone 2 days.   Questions:   Can the said individual obtain single multi-entry visa from a single  country for the entire itinerary? Is it advisable to do so, or is it advisable to obtain separate visa for 1 and 3 and another one for 2. If it is possible, what country should he apply to? The choices seem to be limited to Denmark (first entry) or by the time spent: Finland (3 incomplete days - in transit), Germany (about 3 days, main destination)?   The question is different from another question linked in the following respect: It is asking about the possibility doing two close-spaced journeys with different purpose on the same multi-entry visa from the same country.


GRUB remains on drive after formatting , cant boot from cd/usb

I am trying to install Windows 7 on an old system, which had Ubuntu 12.10 on it. I accessed the drive with a cradle and deleted the partitions off of it, then formatted it to NTFS (For Windows). Popped it back in the system and tried to boot from CD to install Windows 7 and I get:  error: unknown filesystem grub rescue >    How did GRUB even survive the formatting and how can I get rid of it for good so I can do a fresh install of Win 7?


I am confused about virtual destructor. I know if we create instance of derived class using a base class pointer like the following  Base *p = new Derived;   But if we delete this now  delete p;   Why would it not delete the object properly? What is p pointing towards ? I know that making the base class destructor virtual would kill the object properly but how does this thing conceptually work ? It has something to do with heap ? As a result of the statement   Base *p = new Derived;   What is being stored in the stack and what's on the heap ? And by simply deleting (with non virtual base destructor) why it's not calling the derived destructor. I'm just confused conceptually.


MySql shell command not replicated to slave

I have a shell script that looks something like that:    #!/bin/bash  mysql -udb_user -pdb_password -e "LOAD DATA LOCAL INFILE '/srv/some_file.csv'  INTO TABLE db_name.db_table FIELDS TERMINATED BY ','  LINES TERMINATED BY '\n'   (\`col1\`,\`col2\`,\`col3\`);"   the problem is that when I run this script on my master server the call doesnt get replicated to the slave server (even though /srv/some_file.csv exists on both servers).  any ideas how to make shell command replicate over servers?


How does stackoverflow check the attention of reviewer?

I was just reviewing on Late answer post over stackoverflow, and after moment when I cleared my review, it says following :   I was amazed by seeing this message... :) indeed I was paying attention, but my question is what tech or algorithm it follows to check whether reviewers really paying his attention or not ? (My guess is detecting time spending on the question with scroll and mouse moment, but not sure..)


In Inglourious Basterds First Lieutenant Aldo Raine (Brad Pitt) had a scar that made it look as though someone had tried to cut his throat.  Is there any reason mentioned for that scar (in the movie that I missed, or in interviews with Tarantino etc.)?  I kept expecting someone to ask about it, and get some background story.    Scar across throat    Scar continuing up behind left ear


How to prove there's an upper bound on a series

There's a series as following. $$ \sqrt{3}, \sqrt{3 + \sqrt{3}}, \sqrt{3 + \sqrt{3 + \sqrt{3}}} + \cdots $$ Is there any way I can find the upper bound to prove the limit exist? I've tried to write down the formula of this series as following: $$ x_n = \sqrt{3 + x_{n - 1}} $$ but still find no way to modify it to get to the upper bound.


I have two integers $K$ and $N$ with $K < N$.   If $K$ is not coprime to $N$, then $N - K$ is not coprime to $N$.   This is easy to show: $K = lm$ and $N = ln$, where $l$ is the shared factor between $K$ and $N$ and $m,n$ are integers. Then $N - K = ln - lm = l(n-m)$.   If $K$ is coprime to $N$, is it true that $N-K$ is coprime to $N$? Intuition says yes, but I am not sure how to prove it.


Concept of void pointer in C programming

Is it possible to dereference a void pointer without type-casting in the C programming language?  Also, is there any way of generalizing a function which can receive a pointer and store it in a void pointer and by using that void pointer, can we make a generalized function?  for e.g.:  void abc(void *a, int b) {    if(b==1)       printf("%d",*(int*)a);     // If integer pointer is received    else if(b==2)       printf("%c",*(char*)a);     // If character pointer is received    else if(b==3)       printf("%f",*(float*)a);     // If float pointer is received }   I want to make this function generic without using if-else statements - is this possible?   Also if there are good internet articles which explain the concept of a void pointer, then it would be beneficial if you could provide the URLs.  Also, is pointer arithmetic with void pointers possible?


When and why did Harry Potter fall in love with Ginny Weasley?

In the earlier HP books it's pretty clear that Harry and Ginny get on quite well as friends (and that she's rather smitten with him) but I'm struggling to identify when and why Harry started to like Ginny in a romantic fashion..  I feel like it is simply presumed that Harry suddenly likes Ginny Weasley back, but do the books actually describe when and why he started to like her that way?  No speculation, please. Canon answers only.


Is there a way to move a keyframe using Python (change the frame at which the keyframe is set)?  The keyframe already exists. I need to access it and move it, with the script.


Estimating process standard deviation for a quality control chart. What is $s/(c4)$ and how to calculate it in R?

I recently came across quality control charts in my studies and found out that the estimator   $$\hat \sigma =\frac{s}{c_4}$$  is preferred for UCL and LCL calculations in an x-bar chart as it is  ($s$ is the sample standard deviation). I am not used to all these new estimators although I already took 2 basic statistics courses and I am familiar with typical confidence intervals and basics estimators.  Now, say that I would like to build a simple x-bar chart and s-chart with both $\mu$ and $\sigma$ unknown for a list of 50 samples each of consisting of 5 observations.  According to what I understood from my study materials I would write something like this in R  s <- apply(sd,samples) # Calculate sd for each sample s_bar <- mean(s)       # Center line for the s-chart UCL_s <- s_bar + 3*s_bar/c4 * sqrt(1-c4^2) LCL_s <- s_bar - 3*s_bar/c4 * sqrt(1-c4^2)   and for the x-bar chart  x <- apply(mean,samples) # Calculate mean for each sample x_bar <- mean(s)         # Center line for the x-chart UCL_x <- s_bar + 3*s_bar/(c4 * sqrt(n)) LCL_x <- s_bar - 3*s_bar/(c4 * sqrt(n))       Now my questions:   Is the estimation process of $\sigma$ and its intervals correct and unbiased? How would I calculate the $c_4$ term? I could look it up on the tables but is there a more fast way to find it? Is there an R function that provides such coefficient? Say that the standard deviation is now given and equal to $\sigma$. The UCL and LCL should now be the following  UCL_s <- c4 * sigma + 3 * sigma * sqrt(1-c4^2)  LCL_s <- c4 * sigma + 3 * sigma * sqrt(1-c4^2)   Why do I need to multiply the known $\sigma$ for the coefficient $c_4$?


Prove $f(x) = 0 $for all $x \in [0, \infty)$ when $|f'(x)| \leq |f(x)|$

mathematicians! I want to ask to all wise people about a problem I met at the quiz to obtain some ideas. The problem is following. It may not be accurate since the problem is dependent on my memory   Let $f : [0, \infty) \rightarrow \mathbb{R}$ and $f$ is differentiable. $|f'(x) |\; \leq\  |f(x)|$ for all $x \in [0, \infty)$. $f(0) = 0$. Then prove that $f(x) = 0$ for all $x \in [0,\infty)$.  At the quiz, I applied the Mean Value Theorem and the Cauchy-Schwarz inequality.   For any $x$, $|f(x)| = |\{f(x) - f(0)\}(x-0)| = |f'(c_{1})(x)|$ for some $c_{1} \in (0,x)$, and then  $$|f'(c_{1})(x)| \leq |f'(c_{1})||x| \leq |f(c_{1})||x|$$ by Cauchy-Schwarz and given assumption. By doing so consecutively, we can obtain the inequality that  $$ |f(x)| \leq |f(c_{n})||x||c_{1}|\ldots |c_{n-1}| $$ for any $x \in [0,\infty)$. As $\{c_{i}\}, \; i\in \mathbb{N}$ is decreasing sequence and $f$ is continuous, $|f(c_{n})|$ can be arbitrary close to $0$ when $c_{n} \rightarrow 0$. Thus the inequality above can be bounded by $\epsilon$.  I think my answer is right, but a bit uncertain. Could you give me a certainty? Thank you very much.


Please I need the proof that the function $x \rightarrow |x|^p$ is strictly convex. I think $p \gt 1$. I literally searched on internet but with no result.


Is it acceptable to transform data for use in a GLM using Poisson?

I have transformed my explanatory variables to a normal distribution as these variables include, proportions (logit transformed) and non normally distributed data (various transformations).  The dependent variable is a count, hence I am using "family = poisson".  I have read in some sources that it is uneccessary to transform the explanatory data but I don't understand the reasoning behind this.     Was transforming this data incorrect?


Can root/superuser read my read-protected files?

On shared unix hosting, if I have a file sensitive-data.txt and I issue:  chmod 600 sensitive-data.txt  Can root user still read my file?  Specifically I'm wondering if it's safe to store my password in mercurial hgrc file.  UPDATE  Decided to use the mecurial keyring extension as it was super easy to setup:  pip install mercurial_keyring   and then add to hgrc:  [extensions] mercurial_keyring =   However I'm still interested in the answer to this question.


What are the device limitations for installing Linux-based Android alternatives?

I have a new Samsung Galaxy A40 and would like to use a Linux-based alternative to Android. Reasons: Privacy/security, hackability, moving away from Google.  1.) Can I install an alternative OS even though my device is not explicitly supported? If not, what are the limiting factors? Does each device require a specific set of drivers (e.g. graphics, audio, peripherals)?  2.) Are there any good OS options? Is anyone using Ubuntu Touch? The OS should be safe, stable and user-friendly. Also, using standard device functions and installing/sideloading APKs of standard apps (e.g. WhatsApp/Telegram/KakaoTalk) should be straightforward with no extensive workarounds required.  PS.: I have no experience as a mobile developer.    I'm linking a  from Unix SE and trying to restate the question. According to this table    attempting to install an alternative OS causes even most basic hardware functionalities (touch, battery, calls) to stop working. This is unsettling, as installing Linux on my Windows machine does not disable my display, keyboard, network card etc. Why am I getting "locked out" of my own device? What exactly is the problem, are components and device manufacturers keeping their drivers under wraps? What makes "porting" so difficult and necessary in the first place?


What is the benefit of making sub theme in drupal?

I have created a sub-theme of a theme in Drupal 7. I have done all changes to create this and it is working fine. But I am confused what actually it is for, what are the benefits of making this?  I know the differences between base theme and sub-theme but I need more information why we create sub-theme.


Do magazines need to be in your inventory to get their respective bonuses?

As you collect magazines/books/comics in the wastelands, they apparently give you perks for finding them.  Do the books need to remain in my inventory, or can I display them on a shelf in my settlements without penalty?


Processing time/speed for Mosaic to New Raster

I have a question on speeding up “Mosaic to New Raster” or finding an alternative.  After completing a suitability analysis we are trying to define movement corridors.  We used a modified CircuitScape that left 4 folders, each containing 1080 raster tiles across our study area.  We now need combine all 1080 rasters in each folder then combine these 4 combined rasters into a final raster which will be analyzed for paths.  I tried a python script that just wouldn’t work so I went on to Model Builder.  It iterates through the grids in the folder, collects the values (raster names), then mosaics all to a new raster.  It has been running for 5 days now and the results window indicates it is working.  I’m hoping it will conclude in the next day or 2.  But, we still have 3 more folders, each with 1080 rasters, that need to be mosaicked.  So….is there a way to speed up Mosaic to New Raster or is there an alternative I could use to produce the final grid?    The cell size is 270 meters, 540 x 540 columns and rows, 1 band, 32 bit floating.


"Invalid Session (Try restarting your game)" Minecraft online-server error

I use the standard launcher, there is NO second session open. I have to close the game TWICE and relaunch to MAYBE get into a server (standard, vanilla servers), but if I leave the server with the game open, and immediately go back into it, it gives that error as well. Without me having closed the app.  This only began happening since the 1.8.1 update, and every time I open the launcher, I have to sign in again for some reason. I can only sign in with my email, because my username (I changed it a few days ago) is considered "invalid" if I attempt to log in with it. Although, when I log in with my email, my new username is the one that ends up being used when I play.  What's going on? I checked Task Manager (I use Windows), and there are no other Minecraft or Java's open. I'm tired of having to relaunch repeatedly, AND logging in constantly for no reason. I have uninstalled and re-installed Minecraft twice since this began happening.


Intuition for why equations of the form $k^x=x^c$ are not solvable trivially?

It recently occurred to me that I did not know how to solve equations of the form $k^x=x^c$ for any two constants $k$ and $c$. After much pain in algebraically manipulating the equation (using logarithms) I confirmed the x is trapped in an exponent and cannot be extracted without some external knowledge.  Finding the roots of the derivative creates a similar problem.   I then did some research and discovered Lambert's W function, which I haven't the mathematical maturity to understand deeply. ().   I'm looking for some rigorous intuition towards why without numerical methods or Lambert's W function the equation is not solvable for x, or more specifically, a proof as to why this class of function is unsolvable using only logs and rationals? The best answer I have for myself is that because x is both a power and an exponent, either extracting x with a log or removing the exponent with a rational will keep the other side of the equation unsimplified. What is the mathematical language with which to express this idea?  As an aside, I'm also wondering what area of mathematics considers issues such as these (this one being on the simpler side).


I'm trying to make a full map of Staten island.  The first picture shows all the vector layers I am using with out a problem.  Once I turn on Open Street Maps layer, QGIS takes a while to render as I zoom in and out and then most of the time just crashes (as seen in picture 2).  How can I fix this so I can easily zoom in and out without the QGIS taking forever to render it and then crash? I've tried fresh installing the updated QGIS but that didn't work.


A very biological story about a cynical scientist who gets the Nobel Peace Prize

I read this story about 10 years ago or so, but it was in a collection of SF stories that could have been much older. It was a rather longish novelette, or shortish novella, certainly not a novel and too long to be technically a “short-story”.   There have been several deadly epidemics of new viruses that appeared out of the blue one after the other; and  teams of researchers find cures, or vaccines, for one after the other, but not before each of them has killed many people. One very brilliant, but very cynical researcher of one of those teams works mostly for his own career, his own glory, not out of kindness for suffering people.   At some point in the book he gets a Nobel Peace Prize, not the Nobel Prize in Physiology or Medicine, which he finds paradoxical, considering his cynicism. I am not sure if the Nobel Prize comes before or after what I am describing below.   But probably it happens before, because he becomes a big shot, in charge of a huge program of research on viruses. He decides to investigate all existing viruses, breaking the task between many teams of course, but keeping for his own team blood-transmitted viruses.   He has noticed that after all these different waves of deadly epidemics, more and more people became blood donors, and in general became more and more generous. And he discovers that this generosity is in fact the effect of a virus, essentially harmless but that “found out” (through darwinism - there is no notion of actual “thinking” nor “will” attributed to a virus, just survival of the fittest) that by promoting “altruism” by affecting the brain of the infected people, it can propagate very fast through blood donation followed by transfusion and in this way infect most of mankind.


Display View counts of Questions in Mobile version

I often use Stack Exchange sites from my smartphone. It works great, but I always have to switch to full version to see view counts of a question. Can you please add it? There's plenty of space on question page for it to place. I request community to suggest a location.


How can continue the equation of the rectangle red in next line?   \documentclass[11pt,a4paper,twocolumn]{article}  ...  \begin{equation*}     \left| \dot{r} \right| =     \sqrt{{- \, {e}^{-t} \left( \cos t + \sin t \right)}^{2} \, + \, {{e}^{-t} \left( \cos t + \sin t \right)}^{2} \, + \, {(- \, {e}^{-t})}^{2}} \end{equation*}


Why can't I use toaster oven instead of real oven?

My toaster oven has a temperature gauge just like my oven 200-450 degrees. I opened a package of fish sticks and the instructions said "Do not cook in microwave or toaster oven." It only had instructions for cooking them in a regular oven. Do you have any idea why a toaster oven that can be put at the same temperature would not be good to use?


In Landau-Lifschitz, following expansion is given,  We have, $$L(v'^2)~=~L(v^2+2\textbf{v}\cdot\epsilon+\epsilon ^2)$$ expanding this in powers of $\epsilon$ and neglecting powers of higher order, $$L(v'^2)~\approx~L(v^2)+\frac{\partial L}{\partial (v^2)}2\textbf{v}\cdot\epsilon$$  $L$ is Lagrangian. and $\textbf{v}'=\textbf{v}+\epsilon$. I am unable to follow what expansion this exactly is. It does not look like Taylor expansion.


Why does "ps aux | grep x" give better results than "pgrep x"?

I've just tried the following command on my Ubuntu, it doesn't show a thing:  pgrep php5  shouldn't it return the process id of php5(which the following command just does)?:  ps aux | grep php5  So, what's the difference between these two commands?


Opening up the terminal on a Mac always starts a PHP process

I am on a Mac running Yosemite 10.10.4 and every time I start terminal or open a new terminal tab I am inside of an actively running php process.  I must Ctrl+C before I can do anything else.  I don’t see any Mac terminal options that is automatically starting this process.  I have Homebrew installed and I’m using a LEMP stack, so I’m not sure if there is some misconfiguration there? I’ve searched everywhere, tried running brew doctor and brew update, but everything is ready to brew and up to date.     Here is my terminal output when starting a new session:   Last login: Thu Aug 20 13:31:52 on ttys000  ^C  MacBook-Pro:~ adam2k$   And my php version:   MacBook-Pro:~ adam2k$ php -v  PHP 5.6.6 (cli) (built: Mar  5 2015 19:48:00) (DEBUG)  Copyright (c) 1997-2015 The PHP Group  Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies  MacBook-Pro:~ adam2k$


I wanted to access man pages for command chmod.  Command whatis chmod gave this output:  chmod (2)            - change permissions of a file  chmod (1)            - change file mode bits  But I was actually looking for chmod(2).  When I type man chmod, man pages for chmod(1) appears.   Both man chmod(2) and man 'chmod(2)' commands show error.   I tried running info coreutils 'chmod invocation', but output is some kind of documentation which doesn't look like a typical man page.


$.getJSON call - losing click event on element

Any one can tell me why the with the code below I get the alert "Hello world" working on link #1 and link #2 only?   The link #3 is generated after doing a ajax call and the click event seems to be simply not available. I can't figure it out why.  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">           <meta http-equiv="content-type" content="text/html; charset=UTF-8">     <title>Test Page</title>
Link #1


From my understanding octal digits in a number map to 3 bit segments, and will never truly represent a binary string of 2^n length.    Out of curiosity, When/Why/How is this useful? :-)  ..If the base of the primary representation of a word in an architecture is a prime(!) power of 2, at least make sure It's even ;-).


Associated Prime Ideals in a Noetherian Ring; Exercise 6.4 in Matsumura

Let $I$ and $J$ be ideals of a Noetherian ring $A$. If $JA_P\subseteq IA_P$ for every $P\in \operatorname{Ass}_A(A/I)$, then $J\subseteq I$.   I'm reading Matsumura's Commutative Ring Theory book on my own. This is exercise $6.4$ in that book, and I fail to prove it. Could you help me with this? Thanks in advance.


no wifi adapter found lenovo g510 ubuntu complete beginner

I've run rfkill list all and it is hard blocked now.  I've run lspci and get network controller as Broadcom and Ethernet as Qualcommm Atheros Please help, thanks  lspci -knn | grep Net -A3; rfkill list 02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Lenovo BCM43142 802.11b/g/n [17aa:0611]     Kernel modules: wl 03:00.0 Ethernet controller [0200]: Qualcomm Atheros QCA8172 Fast Ethernet [1969:10a0] (rev 10) 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no


Is there a faster way to only occupy disk space than dd

In order to test that our systems correctly detect that they are running out of space, we just need large files on the disk where we do not care about their content at all. At the moment we use dd if=/dev/zero [...] to create them which takes awfully long especially when writing multiple hundreds of gigabytes to consumer grade SATA disks.  Is there a way to speed this up? I'm thinking of just writing the information that the file exists to the file system table without writing the content of the file, ending up with a huge file containing whatever was written on the disk before.


Fallout Shelter: Benefits of having Specials over 10, in the wasteland

This question is specific to dwellers who are out exploring the wasteland. Not in production rooms.  I am aware that in the wasteland, dwellers who have Endurance over 10(by equipping an outfit which increases Endurance on top of having full(10) Endurance) will not suffer radiation damage.  My question is, do any of the other Special stats also have benefits if they are over 10? I have not noticed anything but I may very well have missed something.


Quantum Entanglement and transfer of time information, is it possible?

If two particles are quantum entangled...let’s call them particle A and particle B.   You measure the state of particle A. At this point, can you know the exact time at which the particle B goes from superposition into a known state due to the remote measurement of particle A, only by waiting on particle B without knowledge of A? If that’s possible, then it seems to me, you could use Morse code to send information over quantum entangled particals. Consider the following protocol:  logic 0 defined as $\le 50$ millisecond time interval in superposition before not in superposition detected logic 1 defined as $\le 100$ milliseconds and $\gt 50$ millisecond time interval in superposition before not in superposition detected $\gt$ 100 millisecond time interval of superposition state defined as “Hangup” “hangup” followed by “logic 0” defined as “Start”  I define “superposition” as the “quantum entangled state”, Where the “Schrödinger's cat” is both alive and dead at the same time. Who really cares about the changed the vale of an entangled particle from the transmitter side... I just want to know if particle B is in a superposition or a non-superposition state, and the exact time that state transitions from superposition to a known state... and without direct knowledge of particle A


Root drive is running out of disk space. How can I free up space?

I'm using Ubuntu 11.04 and I want to free up some space in my root directory, which is overloaded. I especially want to change the path used for installing applications (they are getting installed directly to the root drive).  Another consideration is that I'm working on a MySQL database server. The server is installed in the root directory itself, so I don't want to  risk losing any data.  Please give me some tips to help sort out this problem.


How can I change the cellular DNS server on iOS?

Is there a way to set a global DNS server that will be used for all connections (both Wi-Fi + cellular data)? If there isn't a uniform manner to specify DNS, can I just change the DNS used by the cellular connection?  Ideally, I am looking for an answer for vanilla iOS; however, I'd welcome any solution, including one that requires a jailbreak.


How to simulate simple on/off, Single-Pole-Single-Throw switch?

I am trying to simulate ON, OFF switch in this simple circuit:  V1 0 1 1.5v Rfan1 3 4 1 S1 1 4 SW ON Rwire1 6 5 0.00001 VV1 0 2 dc 0  VRfan1 3 5 dc 0  VRwire1 2 6 dc 0  .dc V1 1.5 1.5 1 .print dc i(VV1) i(VRfan1) i(VRwire1)  .end   but I got this error:  ngspice stopped due to error, no simulation run!   the circuit I am trying to simulate is like this one:    if I replace the switch with a resistor, the circuit will work normally.  any idea? EDIT  I have fixed my switch as the following:  S1 1 4 98 99 mySwitch ON .model mySwitch SW vt=0 vh=1 ron=1n roff=10k


Did Peter Pettigrew need the wand to transform back into a rat?

Inspired by . In Harry Potter and the Prisoner of Azkaban, Peter Pettigrew is captured and is in the process of being brought to Hogwarts when he escapes. In order to escape, Peter uses his ability as an Animagus to transform into a rat. The scene is described in the book as:  Pettigrew had dived for Lupin's dropped wand. Ron, unsteady on his bandaged leg, fell. There was a bang, a burst of light - and Ron lay motionless on the ground. Another bang - Crookshanks flew into the air and back to the earth in a heap. 'Expelliarmus!' Harry yelled, pointing his own wand at Pettigrew; Lupin's wand flew high into the air and out of sight. 'Stay where you are!' Harry shouted, running forwards. Too late. Pettigrew had transformed. Harry saw his bald tail whip through the manacle on Ron's outstretched arm and heard a scurrying through the grass. -Harry Potter and the Prisoner of Azkaban  The scene as depicted in the movie shows Peter touch Lupin's wand to his head before transforming into a rat. . In this specific scenario, did Peter need the wand in order to transform back into a rat?


What's the difference between:  I will be eating cakes tomorrow. I will eat cakes tomorrow.   And, when should I use the first form?


What affiliation to put on a research paper as a college student?

I am an undergraduate, and I want to know what to put as an affiliation on a research paper.


Self Study - How does $\alpha$ and $\beta$ correspond to mean and variance of a beta distribution?

I am trying to figure out how to provide $\alpha$ and $\beta$ in terms of $\mu$ and $\sigma$ in a beta distribution.  $\mu$ is given as $\mu = \frac{\alpha}{\alpha + \beta}  $ $\sigma$ is given as $\sigma = \sqrt\frac{\alpha\beta}{(\alpha + \beta)^2(\alpha + \beta + 1)}$    The author rearranges the formula and arrives at: $\alpha = \big(\frac{1 - \mu}{\sigma^2} - \frac{1}{\mu} \big)\mu^2$ $\beta = \alpha \big(\frac{1}{\mu} - 1\big)$    My question is how does he go from $\mu$ and $\sigma$ formulas to $\alpha$ and $\beta$? I don't know how to get started even though this seems like such trivial algebra...