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
p <<PHP_VERSION <?php PHP_VERSION ;print "\033[1F\033[1M"; //.tap{ define_method :range, -> s,e { s.upto e } } //.tap{ define_method :array_map, -> f,seq { seq.map{ |x| f.(x) } } } //.tap{ define_method :function, -> x,&b { -> x { $x=x;b.call } } } array_map(function($x){ print $x % 15 == 0 ? 'FizzBuzz' : ($x % 3 == 0 ? 'Fizz' : ($x % 5 == 0 ? 'Buzz' : $x)); print "\n"; }, range(1,100)); ruby php.
2014å¹´10æ08æ¥ ããã°ã©ãã³ã°å§ãããªãRubyã¨PHPã©ã£ã¡ãåå¼·ãã¹ãï¼ Tweet 36ã³ã¡ã³ã ï½2014å¹´10æ08æ¥ 07:30ï½Webã»ãã¯ããã¸ã¼ï½Editã¿ã° ï¼ããã°ã©ãã³ã°å ¥é 1 ï¼åç¡ãããï¼ ãã¼ã·ãï¼2014/10/06(æ)23:53:15 ID:JkDxgc9Ju ï¼ï¼æ³ã®ãã°ã¡ãããªãã ãã©ãè¿·ã£ã¦ãã å½ããã°ãµã¤ãã¯ã¢ãã£ãªã¨ã¤ãåºåãããã¼åºåãå©ç¨ãã¦ãã¾ãã 2 ï¼ã¶ãããã®ããããâdSysy/OC5.fUï¼2014/10/06(æ)23:56:41 ID:tNAGnBcLy ä»ä½ãåºæ¥ãã®ãã«ããã 3 ï¼åç¡ãããï¼ ãã¼ã·ãï¼2014/10/06(æ)23:59:38 ID:JkDxgc9Ju >>2  htmlã¨cssãããä¸é±éã»ã©åå¼·ãã¦ãããªãã¨ãªãæ¦è¦ãææ¡ããã¨ããæãã 6 ï¼AwnâAwn/Awn/W615ï¼2014
ããã³ã¾ãã¯ãRuby ã«é¢ããæè¡è¨äºã¯ãã¡ããã®ãã¨ãRubyist ã¸ã®ã¤ã³ã¿ãã¥ã¼ãã¨ãã»ã¤ããã®ä»ããå±ãããã¦ã§ãéèªã§ãã Rubyist Magazine ã«ã¤ã㦠ãRubyist Magazineããç¥ãã¦ããã³ã¾ãã¯ãRubyist ã® Rubyist ã«ãããRubyist ã¨ããã§ãªã人ã®ããã®ã¦ã§ãéèªã§ãã ææ°å· Rubyist Magazine 0064 å· ããã¯ãã³ãã¼ Rubyist Magazine 0064 å· Rubyist Magazine 0063 å· Rubyist Magazine 0062 å· Kaigi on Rails ç¹éå· RubyKaigi Takeout 2020 ç¹éå· Rubyist Magazine 0061 å· Rubyist Magazine 0060 å· RubyKaigi 2019 ç´åç¹éå· Rubyist
require 'egison' include Egison match_all(object) do with(pattern) do ... end end match(object) do with(pattern) do ... end with(pattern) do ... end ... end ãã¿ã¼ã³ãããã«æåããã¨ãwithã«æ¸¡ããããããã¯ãå®è¡ããããã®çµæãè¿ããã¾ãã ãã®ã©ã¤ãã©ãªã®ãã¿ã¼ã³ãããã§ã¯ããã¿ã¼ã³ãããã®çµæãè¤æ°ããã¨ãããã¨ãããã¾ãã match_allæ§æã¯ãã®ãã¹ã¦ã®ãã¿ã¼ã³ãããã®çµæããããã«ã¤ãã¦withã«æ¸¡ããããããã¯ãå®è¡ãããã¹ã¦ã®çµæãã¾ã¨ããé åãè¿ãã¾ãã match_allæ§æã¯1ã¤ã®withç¯ãåãã¾ãã ä¸æ¹ãmatchã¯è¤æ°ã®withç¯ãåãã¾ãã å é ã®withç¯ã®ãã¿ã¼ã³ããé çªã«ãã¿ã¼ã³ãããã«æå
gimei ã¨ãããã©ã³ãã ã§æ¥æ¬äººã®ååãè¿ã gem ãä½ãã¾ããã ä¼¼ããããªã©ã¤ãã©ãªã« faker ãããã¾ããfaker ã¯äººã®ååã ãã§ã¯ãªããä½æãã¡ã¼ã«ã¢ãã¬ã¹ãã¦ã¼ã¶åãé»è©±çªå·ãªã©ãããããã®ã¸ã£ã³ã«ã®ããã¼ãã¼ã¿ãè¿ãã¦ãããããã gem ã§ããããã i18n ã«å¯¾å¿ãã¦ãããyaml ãã¡ã¤ã«ãå®ç¾©ããã°æ¥æ¬èªã使ãã¾ãã ããã faker ã§ãããããï¼ã£ã¦æãã¾ãããããããä¸ã¤ã ãåé¡ãããã¾ãã¦â¦ããµãããªã使ããªãã®ã§ãã ããã§gimeiã§ããgimeiã¯ä¸è¨ã®ãããªå½¢ã§ãµãããª(ããªã¬ã)ã«å¯¾å¿ãã¦ãã¾ãã gimei = Gimei.new gimei.kanji #=> "æè¤ é½è" gimei.hiragana #=> "ããã¨ã ã¯ããª" gimei.katakana #=> "ãµã¤ã㦠ãã«ã" gimei.last.kanji #
ã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ã¯ãã®ããè¨èªã§ããRubyã触ã£ã¦ããã¨ããã¥ã¢ã«ã«ãæ¸ãã¦ããªããå°ããªçºè¦ãã«ééãããã¨ãããããã¾ãããã®ãããªãçºè¦ãã¯ãããã°ã©ã ã®è³ªãå¹çã®æ¹åã«ã¯ç´çµããªãããããã¾ããããããããããã¼ã ããã°ã©ãã³ã°ã§ã¯å¦¨ãã«ãªãå¯è½æ§ããããã¾ããããããã®ä¸æ¹ã§ãè¨èªèªä½ãèªåã®ç¥ããªãé åãæã¡ç¶ãã¦ãããã¨ãããã®å¯¾è±¡ã«å¯¾ããèå³ã失ãããªãããã®å¤§ããªè¦å ã§ãããã¨ããã®ãã¾ãçãã®ãªãäºå®ãªã®ã§ããã¤ã¾ããçºè¦ãã¯ãã®ããã«ç´çµãã¦ããã®ã§ãã ãã®ããã°ã«ããã¦ãç¥ã£ã¦å¾ããRubyã®ããªãã¢ãªè¨æ³ãã¨ããã¿ã¤ãã«ã§ãä»ã¾ã§ï¼åè¨äºãæ¸ãã¾ããã âç¥ã£ã¦å¾ãã21ã®Rubyã®ããªãã¢ãªè¨æ³â â第ï¼å¼¾ï¼ç¥ã£ã¦å¾ãã12ã®Rubyã®ããªãã¢ãªè¨æ³â â第ï¼å¼¾ï¼ç¥ã£ã¦å¾ãã12ã®Rubyã®ããªãã¢ãªè¨æ³â ãããã®ããªãã¢ã«ã¯ããããæ¤ç´¢ã§è¦ã¤ãããã®ãTwitt
ï¼å¹´ã»ã©åã«æ¸ããè¨äºãé»åæ¸ç±åãã¦ãMâELBORNE BOOKSãã§è²©å£²ããããã«å ¨ä½çãªè¦ç´ããè¡ãªã£ã¦å ¥ç¨¿ãã段ã«ãªã£ã¦ãããã«ã¯ãã¼ã¹ã¨ãªã£ã¦ããä»è ã®è«æããã£ã¦è¨ã£ã¦ã¿ãã°ãã®è¨äºã¯ãã®ããã·ã¥ã¢ããã«ãªã£ã¦ãããã ããã©ãããã®èè ã®è¨±å¯ããªããã®è¡¨ç¾ãå ¨ãå¥ç©ã ã¨ãã¦ããã®ä¸»å¼µã®ãããããæ®ã£ã¦ããéãã«ããã¦ããã販売ãããã¨ãæããã¦ãããã¨ãªã®ãã¨ããæèã«é ãã°ããªããé¥ãããããä»®ã«æ³çã«åé¡ãªãã¨ãã¦ããªãã ãä¸è¡¨ç¾è ã®è¡çºã¨ãã¦ã®å¦¥å½æ§ãå¹¾åæ¬ ãã¦ããã¨ããçµè«ã«è³ã£ã¦è²©å£²ãæãçã¾ã£ãããã¨è¨ã£ã¦æè§æ¸ãç´ãããã®ããã®ã¾ã¾ãèµã«ããã®ããªãã ãå¯ãããªãã¨ããæ°åãä¸æ¹ã§ãããã¾ãåä½è ã®æã«åãããã®ã§ããªãã ããããããã°ã®è¨äºãªã許ãã¦ãããããããï¼å¹´åã«ãæ¸ãã¡ãã£ã¦ããã¨ããåæãªè§£éã®ä¸ãããã«ãã®è¨äºãå ¬éãã¾ããã®ã§ãæéã®è¨±ãRub
å æ¥ä»äºä¸ãä¸ç¬ã®éãè¦éããã«æ å ±åéã§ããRubyã¯ã³ã©ã¤ãã¼ã¨ã¹ã¯ãªããã¨ãããã¿ã¨ã³ããªãæ¸ããã®ã ãããã®éRubyã®ã¯ã³ã©ã¤ãã¼ãããå°ãã¾ã¨ãã«ç解ãããã¨æã£ãã®ã§å ¥éãã¦ã¿ããæå ã®Rubyã¯1.9.2 ã¯ããã« Rubyã®ã¯ã³ã©ã¤ãã¼ã¯ãrubyã³ãã³ãã«è²ã ãªãªãã·ã§ã³ï¼-eã-nãªã©ï¼ãã¤ãã¦å®è¡ãããåãªãã·ã§ã³ã®ç¶²ç¾ çãªè§£èª¬ãè¦ãããã°ãã³ãã³ãã©ã¤ã³ã§ã¯$ man rubyã§é²è¦§ã§ããããwebã§ã¯ããã¾ãµã¼ãã§åç §ã§ããããã ããããã¯ç¶²ç¾ çãããã®ã§ã以ä¸ãã使ããªãã·ã§ã³ã¨ãã®å¨è¾ºæ å ±ã«ã¤ãã¦ã¾ã¨ããã -e ä¸çªåºæ¬çãªãªãã·ã§ã³ãã¹ã¯ãªãããå®è¡ãããï¼ã¡ãªã¿ã«ä»ã®ãªãã·ã§ã³ã¨çµã¿åãããæã¯å¿ ãæå¾ã«è¨è¼ããï¼ ä¾: hogeã¨è¡¨ç¤º $ ruby -e 'puts "hoge"' -n ããã°ã©ã å ¨ä½ãwhile gets ... endã¨ããã«ã¼
Overview Overview API Support Tutorials Changelog About Nokogiri¶ Nokogiri (é¸) makes it easy and painless to work with XML and HTML from Ruby. It provides a sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is fast and standards-compliant by relying on native parsers like libxml2, libgumbo, and xerces. Guiding Principles¶ Some guiding principles Nokogiri
ä¾ãã°ã(1..5)ããã [1,2,3,4,5]ãã«ããã¡ã½ããä½ã ã£ãï¼ã£ã¦ãªã¨ãã install gem install what_methods ~/.irbrc ãã¡ã¤ã«ããªããã°ä½æãã¦ãè¨å®ãæ¸ãã require 'what_methods' terminal 使ç¨ä¾ $ irb > (1..5).what? [1,2,3,4,5] 1..5.to_a == [1, 2, 3, 4, 5] 1..5.entries == [1, 2, 3, 4, 5] 1..5.sort == [1, 2, 3, 4, 5] => [:to_a, :entries, :sort]
(追è¨ï¼2013-08-16) æ¬è¨äºã®ããªãã¢ãå«ãï¼ï¼ã®ããªãã¢ã以ä¸ã®è¨äºã«ã¾ã¨ãã¾ããã ç¥ã£ã¦å¾ããï¼ï¼ï¼ã®Rubyã®ããªãã¢ãªè¨æ³ ã¡ãã£ã¨ããªãã¢ã ãã©ãç¥ã£ã¦ããã¨æå¤ã¨ä¾¿å©ãªRubyã®è¨æ³ã21åæ¾ã£ã¦ã¿ãã(Ruby1.9éå®)ã åãªãå ¨é¨ç¥ã£ã¦ããããããªããã©.. 1. åçç¶æ¿ Rubyã®ã¯ã©ã¹ç¶æ¿ã§ã¯ < è¨å·ã®å³è¾ºã«ã¯ã©ã¹å®æ°ã ãã§ãªãã¯ã©ã¹ãè¿ãå¼ãæ¸ãããã class Male def laugh; 'Ha ha ha!' end end class Female def laugh; 'Fu fu fu..' end end class Me < [Male, Female][rand 2] end Me.superclass # => Female Me.new.laugh # => 'Fu fu fu..' def io(env=:develop
è¨èªå¥³åä¼: undefã¨nullã¯ä¸¡æ¹å¿ è¦ï¼ã®ç¶ç·¨ã§ãã varã¯å¿ è¦ãªã®ï¼ ã¨ããããã°ã©ãã³ã°è¨èªãéã女åä¼ã«ã¦: Python: JavaScriptã¡ããã£ã¦ãããªãã§varã ãããªã®ï¼ JavaScript: ãã£ãå¤ï¼ Python: varãªãããããªããªãï¼ç§ããããæã£ã¦ãªããï¼ JavaScript: ãã¼ããããå¤æ°ãã©ããã£ã¦å®£è¨ããã®ï¼ Python: 宣è¨ã£ã¦ãããâ¦ãx = 1ãã¿ãããªä»£å ¥æãããã°å¤æ°xãå¿ è¦ãªã®ã£ã¦èªæãããªãï¼å®£è¨ã¨ãå¿ è¦ï¼ Ruby: å¿ è¦ãªããããã£ã¦ãããå¤æ°å®£è¨ã¨ãå¤èããªãï¼ JavaScript: ããããªã¼ã Python: å°ãããµã¤ãããã»ãæèé¢ãã¼ã ã ãè¦ããªããã®ã¯æ¨ã¦ãªããï¼ JavaScript: è¦ããªãããªããå¤æ°å®£è¨ãPythonã¡ããã¯é¢æ°ããã¹ããã¦ããã¨ãã«å¤å´ã®ã¹ã³ã¼ãã®å¤æ°ã«ä»£å ¥ããã®ã£ã¦
ShinjukuEx第ä¸åãã£ã¦ãã¾ãããæ°å®¿ã®ãã«ãã¯ãªã³ãã¼ã©ã¼ã«ã¦é£²é ããªããã6人ãããã§ã³ã¼ãæ¸ãã¦ãã¾ãããä¼ç¤¾ã§ã³ã¼ãæ¸ãã¦ããé£ãã ããã¦åå ããæãã§ãã Elixirã¨ã¯ Erlangã®Beamã¨ããã¨ã³ã¸ã³ä¸ã§åããRubyã¿ãããªã·ã³ã¿ãã¯ã¹ãæã¤é¢æ°åè¨èªã§ããErlangã®é«å¯ç¨æ§ããã£ã¨ã«ã¸ã¥ã¢ã«ã«ä½¿ããããã¨ãã£ãéè¦ã§ã§ããããã§ããã¨ã¯ãã£ã¦ãé¢æ°åã®å¼·åãªãã¿ã¼ã³ãããã¨Rubyã£ã½ãã·ã³ã¿ãã¯ã¹ã®ããã¨ãåãã§ãããæå³ã§Scalaã¿ãããªè¨è¨ææ³ã§ãã åããã ãã è¨ãããä»ã®äººã®è¨äºèªãæ¹ãæ©ãã§ãã Rubyist ãä»ãã Elixir ã使ã£ã¦ã¿ãã¹ãçç± - m.igrs.jp elixirã¯ããã°ã©ãã®ä¸è½è¬ã«ãªãã - Fat Old Sun Rubyistããã®ãããããããåå¼·ä¼ã®ä¸»å¬ã§ããããããã¨ããããã¾ããã è«ããã³ã¼ã
Github ã«èå¼±æ§ããã£ã人㯠Rails ã«æããã¡ãªèå¼±æ§ã issue ã«æãã¦ãããç¸æã«ããããå®éã«ãããçªãã¦ãããä¸è¦ childish ã ããããã ãç°¡åã«èå¼±ãªå®è£ ããªããã¦ãã¾ãã¨ãããã¨ã ãé±æãã®ä»æ¥ãRubyist ã¯ã¾ãé¢é£æ å ±ã«ä¸èªãã â Yuki Nishijima (@yuki24) March 4, 2012 æ°ã«ãªã£ã¦èª¿ã¹ãã®ã§ã¡ã¢ãèªåãæ°ãã¤ããªãã¨ãªã¼ã Public Key Security Vulnerability and Mitigation - github.com/blog/ github ã«èå¼±æ§ããã£ã¦ãããçªããããããã Rails ã¢ããªã«ãããã¡ãªèå¼±æ§ã®ä¸ã¤ãMass assignment ã¨ãããã¿ã¤ãã®èå¼±æ§ã§ããã mass assignment èå¼±æ§ã¨ã¯ mass assignment èå¼±æ§ã¨ã¯ä½ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}