I was trying to check the Python version on my device. In the terminal I used the command python --version. But it outputs a message saying Command 'python' not found, did you mean:   command 'python3' from deb  command 'python' from deb python-is-python3  I tried reinstalling Python 3. But it still shows the same thing. What should I do now?

According to official documentation of Python, Python2.7 support will end near in future.     DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at    Why is Ubuntu not using Python3 as default in their upcoming version?  $ cat /etc/os-release  NAME="Ubuntu" VERSION="19.04 (Disco Dingo)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 19.04" VERSION_ID="19.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=disco UBUNTU_CODENAME=disco     $ python Python 2.7.16 (default, Apr  6 2019, 01:42:57)  [GCC 8.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information.


I add dynamically a form into a <div> using jQuery with some data retrieved via Ajax (it's made to update some records). Problem is that i'm not able to fire a click event on this form as i assume it is created after the document comes ready. I need to fire this event to call Ajax again and save the new data in the db.  Basically, this creates the form into the <div id="#result"> :  jQuery(document).ready(function ($) {     $.ajax({         [...]         success: function(data) {             $('#result').html(                 '<form name="form_name_here">' +                     '<input type="text" value="' + data[0].it + '">' +                     [...]                     '<input type="button" id="update_record" value="Save"> ' +                 '</form>'             );         }     }); });   But then this won't work:  jQuery(document).ready(function ($) {     $.ajax({         [...]     });     $('#update_record').click(function () {         console.log('test');     }); });   I tried also $('#update_record').on('click', function() { with no success.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


From what I understand, the magnetic force is just a relativistic effect of the electric force, and I understand how this is can be the case when considering the magnetic field generated by a current- carrying wire (length contraction of space between the electrons so they appear to be more concentrated than the positively charged ions to a 'stationary' observer, so the observer sees the wire as being negatively charged). However I do not understand why there would be a magnetic field around a permanent magnet. My teacher's explanation of permanent magnets involved there being permanent dipoles inside the magnet, however If you have two oppositely charged particles close to each other you will have an electric field around them, and not a magnetic field. I don't quite understand how lined up dipoles will produce a magnetic field if there is no motion of charges?

I'm having trouble understanding how a  (not the  that is generated as a result but the material itself) work. The particles are aligned in a specific direction to give rise to force but I don't see how this alignment gives rise to "attraction" or force.


Let $f_1, f_2, \ldots ,f_n$ be holomorphic functions on a region $\Omega$. Show that if $\phi (z)=|f_1(z)|+|f_2(z)|+\ldots +|f_n(z)|$ attains a maximum value on $\Omega$, then $f_i$ is constant for each $i=1,\ldots ,n$.

While studying for an exam in complex analysis, I came across this problem. Unfortunately I was not able to solve it. Any help would be greatly appreciated.  Let $U ⊂ \mathbb{C}$ be a domain and $f_1, . . . , f_n : U \rightarrow \mathbb{C}$ holomorphic functions, such that $\sum_{k=1}^n \left| f_k(z) \right|$ is constant on $U$. Show that $f_1, . . . , f_n$ are constant.


A: What is this photo about?   B:This is that he told me something.    I don't know the meaning of the sentence above. What is the meaning of the sentence like " This is that he told me something." in this sentence?  Please, tell me the meaning.

situation 1    A: What is this photo about? B: This is the situation that he told me something.    situation 2    A: What is this photo about? B: This is that he told me something.    Can I substitute situation A with situation B?   If I can't, what is the difference between two sentences.


I have a sample file below:  # This is a test file. This is a test file. This is a test file   This is a test file. This is a test file. This is a test file.   This is a test file.  # Need to output just this paragraph.Need to output just this paragraph.   Need to output just this paragraph TOO. Need to output just this paragraph.   Need to output just this paragraph.   I need to output just the second paragraph starting from "#" till the last sentence in the paragraph.   How do I grep and output based on the pattern? Say if the file has more paragraphs, and I would like to output the paragraph which contains the word "TOO".

Below is the text in the file:  Pseudo name=Apple Code=42B state=fault  Pseudo name=Prance Code=43B state=good   I need to grep for "42B" and get the output from the above text like:   Pseudo name=Apple Code=42B state=fault   Does anyone have idea on how to achieve this using grep/awk/sed?


I'm trying to pass menu: "#menu" to the anonymous object using chWidth().    How can i do this?  $('#fullpage').fullpage({verticalCentered: false}, chWidth());       function chWidth() {         if ($(window).width()) {             return {menu: "#menu"}         }     }   so it should ends up like this:     {       verticalCentered: false,       menu: "#menu"     }  How should the return statement be? I get an error if i try return menu:"#menu"

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


I want to show that  If $G$ non-abelian group of order $pq$ with $p,q$ primes then $Z(G)=\{e\}$.  It's immediate that if $Z(G) \neq \{e\}$ then $|Z(G)|=p$ or $|Z(G)|=q$ and using that any group of prime order is cyclic then $G / Z(G)$ is cyclic, which implies that $G$ is abelian and therefore we have a contradiction. I wanted to know if it's possible to prove it without using the theorem that if $G/Z(G)$ is cyclic then $G$ is abelian because my professor hasn't mentioned it before. Any help would be greatly appreciated.

A nonabelian group $G$ of order $pq$ where $p$ and $q$ are primes has a trivial center   My Proof is as follows:   Assume we have nonabelian group $G$ of order $pq$ where both $p$ and $q$ are primes.  When $G$ has a trivial center it means subgroup $Z(G)=\{e\}$.  If a group is of order $pq$ then the order of its subgroup must divide pq meaning $Z(G)$ has to be of order $1$, $p$ or $pq$.  It cannot be $pq$ otherwise $Z(G)$ would be a group equivalent to $G$ and not a subgroup.  It cannot be $p$ or $q$ because otherwise $Z(G)$ would be cyclic and therefore abelian.  So $Z(G)$ must be or order $1$.    Is this correct?  A hint I was given was to use the fact that if $G/Z(G)$  is abelian then it is cyclic.  How would that be incorporated?


I'm a little bit new to javascript (but not scripting in general). Does anyone know a good way to compare dates which use this formatting? Need it for 'google script' if statements.  if ('14 Jul 16 - 16.34.06' > '5 May 17 - 08.24.27'); {  ;do this }  ;another example if ('7 Oct 16 - 09.19.55' < '28 Nov 16 - 02.06.12') {  ;do this }   Should I use moment.js perhaps? Seems a bit big.  Thanks for the help!

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


So I made an intro using animation and it saves it as a .blend and I want it so save as a video like .mp4 or something like that. I've tried changing the codec because I tried opening the intro with windows media instead of blend. I didn't try all the codec's but I tried some of them.

I am basically trying to make an intro for my youtube channel. I am sort of familiar with the program because I was playing around with it for a long time, getting the basics of it. With the help of youtube videos I am basically done with my project. I put my name in it and everything. I just need to know how to save the animation onto my desktop as a file that I could open and would be in a video format.


I currently have less than 2000 reputation. When I reach 2K reputation, I will receive the .  My question is: right now my edits are being counted for the Copy Editor badge; these edits are also reviewed before they are accepted. But after I've earned 2K, there won't be any peer reviews. So will my edits still  be counted and tracked for the Copy Editor badge?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I'd like to report following bug (at least I think so).  I'm looking at questions related to sql-server tag on Stack Overflow. One of them was answered by me, however it displays me as last editor. Is it expected behaviour? Please see screenshots:        And once you open question:

When I'm looking down the front page on , I often wish I could tell at a glance what happened to the question to bump it there. Sometimes it is obvious from looking at the number of answers, other times you have to follow a link to find out if it has been edited or if an answer has been added or updated.  I'm guessing this is just as applicable on other SE sites - this is the kind of thing I'm suggesting:    A couple of suggestions from the comments that might be good:   To reduce clutter the word 'ago' could be removed at the same time. The new text could be visible only to established users - ie users who are likely to be reviewing/editing and would benefit from seeing at a glance what kind of change has occurred.


I am a high school student currently self-studying number theory using the book Elementary Number Theory by David Burton. Currently, I'm doing Chapter 3: Primes and their Distribution. I've noticed that often time the questions which come up are in this form-  If [condition], then prove that $p$ is prime.  This is a very general question, but in essence what I'm asking is what condition do you prove a certain number to fulfil so you can say that it's  prime? For example, in the case of divisibility, we often use the argument that $a | 1$ to prove that $a=1$ and other general tricks like that.  For instance, in this question-     If $p$ and $p^2+8$ are both prime, then prove that $p^3+4$ is also prime.   Here I'm unable to even begin proving the question not because I don't know what to do, but because I'm unaware what kind of argument I need to use to prove a number is prime.  Is there some general argument that we often apply if we want to prove that a number is prime?

In the book, "Elementary Number Theory - 6th Edition" written by David M. Burton, I have a question. The problem is  If $p$ and $p^2+8$ are both prime numbers, prove that $p^3+4$ is also prime. (p. 58 problem 3.3 #20)  I don't know how to prove this. Thank you very much if you solve this question.


My professor told us that Linked Lists are used as an industry standard with Java based programming over Arrays/Array Lists. Is that true, are there any professionals that use one or the other or a mix of them, or is there something else you use?

I've always been one to simply use:  List<String> names = new ArrayList<>();   I use the interface as the type name for portability, so that when I ask questions such as these I can rework my code.    When should  be used over  and vice-versa?


My MWE  \documentclass[varwidth, border=0.2in]{standalone} \usepackage{mathtools} \usepackage{unicode-math} \setmathfont[]{TeX Gyre Pagella Math} \setmathfont[range={cal}]{Latin Modern Math} \begin{document}   The distribution of $\mathbf{X}$ is $\mathcal{P}\{\mathbf{X} = k\}$. \end{document}   produces    Note the absence of the \mathcal{P} character. Confusingly, if I comment out \usepackage{mathtools}, it appears to work:    EDIT: I took the advice from the duplicate bug — it works, but only partly. Now I'm losing \mathscr characters, although I have the \mathcal characters back:  \documentclass[varwidth, border=0.2in]{standalone} \usepackage{mathtools} \usepackage{unicode-math} \setmathfont{TeX Gyre Pagella Math} \setmathfont[range={cal}]{Latin Modern Math} \setmathfont[range={scr}]{TeX Gyre Pagella Math} %% Added this line \begin{document}   The distribution of $\mathbf{X}$ is $\mathcal{P}\{\mathbf{X} = k\}$,   in the collection $\mathscr{P}$. \end{document}     I've tried setting the math fonts in many different ways, but one of the two alphabets is always disappearing.  EDIT: The closest I've come to a workaround is to load amsmath, then unicode-math, then mathtools. (Yes, I understand this is counter the documentation of unicode-math.) That works in that I'm able to see all my characters. Unfortunately, changing the font with \small, for example, changes all boldface math characters to non-boldface. Not ideal.

I find unexpected behaviour in using mathtools in conjunction with unicode-math, which shows up if the 'range' command is used. Some incompatibilities have been noted before, so perhaps this is related. However, it only showed up for me in Texlive2016; previous versions worked as expected. In the following example I wish to draw calligraphic fonts from a different set than the main maths fonts, and some calligraphic symbols, and a regular italic bold face math, are missing.   \documentclass{article} \usepackage{mathtools}  \usepackage{fontspec} \usepackage{unicode-math} \unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic} \setmainfont{xits-regular.otf} \setmathfont{xits-math.otf} \setmathfont[range={\mathcal,\mathbfcal}]{latinmodern-math.otf} %\setmathfont[range={}]{xits-math.otf} % Try with and without this line % \begin{document} Test $a+b = \mathcal{C H G}C \mathscr{D}$ $$-\frac{a}{b} \mathcal{O} . $$ \begin{equation}     \mathrm{d} = \mathcal G(\varphi,x,y,z,t) ,  \end{equation} The symbol $\mathcal{G}$ is missing.  The following equation is wrong if I include the line  ``setmathfont[range=\{\}] \{xits-math.otf\}'' \begin{equation}     \mathup{d} = \symbf{u}(\varphi,x,y,z,t) ,  \end{equation} The glyph $\symbf{u}$ is missing. \end{document}   If mmathtools is called after unicode-math the problem does not arise, but this ordering is not recommend by the unicode-math developers.  My specific question is, is this a bug or is it something I am doing wrong?


My  was edited by a user for no reason. Check the edits he did -> . I have rolled back the edit, but is there any guide where I can know what I did was right?

I was reading a question and found myself very confused. I saw that it had been edited recently by a 10k rep user and looked at the edit chain.    It seemed to me that the clarity and intent of the question was made substantially worse by the most recent edit. I don't know if this was just a one-off mistake by the high rep user. I could roll back his change to the previous version, or improve on it, but it seems like there might be a need for some kind of flag / reporting option as well - if this user has a history of misinterpreting questions and editing them for the worse, (and these hypothetical flags accumulate) should something change about their ability to edit with out review? Should I comment on the post with a request for the user to undo or fix their own change?  Not sure what my best option is.  I had initially left the post out of the question as I didn't want it to be a "I'm calling you out bro!" or a shaming kind of thing, but since it was requested and upvoted :    I think that the changes he made to the first paragraph (particularly adding the B[i] = j line) are enough of a departure from the intent of the question that it makes it more confusing.


i added a user a new user and would like them to be able to execute a file, when entering "python3" it works and i can enter code but when trying to execute python script i get this  python3: can't open file 'bot.py': [Errno 13] Permission denied

I think I am misunderstanding something here. I have made an easy python testing file to see how permissions affect the use of python files. I did so in order to be able to answer   SetUp  I have made a test.py file with the contents  print 'I am working'   Test case 1  ls -al test.py  -rw-r--r-- 1 joey joey 25 Dec 24 11:11 test.py python test.py I am working    How come python is executing this file even though I did not do chmod +x test.py?   Test case 2  chmod 400 test.py ls -al test.py  -r-------- 1 joey joey 25 Dec 24 11:11 test.py python test.py I am working   So apparently python only needs read permission in order to execute my file?  Test case 3  chmod 200 test.py ls -al test.py  --w------- 1 joey joey 25 Dec 24 11:11 test.py python test.py python: can't open file 'testo.py': [Errno 13] Permission denied   Write permissions are insufficient (and for the record, only executable permissions are insufficient as well).   How come python executes files without executable permissions?


I've created a Publishing site using SharePoint 2013 Online, and want to allow anonymous users have access to the site.  My research on the internet has brought me to identical tutorials on how to do this, but I get stuck right at the beginning.  So the instructions follow as such:    "Navigate to Application Management in SharePoint Central Administration and click on Manage web application."    But, after logging in to Sharepoint's Central Administration, I can't find the Application Management section!   Where is it? Do I need to activate some kind of Collection feature to have access to it?  Here's the link to one of the tutorials I tried following:    Thank you! Nuno Vidal

I'm using the SharePoint 2013 of the new office 365, and I'm experiencing some troubles to grant access to the anonymous users to the website.  I want to make the SharePoint site public like if it was a public facing website.  I've tried Site permissions under site settings but the option in the ribbon is missing.  I want the two SharePoint sites bellow behaving the same way without the login window.     Does anyone know how to activate anonymous access?  Thanks in advance


For $x \in \Bbb C$, let $f(x)=i^x = \exp(i\pi x)$, where $i^2=-1$. Then find the fixed points for $f$.  EDIT: Let for all $n\geq 1$ $$\large a_n=\underbrace{i^{i^{\cdots i}}}_{\text{$n$ times}}$$  My question is, does the sequence of tetrations $\{a_n\}_{n\geq1}$ converge to some complex number? If yes, then what is it?

If $w = z^{z^{z^{...}}}$ converges, we can determine its value by solving $w = z^{w}$, which leads to $w = -W(-\log z))/\log z$.  To be specific here, let's use $u^v = \exp(v \log u)$ for complex $u$ and $v$.  Two questions:   How do we determine analytically if the tower converges?  (I have seen the interval of convergence for real towers.) Both the logarithm and Lambert W functions are multivalued.  How do we know which branch to use?   In particular $i^{i^{i^{...}}}$ numerically seems to converge to one value of $i2W(-i\pi/2)/\pi$.  How do we establish this convergence analytically?  (Yes, I have searched the 'net, including the tetration forum.  I haven't been able to locate the answer to this readily.)


