June 10, 2020
#PHP
Below is a quick and easy way to recursively delete all files and folders in a given path using PHP.
function destroy_dir($dir) {
if (!is_dir($dir) …
Read Article →
June 9, 2020
#Databases
#Software
As a product update; The “Autonomous Distributed Database”, otherwise known as simply ADD has been renamed to Serengeti.
The Serengeti is …
Read Article →
June 8, 2020
#SQL
This came in very handy for me at one point because I needed to have a certain field in each row 14 characters long, but half of them were only 12 …
Read Article →
June 7, 2020
#Javascript
Below is a nice little Javascript RegularExpression to validate email addresses.
/^\w.+@[a-zA-Z_.]+?\.[a-zA-Z.]{2,3}$/
..and to use it..
if …
Read Article →
June 6, 2020
#Javascript
E.g. URL:<br>http://example.com/?option=1&task=2&listing_id=36&layout=4&table=5#some_hash_value_here
So how would you get the …
Read Article →
June 5, 2020
#AI
Artificial Intelligence (AI) is usually defined as the science of making computers do things that require intelligence when done by humans. (Jack …!-->
Read Article →
June 4, 2020
#Java
The Challenge
An encoded string S is given. To find and write the decoded string to a tape, the encoded string is read one character at a time and …
Read Article →
June 3, 2020
#Software
What are Real-time Systems?
If you look up the term “real-time” in a dictionary, it will tell you that it is the actual time during which …!-->
Read Article →
June 2, 2020
#Interview
#Java
The question
Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes.
Example: …
Read Article →
June 1, 2020
#SQL
The problem
Write a SQL query to get the second highest salary from the Employee table.
For example, given the above Employee table, the query …
!-->!-->
Read Article →
May 31, 2020
#Interview
#Java
The problem
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. …
Read Article →
May 30, 2020
#Interview
#Java
The problem
Given a positive integer num, output its complement number. The complement strategy is to flip the bits of its binary representation. …
Read Article →