ๆดๆฐ: | 2024-01-20 |
---|---|
ไฝ่ : | @voluntas |
ใใผใธใงใณ: | 2024.1 |
URL: | https://voluntas.github.io/ |
ๆฆ่ฆ
func setUpMenuButton(){ | |
let menuBtn = UIButton(type: .custom) | |
menuBtn.frame = CGRect(x: 0.0, y: 0.0, width: 20, height: 20) | |
menuBtn.setImage(UIImage(named:"menuIcon"), for: .normal) | |
menuBtn.addTarget(self, action: #selector(vc.onMenuButtonPressed(_:)), for: UIControlEvents.touchUpInside) | |
let menuBarItem = UIBarButtonItem(customView: menuBtn) | |
let currWidth = menuBarItem.customView?.widthAnchor.constraint(equalToConstant: 24) | |
currWidth?.isActive = true | |
let currHeight = menuBarItem.customView?.heightAnchor.constraint(equalToConstant: 24) |
<div id=root /> | |
<script type=module> | |
import React from 'https://dev.jspm.io/react@16' | |
import ReactDOM from 'https://dev.jspm.io/react-dom@16' | |
ReactDOM.render( | |
React.createElement('h1', null, 'hello'), | |
document.querySelector('#root') | |
) | |
</script> |
class Object | |
def defer(method, *args) | |
@current_fibers ||= [] | |
@tracepoint ||= TracePoint.trace(:return) do |tp| | |
@current_fibers.reverse_each do |fib| | |
fib.resume | |
end | |
end | |
@current_fibers << Fiber.new do |
ๆดๆฐ: | 2024-01-20 |
---|---|
ไฝ่ : | @voluntas |
ใใผใธใงใณ: | 2024.1 |
URL: | https://voluntas.github.io/ |
ๆฆ่ฆ
# solver.rb ใฎ Range ใ Array ใซ็ฝฎใๆใใฆๆฉใใใ็ | |
# ๅฎ่กใใๆใฏใใกใคใซๅใ solver.rb ใซใใฆใใ ใใ | |
module Solver | |
def parse_triangle(src) | |
/(\d+),(\d+)(\w)(\d+)/.match(src) {|m| | |
x = m[1].to_i | |
y = m[2].to_i | |
direction = m[3] | |
height = m[4].to_i |
9/18 14:40-15:20
9/18 15:50-16:30
9/19 10:50-11:30
๐ Jun 22-23, 2017
๐ Web site: http://reddotrubyconf.com/ Twitter: http://twitter.com/reddotrubyconf
๐ Ping me @cheeaun on Twitter or leave a comment below if you found some awesome stuff for #rdrc2017. This gist will be updated whenever there's new stuff.
๐ Previously, on RedDotRubyConf...
class BinaryTree | |
attr_reader :root | |
def initialize(root) | |
@root = root | |
end | |
def print_inorder_with_recursion(current) | |
return if current.nil? |
ๆดๆฐ: | 2017-04-03 |
---|---|
ไฝ่ : | @voluntas |
ใใผใธใงใณ: | 1.0.6 |
URL: | https://voluntas.github.io/ |
2017 ๅนด 4 ๆ 1 ๆฅใซ่กใใใ Elixir Conf Japan 2017 ใฎ็บ่กจ่ ็จใฎใกใขใงใใ
// Swift4 | |
let image = UIImage(named: "sample") | |
let data = image?.pngData() | |
let data = image?.jpegData(compressionQuality: 0.9) | |
let uiImage: UIImage = UIImage(data: imageData) | |
// deprecated | |
// var imageData: Data = UIImagePNGRepresentation(image) |