Windows 10にアップデートしたら一部アプリケーション(サンダーバード)のフォントがにじむ・ぼやける・溶ける という話

Windows 10へのアップデートはつつがなく終了。 驚いたのはVistaが搭載されていた古ーいノートブックパソコンでも難なくアップデートできてしまったということ。 2年前に組んだデスクトップは全く問題なくアップグレード終了、
と思ったら、 メールクライエントとして長く使わしてもらっているサンダーバードの画面が変だ。 テキストがにじんでいる。

そこでBlur TextとかImage fuzzyとかでグーグル検索をしてみたら、でてくるはでてくるは。  でもたいていの記事はWindows画面のスケーリングを100パーセントにもどせ、だとか,サンダーバードのこんふぃぐにCSSファイルを追加しろだとか、 ようするに画面の解像度と表示フォントのからみの問題としてとらえている。

これかな?と思ったのはThunderbirdのオプション設定においてgfx.direct2d.disabledというパラメーターをTrueに設定する、というもの。 詳細手順はここに詳しい。

でもやっぱり治らない。

自分が直面した問題は 最初はきれいな表示になっていても、数秒そのままにしておくと、文字フォントがどんどんにじんでいってしまう、というもの。 目の前で文字が溶けていく、というか なんだか余計な処理がはじまっているかんじなのだ。

で、やっと見つけたのがこの記事

この記事はAMDのグラフィックスカードの3D機能のモフォロジカルアンチアライアス(MLAA)なる機能が悪さをしているので、これをオフにしようね、というもの。 で、自分のマシンのスペックをみてみれば、 Intelの6400というグラフィックスチップなのだった。 が、 解決法は同じで、3D処理の部分のコンサーバティブモーフォロジカルアンチアライアスの(CMLAA)設定をオフにしてみたら解決。 何かコンサーバティブ(保守的)なものか さっぱりわからぬ。
1.Windows 10の画面を右クリックし、”グラフィックス・プロパティ”を選択
2.3D設定を選び、 CMLAAの設定をオフにする。

これって、おそらくゲーム用のグラフィックスをスムーズにみせるためのロジックなんだろうが、メールアプリには必要ない。

どうもWindows 10にアップグレードしたときに、インストーラが気をきかして? 最新のグラフィックスドライバーを導入したみたいだ。 サンダーバードほどではないにせよ、 エッジブラウザにも影響がでているような感じだった。

Blurry, fuzzy or melting text on Thunderbird after upgrading to Windows 10

When I upgraded to Windows 10, I noticed text on thunderbird was blurry or fuzzy. I googled up the web and had a lot of hit on this subject. There are variety of fixes suggested like…
1) disable hardware acceralation
2) Go to TB option page and change the gfx.direct2d.disabled to true
3) Set Windows display scaling to 100%
etc., etc.

While I believe those suggesions are all true, none of them solved my issue.
Further observation into TB’s screen showed the text start out showing clear then after few seconds, it becomes fuzzy. It feels like the text are melting in front of my eyes.

Then I found this article

The article was for AMD graphics driver. My graphic chip is Intel HD graphics 4600, but looking at the Intell HD graphics control panel, I have found the 3D setting where Conservative Morphological Anti-Aliasing is set to on. Setting this option to off immediately resolved the issue.

It appears, when my PC was upgraded to Windows 10, the device driver was also updated and it introduced this CMAA setting. This may be a good technology for gaming, but not for Document application.

日経電子版 Evernoteとの連携サービスを開始

ビジネスマンのたしなみとして日経電子版を購読しているのだが、 今朝メールボックスをみたら、 以下のようなお知らせが来ていた。

日経電子版はインターネット上に文書や写真などを保存・共有するサービスを提供
するエバーノートとの連携を始めました。双方のサービス上で、キーワードや文脈に
沿ったコンテンツをタイムリーに表示し、情報の収集や分析が効率的になります。
以下略

これは便利そうだ。今までもWEB clipper で記事を切り抜いてはいたが、これからはもっとインテリジェントな切り抜きができそうだ。

 ちなみに自分が初めてEverNoteに触ったのは2007年、まだPalm機をPDAとして使っていた時期だった。 AceCADのDigiMemoを購入したらバンドルされてきたPC用のソフトだった。 これはLotus 123なみのキラーアプリだ、と思った記憶がある。 当時は日本語が通らなかったが、問い合わせたら、いつのまにかCJK版のベータテスターになっていたりしているうちに 2008年にはWEBサービスを開始。クラウドにローカルデータのコピーが保存され同期するというデータモデルは当時としては画期的だった。