I am developing a GIS application like this:    By now my steps are:   I have got a jpg file, 5040 x 8179 dimension. In this map, the roads, rivers, towns etc. are marked. I am using .Net to develop and this requires a shp file to be used properly. I tried using qGIS to vectorize this jpg and georeferencing it but the shapefile that comes out is like full green color etc..   How to convert my original jpg map data to shp format?  I have very little experience in GIS.

What is the best way of converting a gif of a map into a vector format, such as a shapefile?   The only relevant parts that I am interested in are the outline of the island so I realize some manual work will be necessary where it is shaded orange; is there a way to handle the rest?  Regarding copyright, it's from the 1980s and it's being used for academic research.


Having two overlapping , I'm trying to make the transparent areas of the picture box let the controls below (in the z-order) being visible.  Even after , I cannot get the desired result.  This is what I currently have:    And this is what I want:    So my question is:  Any way to achieve my desired result with two PictureBox controls (or with another way) that overlap each other and let the transparent areas shine through?  Update:  Actually I solved it by using  to the the SO question "".

I am working on a Windows Forms application in VS 2008, and I want to display one image over the top of another, with the top image being a gif or something with transparent parts.  Basically I have a big image and I want to put a little image on top if it, so that they kinda appear as one image to the user.  I've been trying to use a picturebox, but this doesn't seem to have worked, any suggestions?


I'm pretty new to command blocks, but I managed to understand the basics of the CanPlaceOn command for my adventure map. However, I want the player to be able to place levers on green stained clay. How do I specify a specific color of stained clay for lever placement? Also, if anyone could tell me if there is a way to hide the tag on the lever that it "Can Be Placed On: Stained Clay", that would be wonderful.

I'm currently in the process of making a custom map and I want to add blocks that can only be placed on a certain colour clay.  This is the command I tried using.  /give @p cobblestone 1 0 {CanPlaceOn:["hardened_stained_clay"],Damage:3}   However, even with this command the cobblestone can be placed on any colour of stained clay. What command can I use for placing only on a certain block?


I'm not a regular Cygwin user. I installed Cygwin and Cygwin64 for testing proposed patches. I tried to perform a git clone, but it failed with -bash: git: command not found. So I need to install Git, which should be a relatively simple operation.  Cygwin does not appear to supply documentation related to packages and their management:  $ man -k package package: nothing appropriate.   In the terminal, I tried install git and cygwin install git. The former failed with install: missing destination file operand after ‘git’. The latter failed with -bash: cygwin: command not found. (For completeness, I also tried apt-get (Ubuntu), yum (Red Hat/Fedora), and pkg_add (BSDs) with the same results. I even tried just pkg and package with the same result).  What is the name of the Cygwin package manager?

Possible Duplicate:        I'm looking for a "yum"-link method to install additional Cygwin packages from the command-line. Let's say I want to add the package "Math/bc", then ideally I'd like to be able to do it  using one command as in:  yum install bc   Currently the only way I've found to install new packages is to locate and run the installation file SETUP.EXE file and then scroll to the relevant package, add it, etc. This is  quite cumbersome so I'm sure there is a smarter command-line way to add an additional package.


Prove that the congruence $ax \equiv b $ mod $m$ has a solution if and only if $d | b$, where $d = $gcd$(a,m)$  I thought about proving using the contrapositive that $d$ does not divide $b$, but i'm not sure that would really help and am stumped as to where to start.   Some help would be great!

Prove that one can solve the congruence $cx \equiv b \pmod m \Longleftrightarrow \gcd(c,m)|b$. Show, moreover, that the answer is unique $\bmod{m/\gcd(c,m)}$    My Work  Proof of $(\Rightarrow)$:  Assume that $cx \equiv b \pmod m$ has a solution, call it $x_1$. Let $d = \gcd(c,m)$ Then  \begin{align*} cx_1 \equiv b \pmod m &\Longleftrightarrow m | (cx_1 - b) \\ &\Longleftrightarrow cx_1 = km + b, \quad k \in \Bbb Z \\ &\Longleftrightarrow cx_1 + (-k)m = b \\ \end{align*} As the $\gcd$, $d$ divides all linear combinations of $c$ and $m$, so $d | b$.   Proof of $(\Leftarrow)$:  Assume $d | b$. Then $b = dn$ for some $n \in \Bbb Z$. As the $\gcd$, $d = cs + mt$ for some $s,t$. So  \begin{align*} dn &= csn + mtn \\ b &= csn + mtn \\ csn - b &= (-tn)m \\ csn - b &\equiv 0 \pmod m\\ csn &\equiv b \pmod m \end{align*}  Taking $x = sn$, we have a solution to the linear congruence $cx \equiv b \pmod m$.  My Question  I am not sure how to prove uniqueness from here. Should I say that $cx \equiv b \pmod m$ gives that, for $d = \gcd(c,m)$, $$m | (cx -b ) \Longrightarrow \left({m \over d}\right) \mid \left({cx - b \over d}\right) = {c \over d}x - {b \over d}$$ However, I'm not sure how to move from here to uniqueness. I have that ${c \over d}x = {m\over d}k + {b\over d}$, but this doesn't seem to be much.


