I'm sorry if this is a general question but what block of code should I use to make javascript or html respond to a key press or key event? Any way to do it is ok but I just want to make my website more interactive. Thank You!  And don't go around saying that this is a copy of some other question. It is not. I don't know why anyone would think that, too because the "original" question is asking "how do I know if a key is pressed". I am asking how do I make my website respond to a key press. And to the comment below, I have been searching this stuff up but isn't that what this website is for? I don't have a P.H.D in computer science and I'm just asking questions so I can understand these computer languages a little better but every time I ask a question everyone gets really mad at me because somehow a question about javascript is a lot like a fancy jquery command. But back on topic I am just looking for ways that my website can react to a key press. Once again, Thank You!
With jQuery, how do I find out which key was pressed when I bind to the keypress event?  $('#searchbox input').bind('keypress', function(e) {});   I want to trigger a submit when ENTER is pressed.  [Update]  Even though I found the (or better: one) answer myself, there seems to be some room for variation ;)  Is there a difference between keyCode and which - especially if I'm just looking for ENTER, which will never be a unicode key?  Do some browsers provide one property and others provide the other one?
Should there be a place to ask about programming libraries and technologies? Prove that $(n-1)! \equiv -1 \pmod{n}$ iff $n$ is prime [Wilson's Theorem] How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks. I am using QGIS 3.2.0 on a Mac (and also have QGIS 2), and I have a fishnet grid (probably created in Arc) that comprises of nearly 2 million grid cells. As a result, every change I make to the attribute table takes hours, so I can't experiment as I would usually.  I need to label each grid cell such that the north-westernmost cell is "1", and the numbers proceed by rows, until the last number goes into the south-easternmost cell. Using the row-number doesn't work, as that's not how the table is sorted. I've done this before, but cannot remember how. How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9 Show that $\left|\frac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < 1$ when $|\alpha|,|\beta| < 1$ What do you do in Dungeon World when someone wants to perform an action they don't have a move for? C# Equivalent of SQL Server DataTypes For the following SQL Server datatypes, what would be the corresponding datatype in C#?  Exact Numerics  bigint numeric bit smallint decimal smallmoney int tinyint money     Approximate Numerics  float real     Date and Time  date datetimeoffset datetime2 smalldatetime datetime time     Character Strings  char varchar text     Unicode Character Strings  nchar nvarchar ntext     Binary Strings  binary varbinary image     Other Data Types  cursor timestamp hierarchyid uniqueidentifier sql_variant xml table   (source: ) Community user id interpreted by absolute value in search Cheaper zoom lenses usually are faster at the wide end and slower at the long end (for example, the $150 Canon EF-S 18-55mm f/3.5-5.6). More expensive constant-aperture zoom lenses have the same aperture regardless (for example, $800 Canon EF 17-40mm f/4.0 L).  My question is: are these good lenses  at the wider settings, or do they have a different optic system that allows them to maintain the same aperture throughout the zoom range? Finding a tricky limit I have a homework in real analysis and I'm very confused about it. I would be very thankful, if you could give me any ideas or solutions how to get this task done. The task is as follows:     Find the limit:   $$\lim_{x\to 0} \frac{1}{x} \int_{0}^{x} (1+ \sin(t))^{1/t} dt.$$   A hint that has been given is to use L'Hospital's Rule. Moreover, it must be substantiated why we can use L'Hospital' Rule in this situation. It is also important to mention that $(1 + \sin(t))$ has a removable point of discontinuity at $0$ and therefore the integral can be interpreted as a Riemann integral. Breaking an equation cluster that does not fit on the rest of page across two pages sed command not giving proper output for regular expression used I am trying to fetch data between a range of time intervals from the log file. However, the complete data is not fetched for the end date.  Below is the command used:   sed -n '/26/Nov/2018/,/30/Nov/2018/ p' /path/file.log    The data I am having in the above log file is somewhat like:   192.168.0.123 - - [25/Nov/2018:13:24:59 +0530] "Data 1"  192.168.0.123 - - [26/Nov/2018:13:24:59 +0530] "Data 2"  192.168.0.123 - - [26/Nov/2018:13:25:09 +0530] "Data 3"  192.168.0.123 - - [27/Nov/2018:13:25:09 +0530] "Data 4"  192.168.0.123 - - [27/Nov/2018:13:25:11 +0530] "Data 5"  192.168.0.123 - - [27/Nov/2018:13:25:53 +0530] "Data 6"  192.168.0.123 - - [28/Nov/2018:13:25:53 +0530] "Data 7"  192.168.0.123 - - [29/Nov/2018:13:25:53 +0530] "Data 8"  192.168.0.123 - - [30/Nov/2018:13:25:53 +0530] "Data 9"  192.168.0.123 - - [30/Nov/2018:13:25:53 +0530] "Data 10"  192.168.0.123 - - [01/Dec/2018:13:25:53 +0530] "Data 11"  192.168.0.123 - - [01/Dec/2018:13:25:53 +0530] "Data 12" Best practice: card expiry date on checkout How to use aes-encryption in PostgreSQL? I tried aes-encryption by using following statement:  SELECT encrypt('test', 'key', 'aes');   which worked, but I am not able to decrypt the value. I inserted it in a field of datatype bytea but I'm not sure if that was the right way.   SELECT decrypt(pw, 'key', 'aes') FROM table WHERE ID = 1;   gives me the error     ERROR:  function decrypt(bytea, unknown, unknown) does not exist   LINE 1: SELECT decrypt(pw, 'key', 'aes') FROM tabelle WHERE ID = 7;                  ^   HINT:  No function matches the given name and argument types. You might need to add explicit type casts.   Does that really mean that encrypt() is an existing function, but not decrypt()? How else could I retreive aes-encrypted values? What does functools.wraps do? In a comment on this , someone said that they weren't sure what functools.wraps was doing. So, I'm asking this question so that there will be a record of it on StackOverflow for future reference: what does functools.wraps do, exactly? How to link data to a polygon ArcMap 10.3 I have a map with different polygons (118). Each of this polygons represent diferent vegetation types.  For each of those polygons I have data of which species there is and how abundant they are (the abundance is measured with a scale from 1 to 3).  I would like to "link" (I am sorry if its not the correct way of name it) the data of which species and abundance there is in each of those polygons.   I would like afterwards to be able of selecting the different polygons containing the same abundance and species.  In the polygons I created there is no atributes associated other than (FID, shape and Id. the 3 of them created alone by the program when I drew them) and the tables I have in excel with the data I want to "link" to the polygons contain a column called species and another abundance.  As you can see, I'm pretty new using the program...    As I have tried to do what you all suggest in the comments down here, and I couldn't achieve what I was wanting to do (provably because of my bad explanation before...)  I leave a picture:  As you can see in the attribute table, that is how every attribute table of each polygon (which represents one area) looks like. On the right there is how I have my data in excel. Could you please suggest something I could do in order to add to the polygons attribute table the data belonging of species and its abundances (polygon number 1 has to have all the species (Acer mons, Acer pseu, Acer repens….) and its abundance (which are the numbers of the row Area1). As shown in various episodes ("Mirror, Mirror," "Phantasms," etc.), other universes exist, oftentimes containing the same characters, albeit in different situations than in the prime universe. I'm curious, though, whether individuals that apparently exist outside of the multiverse, such as members of the Q, would not be duplicated elsewhere. It seems reasonable to me, but I'm not sure. Trying to connect to the internet, no WiFi symbol in the top right Converting Ubuntu 16.04 legacy mode to UEFI mode So it's time to ask my first question, something I've been struggling with for a while now. I know there are some questions around the same topic, however, none of them (which I could find) have been of any help.  Before you ask, I want to do some explaining of the core problem.  Why have I not just installed it in UEFI mode?  I was unable to boot the install (or live mode for that matter) in uefi mode. After some time spent searching on google I noticed that several people have had this exact problem: after the menu appears (the uefi one), whatever I do simply results in a black screen.  After reading this article , I though I'd try installing ubuntu in legacy mode, and then use boot-repair to convert my install to uefi.   NOTE: I am dual booting ubutnu alongside Windows 10. Currently I have to enter the bios settings to enable uefi boot in order to enter windows and vice versa.   What I have tried  Boot-repair  I then tried, of course, boot-repair while in a legacy mode session only to get this error message:     The current session is in Legacy mode. Please reboot the computer, and use this software in an EFI session. This will enable this feature. For example, use a live-USB of Boot-Repair-Disk-64bit (www.sourceforge.net/p/boot-repair-cd), after making sure your BIOS is set up to boot USB in EFI mode.   Boot-repair live usb  I tried creating a live usb with boot-repair 64bit only to encounter the same problem as when booting the ubuntu install  Why do I need to boot with UEFI?  Well I don't REALLY need too boot using UEFI, however, my current windows install does, and it would be great to be able to choose whether to boot windows or ubuntu without having to switch between legacy and uefi.  Need any more information?  Is there a way to manually create the /boot partition and do the necessary changes for my system to boot efi?  Other suggestions?  Thanks  EDIT:  While I have tried both on and off, secured boot has been turned off for most of my attempts.  Edit #2: (In response to Rod Smith and comments regarding more info)   I have tried rEFInd boot manager, it encounters the very same problem I have tried rufus (Windows) and unetbootin (Ubuntu) for creating the usb media, both of which producing valid media (for other computers at least) I have a friend with (almost) the same computer with the same problem Very few distros work, Arch and Gentoo are among those who do work I have a GTX 1060 card on a Multicom laptop Windows does indeed use GPT and UEFI boot   Many of my assumptions have been made after reading this post right here:   Especially the text right after something describing my problem:     There is no solution for these errors and the workaround is to disable UEFI to enable the Ubuntu installer to run in legacy mode; after which boot-repair can be used to install grub-efi which then allows/needs UEFI switched back on before Ubuntu will boot using UEFI.   I actually assumed I couldn't reach the F6 menu at all, but now I haven't had time to recheck that. I thought I'd post this as it illustrates a problem often encountered on ELU.     In structures such as 'football manager', is 'football' a modifier or   a complement of the head noun?   I've seen both terms used as if there were only one possible correct answer. However, I've come across widely differing definitions of both 'modify' and 'complement' as used in grammar. I believe that people stating baldly that this is either one or the other are assuming a grammar that they prefer, rather than giving a balanced overview.  Notice that I intend this question to explore the usage/s of the term 'modify' and of the term 'complement' in this context. There may be overlap with the question of which word-class 'football' fits into, but that decision hardly answers the question.