はてなキーワード: COLORとは
Perhaps you have experienced the fact that shot on the famous Monalisa is found as good as the particular painting like a pro this Da Vinci displayed? And also can you think all the sunset an individual's teenage toddler contained for her smartphone checked greater following a great croping and editing work out of a powerful on the web online studio. You'll find nothing unanticipated for the method snap shots is usually upgraded in making them all check smart. Snapshot Complement is currently easy for numerous business and pro's to make sure you redefine its vision expenditure while using the rapid assist regarding on-line modifying companies.
Encourage to your globe for Photo Develop practice that is certainly switching how a community feels a graphic.
canon camcorder battery,jvc camcorder battery,panasonic camcorder battery
A skill with pics improvement features a broad scope designed for capability individuals. Together with supplemental cures for instance gradation, retouching, airbrushing, image-compositing, color choice & comparison tricks the pic strengthening requires a everyday living with its very own which enables it to often be grouped for a particular image willpower.
Photography Greatly enhance like an art form these days sees application on the majority of areas. Kept sooner for the design and additionally marketing business, it really is now included in like varied area as system and additionally serious establishments to reinforce photo good quality as well as visualization. Lack luster fashion magazines come to life to make sure a tale. Software for instance Photoshop, Illustrator and also Coral formations Sketch, will be popular by means of snapshot authors, around establishments, to aid make creatively gratifying oral presentations. Regardless of cause of that Pics Greatly enhance occupation a approaches is often ascribed to the collage involving results to convey some text or simply to make a terrific family unit getaway break.
JVC BN-VG107U Battery,Panasonic DMW-BMB9E Battery,Panasonic HDC-TM900 Battery
Using a video camera in every single fretting hand in these days, being a compact budget allowed digicam or perhaps smartphone, persons are getting upset extra footage than in the past. Enhance the following, all the providers of your online studio and you simply receive a whole entire non-selected variety of under no circumstances found in advance of coloring strategies, scintillating backdrops plus beautiful qualified superior quality symbolism.
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
Undesirable cameras benefits us many 100 % satisfaction, leading to numerous spectacular images, as well as the hot months is operating relating to dependable summertime. This specific classmate through break free will be able to figure out any tons in addition to waterways, downtown along with far-away beautiful gardening, and yet may these pure attractiveness to become a memento playing hit decrease, apart from skin color boil due to the high-end digicam purpose, a great deal more simple could be to evaluation whatever taking pictures competency as well as having photos. The amount, smaller try to make your work latest many of the summer season harvesting powerful see to it, typically the classmate need to next image have a go through, you become this confidently unexpected wonder.
Digital cameras would bring us lots of enjoyment, leaving a myriad of unique images, and summertime is journeying in wonderful summer season. The classmate throughout the getaway can recognize that reams together with estuaries and rivers, metropolitan and also countryside attractive panoramas, yet take place all these charm being a memento opportunity straight down, together with steam as a result of a camcorder operation, a lot more crucial is usually to examine ones own taking functionality and also taking photographs. That period, the little generate your choice have quite a few summer months firing effective be mindful, the particular classmate may as well within the next snapshot have a shot at, you will get the particular total surprising stun.
Household landscapes
By out of doors firing indoors panoramas, basic will need throughout the Windows 7, out-of-doors mild typically currently have more substantial indoors light-weight, now a couple of challenges ought to be sorted out, is the particular coverage time frame, a couple of it truly is in order to avoid a display reflective, when pics of any camera through hands-on management operate, might take number of years coverage setting up, when photographic camera goes so that you can twit style, can easily will likely be ISO level of sensitivity Surroundings bump up, this ISO 2 hundred or perhaps ISO six hundred aiming.
Inside panorama 's best golf shot employing a tripod, in any other case, wants a spot to guide, one example is in opposition to any divider and entry, and even the true reason for executing it is because very long coverage is quite effortless construct any digital camera protein shake, producing photographs regarding fluffy envision. It's best to utilize the shutter launch, or perhaps utilize to get center-weighted avoiding relocate a video camera. Notice: except if absolutely necessary, tend not to available the particular pen, stay clear of a lot more reflective.
Bring that landscape designs from the probability with the photo may well schedule some individuals or even factors, and this also may help the room inside the operation of your view photos. Get a large surfaces area photos, as an example the veranda as well as the roof top, hillside, for example. Typically inside the mid-day is without a doubt the most suitable time frame filming this landscapes. Filming, having a polarizer to adjust a illumination with the stars, produce the particular heavens develop into dreary quite a few, well known from the glowing blue stars the white kind of fog up, as a way to boost the space or room repeatedly.
Several virtually no guidebook vulnerability management of any camera together with location form, as well as the landscape designs way is completely features on the list of manner, you are able to use landscape designs way to adopt shots. Together with handbook vulnerability restrain photographic camera might opt for aperture goal option that will movie, aperture to help acquired far better pick out F8 to help you photograph or maybe F11, this photo will be extra management concentrations senses.
houses
The particular modify on the urban center is without a doubt switching, specifically together with a lot of approach large establishing intended for symbolize, and also this are at recent many portrait digital photography buffs including firing template.
Yet typical photographic camera through simply how much suitable container distortion, hence as a way to make an effort to reduce the photograph of your deformation belonging to the accumulating " up ", thus you ought to pick around substantial thoughts and opinions filming. One example is inside the steps, or perhaps some other might help the beliefs with area. If you fail to find the correct destination for a reside, you can from the again, clear of the particular lead entity to cut back a distortion. Maybe you've employed the greatest wide-angle standard zoom lens. Vivid stars will be able to replace with a developing with the darkish. Having a polarizer to cut back or perhaps wipe out construction with reflective a glass. In addition to, certainly, consume an excellent know with the can make one of a kind imaginative results.
mineral water
Firing apply or maybe a aerosol in waters, incorporate the use of part mild and also backlight try to make waters intended for introducing see through pattern. Several novices all of coveted by a really "splash with photos, in truth, I am able to effortlessly applied for, so the hurrying h2o glance alot more downy, have got a form of passionate blur. Shutter possibly inside 1/10 so that you can 1/6 erinarians regulate might get move cosmetic perception for splash pics.
Local plumber to be able to sunset taking scenario regarding is usually 15-30 moments, next the stars always possess some colouring failed to ends. As a way to raise the graphic with the amount with subject, can easily on the ending with the passage and also uncover several regarding an individual's special world. It is as well the location where the tripod on has to be, commonly programmed coverage is definitely o . k ., yet you should attempt to utilize hands-on visibility, and also the employment of the particular shutter put out restrain taking, respectively for 2, 5, 8, 12 and also of sixteen secs shutter tempo so that you can capture some photo contrast.
Needless to say now and again continue to are able to use ISO200 to help you photograph, yet so that you can be aware of an electronic camcorder with disturbance handle is normally adequate, when pixels will be overweight, or maybe together with ISO100 contrasting by using base style to help motion picture.
In truth firing night time scenarios, at times to be able to as well do not require that filming with step-by-step developing oh, this streets these kinds of, a small amount convert tips plus aiming design and style, might get the result of experiencing a specialized pattern.
_____________________________________________
http://www.gobatteryonline.com/canon-powershot-sd850-is-battery-charger-gose.html
http://www.chargerbatteryshop.co.uk/panasonic-lumix-dmc-tz7-battery-charger-cbbs.html
//ダイアログクラスにメンバ変数を定義 std::auto_ptr<CBitmap> m_pbmp; //bitmapを設定するメンバ関数 void C*****Dlg::Set*****Bitmap() { CDC* pDC = GetDC(); CDC memdc; memdc.CreateCompatibleDC(pDC); m_pbmp.reset(new CBitmap()); CBitmap&amp; bmp = *m_pbmp; bmp.CreateCompatibleBitmap(pDC, width, height); CBitmap* old = memdc.SelectObject(&amp;bmp); memdc.FillSolidRect(0,0,width,height, color); memdc.SelectObject(old); ((CStatic*)GetDlgItem(IDC_STAIC_*********))->SetBitmap(bmp); }
スクリーンと同じデバイスコンテキストとビットマップを作成し単色で描画している。描画し終わった後のSelectObjectを忘れてはいけない。
CStatic::SetBitmapに渡した後も実際に描画されるまでCBitmapの寿命を保証しなければならない。
そのためメンバ変数にCBitmapを持たせるがCBitmapが再利用を考慮していないという驚くべき仕様なので仕方なくauto_ptrでラップしている。
いい加減MFC滅びてくれないかな。抽象度が低すぎる。こんな記事自分のブログに書きたくないよ。
さらにVisualStudio 2005のauto_ptrのバグを見つけた operator = にポインタを渡すとおかしくなる。これは本来コンパイルエラーになるべきで代わりにresetメンバ関数を使用するべきだ。
修正するには<memory>ヘッダのauto_ptr_refのコンストラクタのひとつ上の行(642行目)に private: template<class T> friend class auto_ptr; を挿入する。
centre.If you want to entertain clients or relax with a drink after a hard day’s work at your Docklandsof high street stores this sort of as Pop Boutique and Oxfam Vintage which specialise in quirky vintage clothing andcups, all of which tread the line between subtlety and glamour with ease.With reminders of these iconicfor your skin. When wearing the chiffon dress, the key is to wear a bright color belt.LondonLondon isStreet and shopping centres throughout, Dublin is sure to suit all tastes and budgets. Henry Street is karen millen minutes from Belfast and very popular – includes M&S, Sainsburys and Dunnes.InShops – Ideal inside the centre ofVersace or Prada. Even these high daily life labels are not exempt in the discount bug and depending on theentitled to ownership with the domain name.The fashion designer, Karen Millen, also brought legal proceedingsfor the Blanchardstown Shopping Centre stay at the Ballymum Plaza, or the Park Plaza Tyrrelstown. For TheWallis. The availability of printable vouchers makes the demand for the voucher codes more important. It may
ガチ無知というのは「HTMLとかの知識が全くない人」という意味です。他意はありません。
先日「WEBサービスを作りたい!」と思い立ったガチ無知の自分。まずHTMLから勉強した。そんな自分の理解を復習ついでにまとめてみる。
まあはてな界隈では少ないだろうけど、俺と同じガチ無知の人がいたら、HTML/CSSについてイメージが掴める、かも。間違ってたらごめんね。
HTMLをプログラミング言語みたいなもの?と思ってた人。(少なくとも俺はそうだった) 違います。
じゃあHTMLとは何か。文章を飾り付ける魔法だ。飾り付け。それ以上でもそれ以下でもない。
世の中には数多のサイトがある。数多のデザインがある。アレ全部文章の飾り付け。画像?Flash?飾り付けだ。
HTMLは、ずらっと文字だけが並んでるとページが見づらいからそれを見やすくする魔法。とりあえずそう認識しとこう。
HTMLは「文章を飾り付ける魔法」だ。じゃあ魔法を使うにはどうすればいい?
呪文を使うんだ。35まで純潔を貫き通す必要のないお手軽な魔法だ。
じゃあ呪文の使い方をば。
[呪文 飾り付けたい文章] ←これを
[呪飾り付けたい文章文] ←こう
そう、挟めばいい。HTMLは範囲指定魔法。だから効果範囲を呪文で挟む。以上。HTMLの使い方解説終了。
↓これは、文章を強調する呪文。
<strong></strong>
で、↓この文章の一部に魔法をかけよう
HTMLは、"HTML is Text Markup Language"の略です
これを、
<strong>HTML</strong>は、"<strong>HTML</strong> is Text Markup Language"の略です
すると、
HTMLは、"HTML is Text Markup Language"の略です
こうなる、と。おしまい!
ここまででわかるだろうけど、俺の解説はものごっつい大雑把だ。
「呪文を強化する」 魔力を底上げするわけじゃない。魔導書は特定の呪文しか強化できない。
氷の魔導書を読むと、ヒャドは強化されるけど、メラは変化なし、みたいな話。
CSSと言う名の魔導書の書き方はこうだ。
強化する呪文名 { 強化内容 }
以上!
じゃあさっきHTMLの紹介で使った<strong>呪文を強化する魔導書をつくる。
strong {color: red;}
これは、strongに{color: red;}の効果を追加する魔導書。読んで字のごとく。色を赤にする追加効果。
さっきの飾り付けた文章が
HTMLは、"HTML is Text Markup Language"の略です
となる、と。呪文自体が強化されてるから両方赤になっている、と。
以上。終了。
さらっとメモ書きをするつもりが、すっげえ長々と書いてしまった。
まあインターネッツの大原則として、「間違ったことをドヤ顔で披露するとみんなに修正してもらえる」というのがあるので、このエントリもそういう役割を果たしてくれるんじゃないかな、、、
HTML4.0を勉強したんだけど、HTML4→HTML5の違いというのは、魔法を使う杖がランクアップしたようなもの、という認識でいいのかな?
当方Vo./Gu. 全パート募集。完全プロ指向。ここから伝説は生まれる。
X・COLOR・ZI:KILL・ROUAGE・CRAZE・AION・BY SEXUAL 等好む
| 募集パート | 募集人数 | 募集条件など |
|---|---|---|
| Gu. | 2 | 聖しい翼を持つ二人よ…我が下へ集え (初心者・冷やかし不可) 当方Gu.はまだ初心者なので正しくサポート出来る人限定 |
| Ba. | 1 | 剣の重さに耐えられるか…?力無き者は去れ! (初心者・冷やかし不可) |
| Dr. | 1 | 初心者・冷やかし不可 |
| メイク | 2 | 世界をしっかりと理解出来る人限定。面接・テストあり |
| マネージャー | 1 | 遊びじゃない事をわきまえてしっかりとバンドをサポート出来る人。面接あり |
| ローディ | 1 | 初心者・冷やかし不可 |
何か一言: 無個性お断り。初心者・冷やかし不可。力無き者は去れ!
ども!吉祥寺で酒屋やってるShunって言います!昼は一升瓶・夜はギターと一升瓶持ってます!(笑)
Doors・村八なんかの音カッコいいっすよね!まあバンドは基本なんでもOKです!(笑)
とにかく、皆でワイワイ楽しい事しましょう! リクエストがあればパンテラ~AKBまで何でも弾いちゃうよ!(笑)
| 募集パート | 募集人数 | 募集条件など |
|---|---|---|
| ボーカル | 1 | お酒飲める人がいいっすねぇ。性別・経験なんでもあり!いっちょ歌ってやるかって(笑)、お気軽に! |
| ベース | 1 | ブリッブリした太~いグルービィなの大好きです!いや、初心者も大歓迎!楽器は何本かあるので貸し出しもOK! |
| ドラム | 1 | 16叩ける人がいいな…とか言ってホントは俺が一番分かってない!(笑) あ、家近い人だと何かと楽ですよね!(笑) |
| ピエール滝 | 1 | (※またはジェームス小野田) ブッキングだけは数組めちゃうんで・・・ステージ出来る人いればなって・・・ |
何か一言: やっぱ家近いといいっすよね~。美味い酒卸してる所紹介します!
http://1-byte.jp/2011/03/20/20_tips_you_need_to_learn_to_become_a_better_php_programmer/
良いPHPerだって?そんなものは丸めてゴミ箱にでも捨ててしまった方が資源の再利用になる分いくらかマシだ。
つまり俺たちがしなくちゃならないことは「より良いPHPerにならないため」に何ができるかってことなのさ。
それじゃ、始めよう。
?>なんて使っちゃいけない。そう俺たちはBAD PHPer。
無駄なホワイトスペースの出力に悩まされるくらいなら対称性なんて丸めてゴミ箱にでも捨てた方がまだマシだ。非対称性こそが賛美。
require_once("config.php");
未だにこんなことやってるやつがいるのかいベイベー。絶対にダメだ。この一行を見たら俺は悶絶する。
ダメだ、早く何とかしないと。
大抵このconfig.phpの中身はこうなっている。見て絶望だ。
$hoge_path = ''; if (!LOCAL) { define('FOO_FLAG', 1); if (HONBAN) { define('HOGE_FLAG', 1); } else if (TEST) { define('HOGE_FLAG', 2); } } else { $hoge_path = '/local'; define('FOO_FLAG', 2); define('HOGE_FLAG', 3); } define('HOGE_URL', $hoge_path.'/hoge/');
こういうのが延々と続くわけだ。もういやだ。もう見たくない。
本番環境とテスト環境でどういう値の違いがあるのか、ローカル環境だとどうなるのか、まったく把握できる気がしない。
なまじPHPな設定ファイルのせいで、処理をついつい書いてしまう。そしてどんどん複雑になってしまう。
やはり設定データは基本的にYAML等のデータしか定義できない形式のもので用意すべきだ。そして環境ごとに設定ファイルを分けるべきである。
そうすることで何にどういう違いがあるのかすぐにわかるし、diffすれば一度にすべて把握することができる。
# 本番環境設定ファイル foo_flag: 1 hoge_flag: 1 hoge_url: '/hoge/'
# テスト環境設定ファイル foo_flag: 1 hoge_flag: 2 hoge_url: '/hoge/'
# ローカル環境設定ファイル foo_flag: 2 hoge_flag: 3 hoge_url: '/local/hoge/'
// ここで後の処理のためにhogeメソッドを呼び出しておく $q->foo(); // $a['foo']はここに来る時点で真のはず // 2010-03-10 判定がおかしいので修正 // 2010-06-21 やっぱり値が入ってる方が正しい if ( !isset($hoge[0]) ) { }
コメントは保守されない。そう、それは真実。こんなコメントを発見したら即効削除しよう。コメントは基本信じるな。
俺たちにちょっとしたヒントと大きな損害を与えてくれる、それがコメントの役割なのだ。
わかる。いいたい事はとてもわかる。俺たちはしばしばインデントにスペースを使うはずだ。一方でIDEのしっかりした言語ではタブも使うことがある。しかし悪いことに、両者を混同しているプログラマも一定数いるのだ。
タブを画面上で認識しにくいエディタが世の中には存在する(何とは言わないが)
そして画面上で認識しにくいことを理由にタブを気にしないプログラマがいる。
この二つの条件が重なると、タブとスペースの交じり合ったインデントが完成する。もうぐちゃぐちゃだ。これは永遠に続く戦いだ。
私たちが勝利を掴むためにできることなどせいぜい、常にスペースしか使わない。タブを見つけたらその都度スペースに変換する。そういった地道な活動が明日へとつながるのだ。
われわれがプログラムをするとき、何に一番時間がかかってるか。実は変数の命名なのである。ここで拘り過ぎて時間をかけ過ぎては何も進まない。
御託はイイからさっさと書け、だ。しかしとはいっても変数名は重要。日頃からどういうときにどんな名前を使うかを決めておくといい。
そして変数名に型はまったく必要ない。型宣言のないPHPにおいて、型の変数名をつけること自体ナンセンスだ。
$iNumber = 'aaa';
になんの意味もない。コメントを信じるなでも言ったが、これはプログラマを混乱させるだけの害悪なものだ。
変数を使う前に初期化するのは、警告を出さないという意味でも良い癖だ。しかし具体的にどこでやるかが問題だ。
$foo = null; $foo = $q->foo();
こんな初期化に意味はない。よくあるのはやはり、if文で値を振り分けるケースだろう
$foo = null; if ( $hoge ) { $foo = 1; } else if ( $bar ) { $foo = 2; }
このときの初期化はとても有効だ。もしnullの初期化を忘れたまま$fooを使うと警告が出るが、ちゃんと初期化してるので出ない。基本中の基本だ。
function getStatus() { $bReturn = false; if ($i == 2) $bReturn = true; return $bReturn; }(中略)
もし、何かしらの理由で、あなたの書いたif文が間違っていたら?
この書き方をしていれば、間違った値に対して、常にfalseが返る。
私たちが、PHPでsensitiveなデータを取り扱うなら、正しいデータが入力されるまでは、動かないコードを書くべきだ。
trueとfalseの条件がいまいち明確ではないが、本当に動かないコードを書けというのであれば以下のようにすべきだ
function getStatus() { $bReturn = false; if ($i == 2) $bReturn = true; else if ($i == 1) $bReturn = false; else throw new Exception("bad status! $i"); return $bReturn; }
中途半端にfalseを返して生存させる必要性はまったくない。今すぐ死ね!
連想配列のキーを指定する場合だけ定数と間違わないようにクオートで囲まなければならない。そして逆に定数を使いたい場合はクオートで囲ってはいけない。
更に後世のプログラマが処理を見たときに、定数が使いたかったのか、文字列が使いたかったのかを明確にしたい場合はconstantを使うと良い。
// 定数のFOOを使うよということが明確になる print $a[constant('FOO')];
もし、文字列を変数の値と一緒に出力するとき、PHPではコンマの代わりにprintfを使うことが使える。
printf( “Hello, my name is %s“, $sName);
以下の代わりに上記のコードを使う。
echo “Hello, my name is “, $sName;
出力すべき変数が増えれば増えるほど、有効になっていく。とにかく迷ったならば、printfを使え、だ。
三項演算子はとても有効だ。しかし優先順位に難があるせいで、三項演算子をネストしようとすると以下のようなコードになってしまう
$n = (($i == 1) ? 2 : (($i == 2) ? 3 :$i));
括弧だらけで読みにくいったらありゃしない。三項演算子を使うなら一回まで。約束守れないやつは丸めてゴミ箱にでも捨てちまえ。
if ( $flag ) { }
仕様をちゃんと把握しているなら真偽値のチェックなどこれで十分。
もし事前にbool型だというのが確定してるのなら「$flag === true」を使えばいい。
インクリメント、デクリメント演算子は前に付くか後ろに付くかで意味が変わるので慣れるまでは非常にややこしい。
わけがわからなくなるくらいなら初めから使わないほうが良い。見極められないなら使うな。それがPHPerなのだ。
文句なしだ。これは文句がない。
他にも色々あるので覚えておこう
$a %= 1; $a &= 1; $a |= 1; $a ^= 1; $a <<= 1; $a >>= 1;
てっとり早く画面に表示する際にpreはよく使うが、デザインの関係上画面の文字が見えないときがある。
なのでdivを使って以下のようにしとくと便利だろう。
function p($var) {
echo "<div align='left' style='background-color:white;color:black;'><pre>";
print_r($var);
echo "</pre></div>";
}
君らが通常作るアプリケーションなんぞに、定数なんぞ必要ない。いいか、もう一度言う、お前ら程度のもんが、定数使おう何ぞ、おこがましいわ!
大丈夫。なんでもかんでも定数にする必要はない。結局設定ファイルに定数をずらずら作りまくってわけがわからなくなってるパターンが多い。
貴様みたいなもんに、定数は制御できん。いいか設定ファイルはYAML等のデータで持つようにし、その連想配列のデータ構造を一つ持ってるだけで定数の変わりになる。
このメリットに比べれば、定数だと書き換えられなくて良いという利点などこの歯のカスほどのものだ。そんなものは丸めてゴミ箱へ捨ててしまうといい。
認識を改めろ。俺たちはより良いPHPerにならないために努力している。
class Request { private $parameters; private $method; function __construct () { $this->method = $_SERVER['REQUEST_METHOD']; if ( strtoupper($this->method) === 'POST' ) { $this->parameters = $_POST; } else { $this->parameters = $_GET; } } function param ($key) { return isset($this->parameters[$key]) ? $this->parameters[$key] : null; } }
これだけでもいい。たったこれだけでもとても便利だ。ここから拡張してGETやPOSTを明示的に取るメソッドとかも作ってみるといい。自分の手を動かすのだ!
例が良くない。こんなのは引数が20個ある関数から、setを20回呼ぶオブジェクトに変わっただけではないか。
そもそもこの20個の引数とはなんなのか。何かのデータ構造なんであれば連想配列にして引数一つとして渡すべきだし、それぞれまったく異なる用途の変数なのであればWindowsプログラミングじゃあるまいし、20個も引数取る時点で設計が間違えている。
何がいいたいか。別に関数でもオブジェクトでもどっちでもいいということだ。
そんなことで悩んでる暇があったら設計を見直せ。
スキあらば自分自身を返せ。スキあらばオブジェクトを返せ。配列はArrayObjectのARRAY_AS_PROPSで返せ。
ひたすらメソッドチェイン。来る日も来る日もメソッドチェイン。とにかくメソッドチェインを使い続けろ。そこに未来はある。
どんなコードも繰り返すな。もし、少しでも同じコードを書いていたなら、それは関数に置き換えてしまえ。
・・・と、いうのはやめなさい。
一見同じように見えた処理でも前後の流れでまったく違うものということが往々にしてある。
まとめ方にも問題があるケースもある。何でもかんでも関数化すると、関数が膨大に増えていく。君は見たことがあるだろうか。common.phpやfunction.phpの恐ろしさを。
確かに細かく関数化はされているが、適切に関数化していないのである。結合度が非常に高い。なんでもかんでも盲目的にまとめれば良いという話ではないのだ!
あまりに極度に意識しすぎると、プログラムそのものができなくなる。そういう状態に陥る。
気を抜いて。そう気を抜いて。所詮あなたのコードなんてすぐに消えてなくなるよ。きっともっと偉い人が作り直すよ。だからまずは思うが侭にやるといい。
結合度を減らすというのは非常に難しい。何度も何度も失敗し続けて、ようやくここは分けた方が良かったんだなと気付く。次に活かそうと心に決める。そしてまた同じ過ちを繰り返していくわけだ。
まずは実装することだ。これが一番の早道だ。まずはがっつり結合した関数をあえて作るといい。何も考えずに作ろう。
そしてその後に、一部分使いまわしたいとおもうことがあるはずだ。その時に関数に切り出そう。それを繰り返すといい。そのうち初めから分けた方が良いと気付く。
何事も経験が必要である!経験を積まないプログラマは丸めてゴミ箱に捨ててしまえ。
さて、先の例で言うならば、私ならadd_result_outputという関数を作ってしまうだろう。だって、addとresultを連続して呼ぶのはめんどくさいんだもん。一連の流れをいつも使うのなら、その流れをやってくれる関数を作ればいいじゃないか。
function add_result_output ($iVar, $iVar2) { $r = add($iVar, $iVar2); echo result($r); }
もっと言えばクラス化してしまってもいいかもしれない。どんな感じになるかは君の手を動かして確認しよう!
このTipsはとてもわかりにくく、ニッチ過ぎる部分も多いかもしれない。
あくまでも「より良いPHPerにならないための20Tips」なのだ。
君はこの記事を鵜呑みにしてはならない。PHPをPHPと見抜けないPHPerはPHPを使うのは難しい。
もし、あなたがPHPプログラマなら、公式のPHPドキュメントはあなたのケツの穴を拭くための紙になるだろう。
私は、それぞれのセクションを眺めて、各関数でどんなことが出来るかなんぞ、歯クソのゴミ程に役に立たないとおもっている。動けばいい。はは。
あなたは、PHPで用意された既製関数で多くのことが実現できることに、(俺の仕事を減らすなと)驚くはずだ。
この記事があなたの役に立たない事を。
ふざけんな!
この記事に書かれている内容は、丸めてゴミ箱に捨てた方が良いレベルです。
dwang厨が無謀にもfroyoを入れてみる記録のページ。
結局CM6-RC1+yay-gapps で落着きそうな雰囲気。
dwang-1.17.1
→ eMonster用に使ってた sandisk 2GB (メモ)
7/9 にリリースされているもの
ext partition 要対応? とおもったら仏語じゃねーか
@kenmood
Wifi OK
どっかから落した20090801-docomo-ht-03a.rar のうち、boot, cache, data, system のみをnandroidで復旧してみる。nandroid.md5 の復元も忘れずに。
手順
追加手順:
http://www.androidinforum.fr/htc-dream-android/froyo-french-connection-100-t1742.html#p6156
partition: swap 160M, ext 500M, 残り vfat がおすすめとな。
何度か丹念に「目標をwipeしてreboot」を繰り返してたら安定した気がする。
豆腐をfont入れ、localeをlibicudata.so の入れ替えで対処 (できるかな? reboot中)
→ libicudata.so は入れかえちゃダメ。起動しなくなる。recoveryで起動して/systemをマウントしてことなきを得る。
2010-07-11 追記
2chでも報告されているとおり、wlanが使えない。あと細かい話だけど、live wallpaperが使えない気がする。メモリが足りないだけかもしれないけど。
marketが死にまくる (acoreが死ぬ)。ほかにも死にまくるけど、何故かはよくわからない。とりあえず体験はできるけど、まだ常用には至らないかも。
(安定している、と言っている人もいる)
2010-07-11 追記
zip落してきて上書きinstallしてみた。なんか日本語fontが消されたんだけど(ぶー!)
ちなみに日本語fontはM+を利用してます。
数時間つかった限りでは、他人にお勧めできるほどじゃないけど何とか使いものになるかも。dwangの環境はnandroidでしかバックアップしていないので、手作業でアプリなどは手作業で復帰する予定。
(2010-07-11 午後5時追記)
どうもSPF Connectionが安定しないのと、ベースがCM6ということで、まずはベースに近いほうが良いだろうと
CM6-RC1を焼いてみる(この項続く)
http://www.cyanogenmod.com/home/cyanogenmod-6-0-0-rc1
E/AndroidRuntime( 2000): FATAL EXCEPTION: UpdateCheckinDatabaseService
E/AndroidRuntime( 2000): java.lang.SecurityException: Permission Denial: writing com.google.android.gsf.settings.GoogleSettingsProvider uri content://com.google.settings/partner from pid=2000, uid=10036 requires com.google.android.providers.settings.permission.WRITE_GSETTINGS
すぐ直りそうではあるけど。
(エラー内容から察するに、installされたapkの記録をgoogle accountに書き込めない)
c.f. http://forum.xda-developers.com/showpost.php?p=7139560&postcount=109
パ●ックコ○ックとは - はてなキーワード(http://d.hatena.ne.jp/keyword/%A5%D1%A5%CB%A5%C3%A5%AF%A5%B3%A5%DF%A5%C3%A5%AF)の編集履歴より。d:id:top-runnerの宣伝としか考えられない。
編集時刻: 2010/05/27 10:42:32 編集者: top-runner 編集内容: append +映画製作集団CR×NKPLAN第6回作品 + 『パ●ック・コ○ック』 +(2010/comedy/DV/color/70min) +監督・脚本 /奥山×之 +撮影 / 奥×由之・佐×雄紀 +プロデューサー/李×宇(「フ×ガール」「パ×チギ!」) +制作協力 /深×健太(「バ×ル・ロ×イヤル?」) + 協賛 /Q ×RONT
『パ●ック・コ○ック』 (2010/comedy/DV/color/70min) 監督・脚本 /奥×由之 プロデューサー/李×宇(「フ×ガール」「パ×チギ!」) 制作協力 /深×健太(「バ×ル・ロ×イヤル」) 協賛 /Q ×RONThttp://d.hatena.ne.jp/top-runner/20100420
初版の「あらすじ」節が[1]の転載。また、そもそも同映画の制作を裏付ける情報自体も、転載元のはてなダイアリーの記事以外ネット上では見当たらず、転載云々以前に現時点では記事内容がWikipedia:検証可能性を欠くため、記事の立項自体が時期尚早。http://ja.wikipedia.org/wiki/Wikipedia:%E5%89%8A%E9%99%A4%E4%BE%9D%E9%A0%BC/%E3%83%91%E3%83%8B%E3%83%83%E3%82%AF%E3%83%BB%E3%82%B3%E3%83%9F%E3%83%83%E3%82%AF
[1]は上記記事(http://d.hatena.ne.jp/top-runner/20100420)を指す。
Yuri Satoと自称はしているが、http://www.hatena.ne.jp/top-runner/ を読んでもどういった関係者なのかが見えない。http://d.hatena.ne.jp/top-runner/archive でも同様。少なくとも正式な発表の前にはてなキーワードなどにこの類の情報を書き込む行為は、情報漏えいではないかとも考えられる。
id:abcDe(http://k.hatena.ne.jp/abcDe/)のキーワード編集について。
+<span style="color:#FF0000;"></span> <span style="font-style:italic;font-size:xx-large;"></span>
+<span style="color:#FF0000;"></span> <span style="font-style:italic;font-size:xx-large;"></span>
<span style="color:#FF0000;"></span> <span style="font-style:italic;font-size:xx-large;"></span>
そう言われても。
http://www.hatena.ne.jp/abcDe/
ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
はてなダイアリーは使用していない。うごメモはてなユーザであるところも含めて、id:kinnokoに似た傾向といえる。(http://anond.hatelabo.jp/20100226202523)
読みにくい日本語より、読みやすい英語のほうが理解できる場合もあるんじゃね。
とりあえず次のように仕分けして単語覚えてるんだが、他にいい方法があったら教えてくれ。
1、主語やツール ex) people, economic sanction, logic, logician, normalization,
2 分析語 ex) strength:strong、color:green, normality:normal
3、変態語 ex) cut, build, create, burst, feel, get well, grow,solve, think, transform
4、移動語 ex) walk, fall, go up, speak, travel, eat, take, give, get, buy
Tsumugi!Tsumugi!Tsumugi!Tsumugiuuuuuuwaaaaaaaaaaaaaaaaaaaaaaaaaaaah!!!
ahaaaaaa...aa..ah!yeah! ahaaaaaa!!! Tsumugi!!Tsumugi!!Tsumugi!!uuwaaaaaa!!!
aah!whinewhine!whinewhine!whinewhine!is a good smell...whine
gosh!i want to smell the smell of the hair of the gold color blond of tsumugikotobuktani!whinewhine!ah!!!
mistook!want fluffy and soft!fluffy and soft!fluffy and soft!hair is fluffy and soft!gnaw,fluffy and soft…haw-haw haw-haw haw-haw!!
Mugichan of 1 Comic was lovely!!ahaaaa…aaa…aha aaaaaa!!yeahaaaaah!!
it was good to be decided the Mugichananimation term!ahaaaaaa!lovely!Mugichan!lovely!ahyesh!
i am glad to put the 2nd volume of a animation on the market…nooooooooo!!!mewwwwwwww!!gyaaaaaaaaaaaaa!!
ughhhhhhhhhhh!!!actual in a comic!!!!oh… animation is considered well…
Is Mugi actual?mewwwwwwwwwwwwwwwwwwwwwwwwwwh!!ughhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!!!
NOOOOOOOOOO!!eeeeeeeeeeeeeeeek!!mugiiii!!HUWAHUWA!!
This!pah!stops!!Stop in reality et.R..trus!?look...ing?Tsumugi of a cover picture is looking at me?
Mugi of a cover picture is looking at me!!!Mugi is looking at me!Mugi of a cover picture is looking at me!!
Mugi of animation is speaking to me!!!was good...world is not given up yet!!!
Yesssssssssss!!!I have Mugiiiiiiiii!!was good wii!!it can do alone!!!
Yeah!Tsumugi of a comiiiiiiiics!!geeeeeeeeeeeeeeeeeeeeeeeeeeeeee!!!!
Yuiiiiiiii!!Miooooooo!!Ritsuuuuuuuuuuu!!!Nodokaaaaaaaa!!
Hummmmmm!!My thought is a report to Tsumugi!!It is a report to Tsumugi of sakuragaoka highscool!!
// ==UserScript== // @name inai_inai // @description 人力検索はてなで見たくない質問を見えなくするスクリプト 「いないいない」 // @include http://q.hatena.ne.jp/list* // @version 0.1 // ==/UserScript== (function(){ // 見たくない質問をテーブルから削除する場合は true を、 // 見たくない質問のテキストの色を白にする場合は true を指定して下さい。 var delRow=false; var xpath ='//*[@class="questionlisttable"]'; var tbody = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; var rows = tbody.rows; // denies の定義を修正して見たくない質問のユーザIDを追加して下さい。 // 例) var denies=['inai_inai','tabun_inai','kitto_inai']; var denies=['inai_inai']; for(var i=rows.length-1;i>=1;i--){ var name=rows[i].cells[5].childNodes[0].toString().match(/http:\/\/q\.hatena\.ne\.jp\/(\S*)\//)[1] for(var j=0;j<denies.length;j++){ if(name==denies[j]){ if(delRow){ // delete row tbody.deleteRow(i) } else{ // change color of text // question rows[i].cells[1].childNodes[1].style.color="white"; // point rows[i].cells[3].style.color="white" // userid rows[i].cells[5].childNodes[0].style.color="white"; // time rows[i].cells[6].style.color="white"; } break; } } } } )();
「人力検索はてな?」で見たくない質問を見えなくする greasemonkey スクリプトです。
これを使うと、あらかじめ設定したユーザーIDの人の質問を見えなくすることが出来ます。
greasemonkey とは Mozilla Firefox 上で動作するアドオンです。Google で検索するとたくさんヒットするので使いたい方は調べてみて下さい。
スクリプト中の
var denies=['inai_inai'];
の部分を
var denies=['inai_inai','tabun_inai','kitto_inai'];
のように変更して下さい。このようにすると、id:inai_inai、id:tabun_inai、id:kitto_inai がした質問が見えなくなります。
既定では、設定したユーザIDがした質問に該当するTableの文字色を白にすることで見え難くします。
スクリプト中の
var delRow=false;
の部分を
var delRow=true;
にすると、Tableから該当する質問自体を削除することで見えなくなります。
ここでいう「削除」とは、人力検索はてな?から削除する訳ではなく、ブラウザ上で見えなくしているだけです。だから、greasemonkey の設定でこのスクリプトを削除したり、greasemonkey を無効にすればまた表示されるようになります。
このスクリプトの文字コードは UTF-8 にしておかないとスクリプトのインストールの時に文字化けします。
The BSD License に準じます(http://opensource.org/licenses/bsd-license.php)。
そういえばinheritなんてものがあるのを忘れてた。
// ==UserScript== // @name add style // @namespace http://anond.hatelabo.jp/ // @include http://anond.hatelabo.jp/* // ==/UserScript== GM_addStyle( "font{color:inherit;font-size:inherit}"+ "u, s, strike{text-decoration:inherit}"+ "b{font-weight:inherit}"+ ".section{max-height:80em;overflow-y:auto}" );
firefoxオンリーだそうで http://anond.hatelabo.jp/20090120114819 ユーザースタイルシート的には
font{color:inherit;font-size:inherit}
u, s, strike{text-decoration:inherit}
b{font-weight:inherit}
.section{max-height:80em;overflow-y:auto}
かな?
その他は http://anond.hatelabo.jp/20090120094216 の辺で。
それでストーカーするには Web::Scraperでその辺のタグの有無をチェックして DBIx::Simple で記録すればよいかな?
ついでに WWW::Mechanize::Plugin::Web::Scraper で封じ込めという手もありそう。
http://anond.hatelabo.jp/20090120114819
追加でこんなかんじにした
// ==UserScript== // @name add style // @namespace http://anond.hatelabo.jp/ // @include http://anond.hatelabo.jp/* // ==/UserScript== GM_addStyle( "font{color:black;font-size: 100%}"+ "s, strike{text-decoration:none}"+ ".section{max-height:80em;overflow-y:auto}" );
あ、GM_addStyle使ってるから動かないのかな。
strike{
text-decoration:none;
}
s{
text-decoration:none;
}
font{
color:black;font-size:100%;
}
これだけあればわりと快適。
// ==UserScript==
// @namespace http://anond.hatelabo.jp/
// @include http://anond.hatelabo.jp/*
// ==/UserScript==
GM_addStyle(
"font{color:black;font-size:100%}"+
"s, strike{text-decoration:none}"
);
前回は何日くらい活動してたっけ?
ここまでひつこいとストーキングしたくなる。
まずは張っとく
あと、自分のぐりもん
// ==UserScript== // @name add style // @namespace http://anond.hatelabo.jp/ // @include http://anond.hatelabo.jp/* // ==/UserScript== GM_addStyle( "font{color:black;font-size:100%}"+ "s, strike{text-decoration:none}" );
IEは「ユーザースタイルシートのススメ - Personnel」を参考に、
#hatena-anond font{color:black;font-size:100%} #hatena-anond s, strike{text-decoration:none} #hatena-anond center{text-align:left}
そういえばstylishで対処してた。
@namespace url(http://www.w3.org/1999/xhtml); @-moz-document url("http://anond.hatelabo.jp/") { font{color:black} s, strike{text-decoration:none} }
http://anond.hatelabo.jp/20090119002856
ちょっと歪んでいるかも知れないけど、ここでちょっとした悪戯してるくらいなら、ほっておいてもよいかな。
その快感にとりつかれるくらいストレス溜ってるのが、これで少しはよくなるなら安いものじゃないか。
あと、ブチ込むとか矯正とかって対処療法だから、それに頼ると増えるばっかりで追い付かなくなるのがオチだろう。
予防をしっかりする方が有益だと思う。
javascript:(function(){var c='font *';var d='font-size:100% !important;color:black !important;text-decoration:none;vertical-align:baseline;';var s=document.styleSheets;var sh=(s)?s[s.length-1]:0;if(sh)if(sh.addRule)sh.addRule(c,d);else sh.insertRule(c+'{'+d+'}',sh.cssRules.length)})();
ふと思い立って昼休みに作った。経過時間別に背景色もつきます。
グループ分けとかしてるとうまく動かないかも。
// ==UserScript== // @name order_home_mymixi // @namespace http://anond.hatelabo.jp/ // @include http://mixi.jp/ // @include http://mixi.jp/home.pl // ==/UserScript== (function() { if (window != window.parent) return; var homeTds = document.evaluate('//div[@id="mymixiList"]//td', document.body, null, 7, null); for (var i = 0; i < homeTds.snapshotLength; i++) homeTds.snapshotItem(i).innerHTML = 'loading...'; GM_xmlhttpRequest({ method: 'GET', url: 'http://mixi.jp/list_friend_simple.pl', onload: function(res) { var friends = []; var bgColor = { '01': '#ffffff', '02': '#fee7c6', '03': '#ffd8a7' }; var div = document.createElement('div'); div.innerHTML = res.responseText; var tds = document.evaluate('//div[@id="friendList"]//td', div, null, 7, null); for (var i = 0; i < tds.snapshotLength; i++) { var td = tds.snapshotItem(i); var klass = td.getAttribute('class'); if (!klass || klass.search(/^iconState(01|02|03)/) == -1) continue; friends.push({ color: bgColor[RegExp.$1], anchor: td.getElementsByTagName('a')[0], name: td.getElementsByTagName('p')[0].innerHTML.replace(/^(.+)\(/, '$1 (') }); } for (var i = 0; i < homeTds.snapshotLength; i++) { var td = homeTds.snapshotItem(i); td.innerHTML = ''; td.style.background = friends[i].color; td.appendChild(friends[i].anchor); var span = document.createElement('span'); span.innerHTML = friends[i].name; td.appendChild(span); } } }); })();