In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.
Some examples:
7 # integer literal
In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.
Some examples:
7 # integer literal
Image: Pencil Sharpener by Wendy Bayer
This shows you how to disable those Chrome Save address?, Save card?, and Save Password? pop up windows in Selenium Webdriver
All code is available in example app - https://github.com/maxivak/webpacker-rails-example-app
Expect some false positives here, but hopefully most of these are open source Rails apps that use (or once used) AngularJS.
If you'd like to help update the list, please comment below with any of these apps you discover do not use AngularJS and include my username (@eliotsykes) in your message.
This page lists the options for breaking single-line expressions into multiple lines in Ruby.
Developers and teams need to come to their own decisions about which guideline(s) they prefer (preferences below are just my personal choices and I encourage you to disregard them).
# With trailing parens
x = [1, 2, 3].join(
'-'
Rails.application.configure do | |
# ... | |
require_relative '../../spec/support/no_animations' | |
config.middleware.use Rack::NoAnimations | |
end |
Stripe.applePay.checkAvailability = function (callback) { | |
if (location.protocol === 'https:') { | |
var canMakePayments = window.ApplePaySession && ApplePaySession.canMakePayments() | |
if (/^pk_test_/.test(Stripe.key || Stripe.publishableKey)) { | |
callback(canMakePayments) | |
} else if (canMakePayments) { | |
var merchantId = "merchant." + window.location.hostname + ".stripe" | |
ApplePaySession.canMakePaymentsWithActiveCard(merchantId).then(callback) | |
} else { |
// Requires jQuery | |
var logger = { | |
setup: function() { | |
$('<div style="position:fixed; top: 0; left: 0; width: 100%; background-color: white;"><pre id="log-output" style="max-height: 70px; font-size: 10px; line-height: 12px;"></pre></div>') | |
.appendTo('body'); | |
this.logOutput = $('#log-output'); | |
}, | |
info: function(msg) { this.logOutput.prepend(msg + "\n"); }, | |
hide: function() { this.logOutput.parent().hide(); }, | |
show: function() { this.logOutput.parent().show(); } |
# File: app/controllers/api/api_controller.rb | |
class Api::ApiController < ActionController::Base | |
# Consider subclassing ActionController::API instead of Base, see | |
# http://api.rubyonrails.org/classes/ActionController/API.html | |
protect_from_forgery with: :null_session | |
before_action :authenticate | |
def self.disable_turbolinks_cookies | |
skip_before_action :set_request_method_cookie |
At time of writing, Cloud9 has PostgreSQL pre-installed, so you won't need to install it yourself. However, its not running by default, so you will need to start it with this command in the terminal:
sudo service postgresql start
Change the PostgreSQL password to 'password' (or choose a different password):