The current implementation of the LXC technology . Users of the unprivileged containers (which arguably promise better security) don't get any working out-of-the-box solution for autostarting their containers.    I know of two ways of achieving this goal. I need to decide which one to take (or maybe there is another?)  Both methods require that the lxc.start.auto 1 be set in .  Transforming an existing privileged container  In short .   Invoking unprivileged container via a custom upstart job  The lxc-autostart command invoked by the owner of the unprivileged containers (without the sudo) starts all the unprivileged auto-start containers. The problem is only with how to run it during system startup.  This is tough, because any form of sudo -u <lxc-user> -- lxc-autostart nor su -l <lxc-user> -c lxc-autostart wouldn't work - I guess they don't handle ranges of subuid well. The only way to get root autostarting user's containers is through ridiculously complex ssh <lxc-user>@localhost lxc-autostart.  I haven't tried the setgid and setuid stanzas yet (something tells me, it wouldn't work either).  EDIT: My intuition was right. Setting the setgid and setuid in upstart script doesn't help either.

On Ubuntu 14.04, I have created an unprivileged container that I can manually start and stop.  But I would like this to start and stop along with the system.  I have added the following to the container's configuration:  lxc.start.auto = 1 lxc.start.delay = 5   However, the system scripts don't seem to pick unprivileged containers.  There is  related to this on linuxcontainers.org, but the solution seems to be restricted to root user.  Is there a clean way to do this for a non-root user (with root user's consent)?


I need to prove the equivalence of sets [-1,4) ~(2,11) using:   a) Cantor-Bernstein Theorem  b) Constructing a bijection between those two sets.  What I have done:  a) I understand that in-order to prove this using Cantor-Bernstein you need to show injection from $f(x): [-1,4)\rightarrow (2,11) $ and $g(x): (2,11) \rightarrow [-1,4)$  I tried to find corresponding $x$'s so that $f(x)$ would always be in range of $(2,11)$ but I couldn't set up a proper ruleset.  b) Contructing a bijection:  If we have $A =$ {-1, ... 4} We would have to construct a $B = $ {2 +- $rule$ .... 11} The result would be a function $f(x) = $ { a set of rules}.  For example $2-x, x < 0$ and $2 \frac{3}4 * x , x > 0$.  Here also I couldn't understand how do I know to look for these rules, if anyone could provide any insight.  Best regards.

How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &= m(-1)+b \\ 4 = f(2) &= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective.


According to many information like  and  word count isn't a ranking factor.  But I have never seen that 300-word article (even 500 words) is on the first page for at least 500 search volume(monthly) keyword.  Is there any case study or an example to prove that "Word Count isn't a ranking factor"?

If I read 10 SEO articles, 9 out of 10 have said that you should have 1000 -3000 words. That is huge. Generally it takes more than 3 -5 hours to write a well researched 2000+ word article.  Does it really matter? I mean most topic we can cover just 1000  with some external links. And I can say that it is quality and it is helpful for users.  Do I still have to write 1000-3000 word articles to get SEO traffic?


I enjoyed the story of into darkness, but some of the events have been nagging at me since I first saw them on screen. I am convinced that the federation has either transwarp or slipstream technology and that the NCC-1701 and Dreadnought were equipped with them. Consider the following:   At warp factor 9.975 it is possible to travel 132 light years in one month (). Qo'nos is 110 light years from earth.  When the NCC-1701 is tasked with a strike on Qo'nos, they appear to make the journey there very rapidly. However, I can imagine someone being wishy washy over whether we just didn't see the whole trip. Let's talk about the trip back. The NCC-1701 was pursued by the Dreadnought when it attempted to retreat to earth from a position near the klingon's home solar system.    In this sequence, the enterprise is surprised that it is overtaken while at warp. Normal warp physics allow for this to happen, so it seems possible that the Enterprise is employing a technology which requires special mastery in order to travel at different velocities. Humans were doing this (with warp) shortly after zhefram cochrane flew his first warp ship, so I think this suggests they are using a new technology. The enterprise appears to be using a conduit when it travels. Normal warp physics involve creating a bubble around the ship which propels it. The imagery of a conduit is never shown except when involving a slipstream or transwarp conduit.  When the Enterprise is knocked out of warp by the Vengeance, it appears to exit a conduit. They are thrown violently back into normal space, even losing attitude control for a period of time. This was never observed to happen when a ship is knocked out of warp, but it was observed to happen when a ship fell out of a slipstream.   The time it took the Eneterprise to flee from Qo'nos to the Sol system was very short, on the order of minutes. When the Enterprise was knocked out of warp it was already inside the Sol System.     The only explanation I can imagine is that Spock supplied the federation with very advanced propulsion technology. However, this seems difficult for me to believe, because whenever time travel is involved, federation command officers are forever concerned with accidentally altering the time line (for good or ill). I would think Spock would adhere to this moral principle in general, though I could forgive his hasty decision to supply his friends with transwarp beaming technology as he did just see his planet obliterated. Assuming that, my best guess is that the federation extrapolated new propulsion technology based on the transwarp beaming technology supplied by Spock.   However, if the federation really did have this kind of propulsion technology, I have difficulty believing they would be at all concerned with a possible Klingon war(which they appear to be). They would have an absurd tactical advantage.

In Star Trek Into Darkness, the Vengeance was able to catch up to the Enterprise and attack it while in warp.   According to the , warp is a bubble around a specific ship. This would explain why Kirk was so surprised when it happened.   How was the Vengeance able to catch up, or get into the Enterprise’s warp bubble?


Find a set of complex numbers for equation $2|z|<|1+z^2|$ and draw it.  That's as far as I got: $$4x^2+4y^2<(x^2+y^2+1)^2+x^2y^2\\ \vdots\\ x^4+y^4-6x^2-2y^2+1>0\\ (x^2-3)^2+(y^2-1)^2>9$$  Now I have no idea how to draw this.

Determine the set of points $z$ that satisfy the condition $|2z|>|1+z^2|$  I tried to redo this problem and got to this point  $|2z|>|1+z^2|$ $\Rightarrow$ $2|z|>1+|z^2|$ $\Rightarrow$ $2|z|>1+z\overline z$  Let $z=x+iy$ then   $$2\sqrt{x^2+y^2}>1+(x+iy)(x-iy)$$  $$2\sqrt{x^2+y^2}>1+(x^2+y^2)$$  $$0>1-2\sqrt{x^2+y^2}+(x^2+y^2)$$  $$0>(1-\sqrt{x^2+y^2})^2$$  since $x,y$ are real number , so there is no solution for this inequality?


Are the deleted users automatically renamed to user<random number>, e.g. user354353, or user240249 or are they actually naming their accounts like this?

It's been more than a month since I have started using . It has these users with user names in the format of "user-random number". I have observed them in some of the stack activities, most of the time asking questions.   Does the moderators create them for their own purpose. If yes what purpose do they serve?   I mean a user is free to have any user name. But it's just a hunch that such users are actually moderators. I may be wrong; just need some clarification.


There are many questions with answers on Ask Ubuntu about upgrading, for example, from 14.04 to 16.04. (Between LTS versions.) I recently heard that 16.04.1 has been released.  Do I have to do anything more than sudo apt-get update && sudo apt-get upgrade to update my system to 16.04.1?  A simple question which requires little explanation! Hopefully also a simple answer?  Note: I have 16.04 currently!  Note: The linked question does not explain how to upgrade from 16.04 to 16.04.1. (For example.) However it does cover upgrading from 14.04 to 16.04. (For example.) Is the method the same? (The answer posted below and in the comments suggests no.)

What are the different ways I can use to upgrade Ubuntu from one release to another?


this is my PyQGIS scrpit (QGIS 3.10).  this code runs fine but the output folder doesn't show results.  the MyFeedBack function shows me that it runs correctly and matches the Registry that is generated when the action is performed from the Grass7 i.pca module.  please i need help i don't know what else to try  import os import sys import gdal  path=r'D:\ESCUELA\clip_L8' output= r'D:/ESCUELA/PCA'  bandList = [band for band in os.listdir(path)if band[-4:]=='.tif'] input = [os.path.join(path,band) for band in bandList] print(input)   class MyFeedBack(QgsProcessingFeedback):    def setProgressText(self,text):        print(text)    def pushInfo(self,info):        print(info)    def pushCommandInfo(self,info):        print(info)    def pushDebugInfo(self,info):       print(info)    def pushConsoleInfo(self,info):       print(info)    def reportError(self,error, fatalError=False):       print(error)  def pca(input,output): params ={'input':input,\     'rescale':[0.300],\     'percent':99,\     '-n':True,\     '-f':False,\     'output':output,\     'GRASS_REGION_PARAMETER':None,\     'GRASS_REGION_CELLSIZE_PARAMETER':0} feedback = QgsProcessingFeedback() res = processing.run("grass7:i.pca",params,feedback=MyFeedBack()) print(res) return  pca(input,output)

