The Kotlin “not-null assertion operator” is expressed as two exclamation points. !! that appear at the end of a variable name. For example: myVariable!! Here is what the Kotlin documentation says about this operator: Here is what I learned about the not-null assertion operator after a little bit of experimentation: The difference between b and … Continue reading Kotlin: How to understand the not-null assertion operator (!!)
Git: How to clear github repo commit history
I had a repo on github that was set to private because the database connection details were exposed in the code. I recently added some code which moved the sensitive database connection details to an outside file so that the repo could be changed from private to public. However, after setting the repo to public … Continue reading Git: How to clear github repo commit history
How to use the Linux od command (Octal Dump)
I was in a command terminal “bash” window on my Mac and I tried to run this curl command to get a security token from a web service api:curl -d “Username=mywebsite&Password=password” -X POST https://dev-warehouseapi.somewebsiteservice.com/api/Token However, my curl command failed with the message “curl: no URL specified!”. For example: My curl command appeared to be perfect, … Continue reading How to use the Linux od command (Octal Dump)
Python and Kotlin: A comparison of the language basics
In this table I will compare some basic programming syntax and conventions between the Python and Kotlin programming languages. Programming element Python Kotlin Commenting code: # This is a comment // This is a comment Multi-line comments: “”” This is a comment. This is a comment, too. This is a comment, too. “”” /* This … Continue reading Python and Kotlin: A comparison of the language basics
MongoDB: How to install mongodb-community on Mac and run on localhost
The goal of this article is to show how to get mongodb-community to run on a Mac at localhost:27017. This assumes that Homebrew has already been installed on your Mac machine. Using a terminal or bash window, start with the following brew command:brew tap mongodb/brew In this screenshot, I used this command after I already … Continue reading MongoDB: How to install mongodb-community on Mac and run on localhost
Kotlin: How to test your code online
Here are some online web apps that people have written that make it possible to test your Kotlin code online. play.kotlinlang.orghttp://play.kotlinlang.org/ JDOODLEhttp://jdoodle.com/ tutorialspointhttps://tutorialspoint.com
Kotlin: How to create a simple Hello World app
When starting on the journey of learning the Kotlin language, it is a good idea to get an initial impression of the language by creating and running the simplest possible program in Kotlin. That is what I will describe how to do in this article. The first step assumes that you have already downloaded and … Continue reading Kotlin: How to create a simple Hello World app
AWS: How to write JSON files to an S3 bucket from Lambda
Let’s say you’re working on an API that will create JSON data and you want to store that data in an S3 bucket for retrieval by a separate Lambda script. Note: For this code example, I am using node.js as my runtime language in my AWS Lambda. Let’s say the JSON data has been created … Continue reading AWS: How to write JSON files to an S3 bucket from Lambda
Node.js: How to launch a temporary server and view output in a web browser
Once you have successfully written some node.js code and have viewed the results via command line, (see my previous article about this, linked below) the next logical step is to be able to write node.js code that can use HTML and be viewable in a web browser. To view node.js output in a web browser, … Continue reading Node.js: How to launch a temporary server and view output in a web browser
Node.js: How to update Node and NPM to the latest versions
You can check to see what versions of Node and NPM you have with these commands: node -v npm -v. For example: To update NPM, you can do that at the command line with this command: npm install -g npm The output should look something like this: A good way to update Node is to … Continue reading Node.js: How to update Node and NPM to the latest versions