Note: I'm currently taking a break from this course to focus on my studies so I can finally graduate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution: | |
def titleToNumber(self, s: str) -> int: | |
out = 0 | |
for i, ch in enumerate(s): | |
v = ord(ch) - 64 | |
place = len(s) - i - 1 | |
out += (v * 26**place) | |
return out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect to a server | |
redis-cli server | |
# Make an insert | |
set key value | |
# Make multiple insert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GEM | |
remote: https://rubygems.org/ | |
specs: | |
actionmailer (4.2.2) | |
actionpack (= 4.2.2) | |
actionview (= 4.2.2) | |
activejob (= 4.2.2) | |
mail (~> 2.5, >= 2.5.4) | |
rails-dom-testing (~> 1.0, >= 1.0.5) | |
actionpack (4.2.2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zebralight1@sample_app:~/workspace (master) $ bundle exec rake test | |
/usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- guard (LoadError) | |
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require' | |
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency' | |
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require' | |
from /usr/local/rvm/gems/ruby-2.2.1/gems/guard-minitest-2.4.4/lib/minitest/guard_minitest_plugin.rb:4:in `<top (required)>' | |
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require' | |
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require' | |
from /usr/local/rvm/gems/ruby-2.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface ViewController : UIViewController | |
@property (weak, nonatomic) IBOutlet UIWebView *myWebView; | |
- (IBAction)refreshButton:(UIButton *)sender; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for(@business) do |f| %> | |
<% if @business.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@business.errors.count, "error") %> prohibited this business from being saved:</h2> | |
<ul> | |
<% @business.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveRecord::RecordNotFound in CommentsController#destroy | |
Couldn't find Comment with 'id'=6 [WHERE "comments"."article_id" = ?] | |
Extracted source (around line #35): | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 |
NewerOlder