How to fix it Since you can't really expect outside code (read: Gems) to not use $1 (and there is plenty, believe me) when calling gsub on...

...is a rather accessible XML API for interacting with Exchange. This allows you to read and send e-mails, create appointments, invite meeting attendees, track responses, manage to-do tasks...

Sometimes, you may want to open up a second database connection, to a read slave or another database. When doing that, you must make sure you don't overwrite an...

...other ActiveRecord classes. Instead, use a class to "proxy" your connection, like this: class ReadDatabaseConnection < ActiveRecord::Base def self.abstract_class? true # So it gets its own connection end end ReadDatabaseConnection.establish...

...having 100% loss rate does not necessarily mean that there is trouble. You should read about how traceroute works to get an idea how to interpret it...

tenderlovemaking.com

There is a bit more to all that, so I suggest you read the attached article by @tenderlove. I could confirm his observations on Ruby 2.2 and 2.3, too...

...your Hash to and from JSON, and you can index JSON paths for fast reads. As an alternative, ActiveRecord::Store offers a way to store hashes in a single database...

...actually more powerful. When setting cookies this way, remember to set the path=/ option. Reading cookies A result may look like this: hello=universe; foo=bar This means that there...

It is actually just a String without any magic powers. In order to read a cookie's value, you need to parse the string: document.cookie.match(/hello=([^;]+)/)[1] // => "universe"

...your images. Here is a quick summary of them, if you need more details read the docs. You can also use all command line options from RMagick directly if these...

white for jpeg). Side note about MiniMagick and RMagick from the Carrierwave README: MiniMagick is similar to RMagick but performs all the operations using the 'mogrify' command which...

...of the file hasn’t changed. Without a % sign, the number is to be read as a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is...

This string array tag_list is magical in several ways: It is read from and written to a has_many association It can be manipulated in forms using...

...with its underlying association: class Note < ActiveRecord::Base include DoesListField[:topic_list] private def read_topic_list topics.collect(&:name) end def write_topic_list(list) topics.delete_all for name in...

...to lost or duplicate records. You should avoid them, or only use them to read records. Consider this: class User < ActiveRecord::Base end class Party < ActiveRecord::Base has_many :invitations...

...Firefox [v35.0.1] but not with Google Chrome [v40.0.2214.111 (64-bit)]. Even so I've read a lot of posts where people couldn't set cookies with any browser at all...

...the whole file to do so: # from the Gem's lib/gettext_activerecord/parser.rb: eval(open(file).read, TOPLEVEL_BINDING) This means that the script will be executed every time you run the...

...of 28cm × 21cm and landscape orientation in the advanced options of FreePDF (not Adobe Reader, can be accessed from Reader's print dialog). Note that all your colors will be...

...fix this, choose "Let printer determine colors" in the advanced print options of Adobe Reader (not FreePDF). Note that reprinting the PDF will recompress all the images that were already...

creativecouple.github.com

...anonymous functions. It's API provides you some methods that help you to write readable and understandable method chains. See yourself: Example // before $('.some').show().children().doThat(); window.setTimeout(function(){

...transformed the setTimeout callback into a chainable method. Now the code is easier to read and understand. Image you need to show another node 10 seconds after the hide animation...

makandra dev

...an event listener with delegation .on('click', selector, handlerFn) use a library like Unpoly Read an attribute .attr(name) .getAttribute(name) Write an attribute .attr(name, value) .setAttribute(name, value...

...find some utility functions for DOM manipulation and traversal in the up.element module. Further reading JavaScript without jQuery (presentation from...

...aware of is that when you use the select method, the resulting models are read only and trying to save them will raise an exception! On the other hand the...

Many mail clients do not support external style sheets. Some even require all styling inline, which means you'll have...

...the test suite return a text with the name of the file. Otherwise super. Read the browser downloads folder Inspecting the Chrome download folder to test file downloads with selenium

Sometimes, when running a rake task, RubyGems 1.8.5 raises an error: rake aborted! undefined method `specifications' for "/usr/lib/ruby/gems/1.8":String

...content_tag :div, message, class: 'greeting' end That looks clumsy and is hard to read. Wouldn't it be nicer to say something like this? def greeting render_haml <<-HAML...

api.jquery.com

...an Array) of element classes. Option B: Using a matcher function Since jQuery 1.4 (read: forever) you may pass a function that disects an element's class, and returns a...

...with(:state).any_of(['purchased', 'published']) } In the sunspot wiki you can also read further about scoping...

...line in that file contains the deployed branch, commit, release ID, and username (was read from the deploying user's machine): $ tail -n3 revisions.log Branch master (at da45511bea63002ac2ff002d1692e09d0dd7cb88) deployed as...

...when that release was deployed. If your release IDs are different, you can try reading the directory's modification timestamp: $ stat -c %y releases/0023...