If you are writing a RESTful api in Node.js you’ll have to decide between a relational database or a non-relational database. If you decided on the former, you’ll need to know how to write basic CRUD queries so that your api can talk to your database in a meaningful way. In this blog I’m going to go over the four basic queries that you can use to create a RESTful api using Node.js and PostgreSQL. Note: This blog assumes that you already have Node.js, PostgreSQL and pg installed.
Note: The fully coded answer is at the bottom.
Here is a link to the Leetcode version of this question if you want to code along. The question basically asks us to look at a string and determine whether or not it has valid parentheses. This means that each parenthesis, bracket, or…
If you’re an engineer preparing for tech interviews chances are you’re going to need to know how to implement a stack. In this blog I’m going to teach you how to solve a common leetcode question called Min Stack that will hopefully make implementing a stack a lot less foreign to you. Min Stack is a fairly straight forward question, but if you don’t grasp the tricks behind it you may not do well on other questions involving stacks. So it’s important to go through this question a few times until you’re ready to tackle more stack questions.
If you want to iterate over a linked list you’ll want to implement a while loop that checks if your node has reached the end…
When you allocate an array in a low-level language like C++ or Java, you have to specify upfront how many indices you want your array to have like…
If you’re new to C++ you may have wondered why C++ has both classes and these weird things called structs. The difference between a class and a struct is that an instance of a struct is a variable, while an instance of a class is an object. You can think of a struct as just another data structure like an array. The only difference is that you are making the data structure yourself this time. Structs are generally used if you plan on keeping the instance variables within in it constant. Another important difference between structs and classes is…
If you are completely new to C++ you may have run into the seemingly odd data type called an enum or an enumeration. Most tutorials I have seen tend to gloss over enums as just a collection of constants, but they never really talk about their use cases. In this blog I want to give a quick overview of what enums are and how you could use them in your C++ programs.
What is an Enum?
An enum or enumerated type is a user defined data type that holds a set of constant values. We usually use the keyword…
If you are like me you may have recently taken an interest in the ever growing field of augmented reality. Whether you’ve played the hit game Pokemon GO, or used a Snapchat face filter you’ve likely encountered AR in some shape or form, and you may have wondered about how you can make something similar. With industry leaders such as Mark Zuckerburg claiming that AR is the future, it is an amazing time to start making AR apps. Most mobile phones now have the hardware to augment our reality, and we no longer need expensive headsets to bring technology…
If you’re brand new to web development with Python and Flask, you may be confused on how to debug your code in an IDEless environment. You may know Python, but you’re having trouble adjusting to the way errors are handled in both Flask and web development in general. When using Flask for the first time you may have even encountered this very unhelpful message when you’ve made a mistake: