How did (in particular) Americans just go along with the concept of having to own and show “photo id” everywhere? [closed]

I remember hearing or seeing a documentary or something a “long” time ago, likely in the early 2000s, about how a lot of Americans (USAians) refused to show an “id” even when voting, where it might possibly be justified to demand some form of identification in order to prevent duplicate votes (if you believe in the concept of democracy in the first place, which is not on-topic for this question).

I also know for a fact that they never had to show IDs to board cruise ships and stuff, for the longest time.

Nowadays, you have to scan and send a photo id to many sites or services online, you can’t as much as collect a package at the post office (pre-paid, with the notification number with you) where I live (Europe), and you’d never be allowed to board any kind of ship or airplane or anything like that without them “verifying” exactly who you are. This seems to very much go for Americans as well.

They even have “facial recognition” and hi-tech x-rays showing you fully naked to the personnel and whoever gets access to their computer systems (massive leaks happen every day).

I wonder: how did this happen without anyone putting up any kind of fight? I could really, really use a vacation for the first time in my life, and it would be interesting to go on one of those huge cruise ships, but given that they not only charge through the nose for it, but demand that I show them photo id to board it (not just my ticket), it’s an impossibility to me.

I literally don’t own a photo id, and getting one would involve having to go to some government building and all kinds of scary (to me) stuff. It’s way more than not wanting to be tracked, which in itself should be enough as a reason for not playing along with this. I feel fundamentally violated having to “prove who I am”. I just have zero interest in doing so. I’m violently disinterested in being tracked by anyone, for any reason, anywhere.

So how did Americans, who traditionally have been extremely “freedom-loving”, just go along with this? I’m furious and steaming from just thinking about this, and I live in the “merry old oppressive Europe”… I can only imagine how many Americans must feel completely “trapped” wherever they live because everything requires you to have these photo ids.

K-nearest along ray in large point cloud

Are there any well-known data structures known that can handle the following (need to scope whether something is possible):

  1. Return the k-closest points to a ray shot through the cloud.

  2. Allows quick updates of point locations (basically every point is moved every 500000 queries or so at which point around 500000 old points are removed and the same number added).

In this case the number of points in the cloud will be approximately 3.5 million. The application is in 3D graphics.

How to present boolean options along with selecting exactly 1 of them as “primary”?

I have a situation in a web browser where I have a number (let’s say 3-10) of alternatives to present to the user.

  • The end user must choose at least one of these options to be enabled
  • The end user must choose exactly one of the enabled options to be the “primary” option.

I’m not sure how best to do this, though. Here’s a contrived situation about a stew that might help illustrate this better:

enter image description here

There are 7 potential ingredients, the user has to enable or disable each of them (cries out for a checkbox) but at least one of them has to be enabled; and exactly one of them must be the primary ingredient (cries out for a radio button).

  • If I choose a dumb form with no constraint checking, this is easy to implement, but they could choose Beef, Pork, and Carrots as the enabled ingredients and then Potatoes as the primary ingredient (which is a problem since they did not check the Potatoes box among the enabled ingredients)

  • Or I could put the primary ingredient first, then allow them to select secondary ingredients, and force the primary ingredient to be selected in the list of secondary ingredients (beef in the example below) and not allow it to be unselected. Not too hard to implement in HTML / Javascript, but then there’s some trickiness… what if I start with the UI state below, then select the primary ingredient as Onions, then as Chicken, and then Pork? What happens to the checkboxes for Onions, Chicken, and Beef?

enter image description here

Both of these options require duplicating the list twice.

  • Or I could try to use some kind of multichoice slider to select the primary ingredient… which would eliminate the need to duplicate the list… but this isn’t a built-in HTML feature and I’d have to roll my own or try to apply some 3rd-party UI element.

  • Or I could place a radiobutton and a checkbox in front of each ingredient (radiobutton for primary ingredient, checkbox to enable non-primary ingredients) which is compact and simple in presentation, but most likely confusing in semantics.

Any suggestions?

How to use GPG to pass along encrypted content and double encrypt

Say I have a document. I want to encrypt it, then give it to my friend, and I don’t want them to be able to decrypt it. I want them to encrypt it again using their GPG system. Then to decrypt it my friend has to first decrypt it, send it to me, and I decrypt it.

How do I do that roughly with the GPG CLI? I am confused because there are 3 interrelated elements.

gpg --encrypt --sign --armor -r -r name_of_file 
  • encrypt
  • sign
  • recipients

I amnot sure how they all relate or what they do exactly. Do I just encrypt it without signing and without recipients, pass it to my friend and they encrypt it without signing or adding recipients?

Using OAuth2 with JWT, should a client pass along unused refresh tokens on a logout call?

I have a system with an OAuth2 authorization server. It hands out JWT access tokens and refresh tokens (the latter only to the mobile app client).

We don’t persist access tokens (as is normal with JWT) but we do persist the (hashed) refresh tokens together with some meta data to be able to revoke them so that users can log out other devices. We also only allow a single use for refresh tokens, the new request also gives back a new refresh token.

The OAuth2 login server itself uses regular basic auth with sessions. The user wants to be able to logout (single devices/clients) here. So of course I have to invalidate the session itself. But ideally I want to remove the refresh token that this client still has as well. The problem is that I don’t know that refresh token. A particular user could in theory have request multiple of them with their code request. The refresh token is also not normally passed in requests (only the access token)

