はてなキーワード: interfaceとは
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
ルータのメーカーのサイトでファームウェアを最新バージョンにするか、自動チューニング機能の設定を変更(無効にするなど)してみるといいかもしれません。
ルーターのファームウェアをアップデートする方法は、説明書なりメーカーのサイトなりに書いてあるでしょうからそちらを見てもらうとして、自動チューニング機能の設定を変更する方法ですが、
http://ascii.jp/elem/000/000/106/106192/
スタートメニューから「すべてのプログラム」→「アクセサリ」→「コマンドプロンプト」を右クリックし、「管理者として実行」を選択する。 続いて、「netsh interface tcp set global autotuninglevel=disabled」と入力すればいい。元に戻す場合は「netsh interface tcp set global autotuninglevel=normal」と入力する。
http://journal.mycom.co.jp/articles/2010/01/20/w7/index.html
受信ウィンドウ自動チューニングレベルを調整するには、「netsh interface tcp set global autotuninglevel={設定値}」と実行します。設定可能な値は下記のとおり。
「autotuninglevel」の設定値
highlyrestricted:既定値より受信ウィンドウを保守的に拡大します
restricted:既定値より受信ウィンドウを制限的に拡大します
normal:既定値に戻します
experimental:実験的なシチュエーションで使用します
通常は「restricted」もしくは「highlyrestricted」を選び、先のコマンドを実行しますが、どちらがベストなのか、もしくは自動最適化を無効にした方が速くなるのかと、どの設定値を選ぶべきかは環境によって異なります(図15)。
そういう会社で○年目(5年以下とだけ)がそろそろ終わるのですが、正直転職ばかり考えている。
というのも、自ら設計した仕様書でプロジェクトに火がついたことはないが、下請け案件では殆ど火災だらけ。
国内王手のうちのある会社が主要取引先なのだが、はっきり言おう。
以下に私の食った仕様書をお教えしよう。
はい、メソッド?なにそれ?おいしいの?と言わんばかりの超大作。
上から下まで流すだけ。保守性皆無。
しかも無理やりループを一まとめにするから、もはや何処で何をしてるのか、、、、。
Basic/Cobol ならまだ分からんでもないが Java や C#
作ってないんですねきっと。何がしたいのかさっぱり分からない。
それで実装用の設計起こすんだから、そりゃぁ全体で動くわけねーわ。
(このときにクレーム付けられるのって下請けなんですが、でも下請けでは発言権無いですからね、、、|||orz)
いや本当に何がしたいのか、、、、どういう分岐条件かも分からない。
いやむしろ書いてない!?
DI, AOP, O/R Mapper いずれも基本となる技術なんですよね、でも。
「何でこんな意味の無いところに使うの?」という使い方で逆に労力を増やしてくれる。
例えば O/R Mapper はテーブルとマッピングを行い、プログラム側で処理しやすく、、、、
で、仕様書の指定「すべてのSQL結果に対して対応するO/Rを作成する」ってwwww
当然従えば大量にオブジェクトができて、SQL仕様が変わるたびに、、、、以下略。
「元のプロジェクトが○位の規模なのにどうしてその倍以上の規模なってんだゴルァ」
「すべてのオブジェクトはシングルトンで実装し、Interface用意してね、DIで使うから」
ってどれだけ無駄すれば気が済むのか、、、、。
(Test 時にMock入れるだけならここまでする意味って無いよな…)
そしてこんなことをして下請けをいじめた挙句「弊社には最新技術のノウハウがございます」とか言う。
素敵、、、、、。
こんな人海戦術しかないような仕様を書いてるようでは、そりゃ安価な海外に流れるなと、、、、。
本当に自分の技術を信じる人は、独立系、海外系、自社製品開発に行ってください。((もしくは王手企業でまともな仕様書書いてください))
* AnonymousDiary を人力検索はてなの質問の補記に使うことをお許しください(質問文はこちら)。
tcpdumpでネットワーク接続を開始したときに、キャプチャする方法
OSは、Ubuntu 8.04。シェルは、bashをそれぞれ使用しております。
下記、(1)、(2)の手順で、ネットワーク接続を開始したら、
tcpdumpでパケットをキャプチャするような設定を行いました。
OSを再起動さてみたところ、正常に取得を開始してくれません。
そこで
下記、(3)、(4)の手順で試してみると、それぞれ不可思議な挙動を発見しました。
原因が分からず苦慮しております。ご教示いただけないでしょうか。
何卒、よろしくお願い致します。
#!/bin/sh
tcpdump -i eth0 -s 1500 -C 10 -w /var/log/tcpdump/tcpdump`date '+%Y%m%d%H%M%S'`.log
/etc/network/interfeces に次の1行を書き込みました。
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
# The primary network interface
auto eth0
iface eth0 inet static
address ???.???.???.???
netmask 255.255.255.0
gateway ???.???.???.???
* ???は、適当な数が割り当てられてます。
OSを再起動さてみたところ、正常に取得を開始してくれません。
そこで、(3)、(4)を試してみました。
user@server:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... SIOCADDRT: File exists
Failed to bring up eth0.
user@server:~$ sudo ifconfig eth0 down
user@server:~$ sudo ifconfig eth0 up
user@server:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... Received cookie: SQ_SYSTEM_SESSION=4gqai700bd5s0tdo9f0fafnbr7
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1500 bytes
class FizzBuzzProgram{ public static void main(String args[]){ for (int i = 0; i++ < 100; ) { System.out.println(new Number(i).checkMod3().checkMod5()); } } } interface Mod3Mod5Unchecked extends Mod5Unchecked { public Mod5Unchecked checkMod3(); } interface Mod5Unchecked { public Object checkMod5(); } class Number implements Mod3Mod5Unchecked{ private int no; public Number (int no) { this.no = no; } public Mod5Unchecked checkMod3() { return no % 3 == 0 ? new Fizz(no) : this; } public Object checkMod5() { return no % 5 == 0 ? new Buzz() : this; } public String toString() { return Integer.toString(no); } } class Fizz implements Mod5Unchecked{ private int no; public Fizz (int no) { this.no = no; } public Object checkMod5() { return no % 5 == 0 ? new FizzBuzz() : this; } public String toString() { return "Fizz"; } } class Buzz { public String toString() { return "Buzz"; } } class FizzBuzz { public String toString() { return "FizzBuzz"; } }
だって必要ないんだもん。
HDMIを略さずに書くと「High-Definition Multimedia Interface」なわけ。つまり、HD品質な映像および音声を伝えるための規格。でもってWiiは「Standard-Definition(現行のDVD相当の解像度)」にしか対応していない。なので付ける意味が無いんよ。ついでに、HDMI端子を付けるとロイヤリティを支払う必要が出てくる。まあ、一台当たりせいぜい数円だけど。
それに、HDMIってのはHDCP必須なので相応のチップが必要になってくる。その分だけ値段も上がるし、そもそもWiiで専ら再生されるのは暗号化が必要なコンテンツじゃない。D2端子より上の品質はぶっちゃけ不要。
そういうのはバッドノウハウとは言わないの?
関数ポインタをバッドノウハウとは言わないでしょ。C言語自体がバッドノウハウの結果だと言うなら、当たりだけど:)
手続き関数という抽象はまことに一般的な存在で(数学では汎関数というのもある)、それをC言語で直接的に表現したのが関数ポインタ。 関数的なものを オブジェクト指向言語でオブジェクトとして実装するほうがバッドノウハウだと思う。 少なくとも私は JavaのComparableインタフェースよりも C言語の heapsort/mergesort/qsort の関数引数 int (*compar)(const void *, const void *) のほうがシンプルで どちらかといえば本質をよりよく表していると思う。 なぜ関数的なものを表現するのに オブジェクトとかinterfaceとか継承とか「余計な概念」を導入する?それこそバッドノウハウでしょ。 まあでもC言語にはクロージャが無いから、関数的なものも扱いづらいことこの上ないが、Cにクロージャが無いこと自体はバッドノウハウとは言わないでしょー。
逆も然りで、オブジェクトを表現するために 関数を使ってれば そればバッドノウハウだけど、オブジェクトは関数ほど一般的な概念ではないと思う(オブジェクトなんか無くても別にいい、かも?)。
とりあえず、ベテランよりも俺の方が優秀という事が言いたいのだろうが・・・。
いや。うん、2年目って感じで初々しいね。
>Interfaceって何のためにあるんですか?
それはね、Javaには関数ポインタがないからなんだよ。実装としてはvtableだから、関数ポインタなんだよ。知ってる? まぁ、一部言語ではhashTableだが。
>ListやMapをループで回して値を取る時Iterator使うのは何故?
>staticなメソッドを作るときはどんな時?
いや、そもそもnon staticだって、データへのポインタがある、関数コールという意味ではstaticと大差ないジャン
# Interfaceって何のためにあるんですか?
# ListやMapをループで回して値を取る時Iterator使うのは何故?
# staticなメソッドを作るときはどんな時?
はてな界隈では、Javaって、あんま人気無いみたいだけど、ちょっと書かせてよ。
SIerでお仕事してると、派遣とか常駐とか言う形で、色んな会社に行って、違う会社の人とお仕事するんだけど、「経験年数n年(n>3)です」っていう人達が、恐ろしく使えなくてびっくりすることがしばしば。
特に、Java 5以降の機能
辺りを全く知らなかったり。 って言うか、Javaの極々基本的な知識である
が全く出来ないんだよね…。
そういうのを知らなくても(出来なくても)業務をこなせちゃう(?)のが、Javaの言語特性だとは思わないけど、こういう人達だらけなんだよね…。 PMが新しい人を採用しようとして、ここら辺の知識を割りと厳し目にテストしたら、候補が10人居たのに全滅で、プロジェクトのスタートが遅れてしまったりして、もう大変。
かな。
[admin@sakura2 ~]$ uname -a Linux sakura2 2.6.9-67.0.4.ELsmp #1 SMP Sun Feb 3 07:08:57 EST 2008 i686 athlon i386 GNU/Linux [admin@sakura2 ~]$ cat /etc/issue.net CentOS release 4.6 (Final) Kernel \r on an \m
# yum update # yum remove emacs emacspeak emacs-leim emacs-common # yum remove NetworkManager # yum remove bluez-bluefw bluez-hcidump bluez-libs bluez-utils # yum remove cups cups-libs # yum remove irda-utils isdn4k-utils pcmcia-cs wireless-tools # yum remove wpa_supplicant gpm xinetd # yum remove ppp nfs-utils lksctp-tools autofs # yum remove xorg-x11-libs # yum remove selinux-policy-targeted # yum remove vsftpd # yum clean all
[admin@sakura2 ~]$ uname -a Linux sakura2 2.6.9-67.0.7.ELsmp #1 SMP Sat Mar 15 06:54:55 EDT 2008 i686 athlon i386 GNU/Linux
# rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-notes-5.1.0-2.i386.rpm \ http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-5-1.0.el5.centos.1.i386.rpm [root@sakura2 admin]# cat /etc/issue.net CentOS release 5 (Final) Kernel \r on an \m # yum update glib procps udev iptables # rpm -Uvh --nodeps http://mirror.centos.org/centos/5/os/i386/CentOS/initscripts-8.45.17.EL-1.el5.centos.1.i386.rpm \ http://mirror.centos.org/centos/5/os/i386/CentOS/mkinitrd-5.1.19.6-19.i386.rpm # rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/e2fsprogs-1.39-10.el5.i386.rpm \ http://mirror.centos.org/centos/5/os/i386/CentOS/e2fsprogs-libs-1.39-10.el5.i386.rpm \ http://mirror.centos.org/centos/5/os/i386/CentOS/e2fsprogs-devel-1.39-10.el5.i386.rpm
# rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/kernel-2.6.18-53.el5.i686.rpm
[admin@sakura2 ~]$ uname -a Linux sakura2 2.6.18-53.el5 #1 SMP Mon Nov 12 02:22:48 EST 2007 i686 athlon i386 GNU/Linux # yum clean all [root@sakura2 admin]# yum --version Loading "fastestmirror" plugin 2.4.3 [root@sakura2 admin]# rpm --version RPM version 4.3.3
# yum update Error: Missing Dependency: python-abi = 2.3 is needed by package python-elementtree
# vi /etc/ssh/sshd_config # /etc/init.d/sshd restart
# vi /etc/yum.repos.d/dhozac-vserver.repo
# yum update kernel # yum install util-vserver{,-core,-lib,-sysv,-build}
[admin@sakura2 ~]$ uname -a Linux sakura2 2.6.22.19-vs2.3.0.34.1 #1 SMP Mon Mar 17 05:32:04 EDT 2008 i686 athlon i386 GNU/Linux
# yum update bash screen rsync # /etc/init.d/iptables save # /etc/init.d/iptables start # cat /etc/sysconfig/iptables # Generated by iptables-save v1.3.5 on Mon Mar 24 19:57:07 2008 **filter :INPUT ACCEPT [1067:96557] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [63680:6208436] :e0 - [0:0] -A INPUT -i eth0 -j e0 -A e0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A e0 -p icmp -m icmp --icmp-type 8 -j ACCEPT -A e0 -p tcp -m tcp --dport 22 -j ACCEPT -A e0 -p tcp -m tcp --dport 80 -j ACCEPT -A e0 -p tcp -m tcp --dport 443 -j ACCEPT -A e0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Mon Mar 24 19:57:07 2008 # Generated by iptables-save v1.3.5 on Mon Mar 24 19:57:07 2008 **nat :PREROUTING ACCEPT [179:10642] :POSTROUTING ACCEPT [213:13895] :OUTPUT ACCEPT [251:16220] -A PREROUTING -s ! 10.0.0.0/255.255.255.0 -p tcp -m tcp --dport NNNN -j DNAT --to-destination 10.0.0.1:22 -A POSTROUTING -s 10.0.0.0/255.255.255.0 -d ! 10.0.0.0/255.255.255.0 -j SNAT --to-source AAA.BBB.CCC.DDD COMMIT # Completed on Mon Mar 24 19:57:07 2008
[root@sakura2 ~]# /usr/sbin/vserver-stat CTX PROC VSZ RSS userTIME sysTIME UPTIME NAME 40013 27 301.5M 73.8M 30m36s31 56m38s90 11d06h56 one 40015 5 10.8M 4.4M 0m28s33 0m12s68 9d04h23 two 40016 2 4.2M 1.3M 0m00s47 0m00s64 0m01s97 three
プログラマは各々が使う言語やツールによって思考や行動、コミュニティを制限されている。
某巨大掲示板を見るかぎり、言語ごとにテーマが区切られることが多い。
何かプログラムを作る際に、最初に「どの言語を使うか」を論じられることも多い。
ABI(Application Binary Interface)か、外部ライブラリ呼び出しの手段を別途構えることによって、言語横断的なプログラムを作ることはできる。それにも関わらず、プログラマは言語を同じくする者同士でしかつながりあえていないような印象を受ける。それはプログラミング言語がツールである以上に、思考パターンをも制限してしまっているのではないかということだ。
これらの状態を引き起こす引き金は、言語そのものの特性というよりは、あらゆる言語をまとめて一つのバイナリを吐く(あるいは逐次実行する)ツールの不在が上げられる。それぞれの言語のコミュニティは自分の言語のコンパイラやツール、方法論にしか興味がない。
ナッキーの「Turbo Delphiはじめて奮戦記」- 第1回 Turbo Delphi のインストール
http://torrent.borland.com/turbo_hotfix_rollup.zip
http://torrent.borland.com/prereqs_jp.zip
http://torrent.borland.com/turbodelphi_jp.exe
(1) \dotNETRedist\dotnetfx.exe
(2) \dotNETRedist\langpack.exe
(3) \dotNETRedist\NDP1.1sp1-KB867460-X86.exe
\dotNETSDK\setup.exe
\IE60SP1\ie6setup.exe
\dotNETJSharp\vjredist.exe
\dotNETJSharp\vjredist-LP.exe
\MSXML\msxml.msi
C:\Documents and Settings\<ユーザー名>
TurboDelphi_JP.exe
yusukeooki blog: [会社のこと]新リリース検索エンジン プレスリリース検索エンジン Powered by ValuePress!
Components > Sound Effects > Mixer. Torry's Delphi Pages
Apollo - Delphi Ruby interface
もっと楽にGUIとの連携がしたい:Python + Delphi = P4D(Python for Delphi) - ふにゃるん
[Delphi]【Delphihacks】Delphi【Win32API】
procedure TForm1.FormCreate(Sender: TObject); var s: string; i, j, k: Integer; x, y: Double; begin try x := 100.0; y := 3.0; x := x / y; ShowMessage(FloatToStr(x)); s := 'Delphi'; Form1.Caption := s; finally // end end;
スラッシュドット ジャパン | Ruby on Railsは万能薬ではない
はてなブックマーク - スラッシュドット ジャパン | Ruby on Railsは万能薬ではない
PHPプログラムを始めてみたい、難しいと思っている人の為に*ホームページを作る人のネタ帳
アフィリエイトは儲かんないってば:PHP初心者によるPHP入門 - livedoor Blog(ブログ)
PHPの車輪はバカに出来ない。使うに留めず使いこなしてからが面白い。*ホームページを作る人のネタ帳
service_YouTubeというPEARモジュールを使うと、YouTubeAPIを活用して驚くほど簡単に動画サイトが作れます。
指定したタグがついているすべての画像の一覧表示をいうのをservice_YouTubeを使うと以下の様な文で構築できます。
CakePHPで高速Webアプリ開発:第1回 CakePHPを使いたくなる5つの特徴|gihyo.jp … 技術評論社
Shane's Brain Extension: A Ruby Interface to the YouTube API
YouTubeのAPIを使ってみる。 - t-imaizumiのMacとかのはなし
Flickrの画像をはてなに貼り付けるためのHTMLを取得するスクリプト。 - t-imaizumiのMacとかのはなし
InstantRails で 簡単 Ruby on Rails 体験
10分で作るRailsアプリ for Windows - masuidrive
ITmedia エンタープライズ:第1回 Instant Railsで始めるWindows環境のRails (1/2)
Scaling Twitter: Making Twitter 10000 Percent Faster | High Scalability
【特選フリーソフト】生産性の高いWeb開発環境 Ruby on Rails:ITpro
37signalsのBasecampはXeon 2.4GHz dual,メモリー2Gのサーバー2台で40万リクエスト/日を処理している。
他にも43Things.comでも20万リクエスト/日の処理
Basecampはデュアル2.4GHz Xeon、2MBメモリのマシン上で15個のFastCGIプロセスと
50から100個のApache 1.3.xプロセスが動作している2つのWeb/アプリケーションサーバによって、
1日約40万リクエストを処理している。しかし、マシンのロードは通常0.5から1.5程度。
MySQLのサーバは他の2つのアプリケーション(Ta-da ListとBackpack)で共有されていて、最大50万行のテーブルを持っている。
このMySQLは3つのアプリケーションから利用されているが、ロードは0.1から0.3の間で、ボトルネックにはなっていない。
Part2 Rubyに学ぶ「Ruby on Railsの正体」:ITpro
1.day.ago # 現在時刻から1日前を表すTimeオブジェクト
10.years.from_now # 現在時刻から10年後を表すTimeオブジェクト
1.kilobyte # 1024
●productsテーブルからnameが'book',priceが2079であるようなProductオブジェクトを読み取り,存在しなかった場合はデータベースにレコードを新規作成する処理
book = Product.find_or_create_by_name_and_price('book', 2079)
Ruby/Ruby on Rails/model/5分でわかるActiveRecord - PukiWiki
モデル.findで、名前がMr.C、年齢が30歳のレコードを検索
$ irb
irb(main):001:0> a = [ 'dog', 'cat', 'sheep', 'horse' ]
["dog", "cat", "sheep", "horse"]
アルファベット順に並べ変えたいときは
irb(main):004:0> a.sort
["cat", "dog", "horse", "sheep"]
順序を逆にしたいときは
irb(main):005:0> a.reverse
["horse", "sheep", "cat", "dog"]
アルファベット順に並べて、順序を逆にしたいときは
irb(main):006:0> a.sort.reverse
["sheep", "horse", "dog", "cat"]
元記事:
http://www.arclamp.jp/blog/archives/marulec2006_2.html
http://d.hatena.ne.jp/t_yano/20061216/1166296467
こんな感じですか?
public interface Executable <T> { void execute(T argument); } public class IterationExecutor<T> { private Collection<T> collection; public IterationExecutor(Collection<T> collection) { this.collection = collection; } public IterationExecutor(T[] array) { this.collection = new ArrayList<T>(); Collections.addAll(this.collection, array); } public void each(Executable<T> e) { for(T element: collection) { e.execute(element); } } } public class IntegerBuffer { private int value = 0; public IntegerBuffer(int value) { this.value = value; } public void add(int number) { this.value += number; } public int getValue() { return this.value; } } public class Sample { public static void main(String[] args) { final IntegerBuffer total = new IntegerBuffer(0); new IterationExecutor<Integer>(new Integer[]{1,2,3,4,5}).each( new Executable<Integer>(){ public void execute(Integer it) { total.add(it); } }); System.out.println(total.getValue()); } }
importなどは省略しました。
Sample以外は再利用可能なので……いやどうだろう