「framework」を含む日記 RSS

はてなキーワード: frameworkとは

2015-03-11

ASP.NET 4.0 4.5 4.5.1 4.5.2 MVC で 404 になったら...

MVCアプリなどを .NET Framework 4系列で開発したら、該当するアプリケーションプールの設定をv4.0に設定しなくちゃだね、IIS 管理ツールで。

2014-11-07

AnciaChromeというブラウザ、ついでに愚痴

AnciaChromeChromiumじゃなくCEF(Chromium Embedded Framework)ベースブラウザ(開発中)。作者は時折「Blink版」と呼んでいる。

巨大掲示板に作者が降臨して、

chromeソースをそのまま使っているソフトは、拡張対応は容易だとおもいます。今のBlink版は、chromeソースは未使用ですが、ソースがある文、もしかすると組み込めるかもしれません。

発言

拡張機能が一切入っていないCEFにChromiumソースコードから組み込むなんて、1人でできる規模じゃないと思うのだが。互換性とかテストとかを考えるとあり得ないとさえ思う。

まあ、これは仮定の話であって、たとえやるとしても「個人でやってます」ってことで、まともなテストができないことを許してもらうつもりかもしれない。

それにしても、ここの作者、個人で作っているようだが、何がしたいのか全く読めん。

仕事でやってるわけでも、金儲け主体でやってるわけでもないのに、どこからそんなやる気が出るのか、宣伝に金かけようとするのかさっぱりわからん

それと、どうして有名な国産(と称している)ブラウザはどれもごちゃごちゃしてるんだ。プニル然り、ルナスケ然り、Ancia然り。

2014-09-25

昨今のPC向けWebブラウザの現状(準メジャーブラウザ、その他編)

http://anond.hatelabo.jp/20140925002959 に続き、準メジャーブラウザとその他のブラウザの現状。

Firefox派生ブラウザは全く使ったことがないので、省略。

Chromium派生ブラウザは(レンダリングエンジンの性能に関しては)どれもChromeを超えられる存在にはなりえないので、とりあえずOperaだけ。

個人制作ブラウザも省略。

Opera

かつては独自レンダリングエンジン(Presto)を載せ、独自機能を数多く搭載し、一部の人からOpera最強伝説」と絶賛されていたブラウザ

タブブラウザ流行らせた一因と言われている。

Web標準にいち早く準拠させた一方で、IEなどの互換性も配慮していたようだ。

しかし、HTML5CSS3準拠度は後発のWebKitエンジン搭載ブラウザに押されてしまった。

そのせいなのか、もしくはPCが廃れそうだから独自レンダリングエンジン投資するのは無駄と考えたかどうかは不明だが、PC版はBlinkエンジン採用することになってしまった。

Blinkエンジンを手に入れることによって、得られたのはHTML5準拠度UPとブラウジングスピードと安定度。失ったのは、マウスジェスチャカスタマイズサイドバーといった今までのメリットだった独特のUI。ただのChromium派生ブラウザになってしまった。

バージョンアップタイミングChromiumと同期するためバージョンアップ頻度が高くなり、現在では24まで上がっている。

それでもなお、独自エンジンを搭載した最終バージョンを使い続けるユーザーが少なからずいるようだ。

Sleipnir

国産ブラウザ代表。かつては、IEコンポーネントタブブラウザ定番だった(少なくとも国内ではそうだった)。

最近Version 5系が出て、何を思ったのか不明だがバージョンが6まで上がった。5からは文字がボケボケ滑らかになったり、タブがページサムネイルになったり、Blinkエンジン専用になったり、4でできたカスタマイズができない、6で「お気にタブ」というネーミングセンスを疑う機能など、ある意味で大化けしてしまった。

一方で、2系や4系のバージョンアップ継続するようだ。実際はこれらの処遇を決めかねているのではないだろうか。

2, 4, 6の中で不満の少ないのを模索しているようにも見える。

ちなみに、BlinkエンジンChromiumをいじってChromiumのタブとかボタンとかを隠しているだけ。このおかげで、Chrome拡張機能がそのまま使えるようだ。Blinkプロセス単独で実行させれば素のChromiumが起動する。4系で確認。6系は未確認

バージョンに共通して言えることは、起動が遅い、UIがごちゃごちゃしすぎ。機能に振り回されている。さらに、Chromiumバグまで引きずるダメアプリ

Lunascape

国産ブラウザ代表。昔は軽量だったのに、「世界初 トリプルエンジン搭載」だとかなんとか言ってるせいで、いつの間にか重量級ブラウザになってしまった。WebKitエンジン更新が止まりセキュリティ的にやばいんじゃないかと言われ続けたが、最近になってようやく更新し始めた模様。

ブラウザ本体にAds by Lunascape広告を載せる実験をした実績あり。

感想Sleipnirと同じ。どちらかというと、レンダリングエンジン自体が重いせいなのかもしれない。せっかく3種類のレンダリングエンジンが使えるといっても、重いのでは全く意味がない。