自分のユーザーアカウント番号は6万9千番台、 今はどれくらいのユーザー数がいるのかわからない(2011年時点で1000万人超え, 2013年末には8000万以上)のだが 今にして思えばEarly Adopterだったわけだ。

Nexus7 OS 更新でメモリー容量が半分になってしまった、という話

Android oS 5.0.2 にUpgradeしたのは良いが、メモリー容量が半分になってしまったという話。

2012年に発売され既に製造終了のNexus 7であるが、Googleから販売されただけに最新OS Lollipop(5.0.2)がPushされてきた。 勿論喜んでアップデートしたわけだが、再起動後、データを復旧した後の動きがきわめて遅い。 そのうち「メモリ-容量が足りなので一部機能が使えません。 不要なデータやアプリを削除してください。」などというお知らせが出てしまった。

調べてみると、全部のメモリー容量が6ギガちょっとしかない。 

あれ?

たしか自分が購入したのは16ギガバイトモデルだったはず。 10ギガバイトもOSのファームウエアにに使われているわけ?

インターネット検索してみると、メモリー容量が半分になってしまったなど、同じ問題に直面した方たちが何人もいるようだ。

対応は簡単でファクトリーリセットをかけるとすべてのメモリー領域を認識するようになる。

勿論データーはすっ飛んでしまうわけなのでもう一度リストアをするはめになったが、アカウントにログインするだけでほぼ以前の使用状態まで復帰できるのは便利である。

SparkFun.com’s dumpster dive

Sparkfun’s dumpster dive is once in a few months event when they prep a limited amount of red boxes filled with rejects and some left over that they don’t feel as retail quality merchandize for various reasons, and put them on sale.

