...Calc's AutoCorrect will change the first character of the last line to uppercase: foo => foo bar bar baz Baz To fix this, go to Tools / AutoCorrect Options, choose the...

...the @template field to the name of another action: class Mailer < ActionMailer::Base def foo subject "Hello World" end def bar subject "Hello Universe" @template = 'foo' end

makandra dev

This will reduce the filesize of foo and bar to 0 bytes: truncate -s0 foo bar If the files do not exist they will be created. You can use this...

The good E. g. in the following example, Array could mean either Foo::Array or simply Array: class Foo def list Array.new end end What Ruby does here...

...is to see if the name Array makes sense inside of Foo::, and if that fails, resolves it to ::Array (without a namespace). The bad This is relevant for old...

rspec.info

...would be to test if the current page has a button with the label "Foo". There are many ways to render a button with CSS: Foo We cannot express it...

...with a single have_css() matcher, since we need the { text: 'Foo' } option for some cases ( ), but not for others ( ). What we can do is chain multiple have_css() matchers...

httpie.org

...it good for local testing. Usage examples with curl equivalent: # curl post curl --data "foo=23&bar=42" https://example.org/blub # httpie post http https://example.org/blub foo=23 bar...

blog.jayfields.com

...the argv[0] value, which may show up in process listings. E.g. exec ['ls', 'foo'], 'foo.bar', 'baz.bar' options see the Ruby docs The shell used is /bin/sh on Unix-like...

stackoverflow.com

...will give you the string that appears most often in an array: names = %w[ foo foo bar bar bar baz ] names.group_by(&:to_s).values.max_by(&:size).try(:first)

...adding additional keys to the options hash: form.build_nested_records(:actors, :minimum: 4, name: 'Foo', active: true) If you want to call a different method rather than build, you can...

...Up to three arguments are passed to git show. Example output: commit 048054b1df87576f7c59cc0161cc331c44d2ea6b Author: Foo Bar <foo@bar.com> Date: Fri Apr 5 14:24:24 2019 +0200 [#165086636] My Pivotal Tracker...

bugs.ruby-lang.org

...a method with several keyword arguments and a double-splat argument (e.g. def m(foo: 'bar, option: 'will be lost', **further_options)) there is a dynamically created Symbol (e.g. 'culprit...

remember_token=abcdef123456; path=/; expires=Mon, 31-Dec-2029 23:03:29 GMT foo=23; path=/; expires=Thu, 30-Jan-2020 23:03:29 GMT bar=42; path=/; expires...

...Thu, 30-Jan-2020 23:03:30 GMT _some_session=foobarbaz; path=/; expires=Thu, 31-Dec-2020 23:03:30 GMT; HttpOnly Solution This seems to be a bug in...

...form input[type=file]'); var attachment = fileInput.files[0]; var formData = new FormData(); formData.append('email', 'foo@bar.com'); formData.append('attachment', attachment, 'filename.jpg'); You can now send your FormData via AJAX like this:

...Instead you should explicitly trigger those events via Javascript. Examples for Capybara: page.execute_script("$('#foo').focus()") page.execute_script("$('#foo').blur()") If this doesn't help, a workaround is to create...

...pass a different array than arguments, or just use call: MyOtherClass = BaseClass.extend({ initialize: function(foo, bar, baz) { // ... this.constructor.__super__.initialize.call(this, { baseInfo: bar }); } }); Old versions of Backbone.js Apparently there was...

...this pattern from the acts-as-taggable-on gem: post = Post.last p post.tag_list # ['foo', 'bar', 'baz'] post.tag_list = ['bam'] p post.tag_list # ['bam'] This string array tag_list is...

Cucumber's docstrings let you add long strings to a step like this: # foo.feature Given this text: """ First line Second line Second Paragraph """ # foo_steps.rb Given /^this text:$/ |docstring| puts docstring.split...

...the expression from the string. Simply pass them as a second argument: new RegExp('foo', 'i'); # => /foo/i [1] Note that we need to say "\\d" in our string when we...

Connect to your memcached host. (AWS elasticache is memcached) telnet foohost23.cs2631.0001.euw1.cache.amazonaws.com 11211 Once you're connected, find out which 'slabs' exist within the cache: stats items STAT items:1:number...

...the keys stored within this container using stats cachedump : stats cachedump 1 5 ITEM foo100:Class|last_id [6 b; 1342195946 s] ITEM foo106:Class|last_id [7 b...

# HTML # Coffeescript @app.directive 'panel', -> scope: evaluated: '=value' bound: '=twoway' link: -> scope.evaluated # = false scope.bound = 'foo' # Updates parent.someProperty HTML attributes bound with = (value, twoway) have their value evaluated as Angular expression...

...Multipart: false, Headers: <Date: Mon, 24 Sep 2012 13:37:00 +0200>, <From: foo@example.com>, <To: ["fail@failtrain.com", "fail@failbus.org"]>, <Message-ID: <5060543b3759_212311986a0305e8@ip-10-234-82-125.mail>>, <Subject: [you failed.] (Exception) "testfoo">, , , > Old versions of exception_notifications...

...inside the container. It will be aligned correctly if the HTML looks like this: foo Complex explanation here. So the actual fix is to add some inline elements next to...

...that hostname might give you the FQDN depending on the configuration, i.e. something like foo-host.domain.tld...

end Note that this will only compare substrings, i.e. have_css('div', :text => 'foo') will match " Hello foobear! ". If you require an exact match, you need to find the...