というか、Sleipnir4 - 安定感 + Geckoエンジン = Lunascapeという数式が頭をよぎる。

Maxthon

中国産の中では比較的まとも(と思われる)ブラウザ

レンダリングエンジンをどう改造しているかからないが、HTML5testではなぜかChromeよりスコアが高い(正式リリース前のバージョンだが)。

最近Chromeより30%軽いとか言っているMxNitroを作ったらしいが、まだベータ版らしくブラウザとしての基本機能が足りない。Chrome拡張機能が使えないので、Chromeと同列に扱うのは反則だと思う。

30%軽い理由の1つは、Chromium組み込み向けフレームワークであるCEF(Chromium Embedded Framework)ベースと推測されるため。これは間違っているかもしれない。

どんな方法高速化しているのかが気になる。

それにしても、UIが全体的にのっぺりな平行四辺形なのはどうなんだろうか・・・

最後

国産はごちゃごちゃしたものばかり作るなよと言いたいところだ。ユーザー要望安易に答えすぎた結果なんだろうか。技術的には中国産ブラウザに負けているような気がするが、気のせいだろうか。

Opera独自レンダリングエンジンを止めてChromium派生になってしまった上にスマートフォンやらタブレットやらが普及してしまった以上、もうPC向けに力を入れる時代ではなくなったのかな・・・

2014-08-06

増田釣りチェッカーを作りたい

増田日記を解析して釣りかどうか判定する。

文章の特徴(主に語彙)を解析して同一人物が書いたと思しき日記を探り当てる。

そのためには増田サーバHTTPリクエストを送って日記を大量にダウンロードしないといけないんだけど、うまくいかないので誰か助けてください。

とりあえず増田サーバにソケットつなげて

GET /20140806210945 HTTP/1.1

Host: anond.hatelabo.jp

みたいなHTTPリクエスト送って、


HTTP/1.1 200 OK

Date: Wed, 06 Aug 2014 12:46:07 GMT

Server: Apache/2.2.3 (CentOS)

X-Framework: Hatena/2.0

Content-Length: 11446

Content-Type: text/html; charset=utf-8

Vary: Accept-Encoding,User-Agent

以下メッセージボディ


みたいな返信をもらうところまではできたけど、メッセージボディを読んでもJavaScriptコードが書いてあるだけでどこにも日本語がない。

どうやったら日記の内容受け取れるのでしょう?

追記

よく見たらJavaScriptの中に細切れになった日本語日記ありました。

これ修復するのかぁ。

めんどいなぁ。

2014-06-09

E0434F4D は、モジュールが狂ったばかりでなくプログラムエラーでも。

スケジュールタスクに登録させて実行したら、実行結果に (0xE0434F4D)と表示された。

原因ぐぐったら、kernel32.dllおかしくなっているとか、.NET Frameworkモジュールの問題だとか出てきた。

ファイルサーバ共有フォルダ内のファイル一覧を得るところで、指定した検索フォルダ名(フォルダパス)を間違えていたことが判明。修正したらすんなり動いた。

(System.IO.Directory.GetFiles() という処理)

要するに、OSおかしくなっているとか、DLL .NET Framework が不足している・おかしいではなくて、単にメソッドで失敗して例外が発生している場合にもこのエラーコードになるということだ。

2013-06-06

アラサーニートがはじめてのweb serviceを作ってみた

概要

http://hakohako.me/

hakohakoは、バンド好きのためのライブ日程共有サービスです。ツイッターフォローしている人のライブ日程をカレンダー形式でお届けします。ちょっとでも気になるバンドを見にいきましょう!

すみませんgoogle chromeしか検証していません。

動機

3つあります

一つ目は、一人でスクラッチで作りたいからです。プログラムを書くことは楽しいです(たいしたものはかけませんが)。しかし、デザイン運用のことは苦手で経験不足でした。これを期にやってみようと思いました。

二つ目は、少しでも気になるバンドを見逃したくないからです。不精なこともありますが、すべてのバンドをチェックできません。いつのまにか来てたりとか、来る前に解散してました。バンドの魅力は、小野ほりでい先生も認めてます

三つは、就職したいから!

構成

一人で小さくwebserviceを作るためにはどうしているかを他の人にも書いてほしいため、自分から書いてみます


言語pythonで、web aplication frameworkはflaskを使いました。rubyphpよりpythonが楽だと思いました。flaskはmicroframeworkで、rubySinatraと似ていて、小さいアプリ作成するのに適していました。

永続化のところは、redisを使いました。結果、redisを使った何かになってしまいました。。。mysqlでもpostgresでも、rdbを使った方がよかったです。ただ、sessionの管理message queueを実装できるので、そちらで功を奏しました。

amazon ec2microで、nginxもuwsgiのreidsもworkerも動かしてます。dot cloudも試していたんですが、無料枠は4月末で終了してました。

デザインが苦手なので、bootstrap、bootswach、font awesomeを使いました。しかし、基礎ができてないためイケてない感があります。ノンデナイザーズブックを読んで出直してきます

