[...Array(n)].map((_,i) => i+1).map(x => { ... })is similar to
for(let i = 1; i <= n; i++) { ... } [...Array(n)].map((_,i) => i+1).map(x => { ... })is similar to
for(let i = 1; i <= n; i++) { ... }| # frozen_string_literal: true | |
| # Writing and Reading to files | |
| require 'fileutils' | |
| def add_gems | |
| gem 'devise' | |
| gem 'simple_form' | |
| end |
| function splitLow4Bits(num) { | |
| return (num & parseInt('00001111', 2)) | |
| } | |
| function splitHigh4Bits(num) { | |
| return (num & parseInt('11110000', 2)) >> 4 | |
| } | |
| // All this is no longer needed because of | |
| // the magic of ArrayBuffer and TypedArrays |
cd repo
# add the first remote
heroku git:remote -a app-one-name
#set git remote heroku to https://git.heroku.com/app-one-name.git
#next, rename the remote to something else
git remote rename heroku heroku-app-one
answer = 1 + 4
puts "This is some testing text"answer = 1 + 4
puts "This is some testing text"
| class StudentsController < ApplicationController | |
| before_action :find_student, except: [:index, :new, :create] | |
| def index | |
| @students = Student.all | |
| end | |
| def show | |
| end |