How to pause browser execution when F8 is not working

Let’s break down a simple trick that can help you manipulate and understand your code better.

To begin with, access your developer console. This can usually be found in your browser’s Developer Tools under the ‘Console’ tab. Depending on the browser you’re using, you might need to use different shortcuts (like F12) or methods to open it. But don’t worry, a quick search on how to open the developer console in your specific browser should get you on the right track.

Once you’ve opened the console, the next step involves entering a particular command. All you need to do is simply paste the provided command line in the console. This is what we’re going to use to manipulate our code. After pasting the command, hit the ‘Enter’ key to execute it.

document.addEventListener('keydown', function (e) {

if (e.keyCode == 119) { // F8

debugger;

}

}, {

capture: true

});

Now, your code should still be in an ‘unpaused’ state. But when you press F8 on the keyboard, it should pause. It’s like freezing a moment in time, letting you thoroughly inspect and understand how your code behaves for specific elements. This can be especially useful when debugging hover-effects and mouseovers.

With this simple trick, your web development toolkit has a new superpower! Experiment, explore, and let your code reveal its secrets to you. Happy coding!”

Google Family Link: After Unlocking your child’s device with parental access, how do you re-lock it?

I have been using Google Family Link recently in order to keep my child’s mobile phone online while safeguarding it against mature content.

Sometimes I have logged in to the device using the parent access code and that has brought up a question that doesn’t seem to have great answers in the manual of this software: How does one logout from the child’s device after accessing it with the family link parent code?

Here’s the answer: in order to quit accessing the child’s device as a parent, go to the Google Family Link app on the parent’s device and right beneath the circular image on the top, there should be your child’s device listed. Click on the name of the device and click on “lock”. Now the device should only be available if there is screen time left and the time is withing the allowed time limits.

Best free 3D-scanning app for iPhone in 2023

I have been testing out a lot of 3d-scanning apps for my iPhone 12 Pro recently. The Lidar sensor on the phone was one of the major reasons why I decided to make at least a temporary switch from the Android ecosystem to the iOS world. I’m especially interested in creating 3d-versions (or digital twins) of different rooms and spaces. Here are some of the apps I have already tried:

DotProduct ios app

3D Scanner app

Scandy Pro

Qlone

Kiri Engine

Widar

RTAB-Map

3D Scanner

Scaniverse

Modelar

Polycam

RoomScan

Pix4DCatch

Metascan

Heges

Trinio

ItSeez3D (iPad only)

Most of the apps in the list use the freemium model, where you can do a basic scan for free, but in-app purchases are often required at the export stage. There were two exceptions that were free from start to finish:

3D Scanner App and RTAB-Map of which the latter is open source.

I did some scans of the same space with both apps and the process was quite enjoyable with both. The quality was however somewhat more limited with the 3D Scanner App and in the end I was able to to get best results with RTAB-Map. So out of these scanner apps that I tested I would recommend RTAB-Map. It has versions not only for iPhone, but turns out it’s a very versatile app used for many purposes and it has also desktop releases for the major operating systems, including Windows, Mac and Linux.

I did experience some problems when I tried to do a really detailed scan. RTAB-map probably ran out of memory on my iPhone and crashed quite frequently when post-processing the scans. Luckily it turns out that you can simply export the database from the iPhone in order to do the processing on the desktop version instead. It might not be obvious at first how the RTAB-Map database can be accessed or exported on the iPhone, but you simply need to long-press on a scan in the library and choose “share”.

After you haved shared your database and downloaded it to your desktop computer, you can simply import it to the desktop version of RTAB-Map. I must say I found the interface to be rather confusing. For example, when I was looking for the option to export a textured mesh, the way to do it was to choose the “export 3d clouds” option, although one might thing that a mesh is not exactly a “cloud”. And there wasn’t a typical option to just “export a textured mesh” but you have to check the “meshing” checkbox and then the “texturing” checkbox for the texture options. And after that I actually had to close and the re-open the export to be able to see the “save” button. So quite quirky, but it worked out well in the end.

One more piece of information I want to share about using the RTAB-map on the iPhone: one time I had it crash right after a scan and at first I thought the scan had disappeared completely but after some searches in the “issues” page of their Github, I found out that some kind of recovery might be possible in the latest version. The problem was that I just couldn’t find any recovery option in the app interface. Finally I gave up and decided to do a rescan and when I chose to do a new scan, that’s when the recovery dialogue for the previous scan finally appeared and I was able to recover my crashed scan.

Two story house scanned with 3D Scanner App

Sauna scanned with RTAB-Map

