![]() |
![]() |
![]() |
![]() |
![]() |
||
Home | First | Prev | Next | Last |
ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.1/misc/FontPack910_jpn_i486-linux.tar.bz2です。これを導入することにより、英語版の AdobeReader でも日本語の PDF を読むことができます。ただしゴシック体を表示するためには AdobeReader8 用の日本語フォントパックにあるゴシック体が必要です。
sudo update-alternatives --config x-www-browserを実行して、firefox を選び、/etc/alternatives/x-www-browser と /usr/bin/x-www-browser を確認しましたが、それでも駄目でした。
mailnews.wraplength editor.htmlWrapColumnの両方を、初期値の「72」から「64」にしてみました。
> net use X: \\vboxsvr\penguinとし、ネットワークドライブ X に /home/penguin を割り当てました。これは一度設定すれば記憶されますので、ファイルを開いたり、保存したりするときには、ドライブ X を選べば良いだけです。
alsa-lib-devel libvorbis-devel libogg-devel qt-develを導入してから
$ make clean $ qmake $ makeでコンパイルしてみました。警告がたくさん出ましたが、コンパイルは成功、試してみたら libstdc++6 で動いてくれました。Xubuntu で使っても大丈夫でした。ただし、メッセージの一部が文字化けしたり、音声の位置指定がずれるなどの問題がありました。それで、http://packages.debian.org/stable/libs/libstdc++5 から libstdc++5_3.3.6-18_i386.deb をダウンロードし導入して、オリジナルのものを使うことにしました。
$ inkscape image.svg -e image.pngこのコマンドだと問題なく変換してくれます。そこで、perl スクリプトを書いて、フォルダ内の svg ファイルを一括変換できるようにしました。大量のファイルの変換には時間がかかりました。
#!/usr/bin/perl $home = $ENV {'HOME'}; $appsdir = "$home/apps"; $confdir = "$home/myapps/rox-filer"; @lines = `cat $confdir/roxapps.conf`; foreach $line (@lines) { chomp $line; ($name, $command) = split /[\t]+/, $line; $dirname = "$appsdir/$name"; if (-d $dirname) { print "$name already exists ... skipped.\n"; } else { `mkdir $dirname`; if (open TXT, ">$dirname/AppRun") { print TXT "#!/bin/bash\n"; print TXT "$command\n"; } else { print "Cannot make command file.\n"; exit; } close TXT; `chmod +x $dirname/AppRun`; $iconfile = "$confdir/icons/$name.png"; if (-e $iconfile) { `cp $iconfile $dirname/.DirIcon`; } else { print "Provide $name.png.\n"; } } } print "Hit 'Enter' when you finish. ";; exit;
#!/bin/bash mousepad $HOME/myapps/rox-filer/roxapps.conf xfce4-terminal -T 'Rox Apps Register' -x $HOME/myapps/rox-filer/roxapps.pl
UUID=757D301A08644001 /mnt/netdisk ntfs-3g users,noauto 0 0という定義を追加し、
$ sudo mount -aとしてから、
$ sudo mount /mnt/netdiskというコマンドでマウントさせました。ディスクの UUID は次のコマンドで取得しました。
$ sudo blkid /dev/sda1この設定をしておけば、システムが起動したあとでもエンクロージャーのマウントとアンマウントができるようになりました。
$ mencoder video.flv -ovc xvid -oac mp3lame -xvidencopts fixed_quant=4 -o video.avi
タグ内の行が長いときにそれが画面からはみ出てしまうので、スタイルシートに次の記述を加えて、空白部分で行が折り返すようにしてみました。ブラウザや OS によって表示が違うようなので、各種の記述を併記するようにしてみましたが、まだ Linux 上の Firefox 以外のブラウザでは確認を取っていません。pre { white-space: -moz-pre-wrap; /* Mozilla */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ background-color:#f4f2f4; padding:1em; }
#!/usr/bin/perl $string = "1"; @data = split //, $string; foreach $char (@data) { $chrcode = ord $char; print "$chrcode\n"; }で分解してみると三つのコードに分かれ、全角数字「1」の場合、それぞれが 239, 188, 145 であることが分かります。半角数字「1」のアスキーコードは 49 ですから、145 と 49 の差は 96 で、全角数字の三番目のコードから 96 引けば、半角数字のコードを算出できることになります。
sub zen2han { ($orgline, $mode) = @_; if ($mode eq '' or $mode eq 'all') { $alpha = 1; $num = 1; $symbol = 1; } elsif ($mode eq 'alnum') { $alpha = 1; $num = 1; $symbol = 0; } elsif ($mode eq 'alpha') { $alpha = 1; $num = 0; $symbol = 0; } elsif ($mode eq 'num') { $alpha = 0; $num = 1; $symbol = 0; } @data = split //, $orgline; $i = 0; $newline = ""; while($i < scalar(@data)) { $char = $data[$i++]; $chrcode = ord($char); # ascii if ($chrcode >= 32 and $chrcode <= 126) { $newchar = chr($chrcode); } #none-ascii else { $char1 = $data[$i++]; $chrcode1 = ord($char1); $char2 = $data[$i++]; $chrcode2 = ord($char2); if ($chrcode == 239 and $chrcode1 == 188) { # symboles1 if ($chrcode2 >= 129 and $chrcode2 <= 143 and $symbol) { $chrcode = $chrcode2 - 96; $newchar = chr($chrcode); } # numbers if ($chrcode2 >= 144 and $chrcode2 <= 153 and $num) { $chrcode = $chrcode2 - 96; $newchar = chr($chrcode); } # symboles2 if ($chrcode2 >= 154 and $chrcode2 <= 160 and $symbol) { $chrcode = $chrcode2 - 96; $newchar = chr($chrcode); } # alphabets_uppercase if ($chrcode2 >= 161 and $chrcode2 <= 186 and $alpha) { $chrcode = $chrcode2 - 96; $newchar = chr($chrcode); } # symboles3 if ($chrcode2 >= 187 and $chrcode2 <= 191 and $symbol) { $chrcode = $chrcode2 - 96; $newchar = chr($chrcode); } } elsif ($chrcode == 239 and $chrcode1 == 189) { # alphabets_lowercase if ($chrcode2 >= 129 and $chrcode2 <= 154 and $alpha) { $chrcode = $chrcode2 - 32; $newchar = chr($chrcode); } # symboles4 if ($chrcode2 >= 155 and $chrcode2 <= 158 and $symbol) { $chrcode = $chrcode2 - 32; $newchar = chr($chrcode); } } # other symbols elsif ($chrcode == 226 and $chrcode1 == 152 and $chrcode2 == 226 and $symbol) { $newchar = "`"; } elsif ($chrcode == 226 and $chrcode1 == 128 and $chrcode2 == 152 and $symbol) { $newchar = "'"; } elsif ($chrcode == 226 and $chrcode1 == 128 and $chrcode2 == 157 and $symbol) { $newchar = "\""; } elsif ($chrcode == 227 and $chrcode1 == 128 and $chrcode2 == 128 and $symbol) { $newchar = " "; } # others else { $newchar = "$char$char1$char2"; } } $newline="$newline$newchar"; } return $newline; }
if (-e "$file") { $file =~ /\.[^\.]+$/; $fname = $`; $ftype = $&; $ftype =~ s/^\.//; $number = 2; while ($number) { if (!(-e "$fname($number).$ftype")) { $file = "$fname($number).$ftype"; last; } $number++; } }
`cp $file ./temp/$file`;ファイル名に()が含まれているためかと思い、
`cp "$file" ./temp/$file`;と、ファイル名を引用符で囲ったら大丈夫になりました。
<form><input type="button" onclik="location='javascript:history.back();'" value="Go Back"></form>という記述と、
<button onclik="location='javascript:history.back();'">Go Back</button>の二通りがあります。あとのほうが記述しやすいので、このごろは後のほうを使うようになりました。
# mount /dev/sdb2 /homeとしなければなりませんでした。Xubuntu は外付けのハードドライブで動いているとは思えないほどきびきびと動いてくれています。
![]() |
![]() |
![]() |
![]() |
![]() |
||
Home | First | Prev | Next | Last |