Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
rescue_from ã§æ¾ããªãä¾å¤ããã Rails ãç¨æãã¦ããã¦ãã rescue_from 㯠controller ã®å¤å´ã§çºçããä¾å¤ãæ¾ã£ã¦ãããªãã ä¾ãã°ãã©ã¡ã¼ã¿ã«ä¸æ£ãªã¨ã³ã³ã¼ãã£ã³ã°ãå«ã¾ããã¨ãã«ãRails 㯠ActionController::BadRequest ãä¾å¤ã¨ãã¦æããããããããã®å¦ç㯠Rails ã® routing 層ã§è¡ããã¦ãããã rescue_from ã§ææãããã¨ã¯ã§ããªãã ãã®ãã Rails ã®å¤ã§çºçããä¾å¤ãææãã¦ããªãå ´åãã¦ã¼ã¶ã«ã¯æå³ãã¦ããªãã¨ã©ã¼ãã¼ã¸ãè¦ãã¦ããå¯è½æ§ãããã Rails ã®å¤ã§èµ·ããä¾å¤ã¯ exceptions_app ã§å¦çããã®ããæ軽 ä¾ãã° config/initializers/exceptions_app.rb ã«ä»¥ä¸ã®ã³ã¼ããæ¸ãã¦ãã(ErrorsControlle
æ§é ä½ãå®ç¾©ãã¦ãããã«å¯¾ãã¦ã¡ã½ãããå®ç¾©ãã¦ãæå¾ã«ãã®æ§é ä½ãã¢ãã±ã¼ããã¦åæåããNewãªãã¨ãã¨ããé¢æ°ãç¨æãããã¨ããã®ãä½ã®çåãæããã«è¡ã£ã¦ãããªãã¡ãã£ã¨èããã®ã ãéä¸ã¾ã§ã¯ããããNewãªãã¨ãã¿ãããªã®ã¯å¥ã«å¿ é ã§ã¯ãªãã ã¡ã½ããã¨ã¼ãå¤ Goã§ã¯æ°ããå¤ã¯ãã¼ãå¤ãã§èªåçã«åæåããããã¼ãå¤ã¯åãã¨ã«éãããæ°å¤ãªã0ãæååãªã空æååããã¤ã³ã¿ãã¤ã³ã¿ã¼ãã§ã¤ã¹ãªãnilãã¨ãã£ãå ·åã®å¤ã ãæ§é ä½ãªãããããã®ãã£ã¼ã«ããã¼ãå¤ã§åæåãããã ã¡ã½ããã¯ãã®ã¬ã·ã¼ãã¼ã®å¤ã®ã¼ãå¤ã«å¯¾ãã¦åé¡ãªãåãããã«æ¸ãã»ãããããæ§é ä½Tãå²ãå½ã¦ã¦åæåããé¢æ°ã¨ãã¦NewTã¿ãããªé¢æ°ãç¨æããã®ã¯ãæ¬å½ã«åæåãå¿ è¦ãªã¨ã以å¤ã¯ãããªãã»ããããã ãªãããã¨ããã¨ããã¤ãçç±ãããã NewTã®ä»£ããã«new(T)ã使ãããã«ããã¨ãã¨ã¯ã¹ãã¼ã
ãå®è¡ï¼$USERã¯èªåã®ã¦ã¼ã¶åã§ãï¼ã ããã¦ãã£ã¦ã¿ãã ã¾ãã¯ãXcodeã¤ã³ã¹ãã¼ã« http://developer.apple.com/xcode/ ã§ãããããã¯æ®æ®µiOS/Macã®éçºãã¦ãã®ã§ã¹ããããã¾ããã 次ãNode.jsã¤ã³ã¹ãã¼ã« http://nodejs.org ï¼ã¤ã³ã¹ãã¼ã«ã®ç¢ºèªï¼
以ä¸ã®3ã¤ã§æå®ããã¦ããURLã®ã¿ãã¹ãã§ããã * Canvas URL * Website URL * App domainã®ãµããã¡ã¤ã³ One or more of the given URLs is not allowed by the Stream post URL security app setting. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. Read more about Login Security to learn more about app settings related to security.
æ¦è¦ Vagrantã§ä»®æ³ãã·ã³ãä½ãã¾ã§ã®ä¸é£ã®ãã¡ã¤ã«ã¯ããã©ã«ãã§Cãã©ã¤ãã«æºã¾ãã ãã容éã®å°ãªãSSDï¼HDDã®æ§æã®PCãªã©ã§èããªãã«VMãå¢ããã¨ãã£ã¹ã¯ããããªããªãã ã®ã§ããã£ã¬ã¯ããªãå¤æ´ããçºã®å°ãã¿ã ããã©ã«ãã 㨠Vagrantã®ãã¡ã¤ã«ã¯ C:/Users/fktan5/.vagrant.d/ ã®ããã«ç½®ãããã 追å ããBoxã¤ã¡ã¼ã¸ãªã©ã¯ããã«ä¿åããã¦ããã VirtualBoxã®ãã¡ã¤ã«ã¯ C:/Users/fktan5/VirtualBox VMs/ ã«ç½®ãããããã·ã³ã®ãã¡ã¤ã«ã»ãã£ã¹ã¯ãã¡ã¤ã«ãªã©ãä¿åãã¦ããã æ¹æ³ Windowsã§å®æ½ã VAGRANT_HOMEãç°å¢å¤æ°ã¨ãã¦ç»é²ããã Virtualboxã®ç°å¢è¨å®ããä¸è¬âããã©ã«ãã®ä»®æ³ãã·ã³ãã©ã«ãã¼ã§ãã£ã¬ã¯ããªãå¤æ´ããã 試ãã«VMãVagrantã§ä½ãããã¡ã¤ã«ãæ
çµè«ï¼ãã¼ã ã¹ãã¼ã¹ãå¥ããã®ã§ãViewModelã¯ã¬ã³ã¬ã³åå²ã§ããã ViewModelãå®ç¾©ãã LTEã¨WiMAXã®å¥ç´ç¶æ ã表ãã¢ãã«ãä½æ class LteViewModel constructor: -> @plan = ko.observable("") @status = ko.observable("") class WimaxViewModel constructor: -> @plan = ko.obserbable("") @status = ko.obserbable("")
SSHã§ããã°Rackhubã«éããªãã®ã§ããã Rackhubã¯ã¤ã³ãã©ã«ãããã使ç¨ãã¦ããã¨ãããã¨ã§ãå½å ããã®ã¢ã¯ã»ã¹ãæ©ãã¨ãããã¨ãªã®ã§ããã¦ã³ãã§ã®å©ç¨ã«ãèãããããªï¼ã¨æå¾ ã Rackhubã§ã®ç»é²ãRackä½æä½æ¥ã¯å²æã SSHãã¼ãã¢ã®æºå ãã¢ã®çæ
åæ© git initãããREADME.mdç¨æããããã£ã¦ããããã³ãã³ãä¸çºã§ãµã¯ãã¨ãããã ãã£ã¨ç´°ããäºã»ä¸å¯§ãªäºããããããã°å¥½ããªè¨èªã§ã³ãã³ãã©ã¤ã³ãã¼ã«ä½ãã¨ãããã°ããã¨æãããã®éã®åèã«ã§ããªãã° ããã㨠以ä¸ãã·ã§ã«ã§ * README.md ãä½æãã * CHANGELOG ãä½æãã * LICENSE ãä½æãã * .gitignoreãä½æãã * git initãã * ï¼å¾ã§å¿ è¦ã«å¿ãã¦ï¼README.mdã«å種ã¹ãã¼ã¿ã¹ããã¸ã追å ãã .zshrc, .bashrc ãããã«è¨å®è¿½è¨ .zshrcã¨ã.bashrcã«ä¸è¨ãè¿½è¨ function ghreadme() { account=$1 name=$2 cat <<EOL ${name} ========== ${name} is hoge huga. ## Getting Star
git stash list stash@{0}: WIP on develop: ... stash@{1}: WIP on develop: ... stash@{2}: WIP on feature/... stash@{3}: WIP on develop: ... stash@{4}: WIP on refactor/...
Macã¨Unity Freeçã使ã£ã¦Zenrinããã®ç§èåä¸ç©ºãQueryã¡ãããOculus DK2ã§é£ã¶ãæ¹æ³MacUnityOculusJapanOtakuCity ã¯ããã« ã¿ã¤ãã«é·ãï¼è¦ããã«ãããããã¨ã§ãã å²ã¨ç°¡åã«ã§ããããã«ããã¯ãæåã¯èºãç®æãå¤ãã®ã§å ±æãã¾ãã åVersion Mac: Mac mini Late 2012, 2.3GHz Core i7, 16GB Memory OS X 10.9.4 Unity 4.5.3f3 Freeç Unity Assets Japan Otaku City: draft(Aug 27, 2014) OVRAgent_0.4.1_20140823.zip Oculus DK2 Runtime: oculus-runtime_rev_1_sdk_0.4.1_osx SDK: ovr_sdk_macos_0.4.1
以ä¸ã®ããã«ãcurrent_page?ã¡ã½ãããç¨ãããã¨ã«ãã£ã¦ã表示ä¸ã®ãã¼ã¸ã®ãã¹ãå¤å®ã§ããã ããã¯UrlHelperã¨ãã¦å®è£ ããã¦ããããããã¥ã¼ã®ä¸ããå¼ã³åºããã¨ãã§ããã # root_path ãã©ãã current_page?(root_path) # /users/:id ã current_user ãã©ãã current_page?(current_user) # ä»»æã®ã³ã³ããã¼ã©/ã¢ã¯ã·ã§ã³ãã©ãã current_page?(controller: 'foo', action: 'bar')
éçºã¢ã«ã¦ã³ãã®åçµåé¡ã«å¯¾å¿ãããã¼ã¸ã§ã³ããªãªã¼ã¹ãã¾ããã ãææ°ã§ããæ稿ç»é¢ã®ã¢ã¤ã³ã³å³ã¯ãªãã¯âåé¤ãè¡ã£ã¦ãããå度ã¢ã«ã¦ã³ãèªè¨¼ããé¡ããã¾ãã ãæ軽ã»ãæ°æ¥½ã»è½æ¸ãã¯ã©ã¤ã¢ã³ã ãã£ã¨æ¸ãã¦å³ãã¤ã¼ãã ãªãµã¤ãºããããã¡ã¤ã«ãä¿åãããã¢ãããã¼ãããã⦠ãããªæéã¯å¿ è¦ããã¾ããã
TravisCIã®ãã«ãã®æµããç¥ããï¼ Githubãã(.travis.ymlãé ç½®ããã¦ãã)ãªãã¸ããªãgit cloneãã git cloneã®éã«ããªãã·ã§ã³--depth=50ãä»ãã¦ãã¾ã cloneãããªãã¸ããªã«ç§»åãã git checkoutãã¦ã³ãããããã³ã¼ããåå¾ãã .travis.ymlã«æ¸ããç°å¢å¤æ°ã¯ããã§é©ç¨ããã ãã£ãã·ã¥ã使ãå ´åããã£ãã·ã¥ãåå¾ãã 使ç¨ããRubyã®ãã¼ã¸ã§ã³ãæå®ãã before_installã§å®ç¾©ãããã®ãå®è¡ããã ãã£ãã·ã¥ã使ãå ´åãããã§è¿½å ããã installã§å®ç¾©ãããã®ãå®è¡ããã before_scriptã§å®ç¾©ãããã®ãå®è¡ããã scriptã§å®ç¾©ãããã®ãå®è¡ããã exitã³ã¼ãã0ãªãã°æåããã以å¤ã¯å¤±æã¨å¤å®ããã after_successã¾ãã¯after_failureã§å®ç¾©ã
æ§æ ã¬ã¤ã ã¯ããã« ã«ã¹ã¿ãã¤ãº ããã±ã¼ã¸ä½æ ãã¼ãä½æ ããã±ã¼ã¸å ¬é è²¢ç® è©³ç´° ã¯ããã« ãã®ã¬ã¤ãã¯ã§ããã ãæ©ã使ããããã«ããããã®å ¥éã§ãã ã¾ãããã®ã¬ã¤ãã¯Atomã®è¨å®ã»ãã¼ãããã¦æ¡å¼µãã«ãã¼ãã¦ã¾ãã ã³ãã³ããã¬ãã Atomã§ä¸ã¤ã ãã³ãã³ããè¦ãããªãcmd-shift-Pã§ãã cmd-shift-P ãæ¼ãããç¾å¨éãã¦ããç»é¢ã«é¢é£ããå 容ãåæããã¾ãã ãã®ã³ãã³ãã¯ä»çµã¿ããã¼ãã¤ã³ãã£ã³ã°ãå¦ã¶ã«ã¯ä¸çªããæ¹æ³ã§ãã ãã£ã¨è©³ãããã¨ã¯ãã¼ãã¤ã³ãã£ã³ã°ã®ã«ã¹ã¿ãã¤ãºãåç §ãã¦ãã ããã åºæ¬æä½ ãã¡ã¤ã«æä½ Atomã®ã¦ã¤ã³ãã¦ã¯ã²ã¨ã¤ã®ãã£ã¬ã¯ããªã対象ã«ãªãã¾ãããããã³ãã³ãã©ã¤ã³ããatomã®ã³ãã³ããå®è¡ãããªããã¹ã¯æå®ããå¿ è¦ã¯ããã¾ããã Atomã¯ä»ããä½æ¥ãã£ã¬ã¯ããªã«ã¦ã¤ã³ãã¦ãéãã¾ããä½æ¥ãã£ã¬ã¯ããªã¯ãµã¤ã
è¤æ°è¡ã®ããã¹ãã表示ãããå ´åã¯ãLabel ãªãã¸ã§ã¯ããçæããsetWidth(å¹ ï¼ãã³ã¼ã«ããã¨ãããã æååã®éä¸ã§æ¹è¡ãããå ´å㯠\n ãæ¸ãã¨ãããã auto label = Label::createWithSystemFont("Hello World. \nposition the label on the center of the screen", "Arial", 24); label->setWidth(400); ã¡ãªã¿ã«ãLabelTTF ã¯ã©ã¹ã«ã¯ setWidth() ãç¡ããã
Python 㨠matploblib ã«ãããã¼ã¿å¯è¦åã«ã¤ãã¦ã¯ãã§ã« pandas + matplotlib ã«ããå¤å½©ãªãã¼ã¿ããããã£ã³ã°ã pandas ãå©ç¨ãã¦ãã¼ã¿ã»ããã®å¯è¦åãç´ æ©ã試è¡ããã matplotlib (+ pandas) ã«ãããã¼ã¿å¯è¦åã®æ¹æ³ãªã©ã§ãã¾ãã¾ãªæ¹æ³ã説æãã¦ãã¾ããã ä»åã¯ãã¼ãããããæãããã§ããããã®åã«ããããã§å¯è¦åã®æ¹æ³ã«ã¤ãã¦ãããããã¾ãããã é åããã®ãã¼ã¿å¯è¦åæ¹æ³ã®ã¾ã¨ã ããã§ã®ãã¼ã¿å¯è¦åã¨ã¯é åãããªãããã¥ã©ã¼ãªå³ç¤ºãããã¦ãã¾ããé åã¨ã¯ãè¤æ°ã®å±æ§å¤ãæã¡ã 1 ã¤ã®ãã¼ã¿ã 1 ã¤ã®è¡ã§è¡¨ããããã¼ã¿ã®å½¢å¼ã§ãã ãããããªããªã¨ã¼ã·ã§ã³ãããã¾ããã主軸ã¨ãªã代表çãªå¯è¦åæ¹æ³ãã¾ã¨ãã¾ãã æ£ã°ã©ã (bar) ãã¼ã¿ã®å¤§ããã®æ¯è¼ã«é©ããã°ã©ãã§ãã縦ã横ã«æç»ããæ¹æ³ãç©ã¿ä¸ããæ¹æ³ãè¤
Ruby Sassã¯Bootstrapã¨ãã³ã³ãã¤ã«ããã¨é ããã¦è¾ã Lessã¯éããã©ã¤ã³ãã³ãã§æ¸ããã(curly braceãæ¸ããããªã) Stylusã¯Bootstrapãå ¬å¼ã«ãµãã¼ããã¦ãªã(å人çã«ä½¿ã£ããã¨ãªã) .sassã§æ¸ãããã ç°å¢ gulp 3.8.10 gulp-sass 1.3.2 2015/1/30æ´æ°ã node-sassã®ã¢ãããã¼ãã«ä¼´ã£ã¦gulp-sassã®ãã¼ã¸ã§ã³ãä¸ããã以åã¨å¯¾çæ¹æ³ãå¤ãã£ã¦ãã¾ãã以åã®å 容ã¯æ´æ°å±¥æ´ãè¦ã¦ãã ããã æ®éã«.sassã渡ãã¨ã³ã±ã g = require 'gulp' sass = require 'gulp-sass' g.task 'default', -> g.src './style.sass' .pipe sass() .pipe g.dest './' ãã®ã¾ã¾ã ã¨ã³ã³ãã¤ã«ã§ããªãã
åæ© Ubuntu 14.04.1 LTSã«ããã¦Graphvizã§çæããPDFã®ä¸ã§SVGãæ±ãããã Pandoc+beamer+Graphvizã§AWSã®å³ãæããå®æ½ããéã«æ©ãã ç¹ã SVGãã·ã§ã¤ãã¨ãã¦ä½¿ããã¨ããã¨ãOS X Lionã§ã¯ãã¾ããã£ã¦ãããã®ããUbuntuã§ã¯æ®éã«apt-getã§ã¤ã³ã¹ãã¼ã«ãããã¼ã¸ã§ã³ã ã¨ä»¥ä¸ã®ã¨ã©ã¼ã«ãªãã ãããåé¿ãããã $ cat k.dot digraph { a [image="elb.svg"] } $ dot -Tpdf k.dot > /dev/null Warning: No loadimage plugin for "svg:cairo" ã¨ã©ã¼ã®åå Graphvizãæ±ãããã¡ã¤ã«å½¢å¼ã¯dot -P | dot -Tpdf -o list.pdfã§å¾ããã. ãã®çµæã¨ããã¾ããã£ã¦ããç°å¢(OSX Li
Fatal error: include(): Cannot redeclare class composer\command\licensescommand in phar:///usr/local/bin/composer/vendor/composer/ClassLoader.php on line 269 Stack OverFlowãã. https://github.com/composer/composer/issues/264 CLIãã¼ã¸ã§ã³ã®PHPã§APCãæå¹ã«ãããapc.enable_cliãOnã«ãªã£ã¦ããã¨èµ·ããç¾è±¡ããã. apcã®è¨å®ã確èª
⻠以ä¸ã§å®ç¾©ãããã pprint ã¢ã¸ã¥ã¼ã« ã® pprint( ) é¢æ° ãçµã¿è¾¼ãã pp() é¢æ° ãã print( ) é¢æ°ã«æ¸¡ãã¨ãæåã³ã¼ãæ°åè¨å·ã§ãªããã¡ããã¨ããæ¥æ¬èªæååãåºåããã ï¼ãåèã¦ã§ããµã¤ã ï¼ ï¼ ãªã³ã¯ ï¼ å¯ç©æ¯ç @Scaled_Wurm ï¼2011-11-12ï¼ãPythonã§æ¥æ¬èªé¢ä¿ã®ã¤ã©ã¤ã©ã ï¼ ãªã³ã¯ ï¼ Python ã«ããæ¥æ¬èªèªç¶è¨èªå¦ç import re, pprint def pp(obj): pp = pprint.PrettyPrinter(indent=4, width=160) str = pp.pformat(obj) return re.sub(r"\\u([0-9a-f]{4})", lambda x: unichr(int("0x"+x.group(1), 16)), str) pprint ã¢ã¸ã¥ã¼
趣å³ã§androidã¢ããªãéçºãããã¨æãAndroid Studioã¨ããéçºç°å¢ã以åã¤ã³ã¹ãã¼ã«ãã¾ããã ãã ã¨ãã¥ã¾ã¼ã¿ã®èµ·åãé ããã¦ããã§ã¯ããæ°ããªããªãã¨æãã°ã°ã£ãã¨ãããæè¿ã¯Genymotoinã¨ãããã®ãéãã¦ããããã ã¨æã£ãã®ã§ãã£ããã¤ã³ã¹ãã¼ã«ãã¦ã¿ã¾ããã 以ä¸ãç°å¢æ§ç¯ã®ã¡ã¢ å°å ¥ããç°å¢ Fedora 20 x86_64 VirtualBoxãã¤ã³ã¹ãã¼ã« Genymotionãã¤ã³ã¹ãã¼ã« ä¸è¨ãµã¤ãããå¿ è¦ãªãã¤ããªããã¦ã³ãã¼ãããã genymotion Android Studioã«ãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã« -Genymotion Plugin å ¥ããã Genymotionãèµ·åãã ./genymotionã¨ããã(ããã§ããããlibaudio.so.2ãã¿ã¤ãããªãã¨ãæãã®ã¨ã©ã¼ã«ãªã£ã) VirtualBoxã®è¨å® VT-x/
luaã®ã³ã«ã¼ãã³ã§ã¡ãã¥ã¼é¸æãæ¸ããå¾ãã¡ãã¥ã¼é¸æãªãã¦ããé »ç¹ã«æ¸ãæãããããããªãããã«ããããluaã§æ¸ãã¦C++ã¨é£æºãããã®é¢åããããªã¼C++ã§ã³ã«ã¼ãã³æ¸ããªãããªã¼ã¨æã£ã¦ã³ã«ã¼ãã³ã©ã¤ãã©ãªæ¢ãã¦ã¾ããã C++ã®ã³ã«ã¼ãã³å®è£ ã¯ä¸çªæåãªã®ã¯Boost:coroutineãªãã§ãããã ã§ãBoostã¯ã³ã³ãã¤ã«ãé ããªãã®ã§ãªãã¹ã使ããããªãã ããã§ãã£ã¨è»½ãã®æ¢ãã¦ã¿ãããBoost.Asioã®ã³ã«ã¼ãã³ãã¯ãã¨ããã®ãè¦ã¤ãã¾ããã ãªãã¨ããããã¡ã¤ã«ï¼ã¤ã®ã¿ãã¤ã³ã¯ã«ã¼ããã¦ããå¤é¨ãã¡ã¤ã«ãç¡ãã åã«ã½ã¼ã¹ãã©ã«ãã«æ¾ãè¾¼ãã§ã³ã³ãã¤ã«ããã°OKã ã¿ã¤ãã«ã®éããã¯ãã§å®è£ ãã¦ããããããä¸èº«ã¯ããåãããªããã©switchæã¨gotoæã§é å¼µã£ã¦ã³ã«ã¼ãã³ã®æ©è½ãåç¾ãã¦ãã¿ããã§ãã 注æç¹ã¯ããã¤ããããã©ãæä½éã®æ©è½ã¯ããããã§ãã³
ç¾å¨ãããã¼ã¸ã®ããã²ã¼ã·ã§ã³ã¡ãã¥ã¼ã®ã¿ã«.activeã¨ãcssãé©ç¨ãããã¨ãããã¤ãããæ¸ãã¦ãã ãã ãªãããã£ã¨è¯ãæ¸ãæ¹ãªãããªã¼ã¨æã£ã¦ããã®ã§ã誰ãè¯ãæ¡ããæ¹ããã°æãã¦ä¸ãã <ul class="nav"> <li class="<%= active_class_for('controller1') %>"><a href="#">Controller1</a></li> <li class="<%= active_class_for('controller2') %>"><a href="#">Controller2</a></li> <li class="<%= active_class_for('controller3') %>"><a href="#">Controller3</a></li> </ul>
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}