Write a function to determine if a word is an anagram of another.
class String
def anagram?(str)
(self.chars - str.chars) == []
end
end
"anna meme".anagram? "name name" # => true| <script type="text/javascript"> | |
| var _gaq = _gaq || []; | |
| _gaq.push(['_setAccount', 'UA-5026086-46']); | |
| _gaq.push(['_trackPageview']); | |
| (function() { | |
| var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
| ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
| var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteBase / | |
| RewriteRule ^/?$ http://theurltoredirecthere [R=301,L] | |
| </IfModule> |
| var _gaq = _gaq || []; | |
| // Site-specific GA account: | |
| _gaq.push(['_setAccount', 'UA-5026086-41']); | |
| _gaq.push(['_trackPageview']); | |
| _gaq.push(['_setAllowHash', false]); | |
| // Global GA account: | |
| _gaq.push(['unified._setAccount', 'UA-5026086-44']); | |
| _gaq.push(['unified._trackPageview']); | |
| // Enhanced link attribution: | |
| _gaq.push(['_require', 'inpage_linkid', pluginUrl]); |
| <script type="text/javascript"> | |
| var _gaq = _gaq || []; | |
| // Site-specific GA account: | |
| _gaq.push(['_setAccount', 'UA-5026086-28']); | |
| _gaq.push(['_trackPageview']); | |
| _gaq.push(['_setAllowHash', false]); | |
| // Global GA account: | |
| _gaq.push(['unified._setAccount', 'UA-5026086-44']); | |
| _gaq.push(['unified._trackPageview']); |
| <script type="text/javascript"> | |
| var _gaq = _gaq || []; | |
| // Site-specific GA account: | |
| _gaq.push(['_setAccount', 'UA-5026086-45']); | |
| _gaq.push(['_trackPageview']); | |
| _gaq.push(['_setAllowHash', false]); | |
| // Global GA account: | |
| _gaq.push(['unified._setAccount', 'UA-5026086-44']); | |
| _gaq.push(['unified._trackPageview']); |
| #!/bin/sh | |
| mkdir /tmp/ruby-build-patch | |
| cd /tmp/ruby-build-patch | |
| # download and patch the ruby sources | |
| wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz | |
| tar xzf ruby-1.9.3-p484.tar.gz | |
| cd ruby-1.9.3-p484 | |
| curl https://raw.githubusercontent.com/wayneeseguin/rvm/master/patches/ruby/1.9.3/p125/gcdata.patch | patch -p1 |
Write a function to determine if a word is an anagram of another.
class String
def anagram?(str)
(self.chars - str.chars) == []
end
end
"anna meme".anagram? "name name" # => true| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "#818181", | |
| "@gray-dark": "#C3C3C3", | |
| "@gray": "#C3C3C3", | |
| "@gray-light": "#F6F6F6", | |
| "@gray-lighter": "#FFFFFF", | |
| "@brand-primary": "#048A97", | |
| "@brand-success": "#5cb85c", |
| #Import a directory of text files as google keep notes. | |
| #Text Filename is used for the title of the note. | |
| import gkeepapi, os | |
| username = '[email protected]' | |
| password = 'your app password' | |
| keep = gkeepapi.Keep() | |
| success = keep.login(username,password) |
| /* | |
| The free Cypress tier which limits run records to 500. | |
| Once the limit is reached, it does not run the tests and exists with an error code. | |
| This makes CI tests fail, and the PR checks to fail as result. We do not want that | |
| to happen, so we are using this wrapper run script to attempt to run the tests with | |
| recordings on. If there is an error (eg the limit has been reached), we will attempt | |
| the run again, this time without recording. | |
| Source: https://github.com/cypress-io/cypress/issues/4021 | |
| */ |