JavaScript: Class Constructor

The fundamental part of most classes is its constructor, which sets up each instance’s initial state and handles any parameters that were passed when calling new. It’s defined in a class block as though you’re defining a method named constructor, though it’s actually handled as a special case. Example usage: A small thing to note … 

 

Creating a search form

To create a search form, enter the following code form_tag: This is the default helper for creating a form. It’s first parameter, /search is the action and the second parameter specifies the HTTP method. For search forms, it is important to always use the method get label_tag: This helper creates an html “ tag. text_field_tag: This will create an input … 

 

Helpers for form elements

Checkboxes This will generate the following html “` I own a dog I own a cat [/ruby] Radio Buttons This generates the following HTML Text Area To create a larger text box, it is recommended to use the text_area_tag This will create the following HTML Number Field This will create an input element To specify a range of … 

 

Bash Colors and Content in Linux Terminal Prompt

The PS1 Bash Environment Variable The command prompt and terminal appearance are governed by an environment variable called PS1. According to the Bash man page, PS1 represents the primary prompt string which is displayed when the shell is ready to read a command. The allowed content in PS1 consists of several backslash-escaped special characters whose meaning is listed in the PROMPTING section of the … 

 

How to Install Rails 5 API

How To Setup Rails 5 API on Ubuntu Introduction This Rails layer will do nothing but provide an API which serves JSON, and process background jobs. Here are some of the things we will be setting up: Token based authentication with the devise_token_auth gem. A namespaced API Serialization with Active Model Serializers Testing with rspec … 

 

Presenting Your Project

Presenter Expectations Your goal is to tell a story. We want to know what it was like to work on this project: what were your takeaways from this experience, and how did you grow? You are expected to demo a deployed application. Audience Expectations If you would like to ask a question or give encouragement, …