How do I download packages with dependencies in Ubuntu 15.10 64bit?

I'm a new to Ubuntu (and linux). So far, my experience with Ubuntu is great. The boot speed is amazingly fast compared to Windows.   Anyway, how do I download packages for offline use with their dependencies for Ubuntu 15.10? I have tried searching, however, the results are from few years ago. I'm not sure if the methods are still valid or if there are better options now in 15.10.   Edit  After browsing the answers on here:  , I found this code the most useful.  sudo apt-get install PACKAGE --print-uris -qq | sed -n "s/'\([^ ]\+\)' \([^ ]\+\) \([^ ]\+\) MD5Sum:\([^ ]\+\)/wget -c \1/p" > install.sh   Anyway, here are some instructions for complete newbies. I hope that you will find them useful.   Complete download instructions for others new to Ubuntu 15.10+:   Open the Terminal (shortcut CTRL + ALT +T)  Navigate to the folder that you would like the package to be downloaded to by using the command:       cd FOLDERNAME   (Example: cd Desktop)   Tip: You can also use the dir command to list the folders.    In the code above the instructions, replace PACKAGE with the package that you wish to download.  Copy and paste the modified code (shortcut CTRL + SHIFT + V) and press Enter       Example code to download Synaptic Package Manager:   sudo apt-get install synaptic --print-uris -qq | sed -n "s/'\([^ ]\+\)' \([^ ]\+\) \([^ ]\+\) MD5Sum:\([^ ]\+\)/wget -c \1/p" > install.sh   Example code to download VLC player:   sudo apt-get install vlc --print-uris -qq | sed -n "s/'\([^ ]\+\)' \([^ ]\+\) \([^ ]\+\) MD5Sum:\([^ ]\+\)/wget -c \1/p" > install.sh  If asked, type in the root password and press Enter. (Do not panic if the characters for the password do not show. It's just a security measures.)   The "install.sh" file should be now generated. All dependencies that are needed are included within the script. Now we need to run the script with this command: sh install.sh   Wait for the files to be downloaded Afterwards, you can either use this command to install all the packages within the folder:            sudo dpkg -i *.deb     Or you could use a program like Synaptics to install the packages. (Synaptics: File - Add downloaded packages)     Alternatively, you can also just double click the files. That will open the Ubuntu Software Center. Once software center is loaded, press the install button. Repeat this until all the files in the folder are installed.


does $\int_\gamma ln(z) dz$ depend on the branch cut I choose?

I would like to know why do I get two different results when I calculate $\int_\gamma ln(z) dz$ ,with $\gamma$ the unit cercle, when using two different branch cuts $[0,+\infty[$ and $]-\infty,0]$ ?  Thanks a lot,


Hi every one I am new to Ubuntu before I was using the backtrack 5 r3 in which every thing was installed but when I came to Ubuntu I get confused every thing is change please some body give me little description about how to install nmap in Ubuntu with some useful link if you people can.


Fell for fake sugar daddy. How do I get out?

I fell on hard times and for the first time I attempted to get a sugar daddy. He asked for my bank account login info and reluctantly I gave it to him even though I knew I shouldn't have. Short story, I figured out he's fake and called him out on it after he made a couple of mobile deposits. Every time he made a mobile deposit he would go in there and take a third of the money he deposited. I also noticed he somehow used an old check I deposited and changed it and used it again. I got him to admit he wasn't who he claimed to be and I changed my login info. He claimed he could still see how much money was in my account and sent me a screenshot of how much money was in the account with the amount and "Chase checking" before it. That was the only information in the screenshot. He also threatened to get me in trouble with the law if I didn't send him more money. I changed my login info again just in case but I could really use some advice on what should I do next.


Is it possible to get tooltips into a LaTeX pdf?  I am working on my CV. I would like to show some more information on my electronic version once you swipe over that field with the mouse. i.e. when swiping with the mouse over education I want to show my subjects taken in undergrad through a tooltip.  Is this possible and if yes would if work for all kind of pdf readers?


Inversion in "Only when the virus introduces its nucleic acid into a cell does disease occur"

Given this sentence,     Disease occurs only when the virus introduces its nucleic acid into a cell.   Is the following inversion grammatical?      → Only when the virus introduces its nucleic acid into a cell does disease occur.   Especially the "does disease occur" part.  I think that "occurs disease " is right. Can you explain a rule about this kind of sentence?


$f\colon(0,\infty)\to \mathbb R$ be continuous ; $f(x)\le f(nx) , \forall n \in \mathbb N , \forall x >0$ , then $\lim_{x\to \infty} f(x)$ exists?

Let $f\colon(0,\infty)\to \mathbb R$ be a continuous function such that $f(x)\le f(nx) , \forall n \in \mathbb N , \forall x >0$ , then is it true that $\lim_{x\to \infty} f(x)$ exists (may be infinite) ?


Decompose vector fields on product manifolds

So, I know that tangent bundle of a product manifold $M \times N$ splits in a sum $$ T_{(x,y)}(M \times N) = T_xM \oplus T_yN, $$ so that is obvious that the sum $X \oplus Y$ of smooth vector fields $X \in \mathcal{T}(M)$ and $Y \in \mathcal{T}(N)$ is a smooth vector field of $M \times N$. I've been told that, though not every vector field in $\mathcal{T}(M \times N)$ is a sum, locally one can always find one such decomposition, which will in turn be unique due the fact the sum is a direct one.   How can I show that this decomposition exists locally? More than that, if $X = X_1 + X_2$ is the decomposition, is there a way the express the coordinate functions of $X_1$ and $X_2$ in terms of those of $X$?   First I thought about taking two frames that locally spam $TM$ and $TN$ and write down $X$ using them, but then the coordinate functions are of the form $X^i: M \times N \to \mathbb R$, and the vector field components in each subspace are not exactly fields of $M$ and $N$ because their coordinate functions don't have the right domains. Is there another better way to see this decomposition holds locally?


Self-deletion+undeletion clears NAA/VLQ flags

A user whose post was flagged as not-an-answer can remove all those flags by deleting his post and undeleting it right afterwards. This happens because those flags are (rightfully) cleared when the post is deleted. However, when the post is undeleted by the user without any edits I think any Community-cleared flags should be reactivated (or a new flag raised instead) to avoid someone from cheating this way to prevent his post from showing up in the history.


Is the critical t-statistic value always 1.96 for the standard normal distribution?

I am running a regression model and assume that all my variables are following a standard normal distribution.  From this model I am getting the value of the coefficients of the predictors and their standard deviation.  Then I am dividing these two numbers (coefficients/standard deviation) to get the t-statistic (I hope that this is the right way to do this).  Therefore, I now have the t-statistic values for each of my predictors and I want to compare these values to the critical t-statistic value which corresponds to a 5% p-value.   Is the critical t-statistic value always 1.96 for the standard normally distributed variables or also it depends on the sample size or on something else etc?


Installing VirtualBox inside of OpenVZ - missing sources

I'm attempting to install VirtualBox inside of an offsite OpenVZ instance I got a good deal on. The point being to run a small Windows XP box for some kind of Windows Server.   Yes, it's an experiment. No, it's not for production.   It seems like everything would work fine, but the installer can't find my distro's sources. My instance has Debian 6 installed. Running uname -r gives me 2.6.32-042stab061.2. I've looked all through my apt-cache for anything similar, tried installing linux-sources-2.6.32 and a variety of linux-headers, but I'm having no luck.  Does anyone know how I can get the proper sources for this instance so VirtualBox can compile itself? Thanks.


Show that the polynomial $(x-1)(x-2) \cdots (x-n)-1$ is irreducible on $\mathbb{Z}[x]$ for all $n \geq 1$

Show that the polynomial $h(x)=(x-1)(x-2) \cdots (x-n)-1$ is irreducible in $\mathbb{Z}[x]$ for all $n \geq 1$.   This problem seems to be hard to solve. I thought I could use Eisenstein in developping this polynomial, but it is a bad idea. Another idea would be to suppose the existence of $f(x)$ and $g(x)$, and suppose that $f(x)g(x)=(x-1)(x-2) \cdots (x-n)-1$. In this direction, we could analyse the roots of $h(x)$ I guess.  Is anyone could help me to solve this problem?


Prove « If P(A) is a subset of P(B) => A is a subset of B »

I need to prove «If P(A) is a subset of P(B) => A  is a subset of  B», generally, I understand the main way I should prove it, but the problem is in the formal, pedantic language I have to use to prove such statement.  General proof is: 1. Let suppose «a» is any element of A 2. If «a» is in A, thus «a» is a subset of P(A)…  The problem is in the formal and pedantic way to right it, can I just write, that element «a» is a subset of P(A) or should I define additional set, which will be a subset of P(A) and element «a» will be a part of this new set.  Please, help me to write such prove in a formal way with the correct syntax.  Thanks.


Pass 2D array of pointers by reference to function

I have a problem. I dont know how to pass 2D array of pointers to fuction by reference.  class SomeClass {  //body of class }   void somefunction(SomeClass ***array) { //body of function }  int main() { SomeClass * array[10][10] someFunction(array?????) }       Anyone know how to pass this array by reference??


Force position of full page sized figure

I'd like to have text that is placed after a figure which occupies a whole page also to be placed after that page in the produces PDF file.   Imagine this (pseudo latex, not necessarily a working example):  \documentclass{scrbook}  \begin{document} \section{ONE} lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem  ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum  dolor sit amet   \begin{figure}[!htbp]   % some figure that takes the whole next page \end{figure}  \section{TWO} lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem  ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum  dolor sit amet  \end{document}       This results in a pdf document which looks kind of like this:  ONE lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem  ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum  dolor sit amet   TWO lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem  ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum  dolor sit amet  ---- page break ----  [FIGURE]  ---- page break ----   So, how do I get the figure to be placed at the end of section{one} and before section{two} where it is supposed to be instead of slipping into section{two}? Even if that means that section{one} only takes a fraction of page. Isn't that what [!htbp] actually is for?   //edit Regarding  text (in German, unfortunately; I hope you'll understand it anyway, in case of necessity, using Google Translator) in some cases it's just not a good idea to use floats. What do you think about it?


I am faced with the following problem: Servers get saturated since current load balancing strategy is based on client IP. Some corporate clients access our servers from behind large proxies so all clients appear with same IP to our load balancer. I think we are using some hardware load balancing device (can investigate further if necessary). We need to maintain session affinity (site is constructed in ASP), so all requests with same IP get routed to the same node.  Since all the communication goes over the HTTPS, no request data (like session Id) is available to balancer as a client discriminator. Is there a way to use some other data besides the IP to distinguish between clients and route the clients even when coming from same IP to different nodes?  Note: I need to maintain the traffic between the balancer and nodes safe (encrypted).


Hello I have a bash script that is one liner for executing a piece of long running C++ code. Running ps -xaf the script is running and C++ code is its child  script.sh \_ long_main.cpp   When i run the code from the command line and press ctrl+C the bash script and the c++ code are interrupted and stop the execution. I love that.  However when i run a script and execute kill -SIGINT PID on my script the script dies, and C++ code runs on. When i run ps -xaf i see that sh script is dead indeed, but C++ code is running on its own, and it is now a top level process like so:  long_main.cpp   Could you please elaborate on what is the difference between CRTL+C and kill -SIGINT  in this case.


How can I get cut-off point in multivariated ROC analysis

If I have 1 independent variable (continues) and 1 dependent variable (binary), I can conduct logistic regression and ROC analysis, and I can get a cut-off point of independent variable using ROC analysis.  But, If I have 2 independent variable, how can I get two cut-off point in multivariate ROC analysis.   In STATA, I can get just maximal AUC score but I can't get the cut-off points each independent variables.


I just stumbled over . It was deleted by three users, that in the time of deletion were all ordinary users, see the :     Post Deleted by animuson♦, Rosinante, Manishearth   (animuson is new moderator, assigned the diamond only very recently)  However when trying to undelete I get the "A moderator has deleted this post and it cannot be undeleted" message.  The point of this is clear, that moderator decision to delete can't be reversed but as mentioned before, he wasn't moderator by the time of deleting the post.  Can this be changed so that moderator power is not retroactive?


How to mount a VirtualBox shared folder at startup?

I have Ubuntu installed in Virtualbox. I want to mount my VirtualBox shared folder in Ubuntu automatically when I log in Ubuntu. I put the following line in my ~./bashrc and ~/.bash_profile:  sudo mount -t vboxsf windows_share /media/windows_share   where windows_share is the name I created with Virtualbox. But everytime I start my Ubuntu, it asks me for passwd since it needs sudo. Is there anyway to automatically mount Windows share without entering password every time I log in?


Flash player for Chrome or Chromium browsers on Ubuntu 12.04

I have checked many threads, but could not find a solution. I want to use Chrome or Chromium on Ubuntu 12.04. I have installed Adobe Flash plugin from the Ubuntu Software Center, but it only works for Firefox, not for Chrome or Chromium web browser.   I have also tried to install by .tar ball. placed .so file in chromium browser installation directory and usr folder in /usr, but all in vain.   Is there any other solution or am I missing something? My Ubuntu Software Center is not able to locate Pepper flash plugin.


The following case makes more confuse to me. As far as I know, local variables don't return  by pointers or reference. for example   char * foo() {   return "Hello world"; }  int*  fooo() {     static int i = 100;     return &i; }   What would happen in both cases ?


How to test normality of errors in multiple linear regression?

In the linear model    we make the assumption that the vector of errors follows a multivariate normal distribution:   I want to test this assumption for a given data set. How can I do this? I was thinking about estimating the vector of errors by    where beta hat is the least squares estimator of beta.  And then use a test on e. Is this the right way to do this? And if so, which test should I use then.


bijection between $\mathbb{N}$ and $\mathbb{N}\times\mathbb{N}$

I understand that both $\mathbb{N}$ and $\mathbb{N}\times\mathbb{N}$ are of the same cardinality by the Shroeder-Bernstein theorem, meaning there exists at least one bijection between them. But I can't figure out what such a bijection would be. The paper that I'm reading gives an example of an injective function $f:\mathbb{N}\to\mathbb{N}\times\mathbb{N}$, $f(n)=(0,n)$, and an injective function $g:\mathbb{N}\times\mathbb{N}\to\mathbb{N}$, $g(a,b)=2^a3^b$. I was thinking perhaps if there were some way to combine these two, I could find a bijection, but I have no idea how to go about that or if it's even possible.  What is an example of a bijection between these two sets, and please explain the process by which you found it?


Flying to Frankfurt with a transit through Paris - is 90 minutes enough for a layover?

I have a flight booking from San Jose, USA to Frankfurt, Germany. The itinerary has a transit through Charles de Gaulle, Paris. Since this will be my first stop in the Schengen Region, will I have to go through Passport control at Paris?   My concern is that my flight has a transit time of 90 minutes at CDG. Will this be enough to go through whatever administrative steps are required?  EDIT: I'm an Indian citizen with a Long-Term residence visa for Germany.


Is there a difference between RAID 10 (1+0) and RAID 01 (0+1)?

I've seen both of these listed, both being striped and mirrored across multiple drives, but is the a difference between them that I'm not picking up on?


Question about the Afine Jacobi criterion.

I'm studying the chapter $10$ of Gathmann's note on algebraic geometry and there is a proposition that I don't understand.  Proposition 10.11. (Affine Jacobi criterion) Let $a \in X$ be a point on an affine variety $X \in \mathbb A^n$, and let $I(X) = \langle f_1, \ldots, f_r\rangle$. Then $X$ is smooth at $a$ if and only if the rank of the $r \times n$ Jacobian matrix $$\left(\frac{\partial f_i}{\partial x_j}(a)\right)_{i,j}$$ is at least $n - \text{codim}_X(a)$. (...)  The thing that bothers me is that the generators of the ideal $I(X)$ are not necessarily unique (right?), how can we conclude this statement? Could the Jacobian matrix of some generators satisfy the property while that of other generators does not?


Calculate $$\int\frac{1}{x\sqrt{x^4+x^2+1}}dx.$$ I applied the formula that says : $x^4+x^2+1=(x^2-x+1)(x^2+x+1)$ but I do not think it helps me in some way.


How do I install Adobe Acrobat Reader deb package downloaded from Adobe website?

I am new to Ubuntu, but I believe I have Ubuntu 11.10 installed correctly.  I am trying to install Acroread using AdbeRdr9.4.6-1_i386linux_enu.deb that I downloaded from the Adobe web site.  How do I do this?


Material is wood, I confirmed I can set my spawn using a bed in it, and there's a chair and table along with light sources. I did this in the old patch of terraria as well and it worked fine, but now it doesn't?


"quantum mechanical" vs "quantum-mechanical"

I'm currently writing a short report, where one (sub-)chapter heading reads:  The quantum(-)mechanical basics  I am now wondering, whether it is preferable with or without the hyphen. When googling both words in quotation marks, "quantum-mechanical" gets 5.170.000 results, whereas "quantum mechanical" gets 4.990.000 results. Even in the wikipedia-article on Quantum Mechanics, both spellings are used.


How to avoid for loop and use map or some other technique for below logic

I have below code ,but not able to understand how i can avoid second for loop inside account please suggest     public static void getOpenCaseOnAccount() {     Map<id,user> userIds = new map<id,user>([select id from user]);          map<id,account> accountMap = new map<id,account>( [select id,createdbyid from account where createdbyid in :userIds.keyset()]);          list<case> caseList =[select id,CaseNumber,accountid,Status from case where accountid in:accountMap.keyset()];          map<id,case>caseMap = new map<id,case>();     string caseNumbers='';     for(account acc:accountMap.values()) {         for(case c:caseList) {             if(c.AccountId == acc.Id && c.status!='Closed' ){                     caseNumbers += c.CaseNumber +'\n';             }         }     }     system.debug('caseNumber***'+caseNumbers); }


Escaping single quote character breaks String.format(stringToFormat, formattingArguments)

When I run this code:  String.format('Dear {0}, Don\'t forget .... {1} .... {2}', args);   Token 0 is replaced, but token 1 and 2 appear as {1} and {2}  This is caused by the backslash escaping the single quote by the t character.   My work around it to do this:  String.format('Dear {0}, Don`t forget .... {1} .... {2}', args);   But I would like to know how I could escape the ' character without breaking the merging of the arguments?


How can I change my method for logging into Stack Exchange (and remove the old one)?

Currently I sign into my Stack Exchange account using my Google login. I'd like to replace this with a different login method, though, so I can still log in to Stack Exchange, but not with Google.  How can I do this?


Why is the form "Did she have a big family" correct but "Did she has a big family" is not?

Why do we say "Did she have a big family" though "Did she has a big family" looks like the correct form? Could someone explain to me why we switch has to have in questions like that?


Moving all files in a folder to another folder without moving the subfolders

I have a folder named folder1. It has a bunch of files and two subfolders subfolder1 and subfolder2. I want to move all the files in folder1 to subfolder2 except the subfolder1. How can I do this?


I have directory with cca 26 000 files and I need to grep in all these files. Problem is, that I need it as fast as possible, so it's not ideal to make script where grep will take name of one file from find command and write matches to file. Before "arguments list too long" issue it took cca 2 minutes to grep in all this files. Any ideas how to do it? edit: there is a script that is making new files all the time, so it's not possible to put all files to different dirs.


How to disable snap reserve feature to auto-remove previous snap versions?

I am using snapcraft & snap in a virtual-box. I gave it a 15GB image size but it ended up full quickly.  After verifying with a disk space analyzer, found that most of the space took by snaps packages. I removed some which I don't need like gnome-3-26 & gnome-3-28 core extensions.  But as you can see in the listing below, snap preserves previous release of each package as backup.  I am using this vbox just for testing. I want to make snap act like apt so it keeps only current release. I don't want to worry about cleaning it manually.  How to make snap auto-remove older package releases?   # snap list --all Name                  Version                Rev    Tracking         Publisher   Notes core                  16-2.44.3              9066   latest/stable    canonical*  core core                  16-2.44.1              8935   latest/stable    canonical*  core,disabled core18                20200427               1754   latest/stable    canonical*  base core18                20200311               1705   latest/stable    canonical*  base,disabled gnome-3-34-1804       0+git.2c86692          27     latest/stable    canonical*  - gnome-calculator      3.34.1+git4.c387feb0   704    latest/stable/…  canonical*  disabled gnome-calculator      3.36.0+git4.51b0dc05   730    latest/stable/…  canonical*  - gnome-characters      v3.32.1+git2.3367201   367    latest/stable/…  canonical*  disabled gnome-characters      v3.32.1+git4.e06f0b2   495    latest/stable/…  canonical*  - gnome-logs            3.34.0                 93     latest/stable/…  canonical*  - gnome-logs            3.34.0                 81     latest/stable/…  canonical*  disabled gnome-system-monitor  3.32.1-3-g0ea89b4922   111    latest/stable/…  canonical*  disabled gnome-system-monitor  3.32.0-27-g32ed970e06  135    latest/stable/…  canonical*  - gtk-common-themes     0.1-36-gc75f853        1506   latest/stable    canonical*  - gtk-common-themes     0.1-30-gd41a42a        1502   latest/stable    canonical*  disabled lxd                   4.0.1                  14804  latest/stable    canonical*  disabled lxd                   4.0.1                  14890  latest/stable    canonical*  - multipass             1.2.0                  2006   latest/stable    canonical*  classic multipass             1.1.0                  1784   latest/stable    canonical*  disabled,classic my-snap-name          0.1                    x13    -                -           disabled my-snap-name          0.1                    x14    -                -           - snapcraft             3.11                   4282   latest/stable    canonical*  classic snappy-debug          0.36-snapd2.44+git     464    latest/stable    canonical*  -


Does $\sum_{k=1}^{\infty} \frac 1 {k^{1+\frac 1 k}} $ converge or diverge?

$\sum_{k=1}^{\infty} \frac 1 {k^{1+\frac 1 k}} $  What I've tried:  $a = $ $\sum_{k=1}^{\infty} \frac 1 {k^{1+\frac 1 k}} $  $b = $ $\frac 1 k$  Limit comparison test:  $\lim_{n\to {\infty}} \frac a b = 1$  Therefore, by Limit comparison test, a and b diverge or converge together.  Because b diverges (p-series), a must also diverge.  Have I made any mistakes?


archive.org URL not handled properly in comment

On  I wanted, given a point of seniority that was relevant to the description, to offer a crude metric of the date of earliest recorded webpage in archive.org.  The URL I gave was:  https://web.archive.org/web/19970415000000*/http://www.imsa.edu/~jhayward/   It seemed to be broken into two links and not obviously show someone else on the forum what I intended, which was to see the archive.org calendar page with 2 or so captures for the month. (I caught it quickly and used a URL shortener to circumvent the bug; the comment is the one edited to  ).  I'll try commenting the admittedly odd URL in a comment to this post to see what the engine makes of it.


I'm editing a children's book about wonders of the World. In this book, the authors are not native speakers(they are XACT BOOK(India)), and they wrote these specific places without article "the":     -It is Taj Mahal.      -It is Tower of Pisa.   At first, I thought it's okay, but there are some pages has article "the":     -It is the Great Pyramid of Giza.      -It is the Temple of Artemis.   These sentences really make me confused. After researching, this website- - gives me some advice:     Do use the before:           names of rivers, oceans, and seas: the Nile, the Pacific          points on the globe: the Equator, the North Pole          geographical areas: the Middle East, the West     deserts, forests, gulfs, and peninsulas: the Sahara, the Persian Gulf, the Black Forest, the Iberian Peninsula      Unfortunately, I'm still not sure that adding "the" before each wonder's name is a right choice. Should I add article "the" or not? I already posted this problem in , but I'm still in vain.


How to clear cache in centos remote server?

I had been trying to clear cache in a remote server and I got these commands.  First login as root user and execute:  [root@server ~]# sync [root@server ~]# echo 3 > /proc/sys/vm/drop_caches bash: /proc/sys/vm/drop_caches: Permission denied   But I am getting permission denied error.  how to delete the cache? because of this I am not able to install any application.


Delete duplicate consecutive occurring words/phrases from paragraph containing case sensitive words

Suppose I have a string that looks like s = "this is a random random this is a random Sentence sentence where phrases and words words repeat. This is the the second sentence sentence of the Same same paragraph" I want its output to be this is a random sentence where phrases and words repeat. This is the second sentence of the same paragraph" This is something that I have tried, it handles the repeated words and phrases but does not take care of case sensitive duplicate words like Sentence sentence and Same same s = "this is a random random this is a random Sentence sentence where phrases and words words repeat. This is the the second sentence sentence of the Same same paragraph" def postprocess(s):     while re.search(r'\b(.+)(\s+\1\b)+', s):         s = re.sub(r'\b(.+)(\s+\1\b)+', r'\1', s)         return s`  postprocess(s) the output it returns is this is a random this is a random Sentence sentence where phrases and words repeat. This is the second sentence of the Same same paragraph can anyone help me here?


I have this smartphone and i want porting Ubuntu Touch to him.  This device have analogical tech specs with BQ Aquaris M4.5, except display, camera, battery and some sensors. Can i change BQ official image for working with my phone, or i need go another way?  Also i install to him unofficial image of CM-based OS (TeslaOS), and have images of clean CM and AOSP for my device.  Sorry for my english :) And, if it possible, please give me answer on russian :)


