はてなキーワード: connectとは
Quick Tutorial for Pyramid は公式のチュートリアル
https://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/index.html
$ $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.9-branch
として、プロンプトの問いに答えるとサンプル的なアプリができる。
ghはgithubか。
引数で指定できるテンプレートは https://github.com/Pylons?q=pyramid-cookiecutter
sqlalchemyを使うものは分かるけど、zodbって何?
アプリは以下のようにして起動する。
$ env/bin/pserve development.ini --reload
このpserveというPythonモジュールでアプリ動かしたりする。
超単純なPyramidアプリを作って、WSGIのイメージをつかむ。
app.py を書き写して動かしたらHello Worldが動いた。
viewとURLの紐付けはconfig.add_routeしてconfig.add_viewする。add_viewしてからadd_routeしても大丈夫だった。
viewにはrequestが渡される。requestに色々入ってそう。
waitressは知らないけど、serveでHTTPサーバ作ってWSGIアプリを公開できるのかな?
print('Incoming request')
...instead of:
print 'Incoming request'
Inernal Server Errorになった。アプリのほうではValueErrorでresponseを返すようにと怒られていた。text/plainとか返すには何かしないとダメっぽい。
print(xyz)してみろ、ということかな。1と同じくInernal Server Errorになって、コンソールにはNameErrorが出た。
CGIかな?
Spotify Connectの体験が結構よくて、Spotify Connect対応のスピーカーを探していたんだけど、どれも高くて「うーん」と思っていたら、Gramofonを見つけたので使ってみているがなかなかいい。
残念ながら輸入でしか買えなかったけど、それでも$60くらいで、そんなに高くない。
Spotify Connectは最初「AirPlay/Bluetooth対応スピーカーとそんなに変わらんだろ」と思ってたんだけど、Spotify Connectに対応している機器が全部リンクしてる感じで、PCでGramofonを出力先にして再生して、一旦停止してからトイレに行って手元のiPhoneで再生…みたいなことができて、これがすごくいい。スピーカーと再生機器の一対一の対応の煩わしさがなくて、いい。
AirMac Expressみたいなスピーカーにつなげるような端末は、国内ではGramofonしか見つけられなくてしかも国内の販売はすでに終了しているみたいだから、残念な感じだ。
squidというプロキシサーバーを使いながらHTML5モードでニコニコ生放送(通称:ニコ生)を見るには次の設定をsquid.confに追加すればいい。
acl SSL_ports port 81-86 # niconico
acl SSL_ports port 88-92 # niconico
acl SSL_ports port 99 # niconico
acl SSL_ports port 843 # niconico
acl SSL_ports port 1935 # niconico
acl SSL_ports port 2805-2899 # niconico
acl Safe_ports port 81-86 # niconico
acl Safe_ports port 88-92 # niconico
acl Safe_ports port 99 # niconico
acl Safe_ports port 843 # niconico
acl Safe_ports port 1935 # niconico
適当に書いたけど、もうちょっと削れるかもね。以下に書いてあるポートをGETメソッドとCONNECTメソッドの両方が通るようにすればいいということらしい。
http://qa.nicovideo.jp/faq/show/1112?site_domain=default
特に、squidは既定では、CONNECTメソッドは443,563,873しか通さないのでダメということのよう。
簡単なことだった。
##.fb-like ##.fb-page ##.twitter-follow-button ##.twitter-share-button ##a[href^="http://www.facebook.com/share.php?u="] ##a[href^="https://twitter.com/share?"] ##img[alt="Facebook"] ##img[alt="facebook"] ##img[alt="twitter"] /entry.count? ×15 個 ||hatena.ne.jp/entry/button/$third-party ||connect.facebook.net^ ||fonts.googleapis.com^ ||media.line.naver.jp/js/line-button.js?* ||platform.twitter.com/js/button.$third-party ||facebook.com*/plugins/like.php?$third-party ||google-analytics.com/analytics.js
ふむ
結構止まってるな
昨今話題になってるヤマトや佐川関連のブックマークが上位を占めるかと思いきや、まったく違った。
(2016年12月29日10:54時点、本文、新着順で検索)
Amazonの検索結果 (絞り込み: 3 users 以上) 約 3,423 件中 1 - 40 件目 (0.26 秒)
(以下略)
ECサイトを連想させるトピックがほとんどなくて、AmazonがB2B向けサービスを充実させていることに驚いた。
Amazonって表向きは物流業界に革命と問題を起こしている要因に挙げられているけど、EC以外のインパクトがどれだけ大きいのか門外漢なので分からない。
↑でブクマ付けた人、何が起きるのか教えて
美人は、度が過ぎると暴力なんだと思いましたこんばんは。(挨拶
友人が、理性と共に記憶が飛んだというので、代理でレポを書きます。
まず先に申し上げますと、私は小宮さんのこと、「ラブライブ!サンシャイン!!のダイヤさんの中の人」って認識しかない程度の人間でした。
しかも大変申し訳ないことに、ラブライブ!サンシャイン!!も「そこそこ好き」程度で。
こんな私が、何故いきなり小宮さんのファンミに行くことになったか。
小宮さんのファンクラブに入っている友人が、一人で参加させるには不安なほど小宮さん大好きだからです。
友人(仮名:花子)は、北海道から、この日のためにわざわざ来たんですけどね。
小宮さんのこと好き過ぎて、心臓止まりかねないって、他者から見ても思うぐらい大好きなんです。
もし、花子の心臓が止まったら、私は遺品とその時の思い出を、北海道の花子のご両親に伝えなきゃいけない。
「お嬢さんは、とても幸せな時に天に召されたんです。どうぞ哀しまないでください」って伝えなきゃいけない。
私のせいで、本気の小宮さんファンの方一人分の席奪ってしまう申し訳なさは重々承知です。
それでも、付き添って一緒に参加してあげなきゃ!と思うほどに心配だったんです。花子の心臓が。
延々知らない曲が続くライブなら辛いけど、トークとかコーナーが中心っぽかったので、それなら大丈夫だと思っていた前夜。
花子「カレンダーのお渡し会がある。カレンダー欲しい。絶対欲しい。カレンダー欲しい。カレンダー買いたい」
まだ漢字フルネームで書けるかどうかも怪しい声優さんのイベントの物販に、朝8時から並ぶことが確定したそんな夜を過ごしました。
そうして迎えた当日の朝8時。
既に100人近く並んでたんです。正直、色々ナメてました。
あと、男子99%くらいかと思ってたら2~3割くらい女性だったのもビックリ。「小宮さんしゅごい」って思いました。
トータル4時間ぐらい、クッソ日陰の中、時折ゴジラがぎゃおーんする中並び続けて、無事お渡し会のチケット?整理券?もゲット(花子が)
ちょっと腹ごしらえして、開場の時をソワソワしながら待つ(花子が)
開場に入ってまず思ったことは「ちっか!!!!!!!!!!!!」。
花子が謎の引きを見せて、前から3列目ぐらいだったんですよね。私なんかがこんな所から見るの本当にマックス申し訳ない。
開演までの間に、花子と、「端っこがいいか。出来るだけ真ん中に近い方の席がいいか」でウロチョロ席交代。
ようやく腰を落ち着けたと思ったら、案外すぐに開演。物販の開始といい、開場時間といい、開演時間といい、基本的にタイムスケジュール通りなのしゅごい。
MC担当の芸人さんのトークが面白くて、客いじりのさじ加減も絶妙で、「あ、このイベント普通に楽しめそう」って安堵感を覚えました。
~追記1~
痛車乗ってたり、全局同時にアニメ放映したとしても全部録画出来る環境整えてたり、何故かLOVELESSの最終回を工事のおっちゃんと見たりする。
テレビじゃなくてライブで積んできた感ある人だった。トーク本当に面白かった。
~追記1終わり~
そして定番の注意事項説明が終わって、「では、小宮さんどうぞーーーーー!」って流れでね。
出てきたんですよ。
とんでもないのが。
あ、ごめんなさい。サンタ服!!!!!!!!!!!!!!!!!!
脚ほっそ!黒タイツ太ももほっそ!黒タイツサンタ可愛いかよ!!
あんな美人でサンタで黒タイツなのに、自己紹介から3分もしないうちに、サンタ服の白いモコモコ部分が痒いのか、肘のあたりを掻きながら喋る小宮さん。
何せあんまり前情報がないもので、顔立ち+「ラブライブ!の声優さん」だからもっと萌え路線狙いなのかと思ってたんです。
肘ポリポリ掻きながら喋りよった、あの人。「暑い💢」つってサンタ帽脱ぐし。
<最初のコーナー>
事前に、ファンから募った小宮さんへの質問に、小宮さんが答えてくれるコーナー。
小宮さんの解答が大変雑なのが、とても可愛かったです。
ファンが「即興劇とか見てみたいです」ってリクエスト送って来てるのに、「時間が勿体無い!」ってバッサリ終わらすの可愛い。
結論、とちおとめを買わなきゃって思いました。(イメージキャラクターしてるって宣伝もしっかり挟むところ素敵です)
<2個めのコーナー>
9割眠そうだったのと、「食レポ下手くそかwww」ってところが大変に可愛いと思いました。
あと小宮さんの「恥ずかしいって感情が欠落してる」って発言もキュンとしました。
<3個めのコーナー>
小宮さんからサイン入りグッズをプレゼントして貰えるコーナー。くじ引きで、呼ばれた座席番号の人が当たり方式。
しかも、小宮サンタが直々に客席まで持ってきてくれるという、出血大サービスが過ぎるサービス。
ラインナップは、グッズ販売されてたもの一式と、1st写真集。
そして、特賞が、「自分の携帯に、小宮さんからのメッセージを録音させてくれる」というもの。
「うわぁ、それ当たった人、逆に可哀想だな…」って思いました。
そんなんされたら人生狂うやんか、って。
花子、当たってやんのwwwwwwww特賞wwwwwww
でも、ワイより、花子こそ真ん中に近いところ行くべきだと思って、席変わったんです。
そしたら、とんだ女神の戯れが花子にメガヒット。メテオストライク。
ボイスレコーダーに録音するからって、すっごいシーーーーンとしてくれる会場の皆さん。
「メリークリスマス♥はーなさん♪」って両手を口元に添えて、めっちゃ可愛い声出す女神。
( ˘ω˘ )スンッ って顔する花子(本当にした)(ガチでした)
居た堪れなくなって「生きてる?!」ってツッコミを入れてしまったワイ
ようやくこのコーナーが終わり、小宮さんはお色直しで、一時退場。サンタ服で歌うのか?また肘痒くならないか?って思ってたので一安心。
<幕間>
ライブ慣れが凄い方だなって思いました。よくあんな時間調整しながら上手いこと笑かしてくるなと。
<ライブコーナー>
どちゃくそ可愛いワンピース着て戻って来た小宮さんのお歌のコーナー。
~MC~ゴバスが小宮さんにとって大事だってお話。昔からのファンなら感涙モノだろうなと。
4:プラチナ(カードキャプターさくら)
~MC~各作品についての思い出。意外とオタクなんだなと知った瞬間。
~MC~マクロスが好きってお話。そして、グッズの宣伝タイム。「はー暑いなー。汗がもうね~。あー、タオルで拭こう…あれ?!このタオルは?!」という茶番可愛いかよ。
聖子ちゃんと、どちゃくそ可愛いワンピースと、ライブグッズのマフラータオルのミスマッチ感凄い。
ワンピースって言っても、ふりふりふわふわじゃなくて、シックめな感じだったの。
可愛い女の子じゃなくて、美人な女性が似合う系ワンピースだったの。
キュートな曲を、シックな服着ながら、ロックめにマフラータオルかけて、女神レベルの美人が歌うから、脳みそが何を思えばいいか分からなくなった。
ちなみに、星間飛行の
手つきがね。
超ぉ~~~~~~~~~~~~~~~……………絶色っぽかった。
「あーなたが好きよっ♪」ってところでバキューーーンされた時も、2016年恐らく最後の膝抜けを味わったけど。
私参加したの昼の部だったんですが、夜の部では、星間飛行がラストの曲になってたって聞いて納得でした。
皆の認知度と、乗りやすさと、小宮さんの可愛さ発揮具合がベストマッチだったんだと思います。
もちろん他の曲も全部とても可愛かったし、楽しかったです!
長くなりましたが、小宮さんのイタズラっぽい顔がハンパなく好きになりました。
余談ですが、家について、花子の携帯に録音されてたボイス聞かせてもらったんです。
「メリークリスマス♥はーなさん♪」
の
「はー↑」って上がるところが可愛すぎて、「メリークリスマスが過ぎる💢💢💢💢」ってキレたくなりました。可愛すぎて。
~追記2~
どうやら夜の部の同じコーナー(プレゼントの)で、
前「さっき、友達に『生きてる?!』ってツッコまれた人おったね』」
小「ね~!あんなに喜んでくれるなら良かったです!」
~追記2おわり~
あくまで両サービスについてなので、LINEやAWAやAppleでは、とかいわれても知らんがなと言っておくし
邦楽少ないとかいわれても知らんががなとしか言えないので、どちらかというと洋楽ファン向け
【GooglePlayMusic】
・当然といえば当然だが、Androidとの相性は最高
・キムタク嫁もあるよ
・良くも悪くもさっぱりしたUI
・洋楽に関して
曲名やアーティスト名によって違うがカタカナと英語の混合表記だったり、オールカタカナだったり
例えばWEEKENDの新作はオールカタカナでちょっと萎える "オール・アイ・ノウ” ”シークレッツ”こういうのがヅラっと並んでる
どうやら国内で作られたプレイリストしか検索できない&まだそれほど数もない
GooglePlayMusicJAPAN作成は検索されるがGooglePlayMusic作成では表示されないし、再生エラーでで再生できない
【Spotify】
BillboardやNMEなども独自にプレイリストを作成してたりする
・(個人的に)すごいごちゃごちゃしたUIでみにくいいたらありゃしない
・プレイリストでは日本人アーティストでもローマ字表示されるので↑の理由で分かりにくい
例えば「疲れた」時に聞きたいリストを探す時は”tired”で検索すべき
・Spotify Connectと呼ばれる、他デバイスでの再生機能くっそべんり
・ユーザー名の変更できない 変更したければ解約、再登録 Facebookから登録した場合本名になるので要注意
【総評】
両サービスとも洋楽に関しては、アーティストの意向で配信されてない例外もあるが
日本でもメジャーなアーティストや曲は揃っているので総曲数とかはあまり気にならない
コアな所では、個々の嗜好もあるのでなんともいえないが、自分ではかなりコアだと思ってるバンドはどちらも配信されてた
GooglePlayMusichはプレイリストの件がちょっと致命的
でどちらがいいってことにだけど現段階では
さくっといくならGooglePlayMusicがとてもいい
iOS 10でミュージックアプリが無駄にリニューアルされてクソ使いづらくなってるんだけど、まぁそれはいつものことだからしょうがない。
でも一つだけ許せないことがある。下のメニューに「プレイリスト」がなくなっている。
過去にも確かApple Musicが始まった時期にデフォルトで表示されなくなったが、Apple Musicをオフにしたりすると表示されていた。でもiOS 10ではもう表示されないみたいだ。
「ライブラリ(全部ここから辿るしかない)・Connect(使わない)・Radio(使わない)・検索(使わない)」
使わないボタンが4分の3もある。今ではここにプレイリストがあったからあまり気にしてなかったけど、プレイリストを消してまでこんな意味ないショートカットを残すのはなんなの?iPhoneをDAPとして使わせたくないの?
ある既存iOSアプリがあって、画像だけ差し替えた似たものを自動で量産したい
できるわけないよね。
twitterのツイートを増田に埋め込む方法を丁寧に書きます。
*さっき一部の半角文字を増田で書けないと書きましたが数値文字参照にすれば書けました。訂正します!教えてくれた人あんがとー!でもスーパーpre記法ではこのやり方通用しなかったのでシンタックスカラーは無し。
twitter.comに行き ツイートの ... ボタンを押す。ツイートをサイトに埋め込むを押す。そうすると以下のHTML要素がコピー出来る。ここではサンプルにしても無害そうなifttt公式アカウントのツイートを引用します。
<blockquote class="twitter-tweet" lang="ja"><p lang="en" dir="ltr">Connect <a href="https://twitter.com/instagram">@Instagram</a> to <a href="https://twitter.com/Dropbox">@Dropbox</a> and automagically save every photo you post for safe keeping <a href="https://t.co/YVrgcSJZAD">https://t.co/YVrgcSJZAD</a> <a href="https://t.co/3vEiFZ3ADW">pic.twitter.com/3vEiFZ3ADW</a></p>— IFTTT (@IFTTT) <a href="https://twitter.com/IFTTT/status/662023324306837504">2015, 11月 4</a></blockquote> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
まあ増田を書く
先ほどのHTML要素のうち末尾のscript要素は引用する際,埋め込んだtwitter引用からはみ出て表示されるので邪魔です。取りましょう。
末尾のこれを取ります。
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
そうするとこうなります。これを増田にそのまま貼り付けてください。
<blockquote class="twitter-tweet" lang="ja"><p lang="en" dir="ltr">Connect <a href="https://twitter.com/instagram">@Instagram</a> to <a href="https://twitter.com/Dropbox">@Dropbox</a> and automagically save every photo you post for safe keeping <a href="https://t.co/YVrgcSJZAD">https://t.co/YVrgcSJZAD</a> <a href="https://t.co/3vEiFZ3ADW">pic.twitter.com/3vEiFZ3ADW</a></p>— IFTTT (@IFTTT) <a href="https://twitter.com/IFTTT/status/662023324306837504">2015, 11月 4</a></blockquote>
確認するボタンでツイートが埋め込まれてないのであれ?と思うかもしれませんがそのまま「この内容を登録する」を押してください。
増田のタイムラインでも埋め込みツイートは表示されずたんなる引用として表示されます。あれ?となるけど書いた増田記事の本文URLを開いてください。本文を表示した場合のみツイートが埋め込みで表示されます。
Connect @Instagram to @Dropbox and automagically save every photo you post for safe keeping https://t.co/YVrgcSJZAD pic.twitter.com/3vEiFZ3ADW— IFTTT (@IFTTT) 2015, 11月 4
応用すると以下のようにツイート内にインラインされている動画を増田にインライン出来るなど夢が広がりますね。あと増田はコードサンプルを書くにはクソですね。
気づいてない人も多そうですが、『マッドマックス 怒りのデス・ロード』の主役マックス役は10;『ダークナイト ライジング』でベインを演じたトム・ハーディです10;https://t.co/cJ816F5Mpu 10;https://t.co/Qh0iuQKFTl— アメコミ大全集(TM) (@amecomic) 2015, 12月 1
半年使っててやっと直し方が分かった。
自分以外でも困ってる人がいるかもしれないので備忘録として書いとく。
・問題
車にFMトランスミッターをつけ、Xperiaのイヤホン経由で音楽を聞くという
使い方をしているのだが、イヤホンを付け外しするごとに音量が一定値に戻るため、
音楽を聴くごとに音量ボタンをポチポチし好みの音量にするという行動を繰り返していた。
今までは、ああそういうもんなのかなと、いちいち直し直し使っていたのだが、最近の私生活の
影響もありイライラが溜まりに溜まりどうにかならんもんかといじってたら直し方を見つけた。
・方法
初期設定では「家で音楽を聴く」がONになっているはずなのでそれをタップ(スライドボタンじゃなくてその文字を)
条件設定の画面に移るがここは関係ないので右下の「→」をタップしステップ2へ
アクション設定画面、ここの開始アクション段の「音量」をタップ
音量の設定画面が出てくるので好きな音量の位置に変更しOKをタップ
これで直った。
※正確にはイヤホンを挿すごとに音量は変化しているのだが、それが自分の設定した音量と同一になっているので
特に支障は無くなった。
・感想
設定内に音設定という音量関連の設定項目があるため、無駄に混乱した。
イヤホンを挿せば自動で音楽プレーヤーが立ち上がり、再生が始まる、という機能自体はとても良いと感じていたのだが
それがスマートコネクトというシステムによって実現されているということを初めて知った。
この機会にスマートコネクトという機能があることを知り、うまく使えばとても便利そうだと感じた。
イヤホンを外すと音楽が止めるのだが、音量は元に戻らない(スマートコネクトで設定した位置のママ)ということが納得がいかない。
(今はどちらも同一の音量位置にしているのでいいっちゃいいのだが)
http://anond.hatelabo.jp/20141223221949
はてなにちは!
今日は増田クリスマス会ということだけど、平日の20時に会社のPCからIRCなんて参加できるわけないだろ!と思い、手持ちのiPhoneからなんとかできないかと試してみた。
iPhoneからIRCなんてこんな機会じゃないとやらないし、有料のアプリ買うほどでもないなと無料のクライアントアプリを何個か試してみました。
この中だとTurboIRCとIRC999が及第点という感じ。
nickname名いれてconnectしてjoinコマンドうつだけ。かんたん。
ただ、画面がPC向けで使用ブラウザによっては使いづらい感じ。
chromeで安定という感じ
接続後放置しているとタイムアウト起こして勝手に切断されちゃいます。
例えばchromeで接続後にバックグラウンドに回してると気付いたら切断、みたいな。
ちゃんと測ってないけど2,3分程度で切断されるみたいなので、たまに画面を見てあげる必要があります。
※文字を打ち込んだりまではする必要ない
切断された場合はポップアップが出るのでOKを押して、更新かけてログイン画面からやり直しになります。
そんなわけでみんなクリスマス会やろう
追記。
irc.anonops.com
/JOIN #MerryChristMasda hatena
https://twitter.com/hatebu/status/506664337432276993
https://twitter.com/hatebu/status/506664337432276993:embed]
はてブって (71 users) http://t.co/4cj28E2hDj 50件のコメント http://t.co/ECpc7QemKA— はてなブックマーク::Hotentry (@hatebu) 2014, 9月 2
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
https://www.facebook.com/hatenablog/posts/685197954896310
https://www.facebook.com/hatenablog/posts/685197954896310:embed]
<script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/ja_JP/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>join
〔+目的語(+副)〕〈…を〉接合する,結合する 〈together,up〉.
用例
He joined their hands together. 彼は二人に互いに手を取らせた.
combine
結合する
The company combined with its closest competitor.
化合する
combine mercury and oxygen
〈…を〉(結合して)一体にする,合体させる 《★【比較】 join together より形式ばった語; ★【類語】 unite は二つ以上のものを結合して新しい一つのものを作る; join は二つ以上のものを接触させて結合・連結する; connect は互いの独自性を保ったまま何らかの手段・道具を用いて結合する》.
amalgamate
merge
〈二つ(以上)のものを〉併合する; 溶け合わせる 〈together〉《★【類語】 ⇒mix》.
a
〈…を〉〔…に〕溶け込ませる,没入させる; 併合する 〔into〕.
The companies were all merged into one giant conglomerate. 会社は全部併合されて巨大な複合企業になった.
混ぜる 《★【類語】 mix は「混ぜる」の意味ではもっとも一般的な語で,結果的に各要素が(大体)一様なものになる時に用いる; mingle は分離して識別できる要素を混ぜ合わせる; merge は混合して各要素が区別できなくなる,またはひとつのものを他の中に吸収する; blend は異種のものを混ぜ合わせて希望の品質のものを作り出す》:
mingle
〔+目的語(+together)〕〈二つ(以上)のものを〉(各要素が区別できる程度に)混ぜる,一緒にする 《★【類語】 ⇒mix》.
blend
【言語学】 混成語,かばん語 《2 つ(以上)の語が混交して 1 語になったもの; 例: brunch<breakfast+lunch/smog<smoke+fog》.
stir
1a
〔+目的語(+副)(+with+(代)名詞)〕〈液体・火などを〉〔…で〕かき回す,かき混ぜる 〈up,around,round〉.
用例
stir one's coffee (with a spoon) (スプーンで)コーヒーをかき混ぜる.
b
〔+目的語+into+(代)名詞〕〈…を〉〔…に〕入れてかき回す,かき混ぜる.
用例
jumble
〈書類・衣服・考えなどを〉乱雑にする,ごちゃまぜにする 〈up,together〉.
用例
Don't jumble up [together] the things in the drawer. 引き出しの中の物をごたごたにしてはいけない.
adulterate
coalesce
合体する
次回
http://anond.hatelabo.jp/20120917013417 の続き。
前回は、使ってるモジュールしか書かなかったんで、具体的な使い方を、
my $condition = SQL::Maker::Condition->new; $condition->add('colom1' => "$value1"); # colum1 = $value1 $condition->add('colom2',{'like' => "%$value2%"}); # colum2 like '%$value1%' $condition->add('colom3',{'between' => ["$value3","$value4"]}); # colom3 between $value3 and $value4 my $q = SQL::Maker::Select->new(driver => 'XXXXX'); # XXXXXは、MySQL等の指定をする # where句に条件を設定 $q->set_where($condition); # where句を抽出。select項目やテーブルの指定を全くしてないので、$sql_conditionには # "FROM WHERE (colum1 = ?) and (colom2 like ?) and (colom3 between ? and ?)" という文字列がセット my $sql_condition = $q->as_sql(); # "FROM" を消して、WHERE句だけにする $sql_condition =~ s/FROM//; # 設定した条件の配列 my @binds = $q->bind; # SQLの読み込み(条件部分をのぞく) open my $fh, "<", "./sql.txt"; my $sql = do{ local $/; <$fh>}; close $fh; # 生成したWHERE句とソート順をSQLに追加 $sql = $sql.$sql_condition; # コネクションを取得 my $conection = DBI->connect($datasource) or die ( 'could not connect' ); my $sth = $conection->prepare($sql); # 条件に値を埋め込む for(my $i = 0; $i<= $#binds; $i++){ $sth->bind_param($i+1,$binds[$i]); } # SQLの実行 $sth->execute;
という形でやってます。
(増田だとpre記法でも「<」「>」が正しく変換されないんで、読み替えてください。
やろうと思えば、select項目や読み込むテーブルもPGの中で指定して組み立てることも
出来るんだけど、そこまでやると面倒くさいし、そこまで動的にコントロールする必要が
当サイトでは無かったんで、条件部分のみ動的に変更できるようにしてます。
動的SQLをperlで作ろうと思っている人の参考になれば幸いです。
参考
http://search.cpan.org/~chiba/SQL-Maker/lib/SQL/Maker/Select.pm
http://search.cpan.org/~chiba/SQL-Maker/lib/SQL/Maker/Condition.pm
じゃあ、個人情報を不正に送信していたというandroidアプリについて。
android恐ろしいね。Google Playでこれらが掲載されていたというから。
まるでパソコンみたい。少なくともこれまでの「携帯電話」じゃない。
私はスマートフォンを持っていないし、こういうニュースがあれば欲しいとも思えない。
「Androidに見つかったパーミッションモデルの欠陥」ITpro世界のセキュリティ・ラボから 2011/12/15
http://itpro.nikkeibp.co.jp/article/COLUMN/20111213/376521/
警視庁が家宅捜索を行ったようだけど、どうして会社名出てこないのだろう。
容疑の段階だからだろうか?
警視庁が不正指令電磁的記録供用容疑で、東京都内のIT関連会社や同社関係者宅など数カ所を家宅捜索していたことが18日、分かった。
「都内のIT会社を家宅捜索 警視庁、ウイルス供用容疑」47NEWS 2012/05/18 11:11
http://www.47news.jp/CN/201205/CN2012051801001341.html
ほかのニュース記事も探してみたけれど、どこにも名前が出てこない。
危ないというアプリの名前は公表されているから、ユーザーは対策とれるだろうけれども。
ちなみに。
シマンテックは、これらのアプリを Android.Dougalek として検出します。ノートン モバイルセキュリティは上にリストしたアプリをすべて検出するほか、類似の特徴を持ちながらまだ特定されていないアプリも検出します。
<中略>
報道によると、警視庁は今回の問題について調査を開始し、Android.Dougalek の作成者の特定に動いているようです。
「日本の Android ユーザーから個人情報を盗み出す "The Movie" マルウェア」Symantec Connect Community 16 Apr. 2012
If users want to prolong battery the efficient use of the time, in addition to the quality of the charger to have the guarantee, the right skills and charging is essential, because of low quality charger or wrong charging methods would affect battery time and life cycle, the following is about to charge skills:
1. The battery before they leave the factory, manufacturers were activated processing, and the charge, so the battery are more electricity, my friends say battery charging adjustment period in accordance with the time, standby still seriously insufficient, assuming that the battery is really quality goods battery of words, this kind of circumstance should extend the setting and then 3 ~ 5 times fully charge and discharge.
2. If new phone is lithium ion battery, so before 3 ~ 5 times charging commonly known as adjustment period, should be charged more than 14 hours, in order to ensure that the fully activate lithium ion activity. The lithium ion battery no memory effects, but have very strong sui sex, should give full activated PANASONIC CGR-D220 Battery, to guarantee the use of after can reach the right performance.
3. Some automation intelligent quick charger when instructions lights change, said only full of 90%. The charger will automatically change with slow charge will batteries. Best will use after batteries, otherwise, it will shorten use time.
4. Before charging and discharging lithium battery does not need special, but will not discharge damage to the battery. As far as possible when charging at the slow ChongChongDian, reduce the way quick charge; Time don't more than 24 hours. The battery after three to five times fully recharge cycles of internal after chemical will be all "activate" to achieve the best use effect.
5. Please use the original or the reputation of the good brand charger, li-ion battery to lithium battery charger with special, and follow the instructions, otherwise, it will damage to the battery, and even dangerous.
6. Have many users often in charge still leave her cell phone, actually such will be very easy to PANASONIC CGA-S101E/1B Battery damage the service life of the mobile phone, because in charge of the process, the circuit boards of mobile phone can calorific, if this time more exotic phone, may produce instant backflow current, internal parts to mobile phone damage.
7. The battery life depends on the number repeatedly charging and discharging, so should try to avoid more battery electric charge when, this will shorten battery life. Cell phone time more than 7 days, supposed to completely discharge the cell phone battery, enough electricity before use.
8. The cell phone battery have self-discharge, need not when the nimh batteries will press the residual capacity every day, about 1% of the discharge, lithium battery every day to 0.2% ~ 0.3% discharge. In for the battery, try to use the special socket, don't will the home appliance such as the Shared and the TV charger socket.
9. Though the phones in the network coverage area, but in the cell phone charge, cell phones have been unable to accept and call. At this time, can use of the mobile phone is not transfer function, will be transferred to the mobile phone side of fixed telephone in order to prevent calls lost, this kind of method for mobile phone is not in the network coverage of the area or weak signal and temporarily unable to the applicable also.
10. Don't will be exposed to high temperature or cold PANASONIC DMW-BCG10E Battery , as the dog, should not put the phone on the car, and the sun blazed through the; Or get air conditioning room, in air conditioning to be blown continuously place. When charging, the battery is a little heat is normal, but can't let it what the high temperature "suffer". In order to avoid the happening of this kind of circumstance, had better be in charge at room temperature, and don't cover anything on the mobile phone.
11. Nickel cadmium (N iCd) before the battery must ensure that the batteries are no electricity, recharging the battery must ensure that sufficient electricity after.
12. If the cell phone battery placed too long and not use, the best maintenance department to cell phones to the application for a live processing, also can use a constant dc voltage is the voltage adjustment for 5 ~ 6 V, current 500 ~ 600 mA reverse connect battery. Note that a touch namely release, the most repeated three times can, through such treatment after another, with the original adapter to "adaptation" charge.
13. Charge is not as long as possible, to no protection circuit batteries that should stop after charging, or the battery will with fever or overheating impact performance.
14. Lithium ion battery must choose special charger, otherwise may not reach the saturated state, affect their performance. Charging completes, should avoid to place in charger on more than 12 hours or more, long-term need not when should make a battery and cell phone separation.
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.
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.
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.
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.
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
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 Ω.
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.
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 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
これからWordpressを始める方、あるいは始めている方が
Wordpressのプラグインを探す際に便利になるかな、と思いまとめてみました。
(1)基本的なプラグイン
2011年版!絶対にインストールしたいWordPressプラグイン45個|Vanilla Rock
http://vanilla-rock.com/blog/wordpress/45-absolutely-install-wordpress-plugin/
Wordpressを始めた人が最初に見ておくと、何かと便利かと思います。
WordPressでブログを作ったら入れるべき27個のプラグイン|AUTHORITY SITE
http://www.authority-site.com/2010/04/wordpress/27-wordpress-plugin.html
記事内やサイドバー内で、PHPを扱うことができるものなどの紹介。
使用中のおすすめWordPressプラグイン15個 | Webクリエイターボックス
http://www.webcreatorbox.com/tech/recommended-wordpress-plugin/
フォーム用キャプチャのプラグインReally Simple CAPTCHAや、
管理画面に行かなくてもタイトルや本文、カテゴリー名などを編集できるFront-end Editorなどの紹介。
WordPressプラグイン 必須なものから便利なちょっとしたものまで(Webデザインレシピ)
http://webdesignrecipes.com/my-favorite-wordpress-plugins/
記事中の画像を1枚だけ取得してサムネイル表示してくれるPost Thumb Revisitedや、
携帯電話から記事を投稿できるKtai Entryなどの紹介。
あまり知られていないかもなSEO関連のWordPressプラグイン集:phpspot開発日誌
http://phpspot.org/blog/archives/2011/03/seowordpress_1.html
かなりマニアックなSEOに関するまとめです。検索対策にこだわりたい方向けです。
クライアントに頼まれやすい機能を補えるWordPressプラグインいろいろ-かちびと.net
http://kachibito.net/wordpress/plugins-for-commercial.html
アップロードした画像を一括で記事内に挿入できる、File Galleryや、
管理画面TOPにメモを加えるQuickNotes on WP Dashboardなどの紹介。
特集記事や新着記事を見栄えよくスライドショーしてくれるWordPressプラグインまとめ « Web制作覚え書き
http://webdevtoolsoboegaki.wordpress.com/2010/06/22/%E7%89%B9%E9%9B%86%E8%A8%98%
E4%BA%8B%E3%82%84%E6%96%B0%E7%9D%80%E8%A8%98%E4%BA%8B%E3%82%92%E8%A6%8B%E6%A0%84%
E3%81%88%E3%82%88%E3%81%8F%E3%82%B9%E3%83%A9%E3%82%A4%E3%83%89%E3%82%B7%E3%83%A7%E3%83%BC/
イメージをフェードイン・アウトしてくれるプラグインWordPress Content Slideなどの紹介。
(URLが長いので繋げてアクセスするか、記事名で検索するかしてください)
WordPressでサイトを構築した際に活用したプラグイン5個+α - id:HolyGrailとid:HoryGrailの区別がつかない日記
http://d.hatena.ne.jp/HolyGrail/20110228/1298889864
会員登録時に必要な項目を追加する、Cimy User Extra Fieldsなどの紹介。
WordPress 3.0対応のとっても便利なプラグイン集|コリス
http://coliss.com/articles/blog/wordpress/plugin/best-plugins-for-wordpress-3.html
管理画面のメニューに好きなアイテムを追加できるFavorites Menu Manager
や、投稿編集ページにカスタムフィールドのHTMLを挿入できるInsertMeta ShortCodeなどの紹介。
WP Social Bookmarking Light | NINXIT-BLOG
http://www.ninxit.com/blog/2010/06/13/wp-social-bookmarking-light/
はてぶ、Facebook、Twitter他、表示させたいものは各々で選択可
WordPress用Twitterコメントシステムプラグインリリース!– [Mu]ムジログ
http://musilog.net/webdesign/wordpress/twitter-anyware-comment-system.php
RTしてくれたTwitterの呟きがコメント欄に全文表示されるプラグイン “BackType Connect”がとても良い!
[WordPress] [Twitter] [net] | No Second Life
http://www.ttcbn.net/no_second_life/archives/1144
1つ上のと同じような機能です、お好みでどうぞ。
WordPresプラグイン「Twitter tools」のバージョンアップ版のインストールと設定、使い方を日本語で解説!:WordPress|アマモ場