はてなキーワード: adapterとは
家のユニットバスの床が汚い。
水でざっと流そうと思ったがシャワーは固定のやつなので、代わりに洗面台の蛇口にホースを取り付けてザーッと流そうと思った。
早速ダイソーでホースを買ってきたが、蛇口がデカすぎてハマらない。
調べてみると蛇口の口の部分を外してアタッチメントを付ける事でホースと接続できるらしい。
早速ホームセンターに行く。
蛇口はメスネジで、その口径は15cmとして統一規格があるらしい。家から持ってきた蛇口の蓋がホームセンターで売られてる蛇口にハマる事を確認。その蛇口を実験台にする事とした。
とりあえずホースをしっかり掴むHose ConnectorとTap Adapterというのがセットで売られてたのでカゴに入れる。
名前から言ってTap Adapterだけで接続できそうな感じがするが、蛇口と同じくメスネジだし、口径も大きいのでさらにもう一つ、メスネジ同士を接続ししかも双方の口径が違うアタッチメントが必要なようだ。
ホームセンターの水回りコーナーを探してみると、そのものズバリのものを発見。Reducing Nippleというらしい。Nippleって乳首以外にも使うんだと感心した。
15x20cmのReducing Nippleを試す。
Tap Adapter側 (20cm) とはうまく接続できた。
口径は合ってるが、ネジ山の間隔がもっと短くないといけないのだ。
諦めかけたその時、Aerator Adapter Kitというものを発見。
コレは蛇口とも接続出来るし、前述のTap Adapter も付いている。万々歳である。これとHose Connectorを単品で買い帰宅。
その後すぐに、別に洗面器に水溜めてもザッと流せるよねと気付いたが、まぁ良い。俺は俺のやりたい事をやり遂げたんだ。
なにか自分に都合が悪いこと、直面するのがとても恐ろしいことが起こった時。私たちはそれに対峙するか、逃げるという選択肢を採ることができる。
たとえば自分が不祥事の当事者になった時に、周囲からの追及を逃れようとして、雲隠れしてしまうことも逃避の一種だ。
だが、どこにも逃げ場がなくなった時にはどうすればよいか。
自分自身を消せばいい。
自分自身の力で世界を変えることができないのなら、怖れの苦しみを逃れる手っ取り早い方法は、それを感じる意識を消すことだ。
どこにも逃げ場がなくなって、服毒自殺を図ったり、睡眠薬等のオーバードーズを起こすということは、自分自身の情動をやりくりするための戦略だ。それは魔術じみた子供だましに周囲からは見えるかもしれないが、本人にしてみれば、立派な戦略なのだ。
そんなことを言ってた哲学者がいなかったけか。サルトルだったと思うんだが。
La multiplicité des conduites émotionnelles
Suivant les formes prises par l'émotion, la transformation revêt des formes différentes : l’anéantissement des objets (et parfois de la conscience) pour la peur, l’uniformisation de la structure du monde pour la tristesse passive. Le moteur de l’évasion est l’impossibilité de confronter un objet dans le premier cas ou d’adapter les moyens face à la disparition d’une des conditions de l’action dans le second.
情動が採る形態によって、変容は異なる形態をおびる。怖れにたいして、対象の無化(時には意識の無化である)、受動的な悲観にたいして、世界の構造の画一化といったように。逃避を動機づけているのは、まず、対象に対峙できないこと。さらには、行動するための条件が無くなってしまった状況に適応する術を失ってしまうこと。
http://www.cnam.fr/servlet/com.univ.collaboratif.utils.LectureFichiergw?ID_FICHIER=1295877018192
ども。
以前、はてな匿名ダイアリーで日記を書いた者です。
→【Ruby on Rails勉強】 xvideosまとめサイトっておいしいの?
上の記事でも書いていますが、Railsはおろか、Rubyを初めて触った人間がゼロからWebサービスをリリースするために利用しているGemを公開したいと思います。
サイト名 | onalife(オナライフ) |
---|---|
URL | http://www.onalife.com |
説明 | xvideos動画の共有・ユーザー参加型のまとめサイト |
developmentモードで起動する際のデータベースはsqlite3を使うようにしています。
コーディング→サーバー起動→動作確認→コーディング…という流れになりますが、サーバーを起動する際に、
$ rails s
と実行するだけでサーバーが起動できるため大変手軽です。
サーバー起動後はブラウザで http://localhost:3000/ でアクセスすれば開発用のサイトを確認できます。
productionモード(本番環境)で利用するのはMySQLを使うようにしています。
理由は他のWebサイトで推奨されていたため。
sqliteの場合だと、単純にDBのデータをファイルとして扱っており、同時に複数アクセスがあった際、最初のアクセス中にファイルがロックされてしまう仕様との記事をどこかで見たため、MySQLを使うようにしています。
developmentとproductionで動作を分けるには、 config/database.ymlで分けることができます。
development:
database: db/development.sqlite3
pool: 5
timeout: 5000
production:
encoding: utf8
pool: 5
timeout: 5000
よくWebサービスのページ下にある [1][2]・・・[X]といったリンクが表示されている、あれです。
http://memo.yomukaku.net/entries/238
https://github.com/amatsuda/kaminari
Unicorn + Nginx + Rails で構築しています。
効果の違いなどはGoogle先生に質問すると大量に返答がありますのでこちらでは割愛。
ONALIFE(オナライフ)では、xvideosの動画URLや画像パスを抜き出す為に、こちらのGemを使っています。
http://himaratsu.hatenablog.com/entry/2013/04/27/002249
自作するとなるとかなり労力使いますから…こういったところは極力他の人が作ってくれたものを流用してもバチはあたらんでしょう。
https://github.com/mbleigh/acts-as-taggable-on
通常だと管理画面も rails g xxx とかやって controller 作って、 view 作って…とかやらないといけませんが、こちらのGemを使うと一瞬で終わります。
素晴らしい!!
当サイトでは、投稿していただいたxvideosの動画が不適切な場合などに消去する必要があるため、どうしても管理者向けの画面が欲しかったのでこちらを使いました。
データベースを直接操作して delete とかできちゃいます。
http://www.func09.com/wordpress/archives/1136
自分のサイトのアクセス傾向を解析して、どうすればアクセスが伸ばせるか、ということを考察するのに必要不可欠な機能です。
通常、Google Analytics にサイトを登録すると、Javascript のコードが生成されるので、それをWebサービスに貼り付けるだけで完了ですが、こちらのGemを使うと、Google Analytics で生成されるID番号のみを登録するだけで自動的に挿入されるようになります。
まだONALIFE(オナライフ)は発展途上のサービスです。
機能を拡張していくうえで、先人たちのありがたいGemをどんどんこれからも活用していければ、と思っています。
みなさんもこれは便利!というお勧めのGemがあれば是非教えて頂ければと思います。
以上、ONALIFE(オナライフ)で利用しているGem一覧の紹介でした。
http://anond.hatelabo.jp/20101206224349
http://anond.hatelabo.jp/20101203150748
http://anond.hatelabo.jp/20120914214121
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
結構苦労したので健忘録として。。
環境は以下のとおり
yum install mysql-server
/etc/init.d/mysqld start
mysql_secure_installation
jruby -S gem install rails jruby -S gem install warbler jruby -S gem install activerecord-jdbc-adapter jruby -S gem install activerecord-jdbcmysql-adapter jruby -S gem install jdbc-mysql
mysql -u root -p mysql> create database redmine character set utf8; mysql> grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'redmine'; mysql> exit
(任意の場所にRedmineを解凍して、解凍先のディレクトリに移動した後)
cp config/database.yml.example config/database.yml vi config/database.yml
database.yml
production: adapter: jdbcmysql database: redmine host: localhost username: redmine password: redmine encoding: utf8 #development: # # #test: # #
後のwarbleでのエラーを防ぐため、developmentとtestをコメントアウト
jruby -S rake generate_session_store jruby -S rake db:migrate RAILS_ENV=production jruby -S rake load_default_data RAILS_ENV=production
script/serverで起動し、http://localhost:3000 にアクセスして正常に動作するか確認する
jruby script/server -e production
vi config/environments/production.rb config.logger = Logger.new(config.log_path) config.logger.level = Logger::INFO
warble.rbを生成
jruby -S warble config
warble.rbを修正
vi config/warble.rb config.dirs = %w(app config lib log vendor tmp extra files lang) config.gems = ["jdbc-mysql", "activerecord-jdbcmysql-adapter", "activerecord-jdbc-adapter"] config.gems["rails"] = "2.3.5" config.gems["rack"] = "1.0.1" config.webxml.rails.env = "production"
jruby -S warble
できたwarファイルをTomcatに配置して、Tomcatを起動する
mv redmine-0.9.3.war /usr/local/tomcat/webapps/redmine.war /usr/local/tomcat/bin/startup.sh
warblerのバグ(?)でwarに入らないファイルをコピーして入れる
cp vendor/gems/rubytree-0.5.2/.specification /usr/local/tomcat/webapps/redmine/WEB-INF/vendor/gems/rubytree-0.5.2
VMware Tools入れただけで何とかなると思ったら全然だめなんだもの。
Googleで引っかからなかったのは検索方法が悪かったのか…?
どうにか解明したので日本語化しとく
ネットワークに繋がらない場合は以下の方法をおためしあれ。
1. ゲストOS(=NT4.0)上でネットワークアダプタを全部削除
3. VMware上でゲストOSのハードウェア設定からネットワークアダプタを全部削除
6. VMware上でゲストOSのハードウェア設定にネットワークアダプタを追加
8. ゲストOS上でネットワークアダプタ[AMD PCNET Family Ethernet Adapter]をNTのCD(i386の中)から入れる
これで使えるはずー