Using console.time()
& console.timeEnd()
you can measure how long it takes for your code to execute.
console.time('any-name-you-want');
for (var i = 0; i < 1000_000; i++) {}
console.timeEnd('the-same-name-as-above')
Amazon Simple Queue Service (SQS) lets you send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available.
Messages stored in SQS can be pulled out by other services such as EC2, Lambda, etc. Upon pulling, message is deleted from the queue.
Circle CI is Continuous integration Continuous delivery platform. Alternative to Github Actions. The service is free to use, but there are paid packages as well.
This article will teach your how to extend the core array class with custom methods in various languages. To apply this we'll make use of:
We're going to make a new method isEmpty that is going to check if the array, list or collection is empty. So when a consumer calls this method it will return true or false.
In strictly typed object-oriented languages such as Java or C#, it's a common practice to invoke a method from a service by calling an interface as opposed to an actual service. This pattern is useful when swapping dependencies on the fly (like logging to the console or to the database) or unit testing, as we're not bounded to work with actual classes, but rather abstractions.
Open HTML document and find a body tag. Give the body tag onkeypress attribute. It shoud look like this:
<body onkeypress="KeyPressCheck(event)">
...html code...
</body>
Once that's done head over to your Javascript file that you'll import inside the html file with <script>
tag.
During my short use of MongoDB I encountered an issue with double quotes. Since MongoDB stores documents (objects) as JSON fields, key and value pairs, all string values are surrounded with double quotes. Example:
{"name": "Bruce Wayne"}
Although MongoDB will add an escape character if you use double quotes, using double quotes multiple times in the same string will throw an error. To avoid it, I found this handy code snippet that will replace all double quotes with single ones using regex.