Should I ask the clients (which are currently all under our own development) to send along their unused refresh tokens? Even if they ‘forget’ their refresh tokens locally, it still seems better if I also delete them on the server so they don’t linger around until their expiry time. Note I do know all the refresh tokens currently in use for a certain account but I don’t want to just delete them all because that would mean all devices are logged out. We also save some user agent-like info with the refresh tokens so users can use that to manually logout other devices, but it seems like a bad idea to try to perform string matching on those to automate that process.

Unable to install Ubuntu along with Windows 10, HP Omen Laptop

So I have crawled around the web for 2 days now, only to notice that I’m not the only one with this problem and 2 not a single person really knows how to fix this. This is not a single good guide or video out there to solve this problem so here we go…

Computer Specs:

I upgraded to 16g of ram and installed a Samsung 970 pro SSD

secure boot = disabled

TPM = Available / disabled

SGX = disabled

Legacy boot = disabled

I have installed ubuntu on a live usb, i have verified the install and checked for bad blocks on the USB (3.0)

So when i insert the usb, the standard Grub loader comes up. I scrolled down to install ubuntu, and press E.

then i go to the end of the following line:

linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash —

I have tried the follow additional commands:





None of this at any given time have worked. Currently after I press F10 I am getting an error saying:

failed to claim resource 1. platform device creation failed: -16

My understanding is that it has something to do with NVIDIA drivers, please help.

PS. Ubuntu why haven’t you fixed this yet. It’s been a plague since 16.04.

Ubuntu 18.04 LTS along side Windows 10 not showing up MSI X470 GAMING PRO (MS-7B79)

I have an HDD Previously of 1 TB which has Windows 10 installed.

Today, I got a new WB SSD 1TB.

To install windows first on SSD, I removed HDD and installed windows 10 and created 2 partitions on WB SSD.

Now when I try to boot I get directly booted into the new OS, fair.

Next I have tried installing ubuntu 18.04 lts, i have selected 2nd partition which was ~465 gb and installed successfully.

Then after restarting i was expecting to show boot menu to allow me to select 3 os


  • 1st SSD’s Windows 10
  • 2nd SSD’s Ubuntu 18.04 LTS
  • 3rd HDD’s Window 10

I have disabled fast boot option from Power Setting and verified that Secure Boot is Disabled in Bios settings.

To enter:

  • Delete while booting
  • Advance-> Windows 8.1/ 10 WHQL Support is disabled (i have researched here for how to do it

Some people have suggested on various forums to run this command from cmd as administrative

command: bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

I have restarted and still not able to get it working.

The fun part is while booting if i press F11 to see boot option i get to see all of them listed followed by Enter Setup option. I have tried logging in newly installed ubuntu and it works flawlessly.

My bcdedit command output after editing is as below:

C:\Windows\system32>bcdedit  Windows Boot Manager -------------------- identifier              {bootmgr} device                  partition=\Device\HarddiskVolume2 path                    \EFI\UBUNTU\GRUBX64.EFI description             Windows Boot Manager locale                  en-US inherit                 {globalsettings} default                 {current} resumeobject            {564500db-e222-11e9-a9a6-e69b1900e4bb} displayorder            {current} toolsdisplayorder       {memdiag} timeout                 30  Windows Boot Loader ------------------- identifier              {current} device                  partition=C: path                    \Windows\system32\winload.efi description             Windows 10 locale                  en-US inherit                 {bootloadersettings} recoverysequence        {564500dd-e222-11e9-a9a6-e69b1900e4bb} displaymessageoverride  Recovery recoveryenabled         Yes isolatedcontext         Yes allowedinmemorysettings 0x15000075 osdevice                partition=C: systemroot              \Windows resumeobject            {564500db-e222-11e9-a9a6-e69b1900e4bb} nx                      OptIn bootmenupolicy          Standard 

Here is the current state of my pc from windows os’s view:

enter image description here


  • C: is Windows on SSD
  • E: Ubuntu on SSD(I dont know why it is shoing like that or rather not show at all)
  • G: Windows on HDD

Please help me and let me know what am I doing wrong.

Writing an sql query for name of the youngest student(s) from the ‘Computer Science’ department along with the total marks obtained by him (them).”

I have been given a table of students data and I have to write query for the following:

Retrieve the name of the youngest student(s) from the ‘Computer Science’ department along with the total marks obtained by him (them).

The database schema are as follows:

depts( deptcode char(3) primary key, deptname char(70) not null); 
students( rollno number(2) primary key, name varchar(50), bdate date check(bdate < TO_DATE('2004-01-01','YYYY-MM-DD')), deptcode char(3) references depts(deptcode) on delete cascade, hostel number check(hostel<20), parent_inc number(8,1)); 
crs_regd( crs_rollno number(2) references students(rollno) on delete cascade, on delete cascade, marks number(5,2), primary key(crs_rollno)); 

I wrote the query as

select name, bdate, sum(marks) from students s inner join crs_regd c on s.rollno=c.crs_rollno inner join ( select name, min(bdate) as bdate from students st, depts d where st.deptcode=d.deptcode and d.deptname="Computer Science") x on and x.bdate=s.bdate; 

but it gives the error as identifier is too long in the line

where st.deptcode=d.deptcode and d.deptname="Computer Science") x

I think the problem is in joining the join of two tables with already joined two tables as the error points out. Correct me if I am wrong. If the query is incorrect please inform.

Also, if there is a way to write this query please discuss. If any other information needed please drop a comment below.