I'm trying to install rainlendar-lite on ubuntu 18.04.1 and keep getting  Download is performed unsandboxed as root as file '/home/jim/Downloads/rainlendar2-lite_2.14.2.b157-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)  jim@jim-Z1-7623:~/Downloads$ sudo apt-get install ./rainlendar2-lite_2.14.2.b157-1_amd64.deb [sudo] password for jim:  Reading package lists... Done Building dependency tree        Reading state information... Done Note, selecting 'rainlendar2-lite' instead of './rainlendar2-lite_2.14.2.b157-1_amd64.deb' The following NEW packages will be installed:   rainlendar2-lite 0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded. Need to get 0 B/17.9 MB of archives. After this operation, 20.5 MB of additional disk space will be used. Get:1 /home/jim/Downloads/rainlendar2-lite_2.14.2.b157-1_amd64.deb rainlendar2-lite amd64 2.14.2.b157-1 [17.9 MB] Selecting previously unselected package rainlendar2-lite. (Reading database ... 180109 files and directories currently installed.) Preparing to unpack .../rainlendar2-lite_2.14.2.b157-1_amd64.deb ... Unpacking rainlendar2-lite (2.14.2.b157-1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Setting up rainlendar2-lite (2.14.2.b157-1) ... Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ... N: Download is performed unsandboxed as root as file '/home/jim/Downloads/rainlendar2-lite_2.14.2.b157-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)   EDIT: Thanks everyone. I've given up on installing rainlendar 2.14, and gone back to rainlendar 2.13, which works fine. In checking on the rainlendar forum, some people are having the same issues I'm having, but not everyone (a really bizarre problem that only affects some users???). So for now, my issue is solved, but not the install problem with rainlendar 2.14. Thanks again.
I can't install Rainlendar 2 on my Ubuntu 18.04, I found this solution for 16.04 (), followed it, seems to work, but after install, there's no Rainlendar in my Show Apps, so I'm not sure what went wrong. When I issued sudo dpkg -i rainlendar2-pro_2.12.2.b138-1_amd64.deb, I got this:   Selecting previously unselected package rainlendar2-pro. (Reading database ... 190677 files and directories currently installed.) Preparing to unpack rainlendar2-pro_2.12.2.b138-1_amd64.deb ... Unpacking rainlendar2-pro (2.12.2.b138-1) ... dpkg: dependency problems prevent configuration of rainlendar2-pro:  rainlendar2-pro depends on libpng12-0; however:   Package libpng12-0 is not installed.  rainlendar2-pro depends on tofrodos; however:   Package tofrodos is not installed.  rainlendar2-pro depends on libjpeg62; however:   Package libjpeg62 is not installed.  rainlendar2-pro depends on libwebkitgtk-1.0-0; however:   Package libwebkitgtk-1.0-0 is not installed.  dpkg: error processing package rainlendar2-pro (--install):  dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.13.3-11ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Errors were encountered while processing:  rainlendar2-pro   I got this after issuing this command in terminal sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED:   rainlendar2-pro 0 upgraded, 0 newly installed, 1 to remove and 35 not upgraded. 1 not fully installed or removed. After this operation, 20.5 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 191316 files and directories currently installed.) Removing rainlendar2-pro (2.12.2.b138-1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...   What I'm doing wrong? After the last command it just removed Rainlendar and not installing dependencies as stated in the original post? TIA
I want to create a DEB file manually. I would like to just provide a folder which contains data to install, and a script to be executed after installation.  Is this possible? I'm trying to match SHA1's in generic text with a regular expression.  Ideally I want to avoid matching words.   It's safe to say that full SHA1's have a distinctive pattern (they're long and a consistent length) - so I can match these reliably - but what about abbreviated SHA1's?  Can I rely on the presence of numbers?  Looking at the SHA1's in my commit log - numbers always appear in the first 3 characters. But is this too short? How many characters of SHA1 do I need to consider before I can assume a number would have appeared?    This does not have to be 100% accurate - I just need to match an abbreviated SHA1 99% of the time. The comments in  say that I shouldn't wait until low battery charge level before I charge, because that reduces battery life (this is contrary to my understanding before that the faster we charge (without waiting for battery to discharge) the worse it will be for battery life). My question is, when I should generally start charging to avoid this effect? 20%?   Interesting question: If we always limit the usage of the battery only 20% and above, won't we, in effect, reduces our battery capacity to 80%, because we will only use the battery in 20%-100% state? Using Regular Expressions to Extract a Value in Java I have several strings in the rough form:  [some text] [some number] [some more text]   I want to extract the text in [some number] using the Java Regex classes.  I know roughly what regular expression I want to use (though all suggestions are welcome). What I'm really interested in are the Java calls to take the regex string and use it on the source data to produce the value of [some number].  EDIT: I should add that I'm only interested in a single [some number] (basically, the first instance). The source strings are short and I'm not going to be looking for multiple occurrences of [some number]. How can I get this 'Version: 0.1.0 - 94" value from the  tag in selenium webdriver? How can I get this Version: 0.1.0 - 94 value from the &lt;div&gt; tag in selenium webdriver? and here is my code:  &lt;div _ngcontent-qbk-c3="" style="text-align: center;"&gt;Version: 0.1.0 - 94&lt;/div&gt; Unable to login to account in ubuntu 18.04 vmware workstation 15, after update I installed the latest updates from the software update center today (I update when ubuntu displays a notification), restarted the machine and now it's unable to boot properly. The best screen I can get is displayed below. If I resize the screen then it goes to black. If I restart the machine then it displays just purple.    Note that the screen is unresponsive, I can't click anything on it.  Other than SMBus Host Controller not enabled! I don't see any other warnings. Note that I don't know if this warning existed before the update.  I'm running ubuntu 18.04 in vwmare workstation 15 player (latest update). Any ideas on how to begin debugging this?    Update: Trying to boot Ubuntu, with Linux 4.15.0-50-generic instead of Ubuntu, with Linux 4.15.0-51-generic didn't help.  Update: Blacklisting i2c-piix4 according to  answer didn't remove the warning or fix the issue.  Update: Blacklisting i2c-piix4 according to  answer removed the warning but didn't fix the issue.  Update: The answer from Uzair helped me log into the account (run dpkg and update grub from recovery mode).  Answer:  answer helped me fully to resolve the issue. I don't understand the fix. If anyone does, put it as the answer and I'll mark it as such.  Regarding duplicity: The answer from another question did solve my issue but I don't think my question is a duplicate of that one. I began with a fresh install of 18.04 a few months ago, did several updates without an issue and only today experienced issues which are different than those described in the other question. I think we experienced different bugs with wayland and we both solved it by disabling it which is a destructive solution applicable to many questions. Problem in installing Python 3.3 in Ubuntu 12.04 "No root filesystem is defined" while installing Ubuntu I have just got a new laptop, It is running Windows 7 Home Premium.  I have shrunk the windows partition to give me some empty space and now I want to install ubuntu.  From Windows my partitions look like:   So now in the ubuntu live cd If I hit install and go manual the partitioner looks like   So I thought I could just select the empty space and be away laughing, but when I hit it I get Why does an environment's label have to appear after the caption? test fails because of TestMethod do not support getContent call My below test fails because of Run Failures: TestRangehoodObjectionSheet.RangehoodObjectionSheetTest Methods defined as TestMethod do not support getContent call. I added the Blob thinking it might resolve but it doesn't work. What could be the problem here? Have I used the Blob correctly?  @isTest public with sharing class TestRangehoodObjectionSheet {      static testMethod void RangehoodObjectionSheetTest() {             String Build                = NBATRecords.getIdFromDeveloperName('Plan_Reviews__c','Building_Plan_Review');             Account a = new Account(Name = 'Test1' ,Type = 'Lead Acct',BillingState = 'CA',Industry = 'Business Services');             insert a;              Establishment_Record__c er = new Establishment_Record__c(Account__c=a.Id ,Project_Name__c = 'TestPreet',PremiseStreet__c='Manhattan ave',PremiseBorough__c='Manhattan',PremiseState__c='NY',PremisePostalCode__c='11102',Referral_Source__c='311',Data_Source__c='CAMIS',Phase__c='Initiate',Business_Status__c='Open' );             insert er;              Application__c ap = new Application__c(Establishment_Record__c=er.Id,Job_Number__c='222222222');             insert ap;              Plan_Reviews__c pr = new Plan_Reviews__c(Application__c =ap.Id ,DOB_Job_Number__c='222222222',RecordTypeId =Build,Objections__c='Pipe size not indicated');             insert pr;             PageReference pageRef = Page.RangehoodObjectionSheet;              Test.setCurrentPage(pageRef);               Blob content = Test.isRunningTest() ? Blob.valueOf('UNIT.TEST') : pageRef.getContent();              Plan_Reviews__c              p   = new Plan_Reviews__c(id=pr.Id);                ApexPages.StandardController sc  = new ApexPages.standardController(p);             System.assertNotEquals(sc,null);             RangehoodObjectionExtention    ext = new RangehoodObjectionExtention(sc);              ext.Savecopy();       } }   Actual class for the test:  public with sharing class RangehoodObjectionExtention { private final ApexPages.StandardController controller; private final Id                           planreviewID; public String imageURL{get;set;} public List&lt;String&gt; objlist {get;set;}  public string currentdate {get; set;}    public RangehoodObjectionExtention (ApexPages.StandardController stdController) {         controller   = stdController;         planreviewID = (Id)controller.getRecord().get('Id');         Date dt = Date.today();         currentdate = dt.format();         list&lt;Plan_Reviews__c&gt; prlist = [select FDNY_Objections__c from Plan_Reviews__c where id = :planreviewID limit 1];         string obj;         for(Plan_Reviews__c pr: prlist){            obj = pr.FDNY_Objections__c;             }         if(obj!=null){            list&lt;string&gt; objections = obj.split(';');             integer i =1;            objlist = new list&lt;string&gt;();            for(string o : objections){               objlist.add(i++ +'. '+o);            }         }         imageURL='/servlet/servlet.FileDownload?file=';         List&lt; document &gt; documentList=[select name from document where Name='RangehoodObjectionLogo'];         if(documentList.size()&gt;0)         {            imageURL=imageURL+documentList[0].id;         }       }          public PageReference Savecopy(){       PageReference p = Page.RangehoodObjectionSheet;       blob b = ApexPages.currentPage().getContentAsPDF ();       Attachment a = new Attachment();       a.body = b;       a.name = 'Rangehood Objection sheet Issued '+currentdate+'.pdf';       a.parentid = planreviewID;        insert a;        PageReference pref = new PageReference('/'+planreviewID);       return pref;    } } Clicking links in pdfs opened with Okular opens Abiword (instead of the default browser) I work with Xubuntu 12.04 and use Okular (version 0.14.3) to view pdf files. If I click a web link in a pdf file (created with "pdflatex" using the "hyperref" package), "Abiword" (It's a word-processing software, like Libreoffice writer) is opened instead of my default browser google-chrome. How can I change this behavior? The settings in Okular do not seem to provide a solution.   (Note that I set google-chrome as the preferred application for web browsing under Settings -> Preferred Applications, so that's not the problem). How do you deserialize json properties that are reserved words in apex? The scenario:  In a bash script, I have to check if a password given by a user is a valid user password.   I.e suppose I have a user A with password PA.. In the script I asked user A to enter his password, So how to check if the string entered is really his password?... Text spirals with TikZ I just ran across this, and I'm curious about whether it can be replicated in TeX...    Ideally one would have the spiral getting tighter and tighter as one got to the centre, as in    I know TikZ has the ability to fit text along a path, but I'm not sure how one might make text get smaller and smaller.  The closest I can find is , but that uses manually inserted font commands.  Edit: I got what I wanted using mwibrow's answer: Tufte advocates to "minimize the ink-to-data ratio" for charts. I am trying to style a multi data series bar chart, that can have a grid and axes as shown below (chart at the left is from the Economist and on the right my attempt).      Here is the code:  \documentclass[justified]{tufte-book} \usepackage{pgfplots,lipsum} \pgfplotsset{compat=newest} \begin{document} \section{Bar Charts}  \lipsum[1-2]\vfill   \begin{figure*}[htbp]   \fbox{  \begin{tikzpicture}   \centering   \begin{axis}[         ybar,           title={Cumulative Progress of Works},         height=8cm,         width=15.5cm,         bar width=0.4cm,         ymajorgrids, tick align=inside,         enlarge  y limits={value=.2,auto}, % see the upper          ymin=0,         ymax=100,         axis x line=bottom,          axis y line=right,         %enlarge x limits =e,         legend style={at={(0.5,-0.2)},         anchor=north,legend columns=-1},         ylabel={Percentage (\%)},         symbolic x coords={            Sep-11,Oct-11,Nov-11,Dec-11,            Jan-12,Feb-12,            Mar-12,           Apr-12},        xtick=data,        nodes near coords,        every node near coord/.append style={         anchor=mid west,         rotate=70       }     ]     \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 72.7961)        (Nov-11,94.4597)       (Dec-11,66.6786)        (Jan-12,67.5600)        (Feb-12,88.2339)       (Mar-12,78.6138)        (Apr-12,58.9129) };    \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 89.7961)        (Nov-11,94.4597)       (Dec-11,76.6786)        (Jan-12,77.5600)        (Feb-12,78.2339)       (Mar-12,88.6138)        (Apr-12,78.9129) };    \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 89.7961)        (Nov-11,94.4597)       (Dec-11,76.6786)        (Jan-12,77.5600)        (Feb-12,78.2339)       (Mar-12,88.6138)        (Apr-12,78.9129) };      \legend{First Fix,Second Fix,Third Fix}   \end{axis}   \end{tikzpicture} }  \caption{\protect\raggedright Cumulative progress for all MEP works. Notice the slower rate of production during the last three months.} \end{figure*}  \lipsum[1-3] \end{document}   I have moved the y-axis to the right, but cannot get rid of the axis line. The plot is also not fitting within the plot width, despite using \enlarge.   Edit  And thanks to Jake the ugly duckling has been transformed to the following, with minor variations to the code as suggested by Jake. I have only added a stronger color for one of the bars in order to highlight it: Is There Any Way to get the template Name By full URL for example  If the full url is  www.example.com/hello-world   I need a function that return the template name (page.php)  I know that WordPress matches every url with regular expression to determine the query and decide which template to include.  That's exactly what I need, a built in or (custom made) function that takes the URL and returns back the corresponding template Where does the term $|\psi\rangle\langle\psi|$ come from while calculating the expectation value? Is there an elegant way to have performant, natural sorting in a MySQL database?  For example if I have this data set:   Final Fantasy Final Fantasy 4 Final Fantasy 10 Final Fantasy 12 Final Fantasy 12: Chains of Promathia Final Fantasy Adventure Final Fantasy Origins Final Fantasy Tactics   Any other elegant solution than to split up the games' names into their components    Title: "Final Fantasy" Number: "12" Subtitle: "Chains of Promathia"   to make sure that they come out in the right order? (10 after 4, not before 2).  Doing so is a pain in the a** because every now and then there's another game that breaks that mechanism of parsing the game title (e.g. "Warhammer 40,000", "James Bond 007") What Hogwarts classes are taught to two houses at once? In Chipaca's answer to  there's a screenshot with certain highlights. The highlights are the following:   A row of a GUI list is highlighted by the other parts of the screenshot being darker. A check mark is highlighted by being circled by what looks like a (orange) crayon.   How do I create both of these highlights on a screenshot? Is there an automated process?  The screenshot I'm referring to looks like this: