An object reference is required for the non-static field, method, or property 'Coin.destroyCoin()'- Unity

Im having error. I program unity 2D game and there is save system. In game you can collect coins but when player close the game and open it again the score will be the same but coins will be there again. So player can close the game and open it again and gain more coins. I did script Coin which i attached to that coin and there is this code: using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Coin : MonoBehaviour {  public int coinValue = 100;  private void OnTriggerEnter2D(Collider2D other)  {     if (other.gameObject.CompareTag("Player"))     {         Player.instance.ChangeScore(coinValue);     }  }  public void destroyCoin()  {     Destroy(gameObject); // this is where i want at the start of the game destroy coin  }  }  Then i have another scirpt atached to player and there is code that move player, change score and there is also code where the player loads score, level and also that code which should at the start check the bool if a coin was picked up in past: // Start is called before the first frame update public void Start() {     //load player     PlayerData data = SaveSystem.LoadPlayer();      level = data.level;     score = data.score;     coinPicked = data.coinPicked;      if (coinPicked == true)     {         Coin.destroyCoin(); // here is that error which i want check if a coin was picked up and if yes then call coin script     }      text.text = score.ToString();      //score manager this     if (instance == null)     {         instance = this;     } } //coin pickup 1 public void ChangeScore(int coinValue) {     score += coinValue;     text.text = score.ToString();     coinPicked = true; } //coin pickup 2 public void ChangeScore2(int coinValue2) {     score += coinValue2;     text.text = score.ToString();     coinPicked2 = true; } //take 200 when falling public void DeleteScore(int deadValue) {     score += deadValue;     text.text = score.ToString(); }  //save player public void SavePlayer() {     SaveSystem.SavePlayer(this); }   everything works except that delete coin at the start. Unity gives me this error: Assets\Scripts\Player.cs(98,13): error CS0120: An object reference is required for the non-static field, method, or property 'Coin.destroyCoin()' Can someone help? Thanks


I have been assigned the task of unit testing a class that I never worked directly on with JUnit, and am strictly forbidden to change the code in the package.  This is usually no issue, since most of our unit testing is just for functionality and input/output consistency, which can be done simply by running routines and checking their return values.  However, occasionally there is a need to check a private variable within the class, or directly edit a private variable to check some internal behavior.  Is there a way to gain access to these, whether through JUnit or any other way, for the purpose of unit testing without actually changing any of the code in the original source package?  And if not, how do programmers handle this issue in the real world where a unit tester may not be the same person as the coder?


. This is unfortunate for public data. I know I can split binary files with dd.  What I would like to do is split them all into 99MB files but here's the catch, I don't want to split on a line -- only a newline. Is there an easy way to split up files into chunks based on their size, but not to mid-line.  Example  #/bin/sh for i in $(seq 1 1000000); do   echo "This is a test sentence." >> file done;   Now file is 26MB. I would like that file to be split into 1 MB chunks, but never split anywhere but only a line-boundary (\n).


ASP.NET : Check for click event in page_load

In c#, how can I check to see if a link button has been clicked in the page load method?   I need to know if it was clicked before the click event is fired.


This was after apt update, apt-dist-upgrade:  root@_____:~# cat /etc/os-release  NAME="Ubuntu" VERSION="16.04.6 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.6 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial  root@_____:~# do-release-upgrade  Checking for a new Ubuntu release No new release found.


Why am I getting cgi-sys/defaultwebpage.cgi coming up when I browse my webpage?

I've recently set up a website with a smaller hosting company. The plan has a dedicated IP.  They sent me emails to say it's all set up, but now their support channels are all unresponsive even though they say it's open 24 hours.  In the File Manager in the cpanel I've put an index.html file in the public_html directory. But when I point my browser to the IP address given to me, it comes up with the cgi-sys/defaultwebpage.cgi page.  What is the problem?  I haven't set the name-servers for my domain yet, but that shouldn't be a problem because I am using the IP address in the browser.  Note: I don't think I have access to ssh.


How many "transitive relation" can be formed by A×A

If A is non-empty set then how may " transitive relation " can be made by A×A ?


Is there a similar timeout function in Powershell as in CMD prompt?

I would like to have a function that pauses for say 60 seconds to wait for user input, if there is no user input, then continue to run, or if there is user input, read the input and continue to run. This is for a continuously running environment with minimal manual intervention. However, sometimes it is desirable to be able to handle human intervention (for example if some problem within the system happened) so that the script can be paused, and after the problem has been solved, can resume.  Timeout seems to suit this purpose, in CMD, but does anybody know of a similar function in Powershell? Thank you!


Where can I ask a question regarding programming software that creates electronic circuits?

I have a question about how long it might take to program a piece of software that creates electronic circuit schematics and stuff. In order to answer the question, one needs to know how logic gates are built and how multiple levels of algorithmisation can save a lot of time and effort. Should I ask on , , or ?


From a deck of 52 cards, extract 10. In how many combinations do you get at least one ace?

If from a deck of 52 cards, I extract 10. In how many combinations do you get at least one ace?  I have come up with two possible answers, but I don't know which one is the right one and why.  So one is $$4{51 \choose 9}$$  the reasoning is that first I extract an ace from the four that there are, and then I have ${51 \choose 9}$ combinations for the other 9 cards.  The second is  $${52 \choose 10} - {48 \choose 10}$$  reasoning that there are ${52 \choose 10}$ total combinations of ten cards and I subtract ${48 \choose 10}$ combinations without any aces.  So from other questions it seems that the first one is the correct answer, but why would the second one be wrong?  Thanks for the answers.


When Legion Commander starts dueling against an enemy hero, do passives triggers during combat? And what about illusions (Manta Style, Chaos Knight, Phantom Lancer, etc.) and wards (Venomancer, Shadow Shaman, etc.), do they make combat damage during duel?


How to interpret the lasso selection plot

I did lasso selection using lars::lars(), then I got this plot. I have no idea how to interpret it:   Could anyone provide a brief explanation? Why does it plot standardized coefficients against |beta|/max|beta|?


Probability density function for a function of a random variable

List item  I would like to verify that I'm applying the formula for finding pdf's of functions of random variables correctly.  I'm given a random variable $X$ with a uniform distribution on the interval $0 \le x \le 2\pi$ and want to find the pdf of $Y = \sin(X)$. Attempt at a solution:  The pdf for the uniform distribution is given by  $$f_{\small{X}}(x)=\begin{cases}\frac {1} {b-a}&\text{if } x \in [a,b]\\0&\text{otherwise}\end{cases}$$ To obtain the pdf of $Y$, I apply the change of variables formula, doubling the RHS of the equation since the change is not monotonic but both halves transform identically because of symmetry:  $$f_{\small Y}(y) = 2f_x(g^{-1}(y))\left|\frac {d} {dy}(g^{-1}(y))\right|\\=2\frac1{2\pi}\left|\frac{1}{\sqrt{1-y^2}}\right|=\frac1{\pi\sqrt{1-y^2}}$$  Therefore, the pdf of $Y =\sin(X)$ is given by  $$f_{\small Y}(y)=\begin{cases}\frac {1} {\pi\sqrt{1-y^{2}}} &\text{if } y < 1\\0&\text{otherwise}\end{cases}$$ Did I compute the pdf of $Y$ correctly?  In particular, how do you find the support of $Y$?  I just looked to see where the function was defined and found that $|y| < 1$.  Thanks for your help and insights.


I found the following unknown icon on the menu bar of my Mac. Has anyone an idea what it means and how it got there ? Nothing happens if I click on it, and I can't move or remove it.


How can we find and categorize the subgroups of $\mathbb{R}$?

$\newcommand{\R}{\Bbb R}\newcommand{\Q}{\Bbb Q}\newcommand{\Z}{\Bbb Z}$ What are all the subgroups of R =  $(\R, +)$ and how can we categorize them?   I started thinking about this question last night after looking at the structure of the cosets of $\R / \Q$ . I did some searching on SO and google but didn't find anything giving a full categorization (or even a partial one) of the subgroups of $\R$.   Here are the subgroups that I came up with so far:   $\Z$ (there are no finite subgroups and $\Z$ is the universal smallest subgroup I think) n$\Z$ eg 2$\Z$ all even numbers a$\Z$ where a is any real number, including a in $\Q$ which "nest" nicely in each other $\Z$[a] - group generated by adding one real a to $\Z$ n$\Z$[a] which equals $\Z$[na] and so is just a case of the one above   eg a numbers of the form a/2b or similar subgroups such as a/3b, a/2b7c etc $\Q$ $\Q$[a] $\Q$[a in A] where A is a subset of $\R$ - could be finite, countable or uncountable. Group generated by adding all elements of A to $\Q$ eg  $\Q[\sqrt2]$   It is clear that the "n$\Z$ subgroups" n$\Z$ and m$\Z$ are related according to the gcd(n,m)  Also when H is a subgroup of R looking at the structure of the cosets of R / H. eg for H any of the Z subgroups we get R / H homomorphic to [0,1) or the circle. For H one of the Q subgroups it is more complex and I currently don't have ideas on the larger subgroup cosets  I am not clear how "big" a subgroup H can get before it becomes the whole of R. I do know that if it contains any interval then it is the whole of R. But what about H with dimension less than 1?  I am aware of one question on SO about the proper measurable subgroups of R having 0 measure , one on dense subgroups  and one on the subgroups of Q  but that is all my searching found so far.  Why is this question interesting? 1) there seem to be so many subgroups and they are related in many groupings 2) I think the subgroups related to the structure of the reals in some subtle ways 3) I know the result for the complete classification of all finite subgroups was a major result so wondering what has been done in this basic uncountable case.  If anyone has any insight, intuition, info, papers or theorems on subgroups of R and how they are interrelated that would be interesting.


How can a human be viable in an Underdark-focused game?

A group of friends and I started playing a campaign that's entirely spent in the Underdark. My character is a level 3 variant human Battle Master fighter, and is the only one who doesn't have darkvision. He relies mostly on Dex but also has good Str. His current gear is pretty much some leather armour and 2 scimitars. I have 6 torches left for a long journey through the Underdark. The drow captured me and stole all my initial gear.  What can I do to overcome this handicap and play alongside a party of characters with darkvision? I don't want to spend the entire campaign always rolling at disadvantage. Torches are a temporary solution, but they don't last forever and I will eventually run out of them. There's no wood, so no way to make more fire.  The campaign is Out of the Abyss.


Why the size of array of pointers cannot be found inside function call?