Five DaVinci Resolve Tips to Boost Your Productivity

  1. Drag and drop folders of footage into Resolve with their folder structures intact. No more creating bins in Resolve for your various footage items. The solution is to drag and drop the folder from your operating system on the area which says “Master” which is typically on the left side of the Media pool. This will automatically preserve all your folder structures.
  2. Auto sync audio and video files. Many professional video productions will involve separate audio files from the video. Typically you have a low quality audio track embedded to the video coming from the video camera’s microphone and then you have a high quality set of audio files recorded with a boom or lavalier. When you start to edit such a setup in Resolve, one of the first steps is to sync the high quality audio with the video. To do that, simply select both the audio and the video clips (or even just the bins containing the audio and the bins containing the video) in the media pool and right click and choose “Auto Sync Audio”. From there I prefer the “Based on waveform and append tracks” because it will keep also the original audio in place for some sanity checks. It might take a while to complete and then it will give you a summary of the results. If you closed the summary, don’t worry, you can easily see which clips were synced with the audio by looking at them on the timeline. The ones that were successfully synced, will contain two audio tracks instead of just one.
  3. Use the 3D qualifier for great results when doing secondary color grading. You can find it in the qualifier tab. Then just draw a stroke over the colors you want to isolate for grading. View the matte from the magic wand looking symbol above the video monitor.

4. Temporarily disable/enable snapping mid-operation with the N-key. When you are dragging a clip on the timeline and realize that the snapping preference is not working for you, you can press N to temporarily diasable or enable snapping.

5. Automatically name your exported video using the project name. If you typically export your video files from the render queue using the name of the actual project, it may be a bit annoying to type in the File Name field, since you have already typed it once when naming the project. It would be nice if Resolve could automatically suggest the project name as the export name, but in the meanwhile you can type %Project Name in the field and then hit “Add to Render Queue” to get the same result. There are other variables you can access as well like %Timeline Name and %Render Resolution. The easiest way to access the variables in to just type a % in the field and Resolve will suggest all kinds of possible variables to you. It’s enough to just type %Proj and then hit enter in order to get the Project Name variable.

Blender keyboard shortcuts for working with nodes

Being able to work efficiently with different kinds of nodes in Blender is becoming increasingly important. These basic node related keyboard shortcuts should work in all of the Node editors in Blender including material nodes, the compositor and geometry nodes.

Add new node: shift+A

Just like you can add new objects with shift+a, the same shortcut also works for adding new nodes. If you want to immediately enter the search mode, read about the next shortcut below.

Add new node and search immediately: shift+A, then S

If you want to search for the name of the node instead of browsing through the categories, hit s immediately after hitting shift+a and it will take you to the search bar.

Disable a node: M

Sometimes you just want to see the results of a node tree without a certain node. In that case you can easily mute a node by selecting it and hitting M on your keyboard.

Delete a node: X

Just like you would expect, hitting X on the keyboard will delete the selected node(s).

Delete with reconnect: ctrl+X

If you want to delete a node in the middle of a node tree and automatically connect the node that came before the deleted node to the node where the deleted node was connected to, simply hit ctrl+X to delete the node from between.

Backdrop Zoom: V and alt+V

If you need to zoom out of the backdrop image to see it completely, just hit V on the keyboard. Zoom in by pressing alt+V.

Duplicate a node: shift+D

To make a duplicate of the selected node(s), just hit shift+D on the keyboard.

Connect a node to the viewer: ctrl+shift+leftclick

If you want to quickly connect a node’s output to the viewer node to see the result of the node, just hold down shift and control and left-click on the node you want to connect.

Cut a node connection: ctrl+rightclick-drag

If you want to cut a node connection, hold down control and the right mouse button and drag over the connection line.

Collapse node: H

Sometimes you want to collapse a node so that it takes less space. To do that, simply select the node and hit H on your keyboard and the node inputs will no longer be visible. If you want to reopen a collapsed node, simply hit H again.

Create node group: ctrl+G

Grouping nodes together allows you to simplify your node trees. By grouping several nodes together it is like combining them so that they appear to be just a single node. Simply select the nodes that you want to group together and hit ctrl+G. Note that all node types cannot be grouped together. For example you can’t put the “render layers” node in a node group.

Enter or exit node group: tab

After grouping nodes, Blender will automatically take you inside the group. To exit the node group, press tab on the keyboard. Similarly, to enter a node group, select the group and press tab.

Increment integer value in a database field using WPDB

Sometimes you need to update values incrementally in your WordPress database. You might for example have an upvote feature to which you automatically add points in an incremental fashion.

It was surprisingly hard to find examples of how to do this using Wpdb. But here’s an example of doing just that:

/* Have to use wpdb->query instead of wpdb->update because the latter assumes strings  */
  $results = $wpdb->query($wpdb->prepare("UPDATE foodsenglish SET popularity = popularity + 1 WHERE dbID = %d", $foodIdToSendThePointFor), ARRAY_A);