Browse our complete collection of questions and answers.
Stashing takes your uncommitted changes, saves them aside, and returns the working tree to a clean state matching the last commit. The changes are not lost; they are stored on a stack you can reapply
A conflict occurs when two branches changed the same region of a file and Git cannot determine which version is correct. It is not an error, and it does not mean anyone did anything wrong. Git
A promise that rejects with nothing attached to handle it produces an unhandled rejection, and modern Node treats that as fatal by default. The process exits. This changed from earlier versions where
Node runs your JavaScript on a single thread. It achieves concurrency not by running code in parallel but by never waiting: operations that would block, such as reading a file or making a network
Both cache something between renders. Memoising a value caches a computed result; memoising a callback caches a function identity. They are the same mechanism applied to different things, and both
The dependency array tells React which values the effect uses, so it can decide whether to run it again after a render. Omitting the array runs the effect after every render. Passing an empty array
State updates are not applied immediately. Calling the setter schedules a re-render; it does not change the variable you are currently holding. Reading that variable on the next line gives you the
Generics let a function or type work with many types while preserving the relationship between what goes in and what comes out. Without them you face a choice between writing the same function
For describing the shape of an object they are largely interchangeable, and most codebases could use either consistently without noticing a difference. The distinctions matter at the edges. Type
When an event fires on an element, it does not stay there. It travels down from the document root to the target, then back up through every ancestor. Those two phases are called capturing and
The default sort converts every element to a string and compares those strings. So ten sorts before nine, because the character one comes before nine. The array is correctly sorted, just
Undefined means a value was never assigned. Null means a value was deliberately set to nothing. The language draws that distinction, and whether your code should is a style decision worth making
A shallow copy creates a new container holding references to the same inner objects. A deep copy recursively creates new copies of everything inside. The distinction only matters when the structure
Almost always because the whole file is being loaded into memory at once. Reading a file with a method that returns its entire contents, or building a list of every line before processing, requires
Modern laptops handle this far better than the folk wisdom assumes. Charging stops when the battery is full; it does not continue trickling energy into it. So leaving it connected does not overcharge
The effect comes from motion interpolation, a feature enabled by default on most televisions and given a different marketing name by every manufacturer. The television generates artificial frames
The specification sheet is comparing names rather than capabilities. Processors sold for laptops and desktops with similar model numbers frequently have very different power and cooling budgets, and
HDR expands the range between the darkest and brightest parts of an image, and widens the range of colours available. It is a more meaningful improvement than resolution for most content, because the
USB-C describes only the physical connector, not what the cable can do. That single fact explains almost all the confusion, because two cables that look identical and fit the same ports can differ
Some warmth is normal and expected. Charging is an electrochemical process that is not perfectly efficient, and the losses appear as heat. Fast charging pushes more energy in a shorter time, so it
For normal use, considerably longer than most people fear, and typically longer than you will keep the machine. The concern comes from the fact that flash memory cells wear with each write, which is
They are frequently confused because both are measured in gigabytes, but they do entirely different jobs. Storage holds your files permanently and keeps them when the power is off. RAM is the working
Solid state drives need free blocks to write efficiently, and when they run short the write process becomes substantially more expensive. This is not gradual wear; it is a change in how the drive
The fundamental difference is where the light comes from. An LCD has a backlight shining through a liquid crystal layer that blocks light to form the image. An OLED has no backlight at all; each
Fast charging causes some additional wear, but far less than the way it is usually discussed suggests, and the main culprit is heat rather than current itself. Lithium batteries degrade faster at
The core detection engine is usually the same in both tiers from a given vendor. Paid versions add features around it rather than better malware detection, which is the opposite of what the marketing
A firewall decides which network traffic is allowed through based on rules. The important distinction is direction, because inbound and outbound filtering solve completely different problems and
Modern browsers deliberately trade memory for speed and stability, and a high figure is not automatically a problem. Each tab, and often each extension, runs in its own process so that one
A passkey replaces the password with a cryptographic key pair. The private key stays on your device, protected by your fingerprint, face or device passcode. The site stores only the public half,
Breaches are usually discovered by researchers or disclosed by the company long after the event, so the practical question is not whether you were affected but whether you have responded to the ones
The warning has two quite different causes, and the distinction matters because one is routine and the other should stop you. The milder case is a site served over plain HTTP with no encryption at
End-to-end encryption means content is encrypted on the sender device and decrypted only on the recipient device. The service carrying it holds only ciphertext and cannot read the contents, even
Most successful attacks exploit vulnerabilities that were fixed months or years earlier. The window that matters is not between discovery and patch, it is between patch and installation, and that
Modern phishing is well written and often visually indistinguishable from the real thing, so advice based on spotting bad spelling is out of date. The reliable signals are structural rather than
The cache stores copies of files a site has already sent you, such as images, stylesheets and scripts, so a return visit loads from your disk instead of the network. Clearing it deletes those copies,
Two-factor authentication requires something beyond your password, so a stolen password alone is not enough. The methods differ considerably in how much protection they actually provide, and they are
The concern people raise is reasonable: putting every credential in one place seems to create a single point of failure. In practice a password manager is a very large improvement over the realistic
Sync keeps the same set of files identical across several places. Backup keeps a separate copy of your files as they were at points in the past. The difference sounds small and is not, because sync
When most devices work and one does not, the network is fine and the difference lies in what that device supports or how it has been treated. Band support is the most common explanation. Older
Something is issuing a wake request, and both major operating systems can tell you what. Rather than guessing, query the system for the most recent wake source; the answer is usually specific enough
Determine first whether the drive is being detected at all, because that single fact separates two very different problems. The disk management utility on your system lists physical disks regardless
Every file type has a default application registered with the operating system, and opening a file consults that registration rather than anything about the file itself. Installers frequently claim
The charging path has several links, and testing them in order is faster than replacing parts speculatively. Start at the wall. Try a different outlet, and check the adapter indicator light if it has
Speed tests measure throughput under ideal conditions and tell you almost nothing about the qualities video calls actually depend on. A call needs a steady, low-delay stream with minimal loss, and a
Work outward from the simplest explanation, because the cheap tests eliminate most causes quickly. Try a different port first, ideally one directly on the machine rather than through a hub. Ports
Boot time divides into firmware initialisation, operating system loading, and everything that runs automatically once you reach the desktop. The third is usually the largest and the easiest to
Repeated failures at different points suggest an unstable connection; failures at consistently the same point suggest something else entirely, and that distinction is the fastest way to narrow it. If
Screen problems divide into three layers, and identifying which one is at fault takes only a couple of tests. The cable is the cheapest thing to rule out and a surprisingly common cause. Digital
Space disappears into places you do not see in your documents folder, and a handful of categories account for nearly all of it. System snapshots and restore points are usually the largest. Both major
The status reflects whether your computer can currently reach the printer, not whether the printer has power. It is genuinely a communication failure, and on a network printer the cause is nearly