I have created the Bottom sheet dialogue model and its getting crash only in Oreo devices. Hereby I attached my code along with log error which throwing only in Oreo oriented devices. Kindly suggest some possible solutions solve this problem.   private void socialBottomMenu() {     // TODO Auto-generated method stub      sheet = new BottomSheet.Builder(Mica.this).sheet(             R.menu.create_account_bottom_sheet).show();      menu = sheet.getMenu();       for (int i = 0; i &lt; menu.size(); i++) {         MenuItem item = menu.getItem(i);         SpannableString s = new SpannableString(item.getTitle());         s.setSpan(                 new ForegroundColorSpan(getResources().getColor(                         R.color.poptextcolor)), 0, s.length(), 0);         item.setTitle(s);     }     menu.getItem(0).setOnMenuItemClickListener(             new MenuItem.OnMenuItemClickListener() {                  @Override                 public boolean onMenuItemClick(MenuItem item) {                     // TODO Auto-generated method stub                       return true;                 }             });     menu.getItem(1).setOnMenuItemClickListener(             new MenuItem.OnMenuItemClickListener() {                  @Override                 public boolean onMenuItemClick(MenuItem item) {                     // TODO Auto-generated method stub                      return true;                 }             }); }   //Log error directed me here ActionMenuItem.java      @Override  public MenuItem setNumericShortcut(char numericChar, int numericModifiers) {       return null;  }   //Log error  java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setNumericShortcut(char, int)' on a null object reference     at android.view.MenuInflater$MenuState.setItem(MenuInflater.java:477)     at android.view.MenuInflater$MenuState.addItem(MenuInflater.java:541)     at android.view.MenuInflater.parseMenu(MenuInflater.java:193)     at android.view.MenuInflater.inflate(MenuInflater.java:114)     at com.paytronix.client.android.app.bottomsheet.BottomSheet$Builder.sheet(BottomSheet.java:704)
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?
Hyperref "enquotes" metadata EDIT: As Bill B. and Caramdir point out in their comments after Bill B. produced his results posted below, more information is needed in order to make a better call. To remedy, my output was produced using MiKTeX 2.8 pdflatex with no special command line flags or switches. My pdf viewer is Adobe Acrobat Pro 9.0. The platform is Windows 7. All software including hyperref is fully up to date against the latest rev levels and patches.  As I'm guessing that this is a pretty normal setup, at least in the Windows world, I'd be very interested (and grateful) in learning whether this problem affects other people or whether it's just some kind of rather weird one-off. My gut feel after seeing Bill B's results (and also after having traversed hyperref's code) is that the culprit is Adobe Acrobat or possibly MiKTeX pdflatex.    Can anyone corroborate? I'd be very grateful to know.    Original question:  I have a problem with hyperref; it "enquotes" Author and Keywords (but not Title or Subject) metadata if the data sent to these contain a comma or semi-colon (but not, say, a full stop or a colon).    I've included some figures and code that show this below.         \documentclass{article}  \newcommand*\metadata{% % uncomment all but one line below %  a  b  c%     &lt;-- no problem    a, b, c%     &lt;-- problem %  a; b; c%     &lt;-- problem %  a: b: c%     &lt;-- no problem %  a* b* c%     &lt;-- no problem }  \usepackage[   pdftitle={\metadata},    % never enquoted   pdfauthor={\metadata},   % enquoted if , or ; is present   pdfsubject={\metadata},  % never enquoted   pdfkeywords={\metadata}, % enquoted if , or ; is present ]{hyperref}  \begin{document}   Press ctl-d (in Acrobat Reader) to see pdf file metadata. \end{document}   Not only is this quite ugly but, more importantly, it interferes with metadata extracting programs used by certain document repositories.   I've worked my way through hyperref's code without much success. Would anyone have a solution for this problem?  Or advice about what I might be doing wrong? If you search for something on "all sites" (using the searchbox at the top of , you'll reach the search results, e.g.  .  If you click directly on a tag on that page, e.g.        You get 404 Page Not Found error, e.g.     Steps to reproduce   Go to  and enter e.g. "keyforge" into the "Search all sites" field. Arrive at  Click on the "keyforge" tag below a search entry. Reach  (404 page not found)   Expected behaviour  Reach   System Info  Happens in both Firefox and Vivaldi browsers on Windows 10. Calculate sum of series $\sum \frac{n^2}{n!}$ I have to calculate sum of series $\sum \frac{n^2}{n!}$. I know that $\sum \frac{1}{n!}=e$ but I dont know how can I use that fact here.. How can I get file extensions with JavaScript? See code:   var file1 = "50.xsl"; var file2 = "30.doc"; getFileExtension(file1); //returns xsl getFileExtension(file2); //returns doc  function getFileExtension(filename) {     /*TODO*/ } What is the name of this Ubuntu program? A couple month ago I installed a bunch of clipboard manager programs in Ubuntu, tried them out and then removed them. I must have missed one of these and now it keeps bug me in my daily usage. I need some help to identify the name of this program because the program itself provides very limited information.  This clipboard program has below characteristics: 1. It occupies hotkey Ctrl+;. When I press this hotkey, the clipboard history will pop out. It happens in bash, Chrome, Eclipse IDE, and etc, wherever it is text inputable. This is kind of annoying because it overrides my other hotkeys inside these applications. 2. Very laconic UI. Like below picture, with only a line "Select to paste", then listing out the clipboard history. There is no program information whatsoever. Right clicking on it and no menu are shown at all.      So far I have tried below ways to identify this program: 1. Browse system monitor for processes with names that could be correlated. 2. Browse through my installation log (dpkg.log) to find my installation history. Without luck, the log is lost. But I was not successful. How to reliably keep an SSH tunnel open? I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken.  If I could at least monitor the tunnel automatically, I could restart the tunnel when it hangs, but I haven't even figured a way of doing that.  Bonus points for the one who can tell me how to prevent my ssh connection from hanging, of course! What early-2000s show about dimension hopping has a character who can swap limbs? An earlier question asked about a show that made me think of another one I can't remember.  It was a live action show about exploring different dimensions, and I think the main character was searching for his dad.  I remember seeing it in the US, but I don't know if it was limited to that.  I'm a little fuzzy on the details, but I think the main character could swap his limbs or something like that. How does the "this" keyword work? A variation on the induced topology (subspace topology) Why do some actors in credits appear as - Character (As Actor) Pokemon GO isn't working at all for me right now. I'm in one of the following circumstances and can't do anything:   My game is displaying a "Try Again" message I'm stuck on the Loading Screen When I sign in I get a message that the servers are experiencing problems. I see the map but nothing is loaded, and my team color is wrong The "loading" Pokeball just ends up spinning and I can't catch or interact with things When I try to catch a Pokemon, the Pokeball just sits on my screen doing nothing Gym opponents will drop to 1 HP and won't take any more damage or attack When I open a pokestop, the pokestop image and the name of the pokestop does not load.   What's causing this? Is there a way to fix it? Let $f$ be a continuous and open map from $\mathbb R $ to $\mathbb R$.Prove that $f$ is monotonic. Let $f$ be  a continuous and open map from $\mathbb R $ to $\mathbb R$.Prove that $f$ is monotonic.  Suppose that $f$ is not monotonic.Then $\exists a,b;a&gt;b$ such that $f(a)&lt;f(b)$ and $c,d;c&lt;d$ such that $f(c)&gt;f(d)$.Since $f$ is continuous then there exists no break in the graph of $f$. But how should I use the fact that $f$ is open.Any help on how should I do the proof? Prove Lipschitz function $f$ with constant $K$ is integrable on $[0, 1].$ We suppose that $f : [0, 1] \rightarrow \mathbb{R}$ is a Lipschitz function with constant $K$. We want to show that $f$ is integrable on $[0, 1].$  I've been trying to use the Darboux criterion of integrability by trying to show that, for $\epsilon &gt; 0$, $$S^*(f,P) - S_*(f, P) &lt; \epsilon,$$ where $S^*(f, P)$ and $S_*(f, P)$ are the Upper and Lower Riemann Sums, respectively.  This is what I have so far: $$\sum_{i=1}^n M_i (x_i - x_{i-1})- \sum_{i=1}^n m_i (x_i - x_{i-1}) = \sum_{i=1}^n (M_i - m_i) (x_i - x_{i-1})$$ $$\le \sum_{i=1}^n K (x_i - x_{i-1}).$$ because $|f(x) - f(u)| \le K|x-u| \le K |1|$, since $x\in [0, 1]$. Then, $$\sum_{i=1}^n K (x_i - x_{i-1}) = K.$$ However, this is only a single upper bound, not an arbitrary $\epsilon.$ Can I get some pointers about how to proceed? Thanks! I'm trying to make a logo that will be on the header of a website. What I'd like to achieve, and the reason I'm using Blender, is the projected shadows on the background looking perfectly real (as opposed to doing a drop-shadow in Photoshop).  The only thing is, the background has to be transparent because the website might use different background colors / gradients that make it impossible to match with the exported 3D background.  I made this dummy file (not the real logo... duh!):    If I use the file as is, the grey borders of the image will be impossible to match with the website's background color.  Here what I want:    So obviously, I tried masking the plane, which made the shadows disappear. I tried having a plane set to glass, which didn't work either.  And I looked around for a similar question, but didn't find one.   I am not trying to render , or a . I've seen  which has a very difficult solution to this problem, and  that is very similar but in Blender Internal.  is similar too but has never been solved. I'm only a beginner at Compositor, and I'm trying to learn more any chance I get, so any solution in Compositor is welcome if detailed enough. Although if there's a simpler or faster way, it's welcome too!  .blend file: How can i get my community Base URL in apex I am using  Salesforce Community and I have network Id of the community but I don't know how can I get Base URL of my community. Any one know how can I get my community base URL using its id in apex as a internal user.  Is there any other way in which salesforce internal user can get the base URL of all his community in the apex also i don't find any object in which Community Base URL is stored. I checked network sObject but it only store community path prefix not the complete URL so how can i get the base URL for my community? What is a good word to describe 'exceptional positive' research work? Graph with Cycle and Two-Colorable i think if the graph G has an odd cycle, it's not two-colorable, otherwise it can be two colorable.   i read in one notes that the following is True: we couldent two-colorable any graph G that has cycle.    anyone could clarify me ? I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur.  Collection was modified; enumeration operation may not execute  Below is the code. This is a WCF server in a Windows service. The method NotifySubscribers() is called by the service whenever there is a data event (at random intervals, but not very often - about 800 times per day). When a Windows Forms client subscribes, the subscriber ID is added to the subscribers dictionary, and when the client unsubscribes, it is deleted from the dictionary. The error happens when (or after) a client unsubscribes. It appears that the next time the NotifySubscribers() method is called, the foreach() loop fails with the error in the subject line. The method writes the error into the application log as shown in the code below. When a debugger is attached and a client unsubscribes, the code executes fine. Do you see a problem with this code? Do I need to make the dictionary thread-safe? [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class SubscriptionServer : ISubscriptionServer {     private static IDictionary&lt;Guid, Subscriber&gt; subscribers;      public SubscriptionServer()     {                     subscribers = new Dictionary&lt;Guid, Subscriber&gt;();     }      public void NotifySubscribers(DataRecord sr)     {         foreach(Subscriber s in subscribers.Values)         {             try             {                 s.Callback.SignalData(sr);             }             catch (Exception e)             {                 DCS.WriteToApplicationLog(e.Message,                    System.Diagnostics.EventLogEntryType.Error);                  UnsubscribeEvent(s.ClientId);             }         }     }          public Guid SubscribeEvent(string clientDescription)     {         Subscriber subscriber = new Subscriber();         subscriber.Callback = OperationContext.Current.                 GetCallbackChannel&lt;IDCSCallback&gt;();          subscribers.Add(subscriber.ClientId, subscriber);                  return subscriber.ClientId;     }      public void UnsubscribeEvent(Guid clientId)     {         try         {             subscribers.Remove(clientId);         }         catch(Exception e)         {             System.Diagnostics.Debug.WriteLine(&quot;Unsubscribe Error &quot; +                      e.Message);         }     } } In the Landau theory of phase transitions, is the order parameter a thermodynamic variable of state? In the Landau theory of phase transitions, one typically considers a "free energy" $F$ as a function of the temperature $T$ and the "order parameter" $\psi$: $F(T, \psi)$.  For the sake of clarity, let's consider the liquid-gas transition, in which the order parameter is usually taken to be the difference of densities between the ordered phase and the disordered phase.  In this case, it looks that the order parameter $\psi$ is closely related to the the volume $V$, a global variable of state.  What is the correct interpretation of $\psi$ as a thermodynamic variable?   I consider several logical possibilities, but all interpretations look troublesome to me:    $\psi$ is a variable of state replacing the volume. In this case I have a few related concerns:   Is the "free energy" $F$ the Helmholtz or the Gibbs free energy?    If $F$ is the Gibbs free energy, $F$ should depend on the temperature $T$ and the pressure $p$ (the conjugate variable of the volume), so it shouldn't depend on $\psi$.  If it is the Helmholtz free energy, it's ok that it depends on $\psi$, but the experiments are usually carried out at constant pressure, not constant volume.  Usually, state variables are something one can select at will [for instance, think of the phase diagram $(p, T)$]. However, the order parameter $\psi$ is not selected at will, but it is selected by the system as a result of the minimization process according to the Landau theory.  $\psi$ is yet another variable of state in addition to volume and temperature.    Why the pressure is not usually taken into account as a variable of state, and only the temperature is considered? What is the conjugate variable to $\psi$? Can really $\psi$ and $V$ be taken as independent?  $\psi$ is not a variable of state, is something else.   What else can $\psi$ be from the thermodynamic point of view? Same question as above, why is pressure not usually taken into account in Landau theory? $f_x$ is Borel measurable and $f^y$ is continuous then $f$ is Borel measurable