...one to correct yourself. Instead, simply press the up key (↑). The message area will become yellow and contain your previously sent message. Make any changes and submit again.\

github.com

Then the "sorted" select should be sorted But the "unsorted" select should not be sorted

around do |example| superuser_power = Power.new(create(:user, :superuser)) Power.with_power(superuser_power) do # before-block will be run here, DB snapshot will be created example.run # after-block will...

...E.g. although an "address book contact" and a "user" are both human beings, it's rarely practical to have them share a model or inheritance hierarchy. Try to model everything...

...CRUD for stands Everything related to viewing and editing weekly reports Read Project management best practices: Issues on how we write user stories. Note that in practice we would do...

You cannot use Array#join on an array of strings where some strings are html_safe and others are not...

Why secure-only cookies used to be necessary Cookies have an optional secure flag. It tells the browser to not...

ActiveSupport >= 3 has Date.parse('2011-02-10').beginning_of_quarter #=> 2011-01-01 Date.parse('2011-02-10').end_of_quarter #=> 2011-03-31 You can manually calculate the quarter index...

I have no idea how it's supposed to work (or why the don't have a print CSS), but...

Add a separator between left-aligned and right-aligned items. In the separator properties, set the style to "Transparent" and...

github.com

You can hook into Slack when using Capistrano for deployment. The slackistrano gem does most of the heavy lifting for...

When deleting a record in your Rails app, Carrierwave automatically takes care of removing all associated files. However, the file...

To test if you can connect to a host using password authentication and explicitly deny public key authentication:

docs.aws.amazon.com

...of your workload, a fixed-CPU instance from the M or C series offers better performance for a lower price. General T instances have a Baseline utilization per vCPU.

...Every burstable instance has a CPU utilization break-even when a fixed-CPU instance becomes cheaper. The fixed CPU instances are not only cheaper at that point, they also offer...

On your credit card summary, you will find order numbers of rides with Deutsche Bahn ("DB BAHN A-NR XYZ123...

Don't use be_true to check if a value is true. It actually checks if it anything other than...

Sometimes you want Angular to watch an object only until a certain state is reached (e.g. an object appears in...

If you want to sort a Ruby array with a primary, secondary, etc. criterium, use a sort_by that contains...

makandra Curriculum

...addresses = AddressBook.new addresses.add Contact.new(first_name: 'Frederik', last_name: 'Foo') addresses.add Contact.new(first_name: 'Berta', last_name: 'Beispiel', phone: '556677') addresses.add Contact.new(first_name: 'Anna', last_name: 'Muster', street: 'Foo...

...returns contacts that match all of the words in any property: results = addresses.search('77 berta') results.size # => 1 results[0].first_name # => "Berta" Errors Change the AddressBook class so the #add...

...the inert field. It might might as well be removed from the page. This behavior is OK if the fields might as well be hidden, and you're just looking...

...built into RSpec. Play with some of these matchers in your MovieDB tests. The benefits of using better matchers Which of the following two lines is better? Why?

...is often to prefer isolated tests where possible, but share test setup when it becomes excessively complicated or expensive. If we share setup, it is best to do within a...

...for Structs are temporary data structures which just hold state and don't provide behaviour. In many cases you could use a simple hash as a data structure instead. However...

...are incredibly fast. If you have to handle lots of data it may be better to use hashes for performance reasons, even if the readability of the code suffers compared...

You want to use fields in your applications. However, your desktop users may encounter some weird quirks: Aside from allowing...

This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...

...addition of both margins takes place but the maximum of both is applied. This behavior is called collapsing margins. Oftentimes it is a good behavior but collapsing margins can be...

...the previous sibling of the parent box. Nevertheless there are some exceptions where the behavior of vertical collapsing margins is not used. Exceptions when margins do not collapse