javascriptも苦手なので、coffeescriptを利用しました。pythonを使っているせいか、書きやすいし読みやすいです。mvcframeworkは利用していませんが、modelview意識して書きました。

githubgitの代わりに、bitbuckethgを使いました。私にはgithubgitの敷居は高かったようです。bitbucket日本語で利用できるので、楽ですね。hggitよりも複雑なことを感じないです。ただ、gitの方が日本語ドキュメントは多いです。

gruntは、lessとcoffeescriptコンパイルで使いました。リアルタイムで変更を通知するlivereloadも併用しました。

感想

楽しいです!

聞きたいこと
最近オススメバンド

2013-05-14

プログラミング大好き男に「どの言語が好き?」と訊ねられたとき、女はどう答えたらいいの?

あ、まず前提として、

貴女プログラミング大好き男を夢中にさせることが、

はたして貴女幸福にするかどうか、それはまた別問題だけれど。

はいえ、プログラミング大好き男たちは玉石混交ながら、

IT系の超かしこい男なども多く、

多くっつーかIT系でないのにプログラミング大好き男っていうのは超かしこ学生まぁこれは有望株)か研究者系なんか、

あとはまったくかしこくもないクセに頭いいつもりして「Lispやってます(キリッ ハローワールドくらいですが」とか言っちゃうアホしかいないわけで、

したがって、釣り師たる女たちにとっては、

なかなかあなどれない釣り場です。

では、プログラミング大好き男に「どの言語が好き?」と訊ねられたとき

貴女は、どう答えれば理想的でしょう?

まず最初に、その男COBOLのようなタイプレガシーコード

あとはC/C++、そして(TechEdに参加するほどではないけれど)VisualBasicが大好きな、

そんなタイプ場合は、

貴女はかれの目を見て、微笑みとともに質問など無視して、こう言いましょう、

「わたしが、仕様書を作ってあげる♪」

これこそまさに必殺の答えです。

そこでプログラミング大好き男が、えへへ、とやにさがったならば、

貴女は、ひそかに、「コピペ量産しやすい技術的ポイントを抑えた仕様書」あたりを

ひそかに練習しておきましょう。これで成功まちがいなしです。

しかし、ここでは、もう少しハイブロウな(?)いわゆるプログラミング好きの男の

落とし方をお伝えしましょう。

この場合貴女は、こう答えましょう、

「わたしは、JVM上のScalaが好き。

型推論もあるしラムダ式クロージャスクリプト言語みたいに書けるの、豊富組み込みのコレクションメソッドはいつも便利だし、

XMLリテラルCaseクラスによるパターンマッチもTraitベースMixi-inも、大好き♪」

もしも貴女がそう答えたならば、

その瞬間、プログラミング大好き男の目はきらりと輝き、

かれの貴女への恋心は、

20%増量になるでしょう。

なぜって、Scalaは、

ちょっぴりお洒落Ruby風味に記述できて、

Maybeモナド差し込んで、

コンパイルは遅いながらも、そこがまた

ちょっぴりメモリを多く積めばいい富豪プログラミングみたいなふんいきをかもしだしていて。

しか関数型言語としての不変変数・不変Listを実装して

質高くふるまっていて、なおかつ、

JVM上で動くくせにJavaが「やるやる」と言ったまま実装してなかったラムダ式と仮想拡張メソッド型推論を実装した功績もあって。

したがってScalaこそは、

本来なんの接点もないまったく縁もゆかりもない別々の世界に生きている、

インタプリタ言語大好きな綺麗系OLと、玉もあれば石も混じっている、そんなプログラミング大好き男たちが、

この世界で唯一(いいえ、JVM系列のJRubyClojure と並んで唯三)遭遇しうる場所です。


では、参考までに、危険な回答を挙げておきましょう。

プログラミング大好き男に「どの言語が好き?」と訊ねられたとき

貴女がこう答えたとしましょう、

MicrosoftVisual Basic for Applicationが好き♪ 週3回は Excelコーディングするの。」

その瞬間、プログラミング大好き男の貴女への恋心は消えます、

なるほどMicrosoftは、世界最大のOS供給メーカー

特にOfficeは平凡ながら、ま、無難にまとめてあるものの、

しかし、「新UIのリボンUI!」「メトロUI対応!」とかなんとか無意味な自慢を吹聴し、

VBAはさらプログラミングについての謬見を撒き散らした罪がありますからプログラミング大好き男にとっては天敵なんです。

ティーガー戦車乗りのオットー・カリウスは「ティーガー乗りなら誰でも片側の履帯がはずれ僚車に牽引されて帰ってきた経験を持つはずだ」 って言ったけど

社内SESIerなら誰でもクソみたいな前任者が書いたクソみたいなExcel-VBAコードを直した経験があるはずなんです。

また、もしも貴女が「PHPが大好き♪ あたしが書いたPHPのWebサイトが、さくらサーバに7件あるよ♪」

と答えたとしても、同様の効果をもたらすでしょう、

なぜって、PHPは、1990年代にはWeb系を目指す人にとっては簡単で要件を満たすWebサイトが簡単に作れる輝きの道だったものの、

しかし2000年代うそうからセキュリティ関係の問題で転落し、

いまや、あの貧弱な言語能力では、Rubyの魅力に遥かに及びません。

(注1)

またもしもたとえあなたプログラミング言語が大好きで、

「わたし、.NET FrameworkのC#が好き、フォームアプリでも書くけど、

最高に好きなのはASP.net♪ SQLServer連携も、ajax control toolkitもすっごくおいしいの。」

と、答えたとしたらどうでしょう

なるほど、貴女の趣味は高く、

しか.NET Frameworkは、C# が cool であるのみならず、

.NET Framework上で動く F# や IronPythonIronRubyマネーJScriptも最高においしいんですけれど、

しかし、貴女の答えを聞いて、プログラミング大好き男はきっとおもうでしょう、

(なんだよ、MS信者な女だな、カネかかりそう)って。

(注2)

貴女が、プログラミングが大好きで、言語の名を挙げるにしても、

たとえば、JavaScript(node.js)ならば安心でしょう、

なぜならば、JavaScriptは、かけだしのプログラミング初心者にもマニアにもともに愛されるめずらしい言語で、

貴女がその名前を挙げても必ずしも、(jQueryがやっとの初心者と思われることはあっても)あなたプログラミング言語おた宣言をしているとは受け取られないでしょう。

しろへぇ。ちゃんとprototypeは使ってる?」と聞かれたら「当たり前じゃない。むしろnode.jsでいいMVCフレームワークが分からないんだけど…」と話を振ってみましょう。

男は嬉々として、30個くらいのnode.jsフレームワークを教えてくれることでしょう。(まぁどれもどれで帯に短し襷に長しなんですが)

あるいはRighno上で動かしたコードをnodeへ移植する話とか、CoffeeScript、甚だしきはClojureScriptを振ってみてもいいかもしれません。

しかし、たとえば、世界が(つーか竹内先生ポール・グレアムが)誇る超絶関数型言語の名作、Common Lispにせよ、

selfと書きまくることと海外で使われてることに定評のあるPythonにせよ、

バージョンアップごとに言語仕様が変わり、かなり素敵なものではあるもののobsolatedな罠にはまりやすRubyにせよ、

まったく読めない$_だらけで頭悪い仕様リセットしてPerl6にする(そしてまた全く読めない)Perlにせよ、

気さくなクジラ飛行机さんがふるまう素敵においしい日本語プログラミング言語ひまわりなでしこにせよ、

基地外トリッキー言語の代表BrainFxck・Glass・Missa・WhiteSpaceにせよ、

そういう言語名前をいきなり挙げるのは、ちょっぴり微妙。

ましてや貴女が、「Haskellが大好き♪ わたし、プロジェクトオイラーの問題もうほとんどHaskellで、解いちゃった♪」

と答えたならば、どうでしょう

これはかなり博打な答え方で、

なるほど、Haskellは、純粋関数型でありつつも副作用のある操作が行える超絶名言語ゆえ、

あなたがそう答えた瞬間、プログラミング大好き男がいきなり超笑顔になって、

へぇ、やっぱりHaskellなら大抵の問題は4行以内くらいで解いちゃった?」とか言いながら

鼻の下がだら~んと伸びちゃう可能性もあるにはありますが、

しかし、逆に、(なんだよ、この女、プログラミングおたくかよ)とおもわれて、どん引きされる可能性もまた大です、

なぜって、必ずしもプログラミング大好き男がプログラミング大好き女を好きになるとは、限らないですから

しかも、この答えには、もうひとつ問題があって、

男たちは、女を導き高みへ引き上げてあげることが大好きゆえ、

もしも貴女が、「Haskellが大好き♪」なんて言ってしまうと、

そこにはもはや、男が貴女圏論モナド教育する余地がまったく残されていません、

したがって貴女のその答えは、

プログラミング大好き男の貴女への夢を潰してしまうことに他なりません。

ま、ざっとそんな感じです、貴女の目にはプログラマーたちはバカでスケベで鈍感に見えるでしょうが

しかし、ああ見せて、プログラマープログラマーで繊細で、おざなりに扱われると傷つきやすく、ローカル変数名前一つにも気を使い、女と自分の将来に夢を持っています、

貴女の答え方ひとつで、プログラマー貴女への夢は大きくふくらみもすれば、

一瞬で、しぼんでしまいもするでしょう。


では、スキットを繰り返しましょう。

「わたしは、JVM上のScalaが好き。

型推論もあるしラムダ式クロージャスクリプト言語みたいに書けるの、豊富組み込みのコレクションメソッドはいつも便利だし、

XMLリテラルCaseクラスによるパターンマッチもTraitベースMixi-inも、大好き♪」

そして、その瞬間、プログラミング大好き男の目がらんらんと輝いたなら、

貴女はこう重ねましょう、

それからね、いま、わたしが使ってみたいWebアーキテクチャは、

Play Framework、素敵なリアルタイム嗜好のアーキテクチャって噂を聞いたから。

あなたのお暇なときがあったら、わたしをPlayへ連れてって♪」

これでもう完璧です。

PlayFrameworkと、Play(遊ぶ・じゃれる)のダブルミーニングでかれの股間も刺激しちゃえます。

そうなったらこっちのもの

デートの日には、ペアプロ用に Happy Hacking Keyboard をばっちり決めて、かわいい下着をつけて(注3)、

github.comの通販で売ってるoctcatのTシャツか、facebookの「いいね!ボタンがムネのところにあるTシャツ、 あるいは初音ミク(ないし彼のお気に入りアニメキャラ。北米ならMyLittlePonyで鉄板なんだけど)のコスプレを着てゆきましょう。

その日からプログラミング大好き男は貴女の虜になるでしょう。

では、釣り師としての貴女の、愛の幸運幸福をお祈りします!

注1:

(と、書いたもののPHPの現状をよく知りません。グローバル変数だらけになるのとか旧ASPみたいなもんなのかなぁ。count($array); とか書くのアホと思うがpythonも同じだった)

(あと、マジで機能とかTwitter連携とか診断メーカー的なのでもPHPで7つも作ってる女子居たら付き合いたい)

注2:

もっとも。objective-Cなんていう言語をやることに比べれば個人で行う程度なら金のかからない手法もなくはないのですが。

注3:

プログラマーにとっての「かわいい下着」と、女性にとっての「かわいい下着」の定義にずれがあるので注意。

半数くらいのプログラマーしましまぱんつが可愛いと思ってる気がするので、妙齢の女性が着用するには抵抗あると思うが、ボーダー柄のコットンショーツ(ただしキャラ絵のは除く)とか、

過度でないていどにフリルがついたものオススメ。また、色は、レッドだとプログラミング大好き男は引いてしまう(だってそれはコンパイルエラーときの色だ)ので、薄ピンクホワイト、薄ブルー、せめて黒(に差し色でピンクとか)あたりに留めたい。

補記:

 元ネタhttp://tabelog.com/tokyo/A1301/A130101/13002457/dtlrvwlst/3464106/

補記2:

  「プログラマー」か「プログラマ」かの問題については、特に意味は無いが前者を採用した。

補記3:

 言うまでも無いけど、ネタです。 

 また、COBOLとVB、C++ではまったくもって難易度が違うことも分かっています。後者になるほど圧倒的に難しい。

2011-12-29

Portable electronic equipment battery technology

1, about the trickle charge, rapid charging and stable battery charging algorithm

According to the energy requirements of the final application, a battery may contain up to 4 lithium ion or lithium polymer battery core, its configuration will have a variety of change, at the same time with a mainstream power adapter: direct adapter, USB interface or car charger. Remove the core quantity, core configuration or power adapter type difference, the battery has the same charge characteristics. So they charge algorithm. Lithium ion and li-ion polymer battery best charging algorithm can divided into three phases: trickle charge, rapid charging and stable charge.

trickle charge. For depth discharge core to charge. When core voltage in less than about 2.8 V, use a constant 0.1 C of the current charging for it.

fast charging. Core voltage trickle charge more than the threshold, improve the charging current rapid charging. Fast charging current should be lower than 1.0 C.

stable voltage. In the fast charging process, once the core 4.2 V voltage, stable voltage phase began. This is through the minimum charge current or timer or of the two joint to interrupt charge. When the minimum current below about 0.07 C, can interrupt charge. The timer is to rely on a default to trigger the timer interrupt.

Advanced battery charger with additional security function normally. For example, if the core temperature exceeds the given window, usually 0 ℃-45 ℃, charge will be suspended.

Remove some very low-end equipment, now on the market/li-ion polymer lithium ion battery solutions are integrated with the outer components or, in accordance with the characteristics of the charging to charge, this is not just to get better effect charge, but also for safety.

lithium ion/polymer battery charge is an example of applications-double input 1.2 A lithium battery charger LTC4097

LTC4097 can be used to exchange adapter or USB power supply for single quarter/polymer lithium ion battery. Figure 1 for double input 1.2 A lithium battery charger LTC4097 schemes. It USES constant current/constant voltage algorithm charging, from exchange adapter power charge, programmable filling up to 1.2 electric current A, and with USB power can be as high as 1 A, at the same time, automatic detection in each input voltage whether there. This device also provide USB the current limit. Applications include PDA, MP3 players, digital camera, light portable medical and test equipment and big color cellular phone. The performance characteristics: no external micro controller charging termination; The input power automatic detection and choice; Through the resistance from the exchange of charging adapter input can be as high as 1.2 A programming charge current; The resistance of programmable USB charging current is up to 1 A; 100% or 20% USB charging current set; The input power output and existing bias NTC (VNTC) pin as a 120 mA drive ability; NTC thermistors input (NTC) pin for temperature qualified charged; Pre-settings battery voltage with floating plus or minus 0.6% accuracy; Thermal regulation maximize charge rate and free hot air LTC4097 can be used to exchange adapter or USB power supply for single quarter/polymer lithium ion battery. The use of constant current/constant voltage algorithm charging, from exchange adapter power charge, programmable filling up to 1.2 electric current A, and with USB power can be as high as 1 A, at the same time, automatic detection in each input voltage whether there. This device also provide USB the current limit. Applications include PDA, MP3 players, digital camera, light portable medical and test equipment and big color cellular phone.

2, lithium ion/polymer battery scheme

Lithium ion/polymer battery charge scheme for different number of core, core configuration, and power types are different. At present mainly have three main charging scheme: linear, Buck (step-down) switch and SEPIC (booster and step-down) switch.

2.1 linear scheme

When the input voltage in big with the charger with sufficient clearance of core after opening voltage, it is linear scheme, especially 1.0 C fast charging current than 1 A big too much. For example, MP3 players usually only one core, capacity from 700 to 1500 mAh differ, full charge voltage is open 4.2 V. MP3 player power is usually the AC/DC adapter or USB interface, the output is the rule of 5 V; At this time, the linear scheme is the most simple, most charger of the efficiency of the scheme. Figure 2 shows for lithium ion/polymer battery solution linear scheme, basic structure and linear voltage neat device.

linear scheme charger application examples-double input Li + charger and intelligent power source selector MAX8677A

MAX8677A is double input USB/AC adapter linear charger, built-in Smart Power Selector, used for rechargeable single quarter by Li + batteries portable devices. The charger integration of the battery and the external power source and load switch charging all the power switch, so that no external MOSFET. MAX8677A ideal used in portable devices, such as smart phones, PDA, portable media players, GPS navigation equipment, digital camera, and digital cameras.

MAX8677A can work in independent USB and the power input AC adapter or two input either one of the input. When connecting external power supply, intelligent power source selector allows the system not connect battery or can and depth discharge battery connection. Intelligent power source selector will automatically switch to the battery system load, use the system did not use the input power supply parts for battery, make full use of limited USB and adapter power supply input. All the needed electric current detection circuit, including the integration of the power switch, all integration in the piece. DC input current highest limit can be adjusted to 2 A and DC and USB input all can support 100 mA, 500 mA, and USB hung mode. Charge current can be adjusted to as high as 1.5 A, thus support wide range of battery capacitive. Other features include MAX8677A thermal regulation, over-voltage protection, charging status and fault output, power supply good surveillance, battery thermistors surveillance, and charging timer. MAX8677A using save a space, hot enhanced, 4 mm x 4 mm, 24 of the pins TQFN encapsulation, regulations, work in exceptional temperature range (40 ~ + 85 ℃).

2.2 Buck (step-down) switch scheme

When A 1.0 C of the charging current more than 1 A, or the input voltage of the core than with high voltage open many, Buck or step-down plan is A better choice. For example, based on the hard drive in the PMP, often use single core lithium ion battery, the full of open is 4.2 V voltage, capacity from 1200 to 2400 mAh range. And now PMP is usually use the car kit to charge, its output voltage in a 9 V to 16 between V. In the input voltage and battery voltage is the voltage difference between high (minimum 4.8 V) will make linear scheme lowers efficiency. This kind of low efficiency, plus more than 1.2 A 1 C fast charging electric current, have serious heat dissipation problems. To avoid this kind of situation, will the Buck scheme. Figure 3 for lithium ion/polymer battery charger scheme Buck diagram, basic structure with Buck (step-down) switching voltage regulators completely the same.

2.3 SEPIC (booster and step-down) switch scheme

In some use of three or four lithium ion/polymer core series equipments, charger of the input voltage is not always greater than the battery voltage. For example, laptop computers use 3 core lithium ion battery, full charge voltage is open 12.6 V (4.2 V x3), capacity is 1800 mAh to 3600 mAh from. Power supply input or output voltage is 1 6 V AC/DC adapter, or is car kit, the output voltage in a 9 V to 16 between V. Apparently, the linear and Buck solutions are not for this group of batteries. This is about to use SEPIC scheme, it can in the output voltage is higher than when the battery voltage, can be in the output voltage less than when the battery.

3, and power detection algorithm is proposed

Many portable products use voltage measurements to estimate the remaining battery power, but the battery voltage and surplus power relationship but will with the discharge rate, temperature and battery aging degree of change, make this kind of method can top 50% margin of error. The market for longer to use product demand unceasingly strengthens, so the system design personnel need more accurate solution. Use capacity check plan come to measure battery or consumption of electricity, will be in a wide range of application power to provide more accurate estimate of the battery power.

3.1 power detection algorithm is one of the examples of application, function complete list, double the battery portable battery application design

power detection principle. Good capacity check plan at least to have battery voltage, temperature and battery electric current, measuring method; A micro 9 a; And a set of and the verification of the punishment power detection algorithm is proposed. Bq2650x and bq27x00 is full capacity check program function, with a measuring voltage and temperature of the digital converter (ADC) and a measuring electric current and charging sensor the asp. These capacity check plan also has a microprocessor, is responsible for the implementation of the Texas instruments power detection algorithm is proposed. The algorithm can compensate the lithium ion battery life.low self-discharge, aging, the temperature and discharge rate, and other factors. Chip embedded microprocessor as host system processor save these calculation burden. Capacity check program can provide remaining power state information, bq27x00 series products also offer surplus can Run Time (Run Time to Empty) host may at any Time to capacity check plan these information query, then LED indicator light through or displays will inform the user battery. Capacity check meter is very easy to use, the system processor need only configuration 12 C or HDQ communication drive can.

The battery circuit description. Figure 4 (a) can be used for identification of IC functions with typical application circuit batteries. According to the use of IC testing program is different, the battery needs to have at least three to four outside the terminal.

VCC and BAT pins will even to the battery voltage, so that for, C power and the battery voltage measurement. The battery is connected a grounding resistance smaller detection resistors, let capacity check meter high impedance SRP and SRN input can monitor sensor resistance on both ends of the voltage. Through testing the current flows through a resistor can be used to judge the battery or release the amount of electricity. Designers choose detection resistance value must be considered when resistance on both ends of the voltage can't more than 100 mV, low resistance may be more hours in current errors. Circuit board layout must ensure that SRP and SRN to testing from as close as possible to the connection of the resistor sensor resistance end; In other words, they should be the Kelvin attachment.

HDQ pin need external and resistors, this resistance should be located the host or the main application, such capacity check plan to the battery and portable devices when sleep function enable connection broken. Advice and resistance choose 10 k Ω.

battery identification. A low cost WeiMao batteries are getting more and more serious, these cells may not contain OEM requirements of security protection circuit. So, genuine battery may contain figure 4 (a) shows the appraisal circuit. When to identify the battery, the host to contain IC (bq26150, the function is cyclic redundancy check (CRC)) issued the battery packs a ask value (challenge), the CRC will contain battery according to this inquiry value and, in the building of the IC in CRC polynomial calculation the CRC value. CRC is based on the host of command and IC secret in the query of the definition of the CRC polynomial completed, the host in CRC values calculated with the calculation result of well battery comparison to identify the appraisal success.

Once the battery through the appraisal, bq26150 will issue commands to ensure that the host and quantity test plan of material lines between normal communication. When the battery connection interruption or to connect, the whole the identification process will be repeated again.

double the battery application. Figure 4 (b) for use bq26500 support double the typical application of lithium ion battery circuit. In order to support more battery, and this circuit is adding a adjustable regulators. Capacity check millions of BAT pin and the bottom of a battery anode linked to complete the variable voltage measurement of the battery.

Host to be able to read capacity check plan of variable voltage measurement battery, to make sure the end of discharging threshold and charging terminate threshold. As for the remaining state power (RemainingStateofCapacity), do not need to read can use directly.

The above bq2650x and bq27x00 etc capacity check plan provides the battery manufacturer a simple to use options, this scheme L [just measuring battery voltage to be precise, so these capacity check plan can be applied to various battery framework, and can support the battery identification and double the battery application '

3.2 power detection algorithm is an example of applications another, can apply to all kinds of general voltmeter new IC.

Today's many manufacturers can provide a variety of voltmeter IC,, the user can choose the suitable function device, to optimize the product price. Use voltmeter measurement of storage battery parameters, the separate architecture allows users in the host custom power measurement algorithm within. Eliminating embedded processor battery cost. On this to Dallase semicconductor company called cases of DS2762 chip for typical analysis. A new separate voltmeter IC, its structure see chart 5 (a) below.

DS2762 application characteristics

DS2762 is a single quarter of lithium battery voltmeter and protection circuit, integrated into a tiny 2.46 mm x 2.74 mm inversion of packaging. Due to internal integration for power detection of high precise resistance, this device is very save a space. It is the small size and incomparable high level of integration, for mobile phone battery and other similar handheld products, such as PDA, etc, are all very ideal. Integrated protection circuit continuously monitoring the battery voltage, over voltage and flow fault (charging or discharge period). Different from the independent protection IC, DS2762 allow main processor surveillance/control protection FET conduction state, such, can DS2762 through the protection of the power system and the control circuit implementation. DS2762 can also charge a battery consumption has depth, when the battery voltage within three V, provide a limit of the charging current recovery path.

DS2762 accurate monitoring battery current, voltage and temperature, the dynamic range and resolution of common satisfy any mobile communication product testing standards. The measurement of current for internally generated when the integral, realize the power measurement. Through the real-time, continuous automatic disorders correct, the precision of power measurement can be increased. The built-in measuring resistance due to eliminate manufacturing process and temperature and cause resistance change, further improve the precision of the voltmeter. Important data stored in 32 bytes, can add the lock EEPROM; 16 bytes of SRAM are used to keep dynamic data. And DS2762 all communication all through the 1-Wire, more communication interface node, minimize the battery and the connection to the host. Its main features for; Single quarter of lithium battery protector; High precision current (power measurement), voltage and temperature measurement; Optional integrated 25 m Ω measuring resistance, each DS2762 after fine-tuning alone; 0 V battery restore charge; 32 bytes can lock EEPROM, 16 bytes SRAM, 64 a ROM;

1-Wire, node, digital communication interface; Support more battery power management, and through the protection system control FET power; Dormancy mode power supply current only 2 µ A (most); Work mode power supply current for 90 µ A (most); 2.46 mm x 2.74 mm inversion of packaging or 16 feet SSOP package led, and both are can choose with or without detection resistance; After has with e

2011-10-18

VB.NET : My.Settings 登録は、対象にする Frameworkバージョンを切り替えた後ですべし

4.0 対象の状態(つまりプロジェクト作成した初期状態)のまま

My.Settings (設定)を登録したあとで 2.0 対象に切り替えると、

デバッグ時に、ハンドルもされず、アプリ異常終了もしない、

サブルーチンの途中でこっそり抜けたりする不可解な動きをする。

My.Settings の登録を全部消して、登録をやりなおしたら復活した。

App.Configのどこかを直接いじっても対処できそうだけどね。


VB.NET EXPRESS 万歳

2011-05-19

今頃.NET Framework3.5のアプリ作る事になったけど

データベースアクセスには、LINQ to SQLっていうの使うのがいいのかな。

Entity Frameworkって3.5 SP1から導入されたみたいだけど、アップデートは4.0でしか行われていないみたいだし。

それにしても、ネット上にあるMicrosoftプログラム開発に関する情報って少なくなったような気がするのは気のせいかな。

ググっても全然引っかからない。

VB6やらAccessの開発全盛時代はちょっと検索すると掲示板やら個人サイトやらの情報がわらわら出てきた記憶があるんだけど。

今そういう人はWebに流れてしまったのかなぁ。

2011-02-11

http://anond.hatelabo.jp/20110210112853

3%タイプしたらあとはIDEが補完してくれるなら、その3%を記述しておけば後はコンパイラがよしなにやってくれる言語をつくればいいんじゃないかな。

(ここでいう「コンパイラ」は広い意味処理系インタラクティブミスを指摘したりインクリメンタルリンクしてくれたり、といった機能も込みで。)

期待しているものと少し違うかもしれないが、既にJava向けのウェブフレームワークでは、必要最低限のコードだけ書くと他の部分を自動生成してくれるようなプロダクトが出てきている。"Spring Roo"とか"Play framework"とかが代表的かな。バックグラウンドでツールを走らせておくと、ファイル変更のタイミングで、自動的にビルドコード生成をやってくれる。

これらは、RoRと同様の生産性を実現しつつ、既存Java資産を活用し、静的型言語恩恵をも受けられるようにすることを目指している。

2010-08-19

アドオンリスト

さてどこから消すか

2010-07-09

ビジネスロジックをストアードプロシージャで実装してはいけない

ストアードプロシージャでビジネスロジックを実装するメリットを認めつつも、以下の点からビジネスロジッククライアント言語で実装できる場合はできるだけそうした方が良いという結論に達した。

ストアードプロシージャと単体テストは食い合わせが悪い

RDBMSによっては無料あるいは有料でソースレベルデバッガを使用できる場合もあるが、通常はクライアント言語デバッグ機能を使う方がはるかに便利だ。何か問題があったときに、どこが問題なのかを見つけることがクライアント言語記述した場合よりもはるかに時間がかかる。

また、Unit Testing Framework(xUnit)も使用できない場合がほとんどだ。

さらに、カバレッジツールは大抵の場合使えないだろう。

ストアードプロシージャは、たいていの場合、静的解析が行えない

ストアードプロシージャ用の静的解析ツールの存在を知らない。巡回的複雑度を知りようにも知るすべはないのだ。それが行えるツールを知らないだけかもしれないが。

ストアードプロシージャは、バージョン管理されたコードとの整合性に問題がある

仮にストアードプロシージャの変更を全てAlter xx等で構成されたSQLスクリプトファイル管理し、それをバージョン管理システムに含めたとしても(というか、最低そうすべきなんだが)、あるリビジョンコード一式に対応するデータベーススキーマを取り出すのは難しいか面倒だ。

ではトリガーはどうなのだ

リガーでビジネスロジックを実装する場合も、上記問題点が全てあてはまる。

さらにトリガーの場合は、どのような場合にどのような処理が実行されるのかを俯瞰することが難しくなるという問題もある。

では一体いつストアードプログラムを使うのか

一つは、Oracleで言うところのストアードファンクション、つまりSELECT等のDML内で使用する関数で、そうした方がパフォーマンス的にも良い場合

もう一つは、複数クライアント言語で同一データベースを使用することが決定済みな場合

ログイン ユーザー登録
ようこそ ゲスト さん