Skip to content

Instantly share code, notes, and snippets.

± bundle update wechat
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://gems.ruby-china.com/..............
Fetching gem metadata from https://gems.ruby-china.com/..
Resolving dependencies....
Using rake 13.0.6
Using concurrent-ruby 1.1.10
Using i18n 1.10.0
Using minitest 5.15.0
Using thread_safe 0.3.6
class Solution:
def minMutation(self, start: str, end: str, bank: List[str]) -> int:
result = 0
if end in bank:
for i in range(len(start)):
if start[i] != end[i]:
result += 1
return -1 if result == 0 else result
class Solution:
def subsets(self, nums: List[int]) -> List[List[int]]:
res = []
self.dfs(res, nums)
return res
def dfs(self, res, nums, list = [], index = 0):
if index == len(nums):
{
"fieldsList": {
"flatHierarchyBox": "选择和安排列",
"hierarchyBox": "选择数据",
"filterBox": "报表筛选器",
"rowBox": "行",
"columnBox": "列",
"measureBox": "值",
"values": "数值",
"addCalculatedMeasure": "添加计算措施",
{
"fieldsList": {
"flatHierarchyBox": "选择和安排列",
"hierarchyBox": "选择数据",
"filterBox": "报表筛选器",
"rowBox": "行",
"columnBox": "列",
"measureBox": "值",
"values": "数值",
"addCalculatedMeasure": "添加计算措施",
require 'pry'
class Booker
def process
customer = Customer.new
result = Packages.new(customer).cheapest
output(result)
end
private
$ bin/rspec spec/models/user_spec.rb:11
Running via Spring preloader in process 2911
Run options: include {:locations=>{"./spec/models/user_spec.rb"=>[11]}}
User
From: /Users/wangxuefei/Documents/rails/yelp_clone/lib/sluggable.rb @ line 10 Sluggable#to_slug:
9: def to_slug
=> 10: binding.pry
$ bin/rspec spec/models/user_spec.rb:11
Running via Spring preloader in process 2346
Run options: include {:locations=>{"./spec/models/user_spec.rb"=>[11]}}
User
From: /Users/wangxuefei/Documents/rails/yelp_clone/lib/sluggable.rb @ line 10 Sluggable#to_slug:
9: def to_slug
=> 10: binding.pry
$ git push heroku master
Counting objects: 410, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (385/385), done.
Writing objects: 100% (410/410), 299.04 KiB | 0 bytes/s, done.
Total 410 (delta 234), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
$ git push heroku master
Counting objects: 388, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (363/363), done.
Writing objects: 100% (388/388), 44.09 KiB | 0 bytes/s, done.
Total 388 (delta 222), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected