http://code.google.com/p/eclipse-fullscreen/からzipファイルダウンロードしてEclipseのフォルダに解凍する形でインストールできます。
ショットカットキーはCTRL + ALT + Zです。覚えておきましょう!
http://code.google.com/p/eclipse-fullscreen/からzipファイルダウンロードしてEclipseのフォルダに解凍する形でインストールできます。
ショットカットキーはCTRL + ALT + Zです。覚えておきましょう!
仕事の事情であるPSDファイルにある画像の座標の情報が必要になって調べました。詳しく説明すると例えば背景が100×100のサイズで、その上に張り付いた違うレイヤーの画像の座標のことです。
ショットカットキーはCTRL+Tです。
メニューで「編集」->「自由変形」にすれば、レイヤーの4隅と中心座標の取得、数値入力による座標移動等ができます。
こんな感じです。メニューバーに表示してます。
参考サイト:
Webページの画像を右クリックで簡単にFlickrにアップロードできるChromeエクステンションです。
もしタイトルやタグなども編集できればもっどいいですけどね。
Flickr Upload Extensionをダウンロード
Springのコンテキストファイルにjdbc:embedded-databaseタグで
type=”H2″でbeanを登録します。
jdbc:scriptタグで初期化時に実行したいSQLファイルを指定できます。
Sprintって、本当に便利ですね。
<jdbc:embedded-database id="dataSource" type="H2"> <jdbc:script location="classpath:schema.sql"/> <jdbc:script location="classpath:test-data.sql"/> </jdbc:embedded-database>
ちなみにjdbcのnamespaceの登録も忘れずに。
xmlns:jdbc="http://www.springframework.org/schema/jdbc" xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd">
H2以外でもHSQL、Derbyがサポートされています。
ターミナルはApplication/Utilitiesフォルダにあります。
CTRL+Spaceで直接Terminalを叩いても直接開けますので、
とても便利でずっとこれを使ってます。
今のディレクトリのパスを返します。”/Users/(yourusername)”のような
Finderでダブルクリックと同じ効果です。アプリを開くに使います。
波記号はHomeディレクトリのショートカットです。
例えばcd ~で叩くとデフォルトで”/Users/(yourusername)”ディレクトリに行きます。
これはActivity Monitorのコマンドバージョンと理解していいでしょう。
現在アクティブなアプリのリストを表示します。
よくgrepコマンドと組み合わせて使います。
ps -ax | grep http ps -ax | grep mysql
ps -axの一番目の列はプロセスのIDの列です。
あるプロセスを強制的に終了させたい場合はID指定で”kill”できます。
kill xxx
上記の”xxx”はプロセスのIDです。
またアプリの名前がわかった場合はkillallコマンドが使えます。
killall Dock
大文字小文字は区別しますので、気おつけてください。
/**
* 数値を日本円表現にフォーマット。
* 例:12345 -> 123,45
*
*/
num2Currency = function(obj){
// 画面項目の値
var str=obj.value;
var num = new String(str).replace(/,/g/"");
while(num != (num =num.replace(/^(-?\d+)(\d{3})/,"$1,$2")));
obj.value = num;
}
/**
* 日本円表現を数値にフォーマット。
* 例:123,45 -> 12345
*
*/
currency2Num = function(obj){
var str=obj.value;
var num = str.replace(/,/g,"");
obj.value = num;
}
MacにはデフォルトでRubyが入ってそうです。
ターミナルを開いてrails -vを叩いたらバージョン情報が出てきました。
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]
そしてRubyだけじゃなくRailsも入ってましてびっくりしました。
すごいですねMacは。。。
て、railsのバージョンもrails -vで確認できますが、
デフォルトのバージョンは古いそうで下記のコマンドでアップグレードできます。
sudo gem update rails
するとこんなログ情報が出ます。
Updating installed gems Updating rails WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/zolo/.gem/ruby/1.8/bin in your PATH, gem executables will not run. Successfully installed activesupport-2.3.8 Successfully installed activerecord-2.3.8 Successfully installed rack-1.1.0 Successfully installed actionpack-2.3.8 Successfully installed actionmailer-2.3.8 Successfully installed activeresource-2.3.8 Successfully installed rails-2.3.8 Gems updated: activesupport, activerecord, rack, actionpack, actionmailer, activeresource, rails Installing ri documentation for activesupport-2.3.8... Installing ri documentation for activerecord-2.3.8... Installing ri documentation for rack-1.1.0... Installing ri documentation for actionpack-2.3.8... Installing ri documentation for actionmailer-2.3.8... Installing ri documentation for activeresource-2.3.8... Installing ri documentation for rails-2.3.8... Installing RDoc documentation for activesupport-2.3.8... Installing RDoc documentation for activerecord-2.3.8... Installing RDoc documentation for rack-1.1.0... Installing RDoc documentation for actionpack-2.3.8... Installing RDoc documentation for actionmailer-2.3.8... Installing RDoc documentation for activeresource-2.3.8... Installing RDoc documentation for rails-2.3.8...
多少時間がかかります。
これでMacでのRuby開発の準備は完了です。
gem update railsにsudoを付けないとこんなエラーが出るかも
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/paku-k/.gem/ruby/1.8/bin in your PATH, gem executables will not run. ERROR: Error installing rails: bundler requires RubyGems version >= 1.3.6
環境構築の記事でよく目にすると思いますが
このsudoコマンド。
気になってて調べてみたんです。
sudo is a Terminal command used to execute a command as another user, by default, the root user.
あるコマンドを別のユーザとして実行する、デフォルトではルートユーザ、だそうです。
例えばルートユーザとしてあるアプリを実行したい時は:
sudo open ....
XAMPP1.7.3 + WinXP
ダウンロードはこちら
c:\memcached.exe -d install
コマンドプロンプト
c:\memcached\memcached.exe -d start
XAMPPのパス/php/php.iniを編集:下記コードを追加
extension = php_memcache.dll
ここはLinux環境と違い拡張子が.soではなく.dll。
http://downloads.php.net/pierre/から’memcache’を検索して正しいバージョンのファイルをダウンロード。
そしてxampp/php/extに入れる。
ここで問題!正しいバージョンはなんなのか?間違ってダウンロードすると後でApacheサーバを立ち上がるときエラーが出るよ。私の環境だとphp_memcache-cvs-20090703-5.3-VC6-x86.zipのファイルが正しいけど、今時点で上記URLには載せていない。結構ググって見ても結局古い結果で、しょうがなく友人からそのファイル貰った。。。ここにアップしたので、必要な方はダウンロードしてください。ウイルススキャンしてね。。
php_memcache-cvs-20090703-5.3-VC6-x86
xamppでapacheサーバを起動、下記内容をphpファイルと保存してサーバのDocumentパス(デフォルトではXAMPP/htdocs)に置く。
connect("localhost",11211); // try 127.0.0.1 instead of localhost
// if it is not working
echo "Server's version: " . $memcache->getVersion() . "\n";
// we will create an array which will be stored in cache serialized
$testArray = array('horse', 'cow', 'pig');
$tmp = serialize($testArray);
$memcache->add("key", $tmp, 30);
echo "Data from the cache:\n";
print_r(unserialize($memcache->get("key")));
?>
Memcached, by default, loads with 64mb of memory for it’s use which is low for most applications. To change this to something else, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\memcached Server in your registry, find the ImagePath entry and change it to look something like this:
“C:\memcached\memcached.exe” -d runservice -m 512
http://www.codeforest.net/how-to-install-memcached-on-windows-machine
http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/
A Sass-based CSS Meta-Framework that allows you to mix and match any of the following CSS frameworks:
Compass Core
Blueprint
960
Susy
YUI
New frameworks and extensions are tracked on the wiki as they are created.
Other frameworks can be added relatively easily. Create your own!
http://github.com/chriseppstein/compass/tree#readme
http://compass-style.org/docs/
The Rails Rumble is an annual 48 hour web application development competition in which teams of skilled web application developers get one weekend to design, develop, and deploy the best web property that they can, using the power of Ruby and Rails.
A monospaced font, also called a fixed-pitch or non-proportional font, is a font whose letters and characters each occupy the same amount of horizontal space.[1] This contrasts to variable-width fonts, where the letters differ in size to one another.
The first monospaced typefaces were designed for typewriters, which could only move the same distance forward with each letter typed. This also meant that monospaced fonts need not be typeset like variable width fonts and were, arguably, easier to deal with.