NullPointerException when trying to populate JComboBox from database
What is a NullPointerException, and how do I fix it?
I want to check if points layer that I have intersect with polygons layer that I have, as Boolean column in the points dataframe. I have two GeoPandas dataframes, the first one is many points and looks like this: &gt;&gt;&gt;ID  geometry 0  12  POINT (5.0279 7.4547) 1  45  POINT (6.6539 12.139) ...  and the second dataframe is one layer of many different polygons  that looks something like this: &gt;&gt;&gt;name     code   geometry 0  Desert   12     POLYGON ((5.52013 13.8902, 5.5265 13.892,...) 1  Water    24     POLYGON ((5.53756 13.88472, 5.5291 13.8791,...) ...  I'm trying to check if there is any intersection between the points layer and the regions layer. For that I have determined the crs and then used intersects : regions=regions.to_crs({'init': 'epsg:4326'}) points=points.set_crs({'init': 'epsg:4326'}) inter=points.geometry.intersects(regions.geometry)  A The script runs with the following warnings:  FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 return _prepare_from_string(&quot; &quot;.join(pjargs)) /opt/conda/lib/python3.8/site-packages/geopandas/base.py:39: UserWarning: The indices of the two GeoSeries are different. warn(&quot;The indices of the two GeoSeries are different.&quot;)  Then when I check the results the only value is False, like all th epoints do not intersect: inter.unique().tolist() &gt;&gt;&gt;[False]  *I saw on QGIS that the there are points that intersect and there are points that do not so there is no way this result is true *I have checked the dtypes - each one of my geodataframes has one column that is geometry and called geometry. My end goal: to add new column in the points geodataframe that will tell if it intersects the regions or not. How to create id with AUTO_INCREMENT on Oracle? NORMAL label in top right of some applications I have an iPhone 6 128 GB which is not jailbroken. The current version of iOS on the phone is 8.1.3 and yesterday I wanted to update to iOS 8.2.  The download went through without any problem but while installing, it gave the error:     Unable to Install Update   An error occurred installing iOS 8.2   Tried installing after switching Off and ON and also tried Hard Reset (Holding Home button and On/off switch).  Same error displays every time.  Also the Touch ID has stopped working and I find that the Settings - Touch ID &amp; Passcode - iPhone Unlock is OFF.  When I try to switch it ON, the system displays the error     Failed   Unable to complete Touch ID setup. Please go back and try again.   Is anyone facing this problem?  I live in India. What is the module/method used to get the current time? Using the same secret key for encryption and authentication in a Encrypt-then-MAC scheme Is it a weakness to use a single shared secret for protecting messages using a Encrypt-then-MAC scheme?    Assuming a system is using AES-256-CBC and a SHA1-HMAC and the same secret key for both operations.  Upon intercepting one of these messages and attacker could brute force this secret key by trying to solve the HMAC or by successfully decrypting the first block of the ciphertext.  Performing  a decryption on a single block of AES-256 should be a lighter operation than performing a SHA1-HMAC on a potentially large message.  Therefore AES-256 is ideal for a massively parallel brute-force attack and the use of the SHA1-HMAC doesn't hurt the system.  Is this approach sound, or is there an attack that has not been taken into consideration? The site description in the hero header is wrong for Meta sites The hero header contains the same description for the Main and Meta sites. Here's the one for MSO:           Meta Stack Overflow is a question and answer site for professional and enthusiast programmers. Join them; it only takes a minute:    This can easily confuse people who are new to the network, so I feel this should be changed to something Meta specific. Perhaps re-use the text from the sidebar, that has a good description:     This site is intended for bugs, features, and discussion of Stack Overflow and the software that powers it. You must have an account on Stack Overflow to participate. What are the different endings in Dishonored? By just typing some commands, how can Ubuntu be uninstalled? I don't want to install Windows or anything, leaving my PC without an OS.  Would this command work?  sudo rm -rf / How to keep Heading together with text? I use a very custom style (not mine) and very frequently I get a heading  on the bottom of a page and the next paragraph on the top of the next page. Sometimes this paragraph may be a list or similar. The same is true for listings and the listing description.   Is there a general way how I can adjust the "badness" of these events? Or can I adjust when a section heading would be on the last, say, 3cm of a page it should go to the next page? Or can I say, if a *listing description" is on the top 3cm of a page pull 5 more listing lines from the last page onto this page?   The style I use does not use standard structure tags and environments. But lets call them section, subsection, listing and I will try to migrate them to my lingo. Sign of determinant when using $det A^\top A$ We have been given matrix: $$A =          \begin{pmatrix}         a&amp; b&amp; c &amp;d \\         b &amp;−a&amp; d&amp; −c\\         c&amp; −d &amp;−a&amp; b \\         d &amp;c&amp; −b&amp; −a\\         \end{pmatrix}     $$ ...and have been asked to calculate $\det(A)$ using $AA^T$.  We see that:  $$AA^T=\begin{pmatrix}         a^2+ b^2+ c^2+ d^2&amp; 0&amp; 0&amp;0\\         0 &amp;a^2+ b^2+ c^2+ d^2&amp; 0&amp; 0\\         0&amp; 0 &amp;a^2+ b^2+ c^2+ d^2&amp; b \\        0 &amp;0&amp; 0&amp; a^2+ b^2+ c^2+ d^2\\         \end{pmatrix}     $$   So, $\det(AA^T)= (a^2+ b^2+ c^2+ d^2)^4$  Now which should I choose: $(a^2+ b^2+ c^2+ d^2)^2 $ or $ -(a^2+ b^2+ c^2+ d^2)^2$ ?  Please explain me which one and why. How to choose a lens for my first DSLR? I am considering buying my first DSLR.  How do I know whether I need a 18-200 lens, 17-85, or 18-55? Or something else? Combining values in one column (or part) when values in another column (or part) match How can I install more recent versions of software than what Debian provides? Suppose I want a more recent version of software than is available for my current version of an operating system, what can I do?  Cases to consider:   There are semiofficial/official sources of additional packages available for that version of the OS. E.g. backports.org for Debian or PPAs for Ubuntu. There are no more recent versions of the package available for that version of the OS, but there are more recent versions available for more recent versions of the OS. This is the standard case for backporting. There are no packaged versions of more recent versions of the software available. Options available are to package the more recent version.     Per  this is intended as a place to put canonical answers for the following. Answers should probably be made community wiki. Can I watch the progress of a `sync` operation? I've copied a large file to a USB disk mounted on a Linux system with async. This returns to a command prompt relatively quickly, but when I type sync, of course, it all has to go to disk, and that takes a long time.  I understand that it's going to be slow, but is there somewhere where I can watch a counter go down to zero? Watching buffers in top doesn't help. Is there an emulator or wine type environment that would allow use of android apps on linux? How do I get a Cron like scheduler in Python? I'm looking for a library in Python which will provide at and cron like functionality.  I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron.  For those unfamiliar with cron: you can schedule tasks based upon an expression like:    0 2 * * 7 /usr/bin/run-backup # run the backups at 0200 on Every Sunday  0 9-17/2 * * 1-5 /usr/bin/purge-temps # run the purge temps command, every 2 hours between 9am and 5pm on Mondays to Fridays.   The cron time expression syntax is less important, but I would like to have something with this sort of flexibility.   If there isn't something that does this for me out-the-box, any suggestions for the building blocks to make something like this would be gratefully received.  Edit I'm not interested in launching processes, just "jobs" also written in Python - python functions. By necessity I think this would be a different thread, but not in a different process.  To this end, I'm looking for the expressivity of the cron time expression, but in Python.   Cron has been around for years, but I'm trying to be as portable as possible. I cannot rely on its presence. Here is a minimal example that showcases my problem:  \documentclass{article}  \usepackage{amsthm} \usepackage{hyperref} \usepackage{cleveref}  \newtheorem{thm}{Theorem} \newtheorem{lem}[thm]{Lemma}  \begin{document}  \begin{lem} Lemma \end{lem}  \end{document}   The warning I get is the following:  [1pdfTeX warning (ext4): destination with the same identifier (name{thm.1}) has been already used, duplicate ignored  \AtBegShi@Output ...ipout \box \AtBeginShipoutBox                                                    \fi \fi  l.16 \end{document}                    {&lt;install dir&gt;/MiKTeX/2.9/pdftex/config/pdftex.map}]   I know that it is just a warning and that, my document will still work perfectly fine with regards to cross-referencing and hyperlinking, but I would still like to know why I am getting this warning and if anything can be done to fix it without removing functionality of the included packages.   Bonus question: Whats going on behind the scenes when this warning (or any generic 'destination with the same identifier (name{XXX.YYY}) has been already used, duplicate ignored') is produced, as this is not limited to theorem environments.  From log file:  Package: amsthm 2004/08/06 v2.20 Package: hyperref 2011/04/17 v6.82g Hypertext links for LaTeX Package: cleveref.sty 2011/03/22 v0.17.9 Intelligent cross-referencing Package cleveref Info: `hyperref' support loaded on input line 2157. Package cleveref Info: `amsthm' support loaded on input line 2300. Grant Select on a view not base table when base table is in a different database I have a view which is selecting rows from a table in a different database.  I'd like to grant select access to the view, but not direct access to the base table.  The view has a where clause restricting the number of rows.  Can I grant select to the view and not the base table, or do I need to switch to a stored procedure? I would rather not do it the latter way. I know  that uses $x={\sqrt{2}}^{\sqrt{2}}$ to prove that there must exist an irrational to an irrational power that evaluates to a rational. But I don't know if $x$ itself is known to be irrational or rational.  Could someone enlighten me? Thanks!