On Ubuntu 20.04 (Lenovo Thinkpad), display scale of 100% is tiny, 200% is still small

Just got a Lenovo Thinkpad, installed Ubuntu 20.04, and below are the screenshots of my full screen when checking the display scale options for   100% scale: as you may see, the font/symbols are insanely tiny  200% scale: still pretty small, hence I had to roll with 300% (which is on a larger side, but there's no option for fractional scaling at 250%, it's only available between 100 and 200)    Does anyone know why that is happening? Why is scale of 100% looking so tiny as opposed to being a reasonable option as usual? Is it likely to be a Lenovo issue rather than Ubuntu 20.04? I'd used Ubuntu 16.04 & 18.04 on Dell before (not 20.04 though), and it was never an issue. Or maybe it's due to resolution?


$(X,\tau)$ needs to be $T_1$ in order to guarantee that $A'$ is closed?

Claim: If $(X,\tau)$ is not $T_1$ then $A'$ is not necessarily closed for any $A$.  Proof: Here is an example. Take $X=\mathbb{N}$ and let $\tau=\lbrace u\subset\mathbb{N}\mid 1\in u\iff 2\in u\rbrace$. Let $A=\lbrace 2,3 \rbrace$. Since any open set containing $1$ also contains $2$ it follows that $1\in A'$. Hence $\overline{A}=\lbrace1,2,3\rbrace$, as it is the smallest closed set containing $A$. But  $X\setminus A'=\mathbb{N}\setminus\lbrace 1\rbrace$ is not open because it contains $2$ and not $1$. The set of accumulation points $A'$ is not closed.  So, in general, trying to prove that $A'$ is closed in a topological space is an effort in futility?


