<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1919392632262582347</id><updated>2011-11-29T05:34:03.498+02:00</updated><category term='nginx php ubuntu 10.4'/><category term='code hightlight'/><title type='text'>nobody cares</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.vygovsky.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-6688592759385251534</id><published>2011-11-29T05:30:00.001+02:00</published><updated>2011-11-29T05:34:03.503+02:00</updated><title type='text'>Top 10 SQL Performance Tips</title><content type='html'>&lt;h1 class="pagetitle"&gt;&lt;a href="http://forge.mysql.com/wiki/Top10SQLPerformanceTips"&gt;Top 10 SQL Performance Tips&lt;/a&gt;&lt;/h1&gt;&lt;h1 class="pagetitle"&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/h1&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=1919392632262582347" name="Top_1000_SQL_Performance_Tips"&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;&lt;/span&gt;&lt;/h2&gt;&lt;i&gt;Interactive session from MySQL Camp I:&lt;/i&gt; &lt;br /&gt;Specific Query Performance Tips (see also database design tips for tips on indexes):  &lt;br /&gt;&lt;ol&gt;&lt;li&gt; Use EXPLAIN to profile the query execution plan  &lt;/li&gt;&lt;li&gt; Use &lt;a class="external text" href="http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html" rel="nofollow" title="http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html"&gt;Slow Query Log&lt;/a&gt; (always have it on!)  &lt;/li&gt;&lt;li&gt; Don't use DISTINCT when you have or could use GROUP BY &lt;/li&gt;&lt;li&gt; Insert performance &lt;ol&gt;&lt;li&gt; Batch INSERT and REPLACE &lt;/li&gt;&lt;li&gt; Use LOAD DATA instead of INSERT &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; LIMIT m,n may not be as fast as it sounds. &lt;a class="external text" href="http://www.facebook.com/note.php?note_id=206034210932" rel="nofollow" title="http://www.facebook.com/note.php?note_id=206034210932"&gt;Learn how to improve it&lt;/a&gt; and read more about  &lt;a class="external text" href="http://www.xarg.org/2011/10/optimized-pagination-using-mysql/" rel="nofollow" title="http://www.xarg.org/2011/10/optimized-pagination-using-mysql/"&gt;Efficient Pagination Using MySQL&lt;/a&gt; &lt;/li&gt;&lt;li&gt; Don't use ORDER BY RAND() if you have &amp;gt; ~2K records &lt;/li&gt;&lt;li&gt; Use SQL_NO_CACHE when you are SELECTing frequently updated data or large sets of data &lt;/li&gt;&lt;li&gt; Avoid wildcards at the start of LIKE queries &lt;/li&gt;&lt;li&gt; Avoid correlated subqueries and in select and where clause (try to avoid in) &lt;/li&gt;&lt;li&gt; No calculated comparisons -- isolate indexed columns &lt;/li&gt;&lt;li&gt; ORDER BY and LIMIT work best with equalities and covered indexes &lt;/li&gt;&lt;li&gt; Separate text/blobs from metadata, don't put text/blobs in results if you don't need them &lt;/li&gt;&lt;li&gt; Derived tables (subqueries in the FROM clause) can be useful  for retrieving BLOBs without sorting them. (Self-join can speed up a  query if 1st part finds the IDs and uses then to fetch the rest) &lt;/li&gt;&lt;li&gt; ALTER TABLE...ORDER BY can take data sorted chronologically  and re-order it by a different field -- this can make queries on that  field run faster (maybe this goes in indexing?) &lt;/li&gt;&lt;li&gt;  Know when to split a complex query and join smaller ones &lt;/li&gt;&lt;li&gt;  Delete small amounts at a time if you can &lt;/li&gt;&lt;li&gt;  Make similar queries consistent so cache is used &lt;/li&gt;&lt;li&gt;  Have good SQL query standards &lt;/li&gt;&lt;li&gt;  Don't use deprecated features &lt;/li&gt;&lt;li&gt;  Turning OR on multiple index fields (&amp;lt;5.0) into UNION may  speed things up (with LIMIT), after 5.0 the index_merge should pick  stuff up. &lt;/li&gt;&lt;li&gt;  Don't use COUNT * on Innodb tables for every search, do it a  few times and/or summary tables, or if you need it for the total # of  rows, use SQL_CALC_FOUND_ROWS and SELECT FOUND_ROWS() &lt;/li&gt;&lt;li&gt;  Use INSERT ... ON DUPLICATE KEY update (INSERT IGNORE) to avoid having to SELECT  &lt;/li&gt;&lt;li&gt;  use groupwise maximum instead of subqueries &lt;/li&gt;&lt;li&gt;  Avoid using IN(...) when selecting on indexed fields, It will kill the performance of SELECT query. &lt;/li&gt;&lt;li&gt; Prefer using UNION ALL if you don't need to merge the result &lt;/li&gt;&lt;/ol&gt;Scaling Performance Tips: &lt;br /&gt;&lt;ol&gt;&lt;li&gt; Use benchmarking &lt;/li&gt;&lt;li&gt; isolate workloads don't let administrative work interfere with customer performance. (ie backups) &lt;/li&gt;&lt;li&gt;  Debugging sucks, testing rocks! &lt;/li&gt;&lt;li&gt;  As your data grows, indexing may change (cardinality and  selectivity change).  Structuring may want to change.  Make your schema  as modular as your code.  Make your code able to scale.  Plan and  embrace change, and get developers to do the same. &lt;/li&gt;&lt;/ol&gt;Network Performance Tips: &lt;br /&gt;&lt;ol&gt;&lt;li&gt; Minimize traffic by fetching only what you need. &lt;ol&gt;&lt;li&gt; Paging/chunked data retrieval to limit  &lt;/li&gt;&lt;li&gt; Don't use SELECT * &lt;/li&gt;&lt;li&gt; Be wary of lots of small quick queries if a longer query can be more efficient &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;  Use multi_query if appropriate to reduce round-trips &lt;/li&gt;&lt;li&gt; Use stored procedures to avoid bandwidth wastage &lt;/li&gt;&lt;/ol&gt;OS Performance Tips: &lt;br /&gt;&lt;ol&gt;&lt;li&gt; Use proper data partitions &lt;ol&gt;&lt;li&gt; For Cluster.  Start thinking about Cluster *before* you need them &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; Keep the database host as clean as possible.  Do you really need a windowing system on that server? &lt;/li&gt;&lt;li&gt; Utilize the strengths of the OS &lt;/li&gt;&lt;li&gt;  pare down cron scripts &lt;/li&gt;&lt;li&gt;  create a test environment &lt;/li&gt;&lt;li&gt;  source control schema and config files   &lt;/li&gt;&lt;li&gt;  for LVM innodb backups, restore to a different instance of MySQL so Innodb can roll forward &lt;/li&gt;&lt;li&gt;  partition appropriately  &lt;/li&gt;&lt;li&gt;  partition your database when you have real data -- do not assume you know your dataset until you have real data &lt;/li&gt;&lt;li&gt; Reduce swappiness of your OS &lt;/li&gt;&lt;/ol&gt;MySQL Server Overall Tips: &lt;br /&gt;&lt;ol&gt;&lt;li&gt; innodb_flush_commit=0 can help slave lag &lt;/li&gt;&lt;li&gt; Optimize for data types, use consistent data types.  Use  PROCEDURE ANALYSE() to help determine the smallest data type for your  needs. &lt;/li&gt;&lt;li&gt; use optimistic locking, not pessimistic locking.  try to use shared lock, not exclusive lock.  share mode vs. FOR UPDATE &lt;/li&gt;&lt;li&gt; if you can, compress text/blobs &lt;/li&gt;&lt;li&gt; compress static data &lt;/li&gt;&lt;li&gt; don't back up static data as often &lt;/li&gt;&lt;li&gt; enable and increase the query and buffer caches if appropriate &lt;/li&gt;&lt;li&gt; config params -- &lt;a class="external free" href="http://docs.cellblue.nl/2007/03/17/easy-mysql-performance-tweaks/" rel="nofollow" title="http://docs.cellblue.nl/2007/03/17/easy-mysql-performance-tweaks/"&gt;http://docs.cellblue.nl/2007/03/17/easy-mysql-performance-tweaks/&lt;/a&gt; is a good reference &lt;/li&gt;&lt;li&gt; Config variables &amp;amp; tips: &lt;ol&gt;&lt;li&gt;  use one of the supplied config files &lt;/li&gt;&lt;li&gt;  key_buffer, unix cache (leave some RAM free), per-connection variables, innodb memory variables &lt;/li&gt;&lt;li&gt;  be aware of global vs. per-connection variables &lt;/li&gt;&lt;li&gt;  check SHOW STATUS and SHOW VARIABLES (GLOBAL|SESSION in 5.0 and up) &lt;/li&gt;&lt;li&gt;  be aware of swapping esp. with Linux, "swappiness" (bypass OS  filecache for innodb data files, innodb_flush_method=O_DIRECT if  possible (this is also OS specific)) &lt;/li&gt;&lt;li&gt;  defragment tables, rebuild indexes, do table maintenance &lt;/li&gt;&lt;li&gt;  If you use innodb_flush_txn_commit=1, use a battery-backed hardware cache write controller &lt;/li&gt;&lt;li&gt;  more RAM is good so faster disk speed &lt;/li&gt;&lt;li&gt;  use 64-bit architectures &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;  --skip-name-resolve  &lt;/li&gt;&lt;li&gt;  increase myisam_sort_buffer_size to optimize large inserts (this is a per-connection variable) &lt;/li&gt;&lt;li&gt;  look up memory tuning parameter for on-insert caching &lt;/li&gt;&lt;li&gt; increase temp table size in a data warehousing environment  (default is 32Mb) so it doesn't write to disk (also constrained by  max_heap_table_size, default 16Mb) &lt;/li&gt;&lt;li&gt;  Run in SQL_MODE=STRICT to help identify warnings &lt;/li&gt;&lt;li&gt;  /tmp dir on battery-backed write cache &lt;/li&gt;&lt;li&gt;  consider battery-backed RAM for innodb logfiles &lt;/li&gt;&lt;li&gt;  use --safe-updates for client &lt;/li&gt;&lt;li&gt;  Redundant data is redundant &lt;/li&gt;&lt;li&gt; Keep an eye on &lt;a class="external text" href="http://cherry.world.edoors.com/COBFKUqnUdBY" rel="nofollow" title="http://cherry.world.edoors.com/COBFKUqnUdBY"&gt;buffer pool  and keybuffer hit rate&lt;/a&gt; &lt;/li&gt;&lt;/ol&gt;Storage Engine Performance Tips: &lt;br /&gt;&lt;ol&gt;&lt;li&gt; InnoDB ALWAYS keeps the primary key as part of each index, so do not make the primary key very large &lt;/li&gt;&lt;li&gt; Utilize different storage engines on master/slave ie, if you need fulltext indexing on a table. &lt;/li&gt;&lt;li&gt; BLACKHOLE engine and replication is much faster than FEDERATED tables for things like logs. &lt;/li&gt;&lt;li&gt; Know your storage engines and what performs best for your needs, know that different ones exist. &lt;ol&gt;&lt;li&gt; ie, use MERGE tables ARCHIVE tables for logs &lt;/li&gt;&lt;li&gt;  Archive old data -- don't be a pack-rat!  2 common engines for this are ARCHIVE tables and MERGE tables &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; use row-level instead of table-level locking for OLTP workloads &lt;/li&gt;&lt;li&gt;  try out a few schemas and storage engines in your test environment before picking one. &lt;/li&gt;&lt;/ol&gt;Database Design Performance Tips: &lt;br /&gt;&lt;ol&gt;&lt;li&gt; Design sane query schemas.  don't be afraid of table joins, often they are faster than denormalization &lt;/li&gt;&lt;li&gt; Don't use boolean flags &lt;/li&gt;&lt;li&gt; Use Indexes &lt;/li&gt;&lt;li&gt; Don't Index Everything &lt;/li&gt;&lt;li&gt; Do not duplicate indexes &lt;/li&gt;&lt;li&gt; Do not use large columns in indexes if the ratio of SELECTs:INSERTs is low. &lt;/li&gt;&lt;li&gt; Split out &lt;a class="external text" href="http://yoshinorimatsunobu.blogspot.com/2010/11/handling-long-textsblobs-in-innodb-1-to.html" rel="nofollow" title="http://yoshinorimatsunobu.blogspot.com/2010/11/handling-long-textsblobs-in-innodb-1-to.html"&gt;large blob elements&lt;/a&gt; in InnoDB &lt;/li&gt;&lt;li&gt; be careful of redundant columns in an index or across indexes &lt;/li&gt;&lt;li&gt; Use a clever key and ORDER BY instead of MAX &lt;/li&gt;&lt;li&gt;  Normalize first, and denormalize where appropriate.   &lt;/li&gt;&lt;li&gt;  Databases are not spreadsheets, even though Access really really looks like one.  Then again, Access isn't a real database &lt;/li&gt;&lt;li&gt;  use INET_ATON and INET_NTOA for IP addresses, not char or varchar &lt;/li&gt;&lt;li&gt;  make it a habit to REVERSE() email addresses, so you can  easily search domains (this will help avoid wildcards at the start of  LIKE queries if you want to find everyone whose e-mail is in a certain  domain) &lt;/li&gt;&lt;li&gt;  A NULL data type can take more room to store than NOT NULL &lt;/li&gt;&lt;li&gt; Avoid NULL in index attributes. Use 0 instead &lt;/li&gt;&lt;li&gt; Storing flags in a database can slow down execution due to a bad cardinality. Try using bit flags &lt;/li&gt;&lt;li&gt; Don't store flags in a NULL and NOT NULL manner. Update from NULL -&amp;gt; 1 is slower than 0 -&amp;gt; 1 &lt;/li&gt;&lt;li&gt;  Choose appropriate character sets &amp;amp; collations -- UTF16  will store each character in 2 bytes, whether it needs it or not, latin1  is faster than UTF8. &lt;/li&gt;&lt;li&gt;  Use Triggers wisely &lt;/li&gt;&lt;li&gt; Use &lt;a class="external text" href="http://marksverbiage.blogspot.com/2007/10/mysql-delaykeywrite-is-good.html" rel="nofollow" title="http://marksverbiage.blogspot.com/2007/10/mysql-delaykeywrite-is-good.html"&gt;delayed key wrote&lt;/a&gt; &lt;/li&gt;&lt;li&gt;  use min_rows and max_rows to specify approximate data size so  space can be pre-allocated and reference points can be calculated.   &lt;/li&gt;&lt;li&gt;  Use HASH indexing for indexing across columns with similar data prefixes &lt;/li&gt;&lt;li&gt;  Use myisam_pack_keys for int data &lt;/li&gt;&lt;li&gt;  be able to change your schema without ruining functionality of your code &lt;/li&gt;&lt;li&gt;  segregate tables/databases that benefit from different configuration variables &lt;/li&gt;&lt;li&gt; Don't access the last key part in a where clause with = &lt;/li&gt;&lt;li&gt; Abuse the system for optimiization you're using with system dependant features like RTREE's for &lt;a class="external text" href="http://jcole.us/blog/archives/2007/11/24/on-efficiently-geo-referencing-ips-with-maxmind-geoip-and-mysql-gis/" rel="nofollow" title="http://jcole.us/blog/archives/2007/11/24/on-efficiently-geo-referencing-ips-with-maxmind-geoip-and-mysql-gis/"&gt;optimized range queries&lt;/a&gt; &lt;/li&gt;&lt;/ol&gt;Other: &lt;br /&gt;&lt;ol&gt;&lt;li&gt; Hire a MySQL (tm) Certified DBA &lt;/li&gt;&lt;li&gt; Know that there are many consulting companies out there that can help, as well as MySQL's Professional Services. &lt;/li&gt;&lt;li&gt; Read and post to MySQL Planet at &lt;a class="external free" href="http://www.planetmysql.org/" rel="nofollow" title="http://www.planetmysql.org"&gt;http://www.planetmysql.org&lt;/a&gt; &lt;/li&gt;&lt;li&gt; Attend the yearly MySQL Conference and Expo or other conferences with MySQL tracks (link to the conference here) &lt;/li&gt;&lt;li&gt; Support your local User Group (link to forge page w/user groups here) &lt;/li&gt;&lt;/ol&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=1919392632262582347" name="Authored_by"&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt; Authored by &lt;/span&gt;&lt;/h3&gt;Jay Pipes, Sheeri Kritzer, Bill Karwin, &lt;a class="external text" href="http://ronaldbradford.com/" rel="nofollow" title="http://ronaldbradford.com"&gt;Ronald Bradford&lt;/a&gt;, Farhan "Frank Mash" Mashraqi, Taso Du Val, Ron Hu, Klinton Lee, Rick James, Alan Kasindorf, Eric Bergen, &lt;a class="external text" href="http://www.xarg.org/" rel="nofollow" title="http://www.xarg.org"&gt;Robert Eisele&lt;/a&gt;, Kaj Arno, Joel Seligstein, Amy Lee, Sameer Joshi, Surat Singh Bhati&lt;br /&gt;&lt;br /&gt;&amp;nbsp;And yet&lt;br /&gt;&lt;br /&gt;http://www.day32.com/MySQL/&lt;br /&gt;http://dev.mysql.com/doc/refman/5.0/en/innodb-storage-engine.html&lt;br /&gt;http://nicj.net/2011/01/20/mysql-text-vs-varchar-performance &lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-6688592759385251534?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/6688592759385251534/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=6688592759385251534&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/6688592759385251534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/6688592759385251534'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/11/top-10-sql-performance-tips.html' title='Top 10 SQL Performance Tips'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-5379133448035277499</id><published>2011-10-19T21:33:00.001+03:00</published><updated>2011-10-19T23:54:29.712+03:00</updated><title type='text'>29 правил комбинирования шрифтов</title><content type='html'>Это перевод топика&amp;nbsp;&lt;a href="http://bonfx.com/29-principles-for-making-great-font-combinations/"&gt;http://bonfx.com/29-principles-for-making-great-font-combinations/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Правила в порядке "как попало"&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Комбинируйте типы шрифтов с засечками и без засечек, чтобы создать "контраст", а не "согласие"&lt;/b&gt;. Чем более далеки друг от друга стили шрифтов, тем более удачным может оказаться ваш выбор, используйте это правило как общее, но не как непогрешимое. Шрифты, которые слишком похожи вместе выглядят плохо. Выбирайте на согласие или контрастности, но избегайте темных золотых середин, где в итоге вы получите конфликт. Посмотрите Garamond и Sabon вместе, чтобы видеть то, что я подразумеваю под "темной золотой серединой". Или попробуйте Helvetica и Univers вместе, что выглядит так же плохо.&amp;nbsp;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Не используйте два шрифта с засечками или два шрифта без засечек для создания комбинации&lt;/b&gt;, кроме случаев, когда они радикально различаются.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Избегайте выбора двух шрифтов из одной категории&lt;/b&gt;, как то Script или Slabs. Вы не будете иметь достаточного контраста, что в итоге приведет к конфликту. Например, использовать Clarendon и Rockwell вместе не сильно хорошая идея.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Создайте достаточную разницу в размерах&lt;/b&gt; между различными шрифтами для создания контраста.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Назначте шрифтам различные роли&lt;/b&gt; и не меняйте их местами.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Подбирате шрифты из разных категорий так, чтобы они имели похожую &lt;a href="http://en.wikipedia.org/wiki/X-height"&gt;x-height&lt;/a&gt;&amp;nbsp;ака высота строчных и &lt;a href="http://ru.wikipedia.org/wiki/%D0%93%D0%BB%D0%B8%D1%84"&gt;glyph widths&lt;/a&gt;&amp;nbsp;(лучше прочитать статью). Например, Futura с Times New Roman несовместимы из-за большого контраста x-heights и widths, в данном случае больше из-за ширины. Однако если вы собираетесь работать с&amp;nbsp;condensed&amp;nbsp;шрифтом, вы можете не обращать внимания на эту проблему тк в итоге получите суперконтраст.&lt;/li&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-2jtDG9zwvCw/Tp80HzpbZiI/AAAAAAAAAEM/KqJEuh7zonQ/s1600/font-sizes-large.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="265" src="http://3.bp.blogspot.com/-2jtDG9zwvCw/Tp80HzpbZiI/AAAAAAAAAEM/KqJEuh7zonQ/s400/font-sizes-large.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Ликбез вставка сперто &lt;a href="http://indians.ru/a-font-sizes.htm"&gt;тут&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;li&gt;&lt;b&gt;Найдите некоторые связи между основными формами. &lt;/b&gt;Например, оцените букву О в верхнем и нижнем регистре.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Droid Sans', Arial, Helvetica, sans-serif; font-size: 15px; line-height: 21px;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Find some kind of relationship between the basic shapes&lt;/strong&gt;. For instance, look to the letter O in upper and lower case. Round letter O’s and taller oval O’s, in general don’t seem to like each other when creating pairs.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-5379133448035277499?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/5379133448035277499/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=5379133448035277499&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/5379133448035277499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/5379133448035277499'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/10/29-rules-of-font-combinations.html' title='29 правил комбинирования шрифтов'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-2jtDG9zwvCw/Tp80HzpbZiI/AAAAAAAAAEM/KqJEuh7zonQ/s72-c/font-sizes-large.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-1048999637167679799</id><published>2011-10-18T23:19:00.000+03:00</published><updated>2011-10-19T15:26:30.854+03:00</updated><title type='text'>е-магазин, оплата visa/mastercard</title><content type='html'>Маленькая зарисовка, основанная на &lt;a href="http://habrahabr.ru/blogs/pay_system/124668/"&gt;Х-топике&lt;/a&gt; + его &lt;a href="http://webcache.googleusercontent.com/search?q=cache:1AspwSQzZjMJ:habrahabr.ru/blogs/pay_system/124668/+habrahabr.ru/blogs/pay_system/124668/&amp;amp;cd=1&amp;amp;hl=uk&amp;amp;ct=clnk&amp;amp;gl=ua"&gt;кеш&lt;/a&gt; на всякий пожарный.&lt;br /&gt;Внутри выжимка из топика и коментов.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;Выжимка: платежные агрегаторы нужны, когда нет желания/сил/возможности реализовать прием разных типов карт и их заменителей у себя на сайте. Усё&lt;br /&gt;Я.бабло, вебмони, гугчекоут - можно реализовать у себя. Ну как у себя, формировать и запрашивать всю инфу у себя и отправлять на их необходимый сайт для завершения оплаты.&lt;br /&gt;Для взаимодействия с visa/mc нужно найти банки интернет-эквайреры.&lt;br /&gt;Приблизительный список для РФ:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://alfabank.ru/"&gt;Альфабанк&lt;/a&gt; - чтобы узнать детали, долбать коллцентр до соединения со спецом по интернет платежам.&lt;/li&gt;&lt;/ul&gt;Эти у меня не на слуху, так что думайте сами &lt;br /&gt;&lt;ul&gt;&lt;li&gt;ГазПромБанк&lt;/li&gt;&lt;li&gt;ТрансКредитБанк&lt;/li&gt;&lt;li&gt;РусскийСтандарт &lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Вот все что выжимается из хабры.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Перейдем к материалам из интренетов.&lt;/div&gt;&lt;div&gt;Гугл натолкнул меня на вот этот &lt;a href="http://www.banki.ru/forum/index.php?PAGE_NAME=read&amp;amp;FID=33&amp;amp;TID=56987&amp;amp;PAGEN_1=2"&gt;форум&lt;/a&gt;,&amp;nbsp;где, собсно, собрались жаждущие эквайринга. Там и найдены были стайтьи.&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.brokerok.ru/blog/item/59-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D1%8D%D0%BA%D0%B2%D0%B0%D0%B9%D1%80%D0%B8%D0%BD%D0%B3.html"&gt;Первая&lt;/a&gt;&amp;nbsp;описывает примерно тоже что и хабра.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;strong&gt;Интернет-эквайринг в России&lt;/strong&gt; работает по следующим схемам: &lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-wv5ru8Xhq1Q/Tp6V20CBEHI/AAAAAAAAAEE/0epmEyKAtCc/s1600/acquiring+%25281%2529.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="204" src="http://1.bp.blogspot.com/-wv5ru8Xhq1Q/Tp6V20CBEHI/AAAAAAAAAEE/0epmEyKAtCc/s320/acquiring+%25281%2529.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;Как  видно из схемы №1 компания работает через посредников, а не напрямую с  интернет-эквайером. Посредником выступает Процессинговая центр  (компания). Поэтому будет взиматься двойная комиссию как эквайером, так и  процессинговым центром. Как не странно большинство интернет-эквайеров  работают именно по такой Lite схеме. Если вы хотите низкий процент и  лучшие условия ищите схему №2, правда мало кто работает по данной схеме.  Если у вас небольшой бизнес с малым оборотом, то можно выбрать надежную  процессинговую компанию и работать с ней. Если бизнес большой то  работать, конечно, лучше по схеме №2. &lt;br /&gt;&lt;div class="box-hilite"&gt;&lt;strong&gt;Подключайте двух интернет-эквайеров&lt;/strong&gt;.  Они могут работать как параллельно, так и один может быть как запасной  вариант. В основном процессинговые компании предлагают такие услуги,  которые вам обойдутся 1000-2000 руб. в месяц, но в случае чего сэкономят  вам деньги и репутацию во времена сбоев одно из интернет-эквайера. Иной  раз даже надежные игроки дают сбои. Если у вас миллионный оборот, день  простоя может вам обойтись в сотни тысяч потерь в день.&lt;/div&gt;&lt;/blockquote&gt;&lt;a href="http://www.brokerok.ru/blog/item/89-%D0%B0cquirer.html"&gt;Вторая статья&lt;/a&gt;&amp;nbsp;по характеристикам эквайров&lt;br /&gt;Ниже приведу основные критерии, курсивом отмечу условия, которые должны быть у лучшего эквайера.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Открытие счета в банке – основным условием для предоставление услуг интернет-эквайринга это необходимость открытия счета в банке эквайера.&lt;/li&gt;&lt;li&gt;Необязательно открывать счет в банке эквайера.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Комиссия эквайера (Вознаграждение) - она бывает разная:&lt;/li&gt;&lt;li&gt;а) Интернет-эквайеры берут % с каждой успешной транзакции это основная комиссия.&lt;/li&gt;&lt;li&gt;б) Помимо основной комиссии также может взиматься N сумму (это может быть, например 8 руб. или 10 центов и т.д.) за каждую успешно проведенную транзакцию. Поэтому уточните, какую комиссию с вас будут удерживать.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Комиссия (вознаграждение) интернет-эквайера должна быть одна и меньше либо равна 3% по основным картам.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Плата за подключение - некоторые компании берут определенную плату за подключение к их системе, поэтому данный вопрос тоже уточните.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Не взимается плата за подключение.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Обеспечительный депозит – у некоторых интернет-эквайеров это необходимое требование для сотрудничества. Вашей компании необходимо будет иметь обеспечительный депозит в банке, на котором вам придется ежемесячно держать некую сумму, размер которой определяется в зависимости от изменения размера ежемесячного (годового) оборота вашей компании по интернет платежам. В случае чего деньги с вашего обеспечительного депозита будут списаны в счет банка. Отсутствие обеспечительного депозита.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Банковские карты - также узнайте, какие принимаются банковские карты к приему платежей.&lt;/li&gt;&lt;li&gt;VISA, MasterCard, American Еxpress, Diners Club, JCB.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Минимальная и максимальная сумма платежа – также стоит уточнить в зависимости от специфики вашего бизнеса, так как есть ограничение по сумме транзакции и сумме транзакций в день. В основном лимит устанавливается в договоре.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Перевод денег на ваш р/с – один из важных аспектов. Деньги в основном должны приходить к вам быстро в основном это 1,2 или 3 банковских дня.&amp;nbsp;&lt;/li&gt;&lt;li&gt;На следующий день.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Back-office - личный кабинет, в котором ваша компания в режиме онлайн будет отслеживать транзакции, делать возвратные операции, формировать отчеты и т.д.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Страны приёма платежей – по умолчанию эквайеры подключают Россию, но если вам нужны и другие страны, то этот список можно расширить.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Возврат денег клиенту - возвраты могут быть разные:&lt;/li&gt;&lt;li&gt;а) возврат на карту день в день, комиссия в основном не взимается.&lt;/li&gt;&lt;li&gt;б) возврат спустя определенное время т.е. после того как банк перечислил деньги за транзакцию на р/с вашей компании. Поэтому необходимо узнать какой % комиссии взимает интернет-эквайер за операции возврата.&lt;/li&gt;&lt;li&gt;Размер комиссии по возврату зависит от платежной модели, по которой будет работать ваша компания.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Выбор платежной модели - есть разные платежные модели, выбирая ту или иную модель зависимости от специфики вашего бизнеса:&lt;/li&gt;&lt;li&gt;а) Единая транзакция, которая позволяет перевести деньги со счета держателя на ваш счет. Это означает, что авторизация платежа и ее подтверждение осуществляются в рамках одной транзакции. В основном подходит для брокеров, интернет магазинов торгующих книгами и т.д.&lt;/li&gt;&lt;li&gt;б) Две транзакции — авторизация, за которой следует подтверждение. Это позволяет разнести во времени процесс авторизации операции на счете держателя карты с последующим подтверждением авторизации (например, подтверждение по факту проверки наличия товара на складе, по факту отгрузки товара, после проведения дополнительных проверок т.д.). Следует отметить, что подтверждение является основанием для перечисления денег со счета клиента, в то время как авторизация подразумевает лишь блокировку средств на счете клиента.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Брендирование платежной страницы - клиенты буду попадать на платежную страницу, сделанную под дизайн вашей компании (сайта). Мелочь, но приятно и клиенты будут видеть, что они платят вам. В этом есть некая психологическая составляющая. Есть брендирование страницы.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Маркетинговая поддержка - выбирайте интернет-эквайера с которым вы можете разработать совместные маркетинговые программы, такие как программы лояльность, ко-брендинг, использовать клиентскую базу интернет-эквайера и т.д. Есть возможность.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;ul class="checklist" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;"&gt;&lt;/span&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;a href="http://www.brokerok.ru/blog/item/101-internet-acquiring-list.html"&gt;Третья статья&lt;/a&gt; - список эквайров&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li&gt;Интернет-эквайринг UCS - ЗАО «Компания объединенных кредитных карточек» (ЗАО «КОКК»). Одна из первых в России процессинговых компаний, основные направления включают эмиссию и эквайринг пластиковых карт таких международных платежных систем, как VISA, MasterCard, Diners Club, JCB. UCS сотрудничает с системами электронных платежей: ChronoPay, ASSIST, Uniteller и Сирена-Трэвел. Следовательно, с вас будет взиматься двойная комиссия, которая может доходить до 4%. Также компания удерживает на своих счетах сумму двухнедельного оборота, например, оборот вашей компании 1.5 млн в месяц по электронным платежам UCS из ваших платежей удержит сумму порядка 700 тыс. руб., которая будет храниться на счетах компании. Довольно большая сумма будет изъята из оборота. Если вы выберите услуги интернет-эквайринга UCS обратите на это внимание.&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Интернет-эквайринг ChronoPay. Хронопей лидер в области интернет-процессинга платежей по банковским картам в европейском регионе. Помимо сотрудничества с компанией UCS сотрудничают с рядом банков, таких как ВТБ24, Мастер-Банк и т.д. С недавних пор у них начались проблемы, летом сервера упали, а под конец 2010 года подверглись DoS атакам. Впоследствии перехват основного домена, в интернет были выложен реквизиты держателей пластиковых карт. Как я уже вам говорил, день простоя может вам обойтись в сотни тысяч потерь не только денег, но и клиентов.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Интернет-эквайринг ASSIST - помимо UCS работает с рядом банков, таких как ВТБ24, Мастер-Банк и т.д. Так же высокая комиссия. Есть возможность воспользоваться сервисом кобрендинговых карт.&lt;/li&gt;&lt;li&gt;Интернет-эквайринг ВТБ24. Банк предоставляет торгово-сервисным предприятиям комплексные услуги в области интернет-эквайринга: внедрение, эксплуатацию и поддержку проектов эквайринга интернет - магазинов. Партнерами банка являются: «МультиКарта», Assist и ChronoPay. Вообщем опять посредничество и высокий процент. Банки в основном берут 2.5% плюс процессинговая компания 1% в зависимости от оборота.&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Интернет-эквайринг PayOnline System - работает с Транс Кредит Банком. Взимается плата за подключение, а также обеспечительный депозит, но не в большом размере. Принимают пластиковые карты международных платежных систем VISA, MasterCard.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;&amp;nbsp;Далее приведу схему работы №2 напрямую с интернет-эквайринговыми банками.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Интернет-эквайринг Альфа-Банк. Необходимое условие это открытие счета в банке, что не совсем удобно. Прием платежей по двум банковским картам VISA, MasterCard. Высокая комиссия по сравнению с другими эквайерами, которые работают по схеме №2. Отсутствие обеспечительного депозита.&lt;/li&gt;&lt;/ul&gt;Если с банками не вышло из-за оборота или лени, рекомендую Paypal.&lt;br /&gt;&lt;a href="https://www.paypal.com/ru/cgi-bin/webscr?cmd=_display-receiving-fees-outside"&gt;Для внутренних платежей&lt;/a&gt;&amp;nbsp;они предлагают следующие предложения&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br class="Apple-interchange-newline" /&gt;&lt;/span&gt;&lt;br /&gt;&lt;table align="center" border="0" cellpadding="0" cellspacing="0" id="transactionFees" style="border-bottom-color: rgb(131, 168, 204); border-bottom-style: solid; border-bottom-width: 1px; border-collapse: collapse; border-left-color: rgb(131, 168, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(131, 168, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(131, 168, 204); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 2px; margin-right: 2px; margin-top: 10px; width: 576px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="header" style="background-color: #ebf1f7; border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 12px; font-weight: bold; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;Месячные продажи на сумму&lt;/td&gt;&lt;td class="header" colspan="4" style="background-color: #ebf1f7; border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 12px; font-weight: bold; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;Плата за транзакцию&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;$0.00 USD - $3,000.00 USD&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;3.4% + $0.30 USD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;$3,000.01 USD - $10,000.00 USD&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;2.9% + $0.30 USD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;$10,000.01 USD - $100,000.00 USD&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;2.7% + $0.30 USD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;&amp;gt; $100,000.00 USD&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;2.4% + $0.30 USD&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;img alt="" border="0" height="10" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" /&gt;&lt;br /&gt;&lt;a href="https://www.paypal.com/ru/cgi-bin/webscr?cmd=_display-xborder-fees-outside"&gt;Для платежей из-за бугра&lt;/a&gt;&lt;br /&gt;Табличка ниже, получена методом тыка на разные страны - все зависит от страны в которой находится ваш покупатель.&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;table align="center" border="0" cellpadding="0" cellspacing="0" id="transactionFees" style="border-bottom-color: rgb(131, 168, 204); border-bottom-style: solid; border-bottom-width: 1px; border-collapse: collapse; border-left-color: rgb(131, 168, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(131, 168, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(131, 168, 204); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 2px; margin-right: 2px; margin-top: 10px; width: 576px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="header" style="background-color: #ebf1f7; border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 12px; font-weight: bold; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;Месячные продажи на сумму&lt;/td&gt;&lt;td class="header" style="background-color: #ebf1f7; border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 12px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Плата за транзакцию &lt;/span&gt;(сноска блеать, а расшифровки нет)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;&lt;input class="secondary button mini accessAid" id="updatePage" name="updatePage" style="background-attachment: initial; background-clip: initial; background-color: #e1e1e1; background-image: url(https://www.paypalobjects.com/en_US/i/pui/core/btn_bg_default.gif); background-origin: initial; background-position: 0% 50%; background-repeat: repeat no-repeat; border-bottom-color: rgb(144, 141, 141); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(191, 191, 191); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(144, 141, 141); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(191, 191, 191); border-top-style: solid; border-top-width: 1px; color: black; display: block !important; font-size: 0.9em; height: 1px !important; left: -500em !important; line-height: 0 !important; margin-right: 10px; overflow-x: hidden !important; overflow-y: hidden !important; padding-bottom: 1px; padding-left: 0.5em; padding-right: 0.5em; padding-top: 1px; position: absolute !important; text-indent: -9999em !important; top: 0px !important; width: auto !important;" type="submit" value="Update" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;$0.00 USD - $3,000.00 USD&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;max 4.9% + $0.30 USD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;$3,000.01 USD - $10,000.00 USD&lt;span class="small"&gt;&amp;nbsp;(Merchant Rate qualification required)&lt;/span&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;max 3.9% + $0.30 USD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;$10,000.01 USD - $100,000.00 USD&lt;span class="small"&gt;&amp;nbsp;(Merchant Rate qualification required)&lt;/span&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;max 3.7% + $0.30 USD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;&amp;gt; $100,000.00 USD&lt;span class="small"&gt;&amp;nbsp;(Merchant Rate qualification required)&lt;/span&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(235, 241, 247); border-bottom-style: inset; border-bottom-width: 1px; border-left-color: rgb(235, 241, 247); border-left-style: inset; border-left-width: 1px; border-right-color: rgb(235, 241, 247); border-right-style: inset; border-right-width: 1px; border-top-color: rgb(235, 241, 247); border-top-style: inset; border-top-width: 1px; font-size: 10px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left;"&gt;max 3.4% + $0.30 USD&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span class="small"&gt;Плата за получение eCheck платежей не превысит $5.00 USD за транзакцию.&lt;/span&gt;&lt;br /&gt;&lt;span class="small"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="small"&gt;&lt;a href="https://www.paypal.com/helpcenter/main.jsp?t=solutionTab&amp;amp;solutionId=13054&amp;amp;cmd=_help-ext"&gt;eCheck&lt;/a&gt; - это такая хитра хрень, которая связывает ваш пайпал акк и банковский аккаунт. Идет несколько дней&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Естессно, что подключение и обслуживание бесплатно, но пользователя перекидывает на сайт самого пейпала.&lt;br /&gt;Есть плюшки для проведения транзакций на вашем сайте, но за это просят денег.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Если все-таки решились воспользоваться агрегатором всего и вся, то читать как минимум &lt;a href="http://www.epanchincev.ru/category/%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD%D1%8B/obzor_agregatorov/"&gt;это&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-1048999637167679799?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/1048999637167679799/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=1048999637167679799&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/1048999637167679799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/1048999637167679799'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/10/pay-with-visa-mastercard-in-russia.html' title='е-магазин, оплата visa/mastercard'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-wv5ru8Xhq1Q/Tp6V20CBEHI/AAAAAAAAAEE/0epmEyKAtCc/s72-c/acquiring+%25281%2529.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-3151802233445200967</id><published>2011-07-31T11:44:00.000+03:00</published><updated>2011-07-31T11:44:21.908+03:00</updated><title type='text'>Linux skype upside down/flipped webcam on Asus laptop</title><content type='html'>If running skype, the image coming out of the webcam of some of the asus laptops is upside down (flipped vertically). My camera USB information is the following:&lt;br /&gt;&lt;pre class="example"&gt;~$ lsusb | grep Chicony&lt;br /&gt;Bus 002 Device 003: ID 04f2:b106 Chicony Electronics Co., Ltd&lt;br /&gt;&lt;/pre&gt;A solution/fix is to use the &lt;a href="http://people.fedoraproject.org/%7Ejwrdegoede/"&gt;libv4l library&lt;/a&gt; , courtesy of &lt;a href="http://hansdegoede.livejournal.com/"&gt;Hans de Goede&lt;/a&gt;, to call the executable. Since the available linux skype version at the moment is a &lt;em&gt;32bit&lt;/em&gt; executable, you will need to use the 32bit version of these libraries:&lt;br /&gt;&lt;pre class="example"&gt;LD_PRELOAD="/usr/lib32/libv4l/v4l1compat.so" /usr/bin/skype&lt;br /&gt;&lt;/pre&gt;or  &lt;pre class="example"&gt;LD_PRELOAD="/usr/lib32/libv4l/v4l1compat.so /usr/lib32/libv4lconvert.so.0" /usr/bin/skype&lt;br /&gt;&lt;/pre&gt;On &lt;a href="http://www.ubuntu.com/"&gt;ubuntu&lt;/a&gt; the library can be installed by:&lt;br /&gt;&lt;pre class="example"&gt;~$ sudo apt-get install lib32v4l-0&lt;br /&gt;&lt;/pre&gt;and on &lt;a href="http://www.gentoo.org/"&gt;gentoo&lt;/a&gt; by:  &lt;pre class="example"&gt;~# emerge libv4l&lt;br /&gt;&lt;/pre&gt;and then as &lt;em&gt;root&lt;/em&gt; (or sudo) do something like:&lt;br /&gt;&lt;pre class="src"&gt;~# mv /usr/bin/skype /usr/bin/skype.real &amp;amp;&amp;amp; \&lt;br /&gt;echo -e '#!/bin/sh\nLD_PRELOAD=&lt;span style="color: lightsalmon;"&gt;"/usr/lib32/libv4l/v4l1compat.so /usr/lib32/libv4lconvert.so.0"&lt;/span&gt; /usr/bin/skype.real &lt;span style="color: lightsalmon;"&gt;"$@"&lt;/span&gt;' \&lt;br /&gt;&amp;gt; /usr/bin/skype.wrapper &amp;amp;&amp;amp; \&lt;br /&gt;chmod 755 /usr/bin/skype.wrapper &amp;amp;&amp;amp; \&lt;br /&gt;ln -s /usr/bin/skype.wrapper /usr/bin/skype&lt;br /&gt;&lt;/pre&gt;which moves the original skype to skype.real and creates a wrapper file:&lt;br /&gt;&lt;pre class="src"&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;LD_PRELOAD=&lt;span style="color: lightsalmon;"&gt;"/usr/lib32/libv4l/v4l1compat.so /usr/lib32/libv4lconvert.so.0"&lt;/span&gt; /usr/bin/skype.real &lt;span style="color: lightsalmon;"&gt;"$@"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-3151802233445200967?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/3151802233445200967/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=3151802233445200967&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3151802233445200967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3151802233445200967'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/07/linux-skype-upside-downflipped-webcam.html' title='Linux skype upside down/flipped webcam on Asus laptop'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-2936961061447900531</id><published>2011-03-06T00:04:00.002+02:00</published><updated>2011-03-06T00:04:33.776+02:00</updated><title type='text'>microformats in web</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-2936961061447900531?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/2936961061447900531/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=2936961061447900531&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2936961061447900531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2936961061447900531'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/03/microformats-in-web.html' title='microformats in web'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-7946921358985412506</id><published>2011-02-05T22:20:00.000+02:00</published><updated>2011-02-05T22:20:51.595+02:00</updated><title type='text'>Check your site availability</title><content type='html'>&lt;a href="http://just-ping.com/" target="_blank"&gt;http://just-ping.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hosts&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;Singapore, Singapore;&amp;nbsp; Amsterdam2, Netherlands;&amp;nbsp; Florida, U.S.A.;&amp;nbsp; Amsterdam3, Netherlands;&amp;nbsp; Hong Kong, China;&amp;nbsp; Sydney, Australia;&amp;nbsp; Munchen, Germany;&amp;nbsp; Cologne, Germany;&amp;nbsp; New York, U.S.A.;&amp;nbsp; Cairo, Egypt;&amp;nbsp; Amsterdam, Netherlands;&amp;nbsp; Stockholm, Sweden;&amp;nbsp; Santa Clara, U.S.A.;&amp;nbsp; Vancouver, Canada;&amp;nbsp; Krakow, Poland;&amp;nbsp; London, United Kingdom;&amp;nbsp; Madrid, Spain;&amp;nbsp; Padova, Italy;&amp;nbsp; Austin, U.S.A.;&amp;nbsp; Amsterdam, Netherlands;&amp;nbsp; Paris, France;&amp;nbsp; Melbourne, Australia;&amp;nbsp; Shanghai, China;&amp;nbsp; Copenhagen, Denmark;&amp;nbsp; Lille, France;&amp;nbsp; Zurich, Switzerland;&amp;nbsp; Mumbai, India;&amp;nbsp; Chicago, U.S.A.;&amp;nbsp; Nagano, Japan;&amp;nbsp; Haifa, Israel;&amp;nbsp; Auckland, New Zealand;&amp;nbsp; Antwerp, Belgium;&amp;nbsp; Groningen, Netherlands;&amp;nbsp; Moscow, Russia;&amp;nbsp; Dublin, Ireland;&amp;nbsp; Oslo, Norway;&amp;nbsp; Kharkov, Ukraine;&amp;nbsp; Manchester, United Kingdom;&amp;nbsp; Vilnius, Lithuania;&amp;nbsp; Ashburn, U.S.A.;&amp;nbsp; Bucharest, Romania;&amp;nbsp; Bangkok, Thailand;&amp;nbsp; Kuala Lumpur, Malaysia;&amp;nbsp; Jakarta, Indonesia;&amp;nbsp; Cape Town, South Africa;&amp;nbsp; Glasgow, United Kingdom;&amp;nbsp; Lisbon, Portugal;&amp;nbsp; Chicago, U.S.A.;&amp;nbsp; Dallas, U.S.A.;&amp;nbsp; Buenos Aires, Argentina;&amp;nbsp; Istanbul, Turkey;&amp;nbsp; Gdansk, Poland;&amp;nbsp; Beijing, China&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://just-ping.com/" target="_blank"&gt;http://just-ping.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://pr-cy.ru/speed_test" target="_blank"&gt;http://pr-cy.ru/speed_test&lt;/a&gt;&lt;br /&gt;&lt;a href="http://webo.in/" target="_blank"&gt;http://webo.in&lt;/a&gt;&lt;br /&gt;&lt;a href="http://site-perf.com/" target="_blank"&gt;http://Site-Perf.com/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://tools.pingdom.com/fpt/" target="_blank"&gt;http://tools.pingdom.com/fpt/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://host-tracker.com/"&gt;host-tracker.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ping-admin.ru/free_test"&gt;http://ping-admin.ru/free_test&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pingup.ru/"&gt;http://pingup.ru/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.pingplotter.com/"&gt;http://www.pingplotter.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://downforeveryoneorjustme.com/"&gt;http://downforeveryoneorjustme.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check&amp;nbsp; host in black lists&lt;br /&gt;&lt;a href="http://www.dnsbl.info/dnsbl-database-check.php"&gt;http://www.dnsbl.info/dnsbl-database-check.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-7946921358985412506?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/7946921358985412506/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=7946921358985412506&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/7946921358985412506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/7946921358985412506'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/02/check-your-site-availability.html' title='Check your site availability'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-3113201641979774100</id><published>2011-01-28T10:32:00.003+02:00</published><updated>2011-01-28T10:34:50.763+02:00</updated><title type='text'>Don`t use PHP with Win</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-3113201641979774100?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://habrahabr.ru/company/xakep/blog/112691/' title='Don`t use PHP with Win'/><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/3113201641979774100/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=3113201641979774100&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3113201641979774100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3113201641979774100'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/01/dont-use-php.html' title='Don`t use PHP with Win'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-1915626378794542703</id><published>2011-01-26T09:57:00.003+02:00</published><updated>2011-01-26T10:14:50.377+02:00</updated><title type='text'>Code Conventions for the JavaScript Programming Language</title><content type='html'>&lt;h1&gt;&lt;/h1&gt;&lt;a href="http://javascript.crockford.com/code.html"&gt;copypaste&lt;/a&gt; &lt;br /&gt;This is a set of coding conventions and rules for use in JavaScript programming. It is inspired by    the &lt;a href="http://www.sun.com/" target="_blank"&gt;Sun&lt;/a&gt; document &lt;a href="http://java.sun.com/docs/codeconv/" target="_blank"&gt;Code Conventions for the Java Programming Language&lt;/a&gt;. It is heavily modified of course because &lt;a href="http://javascript.crockford.com/javascript.html"&gt;JavaScript is not Java&lt;/a&gt;. &lt;br /&gt;The long-term value of software to an organization is in direct  proportion to the quality of the codebase. Over its lifetime, a program  will be handled by many pairs of hands and eyes. If a program is able to  clearly communicate its structure and characteristics, it is less  likely that it will break when modified in the never-too-distant future.  &lt;br /&gt;Code conventions can help in reducing the brittleness of programs. &lt;br /&gt;All of our JavaScript code is sent directly to the public. It should always be of publication quality. &lt;br /&gt;Neatness counts. &lt;br /&gt;&lt;h2 id="files"&gt;JavaScript Files &lt;/h2&gt;JavaScript programs should be stored in and delivered as &lt;code&gt;.js&lt;/code&gt; files. &lt;br /&gt;JavaScript code should not be embedded in HTML files unless the code  is specific to a single session. Code in HTML adds significantly to  pageweight with no opportunity for mitigation by caching and  compression. &lt;br /&gt;&lt;code&gt;&lt;script src="%3C/code"&gt;&lt;var&gt;filename&lt;/var&gt;&lt;code&gt;.js&gt;&lt;/code&gt; tags should be placed as late in the body as possible. This reduces the effects of delays imposed by script loading on other page components. There is no need to use the &lt;code&gt;language&lt;/code&gt; or &lt;code&gt;type&lt;/code&gt; attributes. It is the server, not the script tag, that determines the MIME type. &lt;/p&gt;&lt;h2 id="indentation"&gt; Indentation &lt;/h2&gt;&lt;p&gt;The unit of indentation is four spaces. Use of tabs should be avoided because (as of this writing in the 21st Century) there still is not a standard for the placement of tabstops. The use of spaces can produce a larger filesize, but the size is not significant over local networks, and the difference is eliminated by &lt;a href="http://yuiblog.com/blog/2006/03/06/minification-v-obfuscation/" target="_blank"&gt;minification&lt;/a&gt;. &lt;/p&gt;&lt;h2 id="line length"&gt; Line Length &lt;/h2&gt;&lt;p&gt;Avoid lines longer than 80 characters. When a statement will not fit   on a single line, it may be necessary to break it. Place the break after   an operator, ideally after a comma. A break after an operator decreases   the likelihood that a copy-paste error will be masked by semicolon insertion.   The next line should be indented 8 spaces.&lt;/p&gt;&lt;h2 id="comments"&gt; Comments &lt;/h2&gt;&lt;p&gt;Be generous with comments. It is useful to leave information that will be read at a later time by people (possibly yourself) who will need to understand what you have done. The comments should be well-written and clear, just like the code they are annotating. An occasional nugget of humor might be appreciated. Frustrations and resentments will not. &lt;/p&gt;&lt;p&gt;It is important that comments be kept up-to-date. Erroneous comments can make programs even harder to read and understand. &lt;/p&gt;&lt;p&gt;Make comments meaningful. Focus on what is not immediately visible. Don't waste the reader's time with stuff like &lt;/p&gt;&lt;pre&gt;    i = 0; // Set i to zero.&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Generally use line comments. Save block comments for formal documentation and for commenting out. &lt;/p&gt;&lt;h2 id="variable declarations"&gt; Variable Declarations &lt;/h2&gt;&lt;p&gt;All variables should be declared before used. JavaScript does not require   this, but doing so makes the program easier to read and makes it easier   to detect undeclared variables that may become implied &lt;a href="http://yuiblog.com/blog/2006/06/01/global-domination/" target="_blank"&gt;globals&lt;/a&gt;.   Implied global variables should never be used.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;var&lt;/code&gt; statements should be the first statements in the   function body. &lt;/p&gt;&lt;p&gt;It is preferred that each variable be given its own line and comment. They should be listed in alphabetical order. &lt;/p&gt;&lt;pre&gt;    var currentEntry; // currently selected table entry&lt;br /&gt;    var level;        // indentation level&lt;br /&gt;    var size;         // size of table&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;JavaScript does not have block scope, so defining variables in blocks   can confuse programmers who are experienced with other C family languages.   Define all variables at the top of the function. &lt;/p&gt;&lt;p&gt;Use of global variables should be minimized. Implied global variables   should never be used.&lt;/p&gt;&lt;h2&gt; Function Declarations &lt;/h2&gt;&lt;p&gt;All functions should be declared before they are used. Inner functions   should follow the &lt;code&gt;var&lt;/code&gt; statement. This helps make it clear   what variables are included in its scope. &lt;/p&gt;&lt;p&gt;There should be no space between the name of a function and the &lt;code&gt;(&lt;/code&gt;   &lt;small&gt;(left parenthesis)&lt;/small&gt; of its parameter list. There should   be one space between the &lt;code&gt;)&lt;/code&gt; &lt;small&gt;(right parenthesis)&lt;/small&gt;   and the &lt;code&gt;{&lt;/code&gt; &lt;small&gt;(left curly brace)&lt;/small&gt; that begins the   statement body. The body itself is indented four spaces. The &lt;code&gt;}&lt;/code&gt;   &lt;small&gt;(right curly brace)&lt;/small&gt; is aligned with the line containing   the beginning of the declaration of the function. &lt;/p&gt;&lt;pre&gt;    function outer(c, d) {&lt;br /&gt;        var e = c * d;&lt;br /&gt;&lt;br /&gt;        function inner(a, b) {&lt;br /&gt;            return (e * a) + b;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return inner(0, 1);&lt;br /&gt;    }&lt;/pre&gt;&lt;p&gt;This convention works well with JavaScript because in JavaScript, functions   and object literals can be placed anywhere that an expression is allowed.   It provides the best readability with inline functions and complex structures.&lt;/p&gt;&lt;pre&gt;    function getElementsByClassName(className) {&lt;br /&gt;        var results = [];&lt;br /&gt;        walkTheDOM(document.body, function (node) {&lt;br /&gt;            var a;                  // array of class names&lt;br /&gt;            var c = node.className; // the node's classname&lt;br /&gt;            var i;                  // loop counter&lt;br /&gt;&lt;br /&gt;// If the node has a class name, then split it into a list of simple names.&lt;br /&gt;// If any of them match the requested name, then append the node to the set of results.&lt;br /&gt;&lt;br /&gt;            if (c) {&lt;br /&gt;                a = c.split(' ');&lt;br /&gt;                for (i = 0; i &lt; a.length; i += 1) {&lt;br /&gt;                    if (a[i] === className) {&lt;br /&gt;                        results.push(node);&lt;br /&gt;                        break;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        });&lt;br /&gt;        return results;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;If a function literal is anonymous, there should be one space between   the word &lt;code&gt;function&lt;/code&gt; and the &lt;code&gt;(&lt;/code&gt; &lt;small&gt;(left parenthesis)&lt;/small&gt;.   If the space is omited, then it can appear that the function's name is   &lt;code&gt;function&lt;/code&gt;, which is an incorrect reading.&lt;/p&gt;&lt;pre&gt;    div.onclick = function (e) {&lt;br /&gt;        return false;&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    that = {&lt;br /&gt;        method: function () {&lt;br /&gt;            return this.datum;&lt;br /&gt;        },&lt;br /&gt;        datum: 0&lt;br /&gt;    };&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Use of global functions should be minimized. &lt;/p&gt;&lt;p&gt;When a function is to be invoked immediately, the entire invocation expression   should be wrapped in parens so that it is clear that the value being produced   is the result of the function and not the function itself.&lt;/p&gt;&lt;pre&gt;var collection = (function () {&lt;br /&gt;    var keys = [], values = [];&lt;br /&gt;&lt;br /&gt;    return {&lt;br /&gt;        get: function (key) {&lt;br /&gt;            var at = keys.indexOf(key);&lt;br /&gt;            if (at &gt;= 0) {&lt;br /&gt;                return values[at];&lt;br /&gt;            }&lt;br /&gt;        },&lt;br /&gt;        set: function (key, value) {&lt;br /&gt;            var at = keys.indexOf(key);&lt;br /&gt;            if (at &lt; 0) {&lt;br /&gt;                at = keys.length;&lt;br /&gt;            }&lt;br /&gt;            keys[at] = key;&lt;br /&gt;            values[at] = value;&lt;br /&gt;        },&lt;br /&gt;        remove: function (key) {&lt;br /&gt;            var at = keys.indexOf(key);&lt;br /&gt;            if (at &gt;= 0) {&lt;br /&gt;                keys.splice(at, 1);&lt;br /&gt;                values.splice(at, 1);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    };&lt;br /&gt;}());&lt;/pre&gt;&lt;h2 id="names"&gt; Names &lt;/h2&gt;&lt;p&gt;Names should be formed from the 26 upper and lower case letters (&lt;code&gt;A&lt;/code&gt; .. &lt;code&gt;Z&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt; .. &lt;code&gt;z&lt;/code&gt;), the 10 digits (&lt;code&gt;0&lt;/code&gt; .. &lt;code&gt;9&lt;/code&gt;), and &lt;code&gt;_&lt;/code&gt; &lt;small&gt;(underbar)&lt;/small&gt;. Avoid use of international characters because they may not read well or be understood everywhere. Do not use &lt;code&gt;$&lt;/code&gt; &lt;small&gt;(dollar sign)&lt;/small&gt; or &lt;code&gt;\&lt;/code&gt; &lt;small&gt;(backslash)&lt;/small&gt; in names. &lt;/p&gt;&lt;p&gt;Do not use &lt;code&gt;_&lt;/code&gt; &lt;small&gt;(underbar)&lt;/small&gt; as the first character of a name. It is sometimes used to indicate privacy, but it does not actually provide privacy. If privacy is important, use the forms that provide &lt;a href="http://javascript.crockford.com/private.html"&gt;private members&lt;/a&gt;. Avoid conventions that demonstrate a lack of competence.&lt;/p&gt;&lt;p&gt;Most variables and functions should start with a lower case letter. &lt;/p&gt;&lt;p&gt;Constructor functions which must be used with the &lt;code&gt;&lt;a href="http://yuiblog.com/blog/2006/11/13/javascript-we-hardly-new-ya/"&gt;new&lt;/a&gt;&lt;/code&gt;&lt;a href="http://yuiblog.com/blog/2006/11/13/javascript-we-hardly-new-ya/"&gt;   prefix&lt;/a&gt; should start with a capital letter. JavaScript issues neither   a compile-time warning nor a run-time warning if a required &lt;code&gt;new&lt;/code&gt;   is omitted. Bad things can happen if &lt;code&gt;new&lt;/code&gt; is not used, so   the capitalization convention is the only defense we have. &lt;/p&gt;&lt;p&gt;Global variables should be in all caps. (JavaScript does not have macros   or constants, so there isn't much point in using all caps to signify features   that JavaScript doesn't have.)&lt;/p&gt;&lt;h2 id="statements"&gt;Statements &lt;/h2&gt;&lt;h3 id="simple statements"&gt;Simple Statements &lt;/h3&gt;&lt;p&gt;Each line should contain at most one statement. Put a &lt;code&gt;;&lt;/code&gt; &lt;small&gt;(semicolon)&lt;/small&gt; at the end of every simple statement. Note that an assignment statement which is assigning a function literal or object literal is still an assignment statement and must end with a semicolon. &lt;/p&gt;&lt;p&gt;JavaScript allows any expression to be used as a statement. This can mask some errors, particularly in the presence of semicolon insertion. The only expressions that should be used as statements are assignments and invocations. &lt;/p&gt;&lt;h3 id="compound statements"&gt; Compound Statements &lt;/h3&gt;&lt;p&gt;Compound statements are statements that contain lists of statements enclosed in &lt;code&gt;{ }&lt;/code&gt; &lt;small&gt;(curly braces)&lt;/small&gt;. &lt;/p&gt;&lt;ul&gt;&lt;li&gt; The enclosed statements should be indented four more spaces.&lt;/li&gt;&lt;li&gt; The &lt;code&gt;{&lt;/code&gt; &lt;small&gt;(left curly brace)&lt;/small&gt; should be at     the end of the line that begins the compound statement.&lt;/li&gt;&lt;li&gt; The &lt;code&gt;}&lt;/code&gt; &lt;small&gt;(right curly brace)&lt;/small&gt; should begin     a line and be indented to align with the beginning of the line containing     the matching &lt;code&gt;{&lt;/code&gt; &lt;small&gt;(left curly brace)&lt;/small&gt;.&lt;/li&gt;&lt;li&gt; Braces should be used around all statements, even single statements,     when they are part of a control structure, such as an &lt;code&gt;if&lt;/code&gt;     or &lt;code&gt;for&lt;/code&gt; statement. This makes it easier to add statements     without accidentally introducing bugs. &lt;/li&gt;&lt;/ul&gt;&lt;h3 id="labels"&gt; Labels &lt;/h3&gt;&lt;p&gt;Statement labels are optional. Only these statements should be labeled: &lt;code&gt;while&lt;/code&gt;,   &lt;code&gt;do&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;switch&lt;/code&gt;. &lt;/p&gt;&lt;h3 id="return statement"&gt;&lt;code&gt;return&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;A &lt;code&gt;return&lt;/code&gt; statement with a value should not use &lt;code&gt;( )&lt;/code&gt; &lt;small&gt;(parentheses)&lt;/small&gt; around the value.  The return value expression must start on the same line as the &lt;code&gt;return&lt;/code&gt; keyword in order to avoid semicolon insertion. &lt;/p&gt;&lt;h3 id="if statement"&gt; &lt;code&gt;if&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;The &lt;code&gt;if&lt;/code&gt; class of statements should have the following form: &lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (&lt;/code&gt;&lt;var&gt;condition&lt;/var&gt;&lt;code&gt;)   {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (&lt;/code&gt;&lt;var&gt;condition&lt;/var&gt;&lt;code&gt;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (&lt;/code&gt;&lt;var&gt;condition&lt;/var&gt;&lt;code&gt;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else if (&lt;/code&gt;&lt;var&gt;condition&lt;/var&gt;&lt;code&gt;)   {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/code&gt; &lt;/p&gt;&lt;h3 id="for statement"&gt; &lt;code&gt;for&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;A &lt;code&gt;for&lt;/code&gt; class of statements should have the following form: &lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (&lt;/code&gt;&lt;var&gt;initialization&lt;/var&gt;&lt;code&gt;;   &lt;/code&gt;&lt;var&gt;condition&lt;/var&gt;&lt;code&gt;; &lt;/code&gt;&lt;var&gt;update&lt;/var&gt;&lt;code&gt;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (&lt;/code&gt;&lt;var&gt;variable&lt;/var&gt;&lt;code&gt; in &lt;/code&gt;&lt;var&gt;object&lt;/var&gt;&lt;code&gt;)   {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (&lt;/code&gt;&lt;var&gt;filter&lt;/var&gt;&lt;code&gt;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/code&gt; &lt;/p&gt;&lt;p&gt;The first form should be used with arrays and with loops of a predeterminable   number of iterations. &lt;/p&gt;&lt;p&gt;The second form should be used with objects. Be aware that members that   are added to the prototype of the &lt;var&gt;object&lt;/var&gt; &lt;code&gt; &lt;/code&gt;will   be included in the enumeration. It is wise to program defensively by using   the &lt;code&gt;hasOwnProperty&lt;/code&gt; method to distinguish the true members   of the &lt;var&gt;object&lt;/var&gt;: &lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (&lt;/code&gt;&lt;var&gt;variable&lt;/var&gt;&lt;code&gt;   in &lt;/code&gt;&lt;var&gt;object&lt;/var&gt;&lt;code&gt;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if &lt;/code&gt;&lt;code&gt;(&lt;/code&gt;&lt;var&gt;object&lt;/var&gt;&lt;code&gt;.hasOwnProperty(&lt;/code&gt;&lt;var&gt;variable&lt;/var&gt;&lt;code&gt;))&lt;/code&gt;&lt;code&gt;   {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/code&gt;&lt;/p&gt;&lt;h3 id="while statement"&gt; &lt;code&gt;while&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;A &lt;code&gt;while&lt;/code&gt; statement should have the following form: &lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (&lt;/code&gt;&lt;var&gt;condition&lt;/var&gt;&lt;code&gt;)   {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/code&gt; &lt;/p&gt;&lt;h3 id="do statement"&gt; &lt;code&gt;do&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;A &lt;code&gt;do&lt;/code&gt; statement should have the following form: &lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;do {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} while (&lt;/code&gt;&lt;var&gt;condition&lt;/var&gt;&lt;code&gt;);&lt;/code&gt; &lt;/p&gt;&lt;p&gt;Unlike the other compound statements, the &lt;code&gt;do&lt;/code&gt; statement   always ends with a &lt;code&gt;;&lt;/code&gt; &lt;small&gt;(semicolon)&lt;/small&gt;. &lt;/p&gt;&lt;h3 id="switch statement"&gt; &lt;code&gt;switch&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;A &lt;code&gt;switch&lt;/code&gt; statement should have the following form: &lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;switch (&lt;/code&gt;&lt;var&gt;expression&lt;/var&gt;&lt;code&gt;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case &lt;/code&gt;&lt;var&gt;expression&lt;/var&gt;&lt;code&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;default:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;var&gt;statements&lt;/var&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Each &lt;code&gt;case&lt;/code&gt; is aligned with the &lt;code&gt;switch&lt;/code&gt;. This   avoids over-indentation. &lt;/p&gt;&lt;p&gt;Each group of &lt;var&gt;statements&lt;/var&gt; (except the &lt;code&gt;default&lt;/code&gt;)   should end with &lt;code&gt;break&lt;/code&gt;, &lt;code&gt;return&lt;/code&gt;, or &lt;code&gt;throw&lt;/code&gt;.   Do not fall through. &lt;/p&gt;&lt;h3 id="try statement"&gt; &lt;code&gt;try&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;The &lt;code&gt;try&lt;/code&gt; class of statements should have the following form: &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;try {&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;var&gt;statements&lt;/var&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;} catch (&lt;/code&gt;&lt;var&gt;variable&lt;/var&gt;&lt;code&gt;) {&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;var&gt;statements&lt;/var&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;code&gt;try {&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;var&gt;statements&lt;/var&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;} catch (&lt;/code&gt;&lt;var&gt;variable&lt;/var&gt;&lt;code&gt;) {&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;var&gt;statements&lt;/var&gt;&amp;nbsp;&amp;nbsp;&lt;code&gt;&amp;nbsp;} finally {&lt;/code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;var&gt;statements&lt;/var&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;}&lt;/code&gt; &lt;/p&gt;&lt;h3 id="continue statement"&gt; &lt;code&gt;continue&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;Avoid use of the &lt;code&gt;continue&lt;/code&gt; statement. It tends to obscure the   control flow of the function. &lt;/p&gt;&lt;h3 id="with statement"&gt;&lt;code&gt;with&lt;/code&gt; Statement &lt;/h3&gt;&lt;p&gt;The &lt;code&gt;with&lt;/code&gt; statement &lt;a href="http://yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/" target="_blank"&gt;should   not be used&lt;/a&gt;. &lt;/p&gt;&lt;h2 id="whitespace"&gt; Whitespace &lt;/h2&gt;&lt;p&gt;Blank lines improve readability by setting off sections of code that are logically related.&lt;/p&gt;&lt;p&gt;Blank spaces should be used in the following circumstances: &lt;/p&gt;&lt;ul&gt;&lt;li&gt; A keyword followed by &lt;code&gt;(&lt;/code&gt; &lt;small&gt;(left parenthesis)&lt;/small&gt;     should be separated by a space.&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;        while (true) {&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; A blank space should not be used between a function value and its     &lt;code&gt;(&lt;/code&gt; &lt;small&gt;(left parenthesis)&lt;/small&gt;. This helps to distinguish     between keywords and function invocations.&lt;/li&gt;&lt;li&gt; All binary operators except &lt;code&gt;.&lt;/code&gt; &lt;small&gt;(period)&lt;/small&gt;     and &lt;code&gt;(&lt;/code&gt; &lt;small&gt;(left parenthesis)&lt;/small&gt; and &lt;code&gt;[&lt;/code&gt;     &lt;small&gt;(left bracket)&lt;/small&gt; should be separated from their operands     by a space.&lt;/li&gt;&lt;li&gt; No space should separate a unary operator and its operand except     when the operator is a word such as &lt;code&gt;typeof&lt;/code&gt;.&lt;/li&gt;&lt;li&gt; Each ; &lt;small&gt;(semicolon)&lt;/small&gt; in the control part of a &lt;code&gt;for&lt;/code&gt;     statement should be followed with a space.&lt;/li&gt;&lt;li&gt; Whitespace should follow every , &lt;small&gt;(comma)&lt;/small&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id="bonus"&gt; Bonus Suggestions &lt;/h2&gt;&lt;h3&gt;&lt;code&gt;{}&lt;/code&gt; and &lt;code&gt;[]&lt;/code&gt; &lt;/h3&gt;&lt;p&gt;Use &lt;code&gt;{}&lt;/code&gt; instead of &lt;code&gt;new Object()&lt;/code&gt;. Use &lt;code&gt;[]&lt;/code&gt;   instead of &lt;code&gt;new Array()&lt;/code&gt;. &lt;/p&gt;&lt;p&gt;Use arrays when the member names would be sequential integers. Use objects when the member names are arbitrary strings or names. &lt;/p&gt;&lt;h3&gt; &lt;code&gt;,&lt;/code&gt; &lt;small&gt;(comma)&lt;/small&gt; Operator &lt;/h3&gt;&lt;p&gt;Avoid the use of the comma operator except for very disciplined use in the   control part of &lt;code&gt;for&lt;/code&gt; statements. (This does not apply to the comma   separator, which is used in object literals, array literals, &lt;code&gt;var&lt;/code&gt;   statements, and parameter lists.) &lt;/p&gt;&lt;h3&gt; Block Scope &lt;/h3&gt;&lt;p&gt;In JavaScript blocks do not have scope. Only functions have scope. Do not use blocks except as required by the compound statements. &lt;/p&gt;&lt;h3&gt; Assignment Expressions &lt;/h3&gt;&lt;p&gt;Avoid doing assignments in the condition part of &lt;code&gt;if&lt;/code&gt; and   &lt;code&gt;while&lt;/code&gt; statements. &lt;/p&gt;&lt;p&gt;Is &lt;/p&gt;&lt;pre&gt;    if (a = b) {&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;a correct statement? Or was &lt;/p&gt;&lt;pre&gt;    if (a == b) {&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;intended? Avoid constructs that cannot easily be determined to be correct. &lt;/p&gt;&lt;h3&gt; &lt;code&gt;===&lt;/code&gt; and &lt;code&gt;!==&lt;/code&gt; Operators. &lt;/h3&gt;&lt;p&gt;It is almost always better to use the &lt;code&gt;===&lt;/code&gt; and &lt;code&gt;!==&lt;/code&gt;   operators. The &lt;code&gt;==&lt;/code&gt; and &lt;code&gt;!=&lt;/code&gt; operators do type coercion.   In particular, do not use &lt;code&gt;==&lt;/code&gt; to compare against falsy values. &lt;/p&gt;&lt;h3&gt; Confusing Pluses and Minuses &lt;/h3&gt;&lt;p&gt;Be careful to not follow a &lt;code&gt;+&lt;/code&gt; with &lt;code&gt;+&lt;/code&gt; or &lt;code&gt;++&lt;/code&gt;.   This pattern can be confusing. Insert parens between them to make your intention   clear. &lt;/p&gt;&lt;pre&gt;    total = subtotal + +myInput.value;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;is better written as &lt;/p&gt;&lt;pre&gt;    total = subtotal + (+myInput.value);&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;so that the &lt;code&gt;+ +&lt;/code&gt; is not misread as &lt;code&gt;++&lt;/code&gt;. &lt;/p&gt;&lt;h3&gt; &lt;code&gt;eval&lt;/code&gt; is Evil &lt;/h3&gt;&lt;p&gt;The &lt;code&gt;eval&lt;/code&gt; function is the most misused feature of JavaScript.   Avoid it. &lt;/p&gt;&lt;p&gt;&lt;code&gt;eval&lt;/code&gt; has aliases. Do not use the &lt;code&gt;Function&lt;/code&gt; constructor.   Do not pass strings to &lt;code&gt;setTimeout&lt;/code&gt; or &lt;code&gt;setInterval&lt;/code&gt;. &lt;/p&gt;&lt;/script&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-1915626378794542703?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/1915626378794542703/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=1915626378794542703&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/1915626378794542703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/1915626378794542703'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/01/code-conventions-for-javascript.html' title='Code Conventions for the JavaScript Programming Language'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-2522903031881348860</id><published>2010-12-08T09:29:00.001+02:00</published><updated>2010-12-08T09:30:01.762+02:00</updated><title type='text'>адепты иконостороения</title><content type='html'>http://iconwerk.de/&lt;br /&gt;http://dlanham.com/&lt;br /&gt;http://iconfactory.com/&lt;br /&gt;&lt;br /&gt;Просто статья об тенденциях развития иконок&lt;br /&gt;http://habrahabr.ru/company/turbomilk/blog/109511/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-2522903031881348860?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/2522903031881348860/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=2522903031881348860&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2522903031881348860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2522903031881348860'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/12/adepts-iconbuildings.html' title='адепты иконостороения'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-4548598225680083649</id><published>2010-12-02T17:03:00.000+02:00</published><updated>2011-10-19T19:26:03.010+03:00</updated><title type='text'>29 принципов для создания классных комбинаций шрифтов</title><content type='html'>Перевод &lt;a href="http://bonfx.com/29-principles-for-making-great-font-combinations/"&gt;http://bonfx.com/29-principles-for-making-great-font-combinations/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Droid Sans', Arial, Helvetica, sans-serif; font-size: 15px; line-height: 21px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Droid Sans', Arial, Helvetica, sans-serif; font-size: 15px; line-height: 21px;"&gt;&lt;li&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Комбинируйте шрифты с засечками и без засечек, чтобы создать "контраст", а не "согласие".&lt;/strong&gt;&amp;nbsp;The farther apart the typeface styles are, as a generic but not infallible guideline, the more luck you’ll have. Fonts that are too similar look bad together. Go for concord or contrast but avoid the murky middle ground where all you end up with conflict. Put Garamond and Sabon together to see what “murky” means. Or try Helvetica and Univers together, which is just as bad.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Не выбирайте одновременно два шрифта с засечками или без засечек&lt;/strong&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;, кроме случаев когда они радикально различаются некоторым образом&lt;/span&gt;.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Avoid choosing typefaces from the same categories&lt;/strong&gt;, like Script or Slabs. You won’t get enough contrast, and will end up with conflict. For instance, Clarendon and Rockwell together is not a good thing at all.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Get enough difference in point size&lt;/strong&gt;&amp;nbsp;between the various fonts to make contrast.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Assign distinct roles&lt;/strong&gt;&amp;nbsp;to each font and commit to them without variance.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Try finding fonts from different categories that have similar x-heights and glyph widths.&lt;/strong&gt;&amp;nbsp;For instance, Futura with Times New Roman just doesn’t work that well because there is too much contrast between x-heights and widths, but in this case, mostly widths. However, if you are going to work with a condensed font, you can overcome this problem because now you’ve gone for an extreme contrast.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Find some kind of relationship between the basic shapes&lt;/strong&gt;. For instance, look to the letter O in upper and lower case. Round letter O’s and taller oval O’s, in general don’t seem to like each other when creating pairs.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Contrast the overall weight of the fonts&lt;/strong&gt;. For instance, Didot and Rockwell look really bad together for many reasons, but one clearly because they both have a heavy presence and just look mad at each other on the same page.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Pay close attention to what makes your eyes dart around&lt;/strong&gt;. If your eyes are unsettled, something is off.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Create different typographic colors&lt;/strong&gt;. By color, I mean the overall tint a block of type has when you squint at it. If both of your type samples with different fonts blur to about the same color, try playing with font size, line spacing, kerning, or even substituting one font for a heavier or lighter one from the same typeface.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Look for clever ways to create contrast&lt;/strong&gt;. Increase the leading or tracking of one face while decreasing the other and see what happens.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Don’t neglect the fact that&amp;nbsp;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;using different fonts from the same typeface may also be perfectly suitable&lt;/strong&gt;. That is why we provided them at&amp;nbsp;&lt;a href="http://bonfx.com/the-big-book-of-font-combinations/" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #da6427; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;the beginning of each font chapter&lt;/a&gt;&amp;nbsp;in the&amp;nbsp;&lt;a href="http://bonfx.com/the-big-book-of-font-combinations/" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #da6427; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Font Combinations&lt;/a&gt;&amp;nbsp;book. You might do well with a Helvetica Black for a header and a Helvetica normal for your body.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Try using typefaces from the same historical period&lt;/strong&gt;. This will take a little bit of leg work, but not much.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Don’t forget to consider how the italics of each typeface look&lt;/strong&gt;. You might get a nice match with a bold / normal pair, but then discover that their respective italic fonts have a cat fight right in the middle of your composition. Don’t overlook this!&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Fonts that are too disparate may not work at all&lt;/strong&gt;&amp;nbsp;with a large amount of copy, but might work in a logo or strictly minimal text setting.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Try your variations with larger and smaller amounts of text&lt;/strong&gt;. Personalities multiply or get obscured with varying amounts of texts.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Study and learn the classic typefaces&lt;/strong&gt;&amp;nbsp;on their own. Print them out and stare at them at lunch. Once you know them pretty well, then think about how they work with other typefaces. You’ll know much more going in to solve your design problem.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Go for a neutral contrast&lt;/strong&gt;&amp;nbsp;where neither font overpowers the other, and they both are content to play different roles without usurping all the attention one way or another. This kind of neutral contrast allows the interior personality of each typeface to speak on it’s own.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Find a combination that you didn’t make that you like and study why it works&lt;/strong&gt;. The answers for further combinations are likely in there for you to extrapolate. The entire web is at your disposal for this research.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Stick with high quality typefaces you know the names of&lt;/strong&gt;. Many free or cheap typefaces are going to be missing important glyphs, and this will kick you later if you don’t take care of this up front.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Stick to two typefaces&lt;/strong&gt;, but use the natural fonts within those typefaces. This would give you up to 8 fonts to work with: normal, bold, italic, and bold italic. You could&amp;nbsp;&lt;em style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;possibly&lt;/em&gt;&amp;nbsp;have a third very unique font used in a very limited way, such as in the header of a magazine or logo. But if you require 3 or more fonts to achieve your objective, you might be working too hard at it.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;If you can’t put your finger on it, change something&lt;/strong&gt;&amp;nbsp;even if you are not sure what to change. Just change it. Keep moving, keep iterating. You’ll either find it, or change the font for something else.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Change the font sizes&lt;/strong&gt;. At certain point sizes, a font pair might not agree at all, but at a different point size, everything falls into place.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Avoid mixing monospaced fonts with proportional fonts&lt;/strong&gt;. Well, you can try it, but don’t say you weren’t warned. I can’t ever get combos from those styles to mix well to my eye. I want to like OCR-A with something, but OCR-A only seems to like itself with nothing.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Contrast a distinctive header sans with a neutral body serif&lt;/strong&gt;. It’s easy to get a golden combination when following that recipe.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Don’t mix moods&lt;/strong&gt;: work with complimentary ones. A light-hearted Gil Sans is not going to play well with an all-business Didot, at least not very easily. Either get two fonts in the same general mood, or get one with some personality and another with a neutral personality.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Look for similar proportions&lt;/strong&gt;, out of the box, and then set the fonts in distinct roles.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Make it obvious.&lt;/strong&gt;&amp;nbsp;Typeface choices need to have clear distinctions&amp;nbsp; in order for a document to be legible. If there is not enough contrast, the visual hierarchy breaks down, and the roles you assign to different fonts won’t be clear.&lt;/li&gt;&lt;li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Break the rules.&lt;/strong&gt;&amp;nbsp;See what happens. There are no absolutes, and a clever designer can make just about any two typefaces combine to work to one degree or another.&lt;/li&gt;&lt;/span&gt;&lt;/ol&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Droid Sans', Arial, Helvetica, sans-serif; font-size: 15px; line-height: 21px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="height: 1px; overflow: hidden; position: absolute; top: -5000px;"&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;&lt;div style="height: 1px; overflow: hidden; position: absolute; top: -5000px;"&gt;&lt;/div&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;strong&gt;Combine      a serif and a sans serif to give “contrast” and not “concord”.&lt;/strong&gt; The farther apart the typeface styles are, as      a generic but not infallible guideline, the more luck you’ll have. Fonts      that are too similar look bad together. Go for concord or contrast but      avoid the murky middle ground where all you end up with conflict. Put      Garamond and Sabon together to see what “murky” means. Or try Helvetica      and Univers together, which is just as bad.&lt;/strong&gt;&lt;/li&gt;&lt;strong&gt;&lt;li&gt;&lt;strong&gt;Don’t      choose two serifs or two sans serifs&lt;/strong&gt; to create a combination, unless they are radically different in some way. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      choosing typefaces from the same categories&lt;/strong&gt;, like Script or Slabs. You won’t get enough contrast, and will      end up with conflict. For instance, Clarendon and Rockwell together is not      a good thing at all.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Get      enough difference in point size&lt;/strong&gt; between the various fonts to make contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Assign      distinct roles&lt;/strong&gt; to each font and      commit to them without variance.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      finding fonts from different categories that have similar x-heights and      glyph widths.&lt;/strong&gt; For instance, Futura      with Times New Roman just doesn’t work that well because there is too much      contrast between x-heights and widths, but in this case, mostly widths.      However, if you are going to work with a condensed font, you can overcome      this problem because now you’ve gone for an extreme contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      some kind of relationship between the basic shapes&lt;/strong&gt;. For instance, look to the letter O in upper      and lower case. Round letter O’s and taller oval O’s, in general don’t      seem to like each other when creating pairs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      the overall weight of the fonts&lt;/strong&gt;. For      instance, Didot and Rockwell look really bad together for many reasons,      but one clearly because they both have a heavy presence and just look mad      at each other on the same page. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pay      close attention to what makes your eyes dart around&lt;/strong&gt;. If your eyes are unsettled, something is off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Create      different typographic colors&lt;/strong&gt;. By      color, I mean the overall tint a block of type has when you squint at it.      If both of your type samples with different fonts blur to about the same      color, try playing with font size, line spacing, kerning, or even      substituting one font for a heavier or lighter one from the same typeface.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for clever ways to create contrast&lt;/strong&gt;.      Increase the leading or tracking of one face while decreasing the other      and see what happens. &lt;/li&gt;&lt;li&gt;Don’t      neglect the fact that &lt;strong&gt;using different fonts from the same typeface may      also be perfectly suitable&lt;/strong&gt;. That is      why we provided them at &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;the beginning of each font chapter&lt;/a&gt; in the &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;Font Combinations&lt;/a&gt; book. You might do      well with a Helvetica Black for a header and a Helvetica normal for your      body.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      using typefaces from the same historical period&lt;/strong&gt;. This will take a little bit of leg work, but not much. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      forget to consider how the italics of each typeface look&lt;/strong&gt;. You might get a nice match with a bold /      normal pair, but then discover that their respective italic fonts have a      cat fight right in the middle of your composition. Don’t overlook this!&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fonts      that are too disparate may not work at all&lt;/strong&gt; with a large amount of copy, but might work in a logo or strictly      minimal text setting.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      your variations with larger and smaller amounts of text&lt;/strong&gt;. Personalities multiply or get obscured with      varying amounts of texts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Study      and learn the classic typefaces&lt;/strong&gt; on      their own. Print them out and stare at them at lunch. Once you know them      pretty well, then think about how they work with other typefaces. You’ll      know much more going in to solve your design problem.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Go      for a neutral contrast&lt;/strong&gt; where neither      font overpowers the other, and they both are content to play different      roles without usurping all the attention one way or another. This kind of      neutral contrast allows the interior personality of each typeface to speak      on it’s own.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      a combination that you didn’t make that you like and study why it works&lt;/strong&gt;. The answers for further combinations are      likely in there for you to extrapolate. The entire web is at your disposal      for this research.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      with high quality typefaces you know the names of&lt;/strong&gt;. Many free or cheap typefaces are going to be      missing important glyphs, and this will kick you later if you don’t take      care of this up front.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      to two typefaces&lt;/strong&gt;, but use the natural      fonts within those typefaces. This would give you up to 8 fonts to work      with: normal, bold, italic, and bold italic. You could &lt;em&gt;possibly&lt;/em&gt; have a third very unique font used in a very limited way, such as in the      header of a magazine or logo. But if you require 3 or more fonts to      achieve your objective, you might be working too hard at it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;If      you can’t put your finger on it, change something&lt;/strong&gt; even if you are not sure what to change. Just      change it. Keep moving, keep iterating. You’ll either find it, or change      the font for something else.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Change      the font sizes&lt;/strong&gt;. At certain point      sizes, a font pair might not agree at all, but at a different point size,      everything falls into place. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      mixing monospaced fonts with proportional fonts&lt;/strong&gt;. Well, you can try it, but don’t say you weren’t warned. I can’t      ever get combos from those styles to mix well to my eye. I want to like      OCR-A with something, but OCR-A only seems to like itself with nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      a distinctive header sans with a neutral body serif&lt;/strong&gt;. It’s easy to get a golden combination when      following that recipe.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      mix moods&lt;/strong&gt;: work with complimentary      ones. A light-hearted Gil Sans is not going to play well with an      all-business Didot, at least not very easily. Either get two fonts in the same general      mood, or get one with some personality and another with a neutral      personality.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for similar proportions&lt;/strong&gt;, out of the      box, and then set the fonts in distinct roles.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Make      it obvious.&lt;/strong&gt; Typeface choices need to      have clear distinctions&amp;nbsp; in      order for a document to be legible. If there is not enough contrast, the      visual hierarchy breaks down, and the roles you assign to different fonts      won’t be clear.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Break      the rules.&lt;/strong&gt; See what happens. There      are no absolutes, and a clever designer can make just about any two      typefaces combine to work to one degree or another.&lt;/li&gt;&lt;/strong&gt;&lt;/div&gt;&lt;strong&gt;&amp;lt;�ol&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Combine      a serif and a sans serif to give   contrast   and not   concord  .&amp;lt;�/strong&amp;gt; The farther apart the typeface styles are, as      a generic but not infallible guideline, the more luck you  ll have. Fonts      that are too similar look bad together. Go for concord or contrast but      avoid the murky middle ground where all you end up with conflict. Put      Garamond and Sabon together to see what   murky   means. Or try Helvetica      and Univers together, which is just as bad.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Don  t      choose two serifs or two sans serifs&amp;lt;�/strong&amp;gt; to create a combination, unless they are radically different in some way. &amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Avoid      choosing typefaces from the same categories&amp;lt;�/strong&amp;gt;, like Script or Slabs. You won  t get enough contrast, and will      end up with conflict. For instance, Clarendon and Rockwell together is not      a good thing at all.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Get      enough difference in point size&amp;lt;�/strong&amp;gt; between the various fonts to make contrast. &amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Assign      distinct roles&amp;lt;�/strong&amp;gt; to each font and      commit to them without variance.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Try      finding fonts from different categories that have similar x-heights and      glyph widths.&amp;lt;�/strong&amp;gt; For instance, Futura      with Times New Roman just doesn  t work that well because there is too much      contrast between x-heights and widths, but in this case, mostly widths.      However, if you are going to work with a condensed font, you can overcome      this problem because now you  ve gone for an extreme contrast. &amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Find      some kind of relationship between the basic shapes&amp;lt;�/strong&amp;gt;. For instance, look to the letter O in upper      and lower case. Round letter O  s and taller oval O  s, in general don  t      seem to like each other when creating pairs.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Contrast      the overall weight of the fonts&amp;lt;�/strong&amp;gt;. For      instance, Didot and Rockwell look really bad together for many reasons,      but one clearly because they both have a heavy presence and just look mad      at each other on the same page. &amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Pay      close attention to what makes your eyes dart around&amp;lt;�/strong&amp;gt;. If your eyes are unsettled, something is off.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Create      different typographic colors&amp;lt;�/strong&amp;gt;. By      color, I mean the overall tint a block of type has when you squint at it.      If both of your type samples with different fonts blur to about the same      color, try playing with font size, line spacing, kerning, or even      substituting one font for a heavier or lighter one from the same typeface.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Look      for clever ways to create contrast&amp;lt;�/strong&amp;gt;.      Increase the leading or tracking of one face while decreasing the other      and see what happens. &amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;Don  t      neglect the fact that &amp;lt;�strong&amp;gt;using different fonts from the same typeface may      also be perfectly suitable&amp;lt;�/strong&amp;gt;. That is      why we provided them at &amp;lt;�a href="http://bonfx.com/the-big-book-of-font-combinations/"&amp;gt;the beginning of each font chapter&amp;lt;�/a&amp;gt; in the &amp;lt;�a href="http://bonfx.com/the-big-book-of-font-combinations/"&amp;gt;Font Combinations&amp;lt;�/a&amp;gt; book. You might do      well with a Helvetica Black for a header and a Helvetica normal for your      body.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Try      using typefaces from the same historical period&amp;lt;�/strong&amp;gt;. This will take a little bit of leg work, but not much. &amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Don  t      forget to consider how the italics of each typeface look&amp;lt;�/strong&amp;gt;. You might get a nice match with a bold /      normal pair, but then discover that their respective italic fonts have a      cat fight right in the middle of your composition. Don  t overlook this!&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Fonts      that are too disparate may not work at all&amp;lt;�/strong&amp;gt; with a large amount of copy, but might work in a logo or strictly      minimal text setting.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Try      your variations with larger and smaller amounts of text&amp;lt;�/strong&amp;gt;. Personalities multiply or get obscured with      varying amounts of texts.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Study      and learn the classic typefaces&amp;lt;�/strong&amp;gt; on      their own. Print them out and stare at them at lunch. Once you know them      pretty well, then think about how they work with other typefaces. You  ll      know much more going in to solve your design problem.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Go      for a neutral contrast&amp;lt;�/strong&amp;gt; where neither      font overpowers the other, and they both are content to play different      roles without usurping all the attention one way or another. This kind of      neutral contrast allows the interior personality of each typeface to speak      on it  s own.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Find      a combination that you didn  t make that you like and study why it works&amp;lt;�/strong&amp;gt;. The answers for further combinations are      likely in there for you to extrapolate. The entire web is at your disposal      for this research.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Stick      with high quality typefaces you know the names of&amp;lt;�/strong&amp;gt;. Many free or cheap typefaces are going to be      missing important glyphs, and this will kick you later if you don  t take      care of this up front.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Stick      to two typefaces&amp;lt;�/strong&amp;gt;, but use the natural      fonts within those typefaces. This would give you up to 8 fonts to work      with: normal, bold, italic, and bold italic. You could &amp;lt;�em&amp;gt;possibly&amp;lt;�/em&amp;gt; have a third very unique font used in a very limited way, such as in the      header of a magazine or logo. But if you require 3 or more fonts to      achieve your objective, you might be working too hard at it.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;If      you can  t put your finger on it, change something&amp;lt;�/strong&amp;gt; even if you are not sure what to change. Just      change it. Keep moving, keep iterating. You  ll either find it, or change      the font for something else.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Change      the font sizes&amp;lt;�/strong&amp;gt;. At certain point      sizes, a font pair might not agree at all, but at a different point size,      everything falls into place. &amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Avoid      mixing monospaced fonts with proportional fonts&amp;lt;�/strong&amp;gt;. Well, you can try it, but don  t say you weren  t warned. I can  t      ever get combos from those styles to mix well to my eye. I want to like      OCR-A with something, but OCR-A only seems to like itself with nothing.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Contrast      a distinctive header sans with a neutral body serif&amp;lt;�/strong&amp;gt;. It  s easy to get a golden combination when      following that recipe.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Don  t      mix moods&amp;lt;�/strong&amp;gt;: work with complimentary      ones. A light-hearted Gil Sans is not going to play well with an      all-business Didot, at least not very easily. Either get two fonts in the same general      mood, or get one with some personality and another with a neutral      personality.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Look      for similar proportions&amp;lt;�/strong&amp;gt;, out of the      box, and then set the fonts in distinct roles.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Make      it obvious.&amp;lt;�/strong&amp;gt; Typeface choices need to      have clear distinctions� in      order for a document to be legible. If there is not enough contrast, the      visual hierarchy breaks down, and the roles you assign to different fonts      won  t be clear.&amp;lt;�/li&amp;gt;&amp;lt;�li&amp;gt;&amp;lt;�strong&amp;gt;Break      the rules.&amp;lt;�/strong&amp;gt; See what happens. There      are no absolutes, and a clever designer can make just about any two      typefaces combine to work to one degree or another.&amp;lt;�/li&amp;gt;&amp;lt;�/ol&amp;gt;&amp;nbsp;Combine      a serif and a sans serif to give “contrast” and not “concord”.&lt;/strong&gt; The farther apart the typeface styles are, as      a generic but not infallible guideline, the more luck you’ll have. Fonts      that are too similar look bad together. Go for concord or contrast but      avoid the murky middle ground where all you end up with conflict. Put      Garamond and Sabon together to see what “murky” means. Or try Helvetica      and Univers together, which is just as bad.&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Don’t      choose two serifs or two sans serifs&lt;/strong&gt; to create a combination, unless they are radically different in some way. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      choosing typefaces from the same categories&lt;/strong&gt;, like Script or Slabs. You won’t get enough contrast, and will      end up with conflict. For instance, Clarendon and Rockwell together is not      a good thing at all.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Get      enough difference in point size&lt;/strong&gt; between the various fonts to make contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Assign      distinct roles&lt;/strong&gt; to each font and      commit to them without variance.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      finding fonts from different categories that have similar x-heights and      glyph widths.&lt;/strong&gt; For instance, Futura      with Times New Roman just doesn’t work that well because there is too much      contrast between x-heights and widths, but in this case, mostly widths.      However, if you are going to work with a condensed font, you can overcome      this problem because now you’ve gone for an extreme contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      some kind of relationship between the basic shapes&lt;/strong&gt;. For instance, look to the letter O in upper      and lower case. Round letter O’s and taller oval O’s, in general don’t      seem to like each other when creating pairs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      the overall weight of the fonts&lt;/strong&gt;. For      instance, Didot and Rockwell look really bad together for many reasons,      but one clearly because they both have a heavy presence and just look mad      at each other on the same page. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pay      close attention to what makes your eyes dart around&lt;/strong&gt;. If your eyes are unsettled, something is off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Create      different typographic colors&lt;/strong&gt;. By      color, I mean the overall tint a block of type has when you squint at it.      If both of your type samples with different fonts blur to about the same      color, try playing with font size, line spacing, kerning, or even      substituting one font for a heavier or lighter one from the same typeface.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for clever ways to create contrast&lt;/strong&gt;.      Increase the leading or tracking of one face while decreasing the other      and see what happens. &lt;/li&gt;&lt;li&gt;Don’t      neglect the fact that &lt;strong&gt;using different fonts from the same typeface may      also be perfectly suitable&lt;/strong&gt;. That is      why we provided them at &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;the beginning of each font chapter&lt;/a&gt; in the &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;Font Combinations&lt;/a&gt; book. You might do      well with a Helvetica Black for a header and a Helvetica normal for your      body.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      using typefaces from the same historical period&lt;/strong&gt;. This will take a little bit of leg work, but not much. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      forget to consider how the italics of each typeface look&lt;/strong&gt;. You might get a nice match with a bold /      normal pair, but then discover that their respective italic fonts have a      cat fight right in the middle of your composition. Don’t overlook this!&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fonts      that are too disparate may not work at all&lt;/strong&gt; with a large amount of copy, but might work in a logo or strictly      minimal text setting.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      your variations with larger and smaller amounts of text&lt;/strong&gt;. Personalities multiply or get obscured with      varying amounts of texts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Study      and learn the classic typefaces&lt;/strong&gt; on      their own. Print them out and stare at them at lunch. Once you know them      pretty well, then think about how they work with other typefaces. You’ll      know much more going in to solve your design problem.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Go      for a neutral contrast&lt;/strong&gt; where neither      font overpowers the other, and they both are content to play different      roles without usurping all the attention one way or another. This kind of      neutral contrast allows the interior personality of each typeface to speak      on it’s own.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      a combination that you didn’t make that you like and study why it works&lt;/strong&gt;. The answers for further combinations are      likely in there for you to extrapolate. The entire web is at your disposal      for this research.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      with high quality typefaces you know the names of&lt;/strong&gt;. Many free or cheap typefaces are going to be      missing important glyphs, and this will kick you later if you don’t take      care of this up front.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      to two typefaces&lt;/strong&gt;, but use the natural      fonts within those typefaces. This would give you up to 8 fonts to work      with: normal, bold, italic, and bold italic. You could &lt;em&gt;possibly&lt;/em&gt; have a third very unique font used in a very limited way, such as in the      header of a magazine or logo. But if you require 3 or more fonts to      achieve your objective, you might be working too hard at it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;If      you can’t put your finger on it, change something&lt;/strong&gt; even if you are not sure what to change. Just      change it. Keep moving, keep iterating. You’ll either find it, or change      the font for something else.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Change      the font sizes&lt;/strong&gt;. At certain point      sizes, a font pair might not agree at all, but at a different point size,      everything falls into place. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      mixing monospaced fonts with proportional fonts&lt;/strong&gt;. Well, you can try it, but don’t say you weren’t warned. I can’t      ever get combos from those styles to mix well to my eye. I want to like      OCR-A with something, but OCR-A only seems to like itself with nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      a distinctive header sans with a neutral body serif&lt;/strong&gt;. It’s easy to get a golden combination when      following that recipe.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      mix moods&lt;/strong&gt;: work with complimentary      ones. A light-hearted Gil Sans is not going to play well with an      all-business Didot, at least not very easily. Either get two fonts in the same general      mood, or get one with some personality and another with a neutral      personality.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for similar proportions&lt;/strong&gt;, out of the      box, and then set the fonts in distinct roles.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Make      it obvious.&lt;/strong&gt; Typeface choices need to      have clear distinctions&amp;nbsp; in      order for a document to be legible. If there is not enough contrast, the      visual hierarchy breaks down, and the roles you assign to different fonts      won’t be clear.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Break      the rules.&lt;/strong&gt; See what happens. There      are no absolutes, and a clever designer can make just about any two      typefaces combine to work to one degree or another.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="height: 1px; overflow: hidden; position: absolute; top: -5000px;"&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Combine      a serif and a sans serif to give “contrast” and not “concord”.&lt;/strong&gt; The farther apart the typeface styles are, as      a generic but not infallible guideline, the more luck you’ll have. Fonts      that are too similar look bad together. Go for concord or contrast but      avoid the murky middle ground where all you end up with conflict. Put      Garamond and Sabon together to see what “murky” means. Or try Helvetica      and Univers together, which is just as bad.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      choose two serifs or two sans serifs&lt;/strong&gt; to create a combination, unless they are radically different in some way. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      choosing typefaces from the same categories&lt;/strong&gt;, like Script or Slabs. You won’t get enough contrast, and will      end up with conflict. For instance, Clarendon and Rockwell together is not      a good thing at all.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Get      enough difference in point size&lt;/strong&gt; between the various fonts to make contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Assign      distinct roles&lt;/strong&gt; to each font and      commit to them without variance.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      finding fonts from different categories that have similar x-heights and      glyph widths.&lt;/strong&gt; For instance, Futura      with Times New Roman just doesn’t work that well because there is too much      contrast between x-heights and widths, but in this case, mostly widths.      However, if you are going to work with a condensed font, you can overcome      this problem because now you’ve gone for an extreme contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      some kind of relationship between the basic shapes&lt;/strong&gt;. For instance, look to the letter O in upper      and lower case. Round letter O’s and taller oval O’s, in general don’t      seem to like each other when creating pairs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      the overall weight of the fonts&lt;/strong&gt;. For      instance, Didot and Rockwell look really bad together for many reasons,      but one clearly because they both have a heavy presence and just look mad      at each other on the same page. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pay      close attention to what makes your eyes dart around&lt;/strong&gt;. If your eyes are unsettled, something is off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Create      different typographic colors&lt;/strong&gt;. By      color, I mean the overall tint a block of type has when you squint at it.      If both of your type samples with different fonts blur to about the same      color, try playing with font size, line spacing, kerning, or even      substituting one font for a heavier or lighter one from the same typeface.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for clever ways to create contrast&lt;/strong&gt;.      Increase the leading or tracking of one face while decreasing the other      and see what happens. &lt;/li&gt;&lt;li&gt;Don’t      neglect the fact that &lt;strong&gt;using different fonts from the same typeface may      also be perfectly suitable&lt;/strong&gt;. That is      why we provided them at &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;the beginning of each font chapter&lt;/a&gt; in the &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;Font Combinations&lt;/a&gt; book. You might do      well with a Helvetica Black for a header and a Helvetica normal for your      body.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      using typefaces from the same historical period&lt;/strong&gt;. This will take a little bit of leg work, but not much. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      forget to consider how the italics of each typeface look&lt;/strong&gt;. You might get a nice match with a bold /      normal pair, but then discover that their respective italic fonts have a      cat fight right in the middle of your composition. Don’t overlook this!&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fonts      that are too disparate may not work at all&lt;/strong&gt; with a large amount of copy, but might work in a logo or strictly      minimal text setting.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      your variations with larger and smaller amounts of text&lt;/strong&gt;. Personalities multiply or get obscured with      varying amounts of texts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Study      and learn the classic typefaces&lt;/strong&gt; on      their own. Print them out and stare at them at lunch. Once you know them      pretty well, then think about how they work with other typefaces. You’ll      know much more going in to solve your design problem.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Go      for a neutral contrast&lt;/strong&gt; where neither      font overpowers the other, and they both are content to play different      roles without usurping all the attention one way or another. This kind of      neutral contrast allows the interior personality of each typeface to speak      on it’s own.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      a combination that you didn’t make that you like and study why it works&lt;/strong&gt;. The answers for further combinations are      likely in there for you to extrapolate. The entire web is at your disposal      for this research.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      with high quality typefaces you know the names of&lt;/strong&gt;. Many free or cheap typefaces are going to be      missing important glyphs, and this will kick you later if you don’t take      care of this up front.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      to two typefaces&lt;/strong&gt;, but use the natural      fonts within those typefaces. This would give you up to 8 fonts to work      with: normal, bold, italic, and bold italic. You could &lt;em&gt;possibly&lt;/em&gt; have a third very unique font used in a very limited way, such as in the      header of a magazine or logo. But if you require 3 or more fonts to      achieve your objective, you might be working too hard at it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;If      you can’t put your finger on it, change something&lt;/strong&gt; even if you are not sure what to change. Just      change it. Keep moving, keep iterating. You’ll either find it, or change      the font for something else.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Change      the font sizes&lt;/strong&gt;. At certain point      sizes, a font pair might not agree at all, but at a different point size,      everything falls into place. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      mixing monospaced fonts with proportional fonts&lt;/strong&gt;. Well, you can try it, but don’t say you weren’t warned. I can’t      ever get combos from those styles to mix well to my eye. I want to like      OCR-A with something, but OCR-A only seems to like itself with nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      a distinctive header sans with a neutral body serif&lt;/strong&gt;. It’s easy to get a golden combination when      following that recipe.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      mix moods&lt;/strong&gt;: work with complimentary      ones. A light-hearted Gil Sans is not going to play well with an      all-business Didot, at least not very easily. Either get two fonts in the same general      mood, or get one with some personality and another with a neutral      personality.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for similar proportions&lt;/strong&gt;, out of the      box, and then set the fonts in distinct roles.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Make      it obvious.&lt;/strong&gt; Typeface choices need to      have clear distinctions&amp;nbsp; in      order for a document to be legible. If there is not enough contrast, the      visual hierarchy breaks down, and the roles you assign to different fonts      won’t be clear.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Break      the rules.&lt;/strong&gt; See what happens. There      are no absolutes, and a clever designer can make just about any two      typefaces combine to work to one degree or another.&lt;/li&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="height: 1px; overflow: hidden; position: absolute; top: -5000px;"&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Combine      a serif and a sans serif to give “contrast” and not “concord”.&lt;/strong&gt; The farther apart the typeface styles are, as      a generic but not infallible guideline, the more luck you’ll have. Fonts      that are too similar look bad together. Go for concord or contrast but      avoid the murky middle ground where all you end up with conflict. Put      Garamond and Sabon together to see what “murky” means. Or try Helvetica      and Univers together, which is just as bad.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      choose two serifs or two sans serifs&lt;/strong&gt; to create a combination, unless they are radically different in some way. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      choosing typefaces from the same categories&lt;/strong&gt;, like Script or Slabs. You won’t get enough contrast, and will      end up with conflict. For instance, Clarendon and Rockwell together is not      a good thing at all.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Get      enough difference in point size&lt;/strong&gt; between the various fonts to make contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Assign      distinct roles&lt;/strong&gt; to each font and      commit to them without variance.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      finding fonts from different categories that have similar x-heights and      glyph widths.&lt;/strong&gt; For instance, Futura      with Times New Roman just doesn’t work that well because there is too much      contrast between x-heights and widths, but in this case, mostly widths.      However, if you are going to work with a condensed font, you can overcome      this problem because now you’ve gone for an extreme contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      some kind of relationship between the basic shapes&lt;/strong&gt;. For instance, look to the letter O in upper      and lower case. Round letter O’s and taller oval O’s, in general don’t      seem to like each other when creating pairs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      the overall weight of the fonts&lt;/strong&gt;. For      instance, Didot and Rockwell look really bad together for many reasons,      but one clearly because they both have a heavy presence and just look mad      at each other on the same page. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pay      close attention to what makes your eyes dart around&lt;/strong&gt;. If your eyes are unsettled, something is off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Create      different typographic colors&lt;/strong&gt;. By      color, I mean the overall tint a block of type has when you squint at it.      If both of your type samples with different fonts blur to about the same      color, try playing with font size, line spacing, kerning, or even      substituting one font for a heavier or lighter one from the same typeface.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for clever ways to create contrast&lt;/strong&gt;.      Increase the leading or tracking of one face while decreasing the other      and see what happens. &lt;/li&gt;&lt;li&gt;Don’t      neglect the fact that &lt;strong&gt;using different fonts from the same typeface may      also be perfectly suitable&lt;/strong&gt;. That is      why we provided them at &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;the beginning of each font chapter&lt;/a&gt; in the &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;Font Combinations&lt;/a&gt; book. You might do      well with a Helvetica Black for a header and a Helvetica normal for your      body.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      using typefaces from the same historical period&lt;/strong&gt;. This will take a little bit of leg work, but not much. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      forget to consider how the italics of each typeface look&lt;/strong&gt;. You might get a nice match with a bold /      normal pair, but then discover that their respective italic fonts have a      cat fight right in the middle of your composition. Don’t overlook this!&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fonts      that are too disparate may not work at all&lt;/strong&gt; with a large amount of copy, but might work in a logo or strictly      minimal text setting.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      your variations with larger and smaller amounts of text&lt;/strong&gt;. Personalities multiply or get obscured with      varying amounts of texts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Study      and learn the classic typefaces&lt;/strong&gt; on      their own. Print them out and stare at them at lunch. Once you know them      pretty well, then think about how they work with other typefaces. You’ll      know much more going in to solve your design problem.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Go      for a neutral contrast&lt;/strong&gt; where neither      font overpowers the other, and they both are content to play different      roles without usurping all the attention one way or another. This kind of      neutral contrast allows the interior personality of each typeface to speak      on it’s own.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      a combination that you didn’t make that you like and study why it works&lt;/strong&gt;. The answers for further combinations are      likely in there for you to extrapolate. The entire web is at your disposal      for this research.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      with high quality typefaces you know the names of&lt;/strong&gt;. Many free or cheap typefaces are going to be      missing important glyphs, and this will kick you later if you don’t take      care of this up front.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      to two typefaces&lt;/strong&gt;, but use the natural      fonts within those typefaces. This would give you up to 8 fonts to work      with: normal, bold, italic, and bold italic. You could &lt;em&gt;possibly&lt;/em&gt; have a third very unique font used in a very limited way, such as in the      header of a magazine or logo. But if you require 3 or more fonts to      achieve your objective, you might be working too hard at it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;If      you can’t put your finger on it, change something&lt;/strong&gt; even if you are not sure what to change. Just      change it. Keep moving, keep iterating. You’ll either find it, or change      the font for something else.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Change      the font sizes&lt;/strong&gt;. At certain point      sizes, a font pair might not agree at all, but at a different point size,      everything falls into place. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      mixing monospaced fonts with proportional fonts&lt;/strong&gt;. Well, you can try it, but don’t say you weren’t warned. I can’t      ever get combos from those styles to mix well to my eye. I want to like      OCR-A with something, but OCR-A only seems to like itself with nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      a distinctive header sans with a neutral body serif&lt;/strong&gt;. It’s easy to get a golden combination when      following that recipe.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      mix moods&lt;/strong&gt;: work with complimentary      ones. A light-hearted Gil Sans is not going to play well with an      all-business Didot, at least not very easily. Either get two fonts in the same general      mood, or get one with some personality and another with a neutral      personality.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for similar proportions&lt;/strong&gt;, out of the      box, and then set the fonts in distinct roles.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Make      it obvious.&lt;/strong&gt; Typeface choices need to      have clear distinctions&amp;nbsp; in      order for a document to be legible. If there is not enough contrast, the      visual hierarchy breaks down, and the roles you assign to different fonts      won’t be clear.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Break      the rules.&lt;/strong&gt; See what happens. There      are no absolutes, and a clever designer can make just about any two      typefaces combine to work to one degree or another&lt;/li&gt;&lt;/div&gt;&lt;div style="height: 1px; overflow: hidden; position: absolute; top: -5000px;"&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Combine      a serif and a sans serif to give “contrast” and not “concord”.&lt;/strong&gt; The farther apart the typeface styles are, as      a generic but not infallible guideline, the more luck you’ll have. Fonts      that are too similar look bad together. Go for concord or contrast but      avoid the murky middle ground where all you end up with conflict. Put      Garamond and Sabon together to see what “murky” means. Or try Helvetica      and Univers together, which is just as bad.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      choose two serifs or two sans serifs&lt;/strong&gt; to create a combination, unless they are radically different in some way. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      choosing typefaces from the same categories&lt;/strong&gt;, like Script or Slabs. You won’t get enough contrast, and will      end up with conflict. For instance, Clarendon and Rockwell together is not      a good thing at all.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Get      enough difference in point size&lt;/strong&gt; between the various fonts to make contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Assign      distinct roles&lt;/strong&gt; to each font and      commit to them without variance.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      finding fonts from different categories that have similar x-heights and      glyph widths.&lt;/strong&gt; For instance, Futura      with Times New Roman just doesn’t work that well because there is too much      contrast between x-heights and widths, but in this case, mostly widths.      However, if you are going to work with a condensed font, you can overcome      this problem because now you’ve gone for an extreme contrast. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      some kind of relationship between the basic shapes&lt;/strong&gt;. For instance, look to the letter O in upper      and lower case. Round letter O’s and taller oval O’s, in general don’t      seem to like each other when creating pairs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      the overall weight of the fonts&lt;/strong&gt;. For      instance, Didot and Rockwell look really bad together for many reasons,      but one clearly because they both have a heavy presence and just look mad      at each other on the same page. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pay      close attention to what makes your eyes dart around&lt;/strong&gt;. If your eyes are unsettled, something is off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Create      different typographic colors&lt;/strong&gt;. By      color, I mean the overall tint a block of type has when you squint at it.      If both of your type samples with different fonts blur to about the same      color, try playing with font size, line spacing, kerning, or even      substituting one font for a heavier or lighter one from the same typeface.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for clever ways to create contrast&lt;/strong&gt;.      Increase the leading or tracking of one face while decreasing the other      and see what happens. &lt;/li&gt;&lt;li&gt;Don’t      neglect the fact that &lt;strong&gt;using different fonts from the same typeface may      also be perfectly suitable&lt;/strong&gt;. That is      why we provided them at &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;the beginning of each font chapter&lt;/a&gt; in the &lt;a href="http://bonfx.com/the-big-book-of-font-combinations/"&gt;Font Combinations&lt;/a&gt; book. You might do      well with a Helvetica Black for a header and a Helvetica normal for your      body.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      using typefaces from the same historical period&lt;/strong&gt;. This will take a little bit of leg work, but not much. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      forget to consider how the italics of each typeface look&lt;/strong&gt;. You might get a nice match with a bold /      normal pair, but then discover that their respective italic fonts have a      cat fight right in the middle of your composition. Don’t overlook this!&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fonts      that are too disparate may not work at all&lt;/strong&gt; with a large amount of copy, but might work in a logo or strictly      minimal text setting.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try      your variations with larger and smaller amounts of text&lt;/strong&gt;. Personalities multiply or get obscured with      varying amounts of texts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Study      and learn the classic typefaces&lt;/strong&gt; on      their own. Print them out and stare at them at lunch. Once you know them      pretty well, then think about how they work with other typefaces. You’ll      know much more going in to solve your design problem.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Go      for a neutral contrast&lt;/strong&gt; where neither      font overpowers the other, and they both are content to play different      roles without usurping all the attention one way or another. This kind of      neutral contrast allows the interior personality of each typeface to speak      on it’s own.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Find      a combination that you didn’t make that you like and study why it works&lt;/strong&gt;. The answers for further combinations are      likely in there for you to extrapolate. The entire web is at your disposal      for this research.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      with high quality typefaces you know the names of&lt;/strong&gt;. Many free or cheap typefaces are going to be      missing important glyphs, and this will kick you later if you don’t take      care of this up front.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stick      to two typefaces&lt;/strong&gt;, but use the natural      fonts within those typefaces. This would give you up to 8 fonts to work      with: normal, bold, italic, and bold italic. You could &lt;em&gt;possibly&lt;/em&gt; have a third very unique font used in a very limited way, such as in the      header of a magazine or logo. But if you require 3 or more fonts to      achieve your objective, you might be working too hard at it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;If      you can’t put your finger on it, change something&lt;/strong&gt; even if you are not sure what to change. Just      change it. Keep moving, keep iterating. You’ll either find it, or change      the font for something else.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Change      the font sizes&lt;/strong&gt;. At certain point      sizes, a font pair might not agree at all, but at a different point size,      everything falls into place. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid      mixing monospaced fonts with proportional fonts&lt;/strong&gt;. Well, you can try it, but don’t say you weren’t warned. I can’t      ever get combos from those styles to mix well to my eye. I want to like      OCR-A with something, but OCR-A only seems to like itself with nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast      a distinctive header sans with a neutral body serif&lt;/strong&gt;. It’s easy to get a golden combination when      following that recipe.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Don’t      mix moods&lt;/strong&gt;: work with complimentary      ones. A light-hearted Gil Sans is not going to play well with an      all-business Didot, at least not very easily. Either get two fonts in the same general      mood, or get one with some personality and another with a neutral      personality.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look      for similar proportions&lt;/strong&gt;, out of the      box, and then set the fonts in distinct roles.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Make      it obvious.&lt;/strong&gt; Typeface choices need to      have clear distinctions&amp;nbsp; in      order for a document to be legible. If there is not enough contrast, the      visual hierarchy breaks down, and the roles you assign to different fonts      won’t be clear.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Break      the rules.&lt;/strong&gt; See what happens. There      are no absolutes, and a clever designer can make just about any two      typefaces combine to work to one degree or another.&lt;/li&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-4548598225680083649?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/4548598225680083649/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=4548598225680083649&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4548598225680083649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4548598225680083649'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2011/10/29-rules-great-font-combinations.html' title='29 принципов для создания классных комбинаций шрифтов'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-4493622831290845227</id><published>2010-10-24T16:30:00.002+03:00</published><updated>2010-10-24T16:30:39.632+03:00</updated><title type='text'>morning allarm for admins</title><content type='html'>&lt;code&gt;sleep 5h &amp;amp;&amp;amp; cat /dev/urandom &amp;gt;&amp;gt; /dev/dsp&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-4493622831290845227?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/4493622831290845227/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=4493622831290845227&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4493622831290845227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4493622831290845227'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/10/morning-allarm-for-admins.html' title='morning allarm for admins'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-5293567324016120791</id><published>2010-10-01T13:59:00.004+03:00</published><updated>2011-01-09T01:53:59.592+02:00</updated><title type='text'>Прототипирование сайтов и интерфейсов</title><content type='html'>Задача: показать заказчику как будет выглядеть интерфейс сайта за 10-30 минут, поменять что-то и занести скриншот всего этого в ТЗ.&lt;br /&gt;В источнике http://habrahabr.ru/blogs/ui_design_and_usability/70001/ вы найдете кучу платных прог, я их не тестил ибо влом искать альтернативы или форки под линух, потому выбирал или полностью онлайновые инструменты или те которые писались для открытых систем.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1. Pencil Scetching Tool - дополнение к ФФ или просто отдельное приложение&lt;br /&gt;&lt;a href="http://pencil.evolus.vn/en-US/Home.aspx"&gt;http://pencil.evolus.vn/en-US/Home.aspx&lt;/a&gt;&lt;br /&gt;полностью бесплатное&lt;br /&gt;плюсы&lt;br /&gt;• подходит не только для прототипирования сайтов, но и для приложений&lt;br /&gt;• есть куча експортов: документы (pdf, doc,odt, html) и изображение png&lt;br /&gt;минусы&lt;br /&gt;• нет возможности одновременного редактирования&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Mockingbird - броузерное приложение&lt;br /&gt;&lt;a href="https://gomockingbird.com/mockingbird/"&gt;https://gomockingbird.com/mockingbird/&lt;/a&gt;&lt;br /&gt;в данный момент они меняют ценовую политику&lt;br /&gt;в будущем от 9 уе за месяц&lt;br /&gt;плюсы&lt;br /&gt;• возможность одновременного редактирования&lt;br /&gt;минусы&lt;br /&gt;• мало подходит для не веб проектов&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Coutline - броузерный сервис&lt;br /&gt;&lt;a href="http://coutline.com/"&gt;http://coutline.com&lt;/a&gt;&lt;br /&gt;сервис, с закрытым бета тестированием. &lt;br /&gt;Для крупных проектов самое то, документация, визуализация, управление, вродебы обещают версионность.&lt;br /&gt;Мощный визуальный редактор - похож на фотошоп.&lt;br /&gt;&lt;br /&gt;4. balsamiq няшный, платный, но есть бесплатная браузерная версия с достаточным для набросков. после 5 минут работы выскочит окошко - потом можно будет продолжить работу.&lt;br /&gt;http://balsamiq.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-5293567324016120791?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/5293567324016120791/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=5293567324016120791&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/5293567324016120791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/5293567324016120791'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/10/blog-post.html' title='Прототипирование сайтов и интерфейсов'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-222766859412279865</id><published>2010-09-15T01:20:00.004+03:00</published><updated>2010-09-15T01:37:18.877+03:00</updated><title type='text'>Проблемы с vga в win xp в KVM на Ubuntu</title><content type='html'>После установки Винды в KVM система все время ругается что у нее нет дров на видео.&lt;br /&gt;Собственно решается это копированием дров от VMware.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://linux-kvm.net/sites/default/files/vmwarevga32-kvm.iso"&gt;исошники для 32-бит винды&lt;/a&gt;&lt;br /&gt;&lt;a href="http://linux-kvm.net/sites/default/files/vmwarevga64-kvm-2.iso"&gt;для 64&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;дропбокс&lt;br /&gt;&lt;a href="http://dl.dropbox.com/u/4800767/vmwarevga32-kvm.iso"&gt;32&lt;/a&gt;&lt;br /&gt;&lt;a href="http://dl.dropbox.com/u/4800767/vmwarevga64-kvm-2.iso"&gt;64&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://linux-kvm.net/content/using-vmware-vga-kvm-windows-guests"&gt;ссылка на решение&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-222766859412279865?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/222766859412279865/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=222766859412279865&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/222766859412279865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/222766859412279865'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/09/vga-troubles-in-win-xp-under-kvm-on.html' title='Проблемы с vga в win xp в KVM на Ubuntu'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-3482864535093998051</id><published>2010-09-11T04:06:00.008+03:00</published><updated>2010-09-13T19:09:10.805+03:00</updated><title type='text'>nginx defaults</title><content type='html'>I use it on Ubuntu 10.4&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sysoev.ru/nginx/docs/"&gt;base ru man&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.nginx.org/Main"&gt;base eng man&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vygovsky.net/2010/09/nginx-defaults.html#nginx_conf"&gt;nginx.conf&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.vygovsky.net/2010/09/nginx-defaults.html#mime_types"&gt;mime.types - default&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.vygovsky.net/2010/09/nginx-defaults.html#proxy_conf"&gt;proxy.conf - default&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.vygovsky.net/2010/09/nginx-defaults.html#fastcgi_param"&gt;fastcgi_param&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.vygovsky.net/2010/09/nginx-defaults.html#wsgi_params"&gt;wsgi_params - dev. start from 8.4&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.vygovsky.net/2010/09/nginx-defaults.html#virtualhost"&gt; virtualhost conf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;params marked #test need change acording to your server params and workload&lt;br /&gt;all params set to upper default value&lt;br /&gt;&lt;br /&gt;&lt;h2 id="nginx_conf"&gt;nginx.conf&lt;/h2&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/nginx/nginx.conf&lt;/pre&gt;&lt;pre class="prettyprint"&gt;user www-data;&lt;br /&gt;worker_processes 4; #test #typically used formula cores = workers&lt;br /&gt;   #but configs with workers = 32 and connections 256&lt;br /&gt;   #can also be&lt;br /&gt;events {&lt;br /&gt; worker_connections 2048; #test &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;http {&lt;br /&gt; include /etc/nginx/mime.types;&lt;br /&gt; include /etc/nginx/proxy.conf;&lt;br /&gt; include /etc/nginx/fastcgi_param;&lt;br /&gt; #include /etc/nginx/wsgi_params; # better write instructions to server part&lt;br /&gt;## MIME types&lt;br /&gt; default_type application/octet-stream;&lt;br /&gt;&lt;br /&gt;## Size Limits&lt;br /&gt; client_body_buffer_size 16k; #test&lt;br /&gt; client_header_buffer_size 1k; #test&lt;br /&gt; client_max_body_size  1m; #test&lt;br /&gt; large_client_header_buffers  4 8k; #test&lt;br /&gt;&lt;br /&gt;## Timeouts &lt;br /&gt; client_body_timeout 2m; #test #default=60 (sec); for VERY slov conn&lt;br /&gt; client_header_timeout 2m; #test #default=60&lt;br /&gt; send_timeout   2m; #test #default=60&lt;br /&gt; keepalive_timeout  75 40; #test&lt;br /&gt;&lt;br /&gt;## General Options&lt;br /&gt; ignore_invalid_headers on;&lt;br /&gt; limit_zone gulag $binary_remote_addr 10m;&lt;br /&gt; recursive_error_pages on;&lt;br /&gt; sendfile  on;&lt;br /&gt; server_name_in_redirect off;&lt;br /&gt; server_tokens off; #hide nginx ver&lt;br /&gt;&lt;br /&gt;## TCP options &lt;br /&gt; tcp_nopush on;&lt;br /&gt;&lt;br /&gt;## Compression&lt;br /&gt; gzip   on;&lt;br /&gt; gzip_static  on;&lt;br /&gt; gzip_buffers  16 8k; #test #or 32 4k&lt;br /&gt; gzip_comp_level 5;&lt;br /&gt; gzip_http_version 1.0;&lt;br /&gt; gzip_min_length 1024;&lt;br /&gt; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/atom+xml application/rtf application/msword application/vnd.ms-excel;&lt;br /&gt; gzip_vary on;&lt;br /&gt; gzip_disable "MSIE [1-6]\.";&lt;br /&gt; gzip_proxied  any; #test&lt;br /&gt;&lt;br /&gt;## Log Format&lt;br /&gt;log_format  complete '$msec :: $remote_addr - $remote_user [$time_local] '&lt;br /&gt;   '"$request" $status $bytes_sent '&lt;br /&gt;   '"$http_referer" "$http_user_agent" "$gzip_ratio"'&lt;br /&gt;   '"$request_length" "$request_time" "$status"';&lt;br /&gt;}&lt;/pre&gt;&lt;h2 id="mime_types"&gt;mime.types - default&lt;/h2&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/nginx/mime.types&lt;/pre&gt;&lt;pre class="prettyprint"&gt;types {&lt;br /&gt;    text/html                             html htm shtml;&lt;br /&gt;    text/css                              css;&lt;br /&gt;    text/xml                              xml rss;&lt;br /&gt;    image/gif                             gif;&lt;br /&gt;    image/jpeg                            jpeg jpg;&lt;br /&gt;    application/x-javascript              js;&lt;br /&gt;    application/atom+xml                  atom;&lt;br /&gt;&lt;br /&gt;    text/mathml                           mml;&lt;br /&gt;    text/plain                            txt;&lt;br /&gt;    text/vnd.sun.j2me.app-descriptor      jad;&lt;br /&gt;    text/vnd.wap.wml                      wml;&lt;br /&gt;    text/x-component                      htc;&lt;br /&gt;&lt;br /&gt;    image/png                             png;&lt;br /&gt;    image/tiff                            tif tiff;&lt;br /&gt;    image/vnd.wap.wbmp                    wbmp;&lt;br /&gt;    image/x-icon                          ico;&lt;br /&gt;    image/x-jng                           jng;&lt;br /&gt;    image/x-ms-bmp                        bmp;&lt;br /&gt;&lt;br /&gt;    application/java-archive              jar war ear;&lt;br /&gt;    application/mac-binhex40              hqx;&lt;br /&gt;    application/msword                    doc;&lt;br /&gt;    application/pdf                       pdf;&lt;br /&gt;    application/postscript                ps eps ai;&lt;br /&gt;    application/rtf                       rtf;&lt;br /&gt;    application/vnd.ms-excel              xls;&lt;br /&gt;    application/vnd.ms-powerpoint         ppt;&lt;br /&gt;    application/vnd.wap.wmlc              wmlc;&lt;br /&gt;    application/vnd.wap.xhtml+xml         xhtml;&lt;br /&gt;    application/x-cocoa                   cco;&lt;br /&gt;    application/x-java-archive-diff       jardiff;&lt;br /&gt;    application/x-java-jnlp-file          jnlp;&lt;br /&gt;    application/x-makeself                run;&lt;br /&gt;    application/x-perl                    pl pm;&lt;br /&gt;    application/x-pilot                   prc pdb;&lt;br /&gt;    application/x-rar-compressed          rar;&lt;br /&gt;    application/x-redhat-package-manager  rpm;&lt;br /&gt;    application/x-sea                     sea;&lt;br /&gt;    application/x-shockwave-flash         swf;&lt;br /&gt;    application/x-stuffit                 sit;&lt;br /&gt;    application/x-tcl                     tcl tk;&lt;br /&gt;    application/x-x509-ca-cert            der pem crt;&lt;br /&gt;    application/x-xpinstall               xpi;&lt;br /&gt;    application/zip                       zip;&lt;br /&gt;&lt;br /&gt;    application/octet-stream              bin exe dll;&lt;br /&gt;    application/octet-stream              deb;&lt;br /&gt;    application/octet-stream              dmg;&lt;br /&gt;    application/octet-stream              eot;&lt;br /&gt;    application/octet-stream              iso img;&lt;br /&gt;    application/octet-stream              msi msp msm;&lt;br /&gt;&lt;br /&gt;    audio/midi                            mid midi kar;&lt;br /&gt;    audio/mpeg                            mp3;&lt;br /&gt;    audio/x-realaudio                     ra;&lt;br /&gt;&lt;br /&gt;    video/3gpp                            3gpp 3gp;&lt;br /&gt;    video/mpeg                            mpeg mpg;&lt;br /&gt;    video/quicktime                       mov;&lt;br /&gt;    video/x-flv                           flv;&lt;br /&gt;    video/x-mng                           mng;&lt;br /&gt;    video/x-ms-asf                        asx asf;&lt;br /&gt;    video/x-ms-wmv                        wmv;&lt;br /&gt;    video/x-msvideo                       avi;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;h2 id="proxy_conf"&gt;proxy.conf - default&lt;/h2&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/nginx/proxy.conf&lt;/pre&gt;&lt;a href="http://sysoev.ru/nginx/docs/http/ngx_http_proxy_module.html"&gt;ru info&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.nginx.org/NginxHttpProxyModule"&gt;eng info&lt;/a&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;proxy_redirect              off;&lt;br /&gt;proxy_set_header            Host $host;&lt;br /&gt;proxy_set_header            X-Real-IP $remote_addr;&lt;br /&gt;proxy_set_header            X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;proxy_connect_timeout       75;&lt;br /&gt;proxy_send_timeout          90;&lt;br /&gt;proxy_read_timeout          90;&lt;br /&gt;proxy_buffer_size           8k;&lt;br /&gt;proxy_buffers               8 8k;&lt;/pre&gt;&lt;br /&gt;&lt;h2 id="fastcgi_param"&gt;fastcgi_param&lt;/h2&gt;default&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/nginx/fastcgi_param&lt;/pre&gt;&lt;pre class="prettyprint"&gt;fastcgi_param  QUERY_STRING       $query_string;&lt;br /&gt;fastcgi_param  REQUEST_METHOD     $request_method;&lt;br /&gt;fastcgi_param  CONTENT_TYPE       $content_type;&lt;br /&gt;fastcgi_param  CONTENT_LENGTH     $content_length;&lt;br /&gt;&lt;br /&gt;fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;&lt;br /&gt;fastcgi_param  REQUEST_URI        $request_uri;&lt;br /&gt;fastcgi_param  DOCUMENT_URI       $document_uri;&lt;br /&gt;fastcgi_param  DOCUMENT_ROOT      $document_root;&lt;br /&gt;fastcgi_param  SERVER_PROTOCOL    $server_protocol;&lt;br /&gt;&lt;br /&gt;fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;&lt;br /&gt;fastcgi_param  SERVER_SOFTWARE    nginx $nginx_version;&lt;br /&gt;&lt;br /&gt;fastcgi_param  REMOTE_ADDR        $remote_addr;&lt;br /&gt;fastcgi_param  REMOTE_PORT        $remote_port;&lt;br /&gt;fastcgi_param  SERVER_ADDR        $server_addr;&lt;br /&gt;fastcgi_param  SERVER_PORT        $server_port;&lt;br /&gt;fastcgi_param  SERVER_NAME        $server_name;&lt;br /&gt;&lt;br /&gt;# PHP only, required if PHP was built with --enable-force-cgi-redirect&lt;br /&gt;fastcgi_param  REDIRECT_STATUS    200;&lt;/pre&gt;&lt;h2 id="wsgi_params"&gt;wsgi_params - experimental/unstable&lt;/h2&gt;&lt;a href="http://wiki.nginx.org/NginxHttpUwsgiModule"&gt;main resource&lt;/a&gt;&lt;br /&gt;or&lt;br /&gt;&lt;a href="http://projects.unbit.it/uwsgi/wiki/RunOnNginx"&gt;base wiki&lt;/a&gt;&lt;br /&gt;better insert instructions to server part&lt;br /&gt;&lt;pre class="prettyprint" style="display: none;"&gt;sudo vim /etc/nginx/wsgi_params&lt;/pre&gt;main parameter&lt;br /&gt;&lt;pre class="prettyprint"&gt;uwsgi_pass unix:///var/run/example.com.sock;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2 id="virtualhost"&gt;virtualhost conf&lt;/h2&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/nginx/sites-available/example.com&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;server {&lt;br /&gt;    listen       80;&lt;br /&gt;    server_name example.com www.example.com;&lt;br /&gt;    access_log /var/www/example.com/logs/access.log complete buffer=32k;&lt;br /&gt;    root /var/www/example.com/www;&lt;br /&gt;    &lt;br /&gt;    error_page  404  /404.html;&lt;br /&gt;    &lt;br /&gt;    # for custom rewriting rules but NOT for rewrite rules for frameworks like Joomla, Wordperss, modX&lt;br /&gt;    location /old_stuff/ {&lt;br /&gt;        rewrite   ^/old_stuff/(.*)$  /new_stuff/$1  permanent;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;    # serve static files&lt;br /&gt;    location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {&lt;br /&gt;     access_log off;&lt;br /&gt;     expires 30d;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    location /download/ {&lt;br /&gt;     limit_conn   gulag  3; # limit connections to three from one IP.&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;    location{&lt;br /&gt;     #better&lt;br /&gt;     proxy_pass      unix:/tmp/some.socket;&lt;br /&gt;     # or solution with stability and speed problems&lt;br /&gt;     #proxy_pass      http://127.0.0.1:8080; &lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;For www.ex.com -&amp;gt; ex.com redirests or web frameworks redirects &lt;/h3&gt;&lt;a href="http://nginx.org/en/docs/http/converting_rewrite_rules.html"&gt;Converting rewrite rules&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://modxcms.com/forums/index.php?PHPSESSID=098c1cf6eaf89633d8549e3d31453616&amp;amp;topic=50615.msg300647#msg300647"&gt;modX solution&lt;/a&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;server {&lt;br /&gt;    listen       80;&lt;br /&gt;    server_name  myModxSite.com;&lt;br /&gt;    rewrite   ^  http://www.myModxSite.com$request_uri?;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;server {&lt;br /&gt;    listen       80;&lt;br /&gt;    server_name  www.myModxSite.com;&lt;br /&gt;&lt;br /&gt;    root /www/myModxSite.com/root/;&lt;br /&gt;&lt;br /&gt;    #debug rewrites&lt;br /&gt;    error_log  logs/myModxSite.com.error.log notice;&lt;br /&gt;    rewrite_log on;&lt;br /&gt;&lt;br /&gt;    location ~ \.php$ {&lt;br /&gt;    include /etc/nginx/fastcgi_param;&lt;br /&gt;    fastcgi_pass unix:/tmp/php-fastcgi.socket;&lt;br /&gt;    #fastcgi_pass 127.0.0.1:9000;&lt;br /&gt;    fastcgi_index index.php;&lt;br /&gt;    fastcgi_param SCRIPT_FILENAME $document_root $fastcgi_script_name;&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;h3&gt;Load balancing&lt;/h3&gt;&lt;a href="http://sysoev.ru/nginx/docs/http/ngx_http_upstream.html"&gt;ngx_http_upstream&lt;/a&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;upstream big_server_com {&lt;br /&gt;    server 127.0.0.3:8000 weight=5; #first 5 request go to this server &lt;br /&gt;    server 127.0.0.3:8001 weight=7 max_fails=3  fail_timeout=30s;&lt;br /&gt;    server 192.168.0.1:8000 down; #constantly offline server. use with ip_hash&lt;br /&gt;    server 192.168.0.1:8001 backup; #use this server when else servers are busy or down&lt;br /&gt;    server unix:/tmp/backend3;&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  server { # simple load balancing&lt;br /&gt;    listen          80;&lt;br /&gt;    server_name     big.server.com;&lt;br /&gt;    access_log      logs/big.server.access.log complete;&lt;br /&gt; &lt;br /&gt;    location / {&lt;br /&gt;      proxy_pass      http://big_server_com;&lt;br /&gt;    }&lt;br /&gt;  }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enable/example.com&lt;/pre&gt;&lt;pre class="prettyprint"&gt;sudo /etc/init.d/nginx restart&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-3482864535093998051?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/3482864535093998051/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=3482864535093998051&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3482864535093998051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3482864535093998051'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/09/nginx-defaults.html' title='nginx defaults'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-5591838531453040336</id><published>2010-09-09T19:26:00.001+03:00</published><updated>2010-09-09T19:28:14.796+03:00</updated><title type='text'>Network problem after cloning system on KVM</title><content type='html'>After cloning eth0 disappear from output ifconfig.&lt;br /&gt;Resolve&lt;br /&gt;sudo rm /etc/udev/rules.d/70-persistent-net.rules &amp;amp;&amp;amp; sudo reboot&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-5591838531453040336?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/5591838531453040336/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=5591838531453040336&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/5591838531453040336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/5591838531453040336'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/09/network-problem-after-cloning-system-on.html' title='Network problem after cloning system on KVM'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-2460682013687197197</id><published>2010-09-08T07:37:00.004+03:00</published><updated>2010-09-08T15:01:25.628+03:00</updated><title type='text'>Решено. Проблема с nm-applet в ubuntu</title><content type='html'>Вот намедни решил отойти погрется в постели с ноутом не отрываясь от инета, но вот незадача - пропал из области уведомлений nm-applet.&lt;br /&gt;После возни с его включением-выключением подумал приконнектится через консоль, но не судьба с wpa2-personal это сделать без акробатики.&lt;br /&gt;&lt;br /&gt;Гугл помог найти вот такое решение для востановления аплета&lt;br /&gt;&lt;br /&gt;System - Preferences - Network Connections&lt;br /&gt;редактируем свойства все существующих сетей= убираем галочку "&lt;b&gt;Available to all users&lt;/b&gt;" и применяем настройки.&lt;br /&gt;Это надо проделать у всех пользователей.&lt;br /&gt;Если сетей в настройках небыло, создайте сеть, потом поставьте галочку, сохраните настройки, потом опять зайдите и снимите галочку.&lt;br /&gt;&lt;br /&gt;После всех манипуляций перелогиньтесь.&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?p=9800977#post9800977"&gt;Источник вдохновения&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Это может не помочь, когда то что написано выше мне не помогло, я просто прописал свою сеть. И ОН появился )))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-2460682013687197197?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/2460682013687197197/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=2460682013687197197&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2460682013687197197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2460682013687197197'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/09/solved-nm-applet-problems-on-ubuntu.html' title='Решено. Проблема с nm-applet в ubuntu'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-4512860170516832343</id><published>2010-08-09T12:11:00.000+03:00</published><updated>2010-08-09T12:11:33.743+03:00</updated><title type='text'>Nice Munin</title><content type='html'>&lt;a href="http://exchange.munin-monitoring.org/"&gt;munin-monitoring&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo wget -O mysql_report http://exchange.munin-monitoring.org/plugins/mysql_report/version/3/download&lt;br /&gt;sudo wget -O mongo_lock http://exchange.munin-monitoring.org/plugins/mongo_lock/version/1/download&lt;br /&gt;sudo wget -O mongo_conn http://exchange.munin-monitoring.org/plugins/mongo_conn/version/1/download&lt;br /&gt;sudo wget -O mongo_btree http://exchange.munin-monitoring.org/plugins/mongo_btree/version/1/download&lt;br /&gt;sudo wget -O mongo_mem http://exchange.munin-monitoring.org/plugins/mongo_mem/version/1/download&lt;br /&gt;sudo wget -O mongo_ops http://exchange.munin-monitoring.org/plugins/mongo_ops/version/1/download&lt;br /&gt;&lt;br /&gt;sudo wget -O nginx_vhost_traffic http://exchange.munin-monitoring.org/plugins/nginx_vhost_traffic/version/1/download&lt;br /&gt;sudo wget -O ngnix_memory http://exchange.munin-monitoring.org/plugins/ngnix_memory/version/1/download&lt;br /&gt;&lt;br /&gt;sudo wget -O multimemory http://exchange.munin-monitoring.org/plugins/multimemory/version/1/download&lt;br /&gt;sudo wget -O linux_diskstat_ http://exchange.munin-monitoring.org/plugins/linux_diskstat_/version/1/download&lt;br /&gt;sudo wget -O coretemp http://exchange.munin-monitoring.org/plugins/coretemp/version/1/download&lt;br /&gt;sudo wget -O linux_diskstats_ http://exchange.munin-monitoring.org/plugins/linux_diskstats_/version/1/download&lt;br /&gt;&lt;br /&gt;sudo wget -O network-usage http://exchange.munin-monitoring.org/plugins/network-usage/version/1/download&lt;br /&gt;&lt;br /&gt;sudo wget -O openssh-denyhosts http://exchange.munin-monitoring.org/plugins/openssh-denyhosts/version/1/download&lt;br /&gt;&lt;br /&gt;sudo wget -O raid http://exchange.munin-monitoring.org/plugins/raid/version/3/download&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sudo chmod +x mysql_report&lt;br /&gt;sudo chmod +x mongo_lock&lt;br /&gt;sudo chmod +x mongo_conn&lt;br /&gt;sudo chmod +x mongo_btree&lt;br /&gt;sudo chmod +x mongo_mem&lt;br /&gt;sudo chmod +x mongo_ops&lt;br /&gt;&lt;br /&gt;sudo chmod +x nginx_vhost_traffic&lt;br /&gt;sudo chmod +x ngnix_memory&lt;br /&gt;&lt;br /&gt;sudo chmod +x multimemory&lt;br /&gt;sudo chmod +x linux_diskstat_&lt;br /&gt;sudo chmod +x coretemp&lt;br /&gt;sudo chmod +x linux_diskstats_&lt;br /&gt;&lt;br /&gt;sudo chmod +x network-usage&lt;br /&gt;&lt;br /&gt;sudo chmod +x openssh-denyhosts&lt;br /&gt;&lt;br /&gt;sudo chmod +x raid&lt;br /&gt;&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/nginx_memory /etc/munin/plugins/nginx_memory&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/mysql_report /etc/munin/plugins/mysql_report&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/mongo_lock /etc/munin/plugins/mongo_lock&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/mongo_conn /etc/munin/plugins/mongo_conn&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/mongo_btree /etc/munin/plugins/mongo_btree&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/mongo_mem /etc/munin/plugins/mongo_mem&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/mongo_ops /etc/munin/plugins/mongo_ops&lt;br /&gt;&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/nginx_vhost_traffic /etc/munin/plugins/nginx_vhost_traffic&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/ngnix_memory /etc/munin/plugins/ngnix_memory&lt;br /&gt;&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/multimemory /etc/munin/plugins/multimemory&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/linux_diskstat_ /etc/munin/plugins/linux_diskstat_&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/coretemp /etc/munin/plugins/coretemp&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/linux_diskstats_ /etc/munin/plugins/linux_diskstats_&lt;br /&gt;&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/network-usage /etc/munin/plugins/network-usage&lt;br /&gt;&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/openssh-denyhosts /etc/munin/plugins/openssh-denyhosts&lt;br /&gt;&lt;br /&gt;sudo ln -s /usr/share/munin/plugins/raid /etc/munin/plugins/raid&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-4512860170516832343?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/4512860170516832343/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=4512860170516832343&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4512860170516832343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4512860170516832343'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/nice-munin.html' title='Nice Munin'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-9143227429608942799</id><published>2010-08-09T10:57:00.000+03:00</published><updated>2010-08-09T10:57:58.996+03:00</updated><title type='text'>CS</title><content type='html'>&lt;a href="http://www.generation5.org/content/2003/gahelloworld.asp"&gt;A "Hello World!" Genetic Algorithm Example&lt;/a&gt;&lt;br /&gt;&lt;a href="http://habrahabr.ru/blogs/edu_2_0/86777/"&gt;Что такое генетический алгоритм?&lt;/a&gt;&lt;br /&gt;&lt;a href="http://css.freetonik.com/"&gt;css&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-9143227429608942799?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/9143227429608942799/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=9143227429608942799&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/9143227429608942799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/9143227429608942799'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/cs.html' title='CS'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-8120730485653798572</id><published>2010-08-09T08:47:00.002+03:00</published><updated>2010-08-09T08:47:58.761+03:00</updated><title type='text'>nlp, marketing etc in ecommerce</title><content type='html'>http://www.youtube.com/watch?v=vMV4PIEIKY4&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-8120730485653798572?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/8120730485653798572/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=8120730485653798572&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/8120730485653798572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/8120730485653798572'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/nlp-marketing-etc-in-ecommerce.html' title='nlp, marketing etc in ecommerce'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-3304806942992452759</id><published>2010-08-06T20:47:00.013+03:00</published><updated>2010-09-12T03:20:24.055+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nginx php ubuntu 10.4'/><title type='text'>10.4 + nginx + php on socket</title><content type='html'>&lt;a href="http://ubuntuforums.org/showthread.php?t=1451949"&gt;Scource&lt;/a&gt;&lt;br /&gt;This procedure explains how to enable Nginx PHP services (php-cgi) in Ubuntu (&amp;gt;=9.10), by using a simple upstart file to start and keep up php-cgi support (runing in external FASTCGI Mode).&lt;br /&gt;Tested on Ubuntu 10.4&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;Install PHP&lt;/h2&gt;Ubuntu 9.10: PHP 5.2.10-2ubuntu6.4&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install php5-cgi php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-mhash php5-mysql mysql-server #php5-memcache&lt;/pre&gt;security tip: hide php version&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo sed -i '/expose_php/s/\;exp/exp/;/expose_php/s/=.*/= 0/' /etc/php5/cgi/php.ini&lt;br /&gt;grep 'expose_php' /etc/php5/cgi/php.ini&lt;/pre&gt;We use Ubuntu's Upstart system to keep php-cgi support up. If you do not want to use Ubuntu's upstart system see bellow, the alternative (init.d) php-cgi upstart file&lt;br /&gt;Note: using Linux socket binding, instead of the IP binding, will improve server performance:&lt;br /&gt;socket binding&lt;br /&gt;&lt;pre class="prettyprint"&gt;/usr/bin/php-cgi -q -b /tmp/php-fastcgi.socket&lt;/pre&gt;But if you want to use the less elegant "fastcgi_pass 127.0.0.1:9000;" in your nginx conf files, you must replace "/tmp/php-fastcgi.socket" for "127.0.0.1:9000" in the following upstart script&lt;br /&gt;IP binding-&amp;gt; IP:port&lt;br /&gt;&lt;pre class="prettyprint"&gt;/usr/bin/php-cgi -q -b 127.0.0.1:9000&lt;/pre&gt;&lt;h2&gt;create a php-cgi upstart file&lt;/h2&gt;&lt;a href="http://upstart.ubuntu.com/"&gt;You may learn more about upstart&lt;/a&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo tee /etc/init/php-fastcgi.conf &amp;lt;&amp;lt;-\EOA&lt;br /&gt;#/etc/init/php-fastcgi.conf&lt;br /&gt;# php-fastcgi - starts php-cgi as an external FASTCGI process&lt;br /&gt;description "php-fastcgi - keep up php-fastcgi"&lt;br /&gt;start on runlevel [2345]&lt;br /&gt;stop on runlevel [!2345]&lt;br /&gt;respawn&lt;br /&gt;exec /usr/bin/sudo -u www-data PHP_FCGI_CHILDREN=5 PHP_FCGI_MAX_REQUESTS=125 /usr/bin/php-cgi -q -b /tmp/php-fastcgi.socket&lt;br /&gt;EOA&lt;br /&gt;&lt;/pre&gt;start the php-fastcgi service&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo /sbin/start php-fastcgi&lt;/pre&gt;check status&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo /sbin/status php-fastcgi&lt;/pre&gt;&lt;pre class="prettyprint"&gt;ps -ef | sed '/!d/d;/cgi/!d' # ps cuxa | sed '/!d/d;/cgi/!d'&lt;/pre&gt;security tip: enable suhosin security hardening&lt;br /&gt;Suhosin will work out of the box with its default configuration&lt;br /&gt;&lt;a href="http://www.hardened-php.net/suhosin/configuration.html"&gt;suhosin configuration&lt;/a&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo aptitude install php5-suhosin&lt;/pre&gt;restart php-fastcgi processes&lt;br /&gt;&lt;pre class="prettyprint"&gt;pgrep php-cgi;echo;sudo pkill php-cgi;sleep 1; pgrep php-cgi&lt;/pre&gt;stop php-fastcgi&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo /sbin/stop php-fastcgi &amp;amp;&amp;amp; sudo rm /tmp/php-fastcgi.socket&lt;/pre&gt;&lt;h2&gt;change nginx config files&lt;/h2&gt;change the relevant files in /etc/nginx/sites-available/*&lt;br /&gt;check lines after: '# pass the PHP scripts to FastCGI server'&lt;br /&gt;&lt;pre class="pretttyprint"&gt;sudo nano /etc/nginx/sites-available/default&lt;/pre&gt;&lt;pre class="prettyprint"&gt;location ~ \.php$ {&lt;br /&gt; include /etc/nginx/fastcgi_params;&lt;br /&gt; fastcgi_pass unix:/tmp/php-fastcgi.socket;&lt;br /&gt; #fastcgi_pass 127.0.0.1:9000;&lt;br /&gt; fastcgi_index index.php;&lt;br /&gt; fastcgi_param SCRIPT_FILENAME $document_root $fastcgi_script_name;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-3304806942992452759?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/3304806942992452759/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=3304806942992452759&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3304806942992452759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3304806942992452759'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/104-nginx-php-on-socket.html' title='10.4 + nginx + php on socket'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-4663250596860515512</id><published>2010-08-06T20:46:00.000+03:00</published><updated>2010-08-06T20:46:08.311+03:00</updated><title type='text'>Creating link to "web programm" like Google Tasks</title><content type='html'>&lt;div class="note_content text_align_ltr direction_ltr clearfix"&gt; &lt;div&gt;For standalone google acccount use &lt;br /&gt;&lt;a href="https://mail.google.com/tasks/m" onmousedown="UntrustedLink.bootstrap($(this), &amp;quot;67656&amp;quot;, event);" rel="nofollow" target="_blank"&gt;&lt;span&gt;https://mail.google.com/ta&lt;/span&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;span class="word_break"&gt;&lt;/span&gt;sks/m&lt;/a&gt; — mobile version&lt;br /&gt;&lt;a href="https://mail.google.com/tasks/android" onmousedown="UntrustedLink.bootstrap($(this), &amp;quot;67656&amp;quot;, event);" rel="nofollow" target="_blank"&gt;&lt;span&gt;https://mail.google.com/ta&lt;/span&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;span class="word_break"&gt;&lt;/span&gt;sks/android&lt;/a&gt; — Android&lt;br /&gt;&lt;a href="https://mail.google.com/tasks/iphone" onmousedown="UntrustedLink.bootstrap($(this), &amp;quot;67656&amp;quot;, event);" rel="nofollow" target="_blank"&gt;&lt;span&gt;https://mail.google.com/ta&lt;/span&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;span class="word_break"&gt;&lt;/span&gt;sks/iphone&lt;/a&gt; — iPhone&lt;br /&gt;&lt;a href="https://mail.google.com/tasks/ig" onmousedown="UntrustedLink.bootstrap($(this), &amp;quot;67656&amp;quot;, event);" rel="nofollow" target="_blank"&gt;&lt;span&gt;https://mail.google.com/ta&lt;/span&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;span class="word_break"&gt;&lt;/span&gt;sks/ig&lt;/a&gt; — iGoogle&lt;br /&gt;&lt;a href="https://mail.google.com/tasks/canvas" onmousedown="UntrustedLink.bootstrap($(this), &amp;quot;67656&amp;quot;, event);" rel="nofollow" target="_blank"&gt;&lt;span&gt;https://mail.google.com/ta&lt;/span&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;span class="word_break"&gt;&lt;/span&gt;sks/canvas&lt;/a&gt; — iGoogle&lt;br /&gt;&lt;br /&gt;If you using google apps use this&lt;br /&gt;&lt;a href="https://mail.google.com/tasks/a/my_domain.ru/canvas" onmousedown="UntrustedLink.bootstrap($(this), &amp;quot;67656&amp;quot;, event);" rel="nofollow" target="_blank"&gt;&lt;span&gt;https://mail.google.com/ta&lt;/span&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;span class="word_break"&gt;&lt;/span&gt;sks/a/my_domain.ru/canvas&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;the source is &lt;a href="http://m.habrahabr.ru/post/73079/" onmousedown="UntrustedLink.bootstrap($(this), &amp;quot;67656&amp;quot;, event);" rel="nofollow" target="_blank"&gt;&lt;span&gt;http://m.habrahabr.ru/post&lt;/span&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;span class="word_break"&gt;&lt;/span&gt;/73079/&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-4663250596860515512?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/4663250596860515512/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=4663250596860515512&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4663250596860515512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4663250596860515512'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/creating-link-to-web-programm-like.html' title='Creating link to &quot;web programm&quot; like Google Tasks'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-3620435397662919640</id><published>2010-08-06T16:58:00.001+03:00</published><updated>2010-08-06T16:58:53.999+03:00</updated><title type='text'>Юзабилити магазина</title><content type='html'>&lt;h2 class="entry-title single-entry-title"&gt;&lt;span class="topic" title="http://habrahabr.ru/company/webprojects/blog/101061/"&gt;5 галочек: чеклист юзабилити&lt;/span&gt;&lt;/h2&gt;&lt;h2 class="entry-title single-entry-title"&gt;&lt;a href="http://habrahabr.ru/company/webprojects/blog/101061/%20"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-weight: normal;"&gt;http://habrahabr.ru/company/webprojects/blog/101061/ &lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="topic" title="http://habrahabr.ru/company/webprojects/blog/101061/"&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 class="entry-title single-entry-title"&gt;&lt;span class="topic" title="http://habrahabr.ru/company/webprojects/blog/101061/"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-weight: normal;"&gt;повествование об идеальном магазине в плане использования&lt;a name='more'&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div class="content"&gt;Мы выделили 5 основных пунктов, по которым можно определить юзабилити  сайта. Список спорный и в основном касается продающих сайтов. И да, эти  пять пунктов — среднее арифметическое опыта, полученного при обработке  заявок на конкурс «&lt;a href="http://habrahabr.ru/company/webprojects/blog/100785/"&gt;Юзабельный вебпроект&lt;/a&gt;». Думаете, мы раздали слонов и забыли? &lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.divshare.com/img/12165610-314" /&gt;&lt;br /&gt;&lt;sub&gt;© &lt;a href="http://blog.arnomanders.nl/index.php/archives/usability/"&gt;оригинал картинки&lt;/a&gt;&lt;/sub&gt;&lt;br /&gt;&lt;br /&gt;Когда мы предложили дать бесплатные комментарии по юзабилити всем  желающим, нам пришло 166 заявок. На каждый сайт мы тратили до получаса. &lt;br /&gt;&lt;br /&gt;Ошибки, само собой, повторялись. Голова пухла, а мы продолжали писать  одинаковые комменты. Результатом марафона стал ниже приведенный чеклист.  &lt;br /&gt;&lt;br /&gt;Сразу оговоримся, что мы не оцениваем юзабилити в вакууме, нам важно,  чтобы сайт работал, т.е. «продавал». Товары, услуги, идеи — не важно.  Речь может идти о бесплатном веб-сервисе, для которого транзакцией  станет регистрация посетителя. &lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1919392632262582347&amp;amp;postID=3620435397662919640" name="habracut"&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Первый контакт&lt;/h3&gt;&lt;br /&gt;Итак, мы пишем ТЗ для сайта, придумываем полезные разделы, включаем в  список и статьи, и новости, и каталог продукции — судя по всему, это  будет идеальный сайт! И на главной странице будет видно все это  великолепие. Пользователь должен оценить каждую частицу информации,  которой мы заботливо наполнили наше детище. &lt;br /&gt;&lt;br /&gt;Я открываю сайт и вижу размытое пятно. &lt;br /&gt;&lt;br /&gt;Нет, я не вижу интересных новостей, не вижу самые популярные товары, не вижу вашего телефона и не вижу всех разделов каталога. &lt;br /&gt;&lt;br /&gt;Почему?&lt;br /&gt;&lt;br /&gt;Наверное, потому что я вижу этот сайт впервые. Вы потратились на  контекстную рекламу, поисковое продвижение, и вот, наконец, ваш клиент  зашел на сайт. Десять раз продублированная информация, разделы,  спрятанные друг в друге, изобилие пунктов меню, длинные тексты,  нестандартный дизайн, претендующий на оригинальность — все это, по  правде говоря, сбивает с толку, отнимает время, раздражает и отпугивает.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Главное меню&lt;/h4&gt;&lt;br /&gt;Меню в идеале должно быть одно и начинаться в левом верхнем углу. Я  захожу в дом через подъезд и не ожидаю, что меня попросят  воспользоваться окном. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Горизонтальное или вертикальное?&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Если в меню мало пунктов, его можно сделать горизонтальным, если больше 5 — делайте вертикальным. &lt;/li&gt;&lt;li&gt;Если меню представляет собой список (например, список услуг), делайте его вертикальным. &lt;/li&gt;&lt;li&gt;Если сомневаетесь, делайте меню вертикальным. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Разделы&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Названия должны быть однозначными. Пользователь должен понять, что находится в разделе до того, как туда пойдет, а не после. &lt;/li&gt;&lt;li&gt;Если в меню больше 9 пунктов, упрощайте его. Объединяйте пункты под заголовками или помещайте в подменю. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Подменю и подразделы&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Хорошо, когда подменю раскрываются по клику, а не при наведении.&lt;/li&gt;&lt;li&gt;Подразделы должны быть видны всегда, когда я нахожусь в «материнском» разделе.&lt;/li&gt;&lt;li&gt;В подменю должно быть только то, что однозначно относится к этому  разделу. Лучше сделать отдельный раздел, чем добавлять подпункт «до  кучи». &lt;/li&gt;&lt;li&gt;Используйте «хлебные крошки». &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;Дублирование информации&lt;/h3&gt;&lt;br /&gt;Информация не должна дублироваться. В двух разных меню не должно быть одинаковых пунктов. &lt;br /&gt;&lt;br /&gt;Во-первых, когда я вижу большое количество элементов на странице, я уже  мысленно напрягаюсь. «Так, здесь много разделов, много информации. Как  мне найти нужную?»&lt;br /&gt;&lt;br /&gt;Во-вторых, я впустую трачу время, чтобы осознать, что текст  дублированный. Думаете, «это всего пара секунд»? В интернете счет на них  и идет. Лишняя секунда — &lt;b&gt;напрягает&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;Из правила есть исключения. &lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;Хлебные крошки&lt;/i&gt;. Дублируют ссылки в меню по определению. &lt;/li&gt;&lt;li&gt;&lt;i&gt;Контактная информация&lt;/i&gt;. Если требуемая транзакция предполагает телефонный звонок, значит телефон должен быть на каждой странице. &lt;/li&gt;&lt;li&gt;&lt;i&gt;Атрибуты контента&lt;/i&gt;. Например, параметры товара должны быть указаны и в каталоге (кратко), и на странице товара (полностью). &lt;/li&gt;&lt;li&gt;&lt;i&gt;Ключевые слова&lt;/i&gt;. В рамках текстов могут повторяться. Но сами тексты не должны дублироваться по смыслу. &lt;/li&gt;&lt;li&gt;В &lt;i&gt;гипермаркетах&lt;/i&gt; без определенной направленности «сумки для ноутбуков» могут попасть одновременно в раздел «Ноутбуки» и «Сумки». &lt;/li&gt;&lt;li&gt;&lt;i&gt;Актуальное дублирование&lt;/i&gt;. Иногда одна и та же информация  одинаково актуальна в нескольких местах: телефонный номер на страницах,  посвященных разным услугам одной организации, инструкция по установке  программы на странице для скачивания и на странице справки, и т.д. Как  правило, она не занимает много места.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;Привлечение внимания&lt;/h3&gt;&lt;br /&gt;А вдруг посетитель сайта не увидит информацию в одном месте — давайте просто разместим ее в нескольких одновременно?&lt;br /&gt;&lt;br /&gt;Правда в том, что каждый элемент должен иметь свое, &lt;b&gt;единственно возможное&lt;/b&gt; место. Когда он необходим, его очень просто найти. &lt;br /&gt;&lt;br /&gt;Выделять элементы следует &lt;i&gt;логически&lt;/i&gt; и &lt;i&gt;графически&lt;/i&gt;. &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Каждый элемент должен находиться там, где я, скорее всего, буду его  искать. Сначала подумайте, какие вопросы задает клиент, когда приходит  на сайт: «А они доставят товар в мой город?», «Где я могу найти  стиральную машину с вертикальной подачей?» и т.д. А затем выстраивайте  иерархию согласно этой логике, объединяя общее и выделяя частное. &lt;/li&gt;&lt;li&gt;Элемент должен быть заметен сам по себе. Только не надо больших  красных букв, всплывающих подсказок и громоздких блоков. Просто отделите  элементы друг от друга, а активные элементы сделайте похожими на  активные (кнопки, вкладки, пункты меню, ссылки). &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;h3&gt;Нестандартный дизайн&lt;/h3&gt;&lt;br /&gt;Прочитав следующий абзац, дизайнеры, которые когда-либо рисовали  анимированные шапки в пол-экрана и сайты-шедевры флэш-анимации, поставят  посту минус. &lt;br /&gt;&lt;br /&gt;Нестандартный дизайн зачастую не имеет ничего общего с юзабилити. Красиво, но нефункционально. &lt;br /&gt;&lt;br /&gt;В лучшем случае из-за желания выделиться располагают главное меню  справа. Арабам, наверное, удобно. Но большая часть планеты читает &lt;b&gt;слева направо&lt;/b&gt; и поэтому начинает осмотр сайта с левого верхнего угла. &lt;br /&gt;&lt;br /&gt;Именно там все &lt;b&gt;привыкли&lt;/b&gt; видеть логотип, щелкнув по которому всегда можно попасть на главную страницу. Под ним все &lt;b&gt;привыкли&lt;/b&gt; видеть основное меню, при помощи которого можно попасть в основные разделы сайта. &lt;br /&gt;&lt;br /&gt;Устанавливать новые стандарты и бросать вызов консервативным устоям —  благородная затея. Но пожалуйста, не просите меня наливать чай в чашку  через отверстие сбоку. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Транзакционные элементы&lt;/h3&gt;&lt;br /&gt;Очень часто основная транзакция между посетителем и владельцем сайта —  телефонный звонок или выход на связь любым другим способом. &lt;br /&gt;&lt;br /&gt;Зачастую контактная информация скромно указана в подвале или на  отдельной странице «Контакты», ссылка на которую есть только в нижнем  меню. Иначе говоря, &lt;b&gt;в мертвой зоне&lt;/b&gt;. Какого черта? Все  ведь затевалось исключительно для того, чтобы посетитель мог позвонить,  поговорить с любезным (дай бог) консультантом и сделать, наконец,  покупку. &lt;br /&gt;&lt;br /&gt;Так почему бы не разместить контакты на каждой странице и на видном месте, например, в шапке или хотя бы на первом экране?&lt;br /&gt;&lt;br /&gt;То же относится к другим транзакционным элементам: кнопкам «Добавить объявление» или «Регистрация» и т.п.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Главная страница&lt;/h3&gt;&lt;br /&gt;Предположим, мы все сделали правильно, и теперь готовы заполнить главную страницу. Что на ней должно быть? &lt;br /&gt;&lt;br /&gt;Чем меньше — тем лучше. Если посетитель увидит понятное меню и удобные  навигационные элементы, он сам найдет то, что нужно. Может, ему хватит и  телефонного номера. &lt;br /&gt;&lt;br /&gt;Главная страница должна отвечать на вопрос «О чем этот сайт?» Если это  неочевидно (а чаще всего это так), на главной должны быть пояснения.  Максимально конкретные. &lt;br /&gt;&lt;br /&gt;Я захожу на сайт и думаю: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;«Да, я вижу, что это интернет-магазин, но что он продает?»&lt;/li&gt;&lt;li&gt;«Да, я понял, что это сайт про мишек Тедди, но что это: интернет-магазин, сайт производителя, клуб любителей?»&lt;/li&gt;&lt;li&gt;«Да, я понял, что это новостная лента, но какова тематика?»&lt;/li&gt;&lt;li&gt;«Стоматологическая клиника. Она хотя бы в моем городе?»&lt;/li&gt;&lt;li&gt;«Ага, это что-то про интернет. Блин, да я и так в интернете! Вроде бы, это не Хабр, что нового я тут найду?!»&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Описание сайта в одно-два предложения можно и нужно поместить под  логотипом. Например, такое: «Интернет-магазин эксклюзивного кошачьего  корма. Доставка в Екатеринбурге и по всей России». &lt;br /&gt;&lt;br /&gt;Итак, в шапке — логотип, пояснение, контакты. Где-то рядом — главное меню. А оставшееся место чем забить? &lt;br /&gt;&lt;br /&gt;Не надо его «забивать». Минимализм рулит. Конечно, мы хотим обратить  особое внимание пользователя на эксклюзив и новенькое. Или может быть,  хотим поставить твиттеровский виджет. Это можно. Ключевые слова здесь — &lt;b&gt;эксклюзивный и свежий контент&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;Вы, конечно, можете поставить нам в упрек, что уж вы-то, SEO-шники,  никогда не упустите возможность насытить текст поисковыми запросами чуть  более чем полностью, превратив его в простыню. И будете правы. &lt;br /&gt;&lt;br /&gt;Конечно, в таких вещах надо сдерживаться. А если все таки случилась простыня, следует отделить ее от ключевого контента. &lt;br /&gt;&lt;br /&gt;Первый контакт с сайтом — чрезвычайно важен. Даже если вы озаботились  созданием специальных входных страниц, главная — это лицо. И по ней  пользователь будет судить, интересны вы ему или нет.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Резюме&lt;/h3&gt;&lt;br /&gt;Чтобы заинтересовать посетителя, вы должны попробовать «продать продукт»  вживую. Все вопросы, сомнения и возражения, которые продемонстрирует  «потенциальный покупатель», необходимо проработать на сайте.&lt;br /&gt;&lt;br /&gt;Держа эту идею в голове, пройдитесь по чеклисту:&lt;br /&gt;&lt;img src="http://www.colorectalclinic.com.sg/view_set/default/images/checkbox-checked.gif" /&gt; у меня одно-два меню, они понятные и логичные,&lt;br /&gt;&lt;img src="http://www.colorectalclinic.com.sg/view_set/default/images/checkbox-checked.gif" /&gt; информация дублируется, только когда это необходимо, &lt;br /&gt;&lt;img src="http://www.colorectalclinic.com.sg/view_set/default/images/checkbox-checked.gif" /&gt; дизайн привычный и понятный с первого взгляда,&lt;br /&gt;&lt;img src="http://www.colorectalclinic.com.sg/view_set/default/images/checkbox-checked.gif" /&gt; контакты и другие транзакционные элементы на видном месте,&lt;br /&gt;&lt;img src="http://www.colorectalclinic.com.sg/view_set/default/images/checkbox-checked.gif" /&gt; о чем сайт, понятно по главной; его нельзя перепутать с сайтом смежной тематики.&lt;br /&gt;&lt;br /&gt;Вы можете с нами не согласиться, но мы считаем, что если у вас пять галочек — у вашего сайта хорошее юзабилити.          &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-3620435397662919640?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/3620435397662919640/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=3620435397662919640&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3620435397662919640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3620435397662919640'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/great-usability.html' title='Юзабилити магазина'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-6249947818917297308</id><published>2010-08-06T00:30:00.002+03:00</published><updated>2010-09-14T18:34:24.609+03:00</updated><title type='text'>Как настроить в MySQL Server после установки</title><content type='html'>Мой любимые вопросы в ходе собеседования, для работы в качестве MySQL DBA или связанных с производительностью MySQL это вопросы о настройках MySQL Server сразу после установки, полагая, он был установлен с настройками по умолчанию.&lt;br /&gt;&lt;br /&gt;Я удивлен, как много людей не дают какого-либо разумного ответа на этот вопрос, и сколько серверов, впринципе, работают с настройками по умолчанию.&lt;br /&gt;&lt;br /&gt;Даже если вы сможете настроить довольно много переменных в MySQL сервера, лишь немногие из них действительно важны для наиболее распространенных видов нагрузок. После того как вы правильно настроите эти параметры остальные изменения настроек дадут только легкие улучшения производительности.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;key_buffer_size&lt;/b&gt; - очень важный параметр, если вы используете MyISAM таблицы. Установить до 30-40% доступной памяти, если вы используете только таблицы MyISAM. Правильный размер зависит от количества индексов, объема данных и рабочей нагрузки - помните MyISAM использует кэш операционной системы для кэширования данных так что вы должны оставить достаточно памяти для него, ведь данные весят намного больше, чем индексы, в большинстве случаев. Стоит проверить key_buffer, иногда его размер выставляют 4G в то время как сумарный размер MYI файлов только 1 ГБ.Это было бы просто пустая трата ресурсов. Если вы используете несколько таблиц MyISAM лучше устанавливать этот параметр в пределах 16-32Mb чтобы он был достаточно, чтобы вместить индексы временных таблиц, которые создаются на диске.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;innodb_buffer_pool_size&lt;/b&gt; Это очень важная переменная для настройки, если вы используете Innodb таблицы. Innodb гораздо более чувствительны к размер буфера по сравнению с MyISAM. MyISAM могут нормально работать с key_buffer_size по умолчанию даже при больших наборах данных, но innodb_buffer_pool_size по умолчанию будет тормозить бд. Кроме того, Innodb буферный пул кэширует данные и индексы, поэтому вам не нужно оставлять место для кэша ОС, т.е. значение параметра можно ставить до 70-80% оперативной памяти для установок с только Innodb таблицами. Те же правила применяются для key_buffer - если у вас есть небольшой набор данных, и он не будет расти резко не устанавливайте максимальные размеры innodb_buffer_pool_size - ведь можно найти лучшее применение для памяти.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;innodb_additional_mem_pool_size&lt;/b&gt; этот параметр не сильно влияет на производительность, по крайней мере на ОС с хорошо распределенной паямтью. Но вы, возможно, захотите, выставить его 20 Мб (можно больше), потом вы можете посмотреть, сколько памяти Innodb выделяет для разных потребностей.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;innodb_log_file_size&lt;/b&gt; важный параметр при больших объемах записи в базу особенно на больших наборах данных. Больший размер, часто, улучшает производительность, но при этом увеличивает время восстановления - будьте осторожны. Я обычно использую значения 64M-512M в зависимости от размера сервера.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;innodb_log_buffer_size&lt;/b&gt; по умолчанию неплох для нормальной рабочей нагрузки - средняя нагрузка по записи и короткие транзакции. Однако если вы имеете пики нагрузок или активно работаете с блоб вы возможно захотите увеличитье этот параметр. Не устанавливайте его слишком большим - это будет тратой памяти, он всеравно обновляется каждую секунду и если вам не нужно место больше чем на одну секунду стоящее обновлений. 8MB-16MB, как правило, достаточно. Для малых установок использовать меньшие значения.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;innodb_flush_log_at_trx_commit&lt;/b&gt; плачитесь о том что Innodb в 100 раз медленнее, чем MyISAM? Вы, наверное, забыли, изменить это значение. По умолчанию значение 1 означает каждый коммит (или каждое выражение за пределами транзакции) нужно сбрасить в лог, что является накладным, особенно если у вас кеш без батарейки. Многие приложения, особенно, переехавшие из таблиц MyISAM чувствуют себя в порядке со значением 2, которое означает, что что лог идет не сразу на диск, а только в кэш операционной системы. Журнал по-прежнему сбрасываются на диск каждую секунду, так что вы обычно потеряете не более 1-2 сек текущих обновлений. Значение 0 немного быстрее, но немного менее безопасне, так как вы можете потерять операции даже в том случае креша MySQL Server. Значение 2 приведет к потере данных, только при при креше ОС.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;table_cache&lt;/b&gt; - открытие таблиц дорогое удовольствие. Например MyISAM таблицы помечаються в MYI-заголовках, что они в настоящее время используются. Вы же не хотите, чтобы это происходило очень часто, как правило, лучше увеличить размер кэша так, чтобы держать большинство ваших таблиц открытыми. Это использует некоторые ресурсы ОС и некоторый объем памяти, но для современного оборудования, как правило, это не проблема. 1024 является хорошим значением для приложений с несколькими сотнями таблиц (помните, каждое соединение нуждается в собственной записи), если у вас есть много соединений или много таблиц стоит сделать его еще больше. Я видел используемые значения параметра более 100 000.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;thread_cache&lt;/b&gt; создание/разрушения потоков - дорогая операция, она происходит при подсоединении/разъединении. По крайней мере 16. Если в приложении ожидется скачкообразное увеличение конкурирующих соединений и быстрый рост созданных потоков, стоит поставить значения параметра повыше. Цель - избежать операции создания новых потоков в нормальном режиме.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;query_cache_size&lt;/b&gt; - если ваше приложение интесивно читает из базы и вы не имеете слоя кеширования в приложении, этот параметр вам поможет. Значения от 32M-512M с обычно имеет смысл. Через некоторое время стоит проверить параметр как он используется. Для некоторых нагрузки кэш ударил соотношение ниже, чем это было бы оправдать, имеющих это позволило.&lt;br /&gt;&lt;br /&gt;Примечание: как вы можете увидеть все это глобальные переменные. Эти переменные зависят от аппаратной части и набора механизмов хранения, в то время как в переменных сессии, как правило, зависят от конкретной нагрузки. Если у вас есть простые запросы нет никаких оснований для увеличения sort_buffer_size даже если у вас есть 64 ГБ памяти для этого. Кроме того это может снизить производительность.&lt;br /&gt;&lt;br /&gt;Обычно я оставляю настройку переменных сеанса напоследок после того, как можно проанализировать нагрузки.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS Примечание MySQL дистрибутив содержит кучу файлов my.cnf образец, который может быть хорошим шаблоном для использования. Как правило, он уже будет намного лучше, чем по умолчанию, если вы выбрать его правильно.&lt;br /&gt;&lt;br /&gt;29 сентября 2006&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Posted by peter&lt;br /&gt;&lt;br /&gt;Source&lt;br /&gt;&lt;a href="http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/"&gt;&amp;nbsp;http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-6249947818917297308?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/6249947818917297308/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=6249947818917297308&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/6249947818917297308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/6249947818917297308'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/what-to-tune-in-mysql-server-after.html' title='Как настроить в MySQL Server после установки'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-4676373099956026320</id><published>2010-08-03T11:51:00.003+03:00</published><updated>2010-08-03T11:53:03.190+03:00</updated><title type='text'>rebuild site immediately</title><content type='html'>&lt;a href="http://www.hius.com.ua"&gt;http://www.hius.com.ua&lt;/a&gt; хороший ассортимент товаров для пайки, но магазин разваливается на глазах&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-4676373099956026320?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/4676373099956026320/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=4676373099956026320&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4676373099956026320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/4676373099956026320'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/rebuild-site-immediately.html' title='rebuild site immediately'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-8866438406461988000</id><published>2010-08-02T10:59:00.006+03:00</published><updated>2010-08-02T11:16:47.967+03:00</updated><title type='text'>Python. Полное покрытие кода</title><content type='html'>копипаста с хабра&lt;br /&gt;автор &lt;a href="http://nuald.habrahabr.ru/"&gt;nuald&lt;/a&gt; &lt;br /&gt;&lt;h2 class="entry-title single-entry-title"&gt;&lt;span class="topic" title="http://habrahabr.ru/blogs/python/97075/"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span class="topic" title="http://habrahabr.ru/blogs/python/97075/"&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 class="entry-title single-entry-title"&gt;&lt;a href="http://habrahabr.ru/blogs/python/97075/"&gt;&lt;span class="topic" title="http://habrahabr.ru/blogs/python/97075/"&gt;Полное покрытие кода&lt;/span&gt;&lt;/a&gt;                                   &lt;/h2&gt;&lt;div class="content"&gt;Нужно ли делать полное покрытие кода тестами — довольно-таки частая и  неоднозначная тема при обсуждении юнит-тестирования. Хотя большинство  разработчиков склоняются к тому, что делать его не надо, что это  неэффективно и бесполезно, я придерживаюсь противоположного мнения  (по-крайней мере, при разработке на Python). В данной статье я приведу  пример, как делать полное покрытие кода, и опишу недостатки и  преимущества полного покрытия на основе своего опыта разработки.&lt;br /&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=1919392632262582347&amp;amp;postID=8866438406461988000" name="habracut"&gt;&lt;/a&gt;&lt;br /&gt;&lt;h4&gt;Инструмент тестирования nose&lt;/h4&gt;&lt;br /&gt;Для юнит-тестирования и сбора статистики мы используем &lt;a href="http://somethingaboutorange.com/mrl/projects/nose/"&gt;nose&lt;/a&gt;. Его преимущества по сравнению с другими средствами:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Не надо писать дополнительный код для обвязки юнит-тестов&lt;/li&gt;&lt;li&gt;Встроенные средства для метрик, в частности для вычисления процента покрытия&lt;/li&gt;&lt;li&gt;Совместимость с Python 3 (бранч py3k на &lt;a href="http://code.google.com/p/python-nose/source/checkout"&gt;google code&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Установка nose проблем вызвать не должна — он ставится через  easy_install, есть в большинстве Linux-репозиториев или может просто  устанавливаться из исходников. Для Python 3 необходимо сделать клон  ветки py3k и проинсталлировать из исходников.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Изначальный пример кода&lt;/h4&gt;&lt;br /&gt;Тестироваться будет расчет факториала:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;span style="color: #408080;"&gt;&lt;i&gt;#!/usr/bin/env&amp;nbsp;python&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;operator&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;factorial&lt;/span&gt;(n):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;&amp;lt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;0&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;raise&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #d2413a;"&gt;&lt;b&gt;ValueError&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;"Factorial&amp;nbsp;can't&amp;nbsp;be&amp;nbsp;calculated&amp;nbsp;for&amp;nbsp;negative&amp;nbsp;numbers."&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;type&lt;/span&gt;(n)&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;is&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;float&lt;/span&gt;&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;or&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;type&lt;/span&gt;(n)&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;is&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;complex&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;raise&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #d2413a;"&gt;&lt;b&gt;TypeError&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;"Factorial&amp;nbsp;doesn't&amp;nbsp;use&amp;nbsp;Gamma&amp;nbsp;function."&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;==&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;0&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;1&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;reduce&lt;/span&gt;(operator&lt;span style="color: #666666;"&gt;.&lt;/span&gt;mul,&amp;nbsp;&lt;span style="color: green;"&gt;range&lt;/span&gt;(&lt;span style="color: #666666;"&gt;1&lt;/span&gt;,&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;1&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;__name__&amp;nbsp;&lt;span style="color: #666666;"&gt;==&lt;/span&gt;&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'__main__'&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;input&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;'Enter&amp;nbsp;the&amp;nbsp;positive&amp;nbsp;number:&amp;nbsp;'&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'{0}!&amp;nbsp;=&amp;nbsp;{1}'&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;format(n,&amp;nbsp;factorial(&lt;span style="color: green;"&gt;int&lt;/span&gt;(n)))&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;Код работает только на Python 2.6 и не совместим с Python 3. Код сохранен в файле &lt;i&gt;main.py&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Юнит-тесты&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;Начнем с простых тестов:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;unittest&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;from&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;main&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;factorial&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;TestFactorial&lt;/b&gt;&lt;/span&gt;(unittest&lt;span style="color: #666666;"&gt;.&lt;/span&gt;TestCase):&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_calculation&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertEqual(&lt;span style="color: #666666;"&gt;720&lt;/span&gt;,&amp;nbsp;factorial(&lt;span style="color: #666666;"&gt;6&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_negative&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertRaises(&lt;span style="color: #d2413a;"&gt;&lt;b&gt;ValueError&lt;/b&gt;&lt;/span&gt;,&amp;nbsp;factorial,&amp;nbsp;&lt;span style="color: #666666;"&gt;-1&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_float&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertRaises(&lt;span style="color: #d2413a;"&gt;&lt;b&gt;TypeError&lt;/b&gt;&lt;/span&gt;,&amp;nbsp;factorial,&amp;nbsp;&lt;span style="color: #666666;"&gt;1.25&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_zero&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertEqual(&lt;span style="color: #666666;"&gt;1&lt;/span&gt;,&amp;nbsp;factorial(&lt;span style="color: #666666;"&gt;0&lt;/span&gt;))&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;Эти тесты только проверяют функциональность. Покрытие кода — 83%:&lt;br /&gt;&lt;code&gt;$ nosetests --with-coverage --cover-erase&lt;br /&gt;....&lt;br /&gt;Name Stmts Exec Cover Missing&lt;br /&gt;-------------------------------------&lt;br /&gt;main 12 10 83% 16-17&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Ran 4 tests in 0.021s&lt;br /&gt;&lt;br /&gt;OK&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Добавим еще один класс для стопроцентного покрытия:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;span style="color: green;"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;TestMain&lt;/b&gt;&lt;/span&gt;(unittest&lt;span style="color: #666666;"&gt;.&lt;/span&gt;TestCase):&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;FakeStream&lt;/b&gt;&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;__init__&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;msgs&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;write&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;,&amp;nbsp;msg):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;msgs&lt;span style="color: #666666;"&gt;.&lt;/span&gt;append(msg)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;readline&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'5'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_use_case&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fake_stream&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;FakeStream()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;stdin&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;stdout&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;fake_stream&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;execfile&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;'main.py'&lt;/span&gt;,&amp;nbsp;{&lt;span style="color: #ba2121;"&gt;'__name__'&lt;/span&gt;:&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'__main__'&lt;/span&gt;})&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertEqual(&lt;span style="color: #ba2121;"&gt;'5!&amp;nbsp;=&amp;nbsp;120'&lt;/span&gt;,&amp;nbsp;fake_stream&lt;span style="color: #666666;"&gt;.&lt;/span&gt;msgs[&lt;span style="color: #666666;"&gt;1&lt;/span&gt;])&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;finally&lt;/b&gt;&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;stdin&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;__stdin__&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;stdout&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;__stdout__&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;Теперь код полностью покрыт тестами:&lt;br /&gt;&lt;code&gt;$ nosetests --with-coverage --cover-erase&lt;br /&gt;.....&lt;br /&gt;Name Stmts Exec Cover Missing&lt;br /&gt;-------------------------------------&lt;br /&gt;main 12 12 100% &lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Ran 5 tests in 0.032s&lt;br /&gt;&lt;br /&gt;OK&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;h4&gt;Выводы&lt;/h4&gt;&lt;br /&gt;Теперь, уже на основе реального кода, можно сделать какие-то выводы:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Первое и самое главное&lt;/b&gt; — полное покрытие кода не обеспечивает  полную проверку функциональности программы и не гарантирует ее  работоспособность. В данном примере не было тестов для проверки  комплексного типа аргумента, хотя и было обеспечено полное покрытие.&lt;/li&gt;&lt;li&gt;Полностью покрыть код можно, как минимум на Python. Да, необходимо  оперировать встроенными функциями и знать как работают те или иные  механизмы, но это реально, и стало еще проще в Python 3.&lt;/li&gt;&lt;li&gt;Python — динамически типизируемый язык программирования, и  юнит-тестирование помогает делать проверку типов. При полном покрытии  вероятность того, что типизация корректно соблюдена по всей программе,  намного выше.&lt;/li&gt;&lt;li&gt;Полное покрытие помогает при изменении API используемых библиотек и  при изменении самого языка программирования (см. пример для Python 3  далее). Т.к. гарантируется, что вызовется каждая строчка кода, все  несоотвествия кода и API будут обнаружены.&lt;/li&gt;&lt;li&gt;И как следствие из предыдущего пункта, полное покрытие помогает  тестировать код. Например, при работе на production-системе перед  интеграцией софта можно провести сначала его тестирование. Зачастую  нормальная отладка невозможна (скажем если нет прав на удаленной  системе, и всем занимается администратор), а юнит-тесты помогут понять,  где проблема.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h4&gt;Адаптация под Python 3&lt;/h4&gt;&lt;br /&gt;На примере адаптации под Python 3 я хочу показать, как полное покрытие  кода помогает в работе. Итак, сначала мы просто запускаем программу под  Python 3 и выдается ошибка синтаксиса:&lt;br /&gt;&lt;code&gt;$ python3 main.py&lt;br /&gt;File "main.py", line 17&lt;br /&gt;print '{0}! = {1}'.format(n, factorial(int(n)))&lt;br /&gt;^&lt;br /&gt;SyntaxError: invalid syntax&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Исправляем:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;span style="color: #408080;"&gt;&lt;i&gt;#!/usr/bin/env&amp;nbsp;python&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;operator&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;factorial&lt;/span&gt;(n):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;&amp;lt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;0&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;raise&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #d2413a;"&gt;&lt;b&gt;ValueError&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;"Factorial&amp;nbsp;can't&amp;nbsp;be&amp;nbsp;calculated&amp;nbsp;for&amp;nbsp;negative&amp;nbsp;numbers."&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;type&lt;/span&gt;(n)&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;is&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;float&lt;/span&gt;&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;or&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;type&lt;/span&gt;(n)&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;is&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;complex&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;raise&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #d2413a;"&gt;&lt;b&gt;TypeError&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;"Factorial&amp;nbsp;doesn't&amp;nbsp;use&amp;nbsp;Gamma&amp;nbsp;function."&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;==&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;0&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;1&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;reduce&lt;/span&gt;(operator&lt;span style="color: #666666;"&gt;.&lt;/span&gt;mul,&amp;nbsp;&lt;span style="color: green;"&gt;range&lt;/span&gt;(&lt;span style="color: #666666;"&gt;1&lt;/span&gt;,&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;1&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;__name__&amp;nbsp;&lt;span style="color: #666666;"&gt;==&lt;/span&gt;&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'__main__'&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;input&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;'Enter&amp;nbsp;the&amp;nbsp;positive&amp;nbsp;number:&amp;nbsp;'&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;'{0}!&amp;nbsp;=&amp;nbsp;{1}'&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;format(n,&amp;nbsp;factorial(&lt;span style="color: green;"&gt;int&lt;/span&gt;(n))))&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;Теперь программу можно запускать:&lt;br /&gt;&lt;code&gt;$ python3 main.py&lt;br /&gt;Enter the positive number: 0&lt;br /&gt;0! = 1&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Значит ли это, что программа рабочая? &lt;b&gt;Нет!&lt;/b&gt; Она рабочая только до вызова reduce, что нам и показывают тесты:&lt;br /&gt;&lt;code&gt;$ nosetests3&lt;br /&gt;E...E&lt;br /&gt;======================================================================&lt;br /&gt;ERROR: test_calculation (tests.TestFactorial)&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;File "/home/nuald/workspace/factorial/tests.py", line 9, in test_calculation&lt;br /&gt;self.assertEqual(720, factorial(6))&lt;br /&gt;File "/home/nuald/workspace/factorial/main.py", line 12, in factorial&lt;br /&gt;return reduce(operator.mul, range(1, n + 1))&lt;br /&gt;NameError: global name 'reduce' is not defined&lt;br /&gt;&lt;br /&gt;======================================================================&lt;br /&gt;ERROR: test_use_case (tests.TestMain)&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;File "/home/nuald/workspace/factorial/tests.py", line 38, in test_use_case&lt;br /&gt;execfile('main.py', {'__name__': '__main__'})&lt;br /&gt;NameError: global name 'execfile' is not defined&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Ran 5 tests in 0.010s&lt;br /&gt;&lt;br /&gt;FAILED (errors=2)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;В данном примере все это можно было обнаружить и ручным тестированием.  Однако на больших проектах только юнит-тестирование поможет обнаружить  такого рода ошибки. И только полное покрытие кода может гарантировать  что практически все несоответствия кода и API были устранены.&lt;br /&gt;&lt;br /&gt;Ну и собственно, рабочий код, полностью совместимый между Python 2.6 и Python 3:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;span style="color: #408080;"&gt;&lt;i&gt;#!/usr/bin/env&amp;nbsp;python&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;operator&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;from&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;functools&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;reduce&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;factorial&lt;/span&gt;(n):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;&amp;lt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;0&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;raise&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #d2413a;"&gt;&lt;b&gt;ValueError&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;"Factorial&amp;nbsp;can't&amp;nbsp;be&amp;nbsp;calculated&amp;nbsp;for&amp;nbsp;negative&amp;nbsp;numbers."&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;type&lt;/span&gt;(n)&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;is&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;float&lt;/span&gt;&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;or&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;type&lt;/span&gt;(n)&amp;nbsp;&lt;span style="color: #aa22ff;"&gt;&lt;b&gt;is&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;complex&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;raise&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #d2413a;"&gt;&lt;b&gt;TypeError&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;"Factorial&amp;nbsp;doesn't&amp;nbsp;use&amp;nbsp;Gamma&amp;nbsp;function."&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;==&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;0&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;1&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;reduce&lt;/span&gt;(operator&lt;span style="color: #666666;"&gt;.&lt;/span&gt;mul,&amp;nbsp;&lt;span style="color: green;"&gt;range&lt;/span&gt;(&lt;span style="color: #666666;"&gt;1&lt;/span&gt;,&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style="color: #666666;"&gt;1&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&amp;nbsp;__name__&amp;nbsp;&lt;span style="color: #666666;"&gt;==&lt;/span&gt;&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'__main__'&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;n&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;input&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;'Enter&amp;nbsp;the&amp;nbsp;positive&amp;nbsp;number:&amp;nbsp;'&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;print&lt;/b&gt;&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;'{0}!&amp;nbsp;=&amp;nbsp;{1}'&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;format(n,&amp;nbsp;factorial(&lt;span style="color: green;"&gt;int&lt;/span&gt;(n))))&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;sys&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;unittest&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;from&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;main&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/span&gt;&amp;nbsp;factorial&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;TestFactorial&lt;/b&gt;&lt;/span&gt;(unittest&lt;span style="color: #666666;"&gt;.&lt;/span&gt;TestCase):&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_calculation&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertEqual(&lt;span style="color: #666666;"&gt;720&lt;/span&gt;,&amp;nbsp;factorial(&lt;span style="color: #666666;"&gt;6&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_negative&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertRaises(&lt;span style="color: #d2413a;"&gt;&lt;b&gt;ValueError&lt;/b&gt;&lt;/span&gt;,&amp;nbsp;factorial,&amp;nbsp;&lt;span style="color: #666666;"&gt;-1&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_float&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertRaises(&lt;span style="color: #d2413a;"&gt;&lt;b&gt;TypeError&lt;/b&gt;&lt;/span&gt;,&amp;nbsp;factorial,&amp;nbsp;&lt;span style="color: #666666;"&gt;1.25&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_zero&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertEqual(&lt;span style="color: #666666;"&gt;1&lt;/span&gt;,&amp;nbsp;factorial(&lt;span style="color: #666666;"&gt;0&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;TestMain&lt;/b&gt;&lt;/span&gt;(unittest&lt;span style="color: #666666;"&gt;.&lt;/span&gt;TestCase):&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;&lt;b&gt;FakeStream&lt;/b&gt;&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;__init__&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;msgs&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;write&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;,&amp;nbsp;msg):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;msgs&lt;span style="color: #666666;"&gt;.&lt;/span&gt;append(msg)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;readline&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'5'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;def&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;test_use_case&lt;/span&gt;(&lt;span style="color: green;"&gt;self&lt;/span&gt;):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fake_stream&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;FakeStream()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;stdin&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;stdout&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;fake_stream&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj_code&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style="color: green;"&gt;compile&lt;/span&gt;(&lt;span style="color: green;"&gt;open&lt;/span&gt;(&lt;span style="color: #ba2121;"&gt;'main.py'&lt;/span&gt;)&lt;span style="color: #666666;"&gt;.&lt;/span&gt;read(),&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'main.py'&lt;/span&gt;,&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'exec'&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;exec&lt;/b&gt;&lt;/span&gt;(obj_code,&amp;nbsp;{&lt;span style="color: #ba2121;"&gt;'__name__'&lt;/span&gt;:&amp;nbsp;&lt;span style="color: #ba2121;"&gt;'__main__'&lt;/span&gt;})&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;self&lt;/span&gt;&lt;span style="color: #666666;"&gt;.&lt;/span&gt;assertEqual(&lt;span style="color: #ba2121;"&gt;'5!&amp;nbsp;=&amp;nbsp;120'&lt;/span&gt;,&amp;nbsp;fake_stream&lt;span style="color: #666666;"&gt;.&lt;/span&gt;msgs[&lt;span style="color: #666666;"&gt;1&lt;/span&gt;])&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;&lt;b&gt;finally&lt;/b&gt;&lt;/span&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;stdin&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;__stdin__&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;stdout&amp;nbsp;&lt;span style="color: #666666;"&gt;=&lt;/span&gt;&amp;nbsp;sys&lt;span style="color: #666666;"&gt;.&lt;/span&gt;__stdout__&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Тесты показывают полное покрытие и работоспособность программы под разными версиями Python:&lt;br /&gt;&lt;code&gt;$ nosetests --with-coverage --cover-erase&lt;br /&gt;.....&lt;br /&gt;Name Stmts Exec Cover Missing&lt;br /&gt;-------------------------------------&lt;br /&gt;main 13 13 100% &lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Ran 5 tests in 0.038s&lt;br /&gt;&lt;br /&gt;OK&lt;br /&gt;$ nosetests3 --with-coverage --cover-erase&lt;br /&gt;.....&lt;br /&gt;Name Stmts Miss Cover Missing&lt;br /&gt;-------------------------------------&lt;br /&gt;main 13 0 100% &lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;Ran 5 tests in 0.018s&lt;br /&gt;&lt;br /&gt;OK&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;h4&gt;Заключение&lt;/h4&gt;&lt;br /&gt;Полные покрытие кода — не панацея, которая может защитить от ошибок в  программе. Однако это инструмент, который надо знать и использовать.  Есть много преимуществ в полном покрытии, а недостаток по сути только  один — затраты времени и ресурсов на написание тестов. Но чем больше вы  будете писать тестов, тем проще они будут даваться вам в дальнейшем. В  наших проектах мы уже больше года обеспечиваем стопроцентное покрытие  кода, и хотя по началу было много проблем, сейчас уже покрыть полностью  код совершенно не составляет проблем, т.к. отрабатаны все методики и  написаны все нужные пакеты. Здесь нет никакой магии (хотя и придется  работать с магией Python-а), и нужно только начать.&lt;br /&gt;P.S. Полное покрытие обладает еще одним преимуществом, которое не совсем  однозначно, но несомненно важно для тех, кто считает себя  профессионалом — оно заставляет лезть внутрь Python-а и понимать как он  работает. Такого рода знание пригодится всем, особенно разработчикам  библиотек.          &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-8866438406461988000?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/8866438406461988000/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=8866438406461988000&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/8866438406461988000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/8866438406461988000'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/python-100-precent-covering-by-tests.html' title='Python. Полное покрытие кода'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-1812307925210385587</id><published>2010-08-02T01:05:00.011+03:00</published><updated>2010-09-04T01:15:22.403+03:00</updated><title type='text'>kvm на ubuntu 10.4 без головной боли</title><content type='html'>проверили есть ли поддержка виртуализации у проца &lt;br /&gt;&lt;pre class="prettyprint"&gt;egrep-С "(VMX | SVM) '/ Proc / cpuinfo&lt;/pre&gt;&lt;br /&gt;нужен ответ 1 или больше &lt;br /&gt;&lt;br /&gt;потом проверить включена ли виртуализация в БИОСе&lt;br /&gt;&lt;br /&gt;устанавливаемся&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install kvm virt-manager &amp;amp;&amp;amp; sudo adduser `id -un` libvirtd&lt;/pre&gt;&lt;br /&gt;разлогиниваемся&lt;br /&gt;&lt;br /&gt;и проверяем что получилось&lt;br /&gt;&lt;pre class="prettyprint"&gt;virsh -c qemu:///system list&lt;/pre&gt;&lt;br /&gt;ответ такой&lt;br /&gt;&lt;pre class="prettyprint"&gt;Id Name State&lt;br /&gt;----------------------------------&lt;/pre&gt;&lt;br /&gt;если нет необходимости показывать виртуалки миру - это последнее действие. если же нам надо показать это во внешний мир, то необходимо провести изменения в нашей сети и настройках созданных вирт машин, то меняем&lt;br /&gt;&lt;pre class="prettyprint"&gt;/etc/network/interfaces&lt;/pre&gt;&lt;br /&gt;в зависимости от того как нам необходимо есть варианты с созданием бриджа с автоопределением IP для вирт машин или со статическим&lt;br /&gt;авто&lt;br /&gt;&lt;pre class="prettyprint"&gt;auto lo&lt;br /&gt;iface lo inet loopback&lt;br /&gt;&lt;br /&gt;auto eth0&lt;br /&gt;iface eth0 inet manual&lt;br /&gt;&lt;br /&gt;auto br0&lt;br /&gt;iface br0 inet dhcp&lt;br /&gt;bridge_ports eth0&lt;br /&gt;bridge_stp off&lt;br /&gt;bridge_fd 0&lt;br /&gt;bridge_maxwait 0&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;статическое&lt;br /&gt;&lt;pre class="prettyprint"&gt;auto lo&lt;br /&gt;iface lo inet loopback&lt;br /&gt;&lt;br /&gt;auto eth0&lt;br /&gt;iface eth0 inet manual&lt;br /&gt;&lt;br /&gt;auto br0&lt;br /&gt;iface br0 inet static&lt;br /&gt;address 192.168.0.10&lt;br /&gt;network 192.168.0.0&lt;br /&gt;netmask 255.255.255.0&lt;br /&gt;broadcast 192.168.0.255&lt;br /&gt;gateway 192.168.0.1&lt;br /&gt;bridge_ports eth0&lt;br /&gt;bridge_stp off&lt;br /&gt;bridge_fd 0&lt;br /&gt;bridge_maxwait 0&lt;/pre&gt;&lt;br /&gt;перезагружаем сеть &lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo /etc/init.d/networking restart&lt;/pre&gt;&lt;br /&gt;теперь лезем к каждой машине которую мы создали через virt-manager&lt;br /&gt;&lt;pre class="prettyprint"&gt;cd /etc/libvirt/qemu&lt;/pre&gt;для каждого проводим замену в конфигах &lt;br /&gt;&lt;br /&gt;было&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;interface type="network"&amp;gt;&lt;br /&gt;................... &lt;br /&gt;&amp;lt;source network="default" /&amp;gt;&lt;br /&gt;...................&lt;br /&gt;&amp;lt;/interface&amp;gt;&lt;/pre&gt;&lt;br /&gt;надо&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;interface type="bridge"&amp;gt;&lt;br /&gt;.........&lt;br /&gt;&amp;lt;source bridge="br0" /&amp;gt;&lt;br /&gt;&amp;lt;/interface&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Источники&lt;br /&gt;&lt;br /&gt;https://help.ubuntu.com/community/KVM/Installation&lt;br /&gt;https://help.ubuntu.com/community/KVM/Networking&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Проблемы и решения &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;При клонировании системы пропадал сетевой интерефейс.&lt;br /&gt;Варварское удаление /etc/udev/rules.d/70-persistent-net.rules помогло ) &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.richart-consalt.ru/richart-consalt/index.php/%D0%A3%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BE%D1%88%D0%B8%D0%B1%D0%BE%D0%BA"&gt;Проблема сетевых интерфейсов&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-1812307925210385587?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/1812307925210385587/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=1812307925210385587&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/1812307925210385587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/1812307925210385587'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/08/kvm-on-ubuntu-104-wo-migraine.html' title='kvm на ubuntu 10.4 без головной боли'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-2293981310854233404</id><published>2010-07-31T00:35:00.003+03:00</published><updated>2010-07-31T03:06:46.738+03:00</updated><title type='text'>nginx rewrite rules делаем их правильно</title><content type='html'>Так как мы боремся за высокую производительность на чудесном веб сервере nginx, то мы не должны забывать про то, чтобы сделать наши конфиги еще чудеснне, в особенности в этом аспекте...&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;... но нас портит привычка от Апача &lt;br /&gt;Вот стандартная строка из.htaccess, которая перекочевала в новый конфиг:  &lt;br /&gt;&lt;pre class="prettyprint"&gt;RewriteCond  %{HTTP_HOST}  nginx.org&lt;br /&gt;RewriteRule  (.*)          http://www.nginx.org$1&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;вот в таком виде:&lt;br /&gt;&lt;pre class="prettyprint"&gt;server {&lt;br /&gt;    listen       80;&lt;br /&gt;    server_name  www.nginx.org  nginx.org;&lt;br /&gt;    if ($http_host = nginx.org) {&lt;br /&gt;        rewrite  (.*)  http://www.nginx.org$1;&lt;br /&gt;    }&lt;br /&gt;    ...&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Это неправильно, громоздко и неэффективно. &lt;br /&gt;Правильный путь заключается в определении отдельного сервера для nginx.org: &lt;br /&gt;&lt;pre class="prettyprint"&gt;server {&lt;br /&gt;    listen       80;&lt;br /&gt;    server_name  nginx.org;&lt;br /&gt;    rewrite   ^  http://www.nginx.org$request_uri?;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;server {&lt;br /&gt;    listen       80;&lt;br /&gt;    server_name  www.nginx.org;&lt;br /&gt;    ...&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Еще один пример, с обратной логикой: все, что не nginx.com и не www.nginx.com:&lt;br /&gt;&lt;pre class="prettyprint"&gt;RewriteCond  %{HTTP_HOST}  !nginx.com&lt;br /&gt;RewriteCond  %{HTTP_HOST}  !www.nginx.com&lt;br /&gt;RewriteRule  (.*)          http://www.nginx.com$1&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;а нужно делать вот так:  &lt;br /&gt;&lt;pre class="prettyprint"&gt;server {&lt;br /&gt;    listen       80;&lt;br /&gt;    server_name  nginx.com  www.nginx.com;&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;server {&lt;br /&gt;    listen       80 default_server;&lt;br /&gt;    server_name  _;&lt;br /&gt;    rewrite   ^  http://nginx.com$request_uri?;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Мутируем правила для Mongrel&lt;/h4&gt;Типичные Mongrel правила:  &lt;br /&gt;&lt;pre class="prettyprint"&gt;DocumentRoot /var/www/myapp.com/current/public&lt;br /&gt;&lt;br /&gt;RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f&lt;br /&gt;RewriteCond %{SCRIPT_FILENAME} !maintenance.html&lt;br /&gt;RewriteRule ^.*$ %{DOCUMENT_ROOT}/system/maintenance.html [L]&lt;br /&gt;&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} -f&lt;br /&gt;RewriteRule ^(.*)$ $1 [QSA,L]&lt;br /&gt;&lt;br /&gt;RewriteCond %{REQUEST_FILENAME}/index.html -f&lt;br /&gt;RewriteRule ^(.*)$ $1/index.html [QSA,L]&lt;br /&gt;&lt;br /&gt;RewriteCond %{REQUEST_FILENAME}.html -f&lt;br /&gt;RewriteRule ^(.*)$ $1/index.html [QSA,L]&lt;br /&gt;&lt;br /&gt;RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]&lt;/pre&gt;&lt;br /&gt;превращаем вот такое  &lt;br /&gt;&lt;pre class="prettyprint"&gt;location / {&lt;br /&gt;    root       /var/www/myapp.com/current/public;&lt;br /&gt;&lt;br /&gt;    try_files  /system/maintenance.html&lt;br /&gt;               $uri  $uri/index.html $uri.html&lt;br /&gt;               @mongrel;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;location @mongrel {&lt;br /&gt;    proxy_pass  http://mongrel;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Отсюдова &lt;br /&gt;&lt;a href="http://nginx.org/en/docs/http/converting_rewrite_rules.html"&gt;http://nginx.org/en/docs/http/converting_rewrite_rules.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-2293981310854233404?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/2293981310854233404/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=2293981310854233404&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2293981310854233404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2293981310854233404'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/07/nginx-rewrite-rules-do-it-right.html' title='nginx rewrite rules делаем их правильно'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-1752908901028808777</id><published>2010-07-25T01:17:00.005+03:00</published><updated>2010-09-05T12:33:16.085+03:00</updated><title type='text'>Известные ньюансы SEO для электронных магазинов</title><content type='html'>Надоело держать кучу вкладок в фоксе о  разных аспектах развития магазинов и их "раскрутки" - решил собрать все  дурные советы это в статье и давать линку тем кто любит задавать  вопрос, а как мне продавать в своем магазине так, чтобы не работать.&lt;br /&gt;Начнемс...&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;Как обычно начнем с дизайна - это обычно  самое болезненное ибо непонятно, какой он должен быть. И как обычно КО  нам подсказывает - он должен быть такой, чтобы в магазине продавались  товары которые там представлены. Кроме того дизайн имеет оборотную  сторону - это юзабилити (в совсем нерусских интернетах поговаривают, что  спецам этой проффесии &lt;strike&gt;бабло&lt;/strike&gt; деньги льются рекой), по  русски это называется удобство использования.&lt;br /&gt;Собственно к дизайну  у меня только одно замечание - ненапрягающий зрение - фиолетовый  офигенный цвет, только не на синем фоне.&lt;br /&gt;Все остальное все-таки  больше относится к удобству использования, те оформление должно быть:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;  блеклым настолько, чтобы выделить товары&lt;/li&gt;&lt;li&gt;размещение элементов должно дать покупателю полную информацию об  объекте покупки на одной странице и желательно без прокрутки и тп  махинаций&lt;/li&gt;&lt;li&gt;дайте всю возможную визуальную информацию о товаре - больше фоток,  видео, любительский обзор &lt;/li&gt;&lt;li&gt;покажите, что в вашем магазине есть поиск и он работает&lt;/li&gt;&lt;li&gt;фильтры, сортировка, выбор категорий приветствуются&lt;/li&gt;&lt;/ul&gt;Естесственно этот скромный набор без тестов на реальных  покупателях ничто, потому советую, наберите из своих друзей две  контрольных группы.&lt;br /&gt;Первой группе расскажите о товарах что вы  продаете (это будут специалисты): их классификацию, специфику  использования, ключевые параметры и тд.&lt;br /&gt;Вторую так и оставьте в  неведении (это будут рядовые покупатели).&lt;br /&gt;А потом дайте обеим  группам одинаковое задание: допустим приобрести несколько товаров из  разных каталогов&lt;br /&gt;Во время их поиска нужно проследить основные  пути, которые прошли ваши тестовые покупатели и попытаться максимально  сократить их.&lt;br /&gt;Идеальный вариант это продажа/покупка товара на  одной странице с минимумом заполнений с клавиатуры. Хотя если у вас  магазин для гиков, можете наоборот сделать полное управление с  клавиатуры.&lt;br /&gt;&lt;a href="http://goosh.org/"&gt;http://goosh.org/&amp;nbsp;&lt;/a&gt;&lt;br /&gt;Запомните,  заставлять покупателя делать, то что он не хочет - это бить себя ниже  пояса. Для непонятливых, не делайте обязательным регистрацию в магазине,  а если она необходима, делайте набор данных минимальным до потери  пульса - обычно електропочты хватит с головой. И не забывайте про &lt;a href="http://ru.wikipedia.org/wiki/OpenID"&gt;OpenID&lt;/a&gt;.&lt;br /&gt;Вобщем  будьте ближе к покупателю.&lt;br /&gt;&lt;br /&gt;Теперь о всяческих  раскрутках.&lt;br /&gt;Что обычно нам пытаются всучить под СЕО оптимизацией -  это максимизация популярности вашего магазина у поисковой системы.  Делается это правильным увеличением колличества ссылок на страницы  магазина. Впринципе это правильно, больше ссылок&amp;nbsp; - больше вариантов,  что покупатель прийдет к вам с какого-то ресурса, но проблема в том, что  большая часть ссылок, размещенная автоматическим способом, находятся в  таких местах, которые живые пользователи не часто бывают. Чаще такие  места обходят поисковые роботы и тп машины.&lt;br /&gt;Вобщем такие  манипуляции приведут вас к более высоким положениям в поисковой выдаче -  если вас по большей части находят через поисковики это оправдает себя.  Только учтите, платить прийдется всегда, в особенности если вы хотите  оставаться в топе по высокочастотным запросам. Учтите также, что платным  продвижением желательно заниматься, когда содержимое сайта максимально.&lt;br /&gt;&lt;br /&gt;А  что делать если пару тысяч денег еще нет для сео штучек?&lt;br /&gt;Идите в  народ по-старинке! Окупируйте форумы по тематике ваших товаров, сделайте  так чтобы темы пестрели вашими ТОЛКОВЫМИ советами. Сделайте блог и  освещайте в них новинки своего магазина, способы применения товаров и  тд, и тп.&lt;br /&gt;&lt;br /&gt;Если денег все еще нет, а поиграть с сео  все-таки охото. Сходите на &lt;a href="https://sites.google.com/site/webmasterhelpforum/ru/stati/rukovodstvo-po-poiskovoj-optimizacii-dla-nacinausih-ot-google"&gt;гугл-пособие&lt;/a&gt;  и&amp;nbsp;&lt;a href="http://help.yandex.ru/webmaster/?id=1108938"&gt;яндекс-пособие&lt;/a&gt;  для начинающих сеошников. Для успокоения души, можно прочитать статейку  о &lt;a href="http://habrahabr.ru/blogs/google/95833/"&gt;человеческом  подходе в фильтрации выдачи&lt;/a&gt; (&lt;a href="http://www.wired.com/magazine/2010/02/ff_google_algorithm/"&gt;оригинал&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Что  нужно сделать вне зависимости от того как вы выполнили предыдущие шаги -  начать наполнять сайт информацией, желательно полезной и просто  кровь-с-носа сделать sitemap для гугла и яндекса.&lt;br /&gt;&lt;br /&gt;И  просто начните ласково любить своих покупателей и они начнут любить вас!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ссылки  для тех кто любит сам почитать&lt;br /&gt;&lt;a href="http://habrahabr.ru/blogs/eCommerce/79348/"&gt;http://habrahabr.ru/blogs/eCommerce/79348/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://habrahabr.ru/blogs/eCommerce/68454/"&gt;http://habrahabr.ru/blogs/eCommerce/68454/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://secl.com.ua/article-vse-o-sozdanii-internet-magazina.html"&gt;http://secl.com.ua/article-vse-o-sozdanii-internet-magazina.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-1752908901028808777?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/1752908901028808777/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=1752908901028808777&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/1752908901028808777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/1752908901028808777'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/07/ecommerce-seo.html' title='Известные ньюансы SEO для электронных магазинов'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-7452017459879386757</id><published>2010-07-08T20:54:00.004+03:00</published><updated>2010-07-25T01:11:52.739+03:00</updated><title type='text'>Установка MongoDB на Ubuntu</title><content type='html'>&lt;a href="http://wiki.mediatemple.net/w/Installing_MongoDB_on_Ubuntu"&gt; &lt;/a&gt;&lt;br /&gt;Процесс проверен на 10.4.&lt;br /&gt;В конце статьи скрипт для быстрой установки.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;Данные инструкции работают с &lt;a href="http://www.ubuntu.com/" title="http://www.ubuntu.com"&gt;Ubuntu&lt;/a&gt; Karmic (9.10) и Lucid (10.04). Про 8.04 говорили на группе, что когда нибудь... возможно будет...  &lt;br /&gt;Новейшая версия на момент написания этой статьи (2010-06-10) предназначена для Lucid. Мы рекомендуем использовать релиз под 10.4, тк он будет иметь самые последние версии продукта, да и использовать из репозитариев его будет легко. &lt;br /&gt;Последовательность наших действий, чтобы все заработало.  &lt;br /&gt;&lt;ul&gt;&lt;li&gt; Установить 10gen цифровую подпись &lt;/li&gt;&lt;li&gt; Настройка 10gen apt хранилища &lt;/li&gt;&lt;li&gt; Установите драйверы для вашего языка по авшему усмотрению &lt;/li&gt;&lt;/ul&gt;Добрые люди (видимо посыл к Иегошуа) на 10gen сделали первые два шага элементарными. &lt;br /&gt;Во-первых, зайдите на свой сервер по SSH в качестве root. &lt;br /&gt;Затем выполните следующие команды из командной строки для импорта 10gen цифровой подписи:   &lt;br /&gt;&lt;pre class="prettyprint"&gt;apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10&lt;br /&gt;&lt;/pre&gt;Это гарантирует, что программное обеспечение, которое вы  скачиваете на самом деле программное обеспечение опубликованное 10gen. Далее, нам необходимо установить 10gen репозиторий программного обеспечения в системе. &lt;br /&gt;Ubuntu Lucid 10.4:   &lt;br /&gt;&lt;pre class="prettyprint"&gt;echo "deb http://downloads.mongodb.org/distros/ubuntu 10.4 10gen" &amp;gt;&amp;gt; /etc/apt/sources.list.d/10gen.list&lt;br /&gt;&lt;/pre&gt;Ubuntu Karmic 9.10:   &lt;br /&gt;echo "deb http://downloads.mongodb.org/distros/ubuntu 9.10 10gen" &amp;gt;&amp;gt; /etc/apt/sources.list.d/10gen.list&lt;br /&gt;Теперь, чтобы действительно установить базу данных MongoDB (стабильную ветку), выполните следующие команды:&lt;br /&gt;&lt;pre class="prettyprint"&gt;apt-get update &amp;amp;&amp;amp; apt-get -y install mongodb-stable&lt;br /&gt;&lt;/pre&gt;Это позволит установить текущий стабильный релиз MongoDB, наряду со стандартными утилиты, как и mongodump и mongostat на вашем сервере. Если вы хотите установить нестабильную (dev) ветку или nightly snapshot релиз, вы можете использовать следующие команды:   &lt;br /&gt;&lt;pre class="prettyprint"&gt;apt-get -y install mongodb-unstable&lt;br /&gt;&lt;br /&gt; apt-get -y install mongodb-snapshot&lt;br /&gt;&lt;/pre&gt;Если все сделано правильно, то написа в ком строке mongo вы получите, что-то похожее:&lt;br /&gt;&lt;pre class="prettyprint"&gt;MongoDB shell version: 1.4.3&lt;br /&gt; url: test&lt;br /&gt; connecting to: test&lt;br /&gt; type "help" for help&lt;br /&gt; &amp;gt;&lt;br /&gt;&lt;/pre&gt;, то вы успешно установили MongoDB! (Нажмите Ctrl-D, чтобы выйти из оболочки Монго). Вы, возможно, также хотели бы устанавливать драйвера для вашего языка, чтобы можно было создавать приложения, используя Mongo.  Драйверы настоящее время доступны для &lt;a href="http://www.perl.org/" title="http://www.perl.org"&gt;Perl&lt;/a&gt;, &lt;a href="http://www.php.net/" title="http://www.php.net"&gt;PHP&lt;/a&gt; и &lt;a href="http://www.python.org/" title="http://www.python.org"&gt;Python&lt;/a&gt;.&lt;br /&gt;http://www.mongodb.org/display/DOCS/Drivers &lt;br /&gt;В настоящее время для &lt;a href="http://www.ruby-lang.org/" title="http://www.ruby-lang.org"&gt;Ruby&lt;/a&gt; нет пакетов из-за &lt;a href="http://pkg-ruby-extras.alioth.debian.org/rubygems.html" title="http://pkg-ruby-extras.alioth.debian.org/rubygems.html"&gt;&lt;/a&gt;осложнений с упаковкой RubyGems. 10gen содержит инструкции по ручной установки этих драйверов. Для установки других драйверов, сначала установите пакет python-software-properties, который позволяет взаимодействовать с Ubuntu &lt;a href="https://launchpad.net/" title="HTTPS: / / launchpad.net"&gt;Launchpad&lt;/a&gt; платформой.   &lt;br /&gt;&lt;pre class="prettyprint"&gt;apt-get -y install python-software-properties&lt;br /&gt;&lt;/pre&gt;Затем добавьте репозиторий mongodb драйверов.&lt;br /&gt;&lt;pre class="prettyprint"&gt;add-apt-repository ppa:chris-lea/mongodb-drivers&lt;br /&gt;&lt;/pre&gt;Команда установит ключ и запись репозитория. Чтобы установить драйвера для всех 3-х языков, используйте следующую команду.   &lt;br /&gt;&lt;pre class="prettyprint"&gt;apt-get update &amp;amp;&amp;amp; apt-get -y install libmongodb-perl php5-mongo python-mongodb&lt;br /&gt;&lt;/pre&gt;Теперь усё гатово!&lt;br /&gt;Получать! = Enjoy! &lt;br /&gt;&lt;br /&gt;Обещанный скриптик быстрой установки&lt;br /&gt;можно исполнять НЕ из-под рута&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 &amp;amp;&amp;amp; echo "deb http://downloads.mongodb.org/distros/ubuntu 10.4 10gen" &amp;gt;&amp;gt; sudo /etc/apt/sources.list.d/10gen.list &amp;amp;&amp;amp; sudo apt-get update &amp;amp;&amp;amp; sudo apt-get -y install mongodb-stable &amp;amp;&amp;amp; sudo apt-get -y install python-software-properties &amp;amp;&amp;amp; sudo add-apt-repository ppa:chris-lea/mongodb-drivers &amp;amp;&amp;amp; sudo apt-get update &amp;amp;&amp;amp; sudo apt-get -y install libmongodb-perl php5-mongo python-mongod&lt;br /&gt;b&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://wiki.mediatemple.net/w/Installing_MongoDB_on_Ubuntu"&gt;Source  - Installing_MongoDB_on_Ubuntu&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-7452017459879386757?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/7452017459879386757/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=7452017459879386757&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/7452017459879386757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/7452017459879386757'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/07/mongodb-ubuntu.html' title='Установка MongoDB на Ubuntu'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-3798572556299777284</id><published>2010-07-01T10:50:00.011+03:00</published><updated>2010-07-08T21:23:19.289+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code hightlight'/><title type='text'>Подсветка кода на blogger.com</title><content type='html'>Отечественный вариант подсветки&amp;nbsp;&lt;a href="http://softwaremaniacs.org/soft/highlight/"&gt;highlight.js&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Делается так&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;script src="http://softwaremaniacs.org/js/highlight.js" type="text/javascript"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;initHighlightingOnLoad();&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Стили можно подсмотреть в архиве, если лень, то вот минимальный набор для подсветки&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;.comment {&lt;br /&gt;color: gray;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.keyword {&lt;br /&gt;font-weight: bold;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.html .atribute .value {&lt;br /&gt;color: green;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Свой код надо вставить вот в такое&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Гугловский вариант&lt;br /&gt;&lt;a href="http://code.google.com/p/google-code-prettify/"&gt;ссылка на проект google-code-prettify&lt;/a&gt;&lt;br /&gt;&lt;a href="http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html"&gt;посмотреть как работает можно тут&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;В head необходимо включить следующий код&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;link href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css" type="text/css" rel="stylesheet" /&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"&amp;gt;  &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Дописать следующее в body&lt;br /&gt;&lt;pre class="prettyprint"&gt;...&lt;br /&gt;&amp;lt;body onload='prettyPrint()'&amp;gt;&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Ну и собственно оформить код в таком стиле&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;pre class="prettyprint"&amp;gt;&lt;br /&gt;... # Your code goes here&lt;br /&gt;&amp;lt;/pre&amp;gt;&lt;/pre&gt;&lt;br /&gt;В ходе написания выяснилось, что парсер неверно истолковывает html-теги, и единственным найденным способом есть только преобразование в esc-последовательность&amp;nbsp;&lt;a href="http://www.accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php"&gt;данным парсером&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ну и обычные приколы, когда код не влазит по ширине (((&lt;br /&gt;UPD&lt;br /&gt;вселенсокое зло побеждено )&lt;br /&gt;теперь усе взлазит.&lt;br /&gt;перед &amp;lt;/head&amp;gt; вставляем&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;style&amp;gt;pre.prettyprint{width:494px;white-space:pre-wrap}  &amp;lt;/style&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-3798572556299777284?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/3798572556299777284/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=3798572556299777284&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3798572556299777284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/3798572556299777284'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/07/bloggercom.html' title='Подсветка кода на blogger.com'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-2776783783450684282</id><published>2010-01-24T01:05:00.000+02:00</published><updated>2010-01-24T01:05:56.284+02:00</updated><title type='text'></title><content type='html'>по мотивам&lt;br /&gt;&lt;a href="http://www.howtoforge.org/davfs_ubuntu"&gt;http://www.howtoforge.org/davfs_ubuntu&lt;/a&gt;&lt;br /&gt;&lt;a href="http://linux.die.net/man/8/mount.davfs"&gt;http://linux.die.net/man/8/mount.davfs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Get DAVfs working on (X)ubuntu&lt;/h1&gt;&lt;br /&gt;What is DAVfs? DAVfs is a program that can mount a WebDAV location to your filesystem. You can then access it as if it were just another partition on your hard disk. WebDAV is an extension to the http protocol to allow other file operations than just GET and POST. As WebDAV can run with https, it can be used as a secure way to access the files of your homepage or even as a remote hard disk.&lt;br /&gt;&lt;br /&gt;I struggled way too long to get DAVfs to work on Xubuntu 7.04. My provider offers a so-called "virtual harddisk", and even after following all documentation on the net, I could not write to it. In solving the problem, I did not encounter any Xfce-dependent actions, so it probably holds for other ubuntu distros as well. Probably even for Debian.&lt;br /&gt;Here's how I did it:&lt;br /&gt;&lt;br /&gt;First, install the davfs2 package using synaptic&lt;br /&gt;&lt;br /&gt;Next, determine which group of users is allowed to mount the WebDAV locations. By default, this is the group users. Make sure your normal linux user is a member of this group. At the command line (yes, open a terminal window), type:&lt;br /&gt;&lt;br /&gt;sudo dpkg-reconfigure davfs2&lt;br /&gt;&lt;br /&gt;Answer Yes if you want to be able to mount the location as an ordinary user. Next, you have to state which group is allowed to do so. As we have just decided that, fill it in here.&lt;br /&gt;&lt;br /&gt;Now create a mount point in /etc/fstab:&lt;br /&gt;&lt;br /&gt;sudo nano /etc/fstab&lt;br /&gt;&lt;br /&gt;Add a line to state where you want to mount what location. If the location is https://dav.example.com/vdrive and you want to mount it to ~/mnt/vdrive, add the following line:&lt;br /&gt;&lt;br /&gt;https://dav.example.com/vdrive /home/&lt;your linux user name&gt;/mnt/vdrive davfs rw,user,noauto 0 0&lt;br /&gt;Repairing things that could be wrong&lt;br /&gt;Missing template files&lt;br /&gt;&lt;br /&gt;This should be enough to be able to mount the location. However, it is probably not. The first thing that can go wrong is the wrong location of the template files. Let's check it. The files davfs2.conf.template and secrets.template should exist in the directory /usr/share/doc/davfs2&lt;br /&gt;&lt;br /&gt;If they don't, they are one directory deeper: in /usr/share/doc/davfs2/examples. The configuration file is also zipped. To correct this situation, type at the command line:&lt;br /&gt;&lt;br /&gt;cd /usr/share/doc/davfs2/examples/&lt;br /&gt;sudo cp * ..&lt;br /&gt;cd ..&lt;br /&gt;sudo gunzip davfs2.conf.template.gz&lt;br /&gt;The above entered group is not configured&lt;br /&gt;&lt;br /&gt;Before we continue, check if the file /etc/davfs2/davfs2.conf contains the right group:&lt;br /&gt;&lt;br /&gt;sudo nano /etc/davfs2/davfs2.conf&lt;br /&gt;&lt;br /&gt;The line we are looking for looks like:&lt;br /&gt;&lt;br /&gt;dav_group users&lt;br /&gt;&lt;br /&gt;If the wrong group name is given here, or even "$group", correct it here.&lt;br /&gt;I/O Errors on writing&lt;br /&gt;&lt;br /&gt;Now, try to mount the WebDAV location. Type:&lt;br /&gt;&lt;br /&gt;cd&lt;br /&gt;mount mnt/vdrive&lt;br /&gt;&lt;br /&gt;After having typed your username and password of the WebDAV service, the WebDAV location should now be mounted. Try to get a directory listing and see if it works. If all works well, try to create a file (with the touch command or with nano). You may now get an I/O Error without further explanation. This can be solved by switching off file locking.&lt;br /&gt;&lt;br /&gt;To do this, first unmount the location again:&lt;br /&gt;&lt;br /&gt;umount ~/mnt/vdrive&lt;br /&gt;&lt;br /&gt;Because we repaired the templates, there should be a directory .davfs2 in your home directory. It contains davfs2.conf. Edit it and change the line #use_locks 1 to use_locks 0 and save the file.&lt;br /&gt;&lt;br /&gt;Now you should be able to mount it again and save files.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mount.davfs(8) - Linux man page&lt;br /&gt;Name&lt;br /&gt;&lt;br /&gt;mount.davfs - Mount a WebDAV resource in a directory&lt;br /&gt;Synopsis&lt;br /&gt;&lt;br /&gt;mount.davfs [-h | --help] [-V | --version]&lt;br /&gt;mount {dir | webdavserver}&lt;br /&gt;SYNOPSIS (root only)&lt;br /&gt;&lt;br /&gt;mount -t davfs [-o option[,...]]webdavserver dir&lt;br /&gt;mount.davfs [-o option[,...]] webdavserver dir&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;mount.davfs allows you to mount the WebDAV resource identified by webdavserver into the local filesystem at dir. WebDAV is an extension to HTTP that allows remote, collaborative authoring of Web resources, defined in RFC 2518. mount.davfs is part of davfs2.&lt;br /&gt;&lt;br /&gt;davfs2 allows documents on a remote Web server to be edited using standard applications. For example, a remote Web site could be updated in-place using the same development tools that initially created the site. Or you may use a WebDAV resource for documents you want to access and edited from different locations.&lt;br /&gt;&lt;br /&gt;davfs2 supports TLS/SSL (if the neon library supports it) and proxies. mount.davfs runs as a daemon in userspace. It integrates into the virtual file system by either the coda or the fuse kernel files system. Currently CODA_KERNEL_VERSION 2, CODA_KERNEL_VERSION 3, FUSE_KERNEL_VERSION 5 and FUSE_KERNEL_VERSION 7 are supported.&lt;br /&gt;&lt;br /&gt;mount.davfs is usually invoked by the mount(8) command when using the -t davfs option. After mounting it runs as a daemon. To unmount the umount(8) command is used.&lt;br /&gt;&lt;br /&gt;webdavserver must be a complete url, including scheme, fully qualified domain name and path. Scheme may be http or https. If the path contains spaces or other characters, that might be interpreted by the shell, the url must be enclosed in double quotes (e.g. "http://foo.bar/name with spaces"). See URLS AND MOUNT POINTS WITH SPACES.&lt;br /&gt;&lt;br /&gt;dir is the mountpoint where the WebDAV resource is mounted on. It may be an absolute or relative path.&lt;br /&gt;&lt;br /&gt;fstab may be used to define mounts and mount options as usual. In place of the device the url of the WebDAV server must be given. There must not be more than one entry in fstab for every mountpoint.&lt;br /&gt;Options&lt;br /&gt;&lt;br /&gt;-V --version&lt;br /&gt;    Output version. &lt;br /&gt;-h --help&lt;br /&gt;    Print a help message. &lt;br /&gt;-o&lt;br /&gt;    A comma-separated list defines mount options to be used. Available options are: &lt;br /&gt;[no]askauth&lt;br /&gt;    (Do not) ask interactivly for creditentials for the WebDAV server or the proxy if they are not found in the secrets file.&lt;br /&gt;    Default: askauth.&lt;br /&gt;    Deprecated: This option may be removed in future versions. Use option ask_auth in the /etc/davfs2/davfs2.conf or ~/.davfs2/davfs2.conf instead. &lt;br /&gt;[no]auto&lt;br /&gt;    Can (not) be mounted with mount -a.&lt;br /&gt;    Default: auto. &lt;br /&gt;conf=absolute path&lt;br /&gt;    An alternative user configuration file. This option is intended for cases where the default user configuration file in the users home directory can not be used.&lt;br /&gt;    Default: ~/.davfs2/davfs2.conf &lt;br /&gt;[no]dev&lt;br /&gt;    (Do not) interpret character or block special devices on the file system. This option is only included for compatibility with the mount(8) program. It will allways be set to nodev &lt;br /&gt;dir_mode=mode&lt;br /&gt;    The default mode bits for directories in the mounted file system. Value given in octal. s-bits for user and group are allways silently ignored.&lt;br /&gt;    Default: calculated from the umask of the mounting user; an x-bit is associated to every r-bit in u-g-o. &lt;br /&gt;[no]exec&lt;br /&gt;    (Do not) allow execution of any binaries on the mounted file system.&lt;br /&gt;    Default: exec. (When mounting as an ordinary user, the mount(8) program will set the default to noexec.) &lt;br /&gt;file_mode=mode&lt;br /&gt;    The default mode bits for files in the mounted file system. Value given in octal. s-bits for user and group are allways silently ignored.&lt;br /&gt;    Default: calculated from the umask of the mounting user; no x-bits are set for files. &lt;br /&gt;gid=group&lt;br /&gt;    The group the mounted file system belongs to. It may be a numeric ID or a group name. The mounting user, if not root, must be member of this group.&lt;br /&gt;    Default: the primary group of the mounting user. &lt;br /&gt;[no]locks&lt;br /&gt;    (Do not) lock files on the WebDAV server.&lt;br /&gt;    Default: locks.&lt;br /&gt;    Deprecated: This option may be removed in future versions. Use option use_locks in the /etc/davfs2/davfs2.conf or ~/.davfs2/davfs2.conf instead. &lt;br /&gt;[no]_netdev&lt;br /&gt;    The file system needs a network connection for operation. This information allows the operating system to handle the file system properly at system start and when the network is shut down.&lt;br /&gt;    Default: _netdev &lt;br /&gt;ro&lt;br /&gt;    Mount the file system read-only.&lt;br /&gt;    Default: rw. &lt;br /&gt;rw&lt;br /&gt;    Mount the file system read-write.&lt;br /&gt;    Default: rw. &lt;br /&gt;[no]suid&lt;br /&gt;    Do not allow set-user-identifier or set-group-identifier bits to take effect. This option is only included for compatibility with the mount program. It will allways be set to nosuid. &lt;br /&gt;[no]user&lt;br /&gt;    (Do not) allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. Option user implies the options noexec, nosuid and nodev (unless overridden by subsequent options). This option makes only sense when set in fstab.&lt;br /&gt;    Default: ordinary users are not allowed to mount. &lt;br /&gt;[no]useproxy&lt;br /&gt;    (Do not) use a proxy.&lt;br /&gt;    Default: useproxy, if a proxy is specified.&lt;br /&gt;    Deprecated: This option may be removed in future versions. Use option ask_proxy in the /etc/davfs2/davfs2.conf or ~/.davfs2/davfs2.conf instead. &lt;br /&gt;uid=user&lt;br /&gt;    The owner of the mounted file system. It may be a numeric ID or a user name. Only when mounted by root, this may be different from the mounting user.&lt;br /&gt;    Default: ID of the mounting user.&lt;br /&gt;&lt;br /&gt;Security Policy&lt;br /&gt;&lt;br /&gt;mount.davfs needs root privileges for mounting. But running a daemon, that is connected to the internet, with root privileges is a security risk. So mount.davfs will change its uid and gid when entering daemon mode.&lt;br /&gt;&lt;br /&gt;    When invoked by root mount.davfs will run as user davfs2 and group davfs2.&lt;br /&gt;&lt;br /&gt;    When invoked by an ordinary user it will run with the id of this user and with group davfs2.&lt;br /&gt;&lt;br /&gt;As the file system may be mounted over an insecure internet connection, this increases the risk that malicious content may be included in the file system. So mount.davfs is slightly more restrictive than mount(8).&lt;br /&gt;&lt;br /&gt;    Options nosuid and nodev will always be set; even root can not change this.&lt;br /&gt;&lt;br /&gt;    For ordinary users to be able to mount, they must be member of group davfs2 and there must be an entry in fstab.&lt;br /&gt;&lt;br /&gt;    When mounted by an ordinary user, the mount point must not lie within the home directory of another user.&lt;br /&gt;&lt;br /&gt;    If in fstab option uid and/or gid are given, an ordinary user can only mount, if her uid is the one given in option uid and he belongs to the group given in option gid.&lt;br /&gt;&lt;br /&gt;WARNING: If root allows an ordinary user to mount a file system (using fstab) this includes the permission to read the associated credentials from /etc/davfs2/secrets as well as the private key of the associated client certificate and the mounting user may get access to this information. You should only do this, if you might as well give this information to the user directly.&lt;br /&gt;Urls and Mount Points with Spaces&lt;br /&gt;&lt;br /&gt;Special characters like spaces in pathnames are a mess. They are interpreted differently by different programs and protocols, and there are different rules for escaping.&lt;br /&gt;&lt;br /&gt;In fstab spaces must be replaced by a three digit octal escape sequence. Write http://foo.bar/pathrs040withrs040spaces instead of http://foo.bar/path with spaces. It might also be necessary to replace the '#'-character by rs043. Note: In earlier versions of davfs2, HTTP-escaping was suggested. This is no longer valid.&lt;br /&gt;&lt;br /&gt;For the davfs2.conf and the secrets files please see the escape and quotation rules described in the davfs2.conf man page.&lt;br /&gt;&lt;br /&gt;On command line you must obey the escaping rules of the shell.&lt;br /&gt;&lt;br /&gt;After escaping and quotation have been removed by the respective program, the url and mount point must resolve to exactly the same string, whether they are taken from fstab, davfs2.conf, secrets or the command line.&lt;br /&gt;Caching&lt;br /&gt;&lt;br /&gt;mount.davfs tries to reduce HTTP-trafic by caching and reusing data. Information about direcotries and files are held in memory, while downloaded files are cached on disk.&lt;br /&gt;&lt;br /&gt;mount.davfs will consider cached information about directories and file attributes valid for a configurable time and look up this information on the server only after this time has expired (or there is other evidence that this information is stale). So if somebody else creates or deletes files on the server it may take some time before the local file system reflects this.&lt;br /&gt;&lt;br /&gt;This will not affect the content of files and directory listings. Whenever a file is opened, the server is looked up for a newer version of the file. Please consult the manual davfs2.conf(5) to see how can you configure this according your needs.&lt;br /&gt;Locks, Lost Update Problem and Backup Files&lt;br /&gt;&lt;br /&gt;WebDAV introduced locks and mount.davfs uses them by default. This will in most cases prevent two people from changing the same file in parallel. But not allways:&lt;br /&gt;&lt;br /&gt;    You might have disabled locks in /etc/davfs2/davfs2.conf or ~/.davfs2/davfs2.conf.&lt;br /&gt;&lt;br /&gt;    The server might not support locks (they are not mandatory).&lt;br /&gt;&lt;br /&gt;    A bad connection might prevent mount.davfs from refreshing the lock in time.&lt;br /&gt;&lt;br /&gt;    Another WebDAV-client might use your lock (that is not too difficult and might even happen without intention).&lt;br /&gt;&lt;br /&gt;mount.davfs will therefore allways check if the file has been changed on the the server before it uploads a new version. Unfortunately it has to do this in two separate HTTP requests, as not all servers support conditional PUT. If it finds it impossible to upload the locally changed file, it will store it in the local backup direcotry (lost+found). You should check this directory from time to time and decide what to do with this files.&lt;br /&gt;&lt;br /&gt;Sometimes locks held by some client on the server will not be released. Maybe the client crashes or the network connection fails. When mount.davfs finds a file locked on the server, it will check whether the lock is held by mount.davfs and the current user, and if so tries to reuse and release it. But this will not allways succeed. So servers should automatically release locks after some time, when they are not refreshed by the client.&lt;br /&gt;&lt;br /&gt;WebDAV allows to lock files that don't exist (to pretect the name when a client intends to create a new file). This locks will be displayed as files with size 0 and last modified date of 1970-01-01. If this locks are not released properly mount.davfs may not be able to access this files. You can use cadaver(1) &lt;http://www.webdav.org/cadaver/&gt; to remove this locks.&lt;br /&gt;File Owner and Permissions&lt;br /&gt;&lt;br /&gt;davfs2 implements Unix permissions for access control. But changing owner and permissions of a file is only local. It is intended as a means for the owner of the file system, to controll whether other local users may acces this file system.&lt;br /&gt;&lt;br /&gt;The server does not know about this. From the servers point of view there is just one user (identified by the credentials) connected. Another WebDAV-client, connected to the same server, is not affected by this local changes.&lt;br /&gt;&lt;br /&gt;There is one exeption: The execute bit on files is stored as a property on the sever. You may think of this property as an information about the type of file rather than a permission. Whether the file is executable on the local system is still controlled by mount options and local permissions.&lt;br /&gt;&lt;br /&gt;When the file system is unmounted, attributes of cached files (including owner and permissions) are stored in cache, as well as the attributs of the direcotries they are in. But there is no information stored about directories that do not contain cached files.&lt;br /&gt;Files&lt;br /&gt;&lt;br /&gt;/etc/davfs2/davfs2.conf&lt;br /&gt;    System wide configuration file. &lt;br /&gt;~/.davfs2/davfs2.conf&lt;br /&gt;    Configuration file in the users home directory.The user configuration takes precedence over the system wide configuration. If it does not exist, mount.davfs will will create a template file. &lt;br /&gt;/etc/davfs2/secrets&lt;br /&gt;    Holds the credentials for WebDAV servers and the proxy, as well as decryption passwords for client certificates. The file must be read-writable by root only. &lt;br /&gt;~/.davfs2/secrets&lt;br /&gt;    Holds credentials for WebDAV servers and proxy, as well as decryption passwords for client certificates. The file must be read-writable by the owner only. Credentials are allways first looked up in the home directory of the mounting user. If not found there the system wide secrets file is consulted. If no creditentials and passwords are found they are asked from the user interactively (if not disabled). If the file does not exist, mount.davfs will will create a template file. &lt;br /&gt;/etc/davfs2/certs&lt;br /&gt;    You may store trusted server certificates here, that can not be verified by use of the system wide CA-Certificates. This is useful when your server uses a selfmade certificate. You must configure the servercert option in /etc/davfs2/davfs2.conf or ~/.davfs2/davfs2.conf to use it. Certificates must be in PEM format.&lt;br /&gt;    Be sure to verify the certificate. &lt;br /&gt;~/.davfs2/certs&lt;br /&gt;    You may store trusted server certificates here, that can not be verified by use of the system wide CA-Certificates. This is useful when your server uses a selfmade certificate. You must configure the servercert option in ~/.davfs2/davfs2.conf to use it. Certificates must be in PEM format.&lt;br /&gt;    Be sure to verify the certificate. &lt;br /&gt;/etc/davfs2/certs/private&lt;br /&gt;    To store client certificates. Certificates must be in PKCS#12 format. You must configure the clientcert option in /etc/davfs2/davfs2.conf or ~/.davfs2/davfs2.conf to use it. This directory must be rwx by root only. &lt;br /&gt;~/.davfs2/certs/private&lt;br /&gt;    To store client certificates. Certificates must be in PKCS#12 format. You must configure the clientcert option in ~/.davfs2/davfs2.conf to use it. This directory must be rwx by the owner only. &lt;br /&gt;/var/run/mount.davfs&lt;br /&gt;    PID-files of running mount.davfs processes are stored there. This directory must belong to group davfs2 with write permissions for the group and the sticky-bit set (mode 1775). The PID-files are named after the mount point of the file system. &lt;br /&gt;/var/cache/davfs2&lt;br /&gt;    System wide directory for cached files. Used when the file system is mounted by root. It must belong do group davfs2 and read, write and execute bits for group must be set. There is a subdirectory for every mounted file system. The names of this subdirectories are created from url, mount point and user name. &lt;br /&gt;~/.davfs2/cache&lt;br /&gt;    Cache directory in the mounting users home directory. For every mounted WebDAV resource a subdirectory is created.&lt;br /&gt;&lt;br /&gt;mount.davfs will try to create missing directories, but it will not touch /etc/davfs2.&lt;br /&gt;Environment&lt;br /&gt;&lt;br /&gt;http_proxy&lt;br /&gt;    If no proxy is defined in the configuration files the value of this environment variable is used.&lt;br /&gt;&lt;br /&gt;Examples&lt;br /&gt;&lt;br /&gt;Non root user (e.g. filomena):&lt;br /&gt;&lt;br /&gt;To allow an ordinary user to mount there must be an entry in fstab&lt;br /&gt;&lt;br /&gt;    http://webdav.org/dav /media/dav davfs noauto,user 0 0&lt;br /&gt;&lt;br /&gt;If a proxy must be used this should be configured in /etc/davfs2/davfs2.conf or /home/filomena/.davfs2/davfs2.conf&lt;br /&gt;&lt;br /&gt;    proxy proxy.mycompany.com:8080&lt;br /&gt;&lt;br /&gt;Credentials are stored in /home/filomena/.davfs2/secrets&lt;br /&gt;&lt;br /&gt;    proxy.mycompany.com filomena "my secret"&lt;br /&gt;    http://webdav.org/dav webdav-username password&lt;br /&gt;&lt;br /&gt;Now the WebDAV resource may be mounted by user filomena invoking&lt;br /&gt;&lt;br /&gt;    mount /media/dav&lt;br /&gt;&lt;br /&gt;and unmounted by user filomena invoking&lt;br /&gt;&lt;br /&gt;    umount /media/dav&lt;br /&gt;&lt;br /&gt;Root user only:&lt;br /&gt;&lt;br /&gt;Mounts the resource https://asciigirl.com/webdav at mount point /mount/site, encrypting all traffic with SSL. Credentials for http://webdav.org/dav will be looked up in /etc/davfs2/secrets, if not found there the user will be asked.&lt;br /&gt;&lt;br /&gt;    mount -t davfs -o uid=otto,gid=users,mode=775 https://asciigirl.com/webdav /mount/site&lt;br /&gt;&lt;br /&gt;Mounts the resource http://linux.org.ar/repos at /dav.&lt;br /&gt;&lt;br /&gt;    mount.davfs -o uid=otto,gid=users,mode=775 http://linux.org.ar/repos/ /dav&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-2776783783450684282?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/2776783783450684282/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=2776783783450684282&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2776783783450684282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/2776783783450684282'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2010/01/httpwww.html' title=''/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1919392632262582347.post-237109722204525583</id><published>2009-12-14T23:53:00.000+02:00</published><updated>2010-01-26T22:49:15.028+02:00</updated><title type='text'>Стучимся к LiqPay</title><content type='html'>&lt;p&gt;Форма запросов&lt;/p&gt;&lt;p&gt;&amp;lt;form action="https://liqpay.com/?do=clickNbuy" method="POST" /&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;input type="hidden" name="operation_xml" value="PHJlcXVlc3Q+PHZlcnNpb24+MS4yPC92ZXJ=" /&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;input type="hidden" name="signature" value="6aogGWpJar6EVQ6AKTktJClt8gw=" /&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/form&amp;gt;&lt;/p&gt;&lt;p&gt;Запрос к liqpay&lt;/p&gt;&lt;p&gt;&amp;lt;request&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;version&amp;gt;1.2&amp;lt;/version&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;style&gt;    tr,td {border:#000 1px solid}    td{padding:5px}    &lt;/style&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;             &lt;td&gt;result_url&lt;/td&gt;             &lt;td&gt;страница на которую вернется ответ для клиента&lt;/td&gt;             &lt;td&gt;text&lt;/td&gt;             &lt;td&gt;http://&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;server_url&lt;/td&gt;             &lt;td&gt;страница на которую прийдет ответ от сервера&lt;/td&gt;             &lt;td&gt;text&lt;/td&gt;&lt;td&gt;http://&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;merchant_id&lt;/td&gt;             &lt;td&gt;ид продавца&lt;/td&gt;             &lt;td&gt;varchar(12)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;order_id&lt;/td&gt;             &lt;td&gt;ид списка покупок, исходит от магазина&lt;/td&gt;             &lt;td&gt;varchar(127)&lt;br /&gt;not "|" symbol&lt;/td&gt;             &lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;amount&lt;/td&gt;             &lt;td&gt;сумма покупки&lt;/td&gt;             &lt;td&gt;float(10.2)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;currency&lt;/td&gt;             &lt;td&gt;валюта покупки&lt;/td&gt;             &lt;td&gt;char(3)&lt;/td&gt;&lt;td&gt;EUR EUR UAH RUR USD&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;description&lt;/td&gt;             &lt;td&gt;коментарий, приходит не только в систему, но и на мобильный клиента.&lt;br /&gt;если быть совсем культурным то:&lt;br /&gt;70 кирилица&lt;br /&gt;160 латиница&lt;/td&gt;             &lt;td&gt;text&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;default_phone&lt;/td&gt;             &lt;td&gt;телефон, предположительно мерчанта&lt;/td&gt;             &lt;td&gt;varchar(13)&lt;br /&gt;/^[+]\d{12}$/&lt;/td&gt;&lt;td&gt;+380001234567&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;pay_way&lt;/td&gt;             &lt;td&gt;способ которым по умолчанию должен платить человек&lt;/td&gt;             &lt;td&gt;varchar(10)&lt;/td&gt;             &lt;td&gt;[liqpay,card] def = null&lt;/td&gt;         &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;/request&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Ответ отliqpay&lt;/p&gt;&lt;p&gt;&amp;lt;response&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;version&amp;gt;1.2&amp;lt;/version&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;             &lt;td&gt;action&lt;/td&gt;             &lt;td&gt;способ ответа&lt;/td&gt;             &lt;td&gt;text&lt;/td&gt;&lt;td&gt;result_url, server_url&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;merchant_id&lt;/td&gt;             &lt;td&gt;ид продавца&lt;/td&gt;             &lt;td&gt;varchar(12)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;order_id&lt;/td&gt;&lt;td&gt;ид списка покупок&lt;/td&gt;&lt;td&gt;Varchar(127) not «|» symbol&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;amount&lt;/td&gt;             &lt;td&gt;сумма покупки&lt;/td&gt;             &lt;td&gt;float(10.2)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;currency&lt;/td&gt;             &lt;td&gt;валюта покупки&lt;/td&gt;             &lt;td&gt;char(3)&lt;/td&gt;&lt;td&gt;EUR EUR UAH RUR USD&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;description&lt;/td&gt;             &lt;td&gt;коментарий, приходит не только в систему, но и на мобильный клиента.&lt;br /&gt;если быть совсем культурным то:&lt;br /&gt;70 кирилица&lt;br /&gt;160 латиница&lt;/td&gt;             &lt;td&gt;text&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;status&lt;/td&gt;             &lt;td&gt;статус транзакции&lt;/td&gt;             &lt;td&gt;varchar(10)&lt;/td&gt;&lt;td&gt;success&lt;br /&gt;failure — покупка отклонена&lt;br /&gt;wait_secure — платеж находится на проверке&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;code&lt;/td&gt;&lt;td&gt;код ошибки, уточняющий код ответа, пока не используется.&lt;/td&gt;&lt;td&gt;varchar(20)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;transaction_id&lt;/td&gt;             &lt;td&gt;ид транзакции в системе LiqPay, тип неизвестен&lt;/td&gt;             &lt;td&gt;varchar(15)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;pay_way&lt;/td&gt;             &lt;td&gt;способ которым оплатил покупатель&lt;/td&gt;             &lt;td&gt;varchar(10)&lt;/td&gt;&lt;td&gt;[card, liqpay] NOT NULL&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;             &lt;td&gt;sender_phone&lt;/td&gt;             &lt;td&gt;телефон оплативший заказ&lt;/td&gt;             &lt;td&gt;varchar(13)&lt;br /&gt;/^[+]\d{12}$/&lt;/td&gt;&lt;td&gt;+380001234567&lt;/td&gt;         &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;/request&amp;gt;&lt;/p&gt;&lt;br /&gt;для распарсивания приходящих сообщений товарищи из "системы" создали свю функцию хз зачем,хотя можно было использовать &lt;a href="http://php.net/manual/en/function.simplexml-load-string.php"&gt;simplexml-load-string&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1919392632262582347-237109722204525583?l=www.vygovsky.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.vygovsky.net/feeds/237109722204525583/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1919392632262582347&amp;postID=237109722204525583&amp;isPopup=true' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/237109722204525583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1919392632262582347/posts/default/237109722204525583'/><link rel='alternate' type='text/html' href='http://www.vygovsky.net/2009/12/liqpay.html' title='Стучимся к LiqPay'/><author><name>_b1</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_FN8K1pNziwE/TDhLCQVUR9I/AAAAAAAAABM/Gv6Wc4GgP-U/s1600-R/vlcsnap-7692076.png'/></author><thr:total>0</thr:total></entry></feed>
