Error for checkbox android.widget.CheckBox.setVisibility(int)' on a null object reference checkBox=(CheckBox) findViewById(checkbox);    checkBox.setVisibility(View.GONE);      db = new Db(Listdata.this,"register2",null,2);     list2 = db.listdata();     Log.d("list", String.valueOf(list2));     listAdapter adapter = new listAdapter(Listdata.this,list2);     listView.setAdapter(adapter);     a= list2.size();     Log.d("teb", String.valueOf(a));      listView.setLongClickable(true);     listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {         public boolean onItemLongClick(AdapterView&lt;?&gt; arg0, View arg1, int pos, long id) {             for(int i = 0; i!=a; i++) {                 checkBox = (CheckBox) listView.getChildAt(i).findViewById(R.id.checkbox);                 checkBox.setVisibility(View.VISIBLE);             }             return true;         }     });   FATAL EXCEPTION: main                                                                                 Process: com.example.developer.register, PID: 21571  java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference                                                                                 at com.example.developer.register.Listdata$1.onItemLongClick(Listdata.java:52)                                                                                 at android.widget.AbsListView.performLongPress(AbsListView.java:3112)                                                                                 at android.widget.AbsListView$CheckForLongPress.run(AbsListView.java:3061)                                                                                 at android.os.Handler.handleCallback(Handler.java:739)                                                                                 at android.os.Handler.dispatchMessage(Handler.java:95)                                                                                 at android.os.Looper.loop(Looper.java:135)                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5221)                                                                                 at java.lang.reflect.Method.invoke(Native Method)                                                                                 at java.lang.reflect.Method.invoke(Method.java:372)                                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
What is a NullPointerException, and how do I fix it? 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?
How can I disable the drag handle on the desktop? Vertical line only in one part of a table I need some help on  putting a vertical line in the second part of the table, I don't know how to do it since the tabularx I declared does need to have that only in the second part. The code I used is:  \begin{tabularx}{\linewidth}{|XX|} \hline \multicolumn{2}{|c|}{\textbf{title name}}\\ \hline something: &amp; else \\ something: &amp; else \\ something: &amp; else \\ \hline \multicolumn{2}{|c|}{bla bla blah}\\ \hline title text: &amp; description 1 \\ title text: &amp; description 1 \\ \hline \end{tabularx}   And the render of the table looks like this:    I just need a \vline between title text and description (it I use \vline it works only for the first line but the description text and sometimes the title, are few lines long). I have a requirement to create triggers dynamically after a managed package is installed. I have read that the tooling API can be used to create triggers dynamically however it cannot be used in production. Is it possible to create triggers from a managed package in an org? I want to be able to create the trigger based on some user inputs. How to connect two Dell P2415Q 4k displays to MacBook Pro 2016 What's the best way of connecting two Dell P2415Q 4k displays to the MacBook Pro 2016 with TouchBar and TouchID?  I have the monitors connected to an older MacBook Pro currently with two mini-DisplayPort cables. Can I somehow reuse those cables or do I need new ones?  Apple's support page  lets me know that:  "Note that although it uses a Mini DisplayPort connector, the Thunderbolt 3 (USB-C) to Thunderbolt 2 Adapter doesn't support connections to Mini DisplayPort displays."  So I guess reusing the cables is not the way to go? Can a hyphen be used without anything on the right side? Copy & Pasting from Photoshop to Illustrator loses transparency I often run into this issue. I'm creating a file in Photoshop with masked layers etc. I want to make the final output available for some mock-ups in Illustrator, so I rasterize the layers and marquee select the entire area, copy and move to Illustrator.  Pasting the area in Illustrator flattens all transparencies, which is quite annoying. I'm left with my object and a flat white background.  Is there a reason for this? CSS - Make divs align horizontally I have a container div with a fixed width and height, with overflow: hidden.  I want a horizontal row of float: left divs within this container. Divs which are floated left will naturally push onto the 'line' below after they read the right bound of their parent. This will happen even if the height of the parent should not allow this. This is how this looks:  ![Wrong][1] - removed image shack image that had been replaced by an advert  How I would like it to look:  ![Right][2] - removed image shack image that had been replaced by an advert  Note: the effect I want can be achieved by using inline elements &amp; white-space: no-wrap (that is how I did it in the image shown). This, however, is no good to me (for reasons too lengthy to explain here), as the child divs need to be floated block level elements. Show that $x^4-10x^2+1$ is irreducible over $\mathbb{Q}$ Why don't Starfleet vessels have intelligent on-board computers? Attributing contributions to academic work that occur in Stack Exchange Sometimes we may ask questions on stack exchange or online forums wherein the response is helpful or even essential to a piece of work that gets published in an academic journal. If this occurs, how should credit be given to those involved in the exchange? Should they all be included as authors? Should a link to the forum be included as a reference in the paper?  Once something is in a stack exchange or forum, it's "published". Perhaps in the future, the current peer review model will transform into people writing blogs and posting in forums and databases. But for now, how might this issue be dealt with while forums, blogs, etc coexist with journals? So I'm pretty sure there's at least 2, one for both X &amp; Y.   Much like other iterations of the other Pokemon games, are there other Legendaries? How many legendaries, and what are their names? I have 2 storage devices; classical slow HDD (750GB, /dev/sda) and faster SSD (128GB, /dev/sdb). Currently I have installed Ubuntu &amp; Mint on same btrfs partition on SSD (/dev/sdb5). My btrfs pool consists of /dev/sdb5.  What I want to achieve is data replication on HDD while keeping SSD performance: Something like this:  For read case it would be ideal for procedure to go like this:   read from SSD check checksum if it verifies.. awesome, give me the data if not, fetch data from HDD and perform error correction through duplicate data   I'd manually run (some tool I'm not sure which one... btrfs check --repair perhaps?) every month or so to check HDD checksums and correct them via SSD data against bitrot.  For write case:   write to SSD sync to HDD when write requirements are low, thus not slowing down the system.   Is this possible and how would I do it?  Bottom line is, I like btrfs and would like it to duplicate data across HDD &amp; SSD drive automatically while keeping SSD excellent performance.   Using SSD as write cache is not an option since it's missing data duplication and security. tar files only, no directories Reading data from a relational database into a LaTeX table I'm using Tex Live 2009 on Debian squeeze. I can upgrade if I really, really  have to, but I'd rather not. I was wondering if it would be possible to do the following.  Given some data in a (relational) database, can I extract it and automatically format it in a LaTeX table, so one would not need to manually recreate the LaTeX table if the data changes? Could one do such a thing with Lua? One would normally use a suitable language database adaptor for this, and I see Lua has . I'd like to use PostgreSQL. I'm currently using version 8.4.  Solutions not involving Lua are also fine. Just to be clear, I don't know anything about Lua and my knowledge of LaTeX programming is also extremely skimpy. I'm looking for a recipe which I can adapt if necessary. While this is not really important for my current use case, it seems like a useful general technique if possible. How to compare two TeX codes and mark differences with color I would like to find easy tool, which compares two TeX codes and generates a PDF file of the first code, in which the differences from the second code are marked by a given color. I use winedt 7.0 under windows 7.  I just noticed that latexdiff provides what I need. As far as I understand it is included in Miktex. Is there an interface (menu commands) in winedt 7.0, which allow to work with latexdiff ? Boolean b1 = true; Boolean b2 = true; String b3 = 'b1 &amp;&amp; b2'; Boolean b4 = Boolean.valueOf(b3); system.debug('test Bool '+ b4);   Given a string how can you convert into expression without breaking the sting. Is it possible to tell a Valyrian steel sword from a very well crafted steel sword, by sight alone I'm sure in Westeros there are some incredibly well crafted steel swords, but could someone instantly spot a Valyrian steel sword over one of these?  Does Valyrian steel have any visual indications that it is Valyrian steel and not just a very well crafted steel sword?  I'm wondering, in canon, has anyone seen a sword and instantly recognised it as Valyrian steel.  For the purpose of this question, no one is allowed pick up or use the sword, so they cant feel it's weight, balance, sharpness, etc... Import/export 3ds format in Blender 2.8 I need to import and specially export in 3DS format. I know that I can import a file in 2.79 and the copy-paste to 2.8, but then when I copy-paste it back to 2.79 I'm having problems with textures missing. Is there any way to import/export 3ds in 2.8 without using any other version or software like we did in 2.79? The extension is missing in the add-ons repository either. I've noticed confusing definitions about permutation and substitution, preventing me from understanding the difference.  A permutation changes the order of distinct elements of a set, but this can be written as a function changing one element by another, exactly as a substitution.  So, how exactly can we distinguish between these two notions?  This question is interesting since we have these two notions in block ciphers, in which S-boxes perform substitution. The problem is that this table is used to replace one element by another, exactly like a permutation. "All I need (is/are) cigarettes and alcohol": which one is correct? In one of Oasis's songs — Cigarettes and Alcohol — there are two sentences that make me confused:     All I found was cigarettes and alcohol   ...and...     All I need is cigarettes and alcohol   Why would is and was be correct in these sentences instead of are and were, since they're referring to more than one thing?