What exactly is tested when a fire extinguisher is tagged?

I am just curious: the obvious is that the  pressure mass   can be inspected /measured to ensure that the device has not been discharged. Is there anything else that is measured \ checked?


Unicode character range not being consumed by Regex

NOTE Another question was asked  already. This question differs in that it is not about how surrogate pairs are calculated, but how to express unicode planes higher than 0 in a regex. It should be clear from my question that I already understand why these code units are being expressed as 2 characters - they are surrogate pairs (which was what the other question is asking about). My question is how can I convert them generically (since I have no control over what the regex being fed to the program looks like) so they can be consumed by the .NET Regex engine. Note I now have a way to do this and would like to add my answer to my question, but since this is now marked as a duplicate I cannot add my answer.  I have some test data that is being passed to a Java library that I am porting to c#. I have isolated a specific problem case as an example. The character class in the original was in UTF-32 = \U0001BCA0-\U0001BCA3, which is not readily consumable by .NET - we get an "Unrecognized escape sequence \U" error. I attempted to convert to UTF-16 and I have confirmed the results for  and  are what should be expected. UTF-32      | Codepoint   | High Surrogate  | Low Surrogate  | UTF-16 --------------------------------------------------------------------------- 0x0001BCA0  | 113824      | 55343           | 56480          | \uD82F\uDCA0 0x0001BCA3  | 113827      | 55343           | 56483          | \uD82F\uDCA3  However, when I pass the string "([\uD82F\uDCA0-\uD82F\uDCA3])" to the constructor of the Regex class, I get an exception "[x-y] range in reverse order". Although it is pretty clear the characters are specified in the right order (it works in Java), I tried in reverse and got the same error message. I also tried changing the UTF-32 characters from \U0001BCA0-\U0001BCA3 to \x01BCA0-\x01BCA3, but still get the exception "[x-y] range in reverse order". So, how do I get the .NET Regex class to parse this character range successfully?  NOTE: I tried changing the code to generate a regex character class that includes all of the characters instead of a range and it seems to work, but that is going to turn my regexes that are a few dozen characters into several thousand characters, which surely isn't going to do wonders for performance.  Actual Regex Example Again, the above is an isolated example of a failure in a much larger string. What I am looking for is a general way to convert regexes like these so they can be parsed by the .NET Regex class. "([\\u0000-\\u0009\\u000B\\u000C\\u000E-\\u001F\\u007F-\\u009F\\u00AD" + "\\u061C\\u180E\\u200B\\u200E\\u200F\\u2028-\\u202E\\u2060-\\u206F\\uD800-" + "\\uDFFF\\uFEFF\\uFFF0-\\uFFFB\\U0001BCA0-\\U0001BCA3\\U0001D173-" + "\\U0001D17A\\U000E0000-\\U000E001F\\U000E0080-\\U000E00FF\\U000E01F0-\\U000E0FFF] " + "| [\\u000D] | [\\u000A]) ()"


'-l' flag makes no difference in linking

I've been compiling some codes and found that the -llibrary flag has no effect in linking. Haven't really dealt with C++ before, so may be a simple mistake...  Here is the command I am using:  compiling:  g++ -c -Wall -std=c++11 -I/usr/include/flycapture -I/usr/include/ -I/usr/local/include/opencv2 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include/ -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include/  -I/usr/include/boost   FrameRateCounter.cpp -o FrameRateCounter.o g++ -c -Wall -std=c++11 -I/usr/include/flycapture -I/usr/include/ -I/usr/local/include/opencv2 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include/ -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include/  -I/usr/include/boost   SaveVideoClass.cpp -o SaveVideoClass.o g++ -c -Wall -std=c++11 -I/usr/include/flycapture -I/usr/include/ -I/usr/local/include/opencv2 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include/ -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include/  -I/usr/include/boost   SaveVideo.cpp -o SaveVideo.o   linking:  g++ -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio -lsigc-2.0 -lglibmm-2.4 -lglib-2.0  -lstdc++ -lncurses -lflycapture   FrameRateCounter.o SaveVideoClass.o SaveVideo.o -o saveVideo   The compiling worked okay, but when linking it gave me a lot of undefined reference error:  FrameRateCounter.o: In function  `FrameRateCounter::FrameRateCounter(unsigned long)': FrameRateCounter.cpp:(.text+0x48): undefined reference to `Glib::Timer::Timer()' FrameRateCounter.cpp:(.text+0x58): undefined reference to `Glib::Mutex::Mutex()' FrameRateCounter.cpp:(.text+0x68): undefined reference to `Glib::Timer::start()' ... SaveVideoClass.cpp:(.text+0x1512): undefined reference to `cv::VideoWriter::VideoWriter(cv::String const&, int, double, cv::Size_<int>, bool)' SaveVideoClass.cpp:(.text+0x1541): undefined reference to `cv::VideoWriter::~VideoWriter()' SaveVideoClass.cpp:(.text+0x1565): undefined reference to `cv::VideoWriter::isOpened() const'  ... SaveVideoClass.cpp:(.text+0x2ea): undefined reference to `FlyCapture2::Camera::IsConnected()' SaveVideoClass.cpp:(.text+0x308): undefined reference to `FlyCapture2::Camera::Disconnect()' SaveVideoClass.cpp:(.text+0x30d): undefined reference to `FlyCapture2::Error::operator!=(FlyCapture2::ErrorType const&) const'   Then, I removed all the -llibrary flags, and it gave me exactly the same error messages. That's the reason why I think these flags didn't take effect. But why?  Here's some output of pkg-config if it helps:  pkg-config --libs opencv  -L/usr/local/lib -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn -lopencv_dpm -lopencv_fuzzy -lopencv_line_descriptor -lopencv_optflow -lopencv_plot -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_rgbd -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_face -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lippicv -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_photo -lopencv_imgproc -lopencv_core   pkg-config --libs glib-2.0:  -lglib-2.0   pkg-config --libs glibmm-2.4:  -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lsigc-2.0   If anyone wants to take a look at the source code, here is the .  Update:  The order doesn't seem to be the problem. Libraries are given before the objects, so they should be available to FrameRateCounter.o, SaveVideoClass.o, and SaveVideo.o


How to use a value from a function and pass it down to another function python

This is a much-simplified version of my program but has the same idea: def calc():    x=1    y=2    z=6 def output():    final=x+y+z  how can I use the return values in the first function to be used in the second?


The speed of light and the increase of relativistic mass

The speed of light theory predicts that as things travel faster their mass increases, so I think we if we look at a plane accelerating from mach one to mach two and measure the relativistic mass of the plane, we'll see  an increase in relativistic mass regardless of how small. Is this true?


I am not able to update and install anything in virtual box. It shows error Err:1 https://download.sublimetext.com apt/stable/ InRelease   Could not resolve host: download.sublimetext.com  Err:2 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial InRelease   Temporary failure resolving 'ppa.launchpad.net'  Err:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease                   Temporary failure resolving 'us.archive.ubuntu.com'  Err:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease   Temporary failure resolving 'ppa.launchpad.net'  Reading package lists... Done  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'  W: Failed to fetch http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'  W: Failed to fetch https://download.sublimetext.com/apt/stable/InRelease  Could not resolve host: download.sublimetext.com  W: Failed to fetch   http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'  W: Some index files failed to download. They have been ignored, or old ones used instead.


How to remove characters from an NSString and replace with spaces?

I have a NSString:  NSString *string1 = @"http://example.com/this-is-an-example-post"   By removing a range of characteres I have substringed it to:  NSString *string2 = @"this-is-an-example-post"   But I am struggling to get it into the form of:  NSString *string3 = @"this is an example post"   Any help? Much appreciated.


How should I find y in $23y \pmod {63} = 1$ using Extended Euclid's Theorem?

How do I find a integer $y$ here such that $23y = 1 \pmod {63}$ . I got it using hit and trial. But how to approach using the extended Euclidean algorithm?


Scoring predictions of an ordinal variable

I read about using scoring rules to evaluate the performance of predictive models. In the Wikipedia article about the , it is stated:     The Brier score is appropriate for binary and categorical outcomes   that can be structured as true or false, but is inappropriate for   ordinal variables which can take on three or more values (this is   because the Brier score assumes that all possible outcomes are   equivalently "distant" from one another).   What are some examples of scoring rules used for evaluating predictions of ordinal variables? For example, if the set of possible outcomes is $\{0, 1, 2, 3, 4, 5, 6, 7, 8, 9\}$ and a predictive model yields $p_6 = 0.3$, $p_7 = 0.5$, $p_8 = 0.2$ (where $p_i$ is the believed probability that the outcome will be $i$), this predictive model should receive a lower score if the outcome is $3$ than if it is $4$.


backing up files with a long file name comupter pc [dell] windows8.1

I am trying to back up my cloud [desktop application] [sugar sync, dropbox] to a western digital [i have 500gb,1T and 2T] Somewhere i can't continue as it says that the file name is too long!? I can skip and go further but i discovered that many thousands of files may not be backed up this way. The suggestion of western digital to change the file name is nearly silly as this would mean to find every file and may take whole days if not weeks. Do you have any suggestion?? May it be in not to technical language? thanks a lot


Had an argument with my wife regarding the propriety of using the expression "wow". It all started when I blurted out the word in astonishment when the preacher mentioned a negative observation. He mentioned that a well known religious leader wrote in a column a negative statement, "how could our country (not the U.S.) claim to be Christian and yet be so corrupt..". I could not help but blurt out "Wow". My wife reacted and whispered to me that wow can only be used as a reaction to something positive. Is she correct?


If real function $f$ is continuous and injective, is it strictly monotone?

Problem Let $f:\mathbb{R}\to\mathbb{R}$ such that $f$ is continuous and injective. Prove (or disprove) that $f$ is a strictly monotone function.  I have tried to prove the monotonocity of $f$ for then by the injectivity of $f$ strict monotonicity will follow. However, I couldn't make any success. I also tried to show that,  Let $f:\mathbb{R}\to\mathbb{R}$ such that $f$ is not a strictly monotone function. Then show that $f$ is either discontinuous or not injective.  In this case also I couldn't proceed beyond some trivial observations. Can anyone help me to prove it?


I would like to expect the below output in my LaTeX.    The figure caption should be place in the bottom of the figure. The text should be plurred with opacity. How do achieve this?  My MWE is:  \documentclass{book} \usepackage{graphics} \usepackage{caption} \DeclareCaptionFormat{overlay}{\gdef\capoverlay{#1#2#3\par}} \DeclareCaptionStyle{overlay}{format=overlay} \begin{document}  \begin{figure*} \includegraphics{example-image-a} \caption{Many of the simple rexpressions in algebra can be thought of     interms of the areas of rectangles.} \end{figure*} \end{document}


Serana following when I haven't told her to follow me

Serana from Dawnguard DLC is following me when I don't want her to.   I have a stealthy playing style so it's annoying when I constantly have her behind me.   The setting looks like this: She follows me automatically if I open her dialogue she says something about her brother and continues to follow me.   When I press follow me she says: I knew you'd miss me. But when I open her dialogue again it does the same thing.   I'd like to have her operate as the standard npcs with all the normal actions.  Any other npc from Dawnguard doesn't have this problem only Serana. I tried to  turn it off all but all mods I've found don't work!


I am trying to finish my thesis which will be printed two sided.  Here is the core of my latex document:  \begin{document} \include{garde} \frontmatter \selectlanguage{french} \include{remerciements} \selectlanguage{english} \include{introduction} \mainmatter \include{chapter1} \include{chapter2} ... \end{document}   The problem I have is the fact that the title page (named "garde") and the acknowledgments (named "remerciements") are on the same page. Thus I would like to insert a single page to be the back of the title page. But all the attempts I have made, based on \newpage or other related commands have as result the addition of two pages. Thus the "remerciements" and the introduction begin both on a back page.  Could you provide me help on that topic ? Thanks


How is "thought it an outrage" grammatically correct?

I came across this sentence:      He also believed that virtually all good popular music had its roots in black culture, and thought it an outrage that, as jazz became popular across America, its origins were being obscured from view.    Shouldn't it be "thought it WAS an outrage" instead of "thought it an outrage"? What makes the above sentence correct, if it is?


Number of $2 \times 2$ matrices over the field with $3$ elements, with determinant $1$

How can I show that the number of $2 \times 2$ matrices over the field of three elements with determinant $1$ is $24$?


I came across an exercise "custom" block cipher which looks like a counter mode implementation, but it is not exactly it. I want to check if this scheme is IND-CPA secure.  Here is a picture of the scheme:    I have already ruled out the following attacks:  1) Using the raw CBC attack, due to that it behaves like a counter mode  2) Attacking the IV, assuming that it increases by a known number every time, because only one of the two plaintext messages will be returned to the adversary. So this makes impossible the connection to one of the two original messages (like the answer on  question suggests)  Any help or suggestions would be very helpful.


Create a Task on Opportunity Only when Opportunity owners are active

I have created a trigger which should create a task on opportunities only when opportunity's owner is active.Here is my trigger and helper class:  Trigger  trigger AutoTaskCreation on Opportunity (before insert, before update, after update) {     if (Trigger.isAfter) {         if (Trigger.isUpdate) {             TaskServices.createTaskforOpp(Trigger.new);         }     }   }  Helper Class  public with sharing class TaskServices {  public static void createTaskforOpp(List<Opportunity> oppList) {      List<Task> taskList = new List<Task>();     For(Opportunity opp : oppList) {       if(opp.Owner.isActive == false) {       Task newTask = new Task(            WhatId = opp.Id,            OwnerId = opp.OwnerId,            ActivityDate = Date.today(),           Subject = 'Test Subject',            Description = 'This a Test'        );         taskList.add(newTask);      }         }         insert taskList;     } }   The above code is creating task for both active and inactive opportunity owners. Why if(opp.Owner.isActive == false) is not working?


Regex matching multiple patterns with prefix and suffix

I have a string like so      This is a (Lock)item response(Unlock) and (Lock)request(Unlock)   I need to get all the strings between the prefix (Lock) and suffix (Unlock)  I need to get    item response request   I am working in c# and have tried the following    (?:(Lock))(.*)(?:(Unlock)) (?<=(Lock))(.*)(?=(Unlock))   Not sure what to put in the middle part in place of (.*)


Explanation that air drag is proportional to speed or square speed?

A falling object with no initial velocity with mass $m$ is influenced by a gravitational force $g$ and the  (air resistance) which is proportional to the object's speed. By Newton´s laws this can be written as:   $mg-kv=ma$ (for low speeds)  $mg-kv^2=ma$ (for high speeds).    I assume that $k$ is a positive constant that depends on the geometry of the object and the viscosity. But how can one explain that the air resistance is proportional to the velocity? And to the velocity squared in the second equation?


In the beginning of "Quantum Field Theory for the Gifted Amateur," there is the statement:     Every particle and every wave in the Universe is simply an excitation of a quantum field that is defined over all space and time.   To an naive (not gifted) self-studier, this came as quit an eye-opener. Over the course of a non-physics education, one tends to get so used to the existence of atoms, protons, electrons,etc., even subatomic particles, that it is easy to overlook where they came from.  So the above remark is a nice resolution. Then my question is, where do these quantum fields come from.   Further, with a subsequent assertion that, e.g., all protons are perfectly alike, as mentioned on pdf page 9 of Prof. Tong's notes:    in that "there is a sea of proton stuff filling the universe," if this sea fills the universe, then where do the seas of other particles fit in - and how do they keep things straight amongst themselves.  Maybe this is too broad a question, or, more likely, I am inadequately versed in these matters. But I would appreciate any help or reference suggestions.  Thanks


I am traveling for the first time to a different country with Turkish Airlines. I have a flight from New Delhi to Bordeaux,France with layover at Istanbul. So will the baggage be transferred by them, or I will need to collect my baggage and get to the other flight? Both the flights are same i.e, Turkish Airlines.


US citizen visiting Canada with a passport expiring in 5 months

I’m going to Canada and my passport  will expire in five months. Will this be OK? I cannot find the answer. I know some countries require it to be no more than six months before expiration. But I know some countries have different rules


I'm walking out of a bar and I'm putting my hand in my pocket, and I can't find my wallet.  So it's better to say "I have forgotten my wallet" or "I forgot my wallet" ?


I am using windows subsystem for linux (WSL) and I am writing a bash script to check the battery temperature. Information related to battery can be accessed in the directory "/sys/class/power_supply/battery". The information for battery temperature is available in the file temp (which is a read only file). when i output the content of the file,it gives me a number which I think is the battery temperature but there is no temperature unit associated with it. In my case,my battery temperature is shown as 256. Can anybody tell me what is the temperature unit associated with it?


Nautilus Properties No Longer Shows 'Make Link' Option

I've searched pretty hard - but cannot find out how to make Nautilus in Ubuntu 17.10 show 'Make Link'on right clicking a directory, either directly or via Properties. I'd like to set symlinks for use by Insync but since updating Ubuntu to 17.10 this option has disappeared. Possibly it doesn't help that I'm now using Budgie-Ubuntu but even adding alternative desktop environments doesn't do the trick. (Not using Wayland, by the way...) I just cannot understand why the devs would remove this option! David


What is the ideal charging behavior for a new Retina MacBook Pro?

I've called Apple Support a bunch of times, but I got conflicting answers.  To my knowledge, new technology makes it okay to keep the charger plugged in non-stop, but I want to make sure I am properly caring the computer.


How can I trigger a click item from a form that is loaded via ajax?

When I click on .edit-item then a form is loaded to my page via AJAX  function forms(e, el) {   alert("ok");   // here the ajax form is loaded, didn't paste it here because too much code }  $('.table tbody').on( 'click', '.edit-item', function (e) {   forms(e,this); });   In the loaded form there is a selectbox "change". What I want to do is, on change, simply trigger the .edit-item again.    $('#change').on('change', function(e) {   $(".edit-item").trigger("click"); });   I expect now an ok on change but nothing happens.


I am currently running MacBook Pro (Retina, 15-inch, Mid 2014) with Yosemite 10.10.2  For iPhoto I have a current library and 2 older libraries and now wish to:   Merge all three into one iPhoto library Remove duplicates   How can I accomplish this?


Fixing spacing between divs and sides of web-page

I am trying to create 3 div boxes that are next to each other with some spacing in between them and get moved based on the size of the screen  So far I have the following code:    body {   min-height: 450px;   height: 100vh;   margin: 0;   background: radial-gradient(ellipse farthest-corner at center top, #f39264 0%, #f2606f 100%);   color: #fff;   font-family: 'Open Sans', sans-serif; }  .leaderboard {   position: relative;   top: 50%;   left: 33%;   right: 33%;   float: left;   margin: 1%;   transform: translate(-50%, -50%);   width: 285px;   height: 308px;   background: linear-gradient(to bottom, #3a404d, #181c26);   border-radius: 10px;   box-shadow: 0 7px 30px rgba(62, 9, 11, 0.3); }

     I am having the following problem - when I try to shrink the page sideways the space between the right-most div and the right side of the page shrinks faster than the space between the left-most div and the left side of the page.  I am trying to make the space between the side divs and the sides of the page symmetrical.


Consider a proximable function $f$ where the proximal operator is defined as follows, $$\operatorname{prox}_{\lambda f}(x) = \arg \min_z \frac{1}{2\lambda}\left\| z - x \right\|_2^2 + f(z)$$   $\lambda \geq 0$. With an additional constraint the problem is $$\arg \min_{z \ge 0} \frac{1}{2\lambda}\left\| z - x \right\|_2^2 + f(z)$$   which we can rewrite as $$\arg \min_z \frac{1}{2\lambda}\left\| z - x \right\|_2^2 + f(z) + I_{\left\{z \ge 0\right\}}(z)$$  $I_C(z)$ is an indicator function. The function $g$ defined as $$g(z) = I_{\left\{ {z \ge 0} \right\}}(z)$$ is also proximable and the resultant prox operator for $g$ is just a projection on the non-negative orthant. Combining all the above our unconstrained problem is defined as  $$\arg \min_z \frac{1}{2\lambda} \|z - x\|_2^2 + f(z) + g(z)$$  Consider a toy example $f\left(x\right) = \|x\|_1$, then the solution of the constrained problem is obtained from component-wise thresholding, $z_i = \max(\max( |x_i| - \lambda, 0) \operatorname{sgn}(x_i),0)= \max\left(x_i-\lambda,0\right)$.  The solution seems like a composition of two proximal operators,  $\operatorname{prox}_{g} \circ \operatorname{prox}_{\lambda f}$. Stated differently, it is also projection on the intersection of two sets, $\ell_1$-norm ball and the positive orthant. It is also similar to the idea of projected subgradient descent algorithm. Are there any general results/conditions where prox operator can be applied to composition of two proximable functions.


There are some APIs with some versions. i.e.      1. /v1/order/create     2. /order/v2/create  Their is common middleware going to invoke. In middleawre I need version of API (i.e. v1 or v2) to perform some specific task for specific version. I tried with below code but failing for 2nd type of url.  var pieces = req.url.replace(/^\/+/, '').split('/'); var version = pieces[0]; req.version =  version || 0;   Please suggest. Thanks


Is there a word for when something's name completely fits the description or personality?

for example in a story i'm writing, there is a character named Revenge who's main goal is to get revenge. Is there a single word for that?


Can anyone recommend any good resources for learning C++ Templates?  Many thanks.


I installed Ubuntu over a year ago on my Dell PC.  I have just decided to try to run FreeBasic on the Ubuntu system.  On powering-up my PC I have used the 'select Ubuntu' option but even after an hour has elapsed, all I get on the screen is your purple'ish-coloured background (same as background on this page), and it periodically displays a log-on/sign-in box for about 2 seconds.  I have no idea what to do next.  (Am using Internet Explorer & WindowsXP, unaware of version no. for Ubuntu)


Induction: $\sqrt{2\sqrt{3\sqrt{\cdots\sqrt n}}} < 3$

I'm trying to prove that  $$ \sqrt{2\sqrt{3\sqrt{4\cdots\sqrt{n}}}} < 3 $$  for any $n$ and have decided to use strong induction and instead just show that  $$ \sqrt{k\sqrt{(k + 1)\cdots\sqrt{n}}} < k + 1 $$  for any choice of $k$. Does anyone have an idea on where to proceed from here?


Force felt by a moving charge due to its own magnetic field?

Suppose a moving proton traverses a uniform magnetic field with constant velocity. Note that because the proton is moving, it is generating its own magnetic field.   Is the magnetic force experienced by the proton completely explained by the Lorentz force law, i.e., F = q (v x B)?   Or, is the proton also experiencing an additional magnetic force arising from the interaction of its own magnetic field with the external field? If that is incorrect, is the Lorentz force law actually just describing the result of proton field-external field interactions, such that any and all magnetic force on the proton is explained by the Lorentz force?


Unable to access files on Ubuntu which is of Windows directory

I want to access files that is on Windows since my laptop is dual booted. And I have been using Ubuntu 16.04 platform. But the problem is I'm unable to access my files. Following is the dialog box message appearing:  Error mounting /dev/sda4 at /media/iammnz/90502B6A502B566E: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda4" "/media/iammnz/90502B6A502B566E"' exited with non-zero exit status 14: Windows is hibernated, refused to mount. Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.


Prevent multiple application instances after Windows restarts

I have some applications, like Outlook, in my Startup folder so they run whenever my PC starts.  Now when Windows 10 installs updates and restarts itself, I come back to my desktop and have 2 instances out Outlook running. One from the Startup folder, and another because Windows restores any applications that were running at the time it shut down.  Is there any way to make it so only one instance will launch?  My PCs are all running Windows 10 1709 Pro, and exhibit this behavior for both Domain Accounts and personal Microsoft Accounts.


An equivalence of uniform continuity in a metric space

Let $(E,d)$ and $(F,d')$ be metric spaces and consider $f:E\rightarrow F$. Prove that:  $f$ is uniformly continuous in $E$ $\iff$ for every  $A,B\subseteq E$ such that $d(A,B)=0$, it follows that $d'(f(A),f(B))=0$.  Where $d(A,B)=inf\{ d(x,y)|x\in A, y\in B\}$  The $\implies$ direction is easy from the definition but in the other direction I'm lost. Any help will be gratefully received.


All websites and blogs with more backlinks have their posts on 1-2 pages in SERPs. I have one question that if will increase backlinks of my website then my website can also get higher position in search engine results?


Configuring wireless router to give priority to particular computer

I have a DLINK DIR-651 and I'm wondering if it's possible to configure it so that one particular computer gets priority. In other words it gets more bandwidth. What would be the steps to take? I tried adding the computer to DMZ but speeds went way down. I don't care about security (through the router), the computer has it's own security software.


Is there a word to define a period of four months?


How to reliably get flatbreads to puff or balloon up?

When making similar (wheat) flatbreads of many types (from different cultures e.g. chapati and pita), it is desirable for it to puff up like a balloon so that a pocket forms on the inside. Presumably, this happens because steam forms on the inside while the outside is cooked enough to hold it in. How can I make this happen reliably most of the time? What factors does this depend on? The dough hydration, heat, the thickness of the dough, etc.? Does the optimal technique differ between unleavened, chemically leavened, or yeast-leavened breads?


$i^{-1} F$ a sheaf if and only if $\varinjlim_{ U \subseteq X \text{ open}, ~ x,y \in U } F(U) \to F_x \times F_y$ is an isomorphism

Let $X$ be a topological space containing two closed points $x,y$ and let $i : \{x,y\} \to X$ denote the inclusion map. Notice that $\{x,y\}$ carries the discrete topology. Let $F$ be a sheaf on $X$. Then $i^{-1} F$ is a presheaf on $\{x,y\}$ which is given by $(i^{-1} F)(\emptyset)=1$ (the terminal set), $(i^{-1} F)(\{x\}) = F_x$ (the stalk at $x$), $(i^{-1} F)(\{y\})=F_y$ (the stalk at $y$) and $$(i^{-1} F)(\{x,y\}) = \varinjlim_{ U \subseteq X \text{ open}, ~ x,y \in U } F(U).$$ Why is, $i^{-1} F$ a sheaf if and only if the canonical map $$\varinjlim_{ U \subseteq X \text{ open}, ~ x,y \in U } F(U) \to F_x \times F_y.$$ is an isomorphism ?.   Thanks a lot to all of you.


I am trying to re-install r in my ubuntu 14.04. But I keep getting this error always I try to install r as sudo apt-get install r-base

The following packages have unmet dependencies:  r-base : Depends: r-base-core (>= 3.2.1-1utopic0) but it is not going to be installed           Depends: r-recommended (= 3.2.1-1utopic0) but it is not going to be installed           Recommends: r-base-html but it is not going to be installed  r-base-dev : Depends: r-base-core (>= 3.2.1-1utopic0) but it is not going to be installed E: Unable to correct problems, you have held broken packages.


Is there a word for the sadness over "What might have been"?

Context: You made the decision not to see a person any more. The relationship was good, you were both happy with one another but the one main stumbling block (for you) in the relationship was never dealt with. It remained, a permanent fixture, that forced you to make that sad, and final decision.   Is there a word, an idiom, or a famous line that expresses the sadness for something that might have been; e.g. a rich and fulfilling relationship. It's not nostalgia, because that expresses a wistfulness for the past.   Instead, you are wistful for the future.


How to give root privileges to other user

I want my second user account to have root privileges in order to change udev rules.


How can I submit a URL to Google's search engine without having a Google account?

How can I notify Google's search engine of the existence of a website without opening an account with that company?


How to compute $\mathbb{P}(3x > -y > x \land x > 0 \land y < 0)$?

Knowing that both $x \sim \mathcal{N}(0,1)$ and $y \sim \mathcal{N}(0,1)$ ($x,y$ independent from each other), I want to compute  $$\mathbb{P}(3x > -y > x \land x > 0 \land y < 0)$$  I'm aware that if two events are independent, I can take the two probabilities and multiply. E.g., if I were only interested in   $$ \mathbb{P}(x > 0 \land y < 0) $$  I would simply compute $\mathbb{P}(x > 0) \mathbb{P}(y < 0)$.  However, in the problem described above, the condition $3x > -y > x$ is clearly not independent from the two other conditions $x >0 \land y <0$. I think that I should re-formulate the condition to $3x > -y \land -y > x$ ... but that still leaves the issue that the conditions are somewhat dependent from each other.  How can I approach such a problem?


R - Data Simulation with Multiple Random Slopes

I am trying to run the following model:             I(week^2):mutation_status +             (week + I(week^2) | subject_id) ,            data = sim_dat)  This is the output I get from this model. There is one random slope that is rather high (-0.95) and I was curious to know how I can change my data simulation code to lower that value.  I am also having issues with convergence and would love to get thoughts on how to avoid issues regarding convergence. Thank you! Linear mixed model fit by REML. t-tests use Satterthwaite's method [lmerModLmerTest]  Formula: fetal_weight ~ week + mutation_status + week:mutation_status + I(week^2) +  I(week^2):mutation_status + (week + I(week^2) | subject_id) Data: sim_dat  REML criterion at convergence: 114  Scaled residuals:      Min      1Q  Median      3Q     Max  -1.9343 -0.3980 -0.0075  0.4168  1.9928   Random effects:  Groups     Name        Variance  Std.Dev. Corr         subject_id (Intercept)   1.51524  1.2309                          week         61.01832  7.8114   0.16                   I(week^2)   496.20236 22.2756  -0.19 -0.95  Residual                 0.05892  0.2427              Number of obs: 100, groups:  subject_id, 20  Fixed effects:                            Estimate Std. Error       df t value       Pr(>|t|)     (Intercept)                  3.1331     0.4226  17.9961   7.413 0.000000713699 *** week                        -1.2465     3.5210  18.0053  -0.354          0.727     mutation_statusY             0.5061     0.5977  17.9961   0.847          0.408     I(week^2)                   34.5706    10.8146  18.0084   3.197          0.005 **  week:mutation_statusY       -1.0697     4.9795  18.0053  -0.215          0.832     mutation_statusY:I(week^2) 202.5521    15.2942  18.0084  13.244 0.000000000101 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Correlation of Fixed Effects:             (Intr) week   mttn_Y I(w^2) wk:m_Y week        -0.160                             muttn_sttsY -0.707  0.113                      I(week^2)    0.145 -0.966 -0.103               wk:mttn_stY  0.113 -0.707 -0.160  0.683        mtt_Y:I(^2) -0.103  0.683  0.145 -0.707 -0.966  Code for data simulation: set.seed(123)  # set the seed J <- 20  # number of individuals (clusters) cs <- 5  # number of time points (cluster size) gam <- c(0, 0.75, 1.34)  # fixed effects G <- matrix(c(1.75, 0, 0,               0, 0.0125, 0,               0,0,0.0625),              nrow = 3)  # random effect variances (G-matrix) sigma2 <- 0.08  mutation_status <- rep(0:1, each = 5) mutation_status <- rep(mutation_status, times = 10)  X <- cbind(1, seq_len(cs),             (seq_len(cs))^2)  # for each individual X <- X[rep(seq_len(cs), J), ]  X <- X[rep(seq_len(cs), J), ]  X[,2] <- X[,2]*0.05 X[,3] <- X[,3]*0.05  # repeat each row cs times pid <- seq_len(J)  # individual id pid <- rep(pid, each = cs)   # Generate person-level (lv-2) random effects uj <- lmf::rmnorm(J, mean = rep(0, 2), varcov = G)  # Generate repeated-measure-level (lv-1) error term eij <- rnorm(J * cs, sd = sqrt(sigma2))  # Compute beta_j's betaj <- matrix(gam, nrow = J, ncol = 3, byrow = TRUE) + uj  # Compute outcome: y <- rowSums(X * betaj[pid, ]) + eij + mutation_status*X[ , 3]*10 + 3  # Form a data frame sim_dat <- tibble(y, time = X[ , 2], pid, mutation_status) sim_dat <- sim_dat[,c(3,2,4,1)] colnames(sim_dat) <- c("subject_id", "week", "mutation_status", "fetal_weight") sim_dat$week_2 <-sim_dat$week*5 + 15  sim_dat$mutation_status <- as.factor(ifelse(sim_dat$mutation_status == 0, "N", "Y")) sim_dat$subject_id <- as.factor(sim_dat$subject_id ) #Model Building


Java beginner, input.close(); after do while loop, HOW?

I'm I total beginner and can't figure out what the problem is here - I want the scanner input to close after when the user enters "exit". When I try my code it says "Exit >" and I'm still able to do input. Is it something with the scope of input.close()?       String command;          do {         System.out.print("> ");         command = input.nextLine();           switch (command) {         case "register new dog":             System.out.println("You gave command: register new dog");             System.out.println("Command? ");             break;          case "increase age":             System.out.println("You gave command: increase age");             System.out.println("Command? ");             break;          case "list dogs":             System.out.println("You gave command: list dogs");             System.out.println("Command? ");             break;          case "remove dogs":             System.out.println("You gave command: remove dogs");             System.out.println("Command? ");             break;          case "exit":             System.out.println("Goodbye!");             break;          default:             System.out.println("Error: invalid command, choose again: ");             System.out.println("Register new dog");             System.out.println("Increase age");             System.out.println("List dogs");             System.out.println("Remove dogs");             System.out.println("Exit");            }      } while (command != "exit");      input.close();


Should Hot Network Questions (HNQs) be customizable?

I apologize if this has already been suggested elsewhere; I did a cursory search that did not return any results. At the least, it looks like this suggestion does not have it's own question on Meta.  There has been quite a bit of buzz regarding the Hot Network Questions (HNQs), and what should and should not be included.   I would suggest that, regardless of what is decided, the HNQs should be customizable. Of course, there should be a default list / behavior of what is included in the HNQs, which would be used from anonymous users and by default.   This default list may exclude certain sites, for various reasons. This question isn't meant to discuss the merits of this, but to point out that the pain of these decisions on certain users (some users will be upset if a site is excluded, others will be upset if a site is included) may be alleviated by allowing users to customize which sites show up in the HNQs.  For example, (I believe) many of the language sites are excluded from the HNQs by default, as the questions are not relevant to most users. Well, if I speak Chinese, it would be great to include that site in my HNQs. Or, if I am only interested in StackExchange for programming / technical questions, I may wish to limit my list to only those sites.  I know this feature would come at a "cost", of reducing StackExchange's ability to advertise certain sites to certain users (the whole point of the HNQs!). However, if a user deselects a site from their HNQs, it's likely they aren't interested in the site and wouldn't visit it anyways. I would also argue they will now be more likely to pay attention to the HNQs and visit other sites that they are interested in.  EDIT: Regarding the marked duplicate, ... That question is similar, although it sparked answers closer to "here's a workaround you can implement to achieve this functionality", rather than a discussion of whether this functionality should be implemented into the site. I think it's also worth revisiting this idea, as it seems the answer 4-5 years ago was "We're going to try some other things to improve HNQs before considering this," and obviously those things have been tried, to varying levels of success. I also think that the recent events around HNQs give this idea more merit.  In addition, most of the previous suggestions came from a place of "I want to exclude a site from my HNQs", whereas, this one comes from both directions, including "I want to include an excluded site in my HNQs". For example, I really enjoy Interpersonal SE, and it, along with the Workplace SE, are my big reasons for looking at the HNQs. Since it has been excluded, I have (1) not spent as much time looking at the HNQs, and (2) almost stopped looking at Interpersonal SE, due to the inconvenience.  The idea of excluding sites or questions for non-practical reasons (i.e. a title not being in English) is a fairly new one, as far as I am aware, and I think it warrants a revisiting of this suggestion.


What's the name of this sound/collection of sounds?

What is it called when one expresses "Yes", "No", or "I Don't Know" without using words - just humming their response?  You know, when someone responds with a low note than a high note for Yes or "Ah-huh!"; a low note and a slightly lower note for No or "Nuh-uh"; or a low note, a high note, and a low note for I don't know.


$$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$   by directly substituting $x=0$ i got $\infty$ by using L-H's rule, i got $-1/8$   the given options are  $a)\frac{24e}{11}$    $b)\frac{11e}{24}$    $c)\frac{e}{11}$    $d)\frac{e}{24}$    may be the question would be  $$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$


Every so often I appear to have a random reputation gain of 1. It just happened on math.stackexchange and I know that I didn't get downvoted by anyone in between. Any ideas of how that happens?


Python- Extract object type from output of type function

I have a function (called data_type) that returns the type of the object in the form <class 'int'>. I need the output of this function to check whether the object is int or float or str. The problem is that I cannot use the output if data_type in ininstance as I need to pass it the original object rather its type. What I am saying is that I cannot use the following -   isinstance(data_type(some_variable), float)   as it translates to  isinstance(<class 'float'>, float)   and even though the object is of float type, it will return False because the type of class 'float'> is type itself.   I understand that some will suggest me to change the way I approaching this but and I agree this is not the way to go about it but I can't change the output type of the data_type function.  I looked in to the  module where they have things like types.StringType but unfortunately, that's only for python2. That functionality isn't available for python3 (which is what I am currently using and can't change).  So the question is how do I use the return of the type function to check if an object is str/float/int.   I need to select out objects which are of class str and so as a hack I am using   if str(self.dtypes[each_col]) == "<class 'str'>": ...  But I am not comfortable doing that. Is there any other way through which I can do this?


Prove $\gcd(a^m - 1, a^n - 1)=a^{\gcd(m,n)} - 1$ for any natural number $a>1$.

Let $n$, $m$ - natural numbers, at least one $>0$. Let $a$ - natural number $>1$. Prove  $\gcd(a^m - 1, a^n - 1)=a^{\gcd(m,n)} - 1$.  It is probably easy, but I cant catch it. I thought abut treating these guys as polynomials of variable "$a$". Looking that way, I know that $a^d-1$ divides $a^n - 1$ (both treated as polynomials) if and only if $d$ divides $n$. Therefore, I see that guy on the right divides guys on the left. But how I can it is the biggest common divisor? I don't see it. Looking from the ideal point of view is also pointless. That exercise does not have hint at the end of book I'm working with. Thanks in advance for help and Merry Christmas.


How to pass password to mysql command line

I have MySQL password saved on a file foo.php, for example P455w0rd, when I try to use it:  $ cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2 | mysql -U root -p mydb -h friendserver Enter password: (holds)  $ echo P455w0rd | mysql -u root -p mydb -h friendserver Enter password: (holds)   Both option still ask for password, what's the correct way to send password from stdin?


Let $G$ be a group and let $f:G\to G$ be an isomorphism. Let $H = \{ a \in G \; | \; f(a)=a^{-1}\}$ Prove that $H$ is a subgroup of $G$ if and only if $G$ is abelian.  My attempt: I already know that $H$ is a subset of $G$ since $a$ is in $G$. And that $H$ is $a$ group if and only if for every $a$ and $b$ in $H$, $ab^-1$ is in $H$. That is, if $f(a)=a^{-1}$ and $f(b)=b^{-1}$ then $f(ab^-1)=(ab^{-1})^{-1}=(b^{-1})a$.  But I don't know how to derive this nor the converse based on the abelian property of $G$ that for every $a$ and $b$ in $G$, $ab=ba$.  Please help some. Thanks!


javascript function to get all the days of a week

I am trying to get an array of all days in a week like today is Aug 1st so i need to get an array of this week which will look like     ['2019-07-28' ,'2019-07-29', '2019-07-30', '2019-07-31', '2019-08-01', '2019-08-02', '2019-08-03']   in order to achieve this i wrote the following code   var week_list = [] const today = new Date() week_list.push(today.toISOString().substring(0,10)) var counter = today.getDay() // get next  var next_day = today for(var i = counter;i<6;i++){     next_day.setDate(next_day.getDate()+1)     week_list.push(next_day.toISOString().substring(0,10)) } // get prev  var prev_day = today for(var i = counter;i>0;i--){     prev_day.setDate(prev_day.getDate()-1)     week_list.push(prev_day.toISOString().substring(0,10)) }     console.log(week_list)   output      [ '2019-08-01',   '2019-08-02',   '2019-08-03',   '2019-08-02', '2019-08-01',   '2019-07-31',   '2019-07-30']   i am getting a different output instead of what i was expecting, the variable today change automatically when i try to update the next_day variable. Is this common under javascript else am i doing anything wrong.


No programming skills and want to learn automation

I have been testing (manually) for over 11 years, but I have noticed now that almost every company want employees with automation experience and I would like to learn.  The question that I have is; what tool can I use to learn automation, for someone with no experience like me? Thanks.


How can I make all text the same font size (normal text, footnotes, acknowledgements etc.)?

I have to submit a manuscript to a journal, and I just realized that they want every single part of the paper to be in 12 pt font. This includes tables text, footnotes, acknowledgements etc. Is there a way to force all text to be the same size?


Is it possible to make a modifier with a python addon?

Is it possible to make python addon as a modifier?   I just would like to make some deformation modifiers. But I know only python.


What is the difference between Ph. D programs with coursework and those without it?

I have been looking into PhD programs in the Engineering field, and I have found different types of programs, such as some with coursework, and others without any coursework.  What is the practical difference between them? (Besides the obvious coursework) What kind of student is expected for each of them?  EDIT: To be more specific, I have been looking into Robotics PhD programs, such as:    (Coursework + Research).  (Only research).


Why do we need this feature? Sometimes community leaders (community members who care their community and its meta issues) decide to make some minor edits on a certain set of posts (which may include numerous posts) to help community visitors to find their needs more easily, for example, by removing/adding some tags or adding some keywords in the titles or bodies of a set of posts. However, making such edits would bump many posts, which leads community leaders to withdraw their decision. The Stack Exchange community team disagree with not bumping minor-edited posts to prevent malicious edits. What is this feature? Let us call the edits mentioned above "organizing edits". We can add the option "organizing edit" in the editing environment of posts so that a certain group of community members, who are already selected by community moderators, can use this option to make required edits on a set of post. Such edited posts are not bumped in the active list of posts by default. However, to satisfy the Stack Exchange community team's concern, we can add a "minor/organizing edit" option in the menu "Filter" so that any community member can see such edits in case they filter posts by that option. PS. I think it is obvious enough that this post has nothing to do with feature requests enabling any community member to make minor edits on posts without being bumped.


Is it possible to let people add cards in Trello?

I have created a public board for one of my products.  I want to give permission to everyone to add a card (a new idea). They are not necessarily team members. They could be anonyme, but ideally, they need to log in to add cards.  Does anyone know if it is possible in Trello?


This latest version I was offered an upgrade to is AWFUL! Why wasn't any overview provided? I can't find menus for getting to the software I've become used to. Everything is so FUZZY. GET ME OUT OF HERE!!!!!!!!  OK, in plain sober English, how do I uninstall this scary LSD trip and get back to the version I had before?


Why isn't the 'len' function inherited by dictionaries and lists in Python

example:  a_list = [1, 2, 3] a_list.len() # doesn't work len(a_list) # works   Python being (very) object oriented, I don't understand why the 'len' function isn't inherited by the object.  Plus I keep trying the wrong solution since it appears as the logical one to me


Is a closed-form expression of this non-linear expression attainable?

A sequence is defined by: $$a_{n+1}=a_n+\frac{1}{a_n}$$ With $a_1=1$  Is a closed-form expression for this sequence possible? A search turns up the rule that all expressions with linear recurrence and constant coefficients will definitely have a closed-form representation. But this is not a linear expression, since i's definition includes the reciprocal of the previous term.   If it is possible, what could it be?


I made a model and it renders fine in Blender Render, but in Cycles, the whole image seems to be covered in black spots.  How can I fix this?


Why is my GDM at a different TTY than my desktop environment?

I am running Ubuntu Gnome 16.10 (64bit). Gnome-shell version 3.20.4.   When I start my computer, I eventually see GDM3 offering a login prompt, as expected.   After I login, my monitors flash a little (like they're unplugged and then replugged in), and then I am brought to the gnome 3 desktop.   However, if I hit  CTRL + ALT + F1, I am brought back to GDM3, offering a login prompt.   If I then hit CTRL + ALT + F2,  I am brought back to my Gnome 3 desktop.  So it seems like GDM3 continues to run in TTY1 while the desktop runs in TTY2.   Questions   Is this how things are supposed to work? I thought the desktop was supposed to use the same TTY (or whatever you call it) as the display manager.  Am I using more graphical resources by having things setup this way? Is there a way to have GDM3 pass off the display to Gnome Desktop after I login? Is there any advantage do doing #3?


pow() function returning different result in C++

As we know that the range of unsigned long long int is 0 to 18,446,744,073,709,551,615   Means , unsigned long long int is capable for handling 19-20 digits easily.  So, I want to know why my this program is returning different value.  Program :  #include<bits/stdc++.h> using namespace std; typedef unsigned long long int ulli; int main() {     double a,b;     cin>>a>>b;     ulli result = (ulli)pow(a,b);     cout<<"result = "<<result<<"\n"; }   After giving this input :  a=15 , b=15  Expected output is :  437893890380859375  ( 18 digits number )  But , it is giving this : result = 437893890380859392  ( last 2 digits are different ).  Can anyone help me out why I am getting different result ?


Is this a cheap Chinese fuse or a current shunt?

I got this cheap DT-830B multimeter as a bonus when ordering stuff from a Chinese internet shop.  I opened it up and was wondering if this is a fuse or a current shunt? Since the multimeter works out of the box I assumed there must be a fuse in it, as I did not expect it to function without a fuse, but that weird thing is all I can find on either side of the PCB, it has two white lines under it. Also there seems to be contacts on the side of the PCB that I usually associate with a fuse.  Help a confused soul!


I just bought the In'ride 100 without checking if it fits my bicycle. My Triban 100 bicycle has solid axles and plain axle nuts.  Now  I want to know if it's possible to attach a quick release to a Triban 100 and steps to do it if possible.   Also is it possible to attach the rear wheel to the trainer without the quick release,  I have already tried with the rear wheel as it is now... And it doesn't sit on the trainer well.


Someone introduced himself to us.  After that, when we look back and say what he said, which is right to say?     What did he say his name is?      What did he say his name was?   I think the first one is plausible because his name is always XX, but I'm not sure. Please tell me which is allowed.


Create Trigger that updates the same table before (or after ??) the Insert

I have just started using triggers and one thing that I would need to do is to create a trigger that updates the same table that's inserting the row.  TABLE:  CREATE TABLE `city` (   `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,   `city` varchar(50) NOT NULL,   `country_id` smallint(5) unsigned DEFAULT '0',   `country` varchar(150) DEFAULT NULL,   `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,   PRIMARY KEY (`city_id`),   KEY `idx_fk_country_id` (`country_id`),   CONSTRAINT `city_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=6009 DEFAULT CHARSET=utf8;   Trigger:  DELIMITER $$ CREATE TRIGGER `populate_country_id` BEFORE INSERT ON `city` FOR EACH ROW BEGIN  IF NEW.country_id = 0  THEN     UPDATE city     INNER JOIN country B ON city.country = B.country     SET NEW.country_id = B.country_id;  END IF;  END $$ DELIMITER ;   MySQL is just returning: Can't update table 'city' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.  Is there any way I can make this work?  Thanks everyone!


