You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
ã¾ãã¯ã¤ã³ã¹ãã¼ã« gem install selenium-webdriver å ¬å¼ããã¥ã¡ã³ãã®ãµã³ãã«ãchromeã«æãã¦åãã㨠require "selenium-webdriver" driver = Selenium::WebDriver.for :chrome driver.navigate.to "http://google.com" element = driver.find_element(:name, 'q') element.send_keys "Hello WebDriver!" element.submit puts driver.title driver.quit ã¨ã©ã¼ã C:/Ruby200-p353/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.41.0/lib/selenium/ webdriver/c
2016.12.15 Rubyã¹ã¿ã¤ã«ã¬ã¤ããèªã: ã½ã¼ã¹ã³ã¼ãã¬ã¤ã¢ã¦ãï¼1ï¼ã¨ã³ã³ã¼ããã¯ã©ã¹å®ç¾©ãã¹ãã¼ã¹ ããã«ã¡ã¯ãhachi8833ã§ãã ä»åãããRubyã®ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã¬ã¤ãã¨ãã¦æãããã¥ã©ã¼ãªbbatsov/ruby-style-guidããã¼ã¹ã«ãã¹ã¿ã¤ã«ã¬ã¤ããèªã¿ã¤ã¤ããã®ã¹ã¿ã¤ã«ã«ãªã£ãçç±ãªã©ãèãã¦ã¿ããã¨æãã¾ãããããããé¡ããã¾ãã 注: ãã®è¨äºã¯ãããã翻訳ã§ã¯ããã¾ãããã¹ã¿ã¤ã«ã¬ã¤ãã¯ææ°ã®è±èªçããã¼ã¹ã«ãã¾ãããåã«ç¿»è¨³ããã¤ããã¯ããã¾ãããè±èªãèªãã®ãé¢åãªæ¹ã¯æ¥æ¬èªçãåç §ããããGoogle翻訳ã§ã使ã£ã¦ãã ããã Rubyã¹ã¿ã¤ã«ã¬ã¤ããèªã: ç·ããã 次å: Rubyã¹ã¿ã¤ã«ã¬ã¤ããèªã: ã½ã¼ã¹ã³ã¼ãã¬ã¤ã¢ã¦ãï¼2ï¼ã¤ã³ãã³ããè¨å· ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã¬ã¤ãã«ã¤ã㦠ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã«ã¯ãéçºè ã®ãã¾ãã¾ãª
pryå®è¡æã®Integerã®è²ãæãç´«ã§èæ¯é»ã ã¨ãã¡ããã¡ãè¦ã«ããã£ãã®ã§å¤æ´ãã¾ããã 調ã¹ãä¸ã§ç°¡åã«è¨å®ã§ããruby versionçªå·ã®è¡¨ç¤ºã®è¨å®ãè¡ã£ã¦ã¿ã¾ããã pryã®è²å¤æ´æ¹æ³ .pryrcããªããã°ãhomeãã£ã¬ã¯ããªã«ä½æãã以ä¸ã®è¨å®ãè¡ãã .pryrcã®è¨å® # è²è¨å®ã¡ã½ããã®å®ç¾© def Pry.set_color sym, color CodeRay::Encoders::Terminal::TOKEN_COLORS[sym] = color.to_s { sym => color.to_s } end # è²è¨å®ã®å¤æ´ Pry.set_color :integer, "\e[1;36m" è¨å®æ¸å¼ Pry.set_color Symbol "ESC [ è²ã³ã¼ã m" ä¸è¨ã®ä¾ã ã¨ã1;36ããè²ã³ã¼ã 使ç¨å¯è½ãªSymbolã®ä¸è¦§ã¨ããã©ã«ãè²
Sam Phippen, Myron Marston, Jon Rowe and Yuji NakayamaJul 1, 2016RSpec 3.5 ããªãªã¼ã¹ããã¾ããï¼ ç§ãã¡ã¯ semantic versioning ã«æºæ ããæ¹éãæ²ãã¦ããããã ãã®ãªãªã¼ã¹ã¯ãã§ã« RSpec 3 ã使ã£ã¦ããæ¹ã«ã¨ã£ã¦ãªã«ã対å¿ãå¿ è¦ã«ãªããã®ã§ã¯ããã¾ããã ããããããç§ãã¡ããã°ãä½ãè¾¼ãã§ãã¾ã£ã¦ããå ´åã¯æãã¦ãã ããã ã§ããã ãæ©ãä¿®æ£ããããããçããªãªã¼ã¹ãã¾ãã RSpec ã¯ä¸çä¸ã®ã³ã³ããªãã¥ã¼ã¿ã¨å ±ã«ãã³ãã¥ããã£ä¸»å°ã®ããã¸ã§ã¯ãã§ããç¶ãã¾ãã ä»åã®ãªãªã¼ã¹ã«ã¯ã50 人以ä¸ã®ã³ã³ããªãã¥ã¼ã¿ã«ãã 600 以ä¸ã®ã³ããã㨠150 以ä¸ã® pull request ãå«ã¾ãã¦ãã¾ãï¼ ãã®ãªãªã¼ã¹ã«åãã¦åã«ãªã£ã¦ãããã¿ãªããããããã¨ãï¼ ä¸»è¦ãªå¤æ´ C
Ruby ãã Windows ã®ã¯ãªãããã¼ããæä½ããæ¹æ³ãç´¹ä»ãã¾ãã ï¼æå¾ã«ãããå©ç¨ãããå§ãã®ã¹ã¯ãªãããç´¹ä»ãã¾ããï¼ æ¬¡ã®äºã¤ã®æ¹æ³ã説æãã¾ãã win32-clipboard ã使ãæ¹æ³ AutoITX ã使ãæ¹æ³ æ±ãã¯ãªãããã¼ãã®ãã¼ã¿ãASCIIã³ã¼ãã ãã®å ´åã«ã¯ãwin32-clipboard ã®æ¹ãç°¡åãªã®ã§ãå§ãã§ããããããASCII以å¤ã®æåãæ±ãããå ´åã«ã¯ãAutoITX3 ã使ãæ¹ãç¡é£ã§ããwin32-clipboard ã§ã¯ä»¥ä¸ã®æ§ãªã¨ã©ã¼ãçºçãããã¨ãããã¾ãã(win32-clipboard 0.5.2 ã«ã¦ç¢ºèªãã¾ããã) C:/Ruby192/lib/ruby/gems/1.9.1/gems/win32-clipboard-0.5.2/lib/win32/clipboard.rb:123:in `[]': invalid byt
æè¡é¨ã®å½å (@k0kubun) ã§ãã å æ¥byebugã®é«éåãè¡ã£ã¦ããæä¸ãå¤æ´ãå ããbyebugã使ã£ã¦ããã¨ä¸å®ã®ç¢ºçã§rubyãSEGVãããã°ãçºè¦ãã¾ããã ç§ã¯Cè¨èªã®ã³ã¼ãã®ãããã°ã®çµé¨ã¯ãªãã£ãã®ã§ããããããã¬ã®ä½¿ãæ¹ã調ã¹ãªããSEGVã®åå 調æ»ãè¡ãããããéã£ãã¨ããç¡äºåãè¾¼ã¾ããææ°ã®é«éãªbyebugãå®å ¨ã«ä½¿ããããã«ãªãã¾ããã ãã®éãrubyèªä½ããããã°ããããã«å¿ è¦ãªæ å ±ãåæ£ãã¦ãã¦å¤§å¤ã ã£ãã®ã§ãã¾ã rubyã®ãããã°ããããã¨ããªãããã©ãã£ã¦ã¿ããã¨ãã人ã対象ã«ãgdbã¨ãããããã¬ã使ã£ãrubyã®ãããã°ã®æ¹æ³ãç´¹ä»ãã¾ãã ãããã°ç¨ã«rubyããã«ããã ãããã°æã«å¤æ°åãã½ã¼ã¹ã³ã¼ããªã©ã®æ å ±ãè¦ãããã«ã¯ãæé©åãªãã·ã§ã³ããªãã«ãã¦ãããã°ç¨ã«rubyããã«ããã¦ããå¿ è¦ãããã¾ãã rubyã®ãããã°ç¨ãã«
Rubyã§ãã¼ã³ã¼ãã¹ãã£ã³ãRuby Barcodescannerããè¦ãã¨ï¼ç°¡åã«ãã¼ã³ã¼ããã¹ãã£ã³ã§ããããã§ãã試ãã¦ã¿ãããªã£ãã®ã§ï¼ãã£ã¦ã¿ã¾ããã zbarã®ã¤ã³ã¹ãã¼ã« http://github.com/koyachi/ruby-barcodescanner ã®READMEãè¦ãã¨ï¼ImageMagickã¨zbarãå¿ è¦ã¨ããã¾ããImageMagickã¯ã¤ã³ã¹ãã¼ã«æ¸ãªã®ã§ï¼zbarã®ã¿ã¤ã³ã¹ãã¼ã«ãã¾ããã $ wget http://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10.tar.bz2/download $ tar jxvf zbar-0.10.tar.bz2 $ cd zbar-0.10 $ ./configure --prefix=/opt/local --disable-video -
translations Documentation RSpec is a great tool in the behavior-driven development (BDD) process of writing human readable specifications that direct and validate the development of your application. On the web there are many resources that give complete overview of _what_ you can do with RSpec. But there are fewer resources devoted to how to create a great RSpec test suite. Better Specs tries to
Rubyã«ã¯ObjectSpaceã¨ããã¢ã¸ã¥ã¼ã«ããã£ã¦ãHeapå ã®ãªãã¸ã§ã¯ããè¦ãããããã¨ãã§ãã¾ãããããã°ç®çã§ä½¿ããã®ã ã¨æãã¾ãããéå»ã«ã¨ããã©ã¤ãã©ãªã®ä¸ã§ä½¿ããã¦ãã¦Rubyãsegmentation faultã§è½ã¡ãããã¦çãç®ãè¦ããã¨ãããã¾ããæããã¤ã§ãã ãã¨ãã°ObjectSpace.count_objectsã¯Heapå ã®ãªãã¸ã§ã¯ãã種é¡ãã¨ã«ã«ã¦ã³ããã¦Hashã§è¿ãã¦ããã¾ãã def diff_object GC.disable old = ObjectSpace.count_objects yield if block_given? ObjectSpace.count_objects.each do |k,v| before = old[k] || 0 diff = v - before puts "[#{k}] #{before} ->
ãRubyã®caseããä¸ç¥ãããã¼è¦ã¯ãã(è¨èªå)ã®switchãããªã©ã¨æ©åç¹ãããã®å¾ããã®çã®ä¾¡å¤ãç¥ããã¨ãªãä¸çãçµããããã°ã©ããè¿å¹´è·¡ã絶ããªããå ãã¦ããä»æ´æ¡ä»¶åå²ï¼Rubyã¯OOPãªãã ããããªã¢ãã£ãºã ãããï¼ãã¨ããHashã«Procçªã£è¾¼ãã§callããã®ããªã¬æµããã¨ãããã¶ã人ãã¡ãã¾ãå¢å ã®ä¸éã辿ã£ã¦ããã ãããªä¸ã®ä¸ã«ãã£ã¦ãã¼ãã¯ä¸è¨ãã§ããã°ã¬ãã³ã¨ä¸è¨ç³ãä¸ããããçã¾ããè²ã¡ãRubyãªã¼ããããæ¯éã¨ããããªäººãã¡ã«ãRubyã®caseãã«ã¤ãã¦ä¸è¨ç³ãä¸ãã¦ããããã â åé¡ï¼ â åånameãã¬ãã«levelããã¤ã³ãpointã®åå±æ§ãæã£ãè¤æ°ã®Characterãªãã¸ã§ã¯ãcharlie, liz, benãããã class Character < Struct.new(:name, :level, :point) def
RubyããImageMagickãå¼ã³åºãRMagickã使ã£ã¦ï¼ã»ã³ã¿ãªã³ã°ãã注éãå ¥ãããã¨ããã®ã§ããï¼ã»ã³ã¿ãªã³ã°ããã¾ãè¡ããï¼æ··ä¹±ã«é¥ã£ãã®ã§åå¿é²ã¨ãã¦ã¾ã¨ãã¦ããã¾ãï¼ ãããã¨ãããã¨ã¯ï¼æ¨ª400,縦25ã®ç»åã§ï¼(200,0)ã«æååãæãã¨ï¼ ã¨ãªãã®ã§(éãç·ã¯ä¸åº¦çãä¸ã®æï¼ï¼ ã¨ãããã¨ããäºï¼ãã¡ããï¼æãæååã«å¯è½ãªéãä¾åããããªãï¼ ã»ã³ã¿ãªã³ã°ã«ã¯ï¼ãªãã¸ã§ã¯ãã®é ç½®ãæå®ããGravityãå©ç¨ãã¦ï¼gravityãCenterGravityã«ããã°è¯ããã¨æãï¼ gc = Magick::Draw.new gc.gravity(Magick::CenterGravity) gc.text(200, 0, "centering") ã¨ãã¾ããï¼çµæ㯠ã¨ï¼å³ç«¯ã«æ¸ããã¦ãã¾ãã¾ããï¼ èª¤ã£ã¦ããç¹ã¯ï¼Gravityãï¼æåã®å ´æã ãã§ãªãï¼åº§æ¨
Summary: Ruby apps in the memory-restrictive and randomly-routed Heroku environment don't have to be slow. Achieve (3706 words/18 minutes) I've seen a lot of slow Ruby web apps. Sometimes, it feels like my entire consulting career has been a slow accumulation of downward-sloping New Relic graphs. Why is the case? If you read that bastion of intellectual thought, Hacker News, you'd think it was bec
ããã¼ãã¼ã¿ãä½ãã®ã¯æå¤ã¨é¢åã§ãã¤ãâããããâãªã©ã¨ãã¦ãã¾ã£ãããåãæåãç¹°ãè¿ãã¦ãã¾ã£ãããã¾ãããããããã§ã¯å®éã«ãããããªæåæ°ãåããã¥ããã£ãããé°å²æ°ã¨ãã¦æ¬ç©ã£ã½ããæãããã¾ããã ããã§ä½¿ãããã®ãGimeiã§ããå½åãå½ã®ä½æãªã©ãçæãã¦ãããã©ã¤ãã©ãªã§ãã Gimeiã®ä½¿ãæ¹ Gimeiã¯Rubygemã§ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã gem install gimei ä¾ãã°ç·æ§ãä½ãå ´åã¯ä»¥ä¸ã®ããã«ãã¾ãã gimei = Gimei.male gimei.male? #=> true gimei.female? #=> false gimei.kanji #=> "å°æ é¡å£«" ãã¡ããå®è¡ãã度ã«çµæã¯å¤ããã¾ãã > gimei = Gimei.male => #< gimei::name:0x007fd2cb35b4c0 @gender=:ma
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}