I bought these boxes on two occasions so far and I am reasonably pleased.
Let me share my experience.

  • Sale.
  • The sale takes place on select Fridays. In both occasions I learned about the sale when I visited the site to check out their blog section for new products, which they announce on every Friday morning.
  • The sale event will occur at 12 noon MT.
  • The whole lot will only last a couple of minutes, then the sale will be over.
  • Prior to Noon, you go to the site, login and go to the product page(DD-12012). There is no purchase button displayed yet. Precisely at 12 Noon, you start hitting the F5 key to refresh the screen. Once you see the Buy button, click on it to secure your purchase. If you can go through the purchase process in less than 2 minutes (confirming your address, shipping method and payment information and so so on – the fact you are already logged in will help expedite the process), chances are you will be rewarded with the order confirmation page.
  • Wait with a great anticipation for 3~4 days for the box to arrive.
  • Open the box and find out what is in there.
  • First purchase. (Feb 2014) – All parts listed were confirmed functional.
    • Pcduino v1 x1
    • PIC KIT2 compatible CANAKIT programmer x1
    • Vehicle diagnostic kit x1
    • Sonar module x2
    • FTDI USB-Serial converter (3.3V) x1
    • Stepper motor driver board array. I was able to separate 5 good boards while destroying 1 using dremel
    • A lot of electrolic capacitors
    • One comparator, One photo interrupter, One gap sensor, One ADC.
    • Half dozen of banana plugs
    • USB bluetooth dongles.
    • 3 pin rotary encoder x1
  • Second purchase
    • LCD module 24 chars x 2 lines
      It had 14pin connector. Using Arduino example sketch and pin out information I gathered from Internet, The module was confirmed functional. There is a two terminal pad on PCB which is obviously for backlighting and it looks like EL lighting. $10 value.
    • LCD module 16 chars x 2 lines
      There was a 14 pin ribbon cable coming out from the module. Again I used the pinout and Arduino Uno to confirm the functionality but this one did not work at the first time. It turned out the ribbon cable was broken, so I removed it and replaced with a header connector. The part is now working. $7 value.
    • Bleep drum version 1
      1) This assembly was in a bad shape. I suppose the kit was used in a class room environment or something, but who ever built the kit got the switch and stereo plug on the wrong side of the PCB and must have abondned the project. 9V battery holder and one of four studs were missing as well. Desoldering those multiple lead components was not a fun at all.
      2) I attached 9V battery and powered it up, hoping the LED will light up. Nothing happened and 78I05 was getting rather hot. Quick check on the output of the voltage regulator indicated something was loading down the VR really bad. Pop out the 8 pin dip and LED started to respond to button pushes. VR out was 5V. Oh, bad IC chip I thought and looked a t the part number on it. This is where real shocker camein. It said TA7015D, which is audio Amplifier. Wait a minute, the schematic I found on the Internet says this should be 4901 DAC! Both are 8 pin DIP IC but was the kit supplied with the wrong IC chip?
      3) So I replaced a chip with 4901. I purchased it from mouser.com when I ordered other parts. Now it seems to be working $50 value?
      4) If the kit was supplied with a wrong chip, then the poor guy who attempted to build it had no chance of this working.
      5) I also feel bad for people who is coming to electronic kit building these days. In my days, components were large. Solder pads were large and solder melting temperature was low due to lead in the solder. It is more difficult to work on PCB soldering even for me who I consider somewhat experienced in soldering.
      6) Bleep Drum is fun!
    • LPC 1768-H blue board
      1) This is a retired Arm cortex board on Sparkfun site. NGX saite is still selling it for $50 or so.
      2) When powered, the test LED was dim and there was no initial booting action where the LED was supposed to blink four times. Scoping the LED output confirmed it was blinking too fast. Somebody must have tried to download a blinky program but with a wrong timer value.
      3) I tried to connect to UART0 with USB-serial cable (using just black-GND, Green-RX0, White-TX0, no connection to red wire) connection after downloading flashmagic. Rebooting while sw press started a bootloader and I was connected. I reinstalled USB secondary bootloader.
      4) Now the USB bootloader started to work. I was able to drag and drop the initial bin file to the board. The board is now reinstated to its original shape. When powered up, LED blinks four times and wait to be programmed.
      5) But I don’t think I keep looking at this board because these days there are so many other options to jump into Arm micro controller more cheaply and easily . I am experimenting with FRDM-KL-25Z with mbed tool chain and its incredibly easy to use. Cypress PSoC now sells $4 board that comes with USB serial interface that can be snapped off for dedicated USB-UART cable afterwards. What a world are we living in?
    • Atmega 328P DIP
      1) Pins were all mangled up so I need to straighten them using a pair of tweezers. Popped into ISP programmer that I hacked with Arduino nano but AVRdude can not read the content. Its either a)broken, b)fuse is configured so can not be programmed without paralell programmer or c)fuse is set to use external crystal.
      2) Out of whim, I popped out the 328p from Arduino uno that I had and placed the 328p in question into Arduino board, loaded the blinky program and on-board LED started to blink. So this must be a 328p with arduino bootloader preloaded. $6 value.
    • More Atmega micro controllers (4 of them)Those are all SMT components. I probably would not be able to use them
    • SC300 wifi module x5
      This looks fantastic but I don’t know how I can use them in this SMT pinouts.
    • Header pins.I received about two dozens of solid header pins. It turns out a perfect fit for my NRI (National Radio Institute) Lab Trainer’s terminal pins which were too loose to connect jumper pins to. So I broke up these header pins to single pins and soldered on top of terminall pins on my trainer. Now the jumper wires slide into it very snuggly. The 35 years old electronics lab trainer regained a new life. Nice.

Will I try the dumpstar again? Maybe I will. The process of troubleshooting seemingly non-working product has some attraction in it.

ハノイの塔を解く(Solving Towers of Hanoi)

ハノイの塔というのはパズルだが、リカージョンというアルゴリズムによくなじむのでプログラミングの教科書に出ていることがある。 自分がこれを見たのは”Oh Pascal!”というパスカルの入門書で30年くらい前に発行された学生向けの教科書だ。
パズルの内容はこんな具合。
1.3本の棒が立っている。仮にこれを右からA,B,Cとする。
2.Aには真ん中に穴のあいた円盤が積み上げてある。円盤の直径は底にあるものが一番大きく、上に行くほど小さくなる。
3.一度に一個ずつこのこの円盤を取り出して他の棒に移すことができる。最終的には全部の円盤をCに移したい。
4.ただし、大きな円盤を小さな円盤の上に置くことはできない。

Hanoiの塔というのはこの”金の”円盤を64枚積み上げたものだそうで、このパズルが解けたときには世の中が終焉を迎える、というオトロしい落ちがついている。

これをコンピュータープログラムを使って解くとどうなるか、という話である。 パターンを見つけるために少ない枚数で実際に解くことを試みる。
Disk(円盤)の数が一枚の時には簡単だ。円盤をAからCに移せばよい。

Move(1disk from A to C) = Move a Disk from A to C

では2枚の時にはどうなるか

Move(2disks from A to C) = 
 Move a Disk from A to B
 Move a Disk from A to C
 Move a Disk from B to C

ここで棒Bを使うことになる。 つまり、まず上の円盤を棒AからBに移し、下の円盤をAからCへ、最後にBに移してあった円盤をCに移して完成だ。

Move (2 disks from A to C) = Move (2 disks from A to C using B)

3枚はどうか。 すでに2枚を動かす方法はわかっているのその方法を使ってまずは2枚をBに動かしておき、最後の一枚をAからCに移動、さらに2枚を動かす方法を使ってBからCに移動するという方法で動かせる。

Move(3 disks from A to C using B) =
 Move(2 disks from A to B using C)
 Move a disk from A to C
 Move (2 disks from B to c using A)

4枚の場合も同様に考えられるのでパターンとしては (n-1)枚の円盤をAからBに移す。最後の円盤をAからCに移動し、その後(n-1)枚の円盤をBからCに移す。 ということになる。

Move (n disks from A to C using B) =
 if n>2 Move (n-1 disks from A to B using C)
 Move a disk from A to C
 if n>2 Move (n-1 disks from B to C using A)

このパタ-ンを使って関数を書くと、自分で自分自身を呼びだす関数になる。これがいわゆるRecursion と呼ばれるプログラムテクニックだがCでもPascalでもPHPでもいまどきのプログラムなら軒並みサポートされている。ただし普通のループに比べるとスタックにどんどん自分のコピーを積んでいくためメモリーを消費し、昔の8ビットパソコンでは何せRAMが32キロバイトあれば高級機、計算しているうちにメモリーが足りなくなる、なんてこともあったりして、Loopで記述できるものはRecursionをさける、というのが常識だった。
しかしながらこの記述の簡便さ、短さは感動ものである。今のパソコンはそんなにメモリを気にしなくてもよいので、改めて組んでみよう。
上のパターンは条件判定を何度も呼ぶことになるので少し工夫して

function Move (n, from, to , using) =
 if n=1 "Move a Disk from 'from' to 'to'"
else
 Move (n-1,from, using,to)
 "Move a Disk from 'from' to 'to'"
 Move (n-1,using, to, from)

というようなロジックを使うこととし、
Free Pascalで書いた例

program hanoi;
             {Recursively solve the towers of Hanoi problem.  Moves disks from A to C.
             The code from "Oh Pascal" by Doug Cooper}
var height:integer;
  procedure Move (Height: integer; FromPeg,ToPeg,UsingPeg:char);
  begin
    if Height = 1
    then writeln('Move disk from ', FromPeg,' to ',ToPeg)
    else begin
      Move (Height-1, FromPeg,UsingPeg,ToPeg);
      writeln('Move a disk from ',FromPeg,' to ',ToPeg);
      Move (Height-1,UsingPeg,ToPeg,FromPeg)
    end;
  end;

begin
  writeln('How Many disks are you going to start with?');
  readln(Height);
  Move (Height,'A','C','B');
  readln()
end.

C++で書いた例

#include < iostream >

using namespace std;
void move(int numberOfDisk, char fromPin,char toPin,char usePin);


int main() {
    int numberOfDisk;
    char fromPin = 'A',usePin='B',toPin='C';
    cout << "How many disk do you want to move from pin A to pin C?: " ;
    cin >> numberOfDisk;
    move (numberOfDisk,fromPin,toPin,usePin);

    return 0;
}
void move(int numberOfDisk, char fromPin,char toPin,char usePin) {
    if(numberOfDisk == 1) cout << "Move a Disk from "<< fromPin << " to " << toPin<< endl;
    else {
        move(numberOfDisk-1,fromPin,usePin,toPin);
        cout << "Move a Disk from " << fromPin << " to " << toPin << endl;
        move(numberOfDisk-1,usePin,toPin,fromPin);
    }

}