How do I find out what app is showing a toast?

Several times a day my Android phone (Samsung Galaxy A51, Android 11) is showing this toast  We're having trouble connecting. Check your network connection and try again.  If I stay offline this toast will return every few minutes. How can I find out which app is posting these toasts. And most importantly how do I get rid of them? Long-pressing the toast doesn't show anything.


Verification of extension result for Lipschitz functions

does anyone know the following result? If it holds in this form and any source which presents it? Thanks a lot.  Consider metric space $(X,d_{X})$.  Let $f:A \subset (X,d_{X}) \rightarrow \mathbb{R}$ be a Lipschitz continuous function i.e. $\exists K > 0$ such that  \begin{align*} |f(x)-f(y)| \leq Kd_{X}(x,y) ~~~~\forall x,y \in A \end{align*}  then define functions  $$\bar{f_{1}}(x) := \sup\lbrace f(y) - Kd_{X}(x,y): y\in A \rbrace ~~ \forall x  \in X$$ and $$\bar{f_{2}}(x) := \inf\lbrace f(y) + Kd_{X}(x,y): y\in A \rbrace ~~ \forall x  \in X$$ it follows that  \begin{align*} \bar{f_{1}}, \bar{f_{2}}: X \rightarrow \mathbb{R}  \end{align*} are Lipschitz continuous with  \begin{align*} |\bar{f_{i}}(x)-\bar{f_{i}}(z)| \leq Kd_{X}(x,z) ~~~\forall x,z \in X \text{ and } \forall  i = 1,2 \end{align*} and  \begin{align*} \bar{f_{i}}(x) = f(x) ~~~ \forall x \in A \text{ and } \forall i =1,2 \end{align*}


$f: [a, b] \mapsto [a,b]$, $f$ is monotonically increasing $\Rightarrow \exists~ x \in (a, b)$ such that $x = f(x)$

I can prove this, if $f$ is continuous on $[a, b]$, using $g(x) = f(x) - x$. But can't figure out, how can I prove it, if $f(x)$ is only monotonically increasing.


I am not sure if this issue has been reported or not. However when I filter the questions from right side filter menu like votes etc, I can see two dialogs.      App Version: 1.0.95 Device Manufacturer: Xiaomi Device Model: MI MAX 2   OS Version: 7.1.1 (V8.5.9.0.NDDMIED)


Man clones himself to have the clone do things he doesn't enjoy

I read a short story about four years ago and can't remember the title or author. The only thing I know is that it is relatively old -- like Huxley or Asimov era. Can anyone help me?   The basic synopsis is this: a man clones himself and has his clone do the parts of his life that he doesn't enjoy. He deceives his wife about this; she doesn't know he has a clone. Whenever the man and the clone are both home, the clone is locked in the "toolbox" in the basement. The clone starts to treat the man's wife better than he had previously. His wife starts to fall in love the clone, and the man decides he needs to get rid of the clone. When he tries to do so, the clone overpowers the man and locks him in the toolbox in the basement!  I'm hoping to share this story with my English class this school year. Any help is appreciated!


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


Does deleting own answers result in a penalty? (too many or regularly)

says deleting your own question exceeding some limit results in a penalty.  Is there a penalty for deleting one's own answers? Apparently 5 answers can be deleted per day.   Are there any users that are banned because of deleting answers constantly?  What is the moderators' thoughts about this issue?  For example, if a user gives about ten answers and deletes five of them regularly, will he/she be suspended?


Prove that if n is a natural number and if n has a rational square root then in fact the square root of n is an integer

$n = (\frac{a}{b})^2$, where $a$ and $b$ have no common divisors. This yields  $nb^2 = a^2$  $ra^2b^2 = a^2$ (because $n = ra^2$)  I don't understand why $n$ is equal to $ra^2$.


Connections to Stephen King's The Dark Tower series in his other books

Both  and  lists a list of Stephen King's books and novels that supposedly have any connection to The Dark Tower series. While I agree on most items listed in English article, I am totally surprised about certain entries in Polish version. For example:        and   Up until now I was more than sure that I read these books at a quite high level of details. But, it seems that I didn't. Because I have captured no connection between these and The Dark Tower series. Can someone explain (or give some examples / cites), how exactly are the above books connected to Stephen King's most recognisable book series?


sudo command fails in ubuntu 17.10 with keyError

I upgraded to Ubuntu 17.10. Now when I run   sudo gedit   I get the error   Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0   How to fix it?


