2011年11月27日 星期日

bitcoin thoughts - the value

On bitcoin.org, value of bitcoin is claimed to depended on the requirement of bitcoin user, the more demand the higher the value, not based on the computer power required to produce (mine) bitcoins -- a myth that proposed by Labor Value Theory (LVT).

Since Marxism concluded that only labor can produce new value, and this is a critical point of marxist political economics. I am going to make my own judgement by recovering the related financial knowledges.

Asume marxism theory is correct, then the value of bitcoin is defined by the social necessary labor time needed to "mine" bitcoins, this includes the constant capital: electricity, cost of computers, bitcoin mining softwares and Internet access; and the variable capital: mining workers's labor time.

Considering the bitcoins can be produced almost at no cost if the algorithm is not a hard computing problem and without the total bitcoin number limit, the social necessary labor time of bitcoin almost equals zero. This means bitcoin are almost the same value as paper based currency, which itself has no value, but is only accepted by some goverment to exchange any thing equals the face value. The we have the following propositions:

currency value = face value = can be exchanged with any commodity the goverment has with the same value

bitcoin value = face value = can be exchanged with any commodity the bitcoin community has with the same value

So, instead of increasing bitcoins by the bitcoin network, to maintain a steady value of bitcoins, it should backed by real value possessed by bitcoin community-- such as programming hours, hosting service, ebay items etc. It's like virtual money, but the amount is a predictable computer program result, and the exchange rate with US dollar can be determined by:
1. value possessed by bitcoin community and amount of bitcoins, which determin the real "use value" of bitcoin
2. exchange value of US dollar ( such as 50 dollar = 1 programming hour of one hacker )
3. demand and supply between US dollar and bitcoin
4. There is no 4. :)

Let's try to validate above statements by reviewing:
1. With other conditions keep unchanged, if bitcoin amount is kept up with the total real value which can be provided by the community, then the value represented by bitcoin is steady. This requires the bitcoin network ( the "Sky Net" of bitcoin ) only produce new bitcoins when it needs to buy real new value from the community ( not the old value-- old value already exchanged by bitcoins). Like the Fed bank buy US government's bonds with new USD, and the government pay USD to anyone selling commodity to it. ( The amount of USD needed by the market is always less than the total value of commodity in the market, as USD is M1 of currency, the M1 formular can be found in any textbook of finance ). In practice, it may happens like that: Hacker A has coded a unix tool for 2 hrs, suppose the market value for this 2 hrs is 100 bitcoins, then customer B loan 100 bitcoins from bank C, bank C mines 100 bitcoins with no cost, but only a 100 bitcoin credit record in B's bank statement, then B buys this tool and accurally pay A 100 bitcoins. That is, the more people loan from bitcoin bank to buy new commodities, the more new bitcoins should be mined from nowhere. In bitcoin community, anyone can be a bitcoin bank, only if other users in this community trust them -- I will only trust someone who has enough wealth and very good bank operating reputation.
2. With other conditions keep unchanged, if only US dollar inflats, then one bitcoin can buy more US dollars, the bitcoin exchange rate will go high against USD.
3. With other conditions keep unchanged, if only more people need bitcoins instead of USD, then exchange value of bitcoin ( price of bitcoin in USD) goes up.

Next, I'll wait for anyone who can provide value statements with a Demand based Value Theory. Or continue provide more practical and accurate formulas of bitcoin exchange rate.




2011年8月14日 星期日

ASUS TF101 EeePad root and reflash to TW firmware

The week before last week, I bought an Android Pad, the Asus TF101 CN version in Guangzhou, I need to reflash it with some oversea firmware to use google services.
After reading XDA and some other sources, I finally flashed a TW version follow these steps (US/WW version should be no difference):

0. Before you begin, get a Ubuntu Linux Distro as working environment, because many tool support this platform and it do not need install drivers.
0.1 Familiar with the procedure with posts 1 and 2 from XDA forum.

1. First, we need the root privilege to overwrite system boot image from a TW firmware with android adb command tool, but the Nvidia Tegra firmware is encrypted. So we need nvidia tool to flash the BIOS (on the Nvidia Tegra ROM) with a rooted system image, Download NVFlash tool for linux, it's riped from NVIDIA Linux Dev Tool by some hacker and including the Secure Boot key of Asus TF101.

1.1 Boot into XDA mode and make a backup of current firmware:
#!/bin/bash

export PATH=$PATH:.
# copy from http://forum.xda-developers.com/showthread.php?t=1142567
BACKUP_DIR=~/tf101-backup-`date +%Y%m%d%H%M%S`
mkdir $BACKUP_DIR
nvflash --bct transformer.bct --setbct --configfile flash.cfg --bl bootloader.bin --odmdata 0x300d8011 --sbk 0x1682CCD8 0x8A1A43EA 0xA532EEB6 0xECFE1D98 --sync
nvflash --resume --getpartitiontable $BACKUP_DIR/partitiontable.txt
nvflash --resume --read 2 $BACKUP_DIR/02_BCT_raw.img
nvflash --resume --read 3 $BACKUP_DIR/03_PT_raw.img
nvflash --resume --read 4 $BACKUP_DIR/04_EBT_raw.img #bootloader
nvflash --resume --read 5 $BACKUP_DIR/05_SOS_raw.img #recovery
nvflash --resume --read 6 $BACKUP_DIR/06_LNX_raw.img #kernel
nvflash --resume --read 7 $BACKUP_DIR/07_BAK_raw.img
nvflash --resume --read 8 $BACKUP_DIR/08_GP1_raw.img
nvflash --resume --read 9 $BACKUP_DIR/09_APP_raw.img #system
nvflash --resume --read 10 $BACKUP_DIR/10_CAC_raw.img
nvflash --resume --read 11 $BACKUP_DIR/11_MSC_raw.img
nvflash --resume --read 12 $BACKUP_DIR/12_USP_raw.img
nvflash --resume --read 13 $BACKUP_DIR/13_PER_raw.img
nvflash --resume --read 14 $BACKUP_DIR/14_YTU_raw.img
#nvflash --resume --read 15 $BACKUP_DIR/15_UDA_raw.img #media (/!\ ~14/30GB large)
nvflash --resume --read 16 $BACKUP_DIR/16_GPT_raw.img

1.2 Now we can flash the rooted boot.img:
nvflash -r --download 6 boot.img
2. After reboot, we will have a rooted system, and we can update it with any stock firmware from ASUS of any regional SKU. The command is:
升级过程:
1.解压ROM包中的blob文件到adb目录中
2.将TF101与电脑连接
3. 进入到adb文件目录中
4.输入命令 adb push blob /data/local/
5.稍等几分钟后会提示blob文件就被传送到机身存储中
6.继续输入命令 adb shell
7.此时提示符变为#
8.输入命令 dd if=/data/local/blob of=/dev/block/mmcblk0p4
9.设备会自动重启,开机即为所刷ROM.


At last, I reflashed the rooted boot image with nvflash tool to install some other apps which require rooted device.

2010年8月1日 星期日

Dell mini10v (1011) 多系统启动 w/ hackintosh成功

