2010-06-01ãã1ã¶æéã®è¨äºä¸è¦§
æ®éã«Mac OSXã®ã¢ãããã¼ããã¤ã³ã¹ãã¼ã«ãã¦ããã°1.6ãå ¥ã£ã¦ããããpathãéã£ã¦ããªãã¦1.5ã使ããã¦ã /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home ã«ãã .profile ãç·¨é export JAVA_HOME=/System/Library/Frameworks/Javaâ¦
æ°ç¾æã®VGAç¨åº¦ã®è§£å度ã®ç»åã«ããããæ°åã®ã¢ã«ãã¡ãã£ã³ãã«ããç»åãcompositeãã¦æ¸ãåºãå¦çãªããRMagickããjavax.imageioãJRubyãã使ãã®ãããããããªãã® javax.imageioãJAIã¨ãã«Javaã§æ¸ãã¦ãJRubyãã使ã£ã¦ãé度差ã¯ç¡ãã£ãï¼ã¨â¦
sudo apt-get install sun-java6-jdk sun-java6-bin aptã®jrubyãå¤ãã®ã§ãã¤ããªãæã£ã¦ãã wget http://jruby.org.s3.amazonaws.com/downloads/1.5.1/jruby-bin-1.5.1.tar.gz tar -zxvf jruby-bin-1.5.1.tar.gz mv jruby-1.5.1 ~/lib/jruby .zshrc pathâ¦
http://d.hatena.ne.jp/shokai/20100629/1277804347 ã®ç¶ã åã®ã³ã¼ãã§ã¯javaã®BufferdImageãRubyã®ãªãã¸ã§ã¯ãã«æ¯åå¤æããã¦ããæ°ãããã®ã§ inté åã§width,heightã ããè¿ãJava classãä½ã£ã¦JRubyã®ã¹ã¯ãªããããå¼ã¶äºã«ããã Javaã§é åã§â¦
ç»åèªã¿è¾¼ãã§width, heightãåºå対決 ç»å46æã§JRuby+javax.imageio #!/usr/bin/env jruby # -*- coding: utf-8 -*- require 'java' import 'java.lang.System' import 'javax.imageio.ImageIO' import 'java.awt.image.BufferedImage' start = Time.nowâ¦
javax.imageioã§ä½¿ããç»åãã©ã¼ããã - æ©æ¬è©³è§£ãJRubyã§æ¸ãã¦ã¿ã test.rb #!/usr/bin/env jruby # -*- coding: utf-8 -*- puts 'jruby start' require 'java' import 'java.lang.System' import 'javax.imageio.ImageIO' System.out.println("javaã®pâ¦
ã¤ã³ã¹ãã¼ã« http://jruby.org/download ããææ°releaseãåã£ã¦ãã¼ã ãã£ã¬ã¯ããªã«ç½®ã wget http://jruby.org.s3.amazonaws.com/downloads/1.5.1/jruby-bin-1.5.1.tar.gz tar -zxvf jruby-bin-1.5.1.tar.gz mv jruby-1.5.1 ~/lib/jruby ~/lib/jruby/biâ¦
http://d.hatena.ne.jp/shokai/20100629/1277804347 ã¨åãæ¡ä»¶ã§image_size.rb #!/usr/bin/env jruby # -*- coding: utf-8 -*- require 'java' import 'javax.media.jai.Interpolation' import 'javax.media.jai.JAI' import 'javax.media.jai.RenderedOp' â¦
JAI http://java.sun.com/javase/technologies/desktop/media/jai/ https://jai.dev.java.net/binary-builds.html ãããã¤ããªãåå¾ wget http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib.zip unzip jai-1_1_3-lib.zip mv jai-1_1â¦
ImageFormatNames.java import javax.imageio.ImageIO; class ImageFormatNames { public static void main(String[] args){ System.out.println("--read formats--"); for(String name : ImageIO.getReaderFormatNames()){ System.out.println(name); } Sysâ¦
portsã®ImageMagick 6.5.2-4_1+q16 + gemã®rmagick 2.9.2ã«ãããImageMagick 6.6.1-5_0+q16ã«ããã¨ãtiff(libtiff)ãjpeg(libjpeg)ã®ä¾åãOpenCV1.0.0ã¨åããªããªã£ã¦åããªããportsã®rmagick 2.9.0ã ã¨ImageMagick6.5.2-4_1+q16ã¨ä¸ç·ã«åããªãã®ã§deâ¦
#!/usr/bin/env ruby def test(a, b) puts '--test--' puts a if b.class == Hash for k in b.keys do puts "#{k} : #{b[k]}" end else puts b end end test("a", :one => 1, :two => 2) test("A", "B") --test-- a one : 1 two : 2 --test-- A B
rubygemsã«rackspace-cloudfilesã¨ããgemããããver 1.4.0ã§å¤ã githubããææ°ç(1.4.7)ãè½ã¨ãã¦ãã¦gemã«ãã¦ã¤ã³ã¹ãã¼ã«ãã git clone http://github.com/rackspace/ruby-cloudfiles.git cd ruby-cloudfiles gem build cloudfiles.gemspec sudo geâ¦
åè http://snipt.net/Martin/android-intent-usage/ å®å ã件åãæ¬æãæå®ãã¦ã¡ã¼ã©èµ·åã mailto:ã®ãªã³ã¯ãéãã¨ã¡ã¼ã©ãèµ·åãã public void openMail(String title, String body, String to){ Uri uri=Uri.parse("mailto:"+to); Intent i=new Intâ¦
Activityã®onPause, onResumeã§åãã @Override public void onPause(){ super.onPause(); Log.v("test", "onPause"); } @Override public void onResume(){ super.onResume(); Log.v("test", "onResume"); } é»æºãã¿ã³ãæ¼ãã¦ç»é¢ãåã£ãæ ãã¼ã ãã¿â¦
githubã«README.rdocã§ã¢ãããã¼ãããæã®ãã¼ã¯ã¢ããããã¬ãã¥ã¼ãã http://github.com/github/markup ãã¤ã³ã¹ãã¼ã«ããã¨ãã sudo gem install github-markup which github-markupgithub-markup README.rdoc > README.html open README.htmlãªããâ¦
githubã§ä½¿ã.mdå½¢å¼ããã¼ã«ã«ã§ãã¬ãã¥ã¼ããhttp://daringfireball.net/projects/markdown/ wget http://daringfireball.net/projects/downloads/Markdown_1.0.1.zip unzip Markdown_1.0.1.zip sudo cp Markdown_1.0.1/Markdown.pl /usr/local/sbin/markâ¦
å®è¡ãã㨠"libhighgui.1.dylib requires version 63.0.0 or later, but libjpeg.62.dylib provides version 9.0.0" portsã®ã¢ãããã¼ãã§libjpegã®ãã¼ã¸ã§ã³ãåããªããªã£ãããã http://d.hatena.ne.jp/yatt/20100126/1264510741 sudo port deactivatâ¦
Ubuntu 10.04 64bitã§ãsshã§ãã°ã¤ã³ãã¦ã¦æ¥æ¬èªè¡¨ç¤ºã§ããªãã£ã sudo apt-get install language-pack-ja sudo dpkg-reconfigure locales/etc/default/locale ãç¡ãã£ãã®ã§ä½æ LANG="ja_JP.UTF-8" ããã§screenãã¨ãã°ã¢ã¦ããã¦sshã§å ¥ãç´ãããæ¥â¦
GPSãã°ãHTC Desireä¸ã§GoogleMapsã«æç»ããã¢ããªãä½ã£ã¦ããã http://shokai.org/blog/archives/5180 ç·ã10000æ¬ã¨ã表示ãããã¹ã¯ãã¼ã«ãã¬ã¯ã¬ã¯ã«ãªã£ãã1000æ¬ãããã§ããããã®ãªã®ãªèããããç¨åº¦ã®éãã«ãªãã ç»é¢å ã«ç·ãå ¨ããªãã¦ãâ¦
sudo apt-get install apache2-prefork-dev sudo gem install passenger sudo passenger-install-apache2-module passengerã®ãã¼ã¸ã§ã³ã¯2.2.13ã ã£ã /etc/apache2/httpd.conf LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.13/â¦
å «è§ç 究æ : Android ã§åéãã Java ããã°ã©ãã³ã°ï¼14ï¼ - ãã¤ã¢ãã°ãå¶ãããã®ãAndroidãå¶ããï¼Javaã¯ã¾ã æ £ããªããªã ãªã¹ããã¤ã¢ãã°ããã¯ã¯ãªãã¯ãããã¿ã³ã®indexãåãããããã§ãã¡ã¤ã«é¸æç»é¢ãä½ããã ã©ãããã¹ã³ã¼ãã®é¢ä¿ã§â¦
http://d.hatena.ne.jp/shokai/20100601/1275418503 ã§ã¯androidã®Context.openFileInput, Context.openFileOutputã使ã£ããSDã«ã¼ããèªã¿æ¸ãããã«ã¯java.io.Fileã¨FileInputStream, FileOutputStreamã使ããªããã°ãªããªããããã ã¨ããããAndroid2â¦
ãã®è¾ºã®ãµã³ãã«ã§ã¯ããã¤ã¢ãã°ãã¯ãªãã¯ããã¦ãä½çªç®ãã¯ãªãã¯ãããããåå¾ãã¦ãããã©ãã¹ã³ã¼ãã®é¢ä¿ã§ãã¡ã¤ã«ãéãã¦Viewã«è¡¨ç¤ºããé¢æ°ãå¼ã¶ã¨ãã¯ã§ããªãã å «è§ç 究æ : Android ã§åéãã Java ããã°ã©ãã³ã°ï¼14ï¼ - ãã¤ã¢ãã°ãâ¦
延ã WPA2ã®ãã¹ã¯ã¼ãå ¥åç»é¢ã§ã«ã¼ããã¦æ¥ç¶ã§ããªãã iPodTouchå´ã® [è¨å®]â[ä¸è¬]â[ãªã»ãã]â[ãããã¯ã¼ã¯è¨å®ã®ãªã»ãã] ã§ãªã»ãã ã¾ãå ã«CMR250ã®WiFiã«æ¥ç¶ãWPA2ã®ãã¹ã¯ã¼ãå ¥åã1åã§éã ãã®å¾ã«å®¶ã®WiFiã«æ¥ç¶ ããã§ãªãã¨ããªã£ã â¦
openFileInput, openFileOutput, fileListã使ã ãã¡ã¤ã«ã¯ã©ãã«ã§ãã¦ãããã ããã package org.shokai.test; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.util.*; import android.view.*â¦