I would like to use a long squiggly arrow in beamer. I already found a similar question here: , but it doesn't seem to work in my case.


I’d like to have an environment that works much like a float, except that it doesn’t float.  That is, in fact, I’d like to be able to define an environment that has a label and a caption.  I explicitly do not want to use a floating environment, though. For one thing, floats do many things fancy which I just don’t need, nor want (such as spacing) and for another, floats have their share of problems (for example consider the problem of ).  Is there a ready-made way to achieve this? Of course, I could always write my own based on the result of the other answer, i.e. harnessing \refstepcounter. But I’m not sure how to use that, documentation is scarce, and I’d prefer an existing solution.


Moving file from deleted folder to its original path using bash should check for file existence with same name at original path

#!/bin/bash filename=../deleted/$1 #Testing condition before deletion of file if [ "$1" = "" ] ; then echo "No filename provided" elif [  -f "../deleted/$1"  ] ; then echo "File doesnot exist" str=$(fgrep "$1" ../.restore.info | cut -d ":" -f2) path=${str%/*} mv "../deleted/$1" "${path}" newname=$(fgrep "$1" ../.restore.info | cut -d "_" -f1) mv -i "$1" "${newname}" else echo "file does not exist" fi ----------   ( I have written script to move file from the deleted folder to its original path and its working fine. But now i have to check if there is already a file with same name then it should give alert user "do u want to overwrite " if yes then overwrite if no or anything else then do not restore)


jQuery script in head and dynamically added form

I have got a problem with executing a submission of dynamically added (by function) with two scripts in HEAD.  My HTML is:  <html> <head> <title>Web Page</title> <script src="js/jquery.min.js"></script> <script src="js/script.js"></script> <script src="js/forms.js"></script> </head> <body> <div id="container"> </div> </body> </html>   So when I dynamically by function adding a form into  and trying to submit the data it doesn't work. All required code for execution the form is in js/forms.js I suppose it doesn't see the dynamic objects.  The form which is being added dynamically looks like (with jQuery code):  $('#container').append("<form class='input-form'><input type='text' id='login' /><input type='password' id='password' /><input type='submit' /></form>");   And the script is:  $('form.input-form').on('click', '#sendbutton', function () { preventDefault(); var value_login = $("#login").val(); var value_password = $("#password").val(); alert(value_login + value_password); });   Would anybody suggest how to make it working in jsfiddle? Or what I am doing wrong?  The real example here:


If a Windows shop moves "everything" to the cloud, does it still need Active Directory?

Taking a spin off of this question:  in a new direction for 2014.  Taking into account a basic Windows infrastructure:   domain controllers Exchange 2007/2010/2013 Sharepoint SQL File Servers / Print Servers AD Integrated DNS AD authenticated 3rd party devices (let's say 802.1X for networking and maybe some content-filtering, etc.) AD/LDAP authenticated "administrative" functions on IT apps/hardware/etc. perhaps some KMS stuff throw in a CA if you'd like home grown apps 3rd party in-house apps   Now, let's rip it all out and decide we are going to the cloud.  We've contracted to move Exchange/Sharepoint/File Services to Office 365.  SQL will now be hosted as well on  something like Azure.  We've gotten away from the need for AD-DNS and simply run everything via a simple Windows DNS server.  We still need 802.1X and would like SSO if possible to our various cloud apps.  Home grown and 3rd party in-house apps would likely stay, but have the ability to use internal user databases instead of AD authentication  The question is...do we really need Active Directory at all?  Or more to the point, AD on-premise or even hosted via Azure or similar (ADFS) or running ADDS on a hosted VM through Azure or similar.  Could/Should we look to something else like a 3rd party SSO option such as  or similar that can provide SSO functionality even if it is as simple as LastPass or similar for each user?  What kind of legitimate needs does AD fulfill if everything else in the cloud?  Could a MS-centric infrastructure get away with not having AD at all if they move everything that previously relied on AD to SaaS offerings that didn't rely on AD authentication?


What's a good algorithm to determine if an input is a perfect square?

Possible Duplicate:          What's a way to see if a number is a ?   bool IsPerfectSquare(long input) {    // TODO }   I'm using C# but this is language agnostic.  Bonus points for clarity and simplicity (this isn't meant to be code-golf).    Edit: This got much more complex than I expected! It turns out the problems with double precision manifest themselves a couple ways. First, Math.Sqrt takes a double which can't precisely hold a long (thanks Jon).   Second, a double's precision will lose small values ( .000...00001) when you have a huge, near perfect square. e.g., my implementation failed this test for Math.Pow(10,18)+1 (mine reported true).


Always get Error: Operation not supported for: find /Path/ -type f -exec chmod 755 {} \;

I want to change the access permissions for MP3 files on an external 2,5" HDD on my Raspberry Pi on which I run an actual version of Raspian.  To do so I tried to use the following command:  find /Path/ -type f -exec chmod 755 {} \;   But after execution I get the following error for each file:  chmod: changing permissions of /Path/File.mp3: Operation not supported   I also tried it with root permissions but it didn´t help. I access the HDD via /media/HDDName if this can be important.  I can view the files and already changed the Permissions of all folders above the MP3 files.


Where does the formula for the moment of inertia $I = \int r^2 dm$ come from?

I've just learned about moments of inertia in my physics I class, $I=\int{r^2dm}$. The math involving moments of inertia in relation to torque and angular momentum is clear to me. I'm looking for some intuition towards where the definition/idea of moments of inertia comes from? Where do we obtain that the moment of inertia of a point mass $I=mr^2$?  I'm interested in the logical development of these ideas.


How do I get my Canon MF4410 printer to work?

I have a Canon i-sensys MF4410 laser printer.  I am running a dual boot system with Windows 7 and Ubuntu 12.04.  The printer works in Windows and Ubuntu sees it when I attempt to add a new printer but I cannot get it to work in Ubuntu.  (It previously worked fine under Ubuntu 8.?) I have tried installing (and un-installing) the driver cque-en but, although Ubuntu sees the printer, it does not find the driver.    I have even tried using the generic laser and 'text only' drivers but these do not work.  If anyone can help and it requires using terminal please give detailed instructions.


How can I find cyclic subgroups of $S_3$?

We have the group $(S_3, \circ)$, where $S_3=\{(1)(2)(3),(1)(2,3),(1,2)(3),(1,2,3),(1,3,2),(1,3)(2)\}$. How can I find all cyclic subgroups from this?  I know that I could go through each element and exponentiate it to see if I get all other terms. However, I would guess there is a more efficient way of solving this problem.


KUL-MNL-KUL - I will only use my MNL-KUL

I have this concern about my KUL-MNL-KUL ticket. Can I only use my MNL-KUL ticket? Since I will be coming from Manila on the that time. Do they honor my ticket even I didn't show up on my KUL-MNL?


How to find the sum of this series? is there any simple way?

Find the series' sum: $\frac{3}{1.2.4} + \frac{4}{2.3.5} + \frac{5}{3.4.6}...$ I tried solving it by writing $3$ as $4-1$, $4$ as $5-1$ but it didn't help. I am still studying so I don't know how to solve it by decomposing it into partial fractions.Is there any other method to solve this? discussion