Spring: SecurityContextHolder.getContext().getAuthentication().getPrincipal() returns null
Spring's SecurityContextHolder.getContext().getAuthentication() returns null after RedirectView is used in HTTPS/SSL
I need to periodically run a command that ensures that some text files are kept in Linux mode. Unfortunately dos2unix always modifies the file, which would mess file's and folder's timestamps and cause unnecessary writes.   The script I write is in Bash, so  I'd prefer answers based on Bash. The camera in Far Cry 3 is useful for tagging enemies from a distance but also includes the ability to take pictures.  This does not seem to do anything useful when used on animals or enemies.  Is there a purpose? This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it? In bibliography, how to print the page in my text where I cited certain paper? How to get, for instance,  [19] S. Roth and M. J. Black. Fields of experts: A framework for learning image priors. In IEEE Conf. on Computer Vision and Pattern Recognition, 2005. 1, 2, 7, 8  where the last numbers (1, 2, 7, 8) are the pages where I cited the paper in MY TEXT?  This would be like a reversed reference, or a index for bibliography. The title of  of  is, "Is it posible [sic]?"  This doesn't provide any information at all. It should be mandatory for everyone asking questions on the Internet to read , which says:     Help your community learn from the question. When you field a good question, ask yourself "How would the relevant documentation or FAQ have to change so that nobody has to answer this again?" What is the electric charge of the Sun and its corona? I am trying to estimate summary statistics of points located inside a polygon. Each points in the point layer is associated with N attributes. My target is to summarize (say mean, min,..) the attributes of points located within a polygon and populate the attribute fields of the corresponding polygon.   I am looking for a solution using GeoPandas or other Python libraries.   import geopandas as gpd    gdf_points = gpd.read_file('/path_to_points.json') gdf_polygon = gpd.read_file('/path_to_polygons.json')  dfsjoin = gpd.sjoin(gdf_polygon ,gdf_points)   Now, how can I summarize the stats for each attribute in the point layer and add it to the polygon shapefile? Which function can I use?  I am looking for something that is functionally equivalent to ESRI ArcGIS  with Was "book" to "beek" as "foot" is to "feet"? "Foot" is a curious word in English because it is pluralized in an unusual way; the "oo" in the word is changed to "ee".  Did this once use to be a standard way of pluralizing things in English (or a language that contributed to English), which would mean that the plural of "book" was "beek" instead of "books"?  Or, is "feet" just a one-off? The shop is five minutes away.     According to the dictionary, away is an adverb. An adverb modifies a verb. In the above example, what word does away modify? Why is away not an adjective?       The shop is five meters tall.     tall is an adjective in the second example. It modifies five meters (does it?). So why is away an adverb? What's the simplest SQL statement that will return the duplicate values for a given column and the count of their occurrences in an Oracle database table?  For example: I have a JOBS table with the column JOB_NUMBER.  How can I find out if I have any duplicate JOB_NUMBERs, and how many times they're duplicated? Icon missing when application is launched I've created an application launcher in /usr/share/applications that launches rdesktop. The file specifies an icon name and I've added the icons to:   /usr/share/icons/HighContrast/48x48/apps /usr/share/icons/HighContrast/22x22/apps /usr/share/icons/HighContrast/256x256/apps /usr/share/icons/HighContrast/32x32/apps /usr/share/icons/HighContrast/scalable/apps-extra /usr/share/icons/HighContrast/24x24/apps /usr/share/icons/HighContrast/16x16/apps /usr/share/icons/hicolor/scalable/apps /usr/share/icons/hicolor/128x128/apps /usr/share/icons/hicolor/16x16/apps   I then drug the launcher to the taskbar and the launcher with the correct logo is visible in the taskbar. However, when I start the task, a new icon is created in the taskbar, a square with a question mark in the center.  What icons do I need and where, so that the taskbar displays the correct icon for the application when it is launched?  The .desktop file contents:   [Desktop Entry] Version=1.0 Terminal=false Icon=mswindows Type=Application Categories=Network; Exec=rdesktop win7shared1 -g 1680x1000  Name=win7shared1 GenericName=rdesktop Comment=Open windows desktop  Keywords=Windows StartupNotify=false What should I do when the GETDEB repository is down? I'm trying to install programs/files from the getdeb repo but get a "check your internet connection" error.  Programs than I've tried include Qbittorrent and Mozilla-Plugin-VLC.    Through the terminal I get the following errors:  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps qbittorrent amd64 2.8.2-1~getdeb2   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/q/qbittorrent/qbittorrent_2.8.2-1~getdeb2_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   &amp;  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps mozilla-plugin-vlc amd64 1.1.10-1~getdeb1   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/v/vlc/mozilla-plugin-vlc_1.1.10-1~getdeb1_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   I'm not having any problems adding/removing other programs/files from my machine.  Is there a problem with GETDEB repo (and if so, is there any way to fix it on my end) or is there something wrong with my computer's configuration? How to know if other threads have finished? Meaning of the buffers/cache line in the output of free Why does my server show              total      used      free   shared buffers    cached     Mem: 12286456  11715372    571084        0   81912   6545228 -/+ buffers/cache:  5088232   7198224    Swap: 24571408     54528  24516880   I have no idea on calculating the memory in linux. I think it says that 5088232 is used where as 7198224 is free, meaning it is actually consuming 5GB of RAM? Who is this running kid wearing a shirt with Uchiha symbol? There's a kid wearing a shirt with Uchiha symbol, but I have no idea who s/he is.    Who is this kid? Making ffmpeg process first audio stream differently than all others I'm trying to write a command such that ffmpeg executes a given instruction for the first audio stream in a file and a different instruction for any and all others.  In the test case below, for example, I want the first stream copied to the output file and all others converted to mono.  If I write it this way  ffmpeg -i INPUT -map 0 -c copy -map 0:a:0 -c:a:0 copy -map -0:a:0? -c:a libfdk_aac -ac 1 OUTPUT   the first audio stream is ignored when the mapping is overridden later in the command line.  But if I move the instruction for that stream to after the others'  ffmpeg -i INPUT -map 0 -c copy -map -0:a:0? -c:a libfdk_aac -ac 1 -map 0:a:0 -c:a:0 copy OUTPUT   it's no longer ignored, but becomes the last audio stream in the file.  I know I'm close here; I just can't see what I'm doing wrong. Suppose $X_n$ is the fortune of a gambler after $n$ th game. Then the game is called fair (Breiman 1968) if   $$E[X_{n+1} \mid X_1, \dots, X_n] = X_n \forall n$$  My question is why a fair game is not defined as the following   $$E[X_{n+1}] = E[X_n] \forall n$$ i.e. $$E[X_{n+1}- X_n]=0$$. This should be the proper definition as a fair game is where avg. gain is zero. Nothing conditioning should be there. Since I updated to Ubuntu 17.10 a while ago, my private keys – the which I use for example to access my server via ssh – are not unlocked programmatically after login anymore.    My understanding is, that usually the seahorse client should take care of this, by asking you whether or not to store the key's password when typing them in for the first time.  My first guess was, that seahorse-daemon wasn't running for some reason, but it is:  user@Zeus:~$ ps aux | grep seahorse user    19170  0.0  0.1 432636 26564 ?        Ss   00:07   0:00 seahorse-daemon   My second guess was, that for some reason I have to delete all related passwords stored in seahorse under »Passwords->login«:    I was hoping to force the client to ask me again and then storing them again. But this didn't help either. The client does not pop up to ask me...  Then I found this question, which could be related, but did not help me:    As the management of other passwords work as expected (for example passwords for nautilus, Chromium, Nextcloud etc.) I assume the problem has to do something with ssh-agent...  Can anybody hint me in the right directions, how to solve this problem? Has anything changed in the way how GNOME handles passwords? Maybe some new fancy program failed being installed during the upgrade process?   UPDATE When I add the private key to the authentication agent again with:  ssh-add ~/.ssh/id_rsa   and try to log in, I will be asked to unlock the key only once, after that the key gets unlocked programmatically. But this works only until the next reboot. After a fresh start, I have to add the key again... Why do we need virtual functions in C++? Should I disable swap file if I have lots of RAM or should I move it to a virtual RAM drive? Imagine I have tons of RAM. Let's say 64GB. That's a lot for even gaming PCs. Now the default location of a pagefile in Windows is on the main OS drive, be it HDD or SSD, which are faster in general, but still not as fast as RAM.  Something tells me that disabling the pagefile on the hard drive or creating a virtual RAM drive and letting the pagefile be there could make Windows move all its virtual memory to RAM, and so increase the system's performance, but I'm not very knowledgeable in that area, so that might not be true at all.  I tried both, but I couldn't analyze the results to reach a definite conclusion with my knowledge level in memory things.  Would this work? If not, why?