A little different from Allan Kelly's recipe
1. I preserved the Dell preinstalled hardware diagnosis tools hidden partition.
2. I installed Win 7 ultimate 32bit edition
3. bootloader is using EasyBCD installed on Win 7 ( It's very powerful, and easy to use, I tried this after Chameleon failed to boot itself at the last stage, and Win 7 BCD bootloader is shown up instead )
4. I installed Ubuntu netbook remix 104 LTS instead of standard desktop version.
5. I installed Grub2 with Ubuntu to my /dev/sda, and it's working good.
6. Last but not the least, I installed OS X 10.6.3 with NetBookInstaller 0.8.4 RC1. I avoided upgrade to 10.6.4.
7. I followed this post on MyDellMini forum to fix sleep/awake problem.

more on easyBCD, it can boot Linux, Mac OS X, with my configuration, it's actually boot Grub2 for Linux, and Chameleon for Snow Leopard resp.

My partition layout:
1. Dell HW Diag Tool hidden partition (primary, FAT, 39M)
4. OS X (primary, HFS+, 58G)
2. reinstalled WinXP SP3 (primary, NTFS, 18.78G)
3. extended partition
5. Win 7 (logical, NTFS, 29G)
6. Ubuntu Netbook Remix 104 (logical, ext4, 12G)
7. Ubuntu swap partition (logical, 2G)
8. free space

One last note: I used Asus Super Slim usb HD (size: 30G), instead of usb keydrive which is slow and opt to be worn out very quickly (I bought a 8G Kingston DataTraveller USB keydrive, and have to return it back several times to replace it). And I suggest resize the partitoin on external usb HD to as small as possible to speed the formating/copying process up.

2009年7月7日 星期二

recover the Windows XP in bootcamp

Yesterday, I tried to install Ubuntu on an external usb disk for my new macbook (already dual boot with Windows XP and OS X), but I forgot to check how Ubuntu installer would install the Grub, which turns out to make my Windows XP on the internal disk unbootable with a message like this: " GRUB hard disk error".
After some trial and correction, I recovered the XP with following steps:
1. Boot the laptop from XP installation CD
2. When prompted, press R to enter the recovery console
3. fixmbr
4. fixboot

2008年10月15日 星期三

用firefox给医改提意见的方法

为了用电邮方式提交你的个人意见给国务院医改小组,而你用的又是firefox,那么为了解决网页上错误的javascript阻止你发表意见,你需要:
1. 安装greasemonkey 插件
2. 访问医改意见反馈网页:http://www.ndrc.gov.cn/yg
3. 添加下列用户脚本:
// ==UserScript==
// @name new
// @namespace my
// @include *
function On_Submit()
{

if(check(document.addForm))
{
window.open('','check_method','width=418,height=200');
document.addForm.submit();
}
}
// ==/UserScript==


第2个脚本:

// ==UserScript==
// @name sum
// @namespace http://2ban
// @include http://www.ndrc.gov.cn/ygyj/vcode.jsp

document.addEventListener('click', function(event) {
// event.target is the element that was clicked

// do whatever you want here
document.forms[0].submit();
// if you want to prevent the default click action
// (such as following a link), use these two commands:



event.stopPropagation();
event.preventDefault();
}, true);

// ==/UserScript==
4. 刷新页面,在出现输入校验码时,用tab键选择输入框输入,不要用鼠标点选,输入完毕后,用鼠标点提交即可。(抱歉我第一次用greasemonkey,javascript也忘了怎么用,所以大家将就用吧)

总之,我希望使用firefox的用户也有参与公共事物、发表个人意见的权力和渠道。

2008年9月11日 星期四

为motorola Z6转换视频文件

按照z6手机的说明,该手机支持h263 /3gpp格式的视频,但发现其随机附带的视频用linux下的mplayer播放时检测为mpeg4/aac 编码的文件,这比h263所使用的单声道音频效果自然好很多,参考网上的资料,经检测下列命令适合把网上常见的mpeg4 podcast视频转换为可以在Z6上播放的节目,并获得mp4的视频压缩效果和aac立体声音频效果:
系统要求:
debian或ubuntu,添加对应的non-free源,如multimedia.debian.org (莫名其妙被大陆政府封锁),medibuntu.ubuntu.org
下载带non-free组件支持的ffmpeg程序

操作步骤:
1. 下载mp4文件,比如从miro订阅的podcast频道下载,假设名为 channel.m4v
2.
ffmpeg -i channel.m4v \             #源文件
-acodec libfaac \ #目标文件音频编码
-vcodec mpeg4 \ #目标文件视频编码
-r 10 \ # 每秒10帧的fps,Z6手机支持的最高可能是15
-s qcif \ #使用h263支持的分辨率和屏幕大小 176 x 144,这种分辨率没必要考虑字幕,更本看不清的,所以建议尽量牺牲视频的质量来缩减文件大小。
channel.3gp #目标文件

网上也有分离音视频(demux or rip),然后对视频用多pass来转换,最后在合成(mux),以提高视频效果的实现,但对于我的Z6简直是浪费。
如果你对声音的要求也很低,那么acodec可以用libamr_nb 或libamr_wb,这个对于人的语音是够了,vcodec可以用h263。

2008年6月12日 星期四

how to play amr audio files

amr is 3gpp standard audio format, mplayer may support it natively in near future, or you can compile the amr codec into mplayer yourself.

But I'm lazy, so when I found this amr file on internet, I downloaded it and transferred to my motorola phone with bluetooth, so that I could play it.

另外偏题一下,上面这个电话录音是当事人自己公布的,不是我窃听的。里面是中产阶级的夫妻俩在吵架,妻子借批评孩子不好好学习来埋怨丈夫不好好做自己的正事,老给家里惹麻烦,宣泄自己对cops的fear,对未来的恐惧。 情感真实,本色出演,比任何肥皂剧都感人,更有现实意义,背景信息可以看这里:http://groups.google.com/group/cuihua/browse_thread/thread/7f0a4ce23638234f