2009-09-01ãã1ã¶æéã®è¨äºä¸è¦§
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml ã«åç §ã¯constã§ä½¿ãããã«ï¼ã£ã¦æ¸ãã¦ãã£ãï¼ çç±ã¯ãããï¼æå³ã¯ãã¤ã³ã¿ãªã®ã«ï¼æ§æã¯å¤ã ããï¼ã ã£ããããªï¼ ãããã¦ã¿ãã°ï¼ãã®ã¨ããï¼ ã§ãèªã¿ã«ãããï¼
http://www.google.co.jp/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fwww.amazon.co.jp%2F%25E7%25B5%2584%25E5%2590%2588%25E3%2581%259B%25E6%259C%2580%25E9%2581%25A9%25E5%258C%2596-%25E7%2590%2586%25E8%25AB%2596%25E3%2581%25A8%25E3%2582%â¦
Problem 257 - Project Euler ä¸è§å½¢ã®åé¡ãªãã ãï¼ãããå¿ãã¦ãã¾ãã»ã©ï¼ ä¸è§å½¢ã®åå¨ãèãï¼ä¸è§å½¢ã¨ããæ¡ä»¶ã¯éè¦ï¼ï¼ ããããåé¡ã¯åã«ããã£ããããªï¼ãªãã£ããããªï¼åãæ¢ããï¼è§£ãããï¼ çè«çãªä¿è¨¼ãç¡ãã®ã§ï¼ãããã¸ãï¼ãããã§â¦
æ¸ãã¦ã¿ãï¼ ä¸ä½ã®æ¹ã®ã½ã¼ã¹ãè¦ãã¨2åæ¢ç´¢ã§è§£ãã¦ããï¼ ã¾ãï¼ import Control.Monad import Text.Printf import Debug.Trace -- main part data Circle = C { x::Double, y::Double, r::Double} main = do (c:_) <- getList :: IO [Int] forM_ [1..câ¦
æ¸ãã¦ã¿ãï¼ Haskellã§ã¯ï¼é¢åã«ãªããã¨ãäºæ³ãããã®ã§ï¼C++ã§ï¼ å¤åï¼æ¨æºçãªè§£æ³ã ã¨æãï¼ãã ã®DP. #include <iostream> #include <cstdlib> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const int R = 50, C = 50, U = R*C+1; char</cstdlib></iostream>â¦
ãããã³ã°ã§è§£ããã®ãï¼ ãããªã®æãã¤ãã¾ããï¼è§£ããªãã¾ã¾ï¼çµãã®ã¯ã·ã£ã¯ãªã®ã§ï¼Haskellã§æ¸ãã¦ã¿ãï¼ import Control.Monad import Text.Printf import Data.Array import Data.Graph.Inductive -- main part main = do (t:_) <- getList :: IO â¦
ã³ãã³ãã©ã¤ã³ãããã¶ããã®ãï¼ ãªãã¦ï¼ãã¨ãã§ããï¼ãããªããã°ã©ã ãåå¨ããï¼ã¸ã§ã¼ã¯ã½ããï¼ï¼ï¼Ordering Pizza Via the Command Line (Video) ï¼ãããªï¼åã楽ãããï¼ããï¼åç½®ãï¼ å®ã¯ï¼Archlinuxã§ã¯ããã©ã«ãã®ç¶æ ã§ç°¡åã«ã¤ã³ã¹ãã¼â¦
2008å¹´ã®Google Code Jamãã¡ãã£ã¨ã ããã£ãï¼ 2é¨ã°ã©ãã®ãããã³ã°ã®å¿ç¨ããã£ãï¼ æ¨¡ç¯åçï¼ï¼ï¼ã®ã³ã¼ããæ³å以ä¸ã«çãã£ãï¼ãããªæãï¼ #include <iostream> #include <vector> #include <cstring> using namespace std; #define FILL(xs, x) memset(xs, x, sizeof((xs)))</cstring></vector></iostream>â¦
ã³ãã³ãã©ã¤ã³ã§ eject ããã CDãejectãããï¼ ãããã¿
ããè¦åæ§ã観å¯ã§ããã°ï¼ããã¾ãï¼ ããï¼è§£ãããåç¶ã§ããï¼ ï¼ã¨æã£ã¦ããï¼ä»ï¼èããªããã¨ï¼ãããªãå¿ è¦ååæ¡ä»¶ãæ±ããã ãã§ï¼ãããå¶ç¶ååå¿ è¦æ¡ä»¶ã§ããã£ãï¼ã©ããã¼ï¼ãããï¼ã¢ããªã³ã¼ãã£ã³ã°ããããã§ï¼æéãããã£ãï¼ ã©ãã«â¦
ç³ãã§ã¦ããã®ã§ï¼ç³å¥½ãã®æ¥æ¬äººã¨ãã¦ã¯ï¼ç´¹ä»ããªãããã«ã¯ãããªãï¼ï¼åé¡ã®é°å²æ°ãä¼ãããã¨ãç®æ¨ã«ããï¼è©³ãã㯠Problem 256 - Project Eulerã§ï¼ã©ããªåé¡ãã¨ããã¨â¦ 縦ãa,横ãbã®é·æ¹å½¢ã®é¨å±ï¼a ï¼ç»åã¯http://projecteuler.net/index.â¦
ãã£ã¦ã¿ãï¼ã¨ãããæ¸ãã¦ã¿ãï¼ é ããªã¼ import Data.List import Data.Array import Control.Monad import Text.Printf import Data.Bits main = do (n:_) <- getList :: IO [Int] forM_ [1..n] $ \i -> do (k:_) <- getList cs <- getLine printf "Casâ¦
Guest å´ã§ ifconfig ãã¦ï¼ipã¢ãã¬ã¹èª¿ã¹ã¦ï¼ ssh root@hostname ã§OKã§ããï¼ ã¨æã£ããï¼ããã¯åå±ãããããªãï¼ Guest OS ã« ssh ãinstall, è¨å® ããï¼å®ã¯ï¼ssh ããã©ã«ãã§ã¯å ¥ã£ã¦ãªãã£ãï¼ # pacman -Sy opensshããã¦ï¼åæç¶æ ã 㨠/etc/hâ¦
/var/ 以ä¸ããï¼uninstallããããã±ã¼ã¸ã®ãã£ãã·ã¥ãï¼ /var/tmp/ptexlive ãªã©ãåé¤ãããï¼ 2.5GBãããåé¤ããããã ï¼
èãæ°ã«ãªã£ã¦ï¼éä¸ã§ããªã⦠ãã¼ãï¼èåãç·é¦ã¯ãªãã®ã
haskellã§æ¸ãããé ãã£ãã®ã§ï¼C++ã§æ¸ãã¦ã¿ãï¼ ã¢ã«ã´ãªãºã ã¯ã»ã¼åãï¼ã¡ã¢åå帰ã§ã¯ãªãï¼é åã§ãã«ãã¢ããï¼å®ã¯ numeric_limits::max() 㧠intã®æ大å¤ãã¨ãã ãããããï¼ #include<iostream> #include<cmath> #include<limits> using namespace std; int main() { int</limits></cmath></iostream>â¦
ç·´ç¿ã®ãããã£ã¦ã¿ãï¼ Bã¯åé¡æãé·ãã®ã§ï¼ã¾ã èªãã§ããªãï¼ï¼ååã¨åããã³ãã¬ã¼ã使ç¨ï¼ A åbaseã«å¯¾ããhappyæ°éã,ç¡éãªã¹ãã¨ãã¦ï¼è¨ç®ãã¦ããã¦ï¼æå¾ã«intersectionãã¨ãï¼ ã¨ããï¼ä½æ¦ã ãï¼ã©ããé ãï¼ã¡ã¢ãªã沢山使ãï¼ ãã¯ãï¼â¦
ããããã ã£ãï¼1Bã ãï¼ãªãã¨ãééãã¦ããï¼ ç·´ç¿ã®ããã«ï¼1Cããã£ã¦ã¿ãï¼ æéå¶éã¨ããã¬ãã·ã£ã¼ããªãã¶ãï¼æ°æ¥½ã§ï¼ã¾ãã¾ãè¯ãæãã ã£ãï¼ãã¶ãï¼åé¡ãç°¡åã«ãªã£ã¦ããï¼ï¼ï¼ååã¨åããã³ãã¬ã¼ãã使ç¨ãã¦ãã¾ãï¼ï¼ A ãã®ã¾ã¾ï¼ãâ¦
ã¾ãï¼åååæ§ï¼äºæ³éãï¼ãã¡ãã¡ã ã£ãããã ãï¼å ±éã®ãã³ãã¬ã¼ãï¼ä¸ï¼ã使ç¨ããï¼ import Data.List import Data.Maybe import Data.Ord import Data.Char import Data.Function import Data.Map (Map) import qualified Data.Map as M import Datâ¦
Problem 255 - Project Euler解ããï¼å2åã«æ¯ã¹ãã¨ç°¡åã ã¨æãï¼ããå 容å¿ãããã¦ãããï¼ï¼ã¯ããã«Haskellã§è§£ãããï¼å®è¡æéã¯3åãããã ã£ãï¼ å帰ã使ããã¨ãããï¼stack space overflowï¼ seqå ¥ãã¦ã¿ããï¼!å ¥ãã¦ã¿ãããã¦ï¼stack spaceâ¦
2.6.31ãã§ã¦ãï¼ http://www.kernel.org/ã¤ãã§ã«, 2.6.30.6ãã§ã¦ãï¼ ããã±ã¼ã¸ã¢ãããã¼ããããï¼2.6.30.6ã«ãªã£ãï¼ ä¸å ·åããã°ä½ãæ¸ãï¼
Container classes, C++ FAQ ã«ããã¨ï¼çã®arrayããï¼vectorã使ã£ãã»ãããã¿ã¼ã ããã§ãï¼ çç±ã¨ãã¦ã¯ ããçç£å®æã«ãªã ããã¹ããªã³ã¼ãã«ãªã ä»äººãã¡ã³ããããã vetorã«ã¯at()ããã(out of bounds ãæ¤ç¥ï¼ ã¡ã¢ãªç®¡çã楽 ã¤ã³ãµã¼ãããâ¦
% find . -executable -type f -exec rm {} \;ééã£ã¦ãï¼ # find / -executable -type f -exec rm {} \;ãªãã¦ããªãããã«ï¼
éãã®ã¯ç¥ã£ã¦ããã©ï¼ã½ã¼ã¹ãèªãã ããã§ã¯ãªããï¼ å®éã©ããªã®ãï¼æ°ã«ãªã£ã¦å°ã調ã¹ããï¼ãããªã®è¦ä»ããï¼Container classes, C++ FAQã¾ã ï¼å ¨é¨èªãã§ããªããï¼
Languages used (2009) â Code Jam Statistics é¢ç½ãã§ãï¼ Brainfuckã¨ãï¼Assemblyã¨ãï¼PostScriptã¨ãã§è§£ãã¦ãã人ãããï¼ # ãããã«ï¼Whitespace ã¯ãªãã£ãï¼
locate -S -S, --statistics Write statistics about each read database to standard output instead of searching for files and exit successfully. ã¨ãããã¨ã§ï¼å®è¡ãã¦ã¿ãï¼desktop pc, Archlinux)ï¼ Database /var/lib/mlocate/mlocate.db: 37072 â¦
å£ç´ã®è¨å®ã«ã¯ Feh - ArchWiki ã使ã£ã¦ããï¼ å£ç´éã ~/pic/wallpapers/ 以ä¸ã«å ¥ã£ã¦ããã¨ãã¦ï¼ autostart.sh ã«ä»¥ä¸ã®ç¨ãªè¨è¿°ã追å ï¼ feh --bg-scale $( find ~/pic/wallpapers/ -type f -or -type l | ~/bin/random-select ) ç»åã¸ã®ã·ã³ããªãâ¦
The Haskell 98 Library Report: List Utilities ã«ããã¨ï¼ nub :: (Eq a) => [a] -> [a] nub [] = [] nub (x:xs) = x : nub (filter (\y -> not (x == y)) xs) ãªã®ã§ï¼å®ã¯nubã¯O(n^2). Eq ã ãï¼ã ããä»æ¹ãªãã®ãããããªããï¼ ãããï¼ nub :: (Ord â¦
bootchart. ãªããï¼bootchartãæ¢ããã®ãè¥å¹²æ©ãã£ããããªæ°ããããæ°ã«ããªããã¨ã«ããï¼
Window Manager ã§ååãªæ°ããã¦ããï¼ã»ã¨ãã©ã®ã¢ããªã±ã¼ã·ã§ã³ã¯æ大åãã¦ä½¿ç¨ãããï¼ãã¹ã¯ãããã«ã¯ä½ãç½®ããªã主義ï¼æè¿ã¯ãã¡ã¤ã«ããã¼ã¸ã£ã¼ããã¾ã使ããªãï¼ã·ã¹ãã ã¢ãã¿ã¯htopã ãï¼ã¢ãã¿ã®è§£å度ããã£ã¨å¤§ãããã°ï¼éãã®ããããâ¦