This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
複数のプロセスから排他的にデータを読み書きします。 | |
また、メタデータとしてバージョンやデータのダイジェストを保存することで 更新チェックを高速に行えるようにしています。 | |
- 読み書きの際はメタデータにjavaのFileLock が取得されます。 | |
- メタデータの読み書きは javaの MappedByteBuffer.force が使われます。 | |
データの読み込みには byte[] load_if_update() を使います。 | |
まだデータを読んだことがないか、最後に読んだあとに変更されていればデータを読み込みます。 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
複数のプロセスから排他的にデータを読み書きします。 | |
また、メタデータとしてバージョンやデータのダイジェストを保存することで更新チェックを高速に行えるようにしています。 | |
- 読み書きの際はメタデータにjavaのFileLock が取得されます。 | |
- メタデータの読み書きは javaの MappedByteBuffer.force が使われます。 | |
データの読み込みには byte[] load_if_update() を使います。 | |
まだデータを読んだことがないか、最後に読んだあとに変更されていればデータを読み込みます。 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public SharedPreferences getSharedPreferences(String name, int mode) { | |
SharedPreferencesImpl sp; | |
synchronized (sSharedPrefs) { | |
sp = sSharedPrefs.get(name); | |
if (sp == null) { | |
File prefsFile = getSharedPrefsFile(name); | |
sp = new SharedPreferencesImpl(prefsFile, mode); | |
sSharedPrefs.put(name, sp); | |
return sp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void loadFromDiskLocked() { | |
//(snip) | |
if (mBackupFile.exists()) { | |
mFile.delete(); | |
mBackupFile.renameTo(mFile); | |
} | |
//(snip) | |
if (FileUtils.getFileStatus(mFile.getPath(), stat) && mFile.canRead()) { | |
//(snip) ここでファイルから読み込む | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
abc=(a b c) | |
for (( I=0; I < ${#abc[*]}; ++I )) | |
do | |
echo $I ${abc[$I]} | |
done | |
function func1(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DRIVE ! ∧_∧ | |
( ,,・∀・) 僕を走らせる一眼。 | |
( つ【◎】と) | |
と_)_) K-30 | |
K-5よりK-30の方が優れている点 | |
- ライブビューAFの改善 | |
- 位相差AFの改善 | |
- AF.A (AF.SとAF.Cを自動切り替えするモード) | |
- ローパスが薄くなり解像感が高まった。ノイズレベルはK-5とほぼ同等 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use utf8; | |
use warnings; | |
# ノードにランダムアクセスするための配列 | |
my @list = (); | |
# 配列にノードを追加してそのインデクスを返す | |
sub add_node($){ | |
my($node)=@_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Documents; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Media.Animation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// twicca プラグインとして起動された場合 | |
if( "jp.r246.twicca.ACTION_SHOW_TWEET".equals(intent.getAction()) ){ | |
item.type_extra.put(TE_SCREEN_NAME,intent.getStringExtra("user_screen_name")); | |
item.type_extra.put(TE_STATUS_TEXT,item.body); | |
item.type_extra.put(TE_STATUS_ID,intent.getStringExtra( "id" )); | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sep 26, 2012 12:37 At local FedEx facility KAWAGUCHI-SHI JP | |
Sep 26, 2012 11:44 In transit TOKYO-KOTO-KU JP | |
Sep 26, 2012 11:08 International shipment release - Import TOKYO-KOTO-KU JP | |
Sep 26, 2012 10:57 In transit TOKYO-KOTO-KU JP Package available for clearance | |
Sep 26, 2012 07:55 At destination sort facility NARITA-SHI JP | |
Sep 26, 2012 02:58 Departed FedEx location GUANGZHOU CN | |
Sep 26, 2012 02:00 In transit GUANGZHOU CN | |
Sep 25, 2012 23:20 Arrived at FedEx location GUANGZHOU CN | |
Sep 25, 2012 20:15 Left FedEx origin facility YUEN LONG HK | |
Sep 25, 2012 18:19 Picked up YUEN LONG HK Package received after FedEx cutoff |
OlderNewer