JPG vs. JPEG image formats

JPG and JPEG stand both for an image format proposed and supported by the Joint Photographic Experts Group. The two terms have the same meaning and are interchangeable. To read on, check out Difference between JPG and JPEG. The reason for the different file extensions dates back to the early versions of Windows. The original … Read more

How can I remove a specific item from an array?

Find the index of the array element you want to remove using indexOf, and then remove that index with splice. The splice() method changes the contents of an array by removing existing elements and/or adding new elements. Expand snippet The second parameter of splice is the number of elements to remove. Note that splice modifies … Read more

What is Virtual DOM?

React creates a tree of custom objects representing a part of the DOM. For example, instead of creating an actual DIV element containing a UL element, it creates a React.div object that contains a React.ul object. It can manipulate these objects very quickly without actually touching the real DOM or going through the DOM API. … Read more

How do I make a delay in Java?

If you want to pause then use java.util.concurrent.TimeUnit: To sleep for one second or To sleep for a minute. As this is a loop, this presents an inherent problem – drift. Every time you run code and then sleep you will be drifting a little bit from running, say, every second. If this is an issue … Read more

When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]

This is specific for each site. So if you type that once, you will only get through that site and all other sites will need a similar type-through. It is also remembered for that site and you have to click on the padlock to reset it (so you can type it again): Needless to say … Read more

javax vs java package

I think it’s a historical thing – if a package is introduced as an addition to an existing JRE, it comes in as javax. If it’s first introduced as part of a JRE (like NIO was, I believe) then it comes in as java. Not sure why the new date and time API will end up as javax following this logic … Read more

virtualbox Raw-mode is unavailable courtesy of Hyper-V windows 10

Disabling Device Guard or Credential Guard fixed for me: click Start > Run, type gpedit.msc, and click Ok. The Local Group Policy Editor opens. Go to Local Computer Policy > Computer Configuration > Administrative Templates > System > Device Guard > Turn on Virtualization Based Security. Select Disabled. Go to Control Panel > Uninstall a Program > Turn Windows features on or off to turn off Hyper-V. Select. Do not restart. Delete the related EFI variables … Read more

Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

The problem is that Xcode Command-line Tools needs to be updated. Solution #1 Go back to your terminal and enter: You’ll then receive the following output: You will then be prompted in a window to update Xcode Command Line tools. (which may take a while) Open a new terminal window and your development tools should … Read more

Why does ENOENT mean “No such file or directory”?

It’s an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories. It’s abbreviated because C compilers at the dawn of time didn’t support more than 8 characters in symbols.