The values of the column like “[‘a’, ‘b’]”, “[‘a’]”, “[‘c’, ‘a’]” json_each(json_column): This function is used to expand the JSON array into a set of key-value pairs, where the key is the index or key within the array, and the value is the corresponding element. So that for each record of you_table, it will expand […]

Read More »

SQLite does NOT have a native ENUM data type like some other database systems such as MySQL. However, you can simulate enums in SQLite using a combination of a CHECK constraint and a TEXT or INTEGER column. Here’s an example using a TEXT column: If you need to add new values to your “enum” or […]

Read More »

This can be done by using the ‘opencv-python’ library. Install opencv-python Take the first frame of a video To capture a screenshot at 95% of the video duration To capture a screenshot at specific time like 3:24 Percentage to Screenshot time conversion To capture a snapshot at 95% of the video duration and then compute […]

Read More »

by default, when printing a Python object, it will show as an address to the object, like this contains only the class of the object (Student in the above example) and it memory address (0x10e430f65) and not much else. To display the content of the object in a nicely looked JSON format, we can overwrite […]

Read More »

Can use DosBox, which is a DOS emulator that runs on Mac OS. Download Download from its official site. Choose the “Mac OS X” one. It is a dmg file, then can open the “DosBox” app inside the dmg file. Can also move it to Applications folder. Mount the Drive on DOS Mount the drive. […]

Read More »