Cannot run `apt update` "At least one invalid signature was encountered"
Update from 14.04 to 16.04 failed with GPG error
In Drupal 8 you can load an entity with:  $node = \Drupal::entityManager()-&gt;getStorage('node')-&gt;load(123);   This looks for the entity definitions and finds that node is defined by Drupal\node\Entity\Node - so (I guess) Drupal\node\NodeStorage will instantiate a new Drupal\node\Entity\Node instance.  What I'd like to achieve is subclassing Drupal\node\Entity\Node and being able to instantiate this subclass when it's appropriate. For example if I have a node bundle article, there would be a class:  namespace Drupal\my_module\Entity\Article; class Article extends Drupal\node\Entity\Node { }   And I'd call:  $node = \Drupal::entityManager()-&gt;getStorage('node_article')-&gt;load(123);   And the return would be my Article subclass.  I can achieve this by creating a new entity type and wiring it back to another existing entity definitions, for example the node-article example would be this class:  namespace Drupal\my_module\Entity; use Drupal\node\Entity\Node; /**  * @ContentEntityType(  *   id = "node_article",  *   label = @Translation("Content"),  *   bundle_label = @Translation("Content type"),  *   handlers = {  *     "storage" = "Drupal\node\NodeStorage",  *     "storage_schema" = "Drupal\node\NodeStorageSchema",  *     "view_builder" = "Drupal\node\NodeViewBuilder",  *     "access" = "Drupal\node\NodeAccessControlHandler",  *     "views_data" = "Drupal\node\NodeViewsData",  *     "form" = {  *       "default" = "Drupal\node\NodeForm",  *       "delete" = "Drupal\node\Form\NodeDeleteForm",  *       "edit" = "Drupal\node\NodeForm"  *     },  *     "route_provider" = {  *       "html" = "Drupal\node\Entity\NodeRouteProvider",  *     },  *     "list_builder" = "Drupal\node\NodeListBuilder",  *     "translation" = "Drupal\node\NodeTranslationHandler"  *   },  *   base_table = "node",  *   data_table = "node_field_data",  *   revision_table = "node_revision",  *   revision_data_table = "node_field_revision",  *   translatable = TRUE,  *   list_cache_contexts = { "user.node_grants:view" },  *   entity_keys = {  *     "id" = "nid",  *     "revision" = "vid",  *     "bundle" = "type",  *     "label" = "title",  *     "langcode" = "langcode",  *     "uuid" = "uuid",  *     "status" = "status",  *     "uid" = "uid",  *   },  *   bundle_entity_type = "node_type",  *   field_ui_base_route = "entity.node_type.edit_form",  *   common_reference_target = TRUE,  *   permission_granularity = "bundle",  *   links = {  *     "canonical" = "/node/{node}",  *     "delete-form" = "/node/{node}/delete",  *     "edit-form" = "/node/{node}/edit",  *     "version-history" = "/node/{node}/revisions",  *     "revision" = "/node/{node}/revisions/{node_revision}/view",  *   }  * )  */ class Article extends Node { }  // Results my Article sub type. $node = \Drupal::entityManager()-&gt;getStorage('node_article')-&gt;load(123);   This works fine (as much as I can see); however, it smells. It adds a new entity type, which is not true, and might cause other troubles in the future.  How do I define a subclass for an entity bundle so that loading the entity would return an object of that class? File and directory comparison tool? I'm looking for something that will compare directories and files like Beyond Compare does for windows.  Its mainly for use of source control, but I need to use it for deployment as well. Proving that a Hölder space is a Banach space I am trying to show that the Hölder space $C^{k,\gamma}(\bar{U})$ is a Banach space. To do this, I successfully proved that the mapping $\| \quad \| : C^{k,\gamma}(\bar{U}) \to [0,\infty)$ is a norm, by proving its properties.   But how do I show that the sequence $\{u_k\}_{k=1}^\infty \subset C^{k,\gamma}(\bar{U})$ converges to $u \in C^{k,\gamma}(\bar{U})$, that is, how do I show that $$\lim_{k \to \infty}\|u_k-u\|=0,$$ which would mean the normed linear space is complete, and hence a Banach space?  Here are the following taken from PDE Evans, 2nd edition, page 255:     Definition. The Hölder space $$C^{k,\gamma}(\bar{U})$$ consists of all functions $u \in C^k(\bar{U})$ for which the norm $$\|u\|_{C^{k,y}(\bar{U})}:= \sum_{|\alpha|\le k} \|D^\alpha u \|_{C(\bar{U})}+\sum_{|\alpha|=k} [D^\alpha u]_{C^{0,\gamma}(\bar{U})}$$ is finite.   Also from page 254,     Definitions. (i) If $u : U \to \mathbb{R}$ is bounded and continuous, we write $$\|u\|_{C(\bar{U})}:=\sup_{x\in U}|u(x)|.$$      (ii) The $\gamma$th-Hölder seminorm of $u : U \to \mathbb{R}$ is $$[u]_{C^{0,\gamma}(\bar{U})}:=\sup_{\substack{x,y\in U \\ x \neq y}} \left\{\frac{|u(x)-u(y)|}{|x-y|^\gamma} \right\},$$ and the $\gamma$th-Hölder norm is $$\|u\|_{C^{0,\gamma}(\bar{U})}:=\|u\|_{C(\bar{U})}+[u]_{C^{0,\gamma}(\bar{U})}.$$   This is all I got so far: \begin{align} \|u_k-u\|_{C^{k,\gamma}(\bar{U})}&amp;=\sum_{|\alpha|\le k} \|D^\alpha u \|_{C(\bar{U})}+\sum_{|\alpha|=k} [D^\alpha u]_{C^{0,\gamma}(\bar{U})} \\ &amp;= \sum_{|\alpha|\le k} \sup_{x\in U} |u_k(x)-u(x)|+ \sum_{|\alpha|=k} \sup_{\substack{x,y\in U \\ x \neq y}} \left\{\frac{|[u_k(x)-u(x)]-[u_k(y)-u(y)]|}{|x-y|^\gamma} \right\}. \end{align} Now, where can I go from here, to show that $\lim_{k \to \infty}\|u_k-u\|_{C^{k,\gamma}(\bar{U})}=0$? The sequence is Cauchy, and I have to use that fact somehow. Same mesh with different colors Launch app only if not already open Can you cast a 9th level spell if your multiclass spell slots have 9th level spell slots? How to prove the Fibonacci sum $\sum \limits_{n=0}^{\infty}\frac{F_n}{p^n} = \frac{p}{p^2-p-1}$ Preface:  An axis plotted with  is usually using the current math font for its ticklabels. But if they are overwritten by e.g. xticklabels={-8,-6,...,8} then the current text font is used. Also an axis label ylabel={Y} would be in text font unless put explicitly in math mode ylabel={$Y$}. However it would be nice, if  one hadn't to do so.   Question:  I'm aiming to ensure that pgfplots always uses the current math font. But please assume that the classic font commands like \rmfamily are screwed up by the corporate design I'm supposed to use, e.g. assume: \renewcommand{\rmdefault}{\sfdefault}  It works if I explicitly define a font  \newcommand{\pgfmathfont}{\fontfamily{pxfonts}\selectfont}   and pass it to pgfplots together with assume math mode=true:  \begin{axis}[ font = \pgfmathfont,  tick label style={/pgf/number format/assume math mode=true} ]   But it requires that I insert the name of the current math font. How can I do that automatically? How to get the currently used math font to insert it into the macro?    MWE  \documentclass{beamer}  \usetheme{Warsaw} \usefonttheme{professionalfonts} \usepackage{pxfonts} \usepackage{pgfplots}  % screwed up by Corporate Design \renewcommand{\rmdefault}{\sfdefault}  % I'd like this line to be generic! \newcommand{\pgfmathfont}{\fontfamily{pxfonts}\selectfont} %           put current math font here   X  \begin{document}  \begin{frame}  This is a basic equation:    \[ x + y = 42\]  \begin{tikzpicture}     \begin{axis}[ %   font = \rmfamily, % makes no sense here     font = \pgfmathfont,      xlabel={$x$-label: I want to be in math font!},     ylabel={Y},     xtick={-4,-3,...,4},     xticklabels={-8,-6,...,8}, %   xticklabels={$-8$,$-6$,...,$8$}, % does not work     tick label style={/pgf/number format/assume math mode=true}     ]      \addplot {x^2};      \end{axis} \end{tikzpicture}  \end{frame}  \end{document}     Everything related to  is no option at all!  Thank you! I use the grep command to search for a string in many files. Is there something similar to "search and replace"? Software to read a QR code? I saw a  reading a book, but I don't have a smart phone to check it.    So I just took a picture of it and saved my PC. And I downloaded libdecoderqr0, libdecodeqr-dev, libdecodeqr-examples for reading it. But I don't know how to use it.    What do I do next, or is there a nicer way to read QR codes? Proof of the L'Hôpital Rule for $\frac{\infty}{\infty}$ I ask for the proof of the L'Hôpital rule for the indeterminate form $\frac{\infty}{\infty}$ utilizing the rule for the form $\frac{0}{0}$.   Theorem: Let $f,g:(a,b)\to \mathbb{R}$ be two differentiable functions such as that:  $\forall x\in(a,b)\ \ g(x)\neq 0\text{ and }g^{\prime}(x)\neq 0$ and $\lim_{x\to a^+}f(x)=\lim_{x\to a^+}g(x)=+\infty$ If the limit $$\lim_{x\to a^+}\frac{f^{\prime}(x)}{g^{\prime}(x)}$$ exists and is finite, then  $$\lim_{x\to a^+}\frac{f(x)}{g(x)}=\lim_{x\to a^+}\frac{f^{\prime}(x)}{g^{\prime}(x)}$$  My attempt:  Since $\lim_{x\to a^+}f(x)=+\infty$, $$\exists \delta&gt;0:a&lt;x&lt;a+\delta&lt;b\Rightarrow f(x)&gt;0\Rightarrow f(x)\neq 0$$  Let $F,G:(a,a+\delta)\to \mathbb{R}$, $F(x)=\frac{1}{f(x)}$, $G(x)=\frac{1}{g(x)}$. Then by the hypothesis $\lim_{x\to a^+}F(x)=\lim_{x\to a^+}G(x)=0$, $$\forall x\in(a,b)\ \ G(x)\neq 0\text{ and }G^{\prime}(x)=-\frac{1}{g^2(x)}g^{\prime}(x)\neq 0$$ The question is, does the limit $$\lim_{x\to a^+}\frac{F^{\prime}(x)}{G^{\prime}(x)}=\lim_{x\to a^+}\frac{-\frac{1}{f^2(x)}f^{\prime}(x)}{-\frac{1}{g^2(x)}g^{\prime}(X)}=\lim_{x\to a^+}\frac{g^2(x)f^{\prime}(x)}{f^2(x)g^{\prime}(x)}$$ exist?   The limit $$\lim_{x\to a^+}\frac{f^{\prime}(x)}{g^{\prime}(x)}$$ exists by the hypothesis but we don't know if the limit $\displaystyle\lim_{x\to a^+}\frac{g^2(x)}{f^2(x)}$ exists to deduce that the limit $$\lim_{x\to a^+}\frac{F^{\prime}(x)}{G^{\prime}(x)}$$ exists to use the L'Hôpital Rule for the form $\frac{0}{0}$.  EDIT: After discussing it with other users in the site, we came to the conclusion that this proof is only partial and can't logically be continued to yield the Theorem.  As a result, the rule for the $\frac{0}{0}$ form can't be used to proove the rule for the  $\frac{\infty}{\infty}$ form. Mr. Tavares and myself have already given two different proofs (with the pretty much the same main idea) of the Theorem in question using Cauchy's Mean Value Theorem. You can read them below. You can also read the proof Rudin gives for a stronger version of the Theorem (that does not suppose that $\lim_{x\to a^+}f(x)=+\infty$) in his book Principle of Meathematical Analysis. If you have any objections in either proofs please let me know. Thank you. An infinite Penney's game. Context: I need to solve one variation of the . Problem: Two players ($A$ and $B$) throw a coin until one of the victory sequences appears. For player $A$ the victory sequence is $HTT$, for player $B$ the victory sequence is $TTH$. What is the probability that $A$ wins and what is the expected number of throws given that $A$ won? My attempt: Intuitively, it seems that player $B$ is more likely to win. Basically, I reliase that we can use the Markov-Chains, but my idea is only draw a binary tree and consider the sequences on the n-th step. My another idea was to calculate the expected number of throws to get, say, $HH$ that would be equal to $r_{HH}$: $$r_{HH} =  \frac{1}{4}E(number|HH) + \frac{1}{4}E(number|HH)+ \frac{1}{4}E(number|TT)+ \frac{1}{4}E(number|TH) = \frac{1}{4}(9 + \frac{5}{2} r_{HH})$$  And get $r_{HH}$. My issues: I don't really understand how to join these ideas to get a proper solution. Cannot create an array of LinkedLists in Java...? I am a medical doctor in Pakistan. I have been on a career break to allow myself to study full time for the IELTS exam (from which I recently got the required band score) and PLAB 1. I have now registered and paid for the PLAB 1 exam in UK for June 2016, as the next sitting in Pakistan is in November 2016 and I feel like I am ready to do the exam sooner.  Due to having no current employment, my savings are limited (around 25,000 Pakistani Rupees) but I live with my parents and do not have any financial commitments at home.  My savings have depleted in the past ten months whilst I have taken a career break and the money has been used for my own personal expenses. My trip to the UK is being funded by my grandfather who is a British citizen. He is a retired doctor with a good NHS pension. He has provided me with:   6 months bank statements which clearly show his pension deposits   Letter from NHS Pensions stating his pension   Sponsorship letter stating that he will pay for my PLAB exam fee, travel, accommodation and subsistinence costs whilst in the UK   Copy of British passport  Document confirming that he owns the house he lives in mortgage-free Confirmation email from GMC stating he has paid the PLAB exam fee.   Without large personal savings and no current job (but I have job offers now) would my application be rejected or is the strong sponsorship going to be good enough?  Are there any other documents I should consider submitting that may help me get a visa? Why am I getting 50V at a light when the switch is off? How to prove wave nature of large object? Were there any improvements to the second Death Star (other than the change in exhaust port) that we know of? Carrying confidential corporate data into US on laptop/Drive/device - how to prevent data theft? If I travel to the US and had privacy concerns (for instance may be I was afraid that a rogue customs official may steal said data) what is the current recommended best practice to avoid this? A sequence $\{x_j\}$ is said to be fast-Cauchy if $\sum_1^\infty d(x_j,x_{j+1})&lt;+\infty$. Show that every Cauchy sequence has a fast-Cauchy subsequence.   **My attempt:**Argue by contradiction, suppose there is no such subsequence. Then for any subsequence $\{{x_j}_k\}$,  $\sum_1^\infty d({x_j}_k,{x_j}_{k+1})$ diverges. Vaguely recall from an analysis course, if a series diverges, it doesn't not satisfy the Cauchy criterion. That is to say, there exists $\epsilon&gt;0$ such that for all $k$ and all $p\ge1$, $d({x_j}_{k+1},{x_j}_{k+2})+...+d({x_j}_{k+p}+{x_j}_{k+p+1})\ge\epsilon$.  Then I intuitively think that this is a contradiction, since if the original series is Cauchy, then after a large $N$, since $d(x_m,x_n)$ has to be very small, so that their sum should be smaller than given $\epsilon$, which is a contradiction. But I don't know how I can write down the concrete proof? I'm writing a tool to report information about .NET applications deployed across environments and regions within my client's systems.  I'd like to read the values of assembly attributes in these assemblies.  This can be achieved using Assembly.ReflectionOnlyLoad, however even this approach keeps the assembly loaded.  The issue here is that I cannot load two assemblies that have the same name from different paths, so naturally I can't compare the same application deployed in different systems.  At this point I'm assuming the solution will involve using temporary AppDomains.  Can someone detail how to load an assembly into another AppDomain, read the attributes from it and then unload the AppDomain?  This needs to work for assemblies on the file system as well as those at URL addresses.