Why this function works  #include <stdio.h> #include <string.h>  void print_array(char **array, size_t size) {     for (int i = 0; i < size; i++) {         printf("%s\n",array[i]);     } }  int main() {      char *base_data[] = {         "sample 1",         "sample 2",         "sample 3"     };       print_array(base_data,sizeof(base_data)/sizeof(char*));      return 0; }   But this code does not  #include <stdio.h> #include <string.h>  void print_array(char **array) {     for (int i = 0; i < sizeof(array)/sizeof(char*); i++) {         printf("%s\n",array[i]);     } }  int main() {      char *base_data[] = {         "sample 1",         "sample 2",         "sample 3"     };       print_array(base_data);      return 0; }   The program crashes after printing first value. No matter what I try, I am not able to find the size of the array of pointers to strings inside a function call. Most of the stackoverflow examples also pass the size of array to the functions. What happens to an array of pointers to strings when its passed to functions?


How many suggested edits in a day is too many?

There is currently a user doing a large number of retags, and has currently suggested over 100 tag edits in the last few hours (about one every 30-45 seconds).  I appreciate enthusiasm, and correctly tagging things, but isn't this going a bit overboard?    Assuming the edits are all valid, is it really such a good idea to allow this?  For one thing, it's annoying to have a stream of questions all bumped up to the top of the Active queue for over an hour, and the Suggested Edit queue has been sitting at 40+ items for the same time period, but is it really hurting anything either?


Why does a black hole have a finite mass?

I mean besides the obvious "it has to have finite mass or it would suck up the universe." A singularity is a dimensionless point in space with infinite density, if I'm not mistaken. If something is infinitely dense, must it not also be infinitely massive? How does a black hole grow if everything that falls into it merges into the same singularity, which is already infinitely dense?


I have several windows drives, allthough I'ḿ not using Windows anymore but too many data on it. Is there a way to convert the filesystems without losing the data or how to fix this issue?  I have 4 drives, 3 of them are mounted, one isn't and gives me following error:  Error mounting /dev/sdh2 at /media/andreas/photo's: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdh2" "/media/andreas/photo's"' exited with non-zero exit status 32: mount: unknown filesystem type 'exfat' (udisks-error-quark, 0)


I am fairly new to the Linux world, and i was wondering how could i mount my google drive using google-drive-ocamlfuse only when i login with my personal account.  From what i understand i can not use fstab, since it contains system-wide file system definition and i do not want everyone using my computer to have access to my personal google-drive.  I am looking for something similar for network shares and other mounts which are to be used only by the the specific logged on user?  Thanks,


Writing a lab manual, need to know how to make the DC voltage symbol from a multimeter

I am working on a lab manual  for my school and I am getting to the circuits labs. I want to tell the students what symbol on the multimeter to use, it is a V with two lines over it, top line is regular, and the bottom line is dashed. I've included a picture. . Thanks!


Prove $ \lim\limits_{n\to\infty}\int_0^1 f(x)g(nx)\,dx=\int_0^1 f(x)\,dx\int_0^1 g(x) \, dx $

Let $f$ and $g$ be a real valued continuous functions on $\mathbb{R}$ such that $f(x+1)=f(x)$ and $g(x+1)=g(x)$ for all $x\in \mathbb{R}$. Prove that $$ \lim_{n\to\infty}\int_0^1 f(x)g(nx)\,dx=\int_0^1 f(x)\,dx\int_0^1 g(x)\,dx. $$


How many partitions can have a 'boot' flag?

I'm trying to correctly partition my hard-drive to facilitate a dual-boot setup Windows 10/Linux Mint 18.3  I'm using a brand new laptop and completed the out-of-box-experience so Windows 10 was installed. I then inserted the Gparted live CD and rebooted.   I shrinked down /dev/sda3 which was the ntfs windows partition to 100GiB with the msftdata flag. This process left me with approximately 350GiB unallocated space.  I selected the un-allocated space and created 3 primary partitions (the other options were grayed out):  One of these partition with Fat16 Filesystem of 150MiB I gave the boot, esp flags. The other two partitions were linux-swap and ext4 based partition for general storage.  The question that is bothering me is:  Is it ok to have two separate partitions on the one hard drive with the boot,esp flags? One partition for windows boot and one partition for Linux boot?


Reputation Graph Footer mis-aligned in Internet Explorer

In Internet Explorer 11, the dates below the reputation graph footers are mis-aligned. This is happening for all sites across the network.      Internet Explorer Version: 11.0.9600.19236


Why does program return a seg fault when I input a pointer to a string literal but not when i input a pointer to an array?

When i pass the char * literal to trim() it seg faults but when I send an array pointer it works why is this not working?  int main(void){     /* If instead I have a char s[100] = "Hi      ";       * it works as intended so why does it not work when i pass this.*/     char *s = "Hi       ";     printf("<%s>\n", s);      trim(s);     printf("<%s>\n", s);  }  /* Trims all white-space off at end of string. */ void trim(char *s){     while (*s != '\0') ++s;      --s;     while (*s == ' ') --s;     *(++s) = '\0'; }


Supervisor asking me to list a co-author who has literally done nothing

I am in the final stages of writing a paper to submit at an IEEE conference. I am the primary author, in the sense that I did most of the work and most of the writing. I have three other co-authors who have contributed a significant amount of advice and proofreading (one of whom is my supervisor).  Last week, my supervisor told me I should add person X as a co-author (in addition to myself and my three existing co-authors). I have never met X and they have contributed absolutely nothing. It's not even clear if X has looked at the work we have done!  My response was as follows: "Fine, if X at least looks at section Y to make sure it has no errors, I'll put them as the last author." This has not yet happened, with less than a week to go before the deadline. My supervisor is still insisting that I add X as an author.   What should I do in this circumstance?


Is it possible to make a partition devoted to the softwares installed?

I had to reinstall my OS.  One the most deseagreable part is to reinstall the softwares in it (mongo, eclipse, and so on). That's why I want to know if I can make a partition dedicated to softwares? And will it be efficient? I mean, in default installation, there are many files that go to /ect, /bin, in the root system actually.  So, if I had to reinstall my OS once again; or other case change for Kubuntu, Xubuntu; will I have to reinstall the softwares anyway? Because it will be dependent of /etc's files in the root, or it will have a "parallel" system organisations with binaries files in the softwares dedicated partition?


Error while installing, upgrading or autoremove: insserv warning: script 'K01runlcactivator' and 'runlcactivator'

I am seeing  errors while trying to install Inkscapeor install any software for that matter.   When I try to use sudo apt-get install language-pack-en-base it shows the same  .   I also tried sudo dpkg-reconfigure locales and then tried to installInkscape - but it is not working.  abhilash@abhilash-Inspiron-3542:~$ sudo apt-get install inkscape [sudo] password for abhilash:  Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   gawk libgsl2 libgtkmm-2.4-1v5 libgtkspell0 libimage-magick-perl   libimage-magick-q16-perl libmagick++-6.q16-5v5 libwmf-bin python-numpy   transfig Suggested packages:   gawk-doc pstoedit dia | dia-gnome libsvg-perl libxml-xql-perl   python-uniconvertor ruby gsl-ref-psdoc | gsl-doc-pdf | gsl-doc-info   | gsl-ref-html imagemagick-doc gfortran python-dev python-nose   python-numpy-dbg python-numpy-doc xfig The following NEW packages will be installed:   gawk inkscape libgsl2 libgtkmm-2.4-1v5 libgtkspell0 libimage-magick-perl   libimage-magick-q16-perl libmagick++-6.q16-5v5 libwmf-bin python-numpy   transfig 0 upgraded, 11 newly installed, 0 to remove and 158 not upgraded. 8 not fully installed or removed. Need to get 0 B/16.9 MB of archives. After this operation, 107 MB of additional disk space will be used. Do you want to continue? [Y/n] y Setting up util-linux (2.27.1-6ubuntu3.3) ... insserv: warning: script 'K01runlcactivator' missing LSB tags and overrides insserv: warning: script 'runlcactivator' missing LSB tags and overrides insserv: There is a loop between service plymouth and procps if started insserv:  loop involving service procps at depth 2 insserv:  loop involving service udev at depth 1 insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true!     insserv:  loop involving service networking at depth 4 insserv: There is a loop between service plymouth and urandom if started insserv:  loop involving service urandom at depth 4 insserv:  loop involving service mountdevsubfs at depth 2 insserv: There is a loop at service runlcactivator if started insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: There is a loop between service runlcactivator and dns-clean if started insserv:  loop involving service dns-clean at depth 1 insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header dpkg: error processing package util-linux (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  util-linux E: Sub-process /usr/bin/dpkg returned an error code (1) abhilash@abhilash-Inspiron-3542:~$    I have been told -      the problem is that you are stuck at the boot sequencing.    I see when I viewed the file [runlcactivator]  Now please suggest how do I "completely purge the program and scripts from /etc/init.d/ and /etc/rc? files." - as is suggested in the answer? What is the command line to do this?   I am not familiar with codes, so if instructions are specific I can just follow them as it is. Thanks for helping!


How to enforce, from the calling program, an upper limit to the time spent in a function?

I have some functions which may take a longer time to execute, in which case I would like to cut them short (in such a case I do not care about what happens in the function and the consequences to stop it short)  Since these functions are not all mine, I would like to exert this control from the calling program and not implement a check within the function itself (it would be a solution if there is a loop in the function where I could check the time spent, or use timeouts on some calls which support it etc.).  In other words I do not want to change the function.  Is such a mechanism available?  My immediate idea was to start a thread with the function as worker and periodically check if the thread is still live, killing it if it has not came back after the limit time. Unfortunately I learned that killing a thread in a non-cooperative way is not possible (that would be a solution for a process, though but using a process is not practical because it would complexify the existing shared objects).  EDIT: please note that this is not a duplicate of , the solutions there either point to a cooperative shutdown, or process vs thread. Both are addressed in my question. I slightly modified the title to emphasize where the control is.


2 different OS in 2 different boot modes

Maybe 3 years ago I have bought my laptop where I had default OS Windows 10. I also wanted to have Ubuntu OS as dual-boot with Windows 10. But I had no experience with installation OS so I have installed Ubuntu in different boot mode. Now I have Windows 10 which is installed in UEFI boot mode and Ubuntu 20.04 which is installed in Legacy boot mode. Both OS are installed in the same SSD (I have only one external disk). Is there some way how I could change boot mode on Ubuntu to UEFI where I could then using GRUB choose which OS I will boot without regular switching from one boot mode to another ? I would like to do that without reinstalling the whole OS. Thanks.


What to do when people with very high rep are completely changing the meaning of a question?

First this question is not a dupe of:    Though the upvotes show it's an issue: I'm not seeing things.  My question concerns specifically someone with 20K+ rep being eligible for the "moderator" status (you could vote for him on SO as a moderator, which I didn't).  I've seen post where that person changed the entire question so that it fits an answer "because then it adds value". The logic behind the edit being "so it gets referenced in Google (and is searchable directly in SO) and if someone search for the question that fits the answer, then we have an answer".  I don't disagree that from that standpoint it seems to make some sense.  But the problem is that it makes the original poster very uncomfortable: why would such a poster come back to SO if it's to see his question completely distorted?  Also, why would people answering then getting zero votes or downvoted be motivated to answer more questions when they know the question may get completely modified?  In another case, and this has been the subject of a post here on meta that generated some heat, same 20K+ rep person simply didn't understand the question. So he modified it to a question where he portrayed the user as making something illegal or questionable and the user got downvoted to oblivion. The user left SO and went ballistic on Usenet and on blogs about SO.  This is not good in my opinion because, sure, you completely rewrite questions to make it fit your own view of the world but it's detrimental to existing SO users.  Both to the original poster who asked the question and to people answering the correct question (with the correct meaning, before the crazy edit took place completely changing the question) and to commenters, which often go crazy in comments because they dislike the edit.  That user never edited one of my question, but I was reading a weird series of 20 comments and understood that obviously there was an issue at work and when I saw the name of the editor I thought "oh no, it's him once again".  So my question is simple: what do I do when I think that a user with 20K+ rep is acting in an unacceptable manner, frequently entering into arguments in comments with various SO users and often re-inventing questions?  In other words: what has been put in place in the SO platform to prevent people at the very top (being eligible for meta-moderator status, I don't know how you call this) from subverting the platform?  We could push the logic a bit further: why not write random question, random answers, random upvotes and then after a few days rewrite the question so that it matches the answer with the most vote?  Isn't there really a very serious issue here?  Once again, it's obviously not the first time the subject comes up, the problem is so obvious that it has prompted question here like "mark a user as not being able to edit your question" that I linked to above and it also prompted several blog entries criticizing SO.  I don't dare to flag his comments defending his own crazy edits because I'm thinking "maybe he's meta-moderator now, so he'll see my flag and start editing my own questions to make me look a stupid poster".  It's even worse than that: right now I'm thinking "but why ask question as to how to deal with this and make stackexchange a better platform, because my post may be edited anyway to completely distort my question?".  That is how bad it is. I found it (and it's just an opinion) a bit disgusting.  To make a bad analogy, it's a bit like when you give to much power to someone who turns out to be a bad cop. This is an issue. It has to be dealt with. But it is very difficult to deal with a bad cop once he's near the top of its sphere of influence.


Dynamically adding a form to a Django formset

I want to dynamically add new forms to a Django formset, so that when the user clicks an "add" button it runs JavaScript that adds a new form (which is part of the formset) to the page.


Is there a way to upgrade from 12.04 desktop to 14.04 beta directly?

Is there a way to upgrade from 12.04 to 14.04 directly, maybe through terminal? If so, could you tell me? I don't want to wait till 14.04 comes out but I don't want to upgrade three times to get it.   I've had 13.10 on another machine. The speed difference is noticeable, even though this machine had Ubuntu preinstalled and is quite speedy with 12.04.  Thank you in advance. Any answer is appreciated.


Limit Question: lim theta---> 0 sin theta / 3 theta + tan theta: When you multiply 1/ cos theta by 1/ theta why doesn't your value change?

I am having a hard time understanding why the 1/cosine term does not change to lets say cosine theta squared? Can someone explain why?


Need to generate list that parses together pieces of other lists

This should be pretty easy, but every time I come up with something it loops over too many times and makes the list extremely long.  What I want is an output that looks like this:  output = ['http://data.neonscience.org/api/v0/data/DP1.00095.001/KONZ/2018-01', 'http://data.neonscience.org/api/v0/data/DP1.00095.001/KONZ/2018-02]    I have the below information. Ideally I'd like to be able to add to any of these lists and create more urls from there.   SERVER = "http://data.neonscience.org/api/v0/data/" SITECODE = ["KONZ","KONA","DCFS","WOOD"]  PRODUCTCODE = ["DP1.00095.001","DP1.00040.001","DP1.00041.001","DP1.00094.001"] DATES = ['2018-01','2018-02','2018-03','2018-04','2018-05','2018-06']  SERVER = "http://data.neonscience.org/api/v0/data/DP1.00040.001/KONZ/" SERVER2 = "http://data.neonscience.org/api/v0/data/DP1.00040.001/KONA/" SERVER3 = "http://data.neonscience.org/api/v0/data/DP1.00040.001/DCFS/" SERVER4 = "http://data.neonscience.org/api/v0/data/DP1.00040.001/WOOD/"  x = (SERVER  + PRODUCTCODE[i] + '/' + SITECODE[i] + '/' + DATES[i])  gets = []


Path-connected components of the configuration space $F_n(R^d)$

Let $X$ be a topological space, for $n \geq 1$ we define     $F_n(X) = \lbrace{ (x_1,...,x_n) \in X^n | x_i \neq x_j for i \neq j \rbrace} $ the configuration space of n points of X.  My question is about the path-connected components of $F_n(\mathbb{R}^d)$.  I know that :   1- for $n=1$, $F_1(X) = X$ and hence $\pi_0(F_1(\mathbb{R}^d)) = \pi_0(\mathbb{R}^d) = \lbrace \mathbb{R}^d \rbrace \: \forall d \geq 1  $  2- $\forall n \geq 1$, $F_n(\mathbb{R}) = \bigcup \lbrace x_i < x_j \: or \: x_i > x_j \: | \: \forall \: 0 \leq i,j \geq n \rbrace $  Hence $\pi_0(F_n(\mathbb{R})) =   \lbrace x_i < x_j \: or \: x_i > x_j \: | \: \forall \: 0 \leq i,j \geq n \rbrace   $  I am unable to see how the path-connected componnents of $F_n(\mathbb{R}^d$) look like for all $n \geq 1$ and for all $d \geq 1$...


Let G be a group s.t $g^3=e$ for all g in G. Prove that $G$ is abelian.

Let G be a group s.t $g^3=e$ for all $g$ in $G$. Prove that $G$ is abelian.  From here I have got $(ab)^2=(b^2)(a^2)$ & $(ab)^3=a((ba)^2)b$ Then what??


How do I display a specific field from an entity reference within a custom block template?

I have a custom block type that only has one field: an entity reference to my news content type. I am trying to display two specific fields from the news content type but can't figure it out.  This entity reference field has a machine name of field_featured_news  I have created a file with the filename block--block-content-testnews.html.twig  In this file, I can use {{ content }} and it will render the full entity (based on the settings in Manage Display.   However, I can't access the image field that is within the news content type. The field's machine name is called field_featured_news_image.  I have tried adding the following to no avail:  {{ content.field_featured_news_image }} {{ content.field_featured_news_image.0 }} {{ content.field_featured_news_image.entity.uri.value }}  and many others.  Only {{ content }} will display anything but it's the entire news node.


So, my laptop died. I have an old netbook. It has Ubuntu 10.04, and the upgrade manager says I can install 12.04. My question is, will this netbook run smoothly with it? Also, will it support newer versions?  The netbook is a Point of View Mobii 9040, with these specs:   Processor:Intel Atom N450 1.66 GHz Chipset:Intel NM10 Express Chipset Graphics chipset:Intel GMA 3150 Storage:250GB SATA  RAM:1GB DDR2 SDRAM LAN:RJ45 10/100Mbps   Thanks!


What happened to the "Merge Vertices" that existed in version 2.82 Edit Mode - Vertex drop-down menu?

Version confirmed with existing option: 2.82.7, Versions confirmed to omit previously existing option: 2.91.2, 2.93.0 Alpha, Steps to reproduce:  Load: Factory Defaults, Select: Cube, Switch to: Edit Mode, Select: All, Left Mouse Click: Vertex (Menu drop down),  Newer versions do not have the "Merge Vertices" option in the drop down menu, while key pressing "M" does still invoke the option as before. As a beginner, I always use the drop-down menu options as I slowly learn shortcut keys, as such, it is best to have as many options available in the menus. So, is this an ill-fated new feature or bug?


I am reading a file with one paragraph at a time seperated by a newline.  Line 1 Line 2 Line 3  Line 4 Line 5 Line 6   Here I read Lines 1, 2, 3 and then Lines 4, 5, 6.  while (there are still more paragraphs) {   String paragraph = new Scanner(new File("testdata.txt")).useDelimiter("\n\n").next(); }   The delimeter "\n\n" is to identify paragraph and not a line. Now, the delimiter can change into "\r\n\r\n" in few systems and "\n\n" in other few. Is there any way to identify it at runtine and use it? I am looking for something like:  String delimiter = getNewLineCharYourself(); String paragraph = new Scanner(new File("testdata.txt")).useDelimiter(delimiter).next();


Walking the ball across the line for a goal

On occasion you see sometimes players try this tactic where they squeeze the ball between two feet and hop across the goal line in an attempt to score. This is usually kids learning the game or adults goofing around.  Is this legal or must a ball be kicked across the line to count as a goal?


Does $Z[x]/(3,p(x))$ equal to $Z_3[x]/(p(x))$ for all integer coefficient polynomials?

Let's define the polynomial $p(x)$ as one of the following polynomials:  $x^n-1$ or $x^{n-1}+x^{n-2}+...+1$ Does  $Z[x]/(3, p(x))$  mean that we take the modulo of the elements of $Z[x]$ according to $p(x)$ and then take the modulo again according to 3? If so, does that mean  $Z[x]/(3,p(x))=Z_3[x]/(p(x))$? Also does it make any difference if the polynomial differs? I mean is it true for any polynomials?


Looking for the name of a card-battle cartoon show

Looking for a show about a group of three kids/teens who, using cards to change into monsters, fight and recover relics. I believe there are two or three other groups of three also trying to get the relics.  In the main group there are two boys and a girl. The boys were both white, one is from a farm and I don't know where the other is from. The girl was dark skinned and either black or blue hair. The three travelled around the world using a red plane.  I think they only use one monster primarily. The girl uses a monster created from gas and at one point is green. One of the boys uses a metal robot most of the time and at one point is given another better version of that card to use. I believe the episode for this was called something like green with envy.  All I'm getting from the internet is that it may be Chaotic, but that isn't the right show.  I also believe the girl's name was Mai and one of the boys were Ky, but I may be wrong.


Programmatically obtaining Big-O efficiency of code

I wonder whether there is any automatic way of determining (at least roughly) the Big-O time complexity of a given function?  If I graphed an O(n) function vs. an O(n lg n) function I think I would be able to visually ascertain which is which; I'm thinking there must be some heuristic solution which enables this to be done automatically.  Any ideas?  Edit: I am happy to find a semi-automated solution, just wondering whether there is some way of avoiding doing a fully manual analysis.


Ideals the same after localization by associated primes

I am reading a proof of Serre's criterion for normality that takes for granted the following fact:  Let $I \leq J$ two ideals of a Noetherian ring $R$. If $I_p = J_p$ for every associated prime $p$ of $I$, then $I=J$.  Can someone help me out on how to argue this?


Jquery Not working in returned ajax data appended to a Div

I am not really sure if I have asked the question correctly.   The problem is i have Page 1 that calls Page 2 with jQuery ajax.  Then Page 1 puts the returned data into a div with using .html(data).  This part works perfect however when  want to create a .click function to a element in loaded div code it does not perform any action. my code looks like this.  Page 1:

     Page 2 Code

Test 1

Test 2


how to fix "object has no uniform scale"?

I try to unwrap uv on first ever 3d model i made in blender which is Baymax., then that message shows up in upper right corner of screen. The uv map looks so grotesque. I already tried remove double but nothing changed.  Help me pls.  Thanks.  Im noob at blender btw.


Compute the galois group of the splitting field of $x^5+1$

The roots of this polynomial are $(-1)\zeta^n$. Where $\zeta$ is the 5th root of unity.  So the splitting field should just be $\mathbb{Q}(\zeta)$.  This has galois group $\mathbb{Z}/4$ since it's just a cyclotomic extension.  Is this correct?  Source:


Position epigraph at the end of the page

I want to create a epigraph. But the package epigraph position it at the beginning of the page. I want to position the epigraph at the end of the page. Can someone help me ?


How to estimate the growth of the following sequence.

$a_1=1,\forall n\ge 2(a_n=\sqrt{n+a_{n-1}})$.I want to find the smallest natural number n such that $a_n>10$.I find that the sequence is increasing,and I guess:For natural number k,there are only 2k items $a_{j+1},a_{j+2},\cdots,a_{j+2k}$ such that $k\le a_i<k+1,i=j+1,j+2,\cdots,j+2k$，but I have no idea how to prove it.I tried Mathematical induction but I failed ,Please help!I found the answer is 91  using python,but I can't prove it yet.I think the problem differs from  i focus on the specific properties while that problem cares about asymptotic behavior.


How to change default permission level choice when share a document?

We are using SP2013 on-premise. On a site collection there is a document library. There are several users with "Manage Permission" permission. Based on their need, they will change the permission on individual documents (permission inheritance is broken).  However, when they try to share the document to other users, the default permission level choice is always "contribute". Can we change the default choice to be "read only" and the "send email invitation" always off? It is because the permission level part is always hided. User need to click the "SHOW OPTIONS" to see the level choice. Users may grant the contribute permission level by mistake (and send email out).


How to resize transparent PNG without causing black background? - PHP GD

The code below replaces the transparent background with a black background.   imagescale() seems to cause it.   How can I get this to display without the black background after using imagescale()?  $im = imagecreatefrompng('ipad.png');     header('Content-type: image/png');    $im = imagescale($im, 300);  imagepng($im);


Like as bibtex is there anyway to import footnote from one tex files. What I come up with is   %--------------------------------------------Footnote references from label \makeatletter \newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark} \makeatother   and put a level in each reference   here\footnote{\label{note1}This is the labeled footnote}   and furthermore call the footnote with the label name as follows   Here\footnoteref{note1}   By adding like this footnote automatically visible in the first case. This approach is appropriate if I want to refer same footnote in multiple places. What I basically want is like as bibtex add the footnote with specific ID or reference name ? Thanks and any suggestion will be greatly appreciate.


trying to advance from java to Python with no luck

so i want to write this simple java code in python, but i cant, i want to print all the Strings letters form the first index to the last, so if my string is "josh", i want to print:  j  o  s h   or like this java code:     String name = josh;    for(int i = 0; i < josh.length(); i++){    print(josh.CharAt(i));  }   i cant find any method that is like charAt, i'm guessing that it doesn't exists but there has to some other way to do it, i know its kinda dumb question, but i couldn't find anything online or here(on this website) to help me, so any ideas?


I don't want to be the one that "have" or "has"?

Which one of these sentences is correct?   I don't want to be the one that have to explain to your parents why you are not going to graduate.  I don't want to be the one that has to explain to your parents why you are not going to graduate.


Which method is better to drop all user connections before a restore Change to single user mode or Take offline the database?

When we restore a database from prod to dev which method is better to disconnect other connection accessing the database? I am on SQL Server 2008r2  1.    Change to Single user mode  use master  Go  ALTER DATABASE MyDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE   Go     RESTORE DATABASE [MyDB] FROM  DISK = N'D:\Restore_Backup\Restore_05042015\DB.bak'  WITH  FILE = 1,   MOVE N'DB'  TO N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MyDB.mdf',   MOVE DB_log'  TO N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MyDB_log.ldf',   NOUNLOAD,   REPLACE,   STATS = 10  GO   ALTER DATABASE MyDB SET MULTI_USER   Go   2.    Take offline the database and restore database   USE master  GO  ALTER DATABASE MyDB SET OFFLINE WITH ROLLBACK IMMEDIATE  GO   RESTORE DATABASE [MyDB] FROM  DISK = N'D:\Restore_Backup\Restore_05042015\DB.bak'  WITH  FILE = 1,   MOVE N'DB'  TO N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MyDB.mdf',   MOVE DB_log'  TO N'D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MyDB_log.ldf',   NOUNLOAD,   REPLACE,   STATS = 10 GO    ALTER DATABASE MyDB SET OFFLINE   GO   Which method would assure I will be the only user so I can do the restoration without a problem?


$|a-b|^p \le 2^{p-1} (|a|^p + |b|^p)$ for $a,b \in \mathbb{R}, p \ge 1$.   How do we get this inequality? I can get $|a-b|^p \le 2^{p} (|a|^p + |b|^p)$ but I don't know how to get rid of a factor of $1/2$ on the RHS.


Consider a symlink I am making to my Music directory named music.  ln -s Music music   now consider following sequence of commands:  edward@ArchLinux:~$ readlink music Music edward@ArchLinux:~$ readlink music/ edward@ArchLinux:~$    I am getting output only if I am not using / at the end of symlink name.  I wonder if /dir and /dir/ are different. Can anybody explain?


I'm buying a used iPhone.  What steps should I take immediately after I receive the iPhone, to make sure that everything is OK, that I got what I paid for, and that I'm not receiving a lemon?  For instance, it might be nice to check that it wasn't reported stolen / blacklisted.  Also, I am buying a factory unlocked phone, so it'd be useful if there is an easy way to check to make sure I am receiving an unlocked iPhone.  Also, if there is any hardware that is frequently broken / not working on used devices, it might be useful to have a checklist for checking that hardware.    Related, but not identical:   , though that's different: it focuses on deciding whether to buy or not, and what to ask to help make that decision. , though that's different: it focuses on the seller's perspective and has a complicated scenario, whereas I'm interested in the buyer's perspective and have a simple scenario.


So here's a funny thing: I have 3 Fs and 1 D on my transcript, but my GPA is ~3.8, which is "high" because I double majored in math and computer science. The reason for those 4 bad grades is that I had 2 bad semesters where I suffered from depression; I didn't drop the classes before the deadline so I ended up failing the classes. However I retook the classes and got As in them (hence my GPA), and in fact got A/A-s in all subsequent classes (quite an improvement). I plan to apply to a master's for computer science, and eventually a phd. However I know the admission officers eyes will bleed when they see my transcript, despite my GPA, because my school keeps ALL grades on transcripts, even if the grades were replaced by retaking classes. Do I still have a chance at top-10 graduate school for computer science even with these grades (which were retaken and then aced)?


Is "an (unique) index" or "a (unique) index"

I'd like to know the role of parentheses on a phrase. For example, which of the following is right, "it has an (unique) index" or "it has a (unique) index".


There seems to be a paradox which shows up when defining set theory and logic. On one hand, set theory appears to be grounded in logic. However, on the other hand, sets are required to define necessary properties of logic. Have I misunderstood something? Because from my perspective, it seems that a set would need to exist before it can be defined...


When I put down the title, I literally meant, way out of this world.  I have a command running on a 20Hz:     tp @p[score_isCarrot_min=25]   And now, as anyone else might do, I wanted to test if the command worked... You might have already seen this coming, but when I through down 25 carrots (that was what the objective was all about) it starts tp-ing me into the air 500 blocks per second! Now that I think about it, it was extremely stupid to jump to the the gun and test it without thinking of the consequences... Any ideas about how I might come down?    ^ This is where I was a little bit ago...    ^ And this is one second later...


trying to to pass data to new controller using a function gives NullPointerException

I'm trying to pass data from one javafx controller to another by calling a function in the new controller but every time I do so I just get a load of errors and mostly NullPointerException and have no idea why.  // admin controller public class AdminController implements Initializable{      @FXML      private Button newTermButton;      private String error;      private Stage stage;      @Override     public void initialize(URL location, ResourceBundle resources){     }      //buttons     @FXML      public void newTermButton() throws IOException {          FXMLLoader loader = new FXMLLoader();          loader.setLocation(getClass().getResource("../term/Term.fxml"));          try {             loader.load();         } catch (IOException ex) {             // error         }          TermController tmp = loader.getController();          //error with this line         tmp.newTerm();          javafx.scene.Parent p = loader.getRoot();         Stage stage = new Stage();         stage.setScene(new Scene(p));          stage.showAndWait();      } }     // term controller public class TermController implements Initializable{      @FXML      private TextField termId;     @FXML      private TextField name;      @FXML      private DatePicker sDate;     @FXML      private DatePicker eDate;       public void loadTerm(int i) {         System.out.println("load term : " + i);     }      public void newTerm() {         System.out.println("new term");     }      @Override     public void initialize(URL arg0, ResourceBundle arg1) {         // TODO Auto-generated method stub      }  }   I'm trying to just run a function in the TermController from the Admincontroller so the controller will know weather to load a term from my data file or create a new one.


What happens if a fifth person chooses a different reason to close?

I'm curious, what if a question has 4 votes, 2 for one reason, 2 for other, and the fifth person chooses a third... what is the official close reason?


A function that is $L^p$ for all $p$ but is not $L^\infty$?

Let $X$ be the interval $[0,1]$ with Lebesgue measure. Is there a function $f\in L^p(X)$ for all $p\in[1,\infty)$ that is not $\in L^\infty(X)$? If so, what is an example?   Motivation: In a course on measure theory this fall, I've learned proofs that $L^p(X)\supset L^q(X)$ if $q>p$ and that if $f\in L^\infty(X)$, then $\|f\|_\infty = \lim \limits_{p\to\infty} \|f\|_p$.  This prompted me to wonder if $L^\infty(X) = \bigcap _p L^p(X)$. A classmate gave me a general theoretical reason to believe the contrary: $L^p(X)$ is a  for $1 \lt p \lt \infty$ but not for $p=1,\infty$; but intersections of reflexive spaces are reflexive. This logic seems sound to me; but it implies the containment $L^\infty(X) \subset \bigcap_p L^p(X)$ is strict.  If so, there must be a function that is $L^p$ for all $p$ but not a.e. bounded. What is it?


I need to set up some views that will pull some data from a custom table I created.  Some views will need to pull content the regular way and from my custom table (where I may query for a particular nid, etc.).  How do I do this, or where is a good place to research?


How can i take a photo through a plane window without the reflection

I am travelling to Greece soon and will be wanting to take pictures out of the plane window. When i have done this before there has been a reflection on it. How can i reduce or prevent these reflections? Thank You


I have this equation:     $$f(x)=\tan(x)$$   I found  the vertical asymptotes to be:     $$x=\frac{\pi}{2}k$$   What is the proper notation for that k is equal to every odd number integer(negative,positive, and zero)?  $$k\in\mathbb{Z}$$ is for every integer, but is there such a symbol for every odd number integer?   Natural numbers are positive, and sometimes zero counting numbers, my question is about integers not natural numbers.


Beginning document on a page number other than "1"

How do we create a new document starting on different pages? (Such as the first page of the document starts on 3 instead of 1.)


what kind (brand) of LCD display is this? it has no pins

I just gutted working new kitchen scale, and I have never seen a LCD display like this before. There are no pins just a black strip that goes on to the PCB. What brand of LCD is this?


Logitech LS21 recognized as 2.0 system - Windows 8.1 doesn't detect Subwoofer

I got my dad a Logitech LS21 system for Christmas. It's a 2.1 system, but it's recognized in Windows 8 as a 2.0 system (it says there is no subwoofer connected).    How would I go about getting the sub recognized?  It plays some sound now, but it's so quiet you can't hear it without putting your ear right next to it.


vs2012 is saying that my mapped drive is already in my workspace mapping

I have deleted my workspace, and renamed the folder that the files where in  but everytime i start vs2012 -> connect to a new tfs server  and then try to map a project to my local folder vs2012 says that the folder d:/ is already mapped in the workspace   How do i delete this memory of the mapped path from vs2012?


Is it possible to change your single-player skin?

In Minecraft, is it possible to customize your skin in single-player mode (not just in multiplayer)? How?


Prove: $\lim\limits _{n\rightarrow\infty} \left( ((n+1)!)^{\frac{1}{n+1}}-(n!)^{\frac{1}{n}} \right)=\frac{1}{e}$

I see this solution in a book but I don't understand it.  Which theorems were used?   I know how I solve this limit but this solution in book as following:   $$\lim\limits_{n \rightarrow \infty} \left( (n+1) \left(\frac{(n+1)!}{(n+1)^{n+1}} \right)^{\frac{1}{n+1}}-n \left(\frac{n!}{n^n} \right)^{\frac{1}{n}} \right)$$   $$=\lim\limits_{n\rightarrow\infty}\frac{\frac{(n+1)!}{(n+1)^{n+1}}}{\frac{n!}{n^n}}$$  $$=\lim\limits_{n\rightarrow\infty}\left( \frac{n}{n+1} \right)^n = \frac{1}{e}$$   But I don't understand which theorem use it here in the first step?  Is it Alembert?


How to calculate $\int\limits_{0}^{\frac{\pi}{2}}\frac{\mathrm{d}x}{1+\tan^{a}(x)}$

How to calculate $$ \int\limits_{0}^{\frac{\pi}{2}}\frac{\mathrm{d}x}{1+\tan^{a}(x)} \;, $$ where $a$ is a constant? Any hint will be appreciated.


Snippet 1:  class Room(Object):       pass    Snippet 2:  class Room():       pass   What is the different between both of the code and why we write object in the above code?


I was asked to investigate this question and to present my findings and I would like some sense of help and direction, I am very lost:-(  2n people, all of different heights  How many ways are there to order them such that --- There are exactly 2 rows --- All the heights increase from left to right --- The people in the back row have to be taller than the person immediately in front of them in the first row   Does anyone know of a recurrence relation that there is for this question, or any explicit formulas that I can investigate? I have worked it for 2n = 6, and have found that in terms of Young Tableaux if we use the equation $\frac{(2n)!}{\prod(Hook's Numbers)}$ we achieve the answer 5, which is also what I got when doing it by hand. Now I am wondering as to how I would prove this


Convergence of the sequence $(1+\frac{1}{n})(1+\frac{2}{n})\cdots(1+\frac{n}{n})$

I have a sequence $(a_n)$ where for each natural number $n$,   $$a_n = (1+\frac{1}{n})(1+\frac{2}{n})\cdots(1+\frac{n}{n})$$ and I want to find its limit as $n\to\infty$.   I obviously couldn't prove it and after several futile attempts decided to post it here.   Here is a list of a few observations which I got from those attempts:   The sequence $(a_n)$ is a strictly increasing sequence. To prove this, I rewrote each element as $$a_n = (1+\frac{1}{n})(1+\frac{2}{n})\cdots(1+\frac{n}{n})= \frac{(n+1)\cdots(n+n)}{n^n}= \frac{(2n)!}{n!n^n}.$$ Then $$\frac{a_{n+1}}{a_n}= \frac{2(n+1)!}{(n+1)!(n+1)^{n+1}}\frac{n!n^n}{(2n)!}=\frac{(2n+1)(2n+2)}{(n+1)^2(1+\frac{1}{n})^n} \to \frac{4}{e}$$ as $n\to\infty$. Since $\frac{4}{e}>1$ we have $a_{n+1}>a_n$ eventually. The limit of this sequence is bounded below by $e$. By replacing $1,2, \ldots, n$ with $1$ in the expression of $a_n$, we get $a_n \geq (1+\frac{1}{n})^n$. And thus $\lim{(a_n)}\geq e$.  $\lim{(a_n)}\geq e^2$ and $\lim{(a_n)}\geq e^3$. The first assertion follows from the fact that $$a_n\geq(1+\frac{1}{n})(1+\frac{2}{n})^{n-1}= \frac{(1+\frac{1}{n})(1+\frac{2}{n})^{n}}{(1+\frac{2}{n})} \to e^2.$$ And the last one follows the same way because $$a_n\geq (1+\frac{1}{n})(1+\frac{2}{n})(1+\frac{3}{n})^{n-2}.$$   Now I have a gut feeling that for any natural number $k$, one can show that for all sufficiently large natural number $n$, $$a_n\geq (1+\frac{1}{n})\cdots(1+\frac{k-1}{n})(1+\frac{k}{n})^{n-(k-1)}.$$ And therefore for all $k \in \mathbb{N}$, $\lim{(a_n)}\geq e^k$ making the sequence divergent. But I'm really not sure about this approach and I'll appreciate any help towards this end. Thank you.  [Note: As this sequence is quite common, there may be other posts on math.SE asking the same question. I didn't search for them because I just don't know how to search for an expression this big. Though a link related to any previous question concerning this particular sequence will be good enough, I will greatly appreciate if someone takes the trouble to look into my approach/observations and point out where  I'm going wrong.]


All integer solutions of $x^4 + y^4 + z^4 - w^4= 1995$

This question is in the book 'The thrill and challenge of precollege mathematics'. I intend to attack this problem using Fermat's Little Theorem (FLT).  Notice that each term on LHS must be either of the form $5k$ or according to FLT $5k +1$ but the if $x^4$ is of the form $5k$ then $x=5c$ for some integer c. I can't think of any think after this.  I have also used the property that any fourth power when divided by $4$ leaves remainder $1$ if it is odd and $0$ if it is even. Using this I think there are only $2$ things possible. Either, $x,y,z$ are odd and $w$ is even or $x,y,z$ even and $w$ odd.  Thanks in advance. Don't give me answer tho just tell me which concept to apply, or if this is right approach, the how to attack the problem.


I use  on Windows 7 platform. The principle to enter integrals and other mathematical symbols in Inkscape seems that the best thing to do and write them in a LaTeX compiler and cut them in Adobe PDF and paste it into Inkscape as figures.   Seems to be how you make pictures like this in Inkscape:    Is there any way to type LaTeX code directly into the text boxes Inkscape?   I know this question is ultópica but it never hurts to try.


I am confused by the explanations of time dilation and gravity vs. acceleration. The consensus (and apparently experiments) is that time dilation in a gravitational field (not free-falling) is "as if" one were accelerating. Examples given for sending light signal each way in a gravitational gradient, one sees blue shift the other red shift just as if accelerating in space due to velocity transformation. But is there a paradox? If actually accelerating, the velocity will increase and so will the time dilation relative to origin. If in a gravity field, the effect on clock time will be a constant difference relative to free-fall (e.g., orbit). Satelite clocks are apparently corrected for both velocity and gravity density which should be equivalent to acceleration. If a satelite were moving above escape velocity but held to the earth on a tether, would its time dilation only be a difference from the velocity, or would the force of the tether imply higher gravity density? Any thoughts?


Why is surface area not simply $2 \pi \int_{a}^{b} (y) dx$ instead of $2 \pi \int_a^b (y \cdot \sqrt{1 + y'^2}) dx$?

Geometrically speaking, it seems to me that if you have for example $y^2=8x$ revolved around the x-axis, taking the limit of the sum of $n$ surfaces of cylinders as $n$ approaches infinity should give you the surface area of that surface of revolution.  This is how the author initially derives the formula for finding the volume of solids of revolution. Take a rectangle under the curve over $\Delta x$ and revolve it around the axis to get an approximation of the volume of the solid over that interval. Add up those rectangles over $n$ changes in $x$ and take the limit as $n$ approaches infinity, which is the integral of the function that gives you the $y$ value (radius of that approximating cylinder) for each $x$ value.  Following the same principle, why wouldn't we be able to take those same cylinders, but instead of taking their volume, taking their surface area and take the limit as the number of those cylinders approaches zero?  In other words, in this case each $y$ value is given by $y = \sqrt{8x}$, which is the radius of that cylinder of height $\Delta x$ and an approximation of the surface area over that interval.  Why doesn't that work? Why do we need to deal with arc length? I don't understand why it doesn't work in this case, it seems to me that you're still getting a better and better approximation of surface area as those cylinders get smaller and smaller, eventually getting the exact surface area with the limit as their number goes to infinity.       PS: I saw this  but it's still not making sense visually/geometrically.


So I am doing a challenge to break an encryption and have been stuck on one of the equations. $$c = K^e\mod n$$ I know $c,e$ and $n$ all of which are very very large numbers. I know I have to get $K$ as it is the only way to reverse the next set of equations but I cannot figure out how to get $K$ from this.


Privacy level with an anonymous account?

I am interested in the currently achievable levels of privacy on an Android device. As far as I understand it, the best one can do is not to activate a Google account. However, even then significant data is leaked to Google, as illustrated by a . There appears to be some controversy on the subject, as some  claim location tracking only starts after users explicitly agree to send the information. Can someone shed some light on this? Is this location information sent to Google by default? On all types of smartphones?  Short of not activating a Google account, the second best option is to do the following:   create a new, dedicated Google account and associate the device with it disable contacts, mail, calendar, background data sync and autosync (as described in this )   If the account is only directly used to access the Market, what kind of communication takes place between Google and the device? Can anyone provide a URL to official ("looking"?) documentation on the subject?  In short, I am looking for an answer which provides a comprehensive list of the kinds of information exchange which take place between a cell phone with a new Google account and Google. If you provide a better strategy to reduce the amount of information shared (other than rooting), so much the better.


How to resolve ugly artifacts bending joints after posing?

Just learning here... I created a model in Makehuman and imported it into Blender. When I pose the model I get really ugly creases where the mesh appears to overlap:    How do I clean this up or avoid it? I'm not worried about animating or anything I just want it to look smooth.


Getting a large number of (~100) digital output signals from Arduino

I would like to be able to control around 100 independent LEDs using an Arduino.  The problem is that the Arduino does not have nearly enough pins that can be configured for this.  What would be a way to solve this problem?  Is there a chip that can demux a more complex signal from the Arduino that could then control the LEDs?  Or is there another solution?


Ok, here's the issue which is totally confusing to me:  df -h Dateisystem          Größe Benut  Verf Ben% Eingehängt auf /dev/sda2             3,8G  1,5G  2,2G  41% / /dev/sda1             122M   13M  103M  11% /boot tmpfs                1014M     0 1014M   0% /dev/shm /dev/sdb1            1016M  866M  150M  86% /srv   However:  du -hs /srv 55M     /srv   Just for information:  mount | grep srv /dev/sdb1 on /srv type xfs (rw)   The 86% gave me a warning email (which is intended) after which I deleted ~800MB of files under /srv. This was a few hours ago.  Using du, I get what I consider the correct amount of data on that partition. However, df doesn't seem to get that. Why? (This is somewhat annoying, because I still get regular warning emails based on that output.)  Not sure if that's important, but I'm on a server using CentOS release 5.11 (Final).


What happen with cells with different current rating put in parallel?

I don't understand how cells behave when connected in parallel. So what if I have two Li-Ion cells: one ist "rated" at 15 amps (which means that the cell is able to discharge at 15 amps without problems , right?) The other cell ist rated to 5 amps. Now assume both have appropriate same Voltage to connect them both in parallel. What happens if you connect a load which would draw 10 amps now? Would both cells try to discharge with the same 10A (and thus the 5A-cell would overheat and fail...), or would the current be spread up eavenly? Is it actually forseeable at all what would happen, since it depends on the internal resistance of both cells, doesn't it? Does someone know what would happen?  Then another question: what if you put two cells of different capacity in parallel? Isn't the cell with the higher capacity supposed to give more current? Because the discharge curve of the high-capacity-cell is above the discharge curve of the low-capacity cell. So the high-capacity-cell would have to discharge more of its current until it decreases its voltage to the same level as the low-capacity-cell? So would that mean that the internal resistance gets lower with a higher capacity, is it proportional?  Hopefully my explanations aren't to confusing and hopefully there are people who are bothered by the same question :) Thank you!


I am using feed-forward NN. I understand the concept, but my question is about weights. How can you interpret them, i.e. what do they represent or how can they be undestrood (besied just function coefficients)? I have found something called "space of weights", but I am not quite sure what does it means.


I am using TexStudio and I am having trouble understanding the difference between Build & View and Compile  In the photo above, the 2 buttons are annotated.  These are my settings for each button.


A compact operator in Hilbert space is the limit of a finite rank ssequence of operators

If $H$ is a hilbert space and $T\in K(H)$. Then there is a sequence of finite rank operators {$T_k$} which converges to $T$ in $B(H)$. By a claim we have that for every bounded sequence $(x_n)$ in $H$, $(Tx_n)$ has a subsequence that converges in $H$. However, i don't see how it can be useful. I thought about defining a finite rank sequence of operators, and show that it converges to $T$.


Possible Duplicate:          I am currently working from Germany. From Firefox, if I give something to search in the Google search box in the browser, it is automatically taking me to google.de, and is returning results which is of no use for me.   Is there any chance, that I can change the default to google.com or google.co.in or google.co.uk, something like that which gives me English results?


Traveling to London from Paris as a U.S. Citizen

I am staying in Paris in a couple of weeks and I booked a day trip to London via EuroStar. Looking around here and the internet I believe I do not need a visa to travel to London from Paris since I will not be staying more than a year. Am I correct on not needing a visa?


remove a portion of a line contained within two different types of separator / delimiters

Most of the commandline tools I'm looking at have the ability to pick a field delimiter.  However, I'd like to pick one delimiter to start, and a different one to end the segment of text I'd like to remove from each line I'm processing.  1text [blah blah blah] text number punctuation text text 2text text text 3text text (text) [blah blah blah] number text 4text <url> <email> text [blah blah blah] text   I'd like to remove all the 'blah blah blah' from those lines.  Blah can contain anything, except newlines, EOFs, and other breaky-things, and '['.  ie: I shouldn't have '[[' (nor '[blah[') in any of the data  I only have one (optional) instance of [] per line.  So, for line 2 there is nothing to remove, and this shouldn't cause a halt, stop or failure.  I'm almost 100% positive that if I've got a start '[' I also have a ']'.  That might be nice to check for, however.  There are other forms of punctuation, so I don't want to work it with something that just looks for non-alphanumeric stuff to start removing (ie: line 4)  Bonus points for being able to figure out if I'm putting together two (now adjacent) whitespaces at that particular point - but without removing double whitespaces at any other point.  I'm pretty sure I'll have to use awk or sed, but if there were a way to do this via regular commandline tools, to make it as portable as possible, that would be ideal.  Also, explaining what you're doing (if you're using regex / sed) would certainly help, as:    A suggestion  says:   sed 's/^.*%\([^ ]*\) .*\$\([^$]*\)$/\1 \2/' infile    I got that kinda working with this bit of monkeying:   cat data | sed 's/^.*\[\([^ ]*\) .*\]\([^$]*\)$/\1 \2/'    However it doesn't take out the whole swath of 'blah blah blah', and leaves with an extra line-break.      Doesn't really answer the question in a general sense (or, at least I wasn't able to figure something out after reading it - maybe just a fail on my part), but seems to be (too) specifically tailored to that person's data.


How do I create a bezier curve in illustrator with known values

I want to create a Bézier curve in Illustrator so I can import it into Cinema 4D. Now my problem is, I have got a Bézier curve with just the coordinates of my points and I want to draw this in Illustrator. How do I do that?  Coordinates are: (5,0) (3,0.5) (0,1) (-2,1) (-3.5,1) (-5,0.5) (-5,0)


Why did the designers refactor Fortitude, Reflex, and Will saves into six different saves in 5e?

In Dungeons & Dragons 3rd Edition, there were Fortitude, Reflex, and Will saving throws, each tied to a particular ability: CON, DEX, and WIS respectively. (Prior to this edition, saving throws were tied to particular spells or conditions forcing the save rather than being categorized in this way.)  In 4th Edition, saving throws of that sort were eliminated (the term was reused for a different mechanic), but Fortitude, Reflex, and Will reappeared in the form of defensive scores, each tied to a particular ability: the better of CON/STR, DEX/INT, and WIS/CHA respectively.  In 5th Edition, the concepts of Fortitude, Reflex, and Will saves (or defenses) were done away with. Instead, there is a separate saving throw for each of the six abilities: STR, DEX, CON, INT, WIS, and CHA. However, the most commonly forced saving throws are CON, DEX, and WIS... which are the same as those associated with the Fortitude, Reflex, and Will concepts in prior editions. (Saving throws came back in 5th Edition largely because the designers felt that rolling for saves was integral to the gameplay. See: )  What is the designers' reason for refactoring the fairly longstanding Fortitude, Reflex, and Will categories from prior editions into six different saving throws associated with each ability?


Named Credentials - Merge Fields not Resolving

I am having an issue when attempting to reference the {!$Credential.UserName} and {!$Credential.Password} merge fields.    I created a named credential with the following configuration:   Identity Type: Named Principal Authentication Protocol: Password Authentication Generate Authorization Header: false Allow Merge Fields in HTTP Header: true Allow Merge Fields in HTTP Body: false   I also set the username and password as the credentials expected by our vendor's API.  I then define the Authorization Header keys in Apex and use the merge fields as reference.          req.setHeader('Authorization-UserName', '{!$Credential.UserName}');         req.setHeader('Authorization-Token', '{!$Credential.Password}');   I initially hard-coded the Authorization-UserName and Authorization-Token (which worked).  I am also using the same endpoint that was defined in Remote Site Settings.  But due to the fact that I plan to use Named Credentials, I disabled the end point in Remote Site Settings (see: ).  It appears that the {!$Credential.UserName} is not resolving to the defined username value.


I got the following table on Google Sheets.  I want the first column to represent the groups in x axis. The 2nd column is supposed to be the a group in a certain x value lets say I have: 8 3 22  8 4 55   8 5 72  I want to have at value x = 8 , 3 bars, the first bar has the y value of 22 with the label 3, the 2nd  has y value of 22 with label 4, and the 3rd has y value of 72 with label 5. This is the chart I got which is completely not the one I wanted.


Disable (only for some part of the document) some warnings

Is it possible to create two commands \disableOverfullWarnings and \enableOverfullWarnings that respectively disable and enable the printing of messages such as      Overfull \hbox (12.92616pt too wide) in paragraph at lines 157--158 ...   in the console (in the output of pdftex)?  Thanks  PS: If not possible, is it possible to disable all warnings for some part of the document?    EDIT: This is not a duplicate of  .


How to evaluate $\int_0^{2\pi}\frac{1}{(1+a\cos {\theta})^2}\,d\theta$ without contour integration?

Evaluate $$\int_{0}^{2\pi}\frac{1}{(1+a\cos {\theta})^2}\,d\theta \quad , \, 0\le a<1$$  I know it can be solved using complex analysis, but how do I solve this with real analysis methods? This integral appears in the general derivation of Kepler's third law. Here $a$ is the eccentricity of the planetary orbit. So $a=0$ was assumed to prove that $T^2\propto r_0^3$ for a circular orbit, where $T$ is the orbital period and $r_0$ is the orbital radius.


On the , an edit was made to , which I can see on the hot questions list.     This edit was made by a Moderator (note the diamond) so it should be shown in my question, but when I go to the question itself, the edit is nowhere to be found.     Where is the expected edit to my question?  I don't think this is a problem with Programmers.se specifically, because this is the same question form that all SE sites use.


I need this symbol and I don' t find it.  I need the : t  Only I find the $\tau$ but it is not  Can you help me?    Thanks


I am trying to understand some assembly.  The assembly as follows, I am interested in the testl line:  000319df  8b4508        movl   0x08(%ebp), %eax   000319e2  8b4004        movl   0x04(%eax), %eax   000319e5  85c0          testl  %eax, %eax   000319e7  7407          je     0x000319f0     I am trying to understand that point of testl between %eax and %eax? I think the specifics of what this code isn't important, I am just trying to understand the test with itself - wouldn't the value always be true?


We know that the order of an element in a finite group must divides the order of the group by Lagrange theorem. Is the converse true ? How do we prove it. I know that the converse is true for nilpotent groups.


I know how to prove that, if $2^n-1$ is prime and $n>1$, then $n$ is prime.  But how do we prove that, if $a^n-1$ is prime and $n>1$, then $a$ must equal 2?


Append file extension on names of multiple files

I have a folder containing 500 files like this:   xaa  xab  xac  xad  aae  aaf   I want to add ".txt" to the end of all of them to get something like this:  xaa.txt xab.txt xac.txt xad.txt   How would this be done?


What exactly do *args and **kwargs mean?  According to the Python documentation, from what it seems, it passes in a tuple of arguments.  def foo(hello, *args):     print hello      for each in args:         print each  if __name__ == '__main__':     foo("LOVE", ["lol", "lololol"])   This prints out:  LOVE ['lol', 'lololol']   How do you effectively use them?


I am just now coming to know the hard limits of water destroying equipment. I don't know if it's realistic to be able to have my Macbook as a floatable rubber ducky in the bath in this day & age, but products like  and commercials of scuba divers using iPads have me curious.   Is liquipel the best protection on the market? Are there other custom shops that could do anything to make a MacBook either resistant to liquid or even waterproof?


If the limit of a derivative is zero as $x \to \infty$, what can we say about $f(x+1)-f(x)$?

Given a differentiable function $f$ such that  $$ \lim_{x \to +\infty}f'(x) = 0 $$ what can we say about $$ \lim_{x\to\infty}(f(x+1)-f(x)) \text{ ?} $$ My first thought was to use mean value theorem on $[x,x+1]$, and I will get that the limit is $0$, is this true? Thank you for your help.


pass previous command's arguments to current command

There are times when I want to take the previous command's parameters and apply them to the current command.   Here is an example  $ cat foo.txt $ vim foo.txt   I'd like to find a shortcut to not have to type out vim foo.txt


I am trying to book a ticket for my sister to come visit me in Canada. She is Belarussian (belarua) but has a visitor visa for Canada. On way back to Belarus she is flying Halifax to London and then London to Vienna and then Vienna to Minsk. My concern does she need a transit visa in London if she staying at the airport for 6 hours till her next flight?


I'm using Zsh and some CLI's such as Google's gcloud load files via $EDITOR.    For me, I have set this as:  export EDITOR="/usr/local/bin/mvim"   With aliases for that editor using the -v flag which loads vim in the terminal:   mac_vim="$EDITOR -v"  alias vi=$mac_vim  alias vim=$mac_vim  alias v=$mac_vim   That works but when the gcloud CLI calls $EDITOR it does not have the -v flag so it opens in a new terminal.  I thought I could change that by instead adding the -v flag here:  export EDITOR="/usr/local/bin/mvim -v"   However, when I try and run that on the command line I get:  $EDITOR text.html zsh: no such file or directory: /usr/local/bin/mvim -v   Is it possible to include a flag when exporting my $EDITOR?


Why Didn't the Empire Transplant Sandworms to Other Planets?

Later in the Dune series, the Bene Gesserit have transplanted some sandworms and there are sandworms living on other planets besides Arrakis.  Considering the importance of melenge and that it was coming from only one planet, why didn't the Empire try to protect their resources by transplanting some sand trout or sandworms to other planets earlier?  Wouldn't this have made them (and the Spacers) less vulnerable to an attack on a single planet?


Imagine you're teaching a first course on quantum mechanics in which your students are well-versed in classical mechanics, but have never seen any quantum before.  How would you motivate the subject and convince your students that in fact classical mechanics cannot explain the real world and that quantum mechanics, given your knowledge of classical mechanics, is the most obvious alternative to try?  If you sit down and think about it, the idea that the state of a system, instead of being specified by the finitely many particles' position and momentum, is now described by an element of some abstract (rigged) Hilbert space and that the observables correspond to self-adjoint operators on the space of states is not at all obvious.  Why should this be the case, or at least, why might we expect this to be the case?   Then there is the issue of measurement which is even more difficult to motivate.  In the usual formulation of quantum mechanics, we assume that, given a state $|\psi \rangle$ and an observable $A$, the probability of measuring a value between $a$ and $a+da$ is given by $|\langle a|\psi \rangle |^2da$ (and furthermore, if $a$ is not an eigenvalue of $A$, then the probability of measuring a value in this interval is $0$).  How would you convince your students that this had to be the case?  I have thought about this question of motivation for a couple of years now, and so far, the only answers I've come up with are incomplete, not entirely satisfactory, and seem to be much more non-trivial than I feel they should be.  So, what do you guys think?  Can you motivate the usual formulation of quantum mechanics using only classical mechanics and minimal appeal to experimental results?  Note that, at some point, you will have to make reference to experiment.  After all, this is the reason why we needed to develop quantum mechanics.  In principle, we could just say "The Born Rule is true because its experimentally verified.", but I find this particularly unsatisfying.  I think we can do better.  Thus, I would ask that when you do invoke the results of an experiment, you do so to only justify fundamental truths, by which I mean something that can not itself just be explained in terms of more theory.  You might say that my conjecture is that the Born Rule is not a fundamental truth in this sense, but can instead be explained by more fundamental theory, which itself is justified via experiment.  Edit:  To clarify, I will try to make use of a much simpler example.  In an ideal gas, if you fix the volume, then the temperature is proportional to pressure.  So we may ask "Why?".  You could say "Well, because experiment.", or alternatively you could say "It is a trivial corollary of the ideal gas law.".  If you choose the latter, you can then ask why that is true.  Once again, you can just say "Because experiment." or you could try to prove it using more fundamental physical truths (using the kinetic theory of gases, for example).  The objective, then, is to come up with the most fundamental physical truths, prove everything else we know in terms of those, and then verify the fundamental physical truths via experiment.  And in this particular case, the objective is to do this with quantum mechanics.


Prove that if $|a_1\sin x+a_2\sin2x+a_3\sin3x+\cdots+a_n\sin nx|\leq|\sin x|$ for $x\in R,$then $|a_1+2a_2+3a_3+....+na_n|\leq1$

Prove that if $|a_1\sin x+a_2\sin2x+a_3\sin3x+\cdots+a_n\sin nx|\leq|\sin x|$ for $x\in R,$then $|a_1+2a_2+3a_3+\cdots+na_n|\leq1$  When we try to differentiate it on both sides wrt $x$,then modulus sign comes,how will one prove this question?Please help me.


I'm creating a CRM type application for a client. They need to store information about Companies and information about Contacts within those companies. Each Company can have multiple Contacts associated with them but only one of the Contacts in each Company can be the "Preferred" contact.  So I have the following two tables:  Company PK: ID Name Tel etc    Contact PK: ID FK: CompanyID Name Tel etc    I can see two ways to add the Preferred Contact attribute. I could put a FK:PreferredContactID field on the Company table or I could put a PreferredContact boolean field on the Contact table. The former means that I would have a circular relationship the latter means that I have to have a constraint "Only one Contact within a Company can be the Preferred".  My question is which of these is the best option and why or is there a better way?


as we know, there are some perturbations on a falling jet which are always present and according to their wave number and the radius of the jet, they can grow and decay over time. so, imagine a jet which has those sort of long wavelength waves traveling downward on it, we put an obstacle on the path of the jet and then we would see this :    so, what exactly happens to those waves by the presence of an obstacle?   why have those waves been too larger in amplitude and too short in wavelength in presence of an obstacle?  This photo has taked by sayyedali.m.(  Qom)in Shahid qodosi high school


I have the following function, and I want to prove/disprove that it is $\Omega$(n$^2$): \begin{cases}     4[sum(n/2,n)],& \text{if n is even } \\     2n-1+sum(n-3,n),              & \text{otherwise} \end{cases} (it should be 2 n-1, so a space between 2 and n) where sum( j,k ) is a ‘partial arithmetic sum’ of the integers from j up to k, that is \begin{cases}     0& \text{if j>k } \\     j + (j+1) + (j+2) + ... + k,              & \text{otherwise} \end{cases} e.g. sum(3,4) = 3 + 4 = 7, etc. Note that sum(j,k) = sum(1,k) – sum(1,j-1) I tried to solve it, however have not come across one before where it has conditions...


Android Studio regex replace with Lowercase

How can I convert the matched group to a lower case when doing find and replace? I tried $L$1 to replace the first match to a lowercase for no avail. $1 works but does not convert the text to a lowercase.  Thank you


Using data read from a pipe instead than from a file in command options

Per man definition, this command gets the input from a file.  $ command -r FILENAME   Suppose that FILENAME is a file containing a list of filenames, as it was generated using ls > FILENAME.  How can I, instead, feed the command with the result of ls directly? In my head something like this should be possible:  $ ls | command -r  But it doesn't, the output of ls doesn't get hooked as an argument. Output:  Usage: command -r FILENAME error: -r option requires an argument   How could I obtain the desired effect?


How do I display the first letter as uppercase?

I have fname and lname in my database, and a name could be stored as JOHN DOE or john DOE or JoHN dOE, but ultimately I want to display it as John Doe  fname being John and lname being Doe


How to add pair to anonymous object using function?

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"


Establish equivalence between the principle of Weak Induction and Strong Induction.

I am looking for less jargons from predicate logic and more prominence on simple language. Also, please hint me as to what approach should I use in establishing the implication both way. I know that's the way to get around it.


Using getchar() on c gets the 'Enter' after input

I'm trying to write a simple program that asks a user to choose from a menu in a loop. I use getchar() to get the input, however i've noticed that when I enter a char and press 'Enter' the program makes two loops (as if i pressed twice) one the char as an input and another for 'Enter' as an input.  How do I fix this?


Why $\{\omega :[0,1]\to \mathbb R\text{ continuous}\}$. is not in $\sigma \{(\omega :[0,1]\to \mathbb R\mid \omega (t_i)\in B_i\}$.?

For $B\in \mathcal B(\mathbb R)$ (the borel $\sigma -$algebra), we denote $C_t(B):=\{\omega :[0,1]\to \mathbb R\mid \omega (t)\in B\}$. Let $$\mathcal F=\sigma \{C_t(B)\mid t\in [0,1], B\in \mathcal B(\mathbb R)\}.$$ Why $\mathcal A:=\{\omega :[0,1]\to \mathbb R\text{ continuous}\}$ do not belong to $\mathcal F$ ? I think that I have to prove that there are no countable collection of $\{B_i\}\subset \mathcal B(\mathbb R)$ and $\{t_i\}$ s.t. $$\mathcal A=\bigcup_{i=1}^\infty C_{t_i}(B_i),$$ but I don't know how to do it. I tried by contradiction, i.e. I suppose that $$\mathcal A=\bigcup_{i=1}^\infty C_{t_i}(B_i),$$ but I don't know what to do...


Is there any benefit to allowing code-only answers while blocking code-only questions?

There have been several discussions regarding code-only answers (answers that contain only code blocks with no textual explanation whatsoever):         Personally, I can't see why the quality filter should let such answers through at all. The main problem I have with code-only answers, especially once they're flagged as not an answer or very low quality, is that we can't determine at a glance whether these answers are:   Genuinely attempting to answer the question  answers Trying to correct an error in the question without actually answering it Random code dumps that may or may not relate to the question even by programming language or keyword(s) in the question   In particular, what exactly is an "informative code-only answer"? Does it mean the code is self-documenting? Does it mean the code substitutes code comments for a proper write-up? This is all very fuzzy. From  to the last question above:     I have never seen a code-only answer that couldn't be made better with the addition of appropriate text. They are of lower-quality than the same answer with some text.   This text makes all the difference, IMO, between an answer and a non-answer. Without it, it's often needlessly difficult to tell.  Existing code-only answers that are good-faith attempts to answer the question should be edited or downvoted, yes. But if the quality filter already tries to block code-only questions, why not block code-only answers too? These answers are often low quality, and (almost) always have ample room for improvement, just like questions.


I'm just trying to build some Python game, but import pygame is not working.  I got this error massage:  /usr/bin/python3 /home/dinushi/g.py/snackgame.py Traceback (most recent call last):   File "/home/dinushi/g.py/snackgame.py", line 2, in <module>     import pygame ModuleNotFoundError: No module named 'pygame'


For every element $x$ in a given set $A$, $x$ is an element of the corresponding equivalence class $[x]_R$ with R an equivalence relation. Why?

On page 217 of Velleman's "How to Prove It", Velleman states a lemma. It goes like this (note that $[x]_R = \{y \in A : y \, R \, x \})$:  Lemma 4.6.5. Suppose R is an equivalence relation on A. Then:   For every $x \in A$, $x \in [x]_R$ For every $x \in$ and $y \in A$, $y \in [x]_R$ iff $[y]_R=[x]_R.$   I don't understand why (1) should be true. After all, an equivalence class is a set $[a]_R = \{ x \in A : x \ R\ a \}$, where $R$ is an equivalence relation - i.e., a relation that is reflexive, symmetric and transitive.  As I didn't understand it, I turned to the commentary on the page, and found the author had written:     According to the definition of equivalence classes, $x \in [x]_R$ means $x R \ x$. This is what leads us to apply the fact that R is reflexive.    ...so? Yes, $x \in [x]_R$ means that $x R \ x$, but that isn't the only hard requirement for it to be in $[x]_R$ - we just established that an eq. class is one defined using an equivalence relation, that is to say, a relation that is not only reflexive but also symmetric and transitive! How can we say that $x \in [x]_R$ by just looking at one of 3 requirements?  So I turned to another book. Cunningham's "A Logical Introduction to Proof", pg. 216. I found an almost identical list on that page, and the first pointer was yet again        For every $x \in A$, $x \in [x]_R$      So I turned to the proof, and in the proof the author goes     To prove (1), let $x \in A$. Clearly, $x \in [x]_R$, as $R$ is reflexive.   What? How can you conclude that $x \in [x]_R$ by just considering one of three requirements of the eq. relation R?  The same thing in Lay's "Analysis with an Introduction to Proof":     Given an equivalence relation $R$ on a set $S$ [...] we define the equivalence class (with respect to $R$) of $x \in S$ to be the set:   $$E_x = \{y \in S : y \, R \,x \}$$   Since $R$ is reflexive, each element of $S$ is in some equivalence class.   Why! Why would $R$ being reflexive have anything to do with each element of $S$ being in some equivalence class! To be in an eq. class, they're supposed to be reflexive, symmetric and transitive - why does everybody keep repeating they only need to be reflexive!


Should I ask potential recommenders whether they know someone?

Let's say someone is applying for a PhD or postdoc position (or a number of such positions), and needs to decide who should write a recommendation letter. Assume that two letters are needed, but the person has four professors to choose from. All four professors say that they are comfortable with writing a strong letter.  The applicant feels that all else equal, potential hirers give more weight to letters from people they know. Is it ok for the applicant to ask their professors whether they know a potential hirer, so that recommendation letters can be channelled accordingly?


Drawing and sheathing a weapon in 5e, and the actions required

I've seen this question asked about 4e, and I think I've found the passage in the 5e PHB that answers the question, but I'd like to make sure I understand this correctly before I impose it on my game.  The question is can sheathing one weapon and drawing another be part of the same "free action", or does this take a full action?  The PHB (page 190)     You can also interact with one object or feature of the environment for free, during either your move or your action. For example [...] you could draw your weapon as part of the same action you use to attack.   If you want to interact with a second object, you need to use your action. Some magic items and other special objects always require an action to use, as stated   in their descriptions.   As a bonus question, what do you think about a Rogue using their "use object" bonus action to draw a weapon after using their free action to sheath one, leaving a standard action and movement action left to be used.


I am wondering why "steak" is pronounced as [steyk] instead of having the "ea" phoneme pronounced as in creak[kreek], cheap[cheep], meat[meet]...  Is it an exception or is there a rule for when to pronounce it one way or the other?


Upgrade to Ubuntu 20.04 and LOSE everything

There are a couples of questions about upgrading to Ubuntu 20.04 and keeping data/customizations etc. I want to do the exact opposite of that. That is, achieving the same result as in overwriting my current partition via booting and installing from a live cd. I am just wondering if, for convenience, it is possible to do so within my current installation(18.04). Thanks. EDIT: Just to clarify, my endgoal is to have clean Ubuntu 20.04.


I know there are already questions which ask how to suppress chapter numbering:  and  In all examples, it's suggested to use chapter* instead of chapter in order to ignore chapter numbers. I want to be able to suppress chapter numbers from sections while still keeping the chapter numbers in order. Is this possible? MWE: \documentclass[12pt]{report}  \renewcommand\thesection{\arabic{section}}  \begin{document}  \chapter{Something} \section{First Section} \section{Second Section}  \chapter{Something Else} \section{Third Section} \section{Fourth Section}                                                                                \end{document}  This produces something like: Chapter 1: Something 1 First Section 2 Second Section  Chapter 2: Something Else 1 Third Section 2 Fourth Section  What I really want is for it to look like: Chapter 1: Something 1 First Section 2 Second Section  Chapter 2: Something Else 3 Third Section 4 Fourth Section  Since I need chapters to be numebered, I can't use chapter*. I can suppress the chapter number from showing up, but the section numbering restarts at the start of each chapter.  Note that there are a different number of sections for each chapter Yes, I could write these all by hand and do something like \chapter*{Chapter 1:\\ Something} in order to get what I want, but I'd prefer to do this programmatically if possible, hence why I'm asking on here.


My 3D modeling skills are limited to SketchUp, so forgive my lack of experience. I don't understand how to model something, in programs like Blender, with precision when it comes to measurements. How can I make something exactly 1/4 inches thick, or extrude a face by 2.38 inches, or 25 mm?


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


I am trying to change root password in my Ubuntu system.   This is what I did:  ashot@ashot-desktop:~$ sudo passwd root  passwd: Authentication token manipulation error  passwd: password unchanged   How do I change root password in Ubuntu?


How can I keep a monster spawner spawning whilst I'm away?

I know that Minecraft spawn cages only spawn when you are near them, and the mob can spawn there naturally - but is there a way to keep them spawning? I need the spawner to work when I am away.


What is the name for moments, a parameter that is calculated

I am looking to correctly name something.  Often when I have my data, I calculate a "value". For instance a moment like the mean value, or a quantile. Or I aggregate a continuous variable into say 5 categories. For instance, for a time series I would calculate the mean value or some wavelet coefficients.  Then I use all those "values" as input for, e.g., my regression analysis. In quantitative trading lay people call those calculated values "signal", but that sounds strange to me.  In general, what is the name for those "values"? How would a statistician name those?


Find $\gamma$ such that $\mathbb{Q}(\gamma)=\mathbb{Q}(\alpha,\beta)$ where $\alpha$ is a root of $x^3-2x+3$ and $\beta$ is a root of $x^2+x+2$?

I have to answer the following problem:  Find $\gamma$ such that $\mathbb{Q}(\gamma)=\mathbb{Q}(\alpha,\beta)$ where $\alpha$ is a root of $x^3-2x+3$ and $\beta$ is a root of $x^2+x+2$  I am a bit confused: How do we pick a root of each of those polynomials? If I didn't messed something, I guess they do not have roots in $\mathbb{Q}$ so what roots should we pick? Should we make two extensions so that we obtain a root for each one of them and then try to find $\gamma$?


"I have been Jessica" shouldn't it be "My name is Jessica"

We went to an electronics showroom, where we chatted with a sales girl. She explained some technical stuff about the things we were interested in. When she had finished explaining, she said      "By the way, I have been Jessica."   This usage is not new to me: it's pretty common in the US, and in Hollywood movies. But I have always wondered about how it could be correct (if indeed it is). I understand what it means, I just don't see it as grammatical. What is the logic of taking it as grammatical?  You have been Jessica. So what are you now?   A lot of people in the comments are saying that they never heard nor saw anyone using this line to tell their name. Here is an example:    at 00:25