Q1. Which of the following have true values in Ruby? (Choose two.)
- (a)
"" - (b)
0 - (c)
false - (d)
nil
| stats = Sidekiq::Stats.new | |
| stats.queues | |
| stats.enqueued | |
| stats.processed | |
| stats.failed |
| # Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
| describe 'Modal' do | |
| should 'display login errors' do | |
| visit root_path | |
| click_link 'My HomeMarks' | |
| within '#login_area' do | |
| fill_in 'email', with: '[email protected]' | |
| fill_in 'password', with: 'test' |
| (ql:quickload 'lispbuilder-sdl) | |
| (ql:quickload 'lispbuilder-sdl-gfx) | |
| (ql:quickload 'alexandria) | |
| (defparameter world (make-array '(100 100) :element-type 'fixnum)) | |
| ;; initialize | |
| (defun init-world! (world) | |
| (loop for i from 0 to (1- (array-dimension world 0)) do | |
| (loop for j from 0 to (1- (array-dimension world 1)) do |
| #!/usr/bin/env bash | |
| set -e | |
| echo 'export IPFS_PATH=/data/ipfs' >>~/.bash_profile | |
| source ~/.bash_profile | |
| # ipfs daemon | |
| wget https://dist.ipfs.io/go-ipfs/v0.4.17/go-ipfs_v0.4.17_linux-amd64.tar.gz | |
| tar xvfz go-ipfs_v0.4.17_linux-amd64.tar.gz |
| require "test/unit" | |
| module ArrayFunctions | |
| class << self | |
| def flatten(array, flatten_array = []) | |
| raise "Nothing to do" unless array | |
| array.each do |element| | |
| if element.is_a? Integer | |
| flatten_array << element |
| source 'https://rubygems.org' | |
| # default gems here | |
| #--------------------------- | |
| # add paperclip and bootstrap | |
| gem "paperclip", "~> 4.1" | |
| gem 'bootstrap-sass', '~> 3.1.1' |