...like >= or ~>. That way it is possible to fetch the latest version of Bundler 1 with this command: gem install bundler -v '~>1' How to install bundler for Ruby...
...is a common usecase where you might need Bundler 1...
You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to...
When you have an element you want to hide, you can add a ng-show='isOpen' attribute to that element...
If your Angular app has some decent complexity, it will not be easy to use UI Router straight away. Here...
In addition to the {{ myValue }} two-way binding syntax, since Angular 1.3 there's a one-time binding syntax, prefixing the value or expression with ::, e.g. {{ ::myValue }}, {{ ::myValue >= 42 }} and...
Flexbox is awesome. Most of it even works in IE11, but flex: 1 won't work reliably in Internet Explorer. This it because implicitly sets flex-basis: 0 which IE...
...following HTML and CSS. foo bar .container { display: flex; flex-direction: column; } .child { flex: 1; } See it in action at Plunker. Background flex: 1 is a shortcut to flex-grow...
Use the compile function to change the original DOM (template element) before AngularJS creates an instance of it and before...
The attached RSpec matcher allows for comfortably testing delegation. Examples describe Post do it { should delegate(:name).to(:author).with...
...an eye on watchers count while developing. Use as a bookmarklet. Works with Angular 1.x Logs to the browser's console...
We will use this for new Angular code. Consider the guide in "beta". Things will still refine, but the general...
A global h2 style probably isn’t going to last more than a month before everyone starts changing it inline...
...than it should, this expression requires 4 attempts to match the string: Attempt Group $1 Group $2 Expression result 1 "aaabbb" not matched not matched 2 "aaabb" not matched
...bbb)/ only requires a single attempt to match "aaabbb": "aaabbb" =~ /^(a+)(bbb)/ Attempt Group $1 Group $2 Expression result 1 "aaa" "bbb" matched! Because greedy quantifiers start backtracking when an...
...~focal] [Ubuntu: 2.0.29-0ubuntu1 2.0.13-2ubuntu0.5 2.0.13-2] libreadline7 (7.0-3) libsodium23 (1.0.18-1+ubuntu18.04.1+deb.sury.org+1) [Ubuntu: 1.0.18-1] libssl1.1 (1.1.1j-1+ubuntu18.04.1+deb.sury.org+3) [Ubuntu...
...1.1.1f-1ubuntu2.16 1.1.1f-1ubuntu2.16 1.1.1f-1ubuntu2] openssl (1.1.1j-1+ubuntu18.04.1+deb.sury.org+3) [Ubuntu: 1.1.1f-1ubuntu2.16 1.1.1f-1ubuntu2.16 1.1.1f-1ubuntu2...
mysql1 50 UP L70K 1 0 0 0 0 0 0 0 mysql2 50 UP L70K 0 1 0 0 0 0 0 0 BACKEND 50 UP
0 0 0 0 8 0 mysql1 is preferred to use as mysql2 is configured as backup. So all connections will be sent to mysql1. We want to do...
@email = email @newsletter = newsletter end end User.new( 'Mr.', 'John', 'Doe', 'Potsdamer Platz 1', '10117', 'Berlin', '+49 0151 1122334455', 'john.doe@example.com', true ) Using keyword arguments Using keyword arguments is easier...
salutation: 'Mr.', first_name: 'John', last_name: 'Doe', street_and_number: 'Potsdamer Platz 1', zip_code: '10117', city: 'Berlin', phone_number: '+49 0151 1122334455', email: 'john.doe@example.com', newsletter: true )
...foo@example.com'; +----+-------------+-------+-------+----------------------+----------------------+---------+-------+------+-------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+-------+----------------------+----------------------+---------+-------+------+-------+ | 1 | SIMPLE | users | const | index_users_on_email | index_users_on_email | 768 | const | 1 | | +----+-------------+-------+-------+----------------------+----------------------+---------+-------+------+-------+
...data types. Like integers for string fields: mysql> EXPLAIN SELECT * FROM users WHERE email = 12345; +----+-------------+-------+------+----------------------+------+---------+------+--------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+----------------------+------+---------+------+--------+-------------+
...opening a form, JavaScript makes a request to acquire a lock for that record (1). After 20 seconds the JavaScript starts polling the server (2), to check if another user...
When the PC was low on resources (parallel_tests), acquiring the lock (1) took so long that the client starts polling for updates (2) before the initial lock...
...options = Selenium::WebDriver::Chrome::Options.new options.add_argument('--disable-infobars') options.add_emulation(device_metrics: { width: 1280, height: 960, touch: false }) unless ENV.key?('NO_HEADLESS') options.add_argument('--headless') options.add_argument('--disable-gpu...
...app, browser: :chrome, options: options) end Selenium::WebDriver.logger.level = :error Headless Chrome in legacy Capybara 1 projects If you're working on a legacy project with Capybara version 1.x, the...
...You might think that the following queries yield the same result: User.where(movie_ids: [16, 17]) User.where(movie_ids: [17, 16]) Turn's out - they are not! They do care...
...the where_array_matches method below. Note that it does not care about duplicates - [1, 2, 2] is handled identically to [1, 2]: # lib/ext/active_record/relation.rb class ActiveRecord::Relation def where_array...
...can globally disable animations like this: up.motion.config.enabled = false Disabling animations in AngularJS In AngularJS 1.x you can globally disable animations like this: angular.module('myApp', []).run(['$animate', function($animate) { $animate.enabled...
...AJAX, I've found it helpful to limit the number of concurrent requests to 1. This will implicit serialize UI interactions that make an AJAX request. You can configure Unpoly...
...be using this example tree (from the acts_as_nested_set docs): root | +-- Child 1 | | | +-- Child 1.1 | | | +-- Child 1.2 | +-- Child 2 | +-- Child 2.1 | +-- Child 2.2 Option 1: Parent Association
This would serialize the example above to this table: id | parent_id | data ---+-----------+---------- 1 | NULL | root 2 | 1 | Child 1 3 | 2 | Child 1.1 4 | 2 | Child 1.2...
echo "> Deleting remote branch ..." git push origin --delete $merged_branch_name exit 1 else echo "x Did not delete the \"$merged_branch_name\" branch." fi
...the branch deleted: $ git merge ds/foo Updating 338e82e38..2d4269c81 Fast-forward foo | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 foo > You have just merged the...
...the copied invoice and the creation of its items. This list of changes (e.g. 12 INSERT statements) will be committed in a single atomic operation, or not at all. This...
...order, you might get a deadlock. For instance, transaction A wants to change row #1 and row #2. Transaction B wants to change the same rows, but in different order...