Pythonで書いた例

'''Towers of Hanoi'''
def move(numberOfDisk, fromPin, toPin, usingPin):
    if (numberOfDisk == 1):
        print ("Move a Disk from ",fromPin," to ",toPin)
    else:
        move(numberOfDisk-1,fromPin,usingPin,toPin)
        print ("Move a Disk from ",fromPin," to ",toPin)
        move(numberOfDisk-1,usingPin,toPin,fromPin)

if __name__ == '__main__':
    numberOfDisk = input("How many Disk would you like to move? ")
    move(int(numberOfDisk),'A','B','C')


Python で円盤の数を4とした場合の実行例


~ $ python3 hanoi.py
How many Disk would you like to move? 4
Move a Disk from  A  to  C
Move a Disk from  A  to  B
Move a Disk from  C  to  B
Move a Disk from  A  to  C
Move a Disk from  B  to  A
Move a Disk from  B  to  C
Move a Disk from  A  to  C
Move a Disk from  A  to  B
Move a Disk from  C  to  B
Move a Disk from  C  to  A
Move a Disk from  B  to  A
Move a Disk from  C  to  B
Move a Disk from  A  to  C
Move a Disk from  A  to  B
Move a Disk from  C  to  B

動かす回数は円盤の数が1の時は1、2の時は3、3の時は7、4の時は上の出力のように15となり、円盤の数がnのときは

2のn乗から1を引いた値

となる。枚数が多ければ多いほど全部のステップの数がどんどん大きくなっていく。
Python version で試してみると、手持ちのややくたびれたノートブックパソコンではステップの出力が終わるのに 円盤の数が23枚で30秒、24枚で1分、25枚で2分かかった。(下の出力結果参照)実行時間がここの調子で倍々で増えていくとすると入力が64枚のときに解法を出力するのに2の38乗の分がかかるということになるが、これを年に直すと、なんと52万年というとんでもない数字になる。 ので上のプログラムに64と入力しようものなら計算が終わらない。 なるほど、これでは世界が滅びるわけだ。

~ $ time echo 23 | python3 hanoi.py >/dev/null
real	0m29.308s
user	0m29.225s
sys	0m0.054s
~ $ time echo 24 | python3 hanoi.py>/dev/null
real	0m58.437s
user	0m58.237s
sys	0m0.122s
~ $ time echo 25 | python3 hanoi.py>/dev/null
real	1m55.068s
user	1m54.540s
sys	0m0.320s

Android 4.2以降(Nexus 7,Samsung Galaxy etc.,)のUSB Debugモードを有効にする方法

ようするにFirst Generation Nexus 7のUSB Debuggingを有効にするにはどうしたらよいのか、という問題。

従来のAndroid Devciceはセッティングに行ってDevelopper Optionsを選び、その中のUSB DebuggingをOnにすれば事足りるのだが、なんとNexus7ではこのDevelopper Options自体が存在しない。

そんな馬鹿な、とググってみたところ、StackOverflowに以下の記述があった。

SettingのAboutを選択し、Build Numberの欄を7回タップする。

Voodooじみているが、これで Developper OptionがSetting Menuに出現する。

4.2のデバイスってみんなそうかしらん。
と思って手持ちのGalaxy S3(firmware 4.4.2)を眺めてみれば、 おんなじじゃん。 知らなかったのは私ばかりなり。
Easter Egg のノリだね。

Sprint: your account can not be validated [Solved]

I got this recorded message when I swapped my cell phone from Samsung Victory to Galaxy S3 and tried to call somebody.

The S3 used to belong to my son, but he upgraded it to HTC One. which left the S3 unused. The phone is more capable than Samsung Victory that I was using, so I decided to swap the phone.
The process couldn’t be easier. After hard resetting and wiping my son’s setup including gazillion of text chat history, It can be done online by logging into sprint.com and select “upgrade my phone” menu selection from my device page. Sprint.com site is clever enough to recognize that I have unused Galaxy S3 under my account and suggested the device as a target device for the swap. It was just the matter of following the step by step instructions on the site page.

