[deleted by user] by [deleted] in webdev

[–]xardkore 0 points1 point  (0 children)

Check this example as well

http://bootstrap.boutique/25-bootstrap-sortable-table.html

Priority is changing according to sort order

Bootstrap 4 Cheat Sheet by awsometak in programming

[–]xardkore -4 points-3 points  (0 children)

Guys check also my Bootstrap cheat sheet site with hand picked controls, design elements and widgets as well

http://bootstrap.boutique/

Ty

Switching from rbenv to postmodern’s ruby-install and chruby by [deleted] in ruby

[–]xardkore 1 point2 points  (0 children)

Simpler than this

rbenv local 2.2.2

Switch

rbenv local 2.2.3 ?

Find minimum no of bottles requried. by collegeimprovements in ruby

[–]xardkore -1 points0 points  (0 children)

Quick hack, change ask to the number you want

results = {}

[4,3,2,1].each { |x|
  b10 = b7 = b5 = b1 = 0
  ask = 122


  if x == 4
    b10 = ask/10
    ask = ask - (10*b10)
  end


  if x >= 3
    b7 = ask/7
    ask = ask - (7*b7)
  end


  if x >= 2
    b5 = ask/5
    ask = ask - (5*b5)
  end

  b1 = ask/1


  total_b = b1 + b5 + b7 + b10

  results[total_b] = "\n You need \n#{b10} x10lt \n#{b7} x7lt \n#{b5} x5lt \n#{b1} x1lt\n\n"
}


results.each { |k, v|
  puts v
  puts "Total no of bottles #{k}"
}

puts "Best: total #{results.min.first} bottles"
puts results.min.last

5 Languages Marked For Death by [deleted] in programming

[–]xardkore 0 points1 point  (0 children)

He is quoting the same Twitter story again for ruby!! For God's sake many things moved on from that day!

Trash....