It runs without problem but I don't get the expected pca bands, my output folder is empty, I don't know what to test. path ='C/Users/Manuel/Documents/INPUT' output='C/Users/Manuel/Documents/OUTPUT'  bandList = [band for band in              os.listdir(path) if              band[-4:]=='.TIF'] input = [os.path.join(path,band)for band in bandList]  def PCA_GRASS(input,output):     processing.runAndLoadResults("grass7:i.pca",\     {'-f': False,'n':False,\     'GRASS_REGION_CELLSIZE_PARAMETER' : 0,\     'GRASS_REGION_PARAMETER' : None,\     'input': input,\     'output': output,\     'percent': 99,\     'rescale':[0,400]})   outList=[band for band in os.listdir(output) if                        band[-4]=='.tif']   new_output = [ os.path.join(output,band) for band in                                 outList ]   for band in new_output:            iface.addRasterLayer(band,band)  PCA_GRASS(input,output)  When I run the script I open log message and an ogr error appears (can't open _ address of input files_) I don't understand why () I am working with Landsat 8 band and I have tried other images to see if the code works.  Using processing whit grass I have performed other tasks satisfactorily but this one is causing me many problems.  The images are not the problem when I perform the operation (i.pca) from the processing toolbox, it is done without problem. I have also changed the syntax with which I enter the input data but nothing.


I'm building an app that relies on a web scraper built in Node/Express, which operating on the same localhost as my front-facing Node/Express app.  I'm trying to optimise as much as possible and I'm completely new to all of this so please forgive if it's a basic question. Let's use this flow as an example:   The front-facing app generates a list of about 10,000 domain names The front-facing app sends this data to my scraping app's api The scraper app does its magic then saves a whole lotta data to MongoDB   In terms of optimisation and best practice, is it better if my front-facing app sends one request to the scraper API per domain name? Or is it better to send an array of 10,000 strings to the scraper in one POST and parse through it within the app itself?

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


I will be travelling from The Netherlands to India soon and have a flight change in London. However I also need to change airports (From London City Airport to Heathrow Airport). I hold an Indian Passport. Will I need a transit Visa ?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I need European Rail Freight Map (shapefile or other ArcGIS format) for a GIS project.   Does anyone have this data?

We are trying to make a project about European goods trade so we need railway data in shapefile format.   More specifically, we are trying to find the potential of mine products being exported from Turkey to Europe by using Geomarketing tools.   Basically, we need a European railways layer for ArcGIS (excluding passenger-only railways).


I'm using Ubuntu-Mate on a USB flash drive for some testing. I'm making some changes to the startup using dconf-editor but would like to somehow make these changes 'stick' when I reboot. Does anyone know if this is possible?

I want to make a persistent live Ubuntu USB drive with more than 4GB of storage.   I know there is an option of installing directly on the drive but I don't want to do this as it will restrict the drive from working on different computers.   One option is to make an additional partition with extra space but if I do this how can I get newly installed software to be stored on this partition?


I would like to resize an image inside a cell on JTable. I am using that code to print the image, it works but without resizing.  do {     Object[] fila = new Object[numcolumnas];     for (int i = 0; i < numcolumnas; i++) {         fila[i] = rs.getObject(i + 1);          byte[] imagedataCover = rs.getBytes("Poster");         format = new ImageIcon(imagedataCover);          fila[0] = new JLabel(format);      }     model.addRow(fila);     setAnchoColumnas(); } while (rs.next());

I need to resize PNG, JPEG and GIF files. How can I do this using Java?


I have a model which was in cycles. When I shifted it to Blender Render it became pink. When I render it the color is fine but in object mode and edit mode it is pink. Someone help. It has no textures applied on it and I made a new material for it in Blender Render. Help...

The tree on the left is always purple, whenever I try anything, like changing the material, texture etc. it always turns out purple.    It's fine in cycles:    I've been following a tutorial by CG Geek on youtube and have had no problems up to about 1:01:39. But now when I try to follow along my left tree always appears purple as shown in the picture. The tutorial is .


Given $f : A \to B$ and $g: B \to C$, if $g \circ f$ is surjective, what can you say about the surjectivity of $f$ and $g$?   My Attempted Proof  Suppose $g \circ f$ is surjetive  and assume either $f$ or $g$ not surjective.  Then $g(f(A)) \subset C$, and there exists  $c \in C$, such that $c \neq g(f(a))$ for any $a \in A$, contradicting our assumption.  Thus $g \circ f$ is surjective if and only if both $f$ and $g$ are surjective. $\square$    Is my proof correct? If so how rigorous is it?

Question: Are my proofs below valid?   In both cases we are using: $f:A\to B, g: B\to C$  Notation of your type converted: $(g\circ f)(x)=g(f(x))=xfg$    If $fg$ is injective what can be said about $f$ and $g$?  If $fg$ is injective then $f$ is injective:  Proof:  $(x_1fg = x_2fg \implies x_1=x_2)$  $x_1fg=x_2fg$ is clearly true when $x_1f=x_2f$  Which requires $x_1=x_2$, hence $f$ is injective.  If $f$ were not injective, then $x_1fg\ne x_2fg$  $\blacksquare$    If $fg$ is surjective what can be said about $f$ and $g$?  If $fg$ is surjective then $g$ is surjective:  Proof:  $(\forall c\in C)(\exists a\in A) |( a(fg))=c$  This means for $g$ every element must have had been mapped to. How can this be proved Mathematically?  well $(af)g=c$ is surjective, hence $(af)=(b\in B)$ and $bg=c$  $(\forall c\in g)(\exists b\in B)|(bg=c)$  Hence $g$ is surjective.  $\blacksquare$


has two reviews: one (from ) to close and another to recommend close (because  doesn’t have enough reputation to vote to close). But for both reviews, the review choice they picked shows up as Close.         Is this intended, or is this a ?  I suspect this is a bug, because for deletion, we also have two : delete and recommend deletion, both of which show up properly as other's review choices.  also shows that the user picked Recommend Close.

I was in the Low Quality Review queue, and the following review confused me:    It's showing eight "Close votes", which should be more than enough to close a question.  I checked the question's , and it wasn't somehow closed, then re-opened in the middle of the review.  So I then checked on each of the users, and noticed that the majority of them are under 3000 reputation, meaning they can only "Recommend Close".    However, all reviews are simply showing as "Close", which is extremely confusing.  Is this a bug, or possibly an undocumented change related to ?    Another recent example:


Hi,  I got this code:

some list

some list

some list

some list

some list

some list

   and my css:  ul { background-color: #EDEADF; height: 30px; }  li {float: left;}   on a PC screen this looks fine. The problem comes when you see it on a mobile because the LI elements go vertical instead of horizontal. Im okay with that, but what I dont like is that the UL stays at the same height and since it has a background it looks weird. It should expand automatically and reach the bottom to cover until the very last LI. How can i achieve that effect?  Thank you.

Although elements like
s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: If floated elements have non-floated parent elements, the parent will collapse. For example:

Div 1

Div 2

    The parent div in this example will not expand to contain its floated children - it will appear to have height: 0. How do you solve this problem? I would like to create an exhaustive list of solutions here. If you're aware of cross-browser compatibility issues, please point them out. Solution 1 Float the parent.

Div 1

Div 2

    Pros: Semantic code. Cons: You may not always want the parent floated. Even if you do, do you float the parents' parent, and so on? Must you float every ancestor element? Solution 2 Give the parent an explicit height.

Div 1

Div 2

    Pros: Semantic code. Cons: Not flexible - if the content changes or the browser is resized, the layout will break. Solution 3 Append a "spacer" element inside the parent element, like this:

Div 1

Div 2

    Pros: Straightforward to code. Cons: Not semantic; the spacer div exists only as a layout hack. Solution 4 Set parent to overflow: auto.

Div 1

Div 2

    Pros: Doesn't require extra div. Cons: Seems like a hack - that's not the overflow property's stated purpose. Comments? Other suggestions?


Currently have a formula which essentially looks like this:  Math.round((20.49-14.99)*5);   The resulting number is 27.5 and AFAIK, Math.round() should round UP if the number is 0.5 and above and round down if it is below. Unless I've misunderstood, I was assuming the result would be rounded up to 28 (as it does in Microsoft Excel, for example), but instead, it rounds down to 27.  At first I assumed it had something to do with my code, but when I console logged it, the result was exactly the same.   Am I missing something and if I have, how would I round-up from 0.5 onwards?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


like to ask if the  external parenthises are really necessary?   Like here:  incident.Controller = (...)`     //see code block at the end of this question I dont think so.   (at least the code works the same for me).  Also, I'd like to ask about the difference between the two snippets of code below.  The benefit writing the code below in a function (the first snippet below) is to scope things to myCompany.incident by using the "use strict" statement.  Like below.  But is this the only difference? (and i would otherwise write it out as in the snippet beneath it)  myCompany.incident = (function(incident) {   "use strict";   incident.Contracts = {     onLoad: function() {       var controller =               new myCompany.incident.Controller(Xrm);       controller.load();     }   };    return incident; }(myCompany.incident || {}));   I would otherwise (if not for "use strict";) write it out like this:     myCompany.incident = myCompany.incident || {};    myCompany.incident.Contracts = { onLoad: function() {          var controller = new myCompany.incident.Controller(Xrm);          controller.load();        }      };   I dont think "use strict;" is the only difference/consquence of the two snippets, which is the reason for this question.  Thanks, p.        /// <reference path="controller.js"/>     /*global myCompany: true*/     myCompany = window.myCompany || {};     myCompany.incident = (function(incident) {        "use strict";         incident.Contracts = {          onLoad: function() {           var controller =             new myCompany.incident.Controller(Xrm);           controller.load();         }       };       return incident;     }(myCompany.incident || {}));

In javascript, when would you want to use this:  (function(){     //Bunch of code... })();   over this:  //Bunch of code...


I just installed a fresh Ubuntu 16.10 and just finished setting up LAMP Stack. currently my Sublime Text keeps asking me authentication every time I edit a file.  Lamp Stack was installed using root user.  my /var/www/projects currently have www-data:www-data for it to work properly.  but I can't edit the files freely it keeps asking my password every time I hit save.  should I install Sublime Text as super user?

I want to add the Apache user (www-data) to the audio group. I've read the man page for useradd, but I'm not having any luck. I'm running xubuntu 11.10. Here's what I'm doing:  $ sudo useradd -G audio www-data useradd: user 'www-data' already exists   If I leave out the -G option, bash, prints the help info for useradd:  $ sudo useradd  audio www-data Usage: useradd [options] LOGIN Options: -b, --base-dir BASE_DIR       base directory for the home directory...   It's not clear to me from the man page what options I should use to make this work.


I was exhibiting in a health sector expo and trade fair in Great Britain along with my father and my father already had a visa.  My company have given me the funds and these are in my account. The company bank statement is more than 1 million and the money I am spending is given by the company and family which is shown through my bank statement.  Should I get the administrative view or should I reapply?

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I'm trying to use object oriented design and it's a bit confusing.  Let's say I have 3 separate objects    public class Tool{      String name;      Float weight;  }   public class Drawer{      String name;      Tool[] tool;  }   public class Toolbox{      String name;      Drawer[] drawer;   public void setDrawers(String[] drawers) {      for(int i = 0; i < drawers.length; i++) {         drawer[i].name = drawers[i];      }   } }   So a Tool has a String and Float.  Drawer has a String and an array of Tools. Toolbox has a String and array of Drawers.   So let's say in my main code I say...   Toolbox myBox = new Toolbox();  myBox.setDrawers(drawers);   I'm getting null pointer issues. What's the proper way to instantiate everything if I want to instantiate a toolbox?  Each class is in a separate Java file is this ok, or should they be in one file?  Since all classes are in the same app do I need to use the import statement?  What would my Constructors look like? Is there anything else I'm missing?  Thanks for the help.  Please do not mark this as a duplicate of the "null pointer" question.  That does not address objects that contain arrays of other objects and how to instantiate everything.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I have Kubuntu 18.04 installed on my PC, but it is corrupted, soI want to reinstall. I plugged my USB and tried that, but instead of booting into the installer app, it always runs the prior installation of Kubuntu from the internal drive instead.   When I turn on the PC, the bios says the normal stuff about booting, like "Run Kubuntu", "Recovery mode", "advanced" and these stuff. Last time when I tried to install Kubuntu I selected the "Run Kubuntu" button, so this time around I'm selecting the same button but it doesn't load up the installation screen.   I can provide more info when needed.

How can I factory reset my Kubuntu and return it to new-like state, without reinstalling it? (I am having problems reinstalling the OS.)


Why are my books not exported when I save my Careers profile as PDF?

Scenario #1: no items in the section Writing, a few items in Reading   click on create pdf in the PDF you get your readings under the title "Writing" (should be "Reading")   Scenario #2: one item in the section Writing, a few items in Reading   click on create pdf in the PDF you get:   your readings under the title "Writing" (should be "Reading"), as in scenario #1 there are no writings (there should be one)    Hope it to be clear. Let me know in case it isn't.  Thank you!


For $a,b,c,d \in \mathbb{R}$ and $ad-bc \neq 0$ I have the function $f : \mathbb{R}\setminus{\{d/c\}} \to \mathbb{R},  f(x) = \frac{ax-b}{cx-d}$. How can I find the largest possible restriction of $f$ such that $f$ is injective on it and the image of this restriction? Thank you for your help.   Edit: If I understand correctly, the linked question is concerned with finding a condition for injectivity on the parameters a,b,c,d (the condition they find is $bc-ad \neq 0$). With mine the values are already given.   Also I know that (as a continuous function) it's injective iff it is strictly monotone, which is the case when $f'(x) = \frac{bc-ad}{(cx-d)^2}$ is positive or negative. But I don't understand how this helps me, since the denominator is always positive and the numerator a fixed value for given bc and ad? If this is even the right approach for finding a restriction.

For which $a,b,c,d \in \Bbb R$ does $f(x) = \frac {ax+b}{cx+d}$ define a bijection $f: \Bbb R \to \Bbb R$?  I'm guessing I need a system of equations and I know that $cx + d \ne 0$.  Thanks!


I am creating Conway's Game of Life in android. I have what I believe to be a working engine, and I have a working initial grid view to which I can draw and populate points on the initial array. However when I attempt to pass the initial array into my game engine I am getting a null point exception. The code where I am attempting to pass the initial array is below:   case R.id.test_item:             {         Toast.makeText(getApplicationContext(),R.string.generation_string,             Toast.LENGTH_LONG).show();              myGridView.setStart(true);             char[][] testGen = myGridView.getWorld();             System.out.println("test1");             char[][] nextGen = lifeEngine.generateNextGeneration(testGen);             myGridView.setWorld(nextGen);             myGridView.invalidate();          }  public char[][] generateNextGeneration(char[][] world) {      System.out.println("test1");     //char[][] currentGeneration = world;     int neighbors;      System.out.println("test1");     char[][] nextGeneration = new char[height][width];      System.out.println("test1");      for (int c = 0; c < (height-1)/UpdateGridActivity.cell_size; c++) {          for (int r = 0; r < (width-1)/UpdateGridActivity.cell_size; r++) {              System.out.println("test1");             neighbors = checker.Check(world,c,r);             System.out.println("test1");             if(world[c][r] != 0) //handles live cells              {                 //neighbors = checker.Check(world,c,r);                 if (neighbors !=3 && neighbors !=2)                      nextGeneration[c][r] = 0;                  else                     nextGeneration[c][r] = '*';              }             else //handles dead cells             {                 //neighbors = checker.Check(world,c,r);                 if(neighbors == 3)                     nextGeneration[c][r] = '*';                 else                     nextGeneration[c][r] = 0;             }         }     }     return nextGeneration; }     }   The first "test1" appears in my logs, but the app crashes and the null pointer exception is thrown before the next "test1" at the top of generateNextGeneration is printed out. At this point I cannot figure out where the exception is coming from, as I am not sure how the header would throw it.   In case you would like to reference it, my entire source code can be found at:


I have to copy an Arraylist to a new Arraylist. In the old Arraylist there are multiple elements which changes at runtime.One of them is the module settings parameter inside the Arraylist. I would like to deep copy the values of the arraylist so that I can use it for undo operation. I tried using Binaryformater and Datacontract. Both can't be done for non serializable object. Can anyone help , pls?

I want to do something like:  MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone();   And then make changes to the new object that are not reflected in the original object.  I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and then copying each property individually, but it always leaves me with the feeling that there is a better or more elegant way of handling the situation.  How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object?


In the mwe below, I try to have different name inside a pgfplotsinvokeforeach loop. I don't understand why the name is the same with the last value  \documentclass{article} \usepackage{lmodern} \usepackage{tikz} \usepackage{pgfplots}   \begin{document}  \begin{tikzpicture}[scale=1] \begin{axis}[height=8cm,width=12cm,              axis y line=middle,             axis x line=middle,             x label style={anchor=west},             y label style={anchor=south},                        xlabel=$t$,ylabel=$e(t)$,             xmin=0,xmax=6,ymin=-1,ymax=6,             xtick={1,2,3,4,5},             xticklabels = {$\tau$,$2\tau$,$3\tau$,$4\tau$,$5\tau$},             ytick={5},             yticklabels = {$E$},             clip mode=individual         ] \addplot[domain=0:6, samples=30,red]{5};     \addplot[domain=0:6, samples=100,blue]{5*(1-e^(-x))};     \pgfplotsinvokeforeach{1,2,...,5}{     \pgfmathtruncatemacro\Adv{(1-e^(-#1))*100}%     \draw [<->] (axis cs:#1,0) -- (axis cs:#1,{5*(1-e^(-#1))})node [midway, right] {$\Adv\%$}; } \end{axis} \end{tikzpicture}     \end{document}   .

Am hesitant to ask yet one more embarrassing question, but I can't seem to see the problem with the \foreach in the MWE. It should produce several horizontal lines but only produces the one with the yValue as specified in the \newcommand{\yValue}{0.3}:  Code: \documentclass{article} \usepackage{pgfplots}  \newcommand{\yValue}{0.3}  \begin{document} \begin{tikzpicture} \begin{axis} [  ymin=0,  ymax=1,  xmin=0,  xmax=1, ]  \foreach \yValue in {0.00,0.1,...,1.00} {     \draw [red] (axis cs:0,\yValue) -- (axis cs:1,\yValue); }  \end{axis} \end{tikzpicture} \end{document}


I have DELL Inspiron n4050 i5 4GB RAM laptop and I recently installed Ubuntu 14.04 on it. I need to install graphic drivers on it and don't know how.

Is there a package of Ubuntu drivers as driver pack solution? I tried to search for it, but I did not find it. If there is, how can I easily get it?


I set "AutoCommit" flag for java.sql.Connection object as false when executing SPARQL Query but the flag is ignored. Given below is the part of the code that executes the Query.      Connection conn;     OracleDataSource oracleDataSource;     try {         oracleDataSource = new OracleDataSource();         oracleDataSource.setURL("");         oracleDataSource.setUser("");         oracleDataSource.setPassword("");         conn = oracleDataSource.getConnection();         conn.setAutoCommit(false);     } catch (SQLException e) {         LOGGER.error("Exception occurred in preparing connection: ", e.getMessage());         throw (e);     }      String sparqlInsertQuery = "BEGIN SEM_APIS.UPDATE_MODEL('RDF_MODEL','xxxxxxxx'); END;";      try (Statement stmt = conn.createStatement()) {         stmt.executeUpdate(sparqlInsertQuery);     } catch (SQLException e) {         LOGGER.error("Cannot Execute Query: ", e);         throw (e);     }      //conn.commit();     conn.close();   Eventhough I have added "conn.setAutoCommit(false);", the statement "stmt.executeUpdate(sparqlInsertQuery);" commits the Triples into the Model. Instead of SPARQL Query, if I use SQL Query, the "AutoCommit" flag value is considered and everything works fine.

Does Java Connection.close rollback into a finally block?.  I know .Net SqlConnection.close does it.  With this I could make try/finally blocks without catch...  Example:  try {     conn.setAutoCommit(false);     ResultSet rs = executeQuery(conn, ...);     ....     executeNonQuery(conn, ...);     ....      conn.commit(); } finally {    conn.close(); }


I used the following commands to do so but could not able to produce name of author with year. I only produced author name.  \usepackage[round]{natbib} \begin{thebibliography}     \bibitem[Magda(1980)]{ref1}Magda C.G.(1980).Circular balanced repeated measurements designs, \textit{Comm. Statist.Theory   Methods} \textbf{9}, 1901-1918.     \bibliographystyle{plainnat} \end{thebibliography}

I'm trying to use the \citep command in Latex and my document class is elsarticle. The problem is that it displays numbers not authoryear citations in the text which is what I'm looking for. Here are related parts of my code:      \documentclass[preprint,11pt]{elsarticle}      \usepackage{natbib}   ...      \bibliographystyle{plainnat}      \bibliography{ML}   And I'm obviously using the \citep command like this:      I once read \citep{edelman1993magnetic}   And my .bib file looks like this:  @article{wolf2009regional, title={Regional brain activation changes and abnormal functional connectivity of the         ventrolateral prefrontal cortex during working memory processing in adults with attention-deficit/hyperactivity disorder}, author={Wolf, Robert C and Plichta, Michael M and Sambataro, Fabio and Fallgatter,     Andreas J and Jacob, Christian and Lesch, Klaus-Peter and Herrmann, Martin J and     Sch{\"o}nfeldt-Lecuona, Carlos and Connemann, Bernhard J and Gr{\"o}n, Georg and others}, journal={Human brain mapping}, volume={30}, number={7}, pages={2252--2266}, year={2009}, publisher={Wiley Online Library} }   The result looks like:  I once read[1]   I'm looking for a result like this:  I once read(wolf., 2009)   Elsevier is actually looking for:  Text: All citations in the text should refer to:    Single author: the author's name (without initials, unless there is ambiguity) and the year of publication;  Two authors: both authors' names and the year of publication;  Three or more authors: first author's name followed by 'et al.' and the year of publication.    Thanks in advance


I am using the align environment, but wish my numbering of equations to be on the left-hand side of the page. Is there an easy way to do this?

Equations and amsmath environments put equation numbers to the right side by default, the output of  \begin{multline}   some equation \end{multline}   is:  equation (number)   How can I change it this way:  (number) equation


I came to the US from the UK on September 1st and spent the full 90 days travelling round under the VWP and an ESTA. After my 90 days were up I have come to Mexico, where I will be spending 6 weeks in the country.  As of yet I do not have a flight booked back to the UK but have stared to look before I return home, I would love to stop in Salt Lake City for a week to see my brother.  Does anyone know if this is possible, having spent 6 weeks out of America would I be able to return for a week on a new VWP with a flight booked back to the UK?  Having read a few things online which suggests I can and others that say I can't.

We are UK citizens driving from Patagonia to Alaska, then shipping home from New York. We hope to be in the US for 3 months, a couple of months in Canada then into Alaska for a couple of  months and then back into Canada and the US. But cannot find information about whether we can get a new visa waiver in Canada for driving to Alaska and then back into the US?


I just voted to  as a duplicate. There were previously no other votes to close. After I voted to close, the question was closed. This puzzled me for a second, and then I realized it was the Most Foul Dupehammer at work again, because I have a gold java badge.  Could you please make use of the Dupehammer an option rather than an automatic process?  I do not like the Dupehammer, either being on the receiving end or on the causing end, and given the option to close without additional votes, I would not choose to do so.

According to  , gold badge holders can now unilaterally close questions as duplicates. I hold seven gold badges for tags on SO, which means I can, on my own, close questions as duplicates for those tagged questions.  Simply put: DO NOT WANT.  However, I do not see any ability in SO (the only SE site I spend much time in) to opt out of any privileges, let alone this one.  Is there a spot that I'm just not seeing that allows me to turn off this new privilege?


I'm trying to remove a virus from my friend's PC. The virus is called qbqjralptr..vbs & I found it's a worm specified like USB – Dinihou – Houdini Worm.VBScript  It seemed easy to remove but I just was able to deactivate it, without removing.  It infects all USB keys connected to PC creating false links to all files contained into the key. They link to a hidden file on the key which is the virus.  Well, I found it's a process which check if a new key is connected and build virus links.  I tried to kill the process and it worked. It won't recreate itself and the key I connected didn't make any link anymore. I deleted all system registry keys which permitted the virus to start when the OS loaded.  I located it into the temp folder of the user, but when i checked into that folder i didn't find any file.  Windows suggests it is a file but dir command won't retrieve anything, so I can't delete it because of “file not found” message.  Do you know how can I proceed?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


Beggining of the proof: Note that every power of $\sigma$ comutes with $\sigma$, then $\langle \sigma \rangle \subset C_{S_{n}}(\sigma)$.   I have two questions:   Why $|\langle \sigma \rangle|= o(\sigma)=n$ ? Why is enough show that $|C_{S_{n}}(\sigma)|=n$ (after show item 1) to prove that $C_{S_{n}}(\sigma) \subset \langle \sigma \rangle$?

Let $S_n$ and $C_G(\sigma)$ denote the  and the  of $\sigma\in S_n$, respectively. I want to show: If $\sigma$ is of length $n$, then $C_G(\sigma)=\langle\sigma\rangle$, i.e. $\sigma$ generates $C_G(\sigma)$


There are numerous examples in all levels of canon of Jedi being pretty well funded. They run the Order; own starfighters; they send out intergalactic expeditions; they own some prime real estate; etc...  So how do they get funded to afford all that? They are warrior monks, and don't have access to the typical funding sources of religious orders (tithes from population, grants from nobles, selling things that monks produce, looting their enemies like Tampliers).  Is the Republic funding them?

If the Jedi are supposed to live a kind of monastic lifestyle and not own anything, how do they buy goods/services?  Can a Jedi make a profit out of business, maybe?


I just followed this discussion  to install driver and restart, then I get only black screen after I choose boot option. How can I fix this situation?  I can enter recovery mode, and use vi command to check my /var/log/dpkg.log file, but there are too many messages like "install...", "remove...", "status...".  I'm not sure if I just use command dpkg --remove \*amd64\* or dpkg --purge \*amd64\* to remove them is safe or not.   Ubuntu 14.04  Dell Inspiron 14 3459 AMD Radeon R5 M315 2GB DDR3   In recovery mode, I choose "root" and enter   mount -o rw,remount / apt-get remove fglrx*   It looks like remove failed.      Does it mean that I need to "enable networking"? I've tried to choose that option in recovery mode, but it will show other error messages and can't open terminal successfully.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


If I have a lagrangian, then I can get the equations of the motion using the Euler-Lagrange equations. My question is about the converse of this statement: If one knows the equations of motion, like $𝑥=0$ and $2𝑦″+3𝑦2=0$, then how to derive the lagrangian (or equivalent lagrangians)? By $(x,y)$, I mean, generalized coordinates $q:=(x,y)$.

I have always been puzzled by how do you arrive at Lagrangians?  That is, how do you know that the functional you need to get Newton's equations is  $$L  =  T-V(x)~?$$ Do you derive the Lagrangian first somehow or do you just guess the one which would satisfy the action to give equation's of motion? (because then you would need to know the equations of motion first.) Also, is the Lagrangian always equivalent to something resembling $T-V$, or there are other ways to determine it? More generally, is the action known before you know the equations of motion, or vice versa?  What I really wish to know is, was the Einstein Hilbert action discovered before field equations were? If so, how? My major doubt is how do you come across the Lagrangian if you don't know the equations of motion, and you can't guess $L$ then?


Any solution is not do anything on my machine. I downloaded air Installed 32 bit packages but always said "permission denied"

I am a heavy user of certain applications that are built on AIR.   It appears that AIR has discontinued support for Linux. Even the older versions in the Adobe AIR Archives seem to support only 32 bit Linux distributions and I am on 64 bit currently.  Is there even a slight possibility that I could run AIR in these conditions? If so, can you please tell me where can I get a detailed step by step installation for this?


I keep getting this failed message and I don't know how to fix it.  These are the details in the error:  W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/source/Sources  404  Not Found [IP: 2001:67c:1562::15 80] W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/binary-amd64/Packages  404  Not Found [IP: 2001:67c:1562::15 80] W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-amd64/Packages  404  Not Found [IP: 2001:67c:1562::15 80] W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-amd64/Packages  404  Not Found [IP: 2001:67c:1562::15 80] W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-amd64/Packages  404  Not Found [IP: 2001:67c:1562::15 80] W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages  404  Not Found [IP: 2001:67c:1562::15 80] W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages  404  Not Found [IP: 2001:67c:1562::15 80] W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages  404  Not Found [IP: 2001:67c:1562::15 80] E:Some index files failed to download. They have been ignored, or old ones used instead.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I was curious about the following diophantine equation $$x^xy^y=z^z$$ The equation seemed to have no positive integer solutions except for when $x$ or $y$ was $1$.  Though I attempted to solve the equation using prime factoring, I was able to proceed no further.   However, since I believe that I saw this question in a book, it is likely that this question is a duplicate or has been solved before. In that case I wish to apologize.   Any progress on the question would be appreciated.

Question : Do there exist an infinite number of integer-solutions $(x,y,z)$ of $x^x\cdot y^y=z^z$ where $1\lt x\le y$ ?  Motivation : After struggling to find a solution, I've just got one solution, which is  $$(x,y,z)=(1679616, 2985984, 4478976).$$  In the following, I'm going to write how I got this solution.  Letting $d$ be the greatest common divisor of $x,y,z$, we can represent $$x=ad, y=bd, z=cd$$ where $a,b,c$ are coprimes with each other. Then, we get $$d^{a+b-c}\cdot a^a\cdot b^b=c^c.$$  In the following, let's consider without the condition $x\le y$. Here, I suppose  $$a=2^m, b=3^n, a+b-c=1.$$  (As a result, this supposition works.)  Then, we get $$d=\frac{c^c}{2^{ma}\cdot 3^{nb}}.$$  Hence, letting $c=2^k\cdot 3^l$, if  $$kc\ge ma=m\cdot 2^m, lc\ge nb=n\cdot 3^n,$$ then $d$ is an integer.  Since $(m,n)=(4,2)$ satisfies the above conditions, then we get $d=2^8\cdot 3^6=186624.$ Hence we can get  $$x=9d=2^8\cdot 3^8=1679616, y=16d=2^{12}\cdot 3^6=2985984, z=24d=2^{11}\cdot 3^7=4478976.$$ Note that here I interchanged $x$ and $y$.  P.S : I was surprised to get this solution because I got this almost by chance. So, I don't know the other solutions. If you have any helpful information, please teach me.


I want to generate a serial number for one of my classes like xxxxxxxxxx and I want its length to be exactly 10 characters. how can I generate random UUID by only using "1234567890". is there something I have to pass to constructor or UUID.randomUUID()? and how can I give it a fixed length?

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


How accurate are the OTF transformations in QGIS (2.18)?   I created a 100m by 100m square polygon in a shapefile layer using a CRS of WGS84/UTM zone 14N (EPSG:32614). The project also uses the same CRS. With OTF transformation turned off, when I measure the area and the side of the square using the measurement tool, I get 10,000 sq m for the area and 100m on each side, as expected.   If I turn on OTF transformation and use the measurement tool, I get 10066.2065 sq m for the area and 99.9941 m for each side. Not only is the area incorrect, but multiplying the lengths of the measured sides (99.9941 x 99.9941) does not equal 10066.2065.  Is there a bug or am I just not understanding what OTF does?  Currently, most of my projects use OTF because I receive shapefiles with varying CRS's. It sounds like I need to have each layer reprojected to the same CRS as the project and turn off OTF if I want to get accurate areas and distances. Is this correct and is reprojecting a layer more accurate than OTF?

When I open QGIS, add the layer, and calculate the areas of the shapefile via field calculator I get a different area than when I open QGIS and check "Enable on the fly CRS transformation" and calculate the area. This is despite making sure that the project and the layer have the same Coordinate system (same EPSG number). What am I doing wrong?   I have a shapefile with area calculations made with ArcGIS (not be me, the data was handed to me and I have no clue for which CRS the area was calculated with ArcGIS). The shapefile layer CRS is EPSG: 21781 (Switzerland). In QGIS, if I do not change the OTF settings and leave the project CRS as EPSG:4326 (WGS84) I get the same value as the ArcGIS area value. However, if I change the OTF before adding the layer to EPSG: 21781 I get different area values. As I understand this suggests that ArcGIS Area was calculated with the CRS EPSG: 4326.  First workflow:   open QGIS  project CRS: EPSG 4326  add layer  project CRS adapts automatically and is EPSG 21781 now  calculate $area with field calculator    Second workflow:   open QGIS  project CRS: EPSG 4326  Turn on OTF, set project CRS to EPSG 21781  add layer  calculate $area with field calculator    Step 5 of the first and second workflow DO NOT produce the same area.


The title basically says it all: "Why is downvoting a question free but downvoting an answer not?"  I ask this because I think bad answers are a lot more damaging than bad questions. If it is a a bad question it might lead to some minutes wasted for the people that read it. But a bad answer can lead to big bugs into production code. False faith in how stuff works, or can even be bad propaganda.  So why does it cost me that silly 1 rep. I know it shouldn't matter. I have plenty of rep, but still I hesitate that tiny bit before doing it.

I've just read that . However, there are many, many members who will never dare downvote anything because of that little 1 rep. (Besides, I think downvoting is not taken into account in the 200 daily reputation limit, but I'm not sure.) This has, as a side effect, that only really, really bad questions get downvoted.  I understand that downvotes remove rep from the people who receive it, so it must not be abused. But maybe users could have, like, (reputation / 1000) free downvotes every day?  Currently, the incentive for downvoting is a strong sense of duty. The incentive for not downvoting is OHEMGEE LOOK AT MY REP. And often, the latter is stronger.


Version 18.04 sudo apt-get update  I am trying to "update" but am getting the following message:  Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease   Could not resolve 'archive.ubuntu.com' Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease   Could not resolve 'archive.ubuntu.com' Err:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease   Could not resolve 'archive.ubuntu.com' Err:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease   Could not resolve 'archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease Could not resolve 'archive.ubuntu.com' W: Some index files failed to download. They have been ignored, or cold ones used instead.   I have tried to follow various solutions for this but cannot resolve it.  I have tried to update using ethernet in case it was the wifi. I still get the same error.  I have tried to do:   echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/nell   but get  tee: /etc/resolvconf/resolv.conf.d/base: No such file or directory

Like , I can't run apt-get update sometimes. Restarting or waiting for a while makes the problem go away. I never have issues pinging or visiting the respective URLs in a browser.  I've tried every up-voted answer to no avail. What is apt doing that is so different to ping or my browser? For example, when I run apt-get update I see this:  Err:1 https://download.docker.com/linux/ubuntu xenial InRelease   Could not resolve host: download.docker.com Err:2 https://deb.opera.com/opera-stable stable InRelease   Could not resolve host: deb.opera.com Err:3 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu xenial InRelease   Could not resolve 'ppa.launchpad.net' Err:4 http://ppa.launchpad.net/saiarcot895/myppa/ubuntu xenial InRelease   Could not resolve 'ppa.launchpad.net' Err:5 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial InRelease   Could not resolve 'ppa.launchpad.net' Err:6 http://repository.spotify.com stable InRelease   Could not resolve 'repository.spotify.com' Err:7 http://dl.google.com/linux/chrome/deb stable InRelease   Could not resolve 'dl.google.com' Err:8 http://archive.ubuntu.com/ubuntu xenial InRelease   Could not resolve 'archive.ubuntu.com' Err:9 http://archive.ubuntu.com/ubuntu xenial-updates InRelease   Could not resolve 'archive.ubuntu.com' Err:10 http://archive.ubuntu.com/ubuntu xenial-backports InRelease   Could not resolve 'archive.ubuntu.com' Err:11 http://archive.ubuntu.com/ubuntu xenial-security InRelease   Could not resolve 'archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Could not resolve 'archive.ubuntu.com' W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/xenial/InRelease  Could not resolve host: download.docker.com W: Failed to fetch http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/dists/xenial/InRelease  Could not resolve 'ppa.launchpad.net' W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease  Could not resolve 'dl.google.com' W: Failed to fetch https://deb.opera.com/opera-stable/dists/stable/InRelease  Could not resolve host: deb.opera.com W: Failed to fetch http://ppa.launchpad.net/saiarcot895/myppa/ubuntu/dists/xenial/InRelease  Could not resolve 'ppa.launchpad.net' W: Failed to fetch http://repository.spotify.com/dists/stable/InRelease  Could not resolve 'repository.spotify.com' W: Failed to fetch http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/dists/xenial/InRelease  Could not resolve 'ppa.launchpad.net' W: Some index files failed to download. They have been ignored, or old ones used instead.   Running ping download.docker.com:  PING d2h67oheeuigaw.cloudfront.net (52.85.41.233) 56(84) bytes of data. 64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=1 ttl=251 time=18.8 ms 64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=2 ttl=251 time=18.4 ms 64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=3 ttl=251 time=19.5 ms   And visiting the page in my browser works fine. How can I make apt-get "just work"?  Here is the contents of my /etc/apt/resolv.conf:  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1 search home.gateway


I am doing a binary logistic regression analysis. I got one categorical predictor with 7 levels. When I try to do this in Minitab 17 I get an error message: "The model could not be fit. Maximum likelihood estimates of parameters may not exist due to quasi-complete separation of data points."  If I exclude 5 of the levels and only test the two I am actually interested in, I do not get this message. But I guess that simply excluding levels does not come without a cost and would need to be corrected for? (Even if these two, control vs special treatment, were the ones I was interested in.)  Does anyone know of a way out of this (other than adding more data since I do not have that option)? In R maybe? Or another test?

If you have a variable which perfectly separates zeroes and ones in target variable, R will yield the following "perfect or quasi perfect separation" warning message:  Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred    We still get the model but the coefficient estimates are inflated.   How do you deal with this in practice?


I am running into this issue when I try to run a script. It was working fine, and I made edits. /bin/bash^M: bad interpreter: No such file or directory

I wanted to execute a shell script:  -rwxr-x--x 1 root root   17234 Jun  6 18:31 create_mgw_3shelf_6xIPNI1P.sh   I tried to do a standard procedure, but I got this error:  ./create_mgw_3shelf_6xIPNI1P.sh  localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0  DEBUG   cd/etc/opt/ldapfiles/ldif_in ; ./create_mgw_3shelf_6xIPNI1P.sh  localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0 **ERROR  sh: ./create_mgw_3shelf_6xIPNI1P.sh: /bin/bash^M: bad interpreter: No such file or directory**   What does it mean? I was doing this as the root user under the root group.  Does it mean that the file does not have the correct permission for the root user?


Hello I wanted to ask how the width of the depletion region in reverse biased condition changes with the external  voltage source

Why does the width of the depletion region of a p-n junction diode increase when it's reverse biased by connecting it to an external voltage source?


I purchased seven May 8th $83 put contracts  for 88 cents each for a cost of $616. The current market value is $88. From what I understand, that is out-of-the-money and I would not want to sell because I would be losing money, correct?   Do I just let them expire? Is my premium the $616 that I will be out at expiration? Should I sell it before it expires?   Can I be forced to pay the full price of $58k for all 700 shares?  If not,  what is the worst case scenario?   I did not understand what I was getting into when I bought this so lesson learned the hard way.

I never understood Puts or Calls. Could anybody explain it like I were a child?


How to solve this summatory?: $$\sum _{n=0}^{\infty }n^2\:0.999^{n-1}\cdot 0.001$$  I know how to calculate this one: $$\sum _{n=0}^{\infty }n\:0.999^{n-1}\cdot 0.001$$ as a sumatory of an arithmetic-geometric progression, but I don't know how to calculate this one with the square.

I'd like to find out why  \begin{align} \sum_{n=0}^{\infty} \frac{n^2}{2^n} = 6 \end{align}  I tried to rewrite it into a geometric series  \begin{align} \sum_{n=0}^{\infty} \frac{n^2}{2^n} = \sum_{n=0}^{\infty} \Big(\frac{1}{2}\Big)^nn^2 \end{align}  But I don't know what to do with the $n^2$.


Let f be a non-decreasing, integrable function defined on [0, 1]. Show that $${\left( \int_{0}^{1} f(x)\right)}^2 \le 2\int_{0}^{1} x{(f(x))}^2$$  I tried using by parts , but it is of no help,  ${\left( \int_{0}^{1} f(x)\right)}^2 \le\int_{0}^{1} {(f(x))}^2$  Any hints?

Let $f$ be a nondecreasing, integrable, function defined on $[0, 1]$. Show that $$\left(\int_0^1 f(x)\,dx\right)^2\leq2\int_0^1x \,f(x)^2\,dx $$


What  type of file should I make the partitions, what size should I make them and do I need a storage partition for a total of 3. 1-OS Partition, 2-Swap Partition, and 3-Storage Partition?

What partitioning scheme do you recommend for a desktop? I've always created three or four primary partitions -- root, swap, home, and sometimes a separate boot partition. Ubuntu's default install offers LVMs. I've never had to add additional drives or space, so it never seemed like a big deal. Whenever I do a fresh install, though, I always think there might be a better way.


With the Schengen visa taken from Italian embassy can I enter Spain?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I have an HTC One with Sprint, and I believe this icon appeared after the 4.3 update.  I have gone through the list of apps (both running and total) but nothing appears to match up.  Other friends with Android phones don't appear to have this icon, but they all root and customize 7893 ways.  Can anybody identify this icon?


In "native" i mean the only solution i've found was , but its the WinXP gpedit.msc which somewhat run on Win7+.  Sometime ago i found a real Win10's gpedit but i forgot where i've got that.  Does anyone know if i wasnt dreaming and there's indeed a modern gpedit.msc floating around, or a alternative for this?

I want to make some changes to Windows that require using the Group Policy Editor (gpedit.msc).  Unfortunately the Group Policy Editor is not included with the Starter Edition, Home and Home Premium editions of Windows.  How can I install it?


The novel is about a girl who wakes up in an android body after Earth is destroyed by a mysterious species who eradicate technology. The new society she finds herself in prohibits technological advances to prevent future discoveries. The story outlines her efforts to lead mankind into a new era of technological discovery beginning with black powder and sailing.

Between 2005-2008, I entered a Barnes and Noble and came across a book in the New Releases section that I regretted not purchasing. I remember only the following from the back-panel summary of the book:   Humanity was more or less wiped out. The remains of humanity were put into a deep sleep on one (or more) large spaceship(s). When they arrived a new planet, they had a society where religion was/wasn't outlawed (can't remember anymore). A lot of bad stuff went down after humanity rebuilt itself on this new planet.


I have seen many questions about almost the same integral; the only difference is the absolute value. How can I check if this integral converges (as real integral)?  $\displaystyle\int_0^\infty |\sin (x^2)| \; dx$  EDIT: I've read  in topic you linked, and I don't fully understand the steps in:     Now we observe that $|\frac{\cos(x)}{2 \sqrt x}|\geq \frac{\cos^2(x)}{2 \sqrt x}=\frac{1}{4\sqrt x}+\frac{\cos(2x)}{4\sqrt x}$.    And this, which arguments?      By the same arguments above $\displaystyle\int_{0}^{\infty}\frac{\cos(2x)}{4\sqrt x}dx$ converges.

I know this is a silly question, but I've tried to find an answer using my TI-89 calculator, Maple and wolframalpha but none of those could tell me whether  $$\int_0^\infty |\cos(x^2)| \mathrm dx$$   converges or diverges.  Thus, I'd be very happy if someone could help me out and tell me, whether the given integral converges or not (and why?). Thanks a lot.


I have found a javascript example and I need an explanation:        <button type="button" onclick="myFunction()">Count!</button>
0
           I don't understand why the value of var counter get increased every time I press the button while in other place of this tutorial I read: "The lifetime of a JavaScript variable starts when it is declared. Local variables are deleted when the function is completed."

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I have a macOS 10.6.5 and am trying to upgrade it but don't know how to, what can I do?

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


I've done this C++ data structures program is mostly correct, however I am having trouble with the RefFunction() parameters. They are not designed quite properly. They are not supposed to be pass by value, but rather pass by reference and I'm not sure how to do that. It takes a reference to an int, and a reference to a double. It queries the user to input values to be stored in the variables referenced by its arguments. Then be able to return in the class instance and print the values in main(). I greatly appreciate any help as I am very stuck. Thank you very much.  Header file:  #ifndef Prog1Class_h #define Prog1Class_h   //A data structure of type Prog1Struct containing three variables struct Prog1Struct {     int m_iVal;     double m_dVal;     char m_sLine[81]; };  // A class, Prog1Class, containing a constructor and destructor // and function prototypes class Prog1Class { public:     Prog1Class();      ~Prog1Class();       void PtrFunction(int *, double *);     void RefFunction(int, double);     void StructFunction(Prog1Struct *); };  #endif    .CPP file  #include "Prog1Class.h" #include <string> #include <iostream> using namespace std;  Prog1Class::Prog1Class() {} Prog1Class::~Prog1Class() {}  // PtrFunction shall query the user to input values to be stored in the // variables referenced by it's pointer arguments void Prog1Class::PtrFunction(int *a, double *b) {     cout << "Input keyboard values of type integer and double"<<endl;      cin>>*a >>*b; }  // RefFunction shall be a C++ Reference function and shall query the user to // input values to be stored in the variables referenced by it's arguments void Prog1Class::RefFunction(int a, double b) {     cout << "Input keyboard values of type integer and double"<<endl;     cin >>a >>b; }  // StructFunction shall query the user to input values to be stored in the // three fields of the data structure referenced by its argument void Prog1Class::StructFunction(Prog1Struct* s) {     cout << "Input keyboard values of type integer and double"<<endl;      cin >>s->m_iVal>>s->m_dVal;     cout <<"Input a character string";     cin.ignore(1000, '\n');     cin.getline(s->m_sLine, 81, '\n');  }

I would like to clarify the differences between by value and by reference.  I drew a picture     So, for passing by value,  a copy of an identical object is created with a different reference, and the local variable is assigned the new reference, so to point to the new copy  How to understand the words: " If the function modifies that value, the modifications appear also within the scope of the calling function for both passing by value and by reference "  Thanks!


My recent attempts to use Ubuntu have been plagued with problems using apt.  I typically get the message, "you have held broken packages."  So recently I regressed to Ubuntu 18.04.3.  Got the iso from Ubuntu && verified it according to directions.  This cleared up a number of problems, but I still have one.  I can't install openssh-server.  # apt install openssh-server Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  openssh-server : Depends: openssh-client (= 1:7.6p1-4)                   Depends: openssh-sftp-server but it is not going to be installed                   Recommends: ssh-import-id but it is not going to be installed E: Unable to correct problems, you have held broken packages.   System is a Lenovo i5 laptop with 16GB RAM, a 1 tera-byte Samsung SATA SSD, and a Giga-bit Ethernet dongle.    Installation was done as "something else" where the old partitions were reused, and the root (/) and /var partitions were freshly formatted to ext4.

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


I am reading a book about linear regression in which there is a plot showing the regression line and two curves they call a confidence band (also can be seen ). As I learn something last week that a set of samples may result in a statistical quantity called the confidence level which used to describe the "precision" of estimation of the population. However,  shows two curves of confidence level at each variable X of the fitting line. It is quite confusing why there will be a curve instead of a single number. My best guess is at each X, there could be tons of measurement so many $\hat{Y}$'s returned, and there will be confidence level for those $\hat{Y}$'s. If this is correct, why there are local minima of confidence curves. The local minima indicate there is some point at which you do the measurement, results will be more "precise"? I don't see how this happen.  My second question is how to compute the confidence curves. Though many software like R and Mplus work out the problem easily, I want to know how to compute that by hand calculation. I know the  states the algebra and I borrow the math here  $$ s_{\hat{Y}_{X}} = s_{Y|X}\sqrt{\frac{1}{n}+\frac{\left(X-\bar{X}\right)^{2}}{\sum_{i=1}^{n}{\left(X_{i}-\bar{X}\right)^{2}}}} $$  $$ s_{Y|X} = \sqrt{\frac{\sum_{i=1}^{n}{\left(Y_{i}-\hat{Y}\right)^{2}}}{n-2}} $$  $$ \hat{Y} \pm t_{\nu=n-2, \alpha/2}s_{\hat{Y}} $$  I am trying to understand those expressions and notation. My understanding is $X$ is the independent variable we choose for the fitting line and $X_i$ is the independent variable from data. $\hat{Y}$ is the measurement on the fitted line when $X$ is given while $Y_i$ is the measurement from data. I don't understand what $Y$ stands for. From the math, it seems that we compute something called $S_{\hat{Y}_X}$ from data and fitted values then use the very last formula to compute the curve. In the last expression, the $t$ is the student distribution and $\alpha$ related to the confidence level we choose and I assume there is a typo that $S_\hat{Y}$ should be $S_{\hat{Y}_X}$?  Very last question. I don't remember which book I read before but there is an example to introduce a cross term in the regression model something like  $$   Y = a_0 + a_1X + a_2TX $$   Where $Y$, $X$ and $T$ are given as data and by regression, $a_0$, $a_1$ and $a_2$ are computed. But instead of plotting Y again X, the author concerns the plot $Z=a_2T$ against $T$ only. In this case, if we want to plot the confidence band as well, should I just repeat the same calculation but replace $\hat{Y}$ with $\hat{Z}$, $X$ with $T$ and $\overline{X}$ with $\overline{T}$?

I have noticed that the confidence interval for predicted values in an linear regression tends to be narrow around the mean of the predictor and fat around the minimum and maximum values of the predictor. This can be seen in plots of these 4 linear regressions:    I initially thought this was because most values of the predictors were concentrated around the mean of the predictor. However, I then noticed that the narrow middle of the confidence interval would occur even if many values of were concentrated around the extremes of the predictor, as in the bottom left linear regression, which lots of values of the predictor are concentrated around the minimum of the predictor.  is anyone able to explain why confidence intervals for the predicted values in an linear regression tend to be narrow in the middle and fat at the extremes?


Every once in a while I have a question I am certain must have been asked and answered before on some Stack Exchange site, but it takes me a considerable amount of trial and error until I find the right words for Google or the Stack Exchange search to provide me with the post I was looking for.  There is a value to having duplicates around. Jeff Atwood :     There’s often benefit to having multiple subtle variants of a question around, as people tend to ask and search using completely different words, and the better our coverage, the better odds our fellow programmers can find the answer they’re looking for.   That made me wonder if it wouldn't make sense to ask a duplicate on purpose using my own words and marking it as a duplicate immediately. This would prevent future researches from spending their precious time. Also if the question were to be asked again, it would linger around longer unclosed, again wasting resources as people try to answer the question.    I am well aware of the irony if this turned out to be a duplicate..  Edit: Well..

Is it OK to ask a duplicate question simply for the purpose of linking your exact question to an identical, yet differently worded question?  For example, I want to know why, in bash, the EOF tactic/input redirection does not work when inside an if/elif/else block. The answer is in an unrelated question   What I want to do is ask a question along the lines of "Why does EOF and input redirection not work inside an IF block", then either immediately answer the question by linking to the other question, or request the question be closed as a duplicate.


There are several Questions and Answers regarding the use of listings under LyX. And they mention, or explain, how to enable syntax highlighting. While this is easy to achieve, my attempt to use a custom color (defined in the Preamble) for keywords, fails.  For example, I would like to use the color \definecolor{grassgis}{rgb}{8, 150, 13} within the Listings settings (LyX: Document > Settings > Listings). It appears as white!    Using any of the conventional colors, like magenta works fine.    Why is this happening? Where should the custom color definition be placed?

I am trying to define an rgb color. More specifically I want to create this color    which in rgb mode it's (98,190,177).  I tried to define this color using the following code  \documentclass{standalone}  \usepackage{tikz}  \begin{document}  \definecolor{tank}{rgb}{0.098,0.190,0.177}  %\definecolor{tank}{rgb}{98,190,177}  \begin{tikzpicture}   \coordinate (tank) at (0,0);   \draw[red, fill=tank] (-2,0.5)--(-0.5,1)--(0.5,1)--(2,0.5)--(2,-0.5)--(0.5,-1)--(-0.5,-1)--(-2,-0.5)--cycle;  \end{tikzpicture} \end{document}   but the output is totally different from what I am trying to achieve    I also tried to use \definecolor{tank}{rgb}{98,190,177} but I get no color at all. How to properly define an rgb color?


Which is correct?  You are one of the people who has or have helped me.

In the construction "one of the [plural noun] who ...", should the verb agree with "one" or "[plural noun]"?   For example, which of the two following sentences is grammatically correct? Or are both acceptable?        She was one of the several children who was sold at the auction    She was one of the several children who were sold at the auction.


How do I animate a strip so that it looks like it's being drawn over time, as though it were produced by actual writing?  I can't find a direct way to make it. For now I am using a surrogate method - make an array of planes and add it to a curve path, then animate the array count.

I wonder what would be the best way of animating multiple 2 dimensional lines in blender.  Lets say I have lots of line, that are parallel and have some sort of rule, kind of like a PCB board with hundreds of circuits.  The starting frame would be when nothing is visible and during the animation the lines would slowly build up from nothing all the way to the end forming the finished lines.  I have a couple of ideas that might work, but all include heavy hand animation, like:   grease pencil animation, drawing them one by one, converting to curve, then build up modifier some dynamic paint hack   There maybe other more efficient methods that I don't know of and if so, please let me know.


"Occasionally, I receive requests that does not meet our requirements" - "does not" or "do not" should be used in this context?

How does serverfault, stackoverflow and other stackExchange sites connect together?   Is that does or do? Because I'm talking about multiple items, it would be do. What is more correct?


Background   My friend did an observational experiment. She observed several colonies of animals for six months (one time per month) in the year 2014 and 2015. Some treatment to the environments of those animals were made in the year 2014 and in the year 2015, the environment was kept as natural as possible. She wants to test if there is a statistically significant difference between the sizes of colonies comparing the year 2014 and 2015.  The situation  The friend wants to use Wilcoxson's test for paired data to compare if differences in colony size among the year 2014 and 2015 are statistically significant. Each observation is the size of the colony in each month. In my opinion, the test is not appropriate as data is time series.  The plots of the results    The question   Is Wilcoxon's test appropriate for this problem?    If not, could you advise what are the appropriate methods (if possible, an example in R would be appreciated)?      Are any methods of inferential statistics appropriate at all?   The data and R code for plots  library(data.table) library(ggplot2)  col1 <- fread(" colony_size  year   month  637          y2014  01     609          y2014  02 582          y2014  03 902          y2014  04 945          y2014  05 954          y2014  06 640          y2015  01 615          y2015  02 585          y2015  03 922          y2015  04 1040         y2015  05 1097         y2015  06 ")    ggplot(col1, aes(month, colony_size, color = year)) +     geom_line()  + geom_point() + theme_bw() + ggtitle("Colony 1")

I have a dataset of measurements (non-normally distributed). Each line of this dataset is composed of two measurements of the same variable at a specific time (i.e. XYY [time, meas1, meas2]). This dataset contains 24 lines.  Is it correct to use the Wilcoxon Signed-Rank Test to compare these two measurements? Is it correct to use this test to compare the mean value of these measurements between different experiments?  Thanks


Actually, I want to know which Stack Exchange site can be used to ask questions that are related to coding, but not broken or not to check whether the code is efficient or not.  For example,   Is that a good idea to use jQuery in React Which is good for beginners, npm or yarn? Can React native control hardware devices?   These are a few questions that are very much off-topic on Stack Overflow or the code review site.  My actual questions are different, but somewhat similar to those.

I want to learn one functional programming language. I would like to know pros/cons of various  candidates based on some assumptions (to be specified in question).  Now as it is Opinion based,  is definitely not a place.   could be one place, but  suggest other wise.  Is there any suitable SE forum where opinion based questions are allowed?


I'm learning jQuery by trying to understand other people's code.  I ran into this:  jQuery.fn.myFunc = function(options, callback) {  //stuff    jQuery(this)[settings.event](function(e) {     var self = this,     $self = jQuery( this ),     $body = jQuery( "body" );      //etc.   }  //more stuff  }   My understanding is that $ refers to the jQuery object.  So why put $ with $self and $body? And is self the same as $self?

I quite often see JavaScript with variables that start with a dollar sign. When/why would you choose to prefix a variable in this way?  (I'm not asking about $('p.foo') syntax that you see in jQuery and others, but normal variables like $name and $order)


I would like to use screen (from GNOME Terminal, via ssh) like I use GNOME Terminal without screen, or as close as possible to that. Specifically:  In GNOME Terminal, I can scroll back using the mouse wheel, the scrollbar or Shift+PgUp/PgDn. In screen, I have to go to copy mode (Ctrl+A,[) to be able to scroll back (mouse wheel works after that). Scrolling behavior can be changed (see  and ) but this solution has the following flaws:   When I open a file with less or vim, I can scroll above the editor 'window' with my mouse wheel and see the previous contents of the terminal. When I close the editor, its contents stay in the scrollback buffer (sometimes in several copies) instead of disappearing.   This behavior can be changed using altscreen on (see ) but the only effect is that when the editor is closed, the old terminal contents are appended to the scrollback buffer in my terminal window so I can still see the editor crap when I scroll back using my mouse wheel.  Does this mean it's not possible to have nice scrolling in screen? Basically, all I'd like is being able to scroll just like in copy mode (using the mouse wheel, and scrollbar if possible) but without having to enter copy mode.

I love screen, but it drives me nuts that I have to stop typing input, hit CTRL+A [, and then find what I need.  Is there a way to make the scroll wheel function normally, rather than scrolling commands?   Also, is it possible to enable Shift+PageUp/PageDn?


Blend modes work great between layers but can I blend to the canvas?  For example, take this image:    It has an orange square on the left and transparent canvas on the right. I then placed a black-to-white gradient in the middle and set it to the multiply blend mode. On the left (over the orange) we can see the gradient essentially fading from fully opaque black to fully transparent, but on the right (over the canvas) we see no change in opacity or blending, it's still the plain black-to-white gradient.  Is there a way to make the right side blend with the canvas so that it's fully opaque black at the top and fully transparent at the bottom?  I know that I could use the gradient tool to solve the issue for this simple example, but often I have more complex artwork to deal with and having the ability to make blacks solid and whites transparent over the canvas would be fantastic! I think of this as blending to the canvas but perhaps there's another name or tool for this?  Fireworks had a filter called  which would get the result I'm after. It would convert your later to gresycale, then anything black would become 100% opaque, anything white became 0% opaque, and all shades of grey would fall somewehere inbetween. I'm looking for an eiquivelant feature in Photoshop!

I want to replace the whiteness in pixels with transparency in the same way as described in  - i.e. for lighter pixels to be made proportionally as transparent. All solutions found via google are based on magic wand or other methods that do not work for my needs.  I'm sure there used to be a way to do this in earlier version of Photoshop (a simple functions to replace a colour with transparency), but I can't seem to do it in CS6.  Replace Colour has no alpha options..


Question: Let R be a finite ring without zero divisors and |R| > 1. Then show that R is a division ring. I used the following logic, but I'm not sure if this is correct. Let |R| = n, a finite number. $Let 0 \not = a \in R.$ Therefore, $a^n = a => a(a^{n-1} - 1) = 0 => a^{n-1} = 1 \,\,\, (\text{Since} \,\, a \not = 0)$ Therefore, $a a^{n-2} = 1$ Therefore $a^{n-2}$ is the inverse of a for all a. Therefore R is a division ring. Does this work?

Let $R$ be a finite ring with unity. Prove that every nonzero element of $R$ is either a unit or a zero-divisor.


I would like to create an program like a text module in background. With a shortcut like ALT+A I am going to simulate an double click at the current cursor position (to select a word in a third party application) and use sendkeys CTRL + C to copy the text into my clipboard. But sendkeys does not work to copy the selected text to clipboard. Is it possible to realize an application like this?         //Jump to cursor position         SetCursorPos(xpos, ypos);          //Simulate double click         mouse_event(MOUSEEVENTF_LEFTDOWN, xpos, ypos, 0, 0);         mouse_event(MOUSEEVENTF_LEFTUP, xpos, ypos, 0, 0);         Thread.Sleep(50);         mouse_event(MOUSEEVENTF_LEFTDOWN, xpos, ypos, 0, 0);         mouse_event(MOUSEEVENTF_LEFTUP, xpos, ypos, 0, 0);          //Copy to clipboard         SendKeys.SendWait("^C");                  //Show Clipboard Text         MessageBox.Show(Clipboard.GetText());  Thanks in advance.

I have a windows application running at the backend. I have functions in this applications mapped to hot keys. Like if I put a message box into this function and give hot key as Alt+Ctrl+D. then on pressing Alt, Ctrl and D together the message box comes up. My application is working fine till this point.   Now I want to write a code inside this function so that when I am using another application like notepad, I select a particular line of text and press the hot key Alt + Ctrl + D it is supposed to copy the selected text append it with "_copied" and paste it back to notepad.   Anyone who has tried a similar application please help me with your valuable inputs.


def f(x):     xs=str(x)     if len(xs) == 1:         return int(xs)     n = int(xs[0]) + int (xs[1])     if len (xs) == 2:         return n     else:         return n+f(xs[2:])   Speciffically, what does f(xs[2:]) do?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I wanted to make a desktop shortcut that performed an operation on multiple files matched by a wildcard pattern. However, it seems the desktop shortcut Exec option doesn't acknowledge globbing. For example, this desktop shortcut is supposed to remove all .png files in the home directory. However, it instead tries to remove a file literally named *.png (I think). [Desktop Entry] Encoding=UTF-8 Version=1.0 Name=remove pngs Exec=rm *.png Terminal=true Type=Application  I also found that it wouldn't expand things such as ~ or $HOME, needing an absolute path instead. Is it possible to perform shell globbing in a desktop shortcut, and if so how?

I'm trying to make a .desktop file for Minecraft. Nothing appears to happen upon executing the file. I've tried assigning the Exec key as follows:  Exec= java -jar "~/.minecraft/Minecraft.jar"  Exec= java -jar "$HOME/.minecraft/Minecraft.jar"  But I'm not sure how to put in the reserved characters (~ and $) correctly. According to Freedesktop's :      If an argument contains a reserved character the argument must be quoted.   and     Quoting must be done by enclosing the argument between double quotes and escaping the double quote character, backtick character ("`"), dollar sign ("$") and backslash character ("\") by preceding it with an additional backslash character. Implementations must undo quoting before expanding field codes and before passing the argument to the executable program.   But that's very confusing to me.


I'm using a MacBook Pro, macOS 10.14.6.  Ten days ago, my System storage size was 86 GB.  Since then it has been growing and growing.  Today it's at 161 GB.  What could be causing this? Here's the full story.  This MacBook was purchased in April 2019.  It has a 251 GB of flash storage.  Ten days ago I started getting warnings that "Your disk is almost full".  I checked the numbers, and the figures were:  System  =  86 GB Parallels VMs  =  92 GB Documents  =  21 GB Applications  =  19 GB Other categories about 3 GB Free space  =  28 GB  So I started reducing these.  I reduced Parallels, Documents, and Applications over several days.  But when I did this, the System size grew, almost as if it was gobbling up anything I freed.  Today the figures are:  System  =  161 GB Parallels VMs  =  49 GB Documents  =  3 GB Applications  =  15 GB Other categories about < 1 GB Free space  =  17 GB  I performed a search for large files that have been modified in the past 14 days.   The only one bigger than 1 GB is this one: ~ > sudo ls -la /System/Library/Caches/com.apple.coresymbolicationd total 33486912 -rw-------   1 root  wheel  17145298944 Oct 30 13:37 data  That's a 17 GB file, which is huge.  But it doesn't account for the entire 161 GB in my System folder! By the way, is it safe to delete all the files in the /System/Library/Caches directory?

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


I have read some boost::thread code and found a lot of overloads of operator() in a struct. For instance, in boost/thread/thread_functors.hpp, you can see something like this:    struct detach   {     void operator()(thread& t)     {       t.detach();     }   };   I don't understand what the benefits are. Why not use functions like   void detach(thread& t) {...}   instead?

In the  library, they are overloading the () operator.  Is this a convention in C++? For callbacks, etc.?  I have seen this in code of a co-worker (who happens to be a big Boost fan). Of all the Boost goodness out there, this has only led to confusion for me.  Any insight as to the reason for this overload?


Is any possible to have:    When I plug in a USB drive, a shortcut to it is created on the desktop automatically? When I unplug in a USB drive, the shortcut to it is removed from the desktop automatically?

I use sometimes some Linux distros, e.g. Ubuntu, and I like the feature they have to add a desktop shortcut to every removable device that is plugged in on desktop - for example, when a DVD is inserted, a new icon for that appears on desktop, and with that I can access, eject etc.  I would like to have the same feature for Windows - specifically for Windows XP Professional SP3, but it is interesting to know the solution for other Windows versions...  Any help?  PS1: I would like to have "dynamic shortcuts", i.e, shortcutes that appears on desktop when the removable device is inserted and that disappears when it is removed.  PS2: I'm talking about CD/DVD media and massive storage devices mainly.


The following code results in a seg fault, when running in GDB it appears when the memory is changed to decrease the character by 32.   #include <stdio.h>  char *upper(char *);  int main(void) {      char *my_word = "hello";      printf("Upper: %s\n", upper(my_word));      return 0; }  char *upper(char *string) {     while(*string != '\0') {        *string -= 32;         string++;     }      return string; }

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I already have Windows 8.1 on my ultrabook, how do i install ubuntu alongside it? i do not have a spare usb drive nor does my laptop have an optical drive.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I am generating a pdf file with PDFLaTeX. The content of the pdf looks well at a first glance. However if I try to copy and paste the text to somewhere else the text look like this: ❉✐❡ ▼❡♥❣❡ ❛♥ ■♥❢♦r♠❛t✐♦♥❡♥ ✉♥❞ ❘❡ss♦✉r❝❡♥ ✐♠ ■♥t❡r♥❡t ✇ä❝❤st ❢♦rt❧❛✉❢❡♥❞✳ Instead of how it should looks like: Die Menge an Informationen und Ressourcen im Internet wächst fortlaufend.  Likewise it is not possible to search inside the pdf document. It seems that there is something wrong with the encoding.   EDIT I found that this happens because I am using the template dissonline:   There is a documentclass DissOnlineLatex which leads to this problem, but I am still not know how to fix it.

One frequent aspect of pdflatex output that could be improved is to what extent one can select text output from the generated pdf-file and copy-and-paste it. This is essentially an issue of having the right output encoding. There are at least two important aspects to this:   In the ideal case, Unicode would be the output encoding. Ligature glyphs (such as ﬁ) are ideally de-ligated in the output (here: "fi").   It seems that output encodings are specified through the fontenc package. What is the range of possible output encodings, and most importantly: Is there a way to specify a Unicode output encoding and one that deals with ligatures in the intended way?  (Note: It is important to distinguish output from input encodings. How to use different input encodings in LaTeX has been documented widely. My understanding is that this is best handled by the inputenx package, as it supersedes the inputenc package.)    Quick guide to the solutions: The information in the answers and answer threads is a bit distributed, so here the short summary: one approach is to use \input glyphtounicode together with \pdfgentounicode=1; the other approach is to use cmap/mmap.  Addendum: Sometimes one will need to load the package accsupp and enclose one's macro definition in \BeginAccSupp{method=hex,unicode,ActualText=<codepoint>}[...]\EndAccSupp{} to generate a specific code point. See the caveat about non-BMP code points  and the fix (starting from accsupp version v0.4, 2012/11/18) , which provides the new unichar package option.


I have an TL-WN727N wireless adapter connected to my laptop. Every time I start my laptop I must manually enter those two commands in a terminal:   echo 'install rt2800usb modprobe --ignore-install rt2800usb ; /bin/echo "148f 5370" > /sys/bus/usb/drivers/rt2800usb/new_id' | sudo tee /etc/modprobe.d/rt2800usb.conf  sudo modprobe -v rt2800usb    Is it possible to automatically run those two commands on startup to enable my internet connection?

I had a script that automatically enables my wifi without using networkmanager, but I don't know how to run the script as root while the system is booting. How do I make the script run automatically during boot?


Prove that $\gcd(g_a,g_b) = 1$ given that for $n \in Z^{\geq 0}$, define $g_n = 2^{2^n} + 1$. I have already proved that $g_0\cdot g_1\cdots g_{n-1} = g_n -2$ if this hint is useful in this proof.

So today in my final for number theory I had to prove that the Fermat numbers ($F_n=2^{2^n}+1$) are coprime.   I know that the standard proof uses the following: $F_n=F_1\cdots F_{n-1}+2$ and then the $\gcd$ divides $2$, and it cannot be two, and hence the numbers are coprime.  However, he asked us to use the hint: "Let $l$ be a prime dividing $F_n$. What can you say about the order of $2$ in $(\mathbb{Z}/l\mathbb{Z})^\times$?"   I have been thinking about it and I cannot figure out how to use his hint.  Any ideas?