So the swapping was done in no time without pain, or so that I thought.

After the swap process, the phone was recognizing network. Setting up Outlook mail service, Google service and Dropbox service was completed without any issue. All I needed to know were the user name and password. Then the phone was receiving e-mails.

I could not call from the phone however. When I tried to call the phone from the land line and got the voice mail message. Also, when I tried to turn on the hotspot, I was told I was not subscribed to the service (which I am)

I first try to call Sprint but I was on hold for 20 minutes. during that time I was googling the net and found several posts regarding this problem. Most of the responses, including the ones from sprint support team was not helpful at all. Then I stumbled accross this one. This one turned out to be the right answer.

The process to remedy this problem, turned out to be simple. you need to go to “Settings” -> “More” ->”System Update” then select “Update Profile”.
The phone will want to reset itself once the update is complete, and after the reset, everything started to work.
I suspect, there was still some of my son’s profile data remained on S3 and it confused the network connection.
Now I have a cell phone with bigger size screen and bigger size memory. Considering the fact that my wife carries S4 and my son HTC one M8, I am lagging in the technology but hey, I am perfectly happy with what I got for free.

SSDに換装したWindows7 AHCI モードでクラッシュ

一世代前のノートブックパソコン、まだまだ使えるのだが、動作がやや緩慢、そこで最近ぐっと購入しやすい値段になってきたSSDに換装してみた。 使ったのは250GBのSamsung840EVo。
Windows用のマイグレーションソフトウエアが付属してくるのでUSBを通してSATAに接続できるケースさえ手元にあればディスクイメージのコピーは問題なくできる。 あとはパソコンの裏ケースをはずし、HDDを取り出して、SSDを組み付けるだけ。ただし、Dual Bootで入れておいたMint Linuxはきれいに無視されるので、バックアップとリストアをしっかりおこなっておいて、再導入する必要があった。またWindowsのリカバリーパティションも複製されないようなので、リカバリーディスクを作成しておく必要がありそうだ。
Windows7の起動とアプリケーションの起動が圧倒的に早くなった。 めでたしめでたし、と思ったが、付属のSamsung Magicianという管理ツールを使ってみると、AHCIモードが無効になっているので、最適状態ではない、というようなメッセージが出ている。
AHCIというのはディスクの管理モードのようで、BIOS画面を見るとHDDのアクセス方法の選択肢の一つになっていた。 このパソコンの規定値はIDEアクセスモードになっており、これをAHCIに変えてやればよいと思ったのだが、設定を切り替えて作動させてみるとWindowsが起動途中でクラッシュする。いわゆるBSOD(Blue Screen of Death=青いエラー画面)が出てその内容を読む暇もなくリセットがかかる。

しょうがないので、Bios設定を元にもどし、再起動。 Google検索で”BSOD Windows 7 AHCI SSD”のキーワードで検索したら、 以下の記事を発見。なんと4ねんん以上も前に書かれている。こういうEarly Adapterがいてくれるおかげで後からついていく我々はネット検索するだけで問題解決ができてしまう。

HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlset / Services /msahci
このレジストリの値を0に変更(自分の場合は3になっていた)してWindowsを終了し起動の途中でF2キー(Deleteキーの場合もある)を押してBios画面を呼び出して AHCIに設定しWindows7を起動すると今度はクラッシュすることなく必要なドライバーを導入した後、再起動を促されるのでもう一度リブートして解決。

Python でテクストファイルを読み書きする。

With と For iterater を使うとファイルを明示的にクローズしないでもよいそうだ。
例題でやっているのはTest.txtというファイルから一行ずつ読み込んでリストを作成し、それをリストオブジェクトのSortedメソドで並び替えをしたのち、test2.txtというファイルに書き戻す、という作業。 なんか簡単にできるし(簡単だけど)、コメントを入れなくても読み解きやすい感じ。このあたりがPythonの強みか。

a_list=[]
with open("test.txt", mode="r",encoding='utf-8') as a_file:
     for a_line in a_file:
         a_list.append(a_line.rstrip())

a_list = sorted(a_list)

with open("test2.txt", mode="w", encoding='utf-8') as a_file:
    for a_line in a_list:
        a_file.write(a_line+'\n')