I have several folders and I need to compress the content of each folder in a separate ZIP file. However, every ZIP should only contain the content of each folder and not the folder itself.   The following code creates a file with the folder included. It is close to what I'm looking for, but I'm not there yet.  for /d %%X in (*) do  "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"   What I get: XXX.zip > XXX(folder) > content What I want: XXX.zip > content  How can I do this?

I got a bunch of pictures that I had to crop into 800x600 pixels. That was easily done, but now I have to upload them so the family can see them all.  Thing is, this is 500MB in pictures. I decided to simply zip the separate folders, which each contain an almost equal amount of pictures. This way I can upload a couple each day. Doing this manually is a very long and hard job. I wonder if there is a way to make 7-zip handle each folder individually?  I think I'll need a batch file to do it, but I'm not good with that. I've put everything under one folder. In the various subfolders is where the pictures are located. What I need is for the contents of that folder to be zipped. I'm not sure if I can just zip the folder along with it. I know PHP has a zip module, I've just never worked with it, so I'm not sure whether it can handle the fact that the content of the zip is a folder which contains the items, instead of just the items.


let's say I have a simple List<bool>. I want to initialize it and add e.g 100 elements to it. To do so, I can do:  var myList = new List<bool>();  for (int i = 0; i < 100; i++) {     myList.Add(false); }   but it's not the most elegant approach. Is there any built-in method to simplify it ? I don't want any loops, just for curiosity

.NET offers a generic list container whose performance is almost identical (see Performance of Arrays vs. Lists question). However they are quite different in initialization.   Arrays are very easy to initialize with a default value, and by definition they already have certain size:  string[] Ar = new string[10];   Which allows one to safely assign random items, say:  Ar[5]="hello";   with list things are more tricky. I can see two ways of doing the same initialization, neither of which is what you would call elegant:  List<string> L = new List<string>(10); for (int i=0;i<10;i++) L.Add(null);   or  string[] Ar = new string[10]; List<string> L = new List<string>(Ar);   What would be a cleaner way?  EDIT: The answers so far refer to capacity, which is something else than pre-populating a list. For example, on a list just created with a capacity of 10, one cannot do L[2]="somevalue"  EDIT 2: People wonder why I want to use lists this way, as it is not the way they are intended to be used. I can see two reasons:   One could quite convincingly argue that lists are the "next generation" arrays, adding flexibility with almost no penalty. Therefore one should use them by default. I'm pointing out they might not be as easy to initialize. What I'm currently writing is a base class offering default functionality as part of a bigger framework. In the default functionality I offer, the size of the List is known in advanced and therefore I could have used an array. However, I want to offer any base class the chance to dynamically extend it and therefore I opt for a list.


What I currently understand about the P-value is that, if the null hypothesis were true, the P-value is the probability of getting a value of the sample test statistic that is at least as extreme as the one found from my sample data.   What I don't understand is, if I have a two-tailed test and I am assuming my null hypothesis were true (for example hypothesizing that my mean is equal to 2) and my P-value (probability of obtaining extreme values further from 2) is very low, wouldn't that favour my null hypothesis because the probability of obtaining extreme values that are further from the hypothesized mean of 2 is lower?  Why is it that the lower the P-value, the stronger evidence I have to reject my null hypothesis?  Please let me know where I have gone wrong in my understanding.

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


