javascript
ææ¦è æ±ãï¼ã¯ããã¹ã»ã¯ã©ã¦ã³ååä¼ç¤¾ æ³äº æ¿å@FizzBuzzãã³ã¸ã§ã³ããï½CodeIQ çµæ§åã®è©±ã§ããâã«ææ¦ãã¾ãã JavaScriptã§FizzBuzzã®ã³ã¼ãã´ã«ã(ã§ããã ãã³ã¼ããçã)ããåé¡ã§ã 以ä¸ã®ç©ºæ¬ãåãããããª1è¡ã®å¼ãå ¥åãã¾ã [i, "fizz", â¦
ããã¹ããã¼ã¿ãããã¹ããã¡ã¤ã«ã¨ãã¦ååãä»ãã¦ä¿åãããæç¨ï¼ aè¦ç´ ã®downloadå±æ§ã使ã£ã¦ããã®ã§ãã¶ãChromeã®ã¿(ï¼)ã§ãï¼ å ·ä½çã«ã¯aè¦ç´ ãä½ã£ã¦Alt + Clickã®ã¤ãã³ããçºçããããã¨ã§ä¿åããã¦ãã¾ãï¼ ããã¹ãã¯Data URIã¹ãã¼ã ã®â¦
ç¥ãåãã®ãµã¤ã(æ¿è«¾æ¸ã¿)ã«ããããªå ¥åãæãã¦XSSãæ¢ãã¦ã¿ã¾ããï¼ ã¾ãæå§ãã«ã¦ã¼ã¶ã¼åã«scriptè¦ç´ ãå ¥ãã¦ããã¨ï¼ã¦ã¼ã¶ã¼ç»é²ç»é¢ã§ã¹ã¯ãªãããåä½ãã¾ããï¼ ä»ã®ç»é¢ã ã¨ã¿ã°ã¯å ¨ã¦ãã£ã«ã¿ããã¦ããã®ã§ï¼ãã¾ã使ããªãç»é²ç»é¢ã ãè¦â¦
Chromeæ¡å¼µãä½ã£ã¦ããã¨chrome.extension.sendRequest()ã«ããbackground pageã¨ã®éä¿¡ã®çµæãå©ç¨ãã¦åä½ããããã¨ãããããã¾ãï¼ ãããã³ã¼ã«ããã¯é¢æ°ã«ããéåæå¦çãããã¤ãããå ´åã«ã¯ï¼ä»¥ä¸ã®ããã«ãã¹ããæ·±ããªã£ããé çªãèããªãâ¦
Chrome Web Store - jquery-injector ã¯ãªãã¯ãã¦jQueryããã¼ãããå¾ã«JavaScriptã³ã³ã½ã¼ã«ã§jQueryã®é¢æ°ã使ãã¾ãï¼ ããã¯ãã¼ã¯ã¬ããã§ããããããªæ°ããã¾ããï¼æ¡å¼µã«ãªã£ã¦ããã®ã§æ´æ°ã«è¿½éãã¦ãããã®ã§ã¯ãªããã¨æå¾ ï¼ Greasemonkeyãè¶ â¦
CoffeeScriptã§ã¯è«çå¦å®æ¼ç®å"!"ã¯"not"ã§è¡¨ããããã§ããï¼ã«ãã³ãã¤ããªãã§ããããã°ã£ã¦å°ãã¾ããï¼ JavaScriptã§ãèµ·ããã®ã§CoffeeScriptã®åé¡ã§ã¯ãªãã¨ããã°ãªãã®ã§ããï¼CoffeeScriptãªãé©åã«ã«ãã³ã足ãã¦ãããã®ããªã¨æã£ããï¼ãâ¦
node.jsã§ãã¡ã¤ã«ãåé¤ãããã¨ãã¦æ¨æºã¢ã¸ã¥ã¼ã«ã®ãã¡ã¤ã«ã·ã¹ãã ã«rmé¢æ°ããªãã¦å°ãã¾ããï¼ ãã調ã¹ã¦ã¿ãã¨unlink(Sync)ãåé¤ã®ããã®é¢æ°ã¿ããã§ãï¼ ãã¤ãLinuxã§ãã¡ã¤ã«ãåé¤ããã¨ãã«ã¯rmã³ãã³ããå©ç¨ãã¦ããã®ã§ããï¼unlinkã³ãâ¦
CoffeeScriptåå¼·ä¸ã§ãï¼ JavaScriptã®ã¯ã©ã¹ã®é¢åãªé¨åãé è½ããã¦ãã¦ããããããã§ãï¼ ä»¥ä¸ã®ã³ã¼ããä¾ã«ãã¦èª¬æãã¾ãï¼ class Test constructor: (@hoge) -> #publicãªå¤æ° public: 1 #public staticãªå¤æ° @publicStatic = 2 #private staticâ¦
ãã¿ã¼ãªJavaScriptã¨ãã¦æè¿ååãèãããã«ãªã£ãCoffeeScriptã«æãåºãã¦ã¿ã¾ããï¼ ã¾ã å§ããã°ããã§ããï¼Pythonã©ã¤ã¯ãªã¤ã³ãã³ãã«ããæ§é ã¨çç¥è¨æ³ãå å®ãã¦ããã®ãããã§ããï¼ ä»¥ä¸ã®ãããªãã使ããã¼ã¯ã¼ããç°¡åã«æ¸ããããã«ãªã£â¦
Pixiv Tag Suggest Pixiv Tag Suggest - Chrome ã¦ã§ãã¹ã㢠pixivã§ããã¯ãã¼ã¯ã¿ã°ããµã¸ã§ã¹ãããGreasemonkeyã¹ã¯ãªããpixiv-tag-suggestãæ¸ãã¾ãã - å¯ç©æ¯ç @Scaled_Wurm pixivã§ããã¯ãã¼ã¯æã«ã¿ã°æ¨è¦ãè¡ãChromeæ¡å¼µãä½ã£ã¦ãã¾ãï¼ ä»â¦
Chromeã§ã¯aè¦ç´ ã«downloadå±æ§ã¨ãããã®ãæå®ãããã¨ãã§ãã¾ãï¼ ãããå©ç¨ããã¨hrefå±æ§ã§æå®ãããã¡ã¤ã«ãdownloadå±æ§ã§æå®ããååã§ä¿åãããã¨ãã§ãã¾ãï¼ <a href="http://k.yimg.jp/images/top/sp/ylogo_n.gif" download="TEST">TEST<a> ããã¯ã°ã©ã¦ã³ãã§çæããhref, downloadå±æ§ãæå®ããaè¦ç´ ã«ã¯ãªãã¯ã¤</a></a>â¦
Chromeæ¡å¼µã§ï¼ããURLã®ãã¡ã¤ã«ãå¥åã§ä¿åãããã¨ãã«ã©ããããããã®ãããããªãã¦ç¶ãã¦ã試è¡é¯èª¤ã®ä¸è²«ï¼ ä¸ã¤ã®ãã¡ã¤ã«ã«éãã°ãã©ãã°ã»ã¢ã³ãã»ãããããå©ç¨ããã¨å¯è½ï¼ ãã©ãã°ããã¦ãããè¦ç´ .addEventListener("dragstart", functioâ¦
æ£ããåä½ã®æ°ãããã®ã§ããï¼ãã¡ã¤ã«åã«æ¡å¼µåãæå®ãããï¼MIME Typeã§æå®ããªãã¨ãã¦ã³ãã¼ããã¦ãæ¡å¼µåãªãã«ãªãã¿ããã§ãï¼ a.addEventListener("dragstart", function (e) { e.dataTransfer.setData("DownloadURL", "application/octet-strâ¦
æ¡å¼µåããªãç»åãã¡ã¤ã«ã®ç¨®é¡(png, jpg, etc.)ã調ã¹ãæ¹æ³ãããããªãã£ãã®ã§ï¼XMLHttpRequestã使ã£ã¦ç¡çãã調ã¹ãè¨é²ï¼å ·ä½çã«ã¯Content-typeãããã調ã¹ãã ãã§ãï¼ ãã£ã¨ç°¡åãªããæ¹ããåãã®æ¹ããããæãã¦é ããã°å¹¸ãã§ãï¼ xhr = nâ¦
æ¡å¼µæ©è½ã«ããã¾ã§ãããï¼Chromeã¦ã§ãã¹ãã¢ã§å ¬éããã®ã大å¤ã§ãï¼ ã¨ããããã¾ã å ¬éããªãã§ãã¾ãï¼ å¿ è¦ãªãã® ã¦ã¼ã¶ã¼ã¹ã¯ãªãã ãããã§ã¹ããã¡ã¤ã«(manifest.json) ç»å ã¢ã¤ã³ã³(128x128, 48x48) ã¹ã¯ãªã¼ã³ã·ã§ãã(1280x800) Small Tileâ¦
ãªããã¦ã¼ã¶ã¼ã¹ã¯ãªããã®åå(@name)ããã¼ã¸ã§ã³(@version)ã@includeãªã©ã®æ å ±ãåæ ãããªãç¾è±¡ãçºçãã¦å°ã£ã¦ãã¾ããï¼ åå ã¯ã¡ã¢å¸³ã§ç·¨éãã¦ãã¾ã£ããã¨ã§ããï¼ ã¡ã¢å¸³ã®UTF-8ã¨ã³ã³ã¼ãã®ããã¹ããã¡ã¤ã«ã¯å é ã«BOMãä»å ããã¦ãã¦ï¼ãâ¦
TINAMIã§ä¼¼ããããªã®ãæ¸ããã®ã§ã¤ãã§ã«ï¼ åä½ç°å¢ Firefox + Greasemonkeyã¨Google Chromeã§åä½ã確èªï¼ ã¤ã³ã¹ãã¼ã« pixiv_bookmark_with_star for Greasemonkey ä¸ã®ãµã¤ãããInstallãã¯ãªãã¯ãã¦ãã ããï¼ åããªãã¨ã ã¾ãã¯ã¢ã³ã¤ã³ã¹ãã¼â¦
åä½ç°å¢ Firefox + Greasemonkeyã¨Google Chromeã§åä½ã確èªï¼ ã¤ã³ã¹ãã¼ã« tinami_add_collection_with_star for Greasemonkey ä¸ã®ãµã¤ãããInstallãã¯ãªãã¯ãã¦ãã ããï¼ åããªãã¨ã ã¾ãã¯ã¢ã³ã¤ã³ã¹ãã¼ã«ãã¦ããåã¤ã³ã¹ãã¼ã«ãã¦ã¿ãï¼ TIâ¦
以åä½æããpixivç¨ã®Greasemonkeyã¹ã¯ãªããpixiv-tag-suggestããã¼ã¸ã§ã³ã¢ããï¼ å°èª¬ã®æ¹ã§ã¯ã¹ã¯ãªãããåãã¦ããªãã£ãã®ãä¿®æ£ï¼ pixivã¯ã¤ã©ã¹ãã®æ¹ã¨å°èª¬ã®æ¹ã§å¾®å¦ã«HTMLã®æ§é ãç°ãªã£ã¦ãã®ãè¬ï¼
pixiv-tag-suggest ã¢ãããã¼ãã¤ãã§ã«userscript.orgã§å ¬éï¼ æ©è½ pixivã§ããã¯ãã¼ã¯ã¿ã°ããµã¸ã§ã¹ãããGreasemonkeyã¹ã¯ãªããpixiv-tag-suggestãæ¸ãã¾ãã - å¯ç©æ¯ç @Scaled_Wurm ä¿®æ£å 容 ã¹ã¿ãã¯ãã£ã¼ãçµç±ã§ããã¯ãã¼ã¯ããã¨ãã®ãã°â¦
Download pixiv-tag-suggest.user.js Version 1.1 pixiv-tag-suggest ææ°ç Chromeæ¡å¼µçãä½ãã¾ããï¼ãããã¯ä¿åæã®ãã©ã«ãæå®ããã¡ã¤ã«åã®ç½®ãæããªã©ã«å¯¾å¿ããäºå®ï¼ Chromeæ¡å¼µçã«ã¯å¦ç¿æ©è½ã追å ããã¦ãã¾ãï¼ ãPixiv Tag Suggestãã«å¦â¦
ã½ã¼ãããã¨ãã«å¿ è¦ã ã£ãã®ã§ï¼ function strcmp(a, b) { if ( a.key < b.key ) { return -1; } if ( a.key > b.key ) { return 1; } return 0; }
Common Subsequence 解説ãç´ æ´ã«å®è£ ï¼ function LCS(a, b) { var sizea = a.length + 1; var sizeb = b.length + 1; var table = new Array(sizea); for(var i = 0; i < sizea; i++) { table[i] = new Array(sizeb); } for(var i = 0; i < sizea; i++) { fâ¦