I am trying to show that $S_n = \langle \{(i,i+1) ~|~ i \in [1,n-1] \} \rangle = Q$.   I have that $S = \langle \{(i,j) ~|~ 1 \le i < j \le n-1\} \rangle = \langle T \rangle$ , so my goal is to show that $T \subseteq Q$. I discovered that $(i,i+2) = (, and so my hope is that this serves a base case. Through some examples I made the following conjecture:  $$(i,i+k) = \bigg(i+(k-1),i+k \bigg) \bigg(i+(k-2),i+(k-1) \bigg)...\bigg(i,i-1 \bigg)...\bigg(i+(k-2),i+(k-1) \bigg(i+(k-1),i+k \bigg)$$  Assuming that the formula holds for some natural number $k$,   $$\bigg(i,i+(k+1) \bigg) = \bigg(i,i+k \bigg) \bigg(i,i+(k+1),i+k \bigg)$$  This is where I got stuck. I am presently blanking: how can we write $\bigg(i,i+(k+1),i+k \bigg)$ as a product of "consecutive" transpositions? My other question is, is there a simpler way to solve this problem?   EDIT:  Okay. I have since taken a look at the duplicate and come to realize that first proving $S_n$ can be generated by $\{(1,2),(1,3),...,(1,n)\}$ makes things considerably simpler I did this exactly as  did it in his proof of theorem 2.2.  However, I think I might have proved theorem 2.3 (which is the problem I initially posed) slightly differently, but hopefully someone will correct me if I am wrong.  I am not sure it is correct, so here goes nothing.   First, notice that $(1,3) = (2,3)(1,2)(2,3)$ and therefore $(1,3)$ is in $Q$. Now, suppose that $(1,i) \in Q$ for all integers up to some $i \in [1,n-1]$. Then $(1,i+1) = (i,i+1)(1,i)(i,i+1)$ Since $(i,i+1) \in Q$ and $(1,i)$ is in $Q$ by hypothesis, it follows that $(1,i+1) = (i,i+1)(1,i)(i,i+1) \in Q$, and therefore $S_n = \langle \{(1,2),...,(1,n)\} \rangle \subseteq Q$.  This seems a little simpler than the proof given by Keith Conrad, which can be found the aforementioned link.

I am struggling with the end of my proof.   So far I have used the fact that $S_n=\langle T\rangle$ where $T=\{(i\text{ }j)|1\leq i<j\leq n\}$ to show that $S_n$ is generated by the set $\{(1\text{ }2),(1\text{ }3),\cdots,(1\text{ }n)\}$ of $n-1$ transpositions.   I am struggling with proving that $S_n$ is also generated by the set $\{(1\text{ }2),(2\text{ }3),\cdots,(n-1\text{ }n)\}$ of $n-1$ transpositions. Essentially I want to show that each $(1\text{ }i)$ is a product of these transpositions to reach this conclusion.   Here is what I have so far...    Consider any $(1\text{ }i)$ transposition in $S_n$. Notice by the composition of a permutation that \begin{eqnarray*} (1\text{ }i-1)(i-1\text{ }i)(1\text{ }i-1)&=&\begin{bmatrix}     1       & i-1 & i   \\     i-1       & 1 & i    \end{bmatrix} \begin{bmatrix}     1       & i-1 & i   \\    1       & i & i-1  \end{bmatrix} \begin{bmatrix}    1       & i-1 & i   \\     i-1       & 1 & i \end{bmatrix}\\ &=& \begin{bmatrix}     1       & i-1 & i   \\     i-1       & 1 & i    \end{bmatrix} \begin{bmatrix}    1       & i-1 & i   \\     i       & 1 & i-1 \end{bmatrix}\\ &=& \begin{bmatrix}    1       & i-1 & i   \\     i       & i-1 & 1 \end{bmatrix}\\ &=& (1\text{ }i) \end{eqnarray*}  Now we want to use this property, call it STAR, to show that $S_n$ is also generated by the set  $$Y=\{(1\text{ }2),(2\text{ }3),\cdots,(n-1\text{ }n)\}$$ of $n-1$ transpositions. Notice for each $(i\text{ }j)$ in $Y$ that $j-i=1$. Suppose $n=2$. Then $S_2=\{(1),(1\text{ }2)\}$, and we done because $2-1=1$. Suppose $n=3$. Then $S_3$ is generated by the set $\{(1\text{ }2),(1\text{ }3)\}$. By STAR,  $$ (1\text{ }3)=(1\text{ }2)(2\text{ }3)(1\text{ }2) $$ $$ (1\text{ }2)=(1\text{ }1)(1\text{ }2)(1\text{ }1) = (1\text{ }2) $$ Therefore $S_3$ is generated by $\{(1\text{ }2),(2\text{ }3)\}$ and for each $(i\text{ }j)$ we have $j-i=1$.    And here is where I am struggling. I do not know how to apply induction to this. I want to show that each side part will continue breaking down using the property I stated until all of $S_n$ is created. Here is why I think this: $$ (1\text{ }1)(1\text{ }2)(1\text{ }1)=(1\text{ }2) $$ $$ (1\text{ }2)(2\text{ }3)(1\text{ }2)=(1\text{ }3) $$ $$ \cdots $$ $$ (1\text{ }n-1)(n-1\text{ } n)(1\text{ } n-1)=(1\text{ }n) $$ Any input would be much appreciated. Best.


I have created a set with night sky, stars and moons, clouds, etc.. Stars are basically particle system used inside a big sphere (which is my night sky basically) and moon, clouds are all separate objects. I use a moving camera inside the scene for my animation. I was wondering if there is a way for me to render my full night sky with moon and clouds and use it as a image material for the sphere instead of rendering each frame which takes forever?

I would like to turn a specific blender scene into an animated sky box I can use in other animations.   is the top google search result for "blender sky box", but it's for an old version of blender, and some of the buttons it references no longer exist.  There are several tutorials on how to set the sky box if you already have an image, but I have yet to find a modern HOWTO that lays out how to create the sky box image from a scene.  How do I accomplish this?  Keep in mind I want it to be animated, so I'll need to bake a hundred frames or so.


I have the following php script to insert a form user input data into the database. Is mysqli_real_escape_string enough to prevent SQL injection if I don't wish to use prepared statements to bind parameters to "?" placeholder?     <?php    $link = mysqli_connect("localhost", "root", "", "bizcontact");     $name = mysqli_real_escape_string($link, $_POST['name']);    $company = mysqli_real_escape_string($link, $_POST['company']);    $position = mysqli_real_escape_string($link, $_POST['position']);    $contact = mysqli_real_escape_string($link, $_POST['contact']);    $email = mysqli_real_escape_string($link, $_POST['email']);    $gender = mysqli_real_escape_string($link, $_POST['gender']);     /* check connection */    if (mysqli_connect_errno()) {    printf("Connect failed: %s\n", mysqli_connect_error());    exit();    }     $sql = "INSERT INTO businesscontact(name, company, position, phone,  email, gender) VALUES('$name', '$company', '$position', '$contact', '$email',  '$gender')";    if (mysqli_query($link, $sql)){    echo "success";    }else{    echo(mysqli_error($link));    };     /* close connection */    mysqli_close($link);    ?>   UPDATE      $stmt = $link->prepare("INSERT INTO businesscontact(name, company, position, phone, email, gender) VALUES(?,?,?,?,?,?)");     $stmt-> bind_param("ssssss", $name, $company, $position, $contact,  $email, $gender);     if($stmt->execute()){     echo "success";    }else{     echo(mysqli_error($link));    }

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I wanna reset the nether because 1.10 is a thing and I want the new magma blocks. Is it possible? I don't know if I even need to because I barely even go to the nether and I think I can load new chunks. Please tell me. I haven't even tried loading the new chunks. Oh, and I can't start a new world.

I just opened a nether portal for the first time, and I must say, it's not a very good location, a sort of narrow trench/cavern thingy without any obvious clues as to which direction is "out".  I'm not willing to simply move my overworld portal (due to dilation it is unlikely to have much of an effect, anyway), and was wondering if there was a way to force minecraft to generate a new personal Hell for me to explore (hopefully one that doesn't involve me stuck in some wall!).


Say, I have a date var dt = new Date('2012-01-01');  Is there a method in Javascript to return number of milliseconds since 1970-01-01? For this particulat date it would return 1325376000000 For this purpose, there is a method  "toUTC()" that runs in Chrome only. I know this because i can do that in Chrome's console. See screen attached below:  However, When I search about this method on the internet, I don't find it and it doesn't work in Firefox either which is very wierd and I am very confused. Anyhow, if you know any way to get this, will be really appreciated. Thank You

Something similar to Unix's timestamp, that is a single number that represents the current time and date. Either as a number or a string.


I'm looking to convert an integer representation of binary into a string. i'm not allowed to use bitwise operations. when i converted the decimal integer value into that integer binary representation, i could've put the digits in a string and reverse, but i'm searching for a more elegant way.  Any ideas?

I can print with printf as a hex or octal number.  Is there a format tag to print as binary, or arbitrary base? I am running gcc. printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n" print("%b\n", 10); // prints "%b\n"


I think thats my question? Basically this code won't work no matter how many ways I try it. The state won't set to the given array.   if(difficulty == "easy")  {     state= new int[] {1,3,4,8,6,2,7,0,5};     blankTile = 7;     Node start = new Node(difficulty,state,blankTile);     openList.add(start);  }  else if(difficulty == "medium")  {     state= new int[] {2,8,1,0,4,3,7,6,5};     blankTile = 3;     Node start = new Node(difficulty,state,blankTile);     openList.add(start);  }  else if(difficulty == "hard")  {     state= new int[] {2,8,1,4,6,3,0,7,5};     blankTile = 6;     Node start = new Node(difficulty,state,blankTile);     openList.add(start);   }  else if(difficulty == "worst"){       state= new int[] {5,6,7,4,0,8,3,2,1};     blankTile = 4;     Node start = new Node(difficulty,state,blankTile);     openList.add(start);  }   I had this in the constructor of Node at first, where I would just pass in difficulty and it would set the state and blankTile in the constructor. but that wasn't working either. Would somebody be kind enough to help me?

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


For each of the following sets A and binary relations  ~, decide whether ~ defines an equivalence relation on $A$ a) Set $A=\mathbb{R}$ Relation: $x\sim y$ if $x=ay$ for some $a \in \mathbb{Q}$

I did the following demonstration: Would it be possible to give me a feedbak if i'm to wrong. Be $A$ an integral domain and $x,y \in A$, then:  $x\sim y \Rightarrow$ $\exists u \in \mathfrak{U}(A)$ such that $y=xu \Rightarrow x \mid y$ and $y\mid x$. So there's $a,b \in A$ such that $xa=y$ and $yb=x$. $1º$ case: $x=0.$ $x=0$ and $xa=y \Rightarrow y=0.$ Take $u=1 \in \mathfrak{U}(A)$ and then, $0=0\cdot 1$, or $y=xu$. $2º$ case: $a\neq 0$. $xa=y$ and $yb=x$. $\Rightarrow xab=x$ $\Rightarrow x(ab-1)=0$ $\Rightarrow ab=1$ $\Rightarrow a$ is invertible. Taking $u=a \in \mathfrak{U}(A)$ and then $xu=y$. By hypothesis, $y=xu$, $u \in \mathfrak{U}(A)$. It follows that $x\mid y.$ In addition, from $y=xu$, we have $y \cdot u^{-1}=x$ and then $ y\mid x$. So, $x\sim y$. $\square$


Let $S^l \vee S^k$ wedge sum of two spheres $S^l, S^k$. How can I simplify the calculation of homotopy groups $\pi_n(S^l \vee S^k)$? I know that $\pi_n(S^l \times S^k) = \pi_n(S^l) \oplus \pi_n(S^k)$, as well $H_n(S^l \vee S^k) = \pi_n(S^l) \oplus H_n(S^k)$ holds, therefore we have $\pi_n ^{ab}(S^l \times S^k) = \pi_n ^{ab}(S^l) \oplus \pi_n ^{ab}(S^k)$, but do we have similar reduction rules for $\pi_n(S^l \vee S^k)$? If, yes, why, but I suppose not generally.  What other strategy can I use to simplify the calculation?

Let $X_\alpha$ be connected CW-complexes. Then from Hatcher's book,  $$\pi_{n}(\prod_{\alpha} X_{\alpha})=\prod_{\alpha}\pi_{n}(X_{\alpha}).$$  Is it true in general that  $$\pi_{n}(\bigvee_{\alpha} X_{\alpha})=\prod_{\alpha}\pi_{n}(X_{\alpha})?$$


I am wondering if there is any tools, or even GCC options which one can check and find the list of all required and used libraries in a C program.There is a code and it should be check against all of its required (used) libraries and dependencies. Also I want to check whether any non-standard (user-defined) libraries has been used in the code or not.

I'd like to know which libraries are used by executables on my system. More specifically, I'd like to rank which libraries are used the most, along with the binaries that use them. How can I do this?


In S06 E09 why did Ghost (Jon Snow's direwolf) not appear in the war? It might have helped a lot for Jon. Also Ramsay was attacked by hounds, so why not Ghost?

After seeing episode 9 of season 6 I really was wondering where Ghost, the direwolf was.  It would seem logical that he would be around I think but I believe I haven't seen him     Since Jon resurrected


I recently came across code in an application that does the equivalent of this:  var source = new List<string>(); source.AddRange(getSomeListData());  var index = source.Count > 10 ? source.Count - 10 : 0; var target = new TargetObject {     Line1 = source.Count > index ? source[index++] : string.Empty,     Line2 = source.Count > index ? source[index++] : string.Empty,     Line3 = source.Count > index ? source[index++] : string.Empty,     Line4 = source.Count > index ? source[index++] : string.Empty,     .     .     . }   The goal here is to include the last 10 items from the source data in the output object (in our case, the last line is crucial). But we don't know how many lines of data will be present -- it could be as few as 1.  This code works, at the moment, because VS2013 is running the member initializers in source-code order, so the side-effect of each index++ happens in the correct order. However, I read through the C# 5 specification and I cannot find any guarantee that this will always be true. Is the order in which these members are initialized deterministic, or is the above code subject to breaking in some future version of VS and/or other C# compilers?  (I have an opportunity to change it now, if there's a risk, but I don't want to change the code just for the sake of change.)

Does the order in which I set properties using the object initializer syntax get executed in the exact same order?  For instance if I do this:  var s = new Person { FirstName = "Micah",                      LastName = "Martin",                      IsLoaded = true                    }   will each property get set in the same order?


I just noticed that for any two Cartesian vectors their dot product is precisely the only non-zero eigenvalue (if such exists) of the following matrix:  $$\vec{a}=(a_1,a_2,a_3,\dots)$$  $$\vec{b}=(b_1,b_2,b_3,\dots)$$  $$A_{mn}=a_m b_n$$  For example:  $$\vec{a}=(a_1,a_2)$$  $$\vec{b}=(b_1,b_2)$$  $$A= \left[ \begin{matrix} a_1 b_1 & a_1 b_2 \\ a_2 b_1 & a_2 b_2 \end{matrix} \right]$$  $$\left| \begin{matrix} a_1 b_1-x & a_2 b_2 \\ a_2 b_1 & a_2 b_2-x \end{matrix} \right|=x^2-(a_1b_1+a_2b_2)x=0$$  $$x_1=0,~~~x_2=a_1b_1+a_2b_2=\vec{a} \cdot \vec{b}$$  The same works for vectors of any dimension. We obtain the following characteristic polynomial of $A$:  $$x^d-(a_1b_1+a_2b_2+\dots+a_db_d)x^{d-1}=0$$  Of course for two perpendicular vectors their dot product will be zero, so the characteristic polynomial will just be:  $$x^d=0$$     Is there some deeper meaning behind all this?

Suppose $A=uv^T$ where $u$ and $v$ are non-zero column vectors in ${\mathbb R}^n$, $n\geq 3$. $\lambda=0$ is an eigenvalue of $A$ since $A$ is not of full rank. $\lambda=v^Tu$ is also an eigenvalue of $A$ since $$Au = (uv^T)u=u(v^Tu)=(v^Tu)u.$$  Here is my question:     Are there any other eigenvalues of $A$?   Added:  Thanks to Didier's comment and anon's answer, $A$ can not have other eigenvalues than $0$ and $v^Tu$. I would like to update the question:     Can $A$ be diagonalizable?


I am at a loss as to how I can prove that the sum $\sum_{n=1}^{\infty }\:\ln\left(1+\frac{1}{n^2}\right)$ converges. At first I tried the ratio test, but that came out inconclusive. Then I tried it by showing that the sequence of partial sums is bounded, to no avail. If anyone could give me a hint on this, it would be much appreciated!

I have a series here, and I'm supposed to determine whether it converges or diverges. I've tried the different tests, but I can't quite get the answer.     $$\sum_{n=1}^\infty\ln\left(1+\frac1{n^2}\right)$$


I am trying to find the elements in $\mathbb Z \left [ \sqrt 2 \right ] \big /\langle5+2\sqrt 2\rangle$. $\textbf{My attempts}$: We know that there is a ring homomorphism  $\mathbb Z[X] \to \mathbb Z \left [\sqrt 2 \right ] \big /\langle5+2\sqrt 2\rangle$. Because there is a ring homomorphism $\mathbb Z[X] \to \mathbb Z \left [ \sqrt 2 \right ]$ by $X\to \sqrt 2$ which is surjective and $\mathbb Z \left [\sqrt 2 \right ] \to \mathbb Z \left [ \sqrt 2 \right ] \big /\langle5+2\sqrt 2\rangle$ is also a surjective ring homomorphism. So, there is a surjective ring homomorphism $\mathbb Z[X] \to \mathbb Z \left [\sqrt 2 \right ] \big /\langle5+2\sqrt 2\rangle$, whose kernel is $\langle X^2-2, 5+2X\rangle$. We can conclude that $$\mathbb Z[X]/\langle X^2-2,5+2X\rangle \simeq  \mathbb Z \left [\sqrt 2 \right ] \big /\langle5+2\sqrt 2\rangle.$$ Now, I am stuck. Any hints will be helpful. Thanks in advance.

That's it. I want to do this quotient,  $\mathbb Z [\sqrt{-11}] / (1+\sqrt{-11})$. My first idea was to see which elements are in the ideal:  $(a+b\sqrt{-11})(1+\sqrt{-11}) = a+ a\sqrt{-11} + b\sqrt{-11} -11b$  So I want to make and application who send this elements to $0$, and then see the Kernel of the application and apply the Isomorphism Theorem.  Any ideas?


Here's the problem I'm working on: Let k be an algebraically-closed field, and let $X \subseteq \mathbb{A}^2$ be a closed, irreducible set. Show that either:  $X = Z(0)$, i.e. $X = \mathbb{A}^2$ $X = Z(f)$ for some irreducible $f \in k[x,y]$ $X = Z(x-a,y-b)$, i.e. $X$ is a single point  Deduce dim$(\mathbb{A}^2) = 2$. (Hint: Show that the common zero locus of two polynomials $f,g ∈ k[x,y]$ without common factor is finite.) Here's what I have so far: we know every irreducible closed subset of $\mathbb{A}^2$ corresponds to a prime ideal in $k[x,y]$. This makes the first couple cases simple: If $X$ corresponds to the zero ideal $(0)$, we get case 1. If $X$ corresponds to a principal prime ideal we get case 2, because $k[x,y]$ is a UFD and in a UFD every non-zero element $f$ is irreducible iff $(f)$ is a prime ideal. The issue I'm having is I don't know how to show case 3. By Hilbert's Nullstellensatz we know single points in $\mathbb{A}^2$ correspond to maximal ideals in $k[x,y]$, so it would suffice to show that any non-principal prime ideal in $k[x,y]$ must be maximal. I don't know how to prove the hint, or quite how to use it. I know any set of $n$ points in $\mathbb{A}^2$ will correspond to an intersection of $n$ maximal ideals in $k[x,y]$. But again I don't know what to do with this. Once I have the three cases done I believe I know how to show $\mathbb{A}^2$ has dimension 2. Thanks in advance.

Suppose that $k$ is an algebraically closed field. Then what do the prime ideals in the polynomial ring $k[x,y]$ look like?   As far as I know, the maximal ideals of $k[x,y]$ are of the form $(x-a,y-b)$ where $a,b\in k$. What can we say about the prime ideals? Are there similar results? And what about $k[x,y,z], k[x,y,z,w]$ and so on. Would someone be kind enough to give me some hints or referrence on this topic? Thank you very much!


This question confuses me greatly. How do we even know that there are subgroups in the first place if all we know about $G$ is that it is a group of order $pq$, where p and q are distinct primes?  I know that by Lagrange's theorem the order of any subgroup must divide the order of the group itself (and we get subgroups of order $p$ and $q$ from that) but how do we know these subgroups exist in the first place?

Let G be a group with $o(G)=pq$, $p>q$ are primes.  Prove that $G$ has a subgroup of order $p$ and a subgroup of order $q$.  Remark: I cannot find the topic with this problem.  I have tried different methods but no one of them did not bring result. Please show how to do that. Do not use Sylow's Theorem.


I am a beginner in ArcGIS. How the resolution of original DEM (ASTER, SRTM or Cartosat DEM) can be converted to coarser and finer resolutions in ArcGIS 10.2...?

I have to analyze 8 raster layers, 5 of them are 0.5 degree resolution and the other three are 0.05 degree resolution.  Firstly, should I resample the 5 to finer resolution (0.05 degree) and if possible how to do this.  Secondly, if it is better to resample the 3 to the resolution of the others (0.5), what tool do I use to do this without changing the values of the raster. The 3 fine resolution rasters are livestock count data.  I am using ArcGIS Desktop 10.2.


I've trying to understand the meaning of the significant and negative interaction between a categorical and a continuous variable in the model I attach here. This model was the best model obtained after AIC model selection (weight=1). The response variable MPO refers to the use of the microhabitat fern by individuals, that is: MPO=0 when fern was not used and MPO=1 when it was used. The explanatory variables are treatment (categorical: RC and NT) and SVL (size of individuals, continuous).   Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']  Family: binomial  ( logit ) Formula: MPO ~ TREAT * SVL + (1 | GRID/ID)    Data: arbino5 Control: glmerControl(optimizer = "optimx", optCtrl = list(method = "nlminb"))   AIC      BIC   logLik deviance df.resid  1764.4   1804.3   -876.2   1752.4     5682   Scaled residuals:      Min      1Q  Median      3Q     Max  -1.7812 -0.0469 -0.0304 -0.0249  6.8455   Random effects:  Groups  Name        Variance Std.Dev.  ID:GRID (Intercept) 15.56    3.945     GRID    (Intercept)  0.00    0.000    Number of obs: 5688, groups:  ID:GRID, 2219; GRID, 4  Fixed effects:              Estimate Std. Error z value Pr(>|z|)     (Intercept) -11.68453    1.15979 -10.075  < 2e-16 *** TREATRC       3.09034    1.06935   2.890  0.00385 **  SVL           0.26491    0.03368   7.865 3.68e-15 *** TREATRC:SVL  -0.18267    0.04172  -4.378 1.20e-05 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Correlation of Fixed Effects:             (Intr) TREATRC SVL    TREATRC     -0.775                SVL         -0.878  0.811         TREATRC:SVL  0.747 -0.957  -0.825   I cant fully understand what this interaction means, specially considering that the main effects have positive estimates. I tried using    interaction.plot(arbino5$SVL, arbino5$TREAT, arbino5$MPO, type ="p")   to graph this interaction but it wasn't helpful as SVL has tons of points.  Could anyone help me with this? Thanks so much

I have a question about the interpretation of the coefficients of an interaction between continuous and categorical variable. here is my model:  model_glm3=glm(cog~lg_hag+race+pdg+sex+as.factor(educa)+(lg_hag:as.factor(educa)),                 data=base_708)  Coefficients:                          Estimate Std. Error t value Pr(>|t|)     (Intercept)               21.4836     2.0698  10.380  < 2e-16 *** lg_hag                     8.5691     3.7688   2.274  0.02334 *   raceblack                 -8.4715     1.7482  -4.846 1.61e-06 *** racemexican               -3.0483     1.7073  -1.785  0.07469 .   racemulti/other           -4.6002     2.3098  -1.992  0.04687 *   pdg                        2.8038     0.4268   6.570 1.10e-10 *** sexfemale                  4.5691     1.1203   4.078 5.15e-05 *** as.factor(educa)2         13.8266     2.6362   5.245 2.17e-07 *** as.factor(educa)3         21.7913     2.4424   8.922  < 2e-16 *** as.factor(educa)4         19.0179     2.5219   7.541 1.74e-13 *** as.factor(educa)5         23.7470     2.7406   8.665  < 2e-16 *** lg_hag:as.factor(educa)2 -21.2224     6.5904  -3.220  0.00135 **  lg_hag:as.factor(educa)3 -19.8083     6.1255  -3.234  0.00129 **  lg_hag:as.factor(educa)4  -8.5502     6.6018  -1.295  0.19577     lg_hag:as.factor(educa)5 -17.2230     6.3711  -2.703  0.00706 ***   lets say the equation of the model is:  E[cog] = a + b1(lg_hag) + b2(educa2*lg_hag) + b3(educa3*lg_hag) + b4(educa4*lg_hag)  + b5(pdg, centered) + other covars, where  b1 = difference in cog  with higher lg_hag among lowest education (coded as 1) b1 + b2 = difference in cog with higher lg_hag among middle education (coded as 2) b1 + b3 = difference in cog with higher lg_hag among high education (coded as 3) b1 + b3 = difference in cog with higher lg_hag among very high education (coded as 4) b5 = difference in cog with each unit increase in pdg   My question is: if my interpretation is right, how to construct confidence intervals for each effect estimate of interactions (e.g: b1+b2) from the confidence intervals of b1 and b2.


First of all, I have a new laptop Acer Aspire A315-53-386P with Windows 10. I was starting to install Ubuntu in the computer and then    I didn't understand the problem, so I investigated and I erased the secure boot and nothing. I want to erase Windows and install Ubuntu.  I read many sites, included , but they didn't helped me, all of them say me about a step 4, but my step 4 is this:    You must know that I am some beginner so really, any idea is useful.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I remember being told once long ago that there are 7 different types of spicy:  -Capsaicin (chilli) -Horseradish (Wasabi) -Ginger -Mustard -Cinnamon -Garlic -Cloves    These make a bit of intuitive sense to me (from a taste perspective), though I can't find much to back this up.     breaks them up into the following 8 botanical groups:      -Fruits, such as Cayenne pepper   -Roots and rhizomes, such as turmeric, ginger and galingale   -Seeds, such as fennel, mustard, nutmeg, and black pepper   -Barks, such as cinnamon and cassia   -Flower buds, such as cloves   -Stigmas, such as saffron   -Arils, such as mace (part of nutmeg plant fruit)   -Resins, such as asafoetida      mentions different chemicals for different types of spicy and their effects on hotness (such as capsaicin, gingerol (ginger) and allyl isothiocyanate (wasabi)), but its not very complete.    My Question:     What are the distinct chemically related spice groups? How would you describe each group in terms of flavour?

The restaurant assured me that there was no chilli in the food but it was still too hot for me. What other spices, etc. can cause the heat effect in the mouth? it was a Sri Lankan restaurant, very reputable. My host had mistakenly told the waiter that I was allergic to chilli - in fact I have LichenPlanus which me ans I am super sensitive to anything hot or spicy.


I am trying to create an array Record structure using a class in Python 3. This is my code:  class Books():     def __init__(self):         self.title=""         self.author=""  newbooks=[Books()]*4  for i in range(4):     newbooks[i].title=input("Input title of the book")     newbooks[i].author=input("Input author of the book")   print(newbooks[0].title)   However, the final line will always print the final input rather than the first. Every element in my array stores the final input and not the one entered on the correct counter. I'm a little confused as to why; any help?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


For debugging purposes I would like to get the source code of the function that has called my function.  So in the following situation:  def calling_func():     x = 123     y = x + 1     myfunc()  def myfunc():     calling_source = f()   I would like a function f, such that calling_source becomes the string  """ x = 123 y = x + 1 myfunc() """   Does such a function exist?  I'm guessing that this might be possible with something like sys._current_frames and the inspect module.

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


Let $G$ and $H$ be Lie groups with Lie algebras $\mathfrak{g}$ and $\mathfrak{h}$ and suppose $G$ acts on $H$ by automorphisms, i.e. there exists a Lie group homomorphism $\phi:G\to Aut(H)$. Consider the semidirect product $G\ltimes H$, which is again a Lie Group. Is its Lie algebra the semidirect product Lie algebra of $\mathfrak{g}$ and $\mathfrak{h}$?

Let $G$ and $H$ be Lie groups with Lie algebras $\mathfrak{g}$ and $\mathfrak{h}$. Suppose $G$ acts on $H$ by automorphisms, i.e. there exists a lie algebra homomorphism $\phi:G\to Aut(H)$. I want to find the Lie algebra of $G\ltimes H$. As a manifold, $G\ltimes H$ is diffeomorphic to $G\times H$ hence the Lie algebra of $G\ltimes H$ is the vector space $\mathfrak{g}\oplus\mathfrak{h}$. However, the groups $G\times H$ and $G\ltimes H$ need definitely not be isomorphic, so their Lie algebras need not be either. I want to describe the bracket structure on Lie($G\ltimes H$). I know that $\phi$ induces a Lie algebra homomorphism $\mathfrak{g}\to Lie(Aut(H))$, but how can I use this?


Have tried the procedure of importing the fspy zip file to blender 2.81. It failed. It does not appear in the preferences. Q: How to install fspy addon?

I have downloaded an add-on hosted on github today using this green 'Download/Clone' button. However, when I try to install it via User Preferences > Addons > Install it does not appear in the Add-on list, no matter what I do.    Q: How to download and install add-ons hosted on github properly? What am I doing wrong?


I assumed that if we quotient $Z$ by the ideal generated by 4, it will be the same as the field $F4$. It turns out not to be the case because $Z/(4)$ is not a field.  In general, when is $Z/(n) = Fn$?

Let $n \in ℕ$. Show that the ring $ℤ/nℤ$ is a field if and only if $n$   is prime.   Let $n$ prime. I need to show that if $\bar{a} \neq 0$ then $∃\bar b: \bar{a} \cdot \bar{b} = \bar{1}$. Any hints for this ?  Suppose $ℤ/nℤ$ is a field. Therefore: for every $\bar{a} \neq 0$ $∃\bar b: \bar{a}\cdot \bar{b}=1$. How can I show that $n$ must be prime ?


What Amazon EC2 instance type should I use for my application built on Rails and Node.js, I need something that can handle many concurrent request, please adise.   Note:   I will use Passenger with Nginx.

This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.


Hypothetically, if I had an idea to improve an algorithm/theorem but  I wasn't sure it was correct, or I wasn't sure it was significant or meaningful or hasn't already been published in a different form/somewhere else already or wasn't sure where to submit something like this .  is there somewhere I could submit a manuscript first privately to secure any intellectual property rights while I think about whether it is worth submitting or trying to do some more work on this and try to understand the field a bit better?

As a student, I make mistakes all the time, and stealing my idea will not face heavy retaliation. I don't mind if someone comes up with concurrent works, but I do mind if my key idea is leaked. Many graduate students in my field therefore only use pre-print services if their papers are either publicly presented or conditionally accepted. I am looking for a website that can do most of what ArXiv does, with an additional private option or limited visibility, for example an option to make the paper unindexed by search engines. This way, my paper cannot be seen for at least a few months. By doing so, I can at least claim that I am one of the first few researchers who got the idea right. And most importantly, I can privately correct my mistakes, if any. Publishing mistakes is embarrassing and sometimes harms one's career. Many mistakes will be revealed during the peer-review processes and I have a chance to correct them before publicizing. Please kindly think twice before giving ethically and "politically correct" comments like no one will scoop me, everyone will cite me, and the scoopers will be punished. At least in my field, scooping and idea-stealing is commonly observable, and big-names don't care about publicizing pre-prints because they have resources to punish the scoopers. I do understand that keeping my work private might harm the community as the information becomes less transparent. However, it could also be possible that my un-reviewed flawed works misguide the community, and a paper reviewed will benefit the society more. I personally wasted six months because of someone else's mistake in a published work.  I heard that in molecular biology there is a widely-used service to upload your research data, like protein structure and sequencing, to get a timestamp. The uploaded materials can be set to be private for a period, and fully disclosed later. A lot of people do use this function. This is not exactly what I am looking for but shares some similar ideas. If I remember correctly, there is an interesting paper studying the scooping patterns with the aid of this database.  Solutions found!  and some other university-run pre-print services do have an embargo function. Moreover,  is a widely used repository, that, unlike arxiv, only displays the newest version to the general public, although still keeps a tag on the first submitted date!


When using \sqrt, the top line of the square root symbol seems to be closer to the enclosed text for some text than for others.  It even seems to line up differently with the left "check mark" portion of the symbol.  It seems to have something to do with the dip down of the y below the baseline of the text.  You can see the difference in the following, which I'm compiling with xelatex.  \documentclass{article} %\usepackage{amsmath} same problem without amsmath \begin{document}  $\sqrt[3]{918y}$ $\sqrt{34}$ $\sqrt{34y}$ \end{document}    Is there any way to fix it so that this doesn't happen, and \sqrt compensates for the different baselines?

The following mathmatical expression is not being displayed the way I expect it to be.  \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} $3x\sqrt{y}-4-2\sqrt{y}+6x$ \end{document}     Note in the output above, the square root symbol is not "base aligned" (Don't know how to describe it better in LaTex language). I have tried the \smash command but haven't been successful. I know it shouldn't be anything hard to achieve, but seemingly I can't at the moment.   I know that there exists the \smash[b]{$math input$} and \smash[t]{$math input$}.  EDIT:    Is the code below sufficient? (The answer is NO and that is why I seeked clarification to understand the typographical effects explained below.)  $3x\mathord{\raisebox{0.5\depth}{$\sqrt{y}$}}-4-2\mathord{\raisebox{0.5\depth}{$\sqrt{y}$}}+6x$   which yields:


I read several questions similar here, but none answered my question. For example I have Vmware player installed, and I would like to launch it from terminal. vmware + TAB gives me this list:  vmware-authd              vmware-gksu               vmware-license-enter.sh   vmware-rpctool            vmware-user-suid-wrapper vmware-authdlauncher      vmware-hgfsclient         vmware-modconfig          vmware-toolbox-cmd        vmware-vmblock-fuse vmware-checkvm            vmware-hgfsmounter        vmware-mount              vmware-uninstall          vmware-xferlogs vmwarectrl                vmware-installer          vmware-networks           vmware-unity-helper        vmware-fuseUI             vmware-license-check.sh   vmware-ping               vmware-usbarbitrator         So I guess it's one of these I am supposed to launch, right? Some things I tried, but didn't give me good results: locate vmware, whereis vmware.  Is there some kind of general way (using just terminal) on how to find exact name needed to launch certain program? I know usually it's just typing program name, but as you can see in this case it does not work.

I see that apturl is installed on my computer, but I can't seem to locate it.  Can anybody tell me how I can find an installed application on this computer? I am getting very frustrated.


I am on Ubuntu 14.04. 64-bit and I am trying to install linuxband. To do I need to install the package libjack-dev, but when I do so I obtain the following message:  Some packages could not be installed. This may mean that you have requested an  impossible  situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libjack-dev : Depends: libjack0 (= 1:0.121.3+20120418git75e3e20b-2.1ubuntu1) but it is  not going to be installed E: Unable to correct problems, you have held broken packages.   The point is that I do have the other libjack-jackd2 installed for example, but when I run the ./configure for linuxband I get:  checking for JACK_MIDI_NEEDS_NFRAMES... no   Which is the only no in the list. When I run the make, it generates a plethora of undefined references (examples:  src/main/c/linuxband-player.c: In function ‘main’: src/main/c/linuxband-player.c:768:2: warning: ‘g_thread_init’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:261) [-Wdeprecated-declarations] g_thread_init(NULL); ^   or later  linuxband-player.c:(.text+0x50b): undefined reference to `jack_transport_query' linuxband-player.c:(.text+0x586): undefined reference to `jack_transport_query'  linuxband-player.c:(.text+0x5a1): undefined reference to `jack_last_frame_time' linuxband-player.c:(.text+0x615): undefined reference to `jack_last_frame_time' linuxband-player.c:(.text+0x672): undefined reference to `smf_peek_next_event' linuxband-player.c:(.text+0x6b5): undefined reference to `smf_event_is_metadata   and so on)   until it ends in:   /tmp/ccrh0o5V.o:remote_control.c:(.text+0xf01): more undefined references to `g_log' follow collect2: error: ld returned 1 exit status make: *** [target/linuxband-player] Error 1   Can someone help please?

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I know this is a bit of a long shot but I have been trying to track down this movie for many years. It was an old movie my brother and I used to watch on vhs as kids. The story was two lads try to produce the perfect girl with a potion they acquired, the keep pouring this potion and different girls appear, some fat and then one has just half a body on a dining table. The only quote I remeber was when they poured it for the final time one said "Not too much, not too little"   Not a lot to go on I know but thought I'd give it a shot.

I remember seeing an episode of an anthology horror/sci-fi show back in the ‘80s/’90s where a guy invents some goo that brings images to life.  He tries pouring the goo on a picture of a women in an adult magazine, but he can’t get the ratio correct, so the creations are monsters that he then has to get rid of.  At the end of the episode he seems to have gotten the correct ratio of goo to image figured out, but I feel like there was another twist at that point that I cannot remember.  Does this ring a bell for anyone? I’m trying to find the name of the series and episode.


I am looking for tutorials and guides to learn deep learning in remote sensing images (satellite imagery, ortophoto from airbone) in R, because I already know it quite well and would like to stay with R. I have seen that someone already searched for an answer to this question 3 years ago, but did not find it. Therefore, I would like to repeat this question because I hope that something has changed.

I am really new to Deep Learning and, unfortunately, I can't find example codes on land cover classification other than  where the author wrote a script in R for a large dataset.   The main reason that I am asking is because recently I found a few papers on Remote Sensing Image classification using Deep Learning and I was wondering if there were any R examples on that subject.  So, is there a code example, preferably a step-by-step, which I can use?  I found several git repos like  that can do Deep Learning classification with R, BUTT, I am still looking for a simple multi-spectral image segmentation method. An example of that can be found at  and I also found a similar question in  for which the answer is "use something else other than R if you can".  If I find anything that works today I will be posting a working answer.


tells a few things about this issue. But how to solve it? MikTex, XeLatex.  \documentclass[nols,a4paper,twoside,symmetric,justified,marginals=raggedouter]{tufte-book}  \usepackage{lipsum} \begin{document}  \begin{fullwidth} \lipsum \lipsum \end{fullwidth}  \end{document}

This question led to a new package:      This is a followup to . The idea is to switch between two different margin sizes. The answer provided by @godbyk work very well. However, it is difficult if you are using an asymmetric page layout (e.g. \documentclass[twoside]{article} and the fullwidth environment spans over two pages. Is it possible to make it work in these cases, too?   The memoir manual states:       Note that the adjustwidth environment applies to complete paragraphs;   you can’t change the width of part of a paragraph except for hanging   paragraphs or more esoterically via \parshape. Further, if the   adjusted paragraph crosses a page boundary the margin changes are   constant; a paragraph that is, say, wider at the right on the first   page will also be wider at the right as it continues onto the   following page.   So, how to do it esoterically ;)  MWE:  \documentclass[twoside]{article}  \usepackage{changepage}% provides the adjustwidth environment  % The following code should be used *after* any changes to the margins and % page layout are made (e.g., after the geometry package has been loaded). \newlength{\fullwidthlen} \setlength{\fullwidthlen}{\marginparwidth} \addtolength{\fullwidthlen}{\marginparsep}  \newenvironment{fullwidth}{%   \begin{adjustwidth*}{}{-\fullwidthlen}% }{%   \end{adjustwidth*}% }  \usepackage{lipsum}% provides dummy text  \begin{document}  \lipsum[1]  \begin{fullwidth}     \lipsum[2-10] \end{fullwidth}  \lipsum[3]  \end{document}


I know the program launchy from Windows (and it is also available in Ubuntu) in which I can simply enter 100/9.14 and get the result without opening a calculator. But I don't want to install the whole program just to do that...  Is there a simple command line tool I can use?

I am looking for a Calculator which can do calculations in the terminal itself without any other extra prefixes and suffixes.  For example: If I typed something like 10000-9000 in the terminal, the answer should come out as 1000.  Once again I am saying, I just need a quick calculator in terminal, without any characters added. I know if I switch to Python, it can do that but I don't want it in such a way.


a few days ago I had a asked a question regarding longer lasting batteries for a walking robot built with a Tamiya gearbox. Since the AA batteries were being depleted too fast, it was suggested that I use D cells. I would like to know would using C or D batteries instead of AA spoil the motor? Even though the voltage is same, the current is different.  Thanks.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I was running two os - Windows and Linux, but I've deleted my previous linux  distribution because I wanted to install ubuntu instead and I accidentally forgot to fix MBR and right now I'm stuck with grub rescue. And I wanted to ask, if there is any way to enter bios to set boot order to as a first priority so I can fix this? Pressing function keys, esc and delete didn't work, so I hope that maybe there is another way. Thank you for your help :)

I have a laptop with Ubuntu installed as the only OS. I also have a USB stick with a Windows 7 installation on it. I want to install Windows from the USB stick on my laptop but when I try to restart the laptop to get access to BIOS, I can't seem to find the command for it, its like it skips everything and just says Ubuntu and then takes me to the login screen.  How do I change the boot priority to USB in Ubuntu?


I have a group of N entities. Is there any way for me to get all subgroups satisfy that the number of entities in each subgroup equals to M (N>M)?  I will give an example to clarify:  I have N = 5 integer (e.g: 1,3,4,6,8). Is there any way to get all subgroups which contains L = 3 entities? Those subgroups are {1,3,4}, {1,3,6}, {1,3,8}, {1,4,6}, {1,4,8}, {1,6,8}, {3,4,6}, ...  Seems that it must be a brute-force algorithm.  Thanks & regards

I want to write a function that takes an array of letters as an argument and a number of those letters to select.   Say you provide an array of 8 letters and want to select 3 letters from that. Then you should get:  8! / ((8 - 3)! * 3!) = 56   Arrays (or words) in return consisting of 3 letters each.


How do I interpret the coefficients of a Regression with 1 continuous + 1 categorical predictor (with 4 levels - e.g., months)  Specifically, is the 1st coefficient equal to that of the 1st month or equal to the case in which there was no month??  Use this table to help explain:                          Value    Std.Error    t-value       p-value (Intercept)      0.2772475891 0.0113379058 24.4531568 8.535808e-106 I(year - 1950)   0.0009540568 0.0002015887  4.7326911  2.504407e-06 factor(season)2  0.0166704599 0.0151419786  1.1009433  2.711624e-01 factor(season)3  0.0769897290 0.0151419786  5.0845224  4.329953e-07 factor(season)4 -0.0096468223 0.0151419786 -0.6370913  5.241981e-01   As a follow-up: what is the interpretation if only some of the categorical variables are significant (and others are not)? Further, do I keep them all if this is the case?    Here is an example of the format of my data:      year season   temp.avg   ppt.avg       GDD   pdo 1   1922      1  0.4935484 0.3535484  14.40737 -0.45 2   1923      1  4.3892857 0.4542857  56.03017 -1.51 3   1924      2  7.3032258 0.5435484 106.49244 -1.76 4   1925      3 12.8533333 0.2583333 239.07739 -1.71 5   1926      4 19.7903226 0.4667742 458.50000 -1.61 6   1927      1 24.2766667 0.3146667 578.30000 -1.11  >summary(gls(ppt.avg ~ I(year - 1950) + factor(season), data = df, method = 'ML')) Generalized least squares fit by maximum likelihood   Model: ppt.avg ~ I(year - 1950) + factor(season)    Data: df         AIC       BIC   logLik   -672.3348 -602.2411 350.1674

Using R, I have fitted a linear model for a single response variable from a mix of continuous and discrete predictors. This is uber-basic, but I'm having trouble grasping how a coefficient for a discrete factor works.   Concept: Obviously, the coefficient of the continuous variable 'x' is applied in the form y = coefx(varx) + intercept but how does that work for a factor z if the factor is non-numeric? y = coefx(varx) + coefz(factorz???) + intercept   Specific: I have fitted a model in R as lm(log(c) ~ log(d) + h + a + f + h:a) where h and f are discrete, non-numeric factors. The coefficients are:  Coefficients:               Estimate  (Intercept)  -0.679695  log(d)        1.791294  h1            0.870735   h2           -0.447570   h3            0.542033    a             0.037362   f1           -0.588362   f2            0.816825  f3            0.534440 h1:a         -0.085658 h2:a         -0.034970  h3:a         -0.040637   How do I use these to create the predictive equation:  log(c) =  1.791294(log(d)) + 0.037362(a) + h??? + f???? + h:a???? + -0.679695   Or am I doing it wrong?   I THINK that that concept is if the subject falls in category h1 and f2, the equation becomes:   log(c) =  1.791294(log(d)) + 0.037362(a) +  0.870735  + 0.816825  + h:a???? + -0.679695   But I'm really not clear on how the h:a interactive term gets parsed. Thanks for going easy on me.


I read it back in junior high, and Google isn't helping. I would have read it about a decade ago, but I think it's from the seventies. From what I remember, a group of astronauts lands on a planet that has a bunch of animals on it. What they observe is that some of the animals have two limbs, some four, some six, some eight. What they eventually found strange was that animals seeming to be of the same level of evolutionary development would have such a disparate number of limbs. Looking at Earth, for example, what we might think of as "upper level" animals have four limbs. Then they notice other things that hint that the animals all may be from different planets. They conclude that they're in some kind of zoo or collection. I don't remember if they get off the planet or anything.

I would like to know the title and author of a short story I read a long time ago. It's about 3 men in space. They were sent to different planets to catch other organisms on different planets. Presumably to bring back to Earth and put in zoos. The ship they are on breaks down. They notice that the animals on the planet, instead of running away, curiously walk up to them. The animals are too friendly and easy to capture. They cannot fix the spaceship and after a few days, one of the men attempts suicide by slitting his wrists. His attempt fails. They look outside on the planet and they find their homes that they had on earth. The men realize that they were captured by aliens and that they were meant to live on this "alien zoo."


I am making a recreation of zombie siege and everything is going great.    Except for the spawning zombies. I would like to have them spawn randomly at the end of my tunnel, but the only random generators I've found online are too slow. Not to mention unreliable and inefficient.    Can anyone help me come up with a random generator that would suit my needs?

How do I summon arrows from the sky in a random position but at the same time to be inside the coordinates that I want?  For example, if I use the following, will that summon an arrow in that position?  /summon Arrow x y z   I want it to be summoned in a random X, Y, Z but at the same time within a specific position of four points:  {x1,y1,z1} & {x2,y2,z2} & {x3,y3,z3} & {x4,y4,z4}   How could I do this?


I have a photoshop illustration in mid-century modern style - essentially there are only 3-4 global colours, but they're in multiple layers with grouping and sub-groupings.  I want to be able to try out different colours, but need to keep the current structure as the groups correspond to elements that I'll need to animate at a later point.  Ideally I'd like to have them as smart-objects, and have the 2-3 main colours exposed as sort of properties of the smart object.  Is something like this possible?  I'm happy even if someone just provides links to a good tutorial!

I'm looking for a way to use one color in multiple different layers, and then be able to change that color in all the layers in one single place.  Lets say that I have four layers using #ffffff. Now I want to know what my design looks like with #ffff00 instead. How can I do this without manually changing all four layers?  I can add that adjustment layer on hue/saturation is not really what I'm looking for. What I need is something like "change all #ffffff to #ffff00."


Since the post/question editor automatically wraps long lines, it is helpful to have line numbers to see whether it's a newline or just a space, since Markdown is sensitive to whitespaces. Line numbers in post/question revision history would also be helpful (currently I can only identify lines with "inspect element").  This is not asking for line number in code listing in the rendered HTML, but instead in editor:        It should have been explained in description of .

Would it make discussing code easier if you could simply refer to a particular line or range, or am I wrong?


I seem to be able to search for tags, but not to create. I double-checked that I do have the create tags privilege.

How do I create a new tag in the mobile iOS/ Android app? This operation is currently not supported.  When I tap the tags section, a search window opens; when I type something not existing and press Done, the tag section remains blank.  Please add such option to the apps. It is specially important in case of newly launched sites.


I dont like to enter password for every software to install or other thing like it.i look for a way that can login with root user as default when ubuntu started. in fact i want login with a user that have full permission .

Here are my circumstances:   I am running Ubuntu 12.04. I have one user account.   I absolutely hate the password requirement. How do I disable this requirement such that my Linux computer will behave more like Windows in this respect? I do not want to hear that I shouldn't this because it is not secure. This is my desire so the concern of security is effectively null and void.


I've got as far as this  $$s^2=\frac{1}{n-1}\sum_{i=1}^n(x_i-\bar{x})^2=\frac{1}{n-1}\sum_{i=1}^n\left ( x_i^2-2x_i\bar{x}+\bar{x}^2\right )$$ $$=\frac{1}{n-1}\left [\sum_{i=1}^nx_i^2+\bar{x}^2-2\bar{x}\sum_{i=1}^n x_i \right ]$$ $$\frac{1}{n-1}\left [\sum_{i=1}^nx_i^2 +\left ( \bar{x}-\sum_{i=1}^n x_i\right )^2 -\left (\sum_{i=1}^n x_i \right  )^2\right ]$$ And now I'm stuck. I can use $$\sum_{i=1}^n\frac{x_i}{n}=\bar{x}$$ However can't get the result. If someone could point me in the right direction I'd be grateful.

I have quite a simple question but I can't for the life of me figure it out.  For a set of iid samples $\,\,X_1, X_2, \ldots, X_n\,\,$ from distribution with mean $\,\mu$.  If you are given the sample variance as  $$ S^2 = \frac{1}{n-1}\sum\limits_{i=1}^n \left(X_i - \bar{X}\right)^2 $$  How can you write the following?  $$ S^2 = \frac{1}{n-1}\left[\sum\limits_{i=1}^n \left(X_i - \mu\right)^2 - n\left(\mu - \bar{X}\right)^2\right] $$  All texts that cover this just skip the details but I can't work it out myself. I get stuck after expanding like so  $$ S^2 = \frac{1}{n-1}\sum\limits_{i=1}^n \left(X_i^2 -2X_i\bar{X} + \bar{X}^2\right) $$  What am I missing?  Edit: A similarly equivalent expression is often given that I also can't derive but which may be more obvious is  $$  S^2 = \frac{1}{n-1}\left[\sum\limits_{i=1}^n X_i^2 - n\bar{X}^2\right] $$


I wrote a Question on Stackoverflow and when I wanted to submit it, it says:       "Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon"   And there was only one code snippet, but already formatted in the following way: function("value1", "value2")  which looks like  function("value1", "value2")     So I was wondering, what you want from me.. It would be nice if you would mark up the part you mean with that message and/or tell that  isn't a proper code-formating if you do it like that...  or just make it a proper code-formating..  then I changed it too     `` function("value1", "value2")  (omg.. that was kinda hard to represent o.O)  Which wasn't working either.. wait... nope it worked.. but I ain'T knew it back then, and it seems that I made a typo or something so that I got the message again...  Sadly I first recognized that the Problem with  is, that I'm not allowed to put them in different rows, while writing this "question"...  ooh.. and it would be great if you could explain the difference between the   and the `` formating... cause while writing this I allready noticed some differences...  EDIT: This isn't just a duplicate of "How do I format my code blocks?", because I didn't wanted to know how to format code-blocks, I had the wish(feature-request) that you could maybe change your errormessage(the one I quoted), in a way that everybody knews what to do..  I mean I even checked on the right side, below "How to format", "what HTML tags are allowed" and when there is written that  is possible, how shall I or somebody else know that it's not allowed to use it in that way? It's not even an "Important Note"...

How do I post text so that it is formatted as code?  What do I need to do so that my code shows up properly — not escaped or removed — when posted? And how to get the correct syntax highlighting?     For more information, see "" in the .


So, as the title says: I'm not very tech savvy, but I tried Ubuntu and loved it!  The thing is: I don't know if my laptop can handle Ubuntu or if I need to do something special to make it work properly (like drivers or some other add-on).  Samsung 300e4a, currently running WIN 7.  500 GB Hard Drive, 8GB RAM, Intel(R) HD Graphics, Realtek High Definition Audio

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I've tried this.  grep -r thanks *                                      slave-iv grep: invalid option -- '@' Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information.   Here's what the directory looks like. They're log files from pidgin.  ls -1 -100000139702926@chat.facebook.com -100001138571192@chat.facebook.com -1021869012@chat.facebook.com -12120618@chat.facebook.com -1251570038@chat.facebook.com -1269333626@chat.facebook.com -1394365872@chat.facebook.com -1657581332@chat.facebook.com -211203163@chat.facebook.com -505152641@chat.facebook.com -549333601@chat.facebook.com -557177029@chat.facebook.com -573222477@chat.facebook.com -584051302@chat.facebook.com -65000319@chat.facebook.com -663869224@chat.facebook.com -664953132@chat.facebook.com -755682783@chat.facebook.com

How do you remove a file whose filename begins with a dash (hyphen or minus) -?  I'm ssh'd into a remote OSX server and I have this file in my directory:  tohru:~ $ ls -l total 8 -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?


I know that every OS has a specific directory, where a program can store data. For example in macOS there is a directory called /Applications.  Where can I store program data from a java program (multi-user) on Windows, Linux and macOS? Is there a System.property?

The difficulty is that it should be cross platform. Windows 2000, XP, Vista, OSX, Linux, other unix variants. I am looking for a snippet of code that can accomplish this for all platforms, and a way to detect the platform.  Now, you should be aware of  that user.home does not work correctly, so please do not provide me of textbook answers, I can find these myself in the manuals.


I would like to parallelize finding minimal element and its index in array. My idea was to split my array into smaller parts and to process them separately, then I just choose the least element (because I get minimal elements for each part of array). The code below works just fine, but I'm confused with execution time. Sometimes parallel implementation runs even longer than single-threaded. I have two threads on my system. What's wrong with my code? package lab4; import java.util.ArrayList; import java.util.List; import java.util.concurrent.*;  public class Main {     public static class MyPair {                  public Double val;         public Integer pos;                  public MyPair(Double v1, Integer v2) {                      this.val= v1;             this.pos= v2;          }      }          public final static int ARR_LEN=100000000;          static double get_random(double a, double b)     {         return ThreadLocalRandom.current().nextDouble(a, b+1);     }      static void minElem(double[] mas) throws InterruptedException, ExecutionException     {      int n=Runtime.getRuntime().availableProcessors();      ExecutorService executor = Executors.newFixedThreadPool(n);      int step=ARR_LEN/n;      List<Future<MyPair>> tasks = new ArrayList<>();      for(int thread=0; thread<n; thread++)      {         int a=thread*step;         int b=a+step;         tasks.add(executor.submit(new Callable<MyPair>() {                 public MyPair call() {                     int local_min_index=-1;                     double local_min_value=Double.MAX_VALUE;                     for(int i=a; i<b;i++)                         {                         System.out.println(Thread.currentThread().getId());                             if(mas[i]<local_min_value) {                                 local_min_value=mas[i];                                 local_min_index=i;                             }                          }                     return new MyPair(local_min_value, local_min_index);                 }              }));      }      MyPair res=new MyPair(Double.MAX_VALUE, -1);      for(Future<MyPair> task: tasks)             {                 MyPair temp=task.get();                 if(temp.val<res.val) res=temp;             }      System.out.println("multi-thread min-value: "+res.val);      System.out.println("multi-thread index: "+res.pos);      return;     }          static void minElem_single(double[] mas)     {      double min_value=Double.MAX_VALUE;      int min_index=-1;      for(int i=0; i<ARR_LEN; i++)         {             if(mas[i]<min_value) {                 min_value=mas[i];                 min_index=i;             }         }      System.out.println("single-thread min-value: "+min_value);      System.out.println("single-thread index: "+min_index);      return ;     }          public static void main(String[] args) {         // TODO Auto-generated method stub         double[] mas = new double[ARR_LEN];         double n1=0,n2=0,n3=0;          for(int i=0; i<ARR_LEN; i++)             {                 mas[i]=get_random(-776.998, 509.667);             }          try {              n1=System.currentTimeMillis();             minElem(mas);             n2=System.currentTimeMillis();           } catch (InterruptedException e) {             // TODO Auto-generated catch block             e.printStackTrace();         } catch (ExecutionException e) {             // TODO Auto-generated catch block             e.printStackTrace();         }               minElem_single(mas);          n3=System.currentTimeMillis();          System.out.println("multi-threaded time is: "+(n2-n1));          System.out.println("single-threaded time is: "+(n3-n2));         return;     }  }

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


This is a frequent problem I've been having with the designs of some doors. Basically, the door, to be shut must have its redstone to be powered by a lever. So when I want to enter my house I must simply turn the lever off, turning the redstone circuit off, but I'm not able to open and close it from the inside of my by rerouting the redstone? I'm really confused can anyone help me out?

In order to protect a portal in the nether I have an obsidian room with an iron door, which works off a switch in the room. The problem is that if I leave the room and someone else on the server closes the door from the inside I can't get back to that portal.  Powering red stone on the outside of the door doesn't seem to work, as the switch inside is already powering it, so I'm guessing something like an XOR gate will be the solution, however I am finding it difficult to see how to make this work in practice.


As per : "Generally speaking, instance variables are for data unique to each instance and class variables are for attributes and methods shared by all instances of the class"  >>> class Dog: ...   kind='canine' ...    ...   def __init__(self, name): ...     self.name = name ...  >>> d = Dog('Fido') >>> e = Dog('Buddy') >>> d.name 'Fido' >>> e.name 'Buddy' >>> d.kind 'canine' >>> e.kind 'canine' >>> d.kind='cat' # changed supposedly shared variable to cat >>> d.kind # OK here 'cat' >>> e.kind # Not expected output (should be cat as per documentation) 'canine'   Am I missing something?

Is it possible to have static class variables or methods in Python? What syntax is required to do this?