<?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-1227041388185782445</id><updated>2012-02-18T08:34:20.751-08:00</updated><category term='matplotlib'/><category term='yahoo_finance'/><category term='reflection'/><category term='proxy'/><category term='tools'/><category term='admin'/><category term='smartcard'/><category term='web'/><category term='bug'/><category term='development'/><category term='decorator'/><category term='mandelbrot'/><category term='UI'/><category term='inversion_of_control'/><category term='algo'/><category term='disk'/><category term='http'/><category term='service'/><category term='mssql'/><category term='chrome'/><category term='GUI'/><category term='GTK'/><category term='power_law'/><category term='job'/><category term='fractal'/><category term='excel'/><category term='EMV'/><category term='agile'/><category term='python'/><category term='scipy'/><category term='text-editor'/><category term='browser'/><category term='vs2010'/><category term='graphing'/><category term='tcpip'/><category term='modelling'/><category term='email'/><category term='windows'/><category term='X100e'/><category term='code'/><category term='port'/><category term='dotnet'/><category term='review'/><category term='database'/><category term='linux'/><category term='Coding'/><category term='debug'/><category term='vba'/><category term='iburst'/><category term='xml'/><category term='emacs'/><category term='java'/><category term='mysql'/><category term='python yahoo finance client'/><category term='patterns'/><category term='os'/><category term='sqlite'/><category term='entrepreneurship'/><category term='oop'/><category term='DevExpress'/><category term='django'/><category term='direct-marketing'/><category term='blog'/><category term='config'/><category term='samples'/><category term='C#'/><category term='service_model'/><category term='bluetooth'/><category term='south-africa'/><category term='driversLicence'/><category term='sql'/><category term='WCF'/><category term='drivers'/><category term='food'/><category term='wpf'/><category term='html'/><category term='project_managment'/><category term='log4net'/><category term='exception'/><category term='fix'/><category term='network'/><category term='testing'/><category term='ubuntu'/><category term='postOffice'/><category term='ide'/><title type='text'>Clockwork Python</title><subtitle type='html'>python / linux / C#-dotNET / SQL(my, MS) / maths / data / logic / thought</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default?start-index=101&amp;max-results=100'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>157</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5810085335377458139</id><published>2012-02-17T12:39:00.000-08:00</published><updated>2012-02-18T08:22:26.179-08:00</updated><title type='text'>pyGForce - Force Directed Graphs in Python with NetWorkX and pyGTK</title><content type='html'>The latest little piece of handiwork that I would like to present is...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;PyGForce&lt;/span&gt; - a&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Force-based_algorithms_(graph_drawing)"&gt;force-directed graphing&lt;/a&gt; library that leverages current python technologies&lt;br /&gt;- &lt;a href="http://networkx.lanl.gov/"&gt;NetworkX &lt;/a&gt;python &lt;a href="http://en.wikipedia.org/wiki/Graph_theory"&gt;graph theory&lt;/a&gt; library&lt;br /&gt;- python wrapper for &lt;a href="http://www.gtk.org/"&gt;GTK&lt;/a&gt;, &lt;a href="http://www.pygtk.org/"&gt;pyGTK&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/davidbarkhuizen/pygforce"&gt;PyGForce&lt;/a&gt;&amp;nbsp;is available under &lt;a href="http://en.wikipedia.org/wiki/Git_(software)"&gt;GIT &lt;/a&gt;source control from the &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt;&lt;br /&gt;via HTTP -&amp;nbsp;https://github.com/davidbarkhuizen/pygforce.git&lt;br /&gt;via Anonymous GIT - git://github.com/davidbarkhuizen/pygforce.git&lt;br /&gt;&lt;br /&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/-QvUjUetALQM/Tz660dD6-GI/AAAAAAAAAII/r1LkPT8H31s/s1600/pygforce.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="417" src="http://3.bp.blogspot.com/-QvUjUetALQM/Tz660dD6-GI/AAAAAAAAAII/r1LkPT8H31s/s640/pygforce.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="font-size: small; text-align: -webkit-auto;"&gt;Basic Force-Directed Graph&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&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://2.bp.blogspot.com/-A1ocSgXGIzI/Tz_PUM0B4rI/AAAAAAAAAIQ/na-e9dz59YQ/s1600/pygforce.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="376" src="http://2.bp.blogspot.com/-A1ocSgXGIzI/Tz_PUM0B4rI/AAAAAAAAAIQ/na-e9dz59YQ/s640/pygforce.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="font-size: small; text-align: -webkit-auto;"&gt;And with Node Labelling&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;End.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5810085335377458139?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5810085335377458139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2012/02/pygforce-force-directed-graphs-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5810085335377458139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5810085335377458139'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2012/02/pygforce-force-directed-graphs-in.html' title='pyGForce - Force Directed Graphs in Python with NetWorkX and pyGTK'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-QvUjUetALQM/Tz660dD6-GI/AAAAAAAAAII/r1LkPT8H31s/s72-c/pygforce.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1559672776301952710</id><published>2012-01-28T02:06:00.000-08:00</published><updated>2012-01-28T02:06:46.335-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='smartcard'/><category scheme='http://www.blogger.com/atom/ns#' term='EMV'/><title type='text'>Aggregated APDU List</title><content type='html'>&lt;a href="http://web.archive.org/web/20090630004017/http://cheef.ru/docs/HowTo/APDU.info"&gt;Cheef's Grand APDU List&lt;/a&gt;Smartcard Selected InformationAPDU list&lt;br /&gt;&lt;pre&gt;#------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|ClaIns P1 P2|Lc Send Data            |Le  Recv Data           | Specification        | Description                    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    04                                                        | ISO 7816-9 6.3       | DEACTIVATE FILE                |&lt;br /&gt;| A0 04 00 00 00                                               | 3GPP TS 11.11        | INVALIDATE                     |&lt;br /&gt;| A0 04 00 00 00                                               | SAGEM SCT U34 6.15   | INVALIDATE                     |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 0D xx xx 08 xxxx xxxx xxxx xxxx                           | SAGEM SCT U34        | VERIFY TRANSPORT CODE          |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    0C                                                        | ISO 7816-4 7.3.6     | ERASE RECORD (S)               |&lt;br /&gt;| 80 0C 00 xx                          xx                      | SAGEM SCT U34 8.1.2  | CHECK (flash)                  |&lt;br /&gt;| 80 0C 01 xx                          xx                      | SAGEM SCT U34 8.1.2  | CHECK (EEPROM)                 |&lt;br /&gt;| 80 0C 02 xx                          xx                      | SAGEM SCT U34 8.1.2  | CHECK (checksum of file)       |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    0E                                                        | ISO 7816-4 8.2.4     | ERASE BINARY                   |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    10                                                        | ISO 7816-7           | PERFORM SCQL OPERATION         |&lt;br /&gt;| 00 10 00 80 xx table name, ...                               | ISO 7816-7 7.1       | CREATE TABLE                   |&lt;br /&gt;| 00 10 00 81 xx view name, table name                         | ISO 7816-7 7.2       | CREATE VIEW                    |&lt;br /&gt;| 00 10 00 82 xx dictionary name                               | ISO 7816-7 7.3       | CREATE DICTIONARY              |&lt;br /&gt;| 00 10 00 83 xx table name                                    | ISO 7816-7 7.4       | DROP TABLE                     |&lt;br /&gt;| 00 10 00 84 xx view or dictionary                            | ISO 7816-7 7.5       | DROP VIEW                      |&lt;br /&gt;| 00 10 00 85 xx privileges                                    | ISO 7816-7 7.6       | GRANT                          |&lt;br /&gt;| 00 10 00 86 xx privileges                                    | ISO 7816-7 7.7       | REVOKE                         |&lt;br /&gt;| 00 10 00 87 xx data                                          | ISO 7816-7 7.8       | DECLARE CURSOR                 |&lt;br /&gt;| 00 10 00 88                                                  | ISO 7816-7 7.9       | OPEN                           |&lt;br /&gt;| 00 10 00 89                                                  | ISO 7816-7 7.10      | NEXT                           |&lt;br /&gt;| 00 10 00 8A                          xx D, fixing N (columns)| ISO 7816-7 7.11      | FETCH                          |&lt;br /&gt;| 00 10 00 8B                          xx D, fixing N (columns)| ISO 7816-7 7.12      | FETCH NEXT                     |&lt;br /&gt;| 00 10 00 8C xx data                                          | ISO 7816-7 7.13      | INSERT                         |&lt;br /&gt;| 00 10 00 8D xx data                                          | ISO 7816-7 7.14      | UPDATE                         |&lt;br /&gt;| 00 10 00 8E                                                  | ISO 7816-7 7.15      | DELETE                         |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    12                                                        | ISO 7816-7           | PERFORM TRANSACTION OPERATION  |&lt;br /&gt;| 00 12 00 80                                                  | ISO 7816-7 8.2.1     | BEGIN                          |&lt;br /&gt;| 00 12 00 81                                                  | ISO 7816-7 8.2.2     | COMMIT                         |&lt;br /&gt;| 00 12 00 82                                                  | ISO 7816-7 8.2.3     | ROLLBACK                       |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    14                                                        | ISO 7816-7           | PERFORM USER OPERATION         |&lt;br /&gt;| 00 14 00 80 xx User ID, ...                                  | ISO 7816-7 9.2.1     | PRESENT USER                   |&lt;br /&gt;| 00 14 00 81 xx User ID, profile, ...                         | ISO 7816-7 9.2.2     | CREATE USER                    |&lt;br /&gt;| 00 14 00 82 xx User ID                                       | ISO 7816-7 9.2.3     | DELETE USER                    |&lt;br /&gt;| 80 14 xx xx 00                                               | GEMPLUS MPCOS-EMV    | Switch Protocol                |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 84 16 00 00 xx MAC                                           | VSDC                 | CARD BLOCK                     |&lt;br /&gt;| 80 16 0X 00 05 xxxx xxxx xx                                  | GEMPLUS MPCOS-EMV    | Freeze Access Conditions       |&lt;br /&gt;| 84 16 0X 00 08 xxxx xxxx xxxx xxxx                           | GEMPLUS MPCOS-EMV    | Freeze Access Conditions       |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 84 18 00 00 xx MAC                                           | VSDC                 | APPLICATION UNBLOCK            |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 84 1E 00 00 xx MAC                                           | VSDC                 | APPLICATION BLOCK              |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    20                                                        | ISO 7816-4 8.5.5     | VERIFY                         |&lt;br /&gt;| 00 20 00 80 08 xxxx xxxx xxxx xxxx                           | VSDC                 | VERIFY (Transaction PIN data)  |&lt;br /&gt;| A0 20 00 xx 08 CHV Value                                     | 3GPP TS 11.11        | VERIFY                         |&lt;br /&gt;| A0 20 00 xx 08 CHV Value                                     | SAGEM SCT U34 6.10   | VERIFY                         |&lt;br /&gt;| 80 20 00 xx 08 ADM Value                                     | SAGEM SCT U34 8.1.4  | VERIFY ADM                     |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 21 00 xx 08 ADM Value                                     | SAGEM SCT U34 8.1.4  | VERIFY ADM                     |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    22                                                        | ISO 7816-4 8.5.10    | MANAGE SECURITY ENVIRONMENT    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    24                                                        | ISO 7816-4 8.5.6     | CHANGE CHV                     |&lt;br /&gt;| 84 24 00 00 xx PIN data + MAC                                | VSDC                 | PIN CHANGE/UNBLOCK             |&lt;br /&gt;| A0 24 00 xx 10 Old CHV, New CHV                              | 3GPP TS 11.11        | CHANGE CHV                     |&lt;br /&gt;| A0 24 00 xx 10 Old CHV, New CHV                              | SAGEM SCT U34 6.11   | CHANGE CHV                     |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    26                                                        | ISO 7816-4 8.5.8     | DISABLE CHV1                   |&lt;br /&gt;| A0 26 00 01 08 CHV1 value                                    | 3GPP TS 11.11        | DISABLE CHV1                   |&lt;br /&gt;| A0 26 00 01 08 CHV1 value                                    | SAGEM SCT U32 6.12   | DISABLE CHV1                   |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    28                                                        | ISO 7816-4 8.5.7     | ENABLE CHV1                    |&lt;br /&gt;| A0 28 00 01 08 CHV1 value                                    | 3GPP TS 11.11        | ENABLE CHV1                    |&lt;br /&gt;| A0 28 00 01 08 CHV1 value                                    | SAGEM SCT U34 6.13   | ENABLE CHV1                    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    2A                                                        | ISO 7816-8 5.2       | PERFORM SECURITY OPERATION     |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    2C                                                        | ISO 7816-4 8.5.9     | UNBLOCK CHV                    |&lt;br /&gt;| A0 2C 00 xx 10 Unblock CHV(PUK), New CHV                     | 3GPP TS 11.11        | UNBLOCK CHV                    |&lt;br /&gt;| A0 2C 00 xx 10 Unblock CHV(PUK), New CHV                     | SAGEM SCT U34 6.14   | UNBLOCK CHV                    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| A0 2E 00 0# 01 Data                                          | 3GPP TS 11.11        | WRITE CODE STATUS              |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| A0 32 00 00 03 Value to be added.                            | 3GPP TS 11.11        | INCREASE                       |&lt;br /&gt;| A0 32 00 00 03 Value to be added.                            | SAGEM SCT U34 6.9    | INCREASE                       |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    39                                                        |                      | java Authentificate User Comman|&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    44                                                        | ISO 7816-9 6.4       | ACTIVATE FILE                  |&lt;br /&gt;| A0 44 00 00 00                                               | 3GPP TS 11.11        | REHABILIDATE                   |&lt;br /&gt;| A0 44 00 00 00                                               | SAGEM SCT U34 6.16   | REHABILIDATE                   |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    46                                                        | ISO 7816-8 5.1       | GENERATE ASYMMETRIC KEY PAIR   |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 50 xx xx 08 Host challenge        00                      | GlobalPlatform       | INITIALIZE UPDATE then [C0]    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    70                                                        | ISO 7816-4 8.1.2     | MANAGE CHANNEL                 |&lt;br /&gt;| 00 70 xx xx                          xx                      | GlobalPlatform       | MANAGE CHANNEL                 |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 78 00 03 xx                                               | GlobalPlatform       | END R-MAC SESSION              |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 7A xx 01 xx Data and C-MAC, if needed                     | GlobalPlatform       | BEGIN R-MAC SESSION            |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    82                                                        | ISO 7816-4 8.5.3     | EXTERNAL AUTHENTICATE          |&lt;br /&gt;| 84 82 00 00 10 Host cryptogram and MAC                       | GlobalPlatform       | EXTERNAL AUTHENTICATE          |&lt;br /&gt;| 84 82 00 00 0A Authentication-related data                   | VSDC                 | EXTERNAL AUTHENTICATE          |&lt;br /&gt;| 00 82 00 xx 06 Manual                                        | GEMPLUS MPCOS-EMV    | EXTERNAL AUTHENTICATE          |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    84                                                        | ISO 7816-4 8.5.2     | GET CHALLENGE                  |&lt;br /&gt;| 00 84 00 00                          08 Rnd Num              | VSDC                 | GET CHALLENGE                  |&lt;br /&gt;| 00 84 xx xx                          08 Rnd Num              | GEMPLUS MPCOS-EMV    | GET CHALLENGE                  |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    86                                                        | ISO 7816-4 8.5.4     | GENERAL AUTHENTICATE           |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    88                                                        | ISO 7816-4 8.5.1     | INTERNAL AUTHENTICATE          |&lt;br /&gt;| 00 88 XX xx 0A Manual                                        | GEMPLUS MPCOS-EMV    | INTERNAL AUTHENTICATE          |&lt;br /&gt;| A0 88 00 00 10 RAND : Rnd num        xx  SRES( 4B) , Kc (8B) | 3GPP TS 11.11        | RUN GSM ALGORITHM              |&lt;br /&gt;| A0 88 00 00 10 RAND : Rnd num        xx  SRES( 4B) , Kc (8B) | SAGEM SCT U34 6.17   | RUN GSM ALGORITHM              |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    A0                                                        | ISO 7816-4 8.2.5     | SEARCH BINARY                  |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    A2                                                        | ISO 7816-4 8.3.5     | SEEK                           |&lt;br /&gt;| A0 A2 00 xx xx Pattern               xx                      | 3GPP TS 11.11        | SEEK                           |&lt;br /&gt;| A0 A2 00 xx xx Pattern               xx                      | SAGEM SCT U34 6.8    | SEEK                           |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    A4                                                        | ISO 7816-4 8.1.1     | SELECT                         |&lt;br /&gt;| 00 A4 04 00 xx AID                   00                      | GlobalPlatform       | SELECT                         |&lt;br /&gt;| 00 A4 00 xx xx File ID || Name       00  Manual              | VSDC                 | SELECT                         |&lt;br /&gt;| A0 A4 00 00 02 File ID                                       | 3GPP TS 11.11        | SELECT                         |&lt;br /&gt;| A0 A4 00 00 02 File ID                                       | SAGEM SCT U34 6.1    | SELECT                         |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 A8 00 00 00                       00                      | VSDC                 | GET PROCESSING OPTIONS         |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 AE 00 xx Transaction-related data                         | VSDC                 |                                |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    B0                                                        | ISO 7816-4 8.2.1     | READ BINARY                    |&lt;br /&gt;| 00 B0 xx xx                          xx                      | GEMPLUS MPCOS-EMV    | READ BINARY                    |&lt;br /&gt;| A0 B0 xx xx                          xx                      | 3GPP TS 11.11        | READ BINARY                    |&lt;br /&gt;| A0 B0 xx xx                          xx                      | SAGEM SCT U34 6.4    | READ BINARY                    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    B2                                                        | ISO 7816-4 8.3.1     | READ RECORD                    |&lt;br /&gt;| 00 B2 xx                             00                      | VSDC                 | READ RECORD                    |&lt;br /&gt;| A0 B2 xx xx                          xx                      | 3GPP TS 11.11        | READ RECORD                    |&lt;br /&gt;| A0 B2 xx xx                          xx                      | SAGEM SCT U34 6.6    | READ RECORD                    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    B4                                                        |                      | java Component Data            |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    B8                                                        |                      | java Create Applet             |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    BA                                                        |                      | java CAP end                   |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    BC                                                        |                      | java Component end             |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    BE                                04 Data                 | GEMPLUS GemClub-MEMO | READ                           |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    C0                                                        | ISO 7816-4 8.6.1     | GET RESPONSE                   |&lt;br /&gt;| 00 C0                                1C Key Info             | GlobalPlatform       | GET RESPONSE                   |&lt;br /&gt;| 00 C0 00 00                          00                      | VSDC                 | GET RESPONSE                   |&lt;br /&gt;| 80 C0 00 00                          xx                      | GEMPLUS MPCOS-EMV    | Get Info on Get Response       |&lt;br /&gt;| 80 C0 02 A0                          08 Chip SN              | GEMPLUS MPCOS-EMV    | Get Info                       |&lt;br /&gt;| 80 C0 02 A1                          08 Card SN              | GEMPLUS MPCOS-EMV    | Get Info                       |&lt;br /&gt;| 80 C0 02 A2                          08 Issuer SN            | GEMPLUS MPCOS-EMV    | Get Info                       |&lt;br /&gt;| 80 C0 02 A3                          04 Iss.Ref.N            | GEMPLUS MPCOS-EMV    | Get Info                       |&lt;br /&gt;| 80 C0 02 A4                          0D Chip Inf             | GEMPLUS MPCOS-EMV    | Get Info                       |&lt;br /&gt;| 80 C0 02 A5                          xx Keys                 | GEMPLUS MPCOS-EMV    | Get Info                       |&lt;br /&gt;| 80 C0 02 A6                          02 Last DF/EF           | GEMPLUS MPCOS-EMV    | Get Info                       |&lt;br /&gt;| A0 C0 00 00                          xx                      | 3GPP TS 11.11        | GET RESPONSE                   |&lt;br /&gt;| A0 C0 00 00                          xx                      | SAGEM SCT U34 6.3    | GET RESPONSE                   |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    C2                                                        | ISO 7816-4 8.6.2     | ENVELOPE                       |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    C4                                                        |                      | java Delete Applets            |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    CA                                                        | ISO 7816-4 8.4.1     | GET DATA                       |&lt;br /&gt;| 00 CA 00 xx xx MAC, if present                               | GlobalPlatform       | GET DATA                       |&lt;br /&gt;| 80 CA xx xx xx                                               | VSDC                 | GET DATA                       |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    D0                                                        | ISO 7816-4 8.2.2     | WRITE BINARY                   |&lt;br /&gt;| 80 D0 xx xx xx Data to be written in EEPROM                  | VSDC                 | LOAD STRUCTURE                 |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    D2                                                        | ISO 7816-4 8.3.2     | WRITE RECORD                   |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    D6                                                        | ISO 7816-4 8.2.3     | UPDATE BINARY                  |&lt;br /&gt;| A0 D6 xx xx xx Data to be written in EEPROM                  | 3GPP TS 11.11        | UPDATE BINARY                  |&lt;br /&gt;| A0 D6 xx xx xx Data to be written in EEPROM                  | SAGEM SCT U34 6.5    | UPDATE BINARY                  |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 D8 xx xx xx KEY Date (and MAC)    00                      | GlobalPlatform       | PUT KEY                        |&lt;br /&gt;|    D8                                                        | EMV                  | Set Card Status(personalization|&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    DA                                                        | ISO 7816-4 8.4.2     | PUT DATA                       |&lt;br /&gt;| 00 DA xx xx xx Data                                          | VSDC                 | PUT DATA                       |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    DC                                                        | ISO 7816-4           | UPDATE RECORD                  |&lt;br /&gt;| 00 DC xx xx xx Data (and MAC)                                | VSDC                 | UPDATE RECORD                  |&lt;br /&gt;| A0 DC xx xx xx Data to be written in EEPROM                  | 3GPP TS 11.11        | UPDATE RECORD                  |&lt;br /&gt;| A0 DC xx xx xx Data to be written in EEPROM                  | SAGEM SCT U34 6.7    | UPDATE RECORD                  |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    DE       04 Data                                          | GEMPLUS GemClub-MEMO | UPDATE                         |&lt;br /&gt;| A0 DE 00 00 03 Data                                          | 3GPP TS 11.11        | LOAD AoC(SICAP)                |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    E0                                                        | ISO 7816-9 6.1       | CREATE FILE                    |&lt;br /&gt;| 80 E0 02 00 0C Manual                                        | GEMPLUS MPCOS-EMV    | CREATE FILE                    |&lt;br /&gt;| 80 E0 xx xx xx FCI length                                    | 3GPP TS 11.11        | CREATE FILE                    |&lt;br /&gt;| 80 E0 xx xx xx FCI length                                    | SAGEM SCT U34        | CREATE FILE                    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    E2                                                        | ISO 7816-4 8.3.4     | APPEND RECORD                  |&lt;br /&gt;| 80 E2 00 00 xx Record (and MAC)                              | GlobalPlatform       | APPEND RECORD                  |&lt;br /&gt;| 00 E2 00 00 xx Record                                        | VSDC                 | APPEND RECORD                  |&lt;br /&gt;| 00 E2 00 00 xx Record                                        | GEMPLUS MPCOS-EMV    | APPEND RECORD                  |&lt;br /&gt;| 00 E2 00 00 xx Record                                        | 3GPP TS 11.11        | APPEND RECORD                  |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    E4                                                        | ISO 7816-9 6.2       | DELETE FILE                    |&lt;br /&gt;| 80 E4 00 00 xx TLV coded name                                | GlobalPlatform       | DELETE FILE                    |&lt;br /&gt;| A0 E4 00 00 02 xx xx                                         | 3GPP TS 11.11        | DELETE FILE                    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    E6                                                        | ISO 7816-9 6.5       | TERMINATE DF                   |&lt;br /&gt;| 80 E6 xx 00 xx Manual                                        | GlobalPlatform       | INSTALL                        |&lt;br /&gt;| A0 E6 xx xx 00                                               | 3GPP TS 11.11        | LOCK RECORD                    |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    E8                                                        | ISO 7816-9 6.6       | TERMINATE EF                   |&lt;br /&gt;| 80 E8 00 00 xx Record                                        | GlobalPlatform       | LOAD                           |&lt;br /&gt;| A0 E8 00 xx 10 Data                                          | 3GPP TS 11.11        | READ DIRECTORY                 |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 EA 00 00 xx Data                                          | 3GPP TS 11.11        | CREATE BINARY                  |&lt;br /&gt;| 80 EA 00 00 xx Data                                          | SAGEM SCT U34        | CREATE BINARY                  |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 EE 00 xx 00                                               | VSDC                 | WRITE LOCK                     |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 F0 xx xx xx AID of Application (and MAC)                  | GlobalPlatform       | SET STATUS                     |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| A0 F2 00 00 xx                                               | 3GPP TS 11.11        | GET STATUS                     |&lt;br /&gt;| A0 F2 00 00 xx                                               | SAGEM SCT U34 6.2    | GET STATUS                     |&lt;br /&gt;| 80 F2 xx xx                                                  | GlobalPlatform       | GET STATUS                     |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 F8 xx xx                          xx                      | SAGEM SCT U34 8.1.1  | DIR                            |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| A0 FA 00 00 00                                               | 3GPP TS 11.11        | SLEEP                          |&lt;br /&gt;| A0 FA 00 00 00                                               | SAGEM SCT U34 6.18   | SLEEP                          |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 FB xx xx                          xx                      | SAGEM SCT U34 8.1.1  | DIR                            |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;| 80 FC xx xx                          10                      | SAGEM SCT U34 8.1.3  | READ INFO                      |&lt;br /&gt;+------------+------------------------+------------------------+----------------------+--------------------------------+&lt;br /&gt;|    FE                                                        | ISO 7816-9 6.7       | TERMINATE CARD USAGE           |&lt;br /&gt;| 80 FE xx xx 00                                               | SAGEM SCT U34        | BLOW FUSE                      |&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/1227041388185782445-1559672776301952710?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1559672776301952710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2012/01/aggregated-apdu-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1559672776301952710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1559672776301952710'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2012/01/aggregated-apdu-list.html' title='Aggregated APDU List'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2030439885046743155</id><published>2012-01-10T11:06:00.000-08:00</published><updated>2012-01-30T12:03:42.809-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='algo'/><title type='text'>Dynamite Knight's Tour in F# - Tom Wells</title><content type='html'>An Ungodly Fast Solution in F# to the Knights Tour&lt;br /&gt;&lt;br /&gt;I would suggest that you consider coding the solution up in F#, as my friend &lt;a href="http://tomwells.org/"&gt;Tom Wells&lt;/a&gt; has done. &amp;nbsp;His solution finds all solutions for the 5x5 board in under 5 minutes.&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;let boardsize = 7&lt;br /&gt;&lt;br /&gt;// Setup board in 2d array setting all elements to true&lt;br /&gt;//  ___________________&lt;br /&gt;// |0,4|1,4|2,4|3,4|4,4| (x,y)&lt;br /&gt;// |0,3|1,3|2,3|3,3|4,3|&lt;br /&gt;// |0,2|1,2|2,2|3,2|4,2|&lt;br /&gt;// |0,1|1,1|2,1|3,1|4,1|&lt;br /&gt;// |0,0|1,0|2,0|3,0|4,0|&lt;br /&gt;//  -------------------&lt;br /&gt;//&lt;br /&gt;let referenceboard = Array2D.init boardsize boardsize (fun x y -&amp;gt; true)&lt;br /&gt;&lt;br /&gt;let legalmoves x y =&lt;br /&gt;    // Generate every move (impossible or not)&lt;br /&gt;    //&lt;br /&gt;    let possibles = [(x - 1, y - 2); (x - 2, y - 1);&lt;br /&gt;                     (x + 1, y - 2); (x + 2, y - 1);&lt;br /&gt;                     (x + 1, y + 2); (x + 2, y + 1);&lt;br /&gt;                     (x - 1, y + 2); (x - 2, y + 1);]&lt;br /&gt;    &lt;br /&gt;    // Prune the ones falling outside of the board&lt;br /&gt;    //&lt;br /&gt;    possibles |&amp;gt; List.filter (fun (x, y) -&amp;gt; x &amp;gt;= 0 &amp;amp;&amp;amp; y &amp;gt;= 0 &amp;amp;&amp;amp; x &amp;lt; boardsize &amp;amp;&amp;amp; y &amp;lt; boardsize)&lt;br /&gt;&lt;br /&gt;// Is a particular move still available to us? ie not already used&lt;br /&gt;//&lt;br /&gt;let availablemove x y (board : bool[,]) =&lt;br /&gt;    board.[x,y] = true&lt;br /&gt;&lt;br /&gt;let rec hunt startx starty (board : bool[,]) (history : List&amp;lt;(int*int)&amp;gt;) foundsolutionfunc = &lt;br /&gt;    // Mark the position we're at as being taken&lt;br /&gt;    //&lt;br /&gt;    board.[startx,starty] &amp;lt;- false&lt;br /&gt;&lt;br /&gt;    // Check if we have a solution (ie we've covered the entire board)&lt;br /&gt;    //&lt;br /&gt;    if history.Length = boardsize * boardsize then&lt;br /&gt;        foundsolutionfunc (history) |&amp;gt; ignore&lt;br /&gt;    else&lt;br /&gt;        // Calculate the set of available moves from this point, filtering by positions which we've already used&lt;br /&gt;        //&lt;br /&gt;        let availablemoves = legalmoves startx starty |&amp;gt; List.filter (fun (x,y) -&amp;gt; availablemove x y board)&lt;br /&gt;&lt;br /&gt;        // For each available move, recurse&lt;br /&gt;        //&lt;br /&gt;        for (x,y) in availablemoves do&lt;br /&gt;            hunt x y (Array2D.copy board) ((x,y) :: history) foundsolutionfunc&lt;br /&gt;&lt;br /&gt;[&amp;lt;EntryPoint&amp;gt;]&lt;br /&gt;let main args =&lt;br /&gt;    &lt;br /&gt;    let starttime = System.DateTime.Now&lt;br /&gt;&lt;br /&gt;    let solutions = new System.Collections.Generic.List&amp;lt;System.Tuple&amp;lt;int,int&amp;gt;&amp;gt;()&lt;br /&gt;    for x in seq { 0 .. Array2D.length1 referenceboard - 1 } do&lt;br /&gt;        for y in seq { 0 .. Array2D.length2 referenceboard - 1 } do&lt;br /&gt;            printf "(%d,%d)" x y&lt;br /&gt;&lt;br /&gt;            hunt x y (Array2D.copy referenceboard) [(x,y)] (fun solution -&amp;gt;&lt;br /&gt;                solutions.Add(new System.Tuple&amp;lt;int,int&amp;gt;(x,y))&lt;br /&gt;                printf "."&lt;br /&gt;            )    &lt;br /&gt;&lt;br /&gt;    let endtime = System.DateTime.Now&lt;br /&gt;&lt;br /&gt;    printfn "\nFound %d solutions (took %03f seconds)" solutions.Count (endtime - starttime).TotalSeconds&lt;br /&gt;    &lt;br /&gt;    printfn "Enter to quit"&lt;br /&gt;    System.Console.In.ReadLine() |&amp;gt; ignore&lt;br /&gt;&lt;br /&gt;    0&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2030439885046743155?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2030439885046743155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2012/01/dynamite-knights-tour-in-f-tom-wells.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2030439885046743155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2030439885046743155'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2012/01/dynamite-knights-tour-in-f-tom-wells.html' title='Dynamite Knight&apos;s Tour in F# - Tom Wells'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-8760738859844734676</id><published>2012-01-06T00:14:00.000-08:00</published><updated>2012-01-23T11:40:33.153-08:00</updated><title type='text'>EMV / Smart-Card Development with pyscard</title><content type='html'>EMV Resources&lt;br /&gt;-&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/EMV"&gt;EMV Entry on&amp;nbsp;Wikipedia&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ATR = Answer To Reset&lt;/b&gt;&lt;br /&gt;Standard/Spec = &lt;span style="background-color: white;"&gt;&lt;a href="http://en.wikipedia.org/wiki/ISO/IEC_7816"&gt;ISO7816-3&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://smartcard-atr.appspot.com/"&gt;OnLine ATR Byte String Parser&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Answer_to_reset"&gt;ATR @ Wikipedia&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PySCard Resources&lt;br /&gt;- &lt;a href="http://pyscard.sourceforge.net/"&gt;Project @ SourceForge&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;pyscard on ubuntu&lt;/b&gt;&lt;br /&gt;1. install pcscd :&amp;nbsp; sudo apt-get install pcscd&lt;br /&gt;2. start daemon : sudo /etc/init.d/pcscd start&lt;br /&gt;&lt;br /&gt;PY_EMV_UTILS - python pyscard emv smartcard utilities&lt;br /&gt;&lt;b&gt;svn checkout svn://svn.code.sf.net/p/pyemvutils/code/trunk pyemvutils-code&lt;/b&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/1227041388185782445-8760738859844734676?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/8760738859844734676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2012/01/emv-smart-card-development-with-pyscard.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8760738859844734676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8760738859844734676'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2012/01/emv-smart-card-development-with-pyscard.html' title='EMV / Smart-Card Development with pyscard'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1966449048491401263</id><published>2012-01-02T02:27:00.000-08:00</published><updated>2012-01-26T00:58:36.540-08:00</updated><title type='text'>The Knights Tour Problem - Multi-Processor Algorithmic Parallelism with Python</title><content type='html'>&lt;span style="font-size: large;"&gt;Resources&lt;/span&gt;&lt;br /&gt;-&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Knight's_tour"&gt;Wikipedia Entry&lt;/a&gt;.&lt;br /&gt;-&amp;nbsp;&lt;a href="http://www.behnel.de/index.html"&gt;Stefan Behnel&lt;/a&gt;'s page [&lt;a href="http://www.behnel.de/knight.html"&gt;What the Chess Knight is Doing&lt;/a&gt;] features some handy info on the solution space.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-large;"&gt;A Brief Introduction to the Knight's Tour Problem&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;A Knight's Tour is a traversal of an 8x8 chess-board by the Knight / Horse piece, where the Knight touches each and every square once and only once during the tour, and makes only its characteristic L-shaped legal moves.&lt;br /&gt;&lt;br /&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://upload.wikimedia.org/wikipedia/commons/c/ca/Knights-Tour-Animation.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://upload.wikimedia.org/wikipedia/commons/c/ca/Knights-Tour-Animation.gif" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Open Knights Tour on 5x5 Board&lt;br /&gt;[Graphic Linked from Wikipedia Entry]&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The problem can be further generalised by varying board parameters - to produce arbitrarily sized square&amp;nbsp;NxN grids, and also arbitrarily-sized rectangular NxM grids.&lt;br /&gt;&lt;br /&gt;There is also the closely-related problem of finding closed tours - where the Knight must be in a position on the final square of its open tour to theoretically return again to the first square of that tour by a legal move [closing the tour].&lt;br /&gt;&lt;br /&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://upload.wikimedia.org/wikipedia/commons/thumb/0/02/Turk-knights-tour.svg/250px-Turk-knights-tour.svg.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/02/Turk-knights-tour.svg/250px-Turk-knights-tour.svg.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Closed Knights Tour on 8x8 Board&lt;br /&gt;[Graphic Linked from Wikipedia Entry]&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The Knights Tour Problem is a specific instance of the more general problem of &lt;a href="http://en.wikipedia.org/wiki/Hamiltonian_path_problem"&gt;finding a Hamiltonian Path&lt;/a&gt; (i.e. a connected path that touches each vertex once and only once) [open tour problem], and a finding a Hamiltonian cycle [closed tour problem].&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;The Solution Space&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-fm3YZvpenYk/TwGK3dHgsYI/AAAAAAAAAHM/OaMuSvuN04M/s1600/Knights_Tour+-+Solution+Count+as+a+Function+of+Grid+Size.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="412" src="http://4.bp.blogspot.com/-fm3YZvpenYk/TwGK3dHgsYI/AAAAAAAAAHM/OaMuSvuN04M/s640/Knights_Tour+-+Solution+Count+as+a+Function+of+Grid+Size.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;NxN Square Board - Open Tours&lt;br /&gt;&lt;br /&gt;4x4 =&amp;gt; 0&lt;br /&gt;5x5 =&amp;gt; 1728&lt;br /&gt;6x6 =&amp;gt;&lt;br /&gt;7x7 =&amp;gt;&amp;nbsp;&lt;span style="text-align: -webkit-right;"&gt;6,637,920&lt;/span&gt;&lt;br /&gt;8x8 =&amp;gt;&amp;nbsp;&lt;span style="text-align: -webkit-right;"&gt;8,121,130,233,753,702,400&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Brute Force Solution Approach&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A brute force approach is typically only practical in the case of the 5x5 board, and is not generally useful for the higher dimensional problems, due to the fact the the solution space explodes with increasing problem dimensions. &amp;nbsp;From the Wikipedia entry: &amp;nbsp;"&lt;a href="http://en.wikipedia.org/wiki/Knight's_tour"&gt;&lt;b&gt;For a regular 8x8 chess board, there are approximately 4×10^51 possible move sequences&lt;/b&gt;, and it would take an unfathomable amount of time to iterate through such a large number of moves.&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;So, in the case of 8x8, there are 4x10^51 possible move sequences, and 8.1x10^18 solutions, therefore for every solution, there are approximately 4.9x10^32 move sequences, a vanishingly small ratio...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;A Useful Heuristic - Warnsdorff's Rule&lt;/span&gt; [Wikipedia]&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wikipedia.org/wiki/Knight's_"&gt;Warnsdorff's rule is a heuristic method for finding a knight's tour. Briefly, one moves the knight according to the following rule: always proceed to the square from which the knight will have the fewest onward moves. &amp;nbsp;It is, of course, possible to have two or more choices for which the number of onward moves is equal; there are various methods for breaking such ties, including one devised by Pohl and another by Squirrel and Cull. &amp;nbsp;This rule may also more generally be applied to any graph. In graph-theoretic terms, each move is made to the adjacent vertex with the least degree. Although the Hamiltonian path problem is NP-hard in general, on many graphs that occur in practice this heuristic is able to successfully locate a solution in linear time. &amp;nbsp;The knight's tour is a special case. &amp;nbsp;The heuristic was first described in "Des Rösselsprungs einfachste und allgemeinste Lösung" by H. C. von Warnsdorff in 1823.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-large;"&gt;Brute-Force / Depth First Search&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-large;"&gt;Finding of All Open Tours&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-large;"&gt;in 5 x 5 Case&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: large;"&gt;Solution Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A back-tracker / depth-first searcher was developed in &lt;a href="http://python.org/"&gt;Python&lt;/a&gt;&amp;nbsp;&lt;a href="http://www.python.org/getit/releases/2.7/"&gt;2.7&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;A &lt;b&gt;&lt;u&gt;Definition of Back-Tracking&lt;/u&gt;&lt;/b&gt; from the Wikipedia:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Backtracking"&gt;Backtracking is a general algorithm for finding all (or some) solutions to some computational problem, that incrementally builds candidates to the solutions, and abandons each partial candidate c ("backtracks") as soon as it determines that c cannot possibly be completed to a valid solution.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A &lt;b&gt;&lt;u&gt;Definition of State Space Search&lt;/u&gt;&lt;/b&gt; from the Wikipedia:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/State_space_search"&gt;State space search is a process used in the field of computer science, including artificial intelligence (AI), in which successive configurations or states of an instance are considered, with the goal of finding a goal state with a desired property.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/State_space_search"&gt;Problems are often modelled as a state space, a set of states that a problem can be in. The set of states forms a graph where two states are connected if there is an operation that can be performed to transform the first state into the second.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/State_space_search"&gt;State space search often differs from traditional computer science search methods because the state space is implicit: the typical state space graph is much too large to generate and store in memory. Instead, nodes are generated as they are explored, and typically discarded thereafter. A solution to a combinatorial search instance may consist of the goal state itself, or of a path from some initial state to the goal state.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;A General Description of the Specific Back-Tracker Implementation&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Essentially the tracker successively explores the state space, collecting solutions as it goes.&lt;br /&gt;&lt;br /&gt;Considering the 5x5 grid case, and starting from a blank board:&lt;br /&gt;&lt;br /&gt;It is first noted that there are 25 possible first moves than can be made, since the knight can be placed on any of the 5 x 5 = 25 squares.&lt;br /&gt;&lt;br /&gt;From each of these 25 possible first moves, uniquely different (although sometimes symmetrical) second moves can be made. &amp;nbsp;Now, the number of possible second moves is not the same for every possible first move, for example first moves to edge squares will have less&amp;nbsp;possible&amp;nbsp;second moves than first moves to the centre square (or centre squares, in the case of even-dimensioned square boards).&lt;br /&gt;&lt;br /&gt;Then for each of the possible second moves, there are a number of possible third moves, and so on, until either the knight gets stuck&amp;nbsp;or successfully untangles a Hamiltonian path.&lt;br /&gt;&lt;br /&gt;Thus the solution space can be thought of as a tree structure, with the blank board as the root node, and&amp;nbsp;each of the 25 possible first choices as nodes adjacent&amp;nbsp;to the root node. &amp;nbsp;Each of the possible second choices are then nodes adjacent to their respective first-choice nodes, and so on. &amp;nbsp;Knight's tours will then be Hamiltonian paths of length 25 [= N^2 = NxN], and aborted attempts will correspond to shorter paths.&lt;br /&gt;&lt;br /&gt;The back-tracker dynamically and successively generates this tree structure - exploring a particular branch, until a dead-end is reached, then back-tracking until the first unexplored branch is encountered, pruning the&amp;nbsp;fully examined branch&amp;nbsp;off the tree and discarding it to minimize persistence (memory/disc) utilisation, before continuing forward again to explore another remaining unexamined branch.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Parallelisation with Python's Multiprocessing Module&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The Knights tour problem just screams parallelisation, but how to do this given the restrictions imposed by Python's crummy &lt;a href="http://en.wikipedia.org/wiki/Global_Interpreter_Lock"&gt;Global Interpreter Lock (GIL)&lt;/a&gt;&amp;nbsp;on the language's support for true multi-threading ? &amp;nbsp;With the standard library's&amp;nbsp;&lt;a href="http://docs.python.org/library/multiprocessing.html"&gt;multiprocessing module&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://docs.python.org/library/multiprocessing.html"&gt;multiprocessing is a package that supports spawning processes using an API similar to the threading module. The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads. Due to this, the multiprocessing module allows the programmer to fully leverage multiple processors on a given machine. It runs on both Unix and Windows.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, what multiprocessing actually gives you is a set of independent operating-system level processes, each with it's own Python VM, and some infrastructure for both passing objects and (save us) directly sharing memory between these distinct processes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Design Pattern&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The design I've chosen utilises a single co-ordinating process, which spawns agent processes that are responsible for the execution of the actual business of exploring the solution space.&lt;br /&gt;&lt;br /&gt;In the simplest case each agent process is assigned a different first choice, and it generates, examines and prunes the branch associated with that specific first choice, communicating solutions found back to the co-ordinating process, and finally notifying it of completion (total exploration of assigned solution space).&lt;br /&gt;&lt;br /&gt;When the co-ordinating process is informed of successfully termination of an agent process, it will then spawn a new agent and assign them to examine a different branch of the tree.&lt;br /&gt;&lt;br /&gt;When all branches have been examined, the solution space can be considered exhausted and all solutions found, and the coordinating process will report to file, and terminate.&lt;br /&gt;&lt;br /&gt;Communication between the coordinating processes and its agents is achieved via use of the duplex pipe object available in the multiprocessing module.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;The Test&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;Exhaustively searching for and identifying all 1728 Knight's Tours on the 5x5 board.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Test Machine&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;I5-4x2.3GHz-8MB = Intel i5-2410M 2.3GHz with 8 GB&lt;br /&gt;Test Machine Syn features an Intel i5 array of 4 cores at 2.3 GHz, with 8 GB memory available, running 64bit Windows 7, and 32 bit Python 2.7.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;The Results&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Single Process, No Threading - Effectively 1 Core&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First off, the performance of the basic unthreaded, singleton-process back-tracker.&lt;br /&gt;&lt;br /&gt;Total Time = 1hr46mins = 106 mins = 6360 seconds&lt;br /&gt;Total Solution Count = 1728&lt;br /&gt;Average Rate of Solution Finding = 0.27 solutions per second&lt;br /&gt;Average Time to Find Next Solution = 3.68 seconds per solution&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1 Controller Core + 3 x Agent Cores&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Total Time = 41 mins = 2460 seconds&lt;br /&gt;Total Solution Count = 1728&lt;br /&gt;Average Rate of Solution Finding = 0.70 solutions per second&lt;br /&gt;Average Time to Find Next Solution = 1.42 seconds per solution&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Comparison - Singleton Process versus Multi-Process [1 Controller, 3 Agents]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-GyiqeTw2_zk/TwK0BPCAZuI/AAAAAAAAAHY/CmDppZx0eQs/s1600/performance_comparison_1C3A_vs_Singleton.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="412" src="http://1.bp.blogspot.com/-GyiqeTw2_zk/TwK0BPCAZuI/AAAAAAAAAHY/CmDppZx0eQs/s640/performance_comparison_1C3A_vs_Singleton.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So, the question is, from a quantitative perspective, what gains have been achieved by parallelising the algorithm ?&lt;br /&gt;&lt;br /&gt;Since the test machine has 4 cores available, and the algorithm uses one of them for co-ordination, and farms out the work to 3 agent processes, we expect to see about a 3-fold gain in speed / decrease in total time.&lt;br /&gt;&lt;br /&gt;Actually Observed Performance Ratio = 6360 / 2460 ~ &amp;nbsp;2.59&lt;br /&gt;Theoretical Maximum Performance Ratio = 3 [going from 1 to 3 worker cores]&lt;br /&gt;&lt;br /&gt;So, overall our increase in performance is not too bad, we didn't quite achieve the maximum ratio of 3, but we're not too far off at 2.59. &amp;nbsp;Quantitatively we have achieved ~ 86% of the&amp;nbsp;maximum&amp;nbsp;theoretically possible increase in performance.&lt;br /&gt;&lt;br /&gt;POST SCRIPT&lt;br /&gt;&lt;br /&gt;"So, overall our increase in performance is not too bad" - Unfortunately, this is a blatant lie, see &lt;a href="http://socialripple.blogspot.com/2012/01/dynamite-knights-tour-in-f-tom-wells.html"&gt;the next post &lt;/a&gt;on this topic for damning details.&lt;br /&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/1227041388185782445-1966449048491401263?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1966449048491401263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2012/01/knights-tour-problem-multi-processor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1966449048491401263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1966449048491401263'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2012/01/knights-tour-problem-multi-processor.html' title='The Knights Tour Problem - Multi-Processor Algorithmic Parallelism with Python'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-fm3YZvpenYk/TwGK3dHgsYI/AAAAAAAAAHM/OaMuSvuN04M/s72-c/Knights_Tour+-+Solution+Count+as+a+Function+of+Grid+Size.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-8884666693012748879</id><published>2011-12-31T08:56:00.000-08:00</published><updated>2012-02-18T08:34:20.759-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>Python IDEs/Editors</title><content type='html'>If you're getting into developing in python, then you're going to ask yourself the question 'Which IDE / code editor should I use?' &amp;nbsp;Although this is obviously a subjective issue, let me weigh in with my personal experience.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;[&lt;a href="http://stackoverflow.com/"&gt;StackOverFlow.com&lt;/a&gt; - &lt;a href="http://stackoverflow.com/questions/81584/what-ide-to-use-for-python"&gt;What IDE to use for Python ?&lt;/a&gt;]&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ignoring &lt;a href="http://en.wikipedia.org/wiki/Vi"&gt;VI&lt;/a&gt;/&lt;a href="http://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.notepad-plus-plus.org/"&gt;Note Pad Plus Plus&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;If you're a MicroSerf / Windows developer, then one good option is &lt;a href="http://www.notepad-plus-plus.org/"&gt;NotePadPlusPlus&lt;/a&gt;&amp;nbsp;(&lt;a href="http://www.notepad-plus-plus.org/"&gt;NPPP&lt;/a&gt;). &amp;nbsp; &lt;a href="http://www.notepad-plus-plus.org/"&gt;NPPP &lt;/a&gt;is light-weight - and so snappy and responsive, but at the same time VERY extensively featured. &amp;nbsp;On the downside, it's really a Windows-only product, and so if you like me want to be able to use the same python dev platform across both Windows and Linux, then &lt;a href="http://www.notepad-plus-plus.org/"&gt;NPPP &lt;/a&gt;is disqualified. &amp;nbsp;Other detractors are a lack of code completion, and no class / solution explorer. &amp;nbsp;(At least no built-in code completion, and the one or two attempts &amp;nbsp;I made to equip it with a plug-in failed.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.geany.org/"&gt;Geany&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Which brings us to &lt;a href="http://www.scintilla.org/"&gt;Scintilla&lt;/a&gt;-derivative &lt;a href="http://www.geany.org/"&gt;Geany&lt;/a&gt;, a long-time personal favourite of mine. &amp;nbsp;It's a light-weight code editor which bests &lt;a href="http://www.notepad-plus-plus.org/"&gt;NPPP &lt;/a&gt;by coming off-the-shelf with some code completion, and a class/solution explorer. &amp;nbsp;OS-wise, &lt;a href="http://www.geany.org/"&gt;Geany&lt;/a&gt; binaries compiled for both Linux and Windows are available. &amp;nbsp;On the down-side, the feature-set that &lt;a href="http://www.geany.org/"&gt;Geany&lt;/a&gt; offers is quite limited compared to NPPP, although most of the essentials are there. &amp;nbsp;The upside of the limited feature set, is that the IDE/editor itself is not resource hungry.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://pydev.org/"&gt;&lt;b&gt;Eclipse PyDev&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Finally, the &lt;a href="http://pydev.org/"&gt;PyDev&lt;/a&gt; extension for &lt;a href="http://www.eclipse.org/downloads/"&gt;Eclipse&lt;/a&gt;. &amp;nbsp;I've just recently started using this, so its a bit early in the game for comment, but it's obviously a fully featured IDE, with code completion, a solution/class explorer, test-infrastructure integration, cross-platform and is open-source. &amp;nbsp;The only disadvantage of this option is that Eclipse is clearly not a light-weight application itself, and so if your development box is spec-light, then you may want to go with either NotePadPlusPlus or &lt;a href="http://www.geany.org/"&gt;Geany&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href="http://www.notepad-plus-plus.org/"&gt;Note Pad Plus Plu&lt;/a&gt;s&lt;/b&gt;&lt;br /&gt;+ V.Fast, light-weight&lt;br /&gt;- Windows only (Linux version runs under Windows emulator [Wine], and is horrible)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.geany.org/"&gt;&lt;b&gt;Geany&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;+ Cross OS - identical Windows &amp;amp; Linux versions&lt;br /&gt;+ Code completion&lt;br /&gt;+ Class / solution explorer&lt;br /&gt;+ Light-weight&lt;br /&gt;- Relatively limited feature-set&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.eclipse.org/downloads/"&gt;Eclipse &lt;/a&gt;&lt;a href="http://pydev.org/"&gt;PyDev&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;+ Cross OS - identical Windows &amp;amp; Linux versions&lt;br /&gt;+ Code-completion&lt;br /&gt;+ Refactoring support&lt;br /&gt;+ Class / solution explorer&lt;br /&gt;+ Test integration&lt;br /&gt;+ Integrated debug support&lt;br /&gt;- Requires decent machine specs&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Post Script -&amp;nbsp;&lt;/b&gt;&lt;a href="http://aptana.com/"&gt;&lt;b&gt;Aptana Studio 3&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the two months or so since I wrote this post up, I've started using &lt;a href="http://aptana.com/"&gt;Aptana Studio 3&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Aptana Studio 3is a customisation of Eclipse developed and maintained by Aptana, who via some convoluted corporate cannibalism, has absorbed the original PyDev team. &amp;nbsp;So, in short, Aptana is the heir apparent to PyDev for Eclipse.&lt;br /&gt;&lt;br /&gt;What you get is an all-in-one download, which short-circuits the previous two-stage download, for a grade-A user-experience. &amp;nbsp;The IDE itself is snappy, and seems faster than PyDev under Eclipse Indigo. &amp;nbsp;In addition, Aptana features support for Django projects, although I haven't actually done any Django work in the interim, so more to come on that...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;FINAL VERDICT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Aptana Studio 3 by a Knock-Out !&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&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/1227041388185782445-8884666693012748879?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/8884666693012748879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/12/python-ideseditors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8884666693012748879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8884666693012748879'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/12/python-ideseditors.html' title='Python IDEs/Editors'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6982626789370975465</id><published>2011-12-07T00:39:00.001-08:00</published><updated>2011-12-07T00:42:59.336-08:00</updated><title type='text'>Sieve of Eratosthenes in F# - Attempt # 1</title><content type='html'>sieve.fs :&lt;code&gt;&lt;pre&gt;&lt;br /&gt;namespace sieve&lt;br /&gt;  module sieve = &lt;br /&gt;&lt;br /&gt;(*&lt;br /&gt;A prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself.&lt;br /&gt;To find all the prime numbers less than or equal to a given integer n by Eratosthenes' method:&lt;br /&gt;*)&lt;br /&gt;&lt;br /&gt;    let shake (n : int) = &lt;br /&gt;&lt;br /&gt;      printfn "Applying Sieve of Eratosthenes to First %i Natural Numbers" n |&gt; ignore&lt;br /&gt;      &lt;br /&gt;      // 1. Create a list of consecutive integers from 2 to n: (2, 3, 4, ..., n).&lt;br /&gt;      let matrix = Array.init n (fun x -&gt; true)&lt;br /&gt;&lt;br /&gt;      // 2. Initially, let p equal 2, the first prime number.&lt;br /&gt;      let mutable p = 2&lt;br /&gt;&lt;br /&gt;      let mutable set_exhausted = false&lt;br /&gt;      while (set_exhausted = false) do&lt;br /&gt;      &lt;br /&gt;        //  3. Starting from p, count up in increments of p and mark each of these numbers greater than p itself in the list.&lt;br /&gt;        //  These numbers will be 2p, 3p, 4p, etc.; note that some of them may have already been marked.        &lt;br /&gt;        let mutable i = p + p&lt;br /&gt;        while (i &lt;= n) do        &lt;br /&gt;          matrix.[i - 1] &lt;- false&lt;br /&gt;          i &lt;- i + p&lt;br /&gt;&lt;br /&gt;        //  4. Find the first number greater than p in the list that is not marked; let p now equal this number (which is the next prime).        &lt;br /&gt;        p &lt;- p + 1&lt;br /&gt;        while ((p &lt;= n - 1) &amp;&amp; (matrix.[p - 1] &lt;&gt; true)) do&lt;br /&gt;          p &lt;- p + 1      &lt;br /&gt;        &lt;br /&gt;        //  5. If there were no more unmarked numbers in the list, stop. Otherwise, repeat from step 3.&lt;br /&gt;        if (p &gt;= n - 1) then&lt;br /&gt;          set_exhausted &lt;- true&lt;br /&gt;&lt;br /&gt;      //  6. When the algorithm terminates, all the numbers in the list that are not marked are prime.&lt;br /&gt;      matrix&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;Program.fs :&lt;code&gt;&lt;pre&gt;&lt;br /&gt;namespace effsharp&lt;br /&gt;module Main =&lt;br /&gt;    open System&lt;br /&gt;    open sieve&lt;br /&gt;        [&lt;EntryPoint&gt;]&lt;br /&gt;        let main args =         &lt;br /&gt;            &lt;br /&gt;            printfn "Sieve up to what natural number ? [Max %i]" Int32.MaxValue&lt;br /&gt;            let nStr = Console.ReadLine()&lt;br /&gt;            let n = Int32.Parse(nStr)&lt;br /&gt;&lt;br /&gt;            let primes = sieve.shake n&lt;br /&gt;&lt;br /&gt;            for i = 1 to n do              &lt;br /&gt;              if (primes.[i - 1] = true) then&lt;br /&gt;                printfn "%i" i |&gt; ignore&lt;br /&gt;&lt;br /&gt;            printfn "any key to exit..."&lt;br /&gt;            let endofapp = Console.ReadKey()&lt;br /&gt;            0&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6982626789370975465?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6982626789370975465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/12/sieve-of-eratosthenes-in-f-attempt-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6982626789370975465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6982626789370975465'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/12/sieve-of-eratosthenes-in-f-attempt-1.html' title='Sieve of Eratosthenes in F# - Attempt # 1'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5980532539698629771</id><published>2011-12-06T05:42:00.001-08:00</published><updated>2011-12-07T06:44:19.162-08:00</updated><title type='text'>Sharpening the Eff - an Intro to F#</title><content type='html'>F#.NET&lt;br /&gt;Functional&lt;br /&gt;Typing = implicit, static, strict&lt;br /&gt;CLR-based&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Coding Conventions&lt;/b&gt;&lt;br /&gt;&lt;a href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/fsharp-component-design-guidelines.pdf"&gt;MSDN&amp;nbsp;Draft F# Component Design Guidelines&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Getting Started&lt;/b&gt;&lt;br /&gt;&lt;a href="http://geekswithblogs.net/MarkPearl/archive/2010/05/15/f-application-entry-point.aspx"&gt;High-level application structure, Modules &amp;amp; Namespaces&lt;/a&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd402151.aspx"&gt;MSDN EntryPoint Note&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikibooks.org/wiki/F_Sharp_Programming/Values_and_Functions"&gt;Functions vs Values - WikiBooks Entry&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Functions&lt;/b&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd233229.aspx"&gt;Intro to Functions in F#&lt;/a&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/1038676/f-strange-printfn-problem"&gt;When is a Function Executed ?&lt;/a&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/5443805/why-use-a-backward-pipe-operator-instead-of-function-chaining"&gt;Why use a Backward Pipe Operator ( &amp;lt;| ) instead of Function Chaining?&lt;/a&gt;&lt;br /&gt;lazy - &lt;a href="http://msdn.microsoft.com/en-us/library/dd233247.aspx"&gt;Lazy Evaluation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Arrays&lt;/b&gt;&lt;br /&gt;&lt;div style="text-align: -webkit-auto;"&gt;&lt;span class="pln" style="background-color: white; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;initialization:  myIntArray &lt;/span&gt;&lt;span class="pun" style="background-color: white; color: #666600; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-color: white; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-color: white; color: #666600; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;[|&lt;/span&gt;&lt;span class="lit" style="background-color: white; color: #006666; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;1&lt;/span&gt;&lt;span class="pun" style="background-color: white; color: #666600; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;;&lt;/span&gt;&lt;span class="lit" style="background-color: white; color: #006666; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;2&lt;/span&gt;&lt;span class="pun" style="background-color: white; color: #666600; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;;&lt;/span&gt;&lt;span class="lit" style="background-color: white; color: #006666; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;3&lt;/span&gt;&lt;span class="pun" style="background-color: white; color: #666600; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;;&lt;/span&gt;&lt;span class="lit" style="background-color: white; color: #006666; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;4&lt;/span&gt;&lt;span class="pun" style="background-color: white; color: #666600; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;|]&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; white-space: pre;"&gt;accessing: let firstElementOfMyArray = myIntArray.[0]&lt;/span&gt;&lt;/div&gt;&lt;span class="pun" style="background-color: white; color: #666600; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="color: black; font-family: Consolas, Courier, monospace; line-height: normal; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;"&gt;&lt;span class="pun" style="background-color: white; color: #666600; font-family: Consolas, 'Courier New', Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; white-space: pre;"&gt;array1.[0]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;a href="http://mariusbancila.ro/blog/2008/03/26/arrays-in-f/"&gt;Arrays in F# -&amp;nbsp;Marius Bancila’s Blog&lt;/a&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/1115281/array-initialization-in-f"&gt;StackOverflow - Initializing Arrays in F#&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Looping&lt;/b&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd233227.aspx"&gt;MSDN for...in&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd233236.aspx"&gt;MSDN for...to&lt;/a&gt;&lt;br /&gt;for i = 1 to n do&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Classes&lt;/b&gt;&lt;br /&gt;&lt;a href="http://codebetter.com/matthewpodwysocki/2008/09/29/object-oriented-from-the-beginning/"&gt;Object Oriented F# – Creating Classes [CodeBetter.com]&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Interfaces&lt;/b&gt;&lt;br /&gt;&lt;a href="http://bugsquash.blogspot.com/2009/01/implementing-interfaces-in-f.html"&gt;Bug squash - Implementing interfaces in F#&lt;/a&gt;&lt;br /&gt;&lt;a href="http://cs.hubfs.net/topic/None/57897"&gt;Why F# interface differs greatly from C#&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lorgonblog.wordpress.com/2009/02/13/the-basic-syntax-of-f-classes-interfaces-and-members/"&gt;The basic syntax of F# – classes, interfaces, and members&lt;/a&gt;&lt;br /&gt;&lt;br /&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/1227041388185782445-5980532539698629771?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5980532539698629771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/12/sharpening-eff-intro-to-f.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5980532539698629771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5980532539698629771'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/12/sharpening-eff-intro-to-f.html' title='Sharpening the Eff - an Intro to F#'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2295828720668627162</id><published>2011-09-09T00:24:00.000-07:00</published><updated>2011-09-09T00:26:16.127-07:00</updated><title type='text'>Reference in the manifest does not match the identity of the downloaded assembly</title><content type='html'>The following problem may be encountered when attempting an IIS web install/deploy of a 1-Click Install produced by using the Publish option under Visual Studio 2010.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="lang-cs prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; 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; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; 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-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="typ" 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; color: #2b91af; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Reference&lt;/span&gt;&lt;span class="pln" 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; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" 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; color: darkblue; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;in&lt;/span&gt;&lt;span class="pln" 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; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; the manifest does not match the identity of the downloaded assembly&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To fix, right-click on the project and goto&lt;br /&gt;Properties &amp;gt; Application &amp;gt; Resources &amp;gt; Icon and Manifest &amp;gt; Manifest&lt;br /&gt;and select the 'Create application without a manifest' option.&lt;br /&gt;&lt;br /&gt;[&lt;a href="http://stackoverflow.com/questions/5337458/error-deploying-clickonce-application-reference-in-the-manifest-does-not-match"&gt;StackOverFlow.com&lt;/a&gt;]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2295828720668627162?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2295828720668627162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/09/reference-in-manifest-does-not-match.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2295828720668627162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2295828720668627162'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/09/reference-in-manifest-does-not-match.html' title='Reference in the manifest does not match the identity of the downloaded assembly'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-450656297033944050</id><published>2011-09-01T02:18:00.000-07:00</published><updated>2011-09-01T02:18:11.247-07:00</updated><title type='text'>Reclaim/Move a Lost/Off-Screen Window in Windows 7</title><content type='html'>METHOD 1&lt;br /&gt;1. Alt-tab to lost window&lt;br /&gt;2. Right-click on icon for lost window in the task-bar - You may have to first hover over the icon (if it's pinned)&lt;br /&gt;3. Select 'Move' from the drop-down menu&lt;br /&gt;4. Hit any arrow key&lt;br /&gt;5. Move mouse to re-position&lt;br /&gt;&lt;br /&gt;METHOD 2&lt;br /&gt;1. Right-click on task-bar&lt;br /&gt;2. Select 'Cascade windows'&lt;br /&gt;&lt;br /&gt;METHOD 3&lt;br /&gt;1. Alt-tab to lost window&lt;br /&gt;2. Press Alt+space&lt;br /&gt;3. Press m&lt;br /&gt;4. Press any arrow key&lt;br /&gt;5. Move mouse to re-position&lt;br /&gt;&lt;br /&gt;[&lt;a href="http://www.howtogeek.com/howto/windows/bring-misplaced-off-screen-windows-back-to-your-desktop-keyboard-trick/"&gt;Courtesy of How-to Geek&lt;/a&gt;]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-450656297033944050?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/450656297033944050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/09/reclaimmove-lostoff-screen-window-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/450656297033944050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/450656297033944050'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/09/reclaimmove-lostoff-screen-window-in.html' title='Reclaim/Move a Lost/Off-Screen Window in Windows 7'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7668288279698660073</id><published>2011-08-13T10:47:00.000-07:00</published><updated>2011-08-13T10:54:10.006-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Installing Django Under Ubuntu 11-04</title><content type='html'>From the $ prompt of the terminal:&lt;br /&gt;&lt;br /&gt;$ sudo apt-get install python-django&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7668288279698660073?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7668288279698660073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/08/installing-django-under-ubuntu-11-04.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7668288279698660073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7668288279698660073'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/08/installing-django-under-ubuntu-11-04.html' title='Installing Django Under Ubuntu 11-04'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7427683755959825319</id><published>2011-08-08T11:17:00.000-07:00</published><updated>2011-08-11T06:16:04.944-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>TCP/IP Port Pipe - UNDER CONSTRUCTION</title><content type='html'>&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import optparse&lt;br /&gt;import socket, select, threading&lt;br /&gt;&lt;br /&gt;class Pipe(threading.Thread):&lt;br /&gt;&lt;br /&gt;  time_out = 5  &lt;br /&gt;  buffer_size = 4096&lt;br /&gt;  max_idle = 5&lt;br /&gt;  &lt;br /&gt;  def __init__(self, server_host, server_port, dclient_connxn):&lt;br /&gt;    &lt;br /&gt;    super(Pipe, self).__init__()&lt;br /&gt;    &lt;br /&gt;    self.server_host = server_host&lt;br /&gt;    self.server_port = server_port&lt;br /&gt;    self.server_addr = (server_host, server_port)&lt;br /&gt;    &lt;br /&gt;    self.client_connxn = client_connxn    &lt;br /&gt;    &lt;br /&gt;  def connect_to_server(self):&lt;br /&gt;    self.server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;    print(self.server_addr)&lt;br /&gt;    self.server_sock.connect(self.server_addr)&lt;br /&gt;&lt;br /&gt;  def log_request_response(self, req, resp):&lt;br /&gt;    print('request')&lt;br /&gt;    print(req)&lt;br /&gt;    print('response')&lt;br /&gt;    print(resp)&lt;br /&gt;    &lt;br /&gt;  def run(self):    &lt;br /&gt;    self.connect_to_server()&lt;br /&gt;    &lt;br /&gt;    to_read = [self.client_connxn, self.server_sock]&lt;br /&gt;    to_write = []&lt;br /&gt;    to_watch_for_exception = to_read&lt;br /&gt;    &lt;br /&gt;    request = ''&lt;br /&gt;    response = ''&lt;br /&gt;    &lt;br /&gt;    seconds_idle = 0&lt;br /&gt;    &lt;br /&gt;    while True:&lt;br /&gt;      (ready_to_read, ready_to_write, experienced_exception) = select.select(to_read, to_write, to_watch_for_exception, 1)&lt;br /&gt;      &lt;br /&gt;      if (experienced_exception):&lt;br /&gt;        self.log_request_response(request, response)  &lt;br /&gt;        self.client_connxn.close()&lt;br /&gt;        self.server_sock.close()&lt;br /&gt;        break&lt;br /&gt;      &lt;br /&gt;      if (ready_to_read):&lt;br /&gt;        seconds_idle = 0&lt;br /&gt;      &lt;br /&gt;        for waitable in ready_to_read:&lt;br /&gt;          data = waitable.recv(buffer_size)&lt;br /&gt;          if (waitable == self.client_connxn):&lt;br /&gt;            out = self.server_sock&lt;br /&gt;            request += data&lt;br /&gt;          else:&lt;br /&gt;            out = self.client_connxn&lt;br /&gt;            log_to = response&lt;br /&gt;            response += data&lt;br /&gt;          out.send(data)&lt;br /&gt;      &lt;br /&gt;      else:&lt;br /&gt;        seconds_idle += 1&lt;br /&gt;        if (seconds_idle == max_idle):&lt;br /&gt;          self.log_request_response(request, response)&lt;br /&gt;          self.client_connxn.close()&lt;br /&gt;          self.server_sock.close()&lt;br /&gt;          break    &lt;br /&gt;&lt;br /&gt;class PortListener():'''&lt;br /&gt;  &lt;br /&gt;  '''&lt;br /&gt;  def __init__(self, listen_on_port, pipe_to_host, pipe_to_port, max_connxns=1):&lt;br /&gt;    self.listen_on_port = listen_on_port&lt;br /&gt;    self.pipe_to_host = pipe_to_host&lt;br /&gt;    self.pipe_to_port = pipe_to_port&lt;br /&gt;&lt;br /&gt;  def listen():&lt;br /&gt;    &lt;br /&gt;    listen_to_addr = ('127.0.0.1', self.listen_to_port)&lt;br /&gt;    listen_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;    listen_socket.bind(listen_to_addr)&lt;br /&gt;    listen_socket.listen(max_connxns)&lt;br /&gt;&lt;br /&gt;    while True:&lt;br /&gt;      # pause until client requests connection&lt;br /&gt;      (client_connxn, client_addr) = listen_socket.accept()&lt;br /&gt;      pipe = Pipe(self.pipe_to_host, self.pipe_to_port, client_connxn)&lt;br /&gt;      pipe.start()&lt;br /&gt;&lt;br /&gt;def setup_info_logger(log_file_path):&lt;br /&gt;  logging.basicConfig(filename=log_file_path, level=logging.INFO)&lt;br /&gt;  return logging.getLogger()&lt;br /&gt;&lt;br /&gt;def parse_command_line():'''&lt;br /&gt;  parse command line argument to populate dictionary&lt;br /&gt;  return dictionary with keys = client_port, server_host, server_port, log_file_path&lt;br /&gt;  returns None if mandatory option missing&lt;br /&gt;  '''  &lt;br /&gt;  parser = optparse.OptionParser()&lt;br /&gt;  parser.add_option('--clientport', dest='client_port', help='port client to this port on localhost')&lt;br /&gt;  parser.add_option('--serverhost', dest='server_host', help='server host, default = 127.0.0.1')&lt;br /&gt;  parser.add_option('--serverport', dest='server_port', help='server port')&lt;br /&gt;  parser.add_option('--logfilepath', dest='log_file_path', help='log file path')&lt;br /&gt;  &lt;br /&gt;  (options, args) = parser.parse_args()    &lt;br /&gt;  &lt;br /&gt;  if (options.client_port == None):&lt;br /&gt;    print('--clientport is mandatory')&lt;br /&gt;    return None&lt;br /&gt;  if (options.server_port == None):&lt;br /&gt;    print('--serverport is mandatory')&lt;br /&gt;    return None&lt;br /&gt;&lt;br /&gt;  d = {}&lt;br /&gt;  &lt;br /&gt;  if (options.log_file != None): d['log_file'] = options.log_file&lt;br /&gt;  else: d['log_file'] = None  &lt;br /&gt;  &lt;br /&gt;  d['client_port'] = options.client_port&lt;br /&gt;  &lt;br /&gt;  if (options.server_host != None): d['server_host'] = options.server_host&lt;br /&gt;  else: d['server_host'] = '127.0.0.1'&lt;br /&gt;  &lt;br /&gt;  d['server_port'] = options.server_port    &lt;br /&gt;  &lt;br /&gt;  return d&lt;br /&gt;&lt;br /&gt;def main():&lt;br /&gt;  opt = parse_command_line()&lt;br /&gt;  logger = None&lt;br /&gt;  if (opt['log_file_path'] != None):&lt;br /&gt;    logger = setup_info_logger(opt['log_file_path'])&lt;br /&gt;  listener = PortListener(opt['client_port'], opt['server_host'], opt['server_port']] &lt;br /&gt;&lt;br /&gt;if (__name__ == '__main__'):&lt;br /&gt;  main()&lt;br /&gt;&lt;/code&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/1227041388185782445-7427683755959825319?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7427683755959825319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/08/tcpip-port-pipe-under-construction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7427683755959825319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7427683755959825319'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/08/tcpip-port-pipe-under-construction.html' title='TCP/IP Port Pipe - UNDER CONSTRUCTION'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5237404721422705309</id><published>2011-08-07T11:15:00.000-07:00</published><updated>2011-08-07T11:17:43.718-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='port'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='tcpip'/><title type='text'>Python TCP/IP Port Trickery</title><content type='html'>&lt;a href="http://www.kellbot.com/"&gt;KellBot&lt;/a&gt; - &lt;a href="http://www.kellbot.com/2010/02/tutorial-writing-a-tcp-server-in-python/"&gt;Tutorial: Writing a TCP server in Python&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5237404721422705309?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5237404721422705309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/08/python-tcpip-port-trickery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5237404721422705309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5237404721422705309'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/08/python-tcpip-port-trickery.html' title='Python TCP/IP Port Trickery'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-9211927212040568470</id><published>2011-08-06T02:13:00.000-07:00</published><updated>2011-08-06T02:16:29.024-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='proxy'/><title type='text'>SUZUKI Hisao's - TinyProxy - Python HTTP Proxy</title><content type='html'>&lt;a href="http://www.oki-osk.jp/esc/python/proxy/"&gt;Original Site&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Script reproduced without permission:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh -&lt;br /&gt;"exec" "python" "-O" "$0" "$@"&lt;br /&gt;&lt;br /&gt;__doc__ = """Tiny HTTP Proxy.&lt;br /&gt;&lt;br /&gt;This module implements GET, HEAD, POST, PUT and DELETE methods&lt;br /&gt;on BaseHTTPServer, and behaves as an HTTP proxy.  The CONNECT&lt;br /&gt;method is also implemented experimentally, but has not been&lt;br /&gt;tested yet.&lt;br /&gt;&lt;br /&gt;Any help will be greatly appreciated.  SUZUKI Hisao&lt;br /&gt;"""&lt;br /&gt;&lt;br /&gt;__version__ = "0.2.1"&lt;br /&gt;&lt;br /&gt;import BaseHTTPServer, select, socket, SocketServer, urlparse&lt;br /&gt;&lt;br /&gt;class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):&lt;br /&gt;    __base = BaseHTTPServer.BaseHTTPRequestHandler&lt;br /&gt;    __base_handle = __base.handle&lt;br /&gt;&lt;br /&gt;    server_version = "TinyHTTPProxy/" + __version__&lt;br /&gt;    rbufsize = 0                        # self.rfile Be unbuffered&lt;br /&gt;&lt;br /&gt;    def handle(self):&lt;br /&gt;        (ip, port) =  self.client_address&lt;br /&gt;        if hasattr(self, 'allowed_clients') and ip not in self.allowed_clients:&lt;br /&gt;            self.raw_requestline = self.rfile.readline()&lt;br /&gt;            if self.parse_request(): self.send_error(403)&lt;br /&gt;        else:&lt;br /&gt;            self.__base_handle()&lt;br /&gt;&lt;br /&gt;    def _connect_to(self, netloc, soc):&lt;br /&gt;        i = netloc.find(':')&lt;br /&gt;        if i &gt;= 0:&lt;br /&gt;            host_port = netloc[:i], int(netloc[i+1:])&lt;br /&gt;        else:&lt;br /&gt;            host_port = netloc, 80&lt;br /&gt;        print "\t" "connect to %s:%d" % host_port&lt;br /&gt;        try: soc.connect(host_port)&lt;br /&gt;        except socket.error, arg:&lt;br /&gt;            try: msg = arg[1]&lt;br /&gt;            except: msg = arg&lt;br /&gt;            self.send_error(404, msg)&lt;br /&gt;            return 0&lt;br /&gt;        return 1&lt;br /&gt;&lt;br /&gt;    def do_CONNECT(self):&lt;br /&gt;        soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;        try:&lt;br /&gt;            if self._connect_to(self.path, soc):&lt;br /&gt;                self.log_request(200)&lt;br /&gt;                self.wfile.write(self.protocol_version +&lt;br /&gt;                                 " 200 Connection established\r\n")&lt;br /&gt;                self.wfile.write("Proxy-agent: %s\r\n" % self.version_string())&lt;br /&gt;                self.wfile.write("\r\n")&lt;br /&gt;                self._read_write(soc, 300)&lt;br /&gt;        finally:&lt;br /&gt;            print "\t" "bye"&lt;br /&gt;            soc.close()&lt;br /&gt;            self.connection.close()&lt;br /&gt;&lt;br /&gt;    def do_GET(self):&lt;br /&gt;        (scm, netloc, path, params, query, fragment) = urlparse.urlparse(&lt;br /&gt;            self.path, 'http')&lt;br /&gt;        if scm != 'http' or fragment or not netloc:&lt;br /&gt;            self.send_error(400, "bad url %s" % self.path)&lt;br /&gt;            return&lt;br /&gt;        soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;        try:&lt;br /&gt;            if self._connect_to(netloc, soc):&lt;br /&gt;                self.log_request()&lt;br /&gt;                soc.send("%s %s %s\r\n" % (&lt;br /&gt;                    self.command,&lt;br /&gt;                    urlparse.urlunparse(('', '', path, params, query, '')),&lt;br /&gt;                    self.request_version))&lt;br /&gt;                self.headers['Connection'] = 'close'&lt;br /&gt;                del self.headers['Proxy-Connection']&lt;br /&gt;                for key_val in self.headers.items():&lt;br /&gt;                    soc.send("%s: %s\r\n" % key_val)&lt;br /&gt;                soc.send("\r\n")&lt;br /&gt;                self._read_write(soc)&lt;br /&gt;        finally:&lt;br /&gt;            print "\t" "bye"&lt;br /&gt;            soc.close()&lt;br /&gt;            self.connection.close()&lt;br /&gt;&lt;br /&gt;    def _read_write(self, soc, max_idling=20):&lt;br /&gt;        iw = [self.connection, soc]&lt;br /&gt;        ow = []&lt;br /&gt;        count = 0&lt;br /&gt;        while 1:&lt;br /&gt;            count += 1&lt;br /&gt;            (ins, _, exs) = select.select(iw, ow, iw, 3)&lt;br /&gt;            if exs: break&lt;br /&gt;            if ins:&lt;br /&gt;                for i in ins:&lt;br /&gt;                    if i is soc:&lt;br /&gt;                        out = self.connection&lt;br /&gt;                    else:&lt;br /&gt;                        out = soc&lt;br /&gt;                    data = i.recv(8192)&lt;br /&gt;                    if data:&lt;br /&gt;                        out.send(data)&lt;br /&gt;                        count = 0&lt;br /&gt;            else:&lt;br /&gt;                print "\t" "idle", count&lt;br /&gt;            if count == max_idling: break&lt;br /&gt;&lt;br /&gt;    do_HEAD = do_GET&lt;br /&gt;    do_POST = do_GET&lt;br /&gt;    do_PUT  = do_GET&lt;br /&gt;    do_DELETE=do_GET&lt;br /&gt;&lt;br /&gt;class ThreadingHTTPServer (SocketServer.ThreadingMixIn,&lt;br /&gt;                           BaseHTTPServer.HTTPServer): pass&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    from sys import argv&lt;br /&gt;    if argv[1:] and argv[1] in ('-h', '--help'):&lt;br /&gt;        print argv[0], "[port [allowed_client_name ...]]"&lt;br /&gt;    else:&lt;br /&gt;        if argv[2:]:&lt;br /&gt;            allowed = []&lt;br /&gt;            for name in argv[2:]:&lt;br /&gt;                client = socket.gethostbyname(name)&lt;br /&gt;                allowed.append(client)&lt;br /&gt;                print "Accept: %s (%s)" % (client, name)&lt;br /&gt;            ProxyHandler.allowed_clients = allowed&lt;br /&gt;            del argv[2:]&lt;br /&gt;        else:&lt;br /&gt;            print "Any clients will be served..."&lt;br /&gt;        BaseHTTPServer.test(ProxyHandler, ThreadingHTTPServer)&lt;br /&gt;&lt;/code&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/1227041388185782445-9211927212040568470?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/9211927212040568470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/08/suzuki-hisaos-tinyproxy-python-http.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/9211927212040568470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/9211927212040568470'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/08/suzuki-hisaos-tinyproxy-python-http.html' title='SUZUKI Hisao&apos;s - TinyProxy - Python HTTP Proxy'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5249246818028669339</id><published>2011-08-03T03:28:00.000-07:00</published><updated>2011-08-03T03:29:19.726-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>W3 Schools' XML Validation Tool</title><content type='html'>&lt;a href="http://www.w3schools.com/dom/dom_validate.asp"&gt;W3 Schools' XML Document Validator&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5249246818028669339?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5249246818028669339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/08/w3-schools-xml-validation-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5249246818028669339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5249246818028669339'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/08/w3-schools-xml-validation-tool.html' title='W3 Schools&apos; XML Validation Tool'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6510433252769336139</id><published>2011-07-22T03:40:00.000-07:00</published><updated>2011-08-03T03:30:31.082-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='mssql'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>MS SQL Server - Clear Cache - for Query Timing</title><content type='html'>[Using MS-SQL Server] When timing a query for the purposes of optimization, the query may well run quicker on re-execution subsequent to the initial execution - due to caching by the db engine.&lt;br /&gt;&lt;br /&gt;In order to meaningfully compare execution time across optimization attempts, the cache needs to be cleared, and this can be done by executing&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;DBCC DROPCLEANBUFFERS   &lt;br /&gt;DBCC FREEPROCCACHE&lt;br /&gt;go&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;between query timings.&lt;br /&gt;&lt;br /&gt;To turn query timing on - &lt;code&gt;SET STATISTICS TIME ON&lt;/code&gt;&lt;br /&gt;To turn query timing off - &lt;code&gt;STATISTICS TIME OFF&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6510433252769336139?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6510433252769336139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/07/ms-sql-server-clear-cache-for-query.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6510433252769336139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6510433252769336139'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/07/ms-sql-server-clear-cache-for-query.html' title='MS SQL Server - Clear Cache - for Query Timing'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7448465852424339286</id><published>2011-03-16T02:24:00.000-07:00</published><updated>2011-03-16T07:12:00.955-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='south-africa'/><category scheme='http://www.blogger.com/atom/ns#' term='direct-marketing'/><title type='text'>South African Direct Marketing Opt-Out List</title><content type='html'>To register for the OptOut list for South African direct marketing:&lt;br /&gt;&lt;br /&gt;SMS the letters DMA followed by your RSA ID number, to 34385.&lt;br /&gt;&lt;br /&gt;or phone the RSA call centre on&lt;br /&gt;&lt;br /&gt;0861 OPT OUT&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7448465852424339286?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7448465852424339286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/03/south-african-direct-marketing-opt-out.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7448465852424339286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7448465852424339286'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/03/south-african-direct-marketing-opt-out.html' title='South African Direct Marketing Opt-Out List'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-311512524346944254</id><published>2011-02-06T05:42:00.001-08:00</published><updated>2011-02-06T05:43:03.312-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Recursive Delete Folder &amp; Files in Linux</title><content type='html'>rm -Rf *&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;rm -Rf rootfolder&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-311512524346944254?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/311512524346944254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/02/recursive-delete-folder-files-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/311512524346944254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/311512524346944254'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/02/recursive-delete-folder-files-in-linux.html' title='Recursive Delete Folder &amp; Files in Linux'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6228925080435186259</id><published>2011-01-22T05:27:00.000-08:00</published><updated>2011-01-22T05:29:24.588-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Export Create Table Script in mySQL</title><content type='html'>SHOW CREATE TABLE TableName;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6228925080435186259?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6228925080435186259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/export-create-table-script-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6228925080435186259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6228925080435186259'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/export-create-table-script-in-mysql.html' title='Export Create Table Script in mySQL'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5768798545329962977</id><published>2011-01-20T00:40:00.001-08:00</published><updated>2011-01-20T00:42:25.546-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='disk'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>SpaceSniffer - Drive Space Allocation Mapping</title><content type='html'>If you're looking for a quick and easy disk space mapper, then I suggest &lt;a href="http://www.uderzo.it/main_products/space_sniffer/index.html"&gt;SpaceSniffer&lt;/a&gt; from &lt;a href="http://www.uderzo.it/"&gt;Uderzo&lt;/a&gt; - it's a small download, runs fast, and has decent visualization.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5768798545329962977?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5768798545329962977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/spacesniffer-drive-space-allocation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5768798545329962977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5768798545329962977'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/spacesniffer-drive-space-allocation.html' title='SpaceSniffer - Drive Space Allocation Mapping'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2189414492373155111</id><published>2011-01-12T09:39:00.000-08:00</published><updated>2011-08-08T10:18:23.956-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>dotNet eMail</title><content type='html'>assembly: System.Net.Mail&lt;br /&gt;classes: MailMessage, SmtpClient&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/31679c87-ca07-40e0-a299-fd77096b6d47"&gt;MSDN Social thread&lt;/a&gt;: &lt;br /&gt;&lt;br /&gt;public static extern IntPtr ShellExecute(&lt;br /&gt;  IntPtr hwnd, &lt;br /&gt;  string lpOperation,     &lt;br /&gt;  string lpFile, &lt;br /&gt;  string lpParameters, &lt;br /&gt;  string lpDirectory, &lt;br /&gt;  int nShowCmd); &lt;br /&gt; &lt;br /&gt;Public static void LaunchEmailClient(string mailURL) &lt;br /&gt;{�&lt;br /&gt;  ShellExecute(IntPtr.Zero, "open", mailURL, "", "", 4); &lt;br /&gt;} &lt;br /&gt; &lt;br /&gt;You can refer http://msdn.microsoft.com/en-us/library/bb762153.aspx &lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&lt;Frame&gt; &lt;br /&gt;    &lt;Frame.Content&gt; &lt;br /&gt;        &lt;TextBlock&gt;&lt;Hyperlink NavigateUri="mailto:address@email.com"&gt;Contact Us&lt;/Hyperlink&gt;&lt;/TextBlock&gt;  &lt;br /&gt;    &lt;/Frame.Content&gt; &lt;br /&gt;&lt;/Frame&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/1227041388185782445-2189414492373155111?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2189414492373155111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/dotnet-email.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2189414492373155111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2189414492373155111'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/dotnet-email.html' title='dotNet eMail'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-8560950992016852410</id><published>2011-01-11T04:23:00.000-08:00</published><updated>2011-01-11T05:29:46.771-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='UI'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Animated Icons/Images in WPF</title><content type='html'>&lt;a href="http://social.msdn.microsoft.com/Forums/en/wpf/thread/93d50a97-0d8d-4b18-992e-cd3200693337"&gt;MediaElement Option&lt;/a&gt;&lt;br /&gt;&amp;lt;MediaElement Source="animated.gif"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa970069.aspx"&gt;MSDN Article on Pack URI's&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-8560950992016852410?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/8560950992016852410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/animated-iconsimages-in-wpf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8560950992016852410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8560950992016852410'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/animated-iconsimages-in-wpf.html' title='Animated Icons/Images in WPF'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-950600262268228689</id><published>2011-01-11T03:23:00.000-08:00</published><updated>2011-01-11T04:22:20.662-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Stepping Through VS2010 Tests</title><content type='html'>&lt;a href="http://geekswithblogs.net/KirstinJ/archive/2008/06/06/visual-studio-team-system-how-to-set-a-breakpoint-and.aspx"&gt;KirstinJ's Trick&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-950600262268228689?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/950600262268228689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/stepping-through-vs2010-tests.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/950600262268228689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/950600262268228689'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/stepping-through-vs2010-tests.html' title='Stepping Through VS2010 Tests'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4901802749899232965</id><published>2011-01-10T06:51:00.001-08:00</published><updated>2011-01-11T01:13:17.264-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Taunting dotNET - Rhino Mocks</title><content type='html'>RhinoMocks is a best-practice Object Mocking Framework for dotNET written by uber-dev Ayende Rahien.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ayende.com/projects/rhino-mocks.aspx"&gt;Official RhinoMocks Page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Central Forum - &lt;a href="http://groups.google.com/group/RhinoMocks"&gt;Google Group&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Good Intro Examples&lt;br /&gt;- &lt;a href="http://stephenwalther.com/blog/archive/2008/03/23/tdd-introduction-to-rhino-mocks.aspx"&gt;Stephen Walther&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;http://en.wikibooks.org/wiki/How_to_Use_Rhino_Mocks/Introduction&lt;br /&gt;http://www.ayende.com/wiki/Rhino+Mocks+Introduction.ashx&lt;br /&gt;http://en.wikibooks.org/wiki/How_to_Use_Rhino_Mocks/Introduction&lt;br /&gt;http://house9-code-samples.blogspot.com/2008/02/rhinomocks-basics.html&lt;br /&gt;&lt;br /&gt;&lt;a href="http://martinfowler.com/articles/mocksArentStubs.html"&gt;Martin Fowler - Mocks/Behaviour vs Stubs/State Testing&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;... I've also adjusted my vocabulary to match that of the Gerard Meszaros's xUnit patterns book...  Meszaros uses the term Test Double as the generic term for any kind of pretend object used in place of a real object for testing purposes... Meszaros then defined four particular kinds of double:&lt;br /&gt;&lt;br /&gt;- DUMMY objects are passed around but never actually used. Usually they are just used to fill parameter lists.&lt;br /&gt;- FAKE objects actually have working implementations, but usually take some shortcut which makes them not suitable for production (an in memory database is a good example).&lt;br /&gt;- STUBS provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test. Stubs may also record information about calls, such as an email gateway stub that remembers the messages it 'sent', or maybe only how many messages it 'sent'.&lt;br /&gt;- MOCKS are what we are talking about here: objects pre-programmed with expectations which form a specification of the calls they are expected to receive.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4901802749899232965?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4901802749899232965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/taunting-dotnet-rhino-mocks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4901802749899232965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4901802749899232965'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/taunting-dotnet-rhino-mocks.html' title='Taunting dotNET - Rhino Mocks'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7119980569378022869</id><published>2011-01-09T09:11:00.001-08:00</published><updated>2011-01-09T09:12:55.576-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Komodo Edit - light-weight Python IDE - Ubuntu Linux</title><content type='html'>&lt;a href="http://usefulubuntu.blogspot.com/2009/03/installing-komodo-edit-5.html"&gt;Installing under Ubuntu&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7119980569378022869?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7119980569378022869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/komodo-edit-light-weight-python-ide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7119980569378022869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7119980569378022869'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/komodo-edit-light-weight-python-ide.html' title='Komodo Edit - light-weight Python IDE - Ubuntu Linux'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5978354790284805567</id><published>2011-01-08T05:28:00.000-08:00</published><updated>2011-01-13T05:43:25.579-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>CPU &amp; Memory Info in Linux</title><content type='html'>cat /proc/meminfo&lt;br /&gt;cat /proc/cpuinfo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5978354790284805567?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5978354790284805567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/cpu-memory-info-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5978354790284805567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5978354790284805567'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/cpu-memory-info-in-linux.html' title='CPU &amp; Memory Info in Linux'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5903783626010346401</id><published>2011-01-08T02:27:00.000-08:00</published><updated>2011-12-31T09:04:24.110-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='X100e'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu 10-10 on the Lenovo X100e ThinkPad</title><content type='html'>Installing Ubuntu Netbook Edition 10-10 Maverick Meerkat on the Lenovo X100e ThinkPad&lt;br /&gt;&lt;br /&gt;I unsuccessfully attempted to use the &lt;a href="http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/"&gt;PenDrive Universal Linux USB Installer&lt;/a&gt;, as recommended by &lt;a href="http://www.ubuntu.com/desktop/get-ubuntu/download"&gt;the official 10-10 download page&lt;/a&gt;, as well as the USB Disk Creator from an older (9-10) live CD.&lt;br /&gt;&lt;br /&gt;Specifically, I encountered the problem outlined &lt;a href="https://bugs.launchpad.net/ubuntu/+source/syslinux/+bug/617779"&gt;here&lt;/a&gt;, namely&lt;br /&gt;&lt;br /&gt;&lt;i&gt;SYSLINUX 4.01 debian-20100714 EDD Copyright (C) 1994-2010 H. Peter Anvin et al&lt;br /&gt;Unknown keyword in configuration file: gfxboot&lt;br /&gt;boot:&lt;br /&gt;vesamenu.c32: not a COM32R image&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Various attempts at implementing suggested solutions failed, and so in the end I tried using &lt;a href="http://unetbootin.sourceforge.net/"&gt;UNetBootIn&lt;/a&gt; to create the USB bootable install, which has worked perfectly.&lt;br /&gt;&lt;br /&gt;Importantly, the wireless LAN is seamlessly detected and operated by 10-10.&lt;br /&gt;&lt;br /&gt;INSTALL/GENERAL&lt;br /&gt;- &lt;a href="http://justinsomnia.org/2010/02/ubuntu-on-a-lenovo-thinkpad-x100e/"&gt;justinsomnia&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://petehowe.co.uk/2010/11/19/ubuntu-maverick-10-10-on-the-lenovo-thinkpad-x100e/"&gt;petehowe&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.semiantics.com/?p=338"&gt;semiantics&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;WLAN&lt;br /&gt;- &lt;a href="http://www.nulldevice.de/2010/06/wwan-lenovo-thinkpad-x100e-ubuntu-10-04/"&gt;nulldevice&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.how-to-linux.com/2010/04/think-pad-x100e-wireless-card/"&gt;how-to-linux&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;OPTIMISATION&lt;br /&gt;- &lt;a href="http://thinkpad-x100e.blogspot.com/2010/05/how-to-speed-up-ubuntu-910-on-x100e.html"&gt;how-to-speed-up-ubuntu-910-on-x100e&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;10-10 Specific&lt;br /&gt;- &lt;a href="http://greeennotebook.com/2010/10/customize-your-fresh-ubuntu-10-10-maverick-meerkat-installation/"&gt;Customize 10-10&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10-04&lt;br /&gt;- &lt;a href="http://blog.karssen.org/2010/09/12/lenovo-thinkpad-x100e-and-ubuntu-10-04/"&gt;karssen.com&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://helmi-blebe.blogspot.com/2010/04/ubuntu-in-thinkpad-x100e.html"&gt;helmi-blebe&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.my-guides.net/en/guides/linux/193-ubuntu-lucid-lynx-1004-post-installation-guide"&gt;decent post install guide&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A Brief Review&lt;/b&gt;&lt;br /&gt;Meerkat runs quite smoothly on my X100e with 2 MB or RAM.  UI response is quite snappy, except for the Ubuntu button and following OS search functionality, which runs _very_ slowly for some unknown reason.  Google Chromium runs v.fast. With the screen on bright, and the wireless lan card in use, you can literally watch the batter drain, and you'll get somewhere just under an hour.  I can't get the proprietary video drivers to work under the std 32bit x86 binaries.  I must try the AMD64bit binaries.  All in all, quite happy.  In terms of performance, I can listen to music in the background via rhythmbox, have a chrome instance open with a couple of tabs, and then develop python using Geany and the console, with no problems.  The smart terminal has arrived.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UpDate 11-04&lt;/b&gt;&lt;br /&gt;11-04 runs faster and smoother, with no more lag on using the Ubuntu button/OS search functionality. &amp;nbsp;Prooprietary graphics drivers installed and run ok.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5903783626010346401?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5903783626010346401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/ubuntu-on-lenovo-x100e-thinkpad.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5903783626010346401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5903783626010346401'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/ubuntu-on-lenovo-x100e-thinkpad.html' title='Ubuntu 10-10 on the Lenovo X100e ThinkPad'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1020185850662840918</id><published>2011-01-07T00:29:00.000-08:00</published><updated>2011-01-12T09:51:49.526-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='exception'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Global Exception Catching in WPF</title><content type='html'>&lt;b&gt;AppDomain.UnhandledException&lt;/b&gt;&lt;br /&gt;- all threads in the AppDomain&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx"&gt;MSDN&lt;/a&gt;&lt;br /&gt;&lt;b&gt;Dispatcher.UnhandledException&lt;/b&gt;&lt;br /&gt;- single specific UI dispatcher thread.&lt;br /&gt;&lt;b&gt;Application.DispatcherUnhandledException&lt;/b&gt;&lt;br /&gt;- main UI dispatcher thread in your WPF application&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.application.dispatcherunhandledexception.aspx"&gt;MSDN&lt;/a&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/793100/globally-catch-exceptions-in-a-wpf-application"&gt;stackoverflow&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/forums/en-US/wpf/thread/c57cac13-f960-49a1-94b5-a3fd316ac4bc/"&gt;Kent Boogaart&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Application.DispatcherUnhandledException is only raised if the exception was raised on the UI thread, whereas AppDomain.UnhandledException is raised for exceptions that occur on background threads. Typically I attach to both and run similar handling code. The only difference is that DispatcherUnhandledException allows you to "recover" by setting Handled to true. In other words, you could prompt your user to see whether they'd like to attempt to continue running (and potentially avoid data loss).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms228965.aspx"&gt;Exceptions in Managed Threads&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.application.dispatcherunhandledexception.aspx"&gt;MSDN&lt;/a&gt;&lt;br /&gt;&lt;i&gt;If an exception is not handled on either a background user interface (UI) thread (a thread with its own Dispatcher) or a background worker thread (a thread without a Dispatcher), the exception is not forwarded to the main UI thread. Consequently, DispatcherUnhandledException is not raised. In these circumstances, you will need to write code to do the following:&lt;br /&gt;&lt;br /&gt;- Handle exceptions on the background thread.&lt;br /&gt;- Dispatch those exceptions to the main UI thread.&lt;br /&gt;- Rethrow them on the main UI thread without handling them to allow DispatcherUnhandledException to be raised.&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;---&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Example of Subscribing to AppDomain.CurrentDomain.UnhandledException&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;App.xaml.cs:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;protected override void OnStartup(StartupEventArgs e)&lt;br /&gt;{&lt;br /&gt;AppDomain.CurrentDomain.UnhandledException += new&lt;br /&gt;  UnhandledExceptionEventHandler(this.AppDomainUnhandledExceptionHandler);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void AppDomainUnhandledExceptionHandler&lt;br /&gt;(object sender, UnhandledExceptionEventArgs ea)&lt;br /&gt;{&lt;br /&gt;// handle the exception&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/1227041388185782445-1020185850662840918?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1020185850662840918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2011/01/global-exception-catching-in-wpf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1020185850662840918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1020185850662840918'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2011/01/global-exception-catching-in-wpf.html' title='Global Exception Catching in WPF'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6402794756629802381</id><published>2010-12-28T04:15:00.000-08:00</published><updated>2010-12-28T04:16:33.511-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Fluent API's</title><content type='html'>Martin Fowler coins the phrase&lt;br /&gt;http://martinfowler.com/bliki/FluentInterface.html&lt;br /&gt;&lt;br /&gt;Wikipedia&lt;br /&gt;http://en.wikipedia.org/wiki/Fluent_interface&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6402794756629802381?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6402794756629802381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/fluent-apis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6402794756629802381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6402794756629802381'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/fluent-apis.html' title='Fluent API&apos;s'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5018020571725834053</id><published>2010-12-27T23:41:00.000-08:00</published><updated>2010-12-27T23:54:11.061-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='config'/><title type='text'>Enable/Disable Windows Proxy</title><content type='html'>http://ozansafi.wordpress.com/2009/07/05/enabledisable-change-ie-proxy-by-scriptprogrammatically/&lt;br /&gt;&lt;br /&gt;To disable proxy:&lt;br /&gt;&lt;br /&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&lt;br /&gt;[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] &lt;br /&gt;"ProxyEnable"=dword:00000000&lt;br /&gt;&lt;br /&gt;To enable proxy:&lt;br /&gt;&lt;br /&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&lt;br /&gt;[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] &lt;br /&gt;"ProxyEnable"=dword:00000001&lt;br /&gt;&lt;br /&gt;To change proxy:&lt;br /&gt;&lt;br /&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&lt;br /&gt;[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] &lt;br /&gt;"MigrateProxy"=dword:00000001 &lt;br /&gt;"ProxyEnable"=dword:00000001 &lt;br /&gt;"ProxyHttp1.1"=dword:00000000 &lt;br /&gt;"ProxyServer"="http://ProxyServername:80" &lt;br /&gt;"ProxyOverride"="&lt;local&gt;"&lt;br /&gt;&lt;br /&gt;Copy these to a .reg file and double click on them to do the trick.  The good part of doing it this way is that it works on every IE version(well, I haven’t tried any IE lower than IE6  and it is able to change it without even opening up anything.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5018020571725834053?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5018020571725834053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/enabledisable-windows-proxy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5018020571725834053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5018020571725834053'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/enabledisable-windows-proxy.html' title='Enable/Disable Windows Proxy'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-3315573952338018238</id><published>2010-12-24T02:00:00.001-08:00</published><updated>2010-12-24T03:53:33.473-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vs2010'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>VS2010 Client Profile - Namespace Reference Invalid After Build</title><content type='html'>So this is the scenario, in a project, add a reference to an assembly, then declare a variable of a type from the newly referenced assembly.  Then type in the declaration, and you get the usual blue squiggly line.  If you right-click then you get the option to add a 'using' reference to my assembly, and then bobs-your-uncle, all is good...&lt;br /&gt;&lt;br /&gt;Until, you try to build the project, then for some ungodly reason VS no longer regards the namepace inclusion as valid, and spits out a &lt;br /&gt;&lt;br /&gt;Error 377&lt;br /&gt;The type or namespace name 'xx' could not be found (are you missing a using directive or an assembly reference?) &lt;br /&gt;&lt;br /&gt;error, referring to exactly the same assembly ref that it just suggested be included.&lt;br /&gt;&lt;br /&gt;This is, apparently, a dotNET 4 Client Profile Issue.&lt;br /&gt;&lt;br /&gt;http://www.go4answers.com/Example/lost-references-while-building-project-143531.aspx&lt;br /&gt;http://msdn.microsoft.com/en-us/library/cc668079.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-3315573952338018238?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/3315573952338018238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/vs2010-client-profile-namespace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3315573952338018238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3315573952338018238'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/vs2010-client-profile-namespace.html' title='VS2010 Client Profile - Namespace Reference Invalid After Build'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-788502642668267280</id><published>2010-12-17T03:46:00.001-08:00</published><updated>2011-01-25T00:51:54.174-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inversion_of_control'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>MS Castle Windsor [IOC Container] Cheat-Sheet</title><content type='html'>Martin Fowler&lt;br /&gt;&lt;a href="http://martinfowler.com/articles/injection.html"&gt;IOC Containers and the Dependency Injection pattern&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Wiki:  &lt;a href="http://stw.castleproject.org/Default.aspx?Page=MainPage&amp;NS=Windsor&amp;AspxAutoDetectCookieSupport=1"&gt;Castle Windsor&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Fluent API&lt;/b&gt;&lt;br /&gt;&lt;a href="http://using.castleproject.org/display/IoC/Fluent+Registration+API"&gt;Fluent Registration API&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSTANCE REGISTRATION&lt;/b&gt;&lt;br /&gt;- &lt;a href="http://stackoverflow.com/questions/90976/can-you-register-an-existing-instance-of-a-type-in-the-windsor-container"&gt;Can you register an existing instance of a type?&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://bjdavidson.wordpress.com/2010/03/22/castle-windsor-registering-existing-object-instances/"&gt;Castle Windsor – Registering Existing Object Instances&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://stackoverflow.com/questions/90976/can-you-register-an-existing-instance-of-a-type-in-the-windsor-container"&gt;Can you register an existing instance of a type in the container?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;REGISTRATION &amp; RESOLUTION OF NAMED INSTANCE&lt;br /&gt;&lt;br /&gt;IWindsorContainer.Register(Component.For&amp;lt;ClassType&amp;gt;().Named("instanceKey").Instance(instanceOfClassType));&lt;br /&gt;&lt;br /&gt;ClassType retrievedInstance = IWindsorContainer.Resolve&lt;ClassType&gt;("instanceKey");&lt;br /&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/4227535/castle-windsor-resolve-named-instance-and-unnamed-instance-incorrect"&gt;StackOverflow Thread&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;REGISTER &amp; RESOLVE BASED ON INTERFACE&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;Register Types Implementing Specified Interface:&lt;br /&gt;&lt;br /&gt;container.Register(&lt;br /&gt;  AllTypes.&lt;br /&gt;  FromThisAssembly(). // register all types from parent assembly&lt;br /&gt;  BasedOn&lt;IDialogService&gt;). // that inherit/implement interface IDialogService&lt;br /&gt;  WithService.FromInterface(). // allow resolution based on interface&lt;br /&gt;  Configure(c =&gt; c.LifeStyle.Is(LifestyleType.Transient)) // construct new&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;Resolve Instance of Class by Interface&lt;br /&gt;&lt;br /&gt;IDialogService dialogService = container.Resolve&lt;IDialogService&gt;();&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note on Registering/Resolving Generic Lists by Instance&lt;/b&gt;&lt;br /&gt;I have been unable to register &amp; resolve generic lists, e.g. List&lt;int&gt;, by instance.&lt;br /&gt;However, if you wrap the generic list in a custom class, e.g.&lt;br /&gt;&lt;br /&gt;public class IntList : List&lt;int&gt;&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;then you can register &amp; resolve by instance with no problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-788502642668267280?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/788502642668267280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/ms-castle-windsor-ioc-container-cheat.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/788502642668267280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/788502642668267280'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/ms-castle-windsor-ioc-container-cheat.html' title='MS Castle Windsor [IOC Container] Cheat-Sheet'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2080038005831629352</id><published>2010-12-14T05:56:00.001-08:00</published><updated>2010-12-14T05:56:28.845-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><title type='text'>Techniques for Debugging WPF</title><content type='html'>http://bea.stollnitz.com/blog/?p=52&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2080038005831629352?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2080038005831629352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/techniques-for-debugging-wpf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2080038005831629352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2080038005831629352'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/techniques-for-debugging-wpf.html' title='Techniques for Debugging WPF'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2620663798142459316</id><published>2010-12-13T03:39:00.000-08:00</published><updated>2010-12-13T04:13:54.790-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Re-Usable Controls in WPF</title><content type='html'>MSDN Article - Developing Reusable Controls with the Model-View-ViewModel Pattern&lt;br /&gt;http://blogs.msdn.com/b/nathannesbit/archive/2009/03/13/developing-reusable-controls-with-the-model-view-viewmodel-pattern.aspx&lt;br /&gt;&lt;br /&gt;WPF: Binding to Properties in your UserControl or Window&lt;br /&gt;http://decav.com/blogs/andre/archive/2007/05/27/wpf-binding-to-properties-in-your-usercontrol-or-window.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2620663798142459316?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2620663798142459316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/re-usable-controls-in-wpf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2620663798142459316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2620663798142459316'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/re-usable-controls-in-wpf.html' title='Re-Usable Controls in WPF'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-754745202600289206</id><published>2010-12-12T09:11:00.000-08:00</published><updated>2010-12-12T09:13:02.142-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='vs2010'/><title type='text'>unable to copy file to the process cannot access because in use another process visual studio</title><content type='html'>ISSUE&lt;br /&gt;&lt;br /&gt;vs2010 build error:  unable to copy file to the process cannot access because in use another process visual studio&lt;br /&gt;&lt;br /&gt;FIX&lt;br /&gt;&lt;br /&gt;add following lines of code to the pre-build event command line of your project.&lt;br /&gt;&lt;br /&gt;if exist "$(TargetPath).locked" del "$(TargetPath).locked"&lt;br /&gt;if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-754745202600289206?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/754745202600289206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/unable-to-copy-file-to-process-cannot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/754745202600289206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/754745202600289206'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/unable-to-copy-file-to-process-cannot.html' title='unable to copy file to the process cannot access because in use another process visual studio'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1084296702431311288</id><published>2010-12-08T04:15:00.000-08:00</published><updated>2010-12-08T04:16:54.093-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project_managment'/><title type='text'>Product Management</title><content type='html'>1. automated build server&lt;br /&gt;2. deployment history - date, version number (+svn), feature list&lt;br /&gt;3. bug/issue tracking&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-1084296702431311288?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1084296702431311288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/product-management.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1084296702431311288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1084296702431311288'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/product-management.html' title='Product Management'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5347119679196214481</id><published>2010-12-03T03:13:00.000-08:00</published><updated>2010-12-03T03:15:25.978-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='excel'/><title type='text'>Handling Excel Formula Errors</title><content type='html'>the ISERROR() worksheet function can be used to test whether a cell or formula yields an error, and then by combination with an IF() function allows a branched response.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5347119679196214481?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5347119679196214481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/12/handling-excel-formula-errors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5347119679196214481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5347119679196214481'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/12/handling-excel-formula-errors.html' title='Handling Excel Formula Errors'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4254254437371066499</id><published>2010-11-14T06:49:00.000-08:00</published><updated>2010-12-03T04:07:10.716-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fractal'/><category scheme='http://www.blogger.com/atom/ns#' term='graphing'/><title type='text'>text mother mandelbrot</title><content type='html'>zoom out ('Ctrl' + '-') on your browser to view the entire mandelbrot&lt;br /&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;&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;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------0---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------00--------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------00--------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------00--------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------0---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------000000-------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------000000-------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------000000000------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------0000000000-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------000000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------0000000000-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------0000000000-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------000000000-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------00000000------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------0000000------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------------------00000-------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------0--0---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------0---0-0-0000000000000---0-----------------------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------00--0000000000000000000-0-----------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------0------------00-0000000000000000000000--00-------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------0---------00000000000000000000000000-00-------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------0-00-------00000000000000000000000000-0-------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------000-----000000000000000000000000000000-------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------0000---00000000000000000000000000000000------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------00000--00000000000000000000000000000000000----00000-------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------00000-000000000000000000000000000000000000----00000-------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000--00000--------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000--00000--------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000-00000--------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000-----------------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000-----------------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000----------------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000----------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------000-000000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------0-----------------------------------00000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000000000000--0----------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000-00----------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000000000---------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------0-------00-----------------0000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------00------00-----------------0000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------000-----0-0--0------------00000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------000--000000000-----------000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------000000000000000-----------000000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------00000000000000000--------0000000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------0000000000000000--------00000000000000000000000000000000000000000000000000000000000000000---------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------000000000000000000------000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------0000000000000000000------000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------000000000000000000000-----000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------000000000000000000000-----000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------000000000000000000000000-----000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------000000000000000000000000---0000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------000000000000000000000000---00000000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------000000000000000000000000---000000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------0000000000000000000000000--000000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------00000000000000000000000000--000000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------00000000000000000000000000--00000000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------000000000000000000000000000-00000000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------000000000000000000000000000-00000000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------0000000000000000000000000000-00000000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------0-00--0000000000000000000000000000-0000000000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------0000--0000000000000000000000000000-0000000000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------00000-0000000000000000000000000000-0000000000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------00000-0000000000000000000000000000-000000000000000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------00000000000000000000000000000000000-00000000000000000000000000000000000000000000000000000000000----------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------0---------------------000000000000000000000000000000000000-0000000000000000000000000000000000000000000000000000000000-----------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000------------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------0---------------------000000000000000000000000000000000000-0000000000000000000000000000000000000000000000000000000000-----------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------00000000000000000000000000000000000-00000000000000000000000000000000000000000000000000000000000----------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------00000-0000000000000000000000000000-000000000000000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------00000-0000000000000000000000000000-0000000000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------0000--0000000000000000000000000000-0000000000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------0-00--0000000000000000000000000000-0000000000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------0000000000000000000000000000-00000000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------000000000000000000000000000-00000000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------000000000000000000000000000-00000000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------00000000000000000000000000--00000000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------00000000000000000000000000--000000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------0000000000000000000000000--000000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------000000000000000000000000---000000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------000000000000000000000000---00000000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------000000000000000000000000---0000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------000000000000000000000000-----000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------000000000000000000000-----000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------000000000000000000000-----000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------0000000000000000000------000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------000000000000000000------000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------0000000000000000--------00000000000000000000000000000000000000000000000000000000000000000---------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------00000000000000000--------0000000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------000000000000000-----------000000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------000--000000000-----------000000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------000-----0-0--0------------00000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------00------00-----------------0000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------0-------00-----------------0000000000000000000000000000000000000000000000000000000000000-----------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000000000000000------------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000000000000000000----------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000000000---------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000-00----------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000000000000--0----------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------0-----------------------------------00000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000000000000-------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------000-000000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000----------------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000----------------------------------------&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000-----------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000-----------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000---------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------00000000000000000000000000000000000000000000000--------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000-00000--------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------000000000000000000000000000000000000000000--00000--------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------0000000000000000000000000000000000000000000--00000--------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------00000-000000000000000000000000000000000000----00000-------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------00000--00000000000000000000000000000000000----00000-------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------0000---00000000000000000000000000000000------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------000-----000000000000000000000000000000-------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------0-00-------00000000000000000000000000-0-------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------0---------00000000000000000000000000-00-------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------0------------00-0000000000000000000000--00-------------------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------00--0000000000000000000-0-----------------------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------0---0-0-0000000000000---0-----------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------0--0---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------------------00000-------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------0000000------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------00000000------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------000000000-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------0000000000-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------0000000000-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------000000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------0000000000-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------00000000000----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------------000000000------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------000000-------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------------000000-------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------0---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------00--------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------00--------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------00--------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------0---------------------------------------------------------------&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;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;br /&gt;&lt;br /&gt;&lt;br /&gt;&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/1227041388185782445-4254254437371066499?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4254254437371066499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/11/text-mother-mandelbrot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4254254437371066499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4254254437371066499'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/11/text-mother-mandelbrot.html' title='text mother mandelbrot'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-768164068525300958</id><published>2010-11-14T06:34:00.000-08:00</published><updated>2010-11-14T06:44:19.413-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fractal'/><category scheme='http://www.blogger.com/atom/ns#' term='graphing'/><title type='text'>Text MandelBrot</title><content type='html'>&lt;pre size="6"&gt;&lt;br /&gt;------------------------------&lt;br /&gt;&lt;br /&gt;------------------------------&lt;br /&gt;&lt;br /&gt;--------------------00--------&lt;br /&gt;&lt;br /&gt;--------------------00--------&lt;br /&gt;&lt;br /&gt;-----------------0-0000-------&lt;br /&gt;&lt;br /&gt;-----------------00000000-----&lt;br /&gt;&lt;br /&gt;-----------------00000000-----&lt;br /&gt;&lt;br /&gt;----------------000000000-----&lt;br /&gt;&lt;br /&gt;------------000-000000000-----&lt;br /&gt;&lt;br /&gt;-----------0000-000000000-----&lt;br /&gt;&lt;br /&gt;-----0000000000000000000------&lt;br /&gt;&lt;br /&gt;-----------0000-000000000-----&lt;br /&gt;&lt;br /&gt;------------000-000000000-----&lt;br /&gt;&lt;br /&gt;----------------000000000-----&lt;br /&gt;&lt;br /&gt;-----------------00000000-----&lt;br /&gt;&lt;br /&gt;-----------------00000000-----&lt;br /&gt;&lt;br /&gt;-----------------0-0000-------&lt;br /&gt;&lt;br /&gt;--------------------00--------&lt;br /&gt;&lt;br /&gt;--------------------00--------&lt;br /&gt;&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/1227041388185782445-768164068525300958?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/768164068525300958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/11/text-mandelbrot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/768164068525300958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/768164068525300958'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/11/text-mandelbrot.html' title='Text MandelBrot'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4970543985990575921</id><published>2010-11-11T10:41:00.000-08:00</published><updated>2010-11-11T10:45:57.228-08:00</updated><title type='text'>pyGTK - Events &amp; Basic 3d</title><content type='html'>Below is the code for a little exercise in basic pyGTK event-handling and basic 3-d, overhauling some code I wrote yonks ago in Borland Turbo Pascal.&lt;br /&gt;&lt;br /&gt;dependencies: pyGTK&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;--- --- rot.py --- --- --- --- --- --- --- --- --- ---&lt;br /&gt;&lt;br /&gt;import math&lt;br /&gt;&lt;br /&gt;class Point2D(object):&lt;br /&gt;    def __init__(self, x=None,y=None):&lt;br /&gt;        self.x = x&lt;br /&gt;        self.y = y&lt;br /&gt;&lt;br /&gt;class Point3D(object):&lt;br /&gt;    def __init__(self, x=None,y=None,z=None):&lt;br /&gt;        self.x = x&lt;br /&gt;        self.y = y&lt;br /&gt;        self.z = z        &lt;br /&gt;&lt;br /&gt;class Rot(object):&lt;br /&gt;    &lt;br /&gt;    rad_const = math.pi / 180.0  &lt;br /&gt;    &lt;br /&gt;    def rad(self, theta):&lt;br /&gt;        return theta * Rot.rad_const    &lt;br /&gt;        &lt;br /&gt;    def __init__(self):&lt;br /&gt;        &lt;br /&gt;        self.sin_table = []&lt;br /&gt;        self.cos_table = []&lt;br /&gt;        &lt;br /&gt;        for d in range(360):&lt;br /&gt;            self.sin_table.append(math.sin(self.rad(d)))&lt;br /&gt;            self.cos_table.append(math.cos(self.rad(d)))&lt;br /&gt;        &lt;br /&gt;        for i in [1]: # points            &lt;br /&gt;            self.points = []        &lt;br /&gt;            for i in range(24):&lt;br /&gt;                self.points.append(Point3D())&lt;br /&gt;&lt;br /&gt;            self.points[0].x =  10.0 &lt;br /&gt;            self.points[0].z =   4.0&lt;br /&gt;            self.points[1].x =   4.0&lt;br /&gt;            self.points[1].z =  10.0&lt;br /&gt;            self.points[2].x =  -4.0 &lt;br /&gt;            self.points[2].z =  10.0&lt;br /&gt;            self.points[3].x = -10.0 &lt;br /&gt;            self.points[3].z =   4.0&lt;br /&gt;            self.points[4].x = -10.0 &lt;br /&gt;            self.points[4].z =  -4.0&lt;br /&gt;            self.points[5].x =  -4.0 &lt;br /&gt;            self.points[5].z = -10.0&lt;br /&gt;            self.points[6].x =   4.0 &lt;br /&gt;            self.points[6].z = -10.0&lt;br /&gt;            self.points[7].x =  10.0 &lt;br /&gt;            self.points[7].z =  -4.0&lt;br /&gt;&lt;br /&gt;            for i in range(8):&lt;br /&gt;                self.points[i].y = 30.0&lt;br /&gt;&lt;br /&gt;            for i in range(8, 16):&lt;br /&gt;                self.points[i].x = self.points[i - 8].x&lt;br /&gt;                self.points[i].z = self.points[i - 8].z&lt;br /&gt;                self.points[i].y = -30.0&lt;br /&gt;&lt;br /&gt;            self.points[16].x =  20.0&lt;br /&gt;            self.points[16].z =  20.0&lt;br /&gt;            self.points[17].x = -20.0&lt;br /&gt;            self.points[17].z =  20.0&lt;br /&gt;            self.points[18].x = -20.0&lt;br /&gt;            self.points[18].z = -20.0&lt;br /&gt;            self.points[19].x =  20.0&lt;br /&gt;            self.points[19].z = -20.0&lt;br /&gt;&lt;br /&gt;            for i in range(16, 20):&lt;br /&gt;                self.points[i].y = 30.0&lt;br /&gt;&lt;br /&gt;            for i in range(20, 24):&lt;br /&gt;                self.points[i].x = self.points[i - 4].x&lt;br /&gt;                self.points[i].z = self.points[i - 4].z&lt;br /&gt;                self.points[i].y = -30.0        &lt;br /&gt;            &lt;br /&gt;        &lt;br /&gt;        self.x_off = 320.0&lt;br /&gt;        self.y_off = 240.0&lt;br /&gt;        self.z_off = 50.0&lt;br /&gt;&lt;br /&gt;        self.z_deg = 0&lt;br /&gt;        self.x_deg = 0&lt;br /&gt;        self.y_deg = 0&lt;br /&gt;            &lt;br /&gt;    def flatten(self, cube):&lt;br /&gt;        '''&lt;br /&gt;        320 : 200 =&gt; 1 : 5 / 8 |  a.r of 4 : 3, height = 4 / 3 of width, therefore&lt;br /&gt;        x : y =&gt; 1 : 5 / 6&lt;br /&gt;        '''&lt;br /&gt;        &lt;br /&gt;        n = len(self.points)&lt;br /&gt;        &lt;br /&gt;        x_scale = 100.0&lt;br /&gt;        y_scale = 100.0 # 83.0&lt;br /&gt;        &lt;br /&gt;        flat = []        &lt;br /&gt;        for i in range(n):&lt;br /&gt;            x = cube[i].x&lt;br /&gt;            y = cube[i].y&lt;br /&gt;            z = self.z_off - cube[i].z&lt;br /&gt;            nx = int(self.x_off + (x / z * x_scale))&lt;br /&gt;            ny = int(self.y_off + (y / z * y_scale))&lt;br /&gt;            flat.append(Point2D(nx, ny))&lt;br /&gt;            &lt;br /&gt;        return flat&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    def rotate(self, points, z, x, y):&lt;br /&gt;        '''&lt;br /&gt;        to rotate a point (oX, oY) through Alpha radians, counter-clockwise, about&lt;br /&gt;        the z axis:&lt;br /&gt;        nX = [Cos(Alpha) * oX] - [Sin(Alpha) * oY]&lt;br /&gt;        nY = [Sin(Alpha) * oX] + [Cos(Alpha) * oY]&lt;br /&gt;        '''&lt;br /&gt;        &lt;br /&gt;        rotated = []&lt;br /&gt;        for i in range(len(points)):&lt;br /&gt;            oX = points[i].x&lt;br /&gt;            oY = points[i].y&lt;br /&gt;            oZ = points[i].z&lt;br /&gt;&lt;br /&gt;            # about z axis &lt;br /&gt;            nX = (self.cos_table[z] * oX) - (self.sin_table[z] * oY)&lt;br /&gt;            nY = (self.sin_table[z] * oX) + (self.cos_table[z] * oY)&lt;br /&gt;            oX = nX &lt;br /&gt;            oY = nY&lt;br /&gt;&lt;br /&gt;            # about x axis &lt;br /&gt;            nZ = (self.cos_table[x] * oZ) - (self.sin_table[x] * oY)&lt;br /&gt;            nY = (self.sin_table[x] * oZ) + (self.cos_table[x] * oY)&lt;br /&gt;            oZ = nZ&lt;br /&gt;&lt;br /&gt;            # about y axis &lt;br /&gt;            nX = (self.cos_table[y] * oX) - (self.sin_table[y] * oZ)&lt;br /&gt;            nZ = (self.sin_table[y] * oX) + (self.cos_table[y] * oZ)&lt;br /&gt;&lt;br /&gt;            rotated.append(Point3D(x=nX, y=nY, z=nZ))&lt;br /&gt;            &lt;br /&gt;        return rotated&lt;br /&gt;&lt;br /&gt;    def draw_to_pixmap(self, points, pixmap, gc, style):&lt;br /&gt;        '''&lt;br /&gt;        '''&lt;br /&gt;        # pixmap.draw_line(self.gc, x, y, self.w/2, self.h/2)  &lt;br /&gt;&lt;br /&gt;        #  octal inlay flush with end plate &lt;br /&gt;        for i in range(7):&lt;br /&gt;            pixmap.draw_line(gc, points[i].x, points[i].y, points[i + 1].x, points[i + 1].y)&lt;br /&gt;        &lt;br /&gt;        pixmap.draw_line(gc, points[7].x, points[7].y, points[0].x, points[0].y)&lt;br /&gt;&lt;br /&gt;        # connections between octal inlays'pipe' &lt;br /&gt;        for i in range(8):&lt;br /&gt;            pixmap.draw_line(gc, points[i].x, points[i].y, points[i + 8].x, points[i + 8].y)&lt;br /&gt;&lt;br /&gt;        #  octal inlay flush with end plate &lt;br /&gt;        for i in range(8, 15):&lt;br /&gt;            pixmap.draw_line(gc, points[i].x, points[i].y, points[i + 1].x, points[i + 1].y)&lt;br /&gt;        &lt;br /&gt;        pixmap.draw_line(gc, points[15].x, points[15].y, points[8].x, points[8].y)&lt;br /&gt;&lt;br /&gt;        #  end plate of column &lt;br /&gt;        for i in range(16, 19):&lt;br /&gt;            pixmap.draw_line(gc, points[i].x, points[i].y, points[i + 1].x, points[i + 1].y)&lt;br /&gt;            &lt;br /&gt;        pixmap.draw_line(gc, points[19].x, points[19].y, points[16].x, points[16].y)&lt;br /&gt;&lt;br /&gt;        #  end plate of column &lt;br /&gt;        for i in range(20, 23):&lt;br /&gt;            pixmap.draw_line(gc, points[i].x, points[i].y, points[i + 1].x,points[i + 1].y)&lt;br /&gt;        &lt;br /&gt;        pixmap.draw_line(gc, points[23].x, points[23].y, points[20].x, points[20].y)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    def iterate(self, pixmap, gc, style):&lt;br /&gt;        '''&lt;br /&gt;        '''&lt;br /&gt;        rotated = self.rotate(self.points, self.z_deg, self.x_deg, self.y_deg)&lt;br /&gt;        flattened = self.flatten(rotated)&lt;br /&gt;        self.draw_to_pixmap(flattened, pixmap, gc, style)&lt;br /&gt;        &lt;br /&gt;    def move(self, x, y, z):&lt;br /&gt;        &lt;br /&gt;        self.z_deg = self.z_deg + int(z)&lt;br /&gt;        self.x_deg = self.x_deg + int(y)&lt;br /&gt;        self.y_deg = self.y_deg - int(x)       &lt;br /&gt;        &lt;br /&gt;        self.shake()&lt;br /&gt;&lt;br /&gt;    def shake(self):&lt;br /&gt;&lt;br /&gt;        if (self.z_deg &gt;= 360):&lt;br /&gt;            self.z_deg = self.z_deg - 360&lt;br /&gt;        if (self.z_deg &lt; 0):&lt;br /&gt;            self.z_deg = self.z_deg + 360&lt;br /&gt;        &lt;br /&gt;        if (self.x_deg &gt;= 360):&lt;br /&gt;            self.x_deg = self.x_deg - 360&lt;br /&gt;        if (self.x_deg &lt; 0):&lt;br /&gt;            self.x_deg = self.x_deg + 360&lt;br /&gt;&lt;br /&gt;        if (self.y_deg &gt;= 360):&lt;br /&gt;            self.y_deg = self.y_deg - 360&lt;br /&gt;        if (self.y_deg &lt; 0):&lt;br /&gt;            self.y_deg = self.y_deg + 360&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--- --- run.py --- --- --- --- --- --- ---&lt;br /&gt;&lt;br /&gt;import gtk&lt;br /&gt;import gobject&lt;br /&gt;import random&lt;br /&gt;# ---&lt;br /&gt;from rot import Rot&lt;br /&gt;&lt;br /&gt;class Gfx(object):&lt;br /&gt;    '''&lt;br /&gt;    '''    &lt;br /&gt;    def __init__(self):&lt;br /&gt;        '''&lt;br /&gt;        '''&lt;br /&gt;        self.b1_down = False&lt;br /&gt;        self.b2_down = False&lt;br /&gt;        self.b3_down = False&lt;br /&gt;        &lt;br /&gt;        self.b1_x = None&lt;br /&gt;        self.b1_y = None&lt;br /&gt;        &lt;br /&gt;        self.rot = Rot()        &lt;br /&gt;        &lt;br /&gt;        self.started = False&lt;br /&gt;        &lt;br /&gt;        self.i = 0&lt;br /&gt;        &lt;br /&gt;        self.win = gtk.Window(gtk.WINDOW_TOPLEVEL)&lt;br /&gt;        self.win.set_title('Fractured Nature')&lt;br /&gt;        self.gw = 640&lt;br /&gt;        self.gh = 480 #int(float(self.gw) / 1.618)&lt;br /&gt;        self.win.resize(self.gw, self.gh)&lt;br /&gt;        self.win.set_position(gtk.WIN_POS_CENTER)&lt;br /&gt;        self.win.connect('destroy', gtk.main_quit)&lt;br /&gt;        #self.win.realize()&lt;br /&gt;&lt;br /&gt;        self.da = gtk.DrawingArea()&lt;br /&gt;&lt;br /&gt;        self.win.add(self.da)&lt;br /&gt;        self.da.set_size_request(self.gw, self.gh)&lt;br /&gt;        self.win.set_resizable(False)&lt;br /&gt;        &lt;br /&gt;        self.da.connect("expose-event", self.area_expose_cb)&lt;br /&gt;        self.da.connect("button_press_event", self.button_press_event)&lt;br /&gt;        self.da.connect("button_release_event", self.button_released_event)  &lt;br /&gt;        self.da.connect("motion_notify_event", self.motion_notify_event)&lt;br /&gt;        #self.da.connect("scroll_event", self.scroll_event)&lt;br /&gt;            &lt;br /&gt;        self.da.set_events(&lt;br /&gt;            gtk.gdk.EXPOSURE_MASK | &lt;br /&gt;            gtk.gdk.BUTTON_PRESS_MASK | &lt;br /&gt;            gtk.gdk.BUTTON_RELEASE_MASK | &lt;br /&gt;            gtk.gdk.POINTER_MOTION_MASK #| &lt;br /&gt;         #   gtk.gdk.SCROLL_MASK            &lt;br /&gt;            )&lt;br /&gt;              &lt;br /&gt;        self.da.show()&lt;br /&gt;        self.win.show_all()&lt;br /&gt;    &lt;br /&gt;    def area_expose_cb(self, area, event):&lt;br /&gt;        '''&lt;br /&gt;        '''&lt;br /&gt;        self.area = area&lt;br /&gt;        &lt;br /&gt;        self.style = self.da.get_style()&lt;br /&gt;        self.gc = self.style.fg_gc[gtk.STATE_NORMAL]&lt;br /&gt;        &lt;br /&gt;        self.w, self.h = area.window.get_size()&lt;br /&gt;        &lt;br /&gt;        #for i in dir(area.window): print(i)&lt;br /&gt;        self.started = True&lt;br /&gt;&lt;br /&gt;        return True                &lt;br /&gt;        &lt;br /&gt;    def button_press_event(self, widget, event):                    &lt;br /&gt;&lt;br /&gt;        if (event.button == 1):            &lt;br /&gt;            self.b1_x = event.x&lt;br /&gt;            self.b1_y = event.y&lt;br /&gt;            self.b1_down = True&lt;br /&gt;        elif (event.button == 3):            &lt;br /&gt;            self.b3_z = event.x&lt;br /&gt;            self.b3_down = True&lt;br /&gt;        elif (event.button == 2):&lt;br /&gt;            self.b2_down = True  &lt;br /&gt;        elif (event.button == 4):&lt;br /&gt;            print(4)&lt;br /&gt;        elif (event.button == 5):&lt;br /&gt;            print(5)&lt;br /&gt;        &lt;br /&gt;        return True&lt;br /&gt;&lt;br /&gt;    def motion_notify_event(self, widget, event):&lt;br /&gt;        &lt;br /&gt;        if (self.b1_down == True):&lt;br /&gt;            x = event.x&lt;br /&gt;            y = event.y&lt;br /&gt;            &lt;br /&gt;            d_x = x - self.b1_x&lt;br /&gt;            d_y = y - self.b1_y&lt;br /&gt;            d_z = 0&lt;br /&gt;            &lt;br /&gt;            self.b1_x = x&lt;br /&gt;            self.b1_y = y&lt;br /&gt;&lt;br /&gt;            self.rot.move(d_x, d_y, d_z)&lt;br /&gt;        &lt;br /&gt;        elif (self.b3_down == True):&lt;br /&gt;        &lt;br /&gt;            z = event.x&lt;br /&gt;            &lt;br /&gt;            d_z = z - self.b3_z&lt;br /&gt;            &lt;br /&gt;            d_y = 0&lt;br /&gt;            d_x = 0&lt;br /&gt;            &lt;br /&gt;            self.b3_z = z&lt;br /&gt;&lt;br /&gt;            self.rot.move(d_x, d_y, d_z)&lt;br /&gt;            &lt;br /&gt;        return True&lt;br /&gt;        &lt;br /&gt;    def button_released_event(self, widget, event):                &lt;br /&gt;&lt;br /&gt;        if (event.button == 1):&lt;br /&gt;            self.b1_down = False&lt;br /&gt;        elif (event.button == 2):&lt;br /&gt;            self.b2_down = False&lt;br /&gt;        elif (event.button == 3):&lt;br /&gt;            self.b3_down = False     &lt;br /&gt;&lt;br /&gt;        return True   &lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;    def nop(self):&lt;br /&gt;        '''&lt;br /&gt;        '''        &lt;br /&gt;        if (self.started != True):&lt;br /&gt;            return True&lt;br /&gt;        &lt;br /&gt;        pixmap = gtk.gdk.Pixmap(self.da.window, self.gw, self.gh, depth=-1)&lt;br /&gt;        pixmap.draw_rectangle(self.style.white_gc, True, 0, 0, self.gw, self.gh)&lt;br /&gt;        &lt;br /&gt;        self.rot.iterate(pixmap, self.gc, self.style)        &lt;br /&gt;        &lt;br /&gt;        self.area.window.draw_drawable(self.gc, pixmap, 0, 0, 0, 0, -1, -1)          &lt;br /&gt;        self.area.show()&lt;br /&gt;       &lt;br /&gt;        return True # repeat&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;g = Gfx()&lt;br /&gt;&lt;br /&gt;delay = 50&lt;br /&gt;g.timer = gobject.timeout_add(delay, g.nop)&lt;br /&gt;&lt;br /&gt;gtk.main()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4970543985990575921?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4970543985990575921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/11/pygtk-events-basic-3d.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4970543985990575921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4970543985990575921'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/11/pygtk-events-basic-3d.html' title='pyGTK - Events &amp; Basic 3d'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7299275482198255927</id><published>2010-10-31T06:01:00.001-07:00</published><updated>2010-10-31T06:01:37.006-07:00</updated><title type='text'>WPF Attached Behaviours - Calling a Method on the View</title><content type='html'>http://shujaatsiddiqi.blogspot.com/2010/08/attached-behaviors.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7299275482198255927?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7299275482198255927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/wpf-attached-behaviours-calling-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7299275482198255927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7299275482198255927'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/wpf-attached-behaviours-calling-method.html' title='WPF Attached Behaviours - Calling a Method on the View'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6913284178841304265</id><published>2010-10-29T02:02:00.001-07:00</published><updated>2010-10-29T02:02:34.357-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='job'/><title type='text'>IT Placement in the Netherlands</title><content type='html'>The White Door&lt;br /&gt;http://thewhitedoor.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6913284178841304265?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6913284178841304265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/it-placement-in-netherlands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6913284178841304265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6913284178841304265'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/it-placement-in-netherlands.html' title='IT Placement in the Netherlands'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-270860332513132127</id><published>2010-10-27T04:35:00.001-07:00</published><updated>2010-10-27T04:45:07.930-07:00</updated><title type='text'>Classes from XML, XSD with xsd.exe</title><content type='html'>MS supplies a command-line tool that generates C# classes from XSD/XML/Xetc.&lt;br /&gt;&lt;br /&gt;ML Schema Definition Tool (Xsd.exe)&lt;br /&gt;http://msdn.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-270860332513132127?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/270860332513132127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/classes-from-xml-xsd-with-xsdexe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/270860332513132127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/270860332513132127'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/classes-from-xml-xsd-with-xsdexe.html' title='Classes from XML, XSD with xsd.exe'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1199666388939440814</id><published>2010-10-27T04:21:00.000-07:00</published><updated>2010-10-27T04:23:42.803-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Easy Proxy Switching with Chrome</title><content type='html'>I find myself in a situation where I have to switch my proxy on and off very frequently (_many_ times a day), and it's a bit of a hassle to go through the whole multi-click rigmarole, but, thanks to a handy Chrome extension called, somewhat unimaginatively, but wholly functionally - 'SwitchProxy' @ http://www.chromeextensions.org/utilities/switch-proxy/.&lt;br /&gt;&lt;br /&gt;I'll try and report back if this has resulted in the total compromising of my security. In the mean time, let's hope not.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-1199666388939440814?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1199666388939440814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/easy-proxy-switching-with-chrome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1199666388939440814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1199666388939440814'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/easy-proxy-switching-with-chrome.html' title='Easy Proxy Switching with Chrome'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-8475298004359246801</id><published>2010-10-25T00:50:00.000-07:00</published><updated>2010-10-25T00:51:50.965-07:00</updated><title type='text'>E72 Mail for Exchange</title><content type='html'>Connecting Nokia's with Mail for Exchange&lt;br /&gt;http://copeohs.net/blogs/creativepossibilities/archive/2010/03/09/Connecting-Nokia_2700_s-with-Mail-for-Exchange.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-8475298004359246801?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/8475298004359246801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/e72-mail-for-exchange.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8475298004359246801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8475298004359246801'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/e72-mail-for-exchange.html' title='E72 Mail for Exchange'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2190103637886945538</id><published>2010-10-24T12:23:00.000-07:00</published><updated>2011-01-15T09:47:30.955-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='text-editor'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>geany</title><content type='html'>Finally, in search of a light-weight text editor for ubuntu - one that has code folding and a decent selection of editing facilities (i.e. a tier above gedit and scite), I come to &lt;a href="http://www.geany.org/"&gt;GEANY&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;idiotuser@computer:~$ sudo apt-get install geany&lt;br /&gt;&lt;br /&gt;Configure with a dark colour scheme from http://download.geany.org/contrib/oblivion2.tar.gz, and you're good to go.&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;Quick Punt:&lt;br /&gt;&lt;br /&gt;I've been using Geany for a couple of months now, and I can whole-heartedly recommend it.  It could do with a couple more short-cut keys (but maybe they're actually in there somewhere and I've just missed them), but other than that, its a winnner.  I've been using it on my Lenovo X100e netbook running Ubuntu 10-1- Meerkat, and it runs snappily, so I can do python dev complete with both basic predictive text and symbol explorers, v.nice.  For those of you who are not quite VI/EMACS streetfighters, but want a fast but solid python IDE, rub this lamp.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2190103637886945538?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2190103637886945538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/geany.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2190103637886945538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2190103637886945538'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/geany.html' title='geany'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6985453308051391112</id><published>2010-10-24T09:04:00.000-07:00</published><updated>2010-10-24T09:09:50.718-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='text-editor'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>EMACS</title><content type='html'>COLOUR SCHEME&lt;br /&gt;stack overflow - http://stackoverflow.com/questions/1132919/how-do-i-set-up-emacs-colors-correctly&lt;br /&gt;emacs fu - http://emacs-fu.blogspot.com/2009/03/color-theming.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6985453308051391112?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6985453308051391112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/emacs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6985453308051391112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6985453308051391112'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/emacs.html' title='EMACS'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-42136742007651504</id><published>2010-10-24T05:04:00.001-07:00</published><updated>2011-08-04T07:48:26.255-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GTK'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='GUI'/><title type='text'>PyXTree - pyGTK TreeView ElementTree XML Viewer</title><content type='html'>PyXTree is a minimal python xml viewer.&lt;br /&gt;&lt;br /&gt;Written in python (&lt;a href="http://www.python.org/getit/"&gt;download&lt;/a&gt;), pyxtree uses the treeview and scrolledwindow controls from the pyGTK &lt;a href="http://www.pygtk.org/downloads.html"&gt;download&lt;/a&gt;) UI, together with the ElementTree xml library that is included in the python standard library.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# --- --- --- --- --- --- --- --- --- --- --- --- &lt;br /&gt;from optparse import OptionParser&lt;br /&gt;# pyGTK --- --- --- --- --- --- --- --- ---&lt;br /&gt;import pygtk&lt;br /&gt;pygtk.require('2.0')&lt;br /&gt;import gtk&lt;br /&gt;# ElementTree - --- --- --- --- --- --- ---&lt;br /&gt;import xml.etree.ElementTree as ET&lt;br /&gt;# --- --- --- --- --- --- --- --- --- --- --- --- &lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;xml_2_ns = {&lt;br /&gt;  'http://www.s3.org/XML/1998/namespace' : 'xml',&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;ns_2_xml = {&lt;br /&gt;  'xml' : 'http://www.s3.org/XML/1998/namespace',&lt;br /&gt;}&lt;br /&gt;  &lt;br /&gt;def extend_tree(treestore, element, parent_node, ns_list):&lt;br /&gt;  '''&lt;br /&gt;  '''&lt;br /&gt;&lt;br /&gt;  #import pdb; pdb.set_trace()&lt;br /&gt;&lt;br /&gt;  node_label = '%s' % strip_ns_from_str(element.tag, ns_list)&lt;br /&gt;  &lt;br /&gt;  if element.text != None:&lt;br /&gt;    element_text = element.text.strip()&lt;br /&gt;    if (len(element_text) &gt; 0):&lt;br /&gt;      element_text = strip_ns_from_str(element_text, ns_list)        &lt;br /&gt;      #discard = treestore.append(node, [element_text])&lt;br /&gt;      node_label = 'e %s :  %s' % (node_label, element_text)&lt;br /&gt;  &lt;br /&gt;  node = treestore.append(parent_node, [node_label])  &lt;br /&gt;&lt;br /&gt;  # add attribute name/val pairs to node&lt;br /&gt;  for name, value in element.items():&lt;br /&gt;    name = strip_ns_from_str(name, ns_list)&lt;br /&gt;    value = strip_ns_from_str(value, ns_list)&lt;br /&gt;    label = 'a %s =  %s' % (name, value)&lt;br /&gt;    treestore.append(node, [label])   &lt;br /&gt;  &lt;br /&gt;  # recurse over children&lt;br /&gt;  for child_element in element.getchildren():&lt;br /&gt;    child_node = extend_tree(treestore, child_element, node, ns_list)      &lt;br /&gt;&lt;br /&gt;  return node&lt;br /&gt;    &lt;br /&gt;def etree_to_gtk_treestore(tree):&lt;br /&gt;  '''&lt;br /&gt;  construct gtk.TreeStore(str) from ElementTree&lt;br /&gt;  '''&lt;br /&gt;  treestore = gtk.TreeStore(str) &lt;br /&gt; &lt;br /&gt;  ns_list = ns_list_from_tree(tree)&lt;br /&gt;  &lt;br /&gt;  element = tree.getroot()&lt;br /&gt;  &lt;br /&gt;  node_label = '%s' % strip_ns_from_str(element.tag, ns_list)  &lt;br /&gt;  &lt;br /&gt;  if element.text != None:&lt;br /&gt;    element_text = element.text.strip()&lt;br /&gt;    if (len(element_text) &gt; 0):&lt;br /&gt;      element_text = strip_ns_from_str(element_text, ns_list)&lt;br /&gt;      node_label = 'e %s :  %s' % (node_label, element_text)&lt;br /&gt;  &lt;br /&gt;  node = treestore.append(None, [node_label])  &lt;br /&gt;  &lt;br /&gt;  for child_e in element.getchildren():&lt;br /&gt;    extend_tree(treestore, child_e, node, ns_list)  &lt;br /&gt;    &lt;br /&gt;   # add attribute name/val pairs to node&lt;br /&gt;  for name, value in element.items():&lt;br /&gt;    name = strip_ns_from_str(name, ns_list)&lt;br /&gt;    value = strip_ns_from_str(value, ns_list)    &lt;br /&gt;    label = '%s = %s' % (name, value)&lt;br /&gt;    treestore.append(None, [label])&lt;br /&gt;  &lt;br /&gt;  # if ns is global&lt;br /&gt;  for ns in ns_list:&lt;br /&gt;    label = 'xmlns : %s' % ns&lt;br /&gt;    treestore.append(None, [label])&lt;br /&gt;  &lt;br /&gt;  return treestore &lt;br /&gt;&lt;br /&gt;def ns_from_string(s):&lt;br /&gt;  left = s.find('{')&lt;br /&gt;  right = s.find('}')&lt;br /&gt;  ns = s[left+1:right]      &lt;br /&gt;  return ns&lt;br /&gt;&lt;br /&gt;def process_potential_ns_string(s, ns_list):&lt;br /&gt;&lt;br /&gt;  if s == None:&lt;br /&gt;    return&lt;br /&gt;&lt;br /&gt;  if (s.find('{') != -1) and (s.find('}') != -1):&lt;br /&gt;    ns = ns_from_string(s)&lt;br /&gt;    if (ns not in ns_list):&lt;br /&gt;      ns_list.append(ns)&lt;br /&gt; &lt;br /&gt;def ns_list_from_element(el, ns_list):&lt;br /&gt;&lt;br /&gt;  # tag&lt;br /&gt;  process_potential_ns_string(el.tag, ns_list)&lt;br /&gt;  # text&lt;br /&gt;  process_potential_ns_string(el.text, ns_list)  &lt;br /&gt;  &lt;br /&gt;  # attributes&lt;br /&gt;  for name, value in el.items():&lt;br /&gt;    process_potential_ns_string(name, ns_list)&lt;br /&gt;    process_potential_ns_string(value, ns_list)&lt;br /&gt;  &lt;br /&gt;  for child_el in el.getchildren():&lt;br /&gt;    ns_list_from_element(child_el, ns_list)    &lt;br /&gt;  &lt;br /&gt;  return ns_list&lt;br /&gt;  &lt;br /&gt;def ns_list_from_tree(etree):&lt;br /&gt;  '''&lt;br /&gt;  '''  &lt;br /&gt;  ns_list = []  &lt;br /&gt;  root_e = etree.getroot()    &lt;br /&gt;  &lt;br /&gt;  # tag&lt;br /&gt;  process_potential_ns_string(root_e.tag, ns_list)&lt;br /&gt;  # text&lt;br /&gt;  process_potential_ns_string(root_e.text, ns_list)  &lt;br /&gt;  &lt;br /&gt;  # attributes&lt;br /&gt;  for name, value in root_e.items():&lt;br /&gt;    process_potential_ns_string(name, ns_list)&lt;br /&gt;    process_potential_ns_string(value, ns_list)&lt;br /&gt;  &lt;br /&gt;  # child elements&lt;br /&gt;  for child_el in root_e.getchildren():&lt;br /&gt;    ns_list_from_element(child_el, ns_list)&lt;br /&gt;&lt;br /&gt;  return ns_list&lt;br /&gt;  &lt;br /&gt;def strip_ns_from_str(s, ns_list):&lt;br /&gt;  stripped = str(s)&lt;br /&gt;  for ns in ns_list:&lt;br /&gt;    token = '{%s}' % ns&lt;br /&gt;    loc = stripped.find(token)&lt;br /&gt;    if (loc != -1):&lt;br /&gt;      stripped = stripped[:loc] + stripped[loc + len(token):len(stripped)]&lt;br /&gt;      &lt;br /&gt;  return stripped&lt;br /&gt;  &lt;br /&gt;class XMLTreeView:&lt;br /&gt;  '''&lt;br /&gt;  '''&lt;br /&gt;  def delete_event(widget, event, data=None):&lt;br /&gt;    '''&lt;br /&gt;    not an instance method, cuz gtk will not call as such&lt;br /&gt;    '''&lt;br /&gt;    gtk.main_quit()&lt;br /&gt;    return False&lt;br /&gt;    &lt;br /&gt;  def __init__(self, path, title='pyxtree - python XML tree viewer', xsize=900, ysize = 500):&lt;br /&gt;    '''&lt;br /&gt;    '''  &lt;br /&gt;    etree = ET.parse(path)    &lt;br /&gt;    self.treestore = etree_to_gtk_treestore(etree) &lt;br /&gt;&lt;br /&gt;    self.window = gtk.Dialog()&lt;br /&gt;    self.window.connect("destroy", self.delete_event)  &lt;br /&gt;    self.window.set_border_width(0)      &lt;br /&gt;    &lt;br /&gt;    self.swin_tree = gtk.ScrolledWindow()&lt;br /&gt;    self.swin_tree.set_border_width(10)&lt;br /&gt;    self.swin_tree.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS)&lt;br /&gt;    self.window.vbox.pack_start(self.swin_tree, True, True, 0)&lt;br /&gt;    &lt;br /&gt;    self.swin_text = gtk.ScrolledWindow()&lt;br /&gt;    self.swin_text.set_border_width(10)&lt;br /&gt;    self.swin_text.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS)&lt;br /&gt;    self.window.vbox.pack_start(self.swin_text, True, True, 0)    &lt;br /&gt;    &lt;br /&gt;    self.window.set_title(title)&lt;br /&gt;    self.window.set_size_request(xsize, ysize)&lt;br /&gt;    self.window.connect("delete_event", self.delete_event)&lt;br /&gt;&lt;br /&gt;    # create the TreeView using treestore&lt;br /&gt;    self.treeview = gtk.TreeView(self.treestore)&lt;br /&gt;    self.tvcolumn = gtk.TreeViewColumn(path)&lt;br /&gt;    self.treeview.append_column(self.tvcolumn)&lt;br /&gt;    self.cell = gtk.CellRendererText()&lt;br /&gt;    # add the cell to the tvcolumn and allow it to expand&lt;br /&gt;    self.tvcolumn.pack_start(self.cell, True)&lt;br /&gt;    # set the cell "text" attribute to column 0 - retrieve text&lt;br /&gt;    # from that column in treestore&lt;br /&gt;    self.tvcolumn.add_attribute(self.cell, 'text', 0)&lt;br /&gt;    # make it searchable&lt;br /&gt;    self.treeview.set_search_column(0)&lt;br /&gt;    # Allow sorting on the column&lt;br /&gt;    #self.tvcolumn.set_sort_column_id(0)&lt;br /&gt;    # Allow drag and drop reordering of rows&lt;br /&gt;    #self.treeview.set_reorderable(True)&lt;br /&gt;    &lt;br /&gt;    self.swin_tree.add_with_viewport(self.treeview)    &lt;br /&gt;    self.swin_tree.show()&lt;br /&gt;    &lt;br /&gt;    xfile = open(path, 'r')&lt;br /&gt;    xtext = xfile.read()&lt;br /&gt;    xfile.close()&lt;br /&gt;    &lt;br /&gt;    label = gtk.Label(xtext)&lt;br /&gt;    &lt;br /&gt;    # ns_list = ns_list_from_tree(etree)&lt;br /&gt;    &lt;br /&gt;    # ns_str = ''&lt;br /&gt;    # for ns in ns_list:&lt;br /&gt;      # ns_str = ns_str + str(ns) + '\n'    &lt;br /&gt;    &lt;br /&gt;    # label = gtk.Label(ns_str)&lt;br /&gt;&lt;br /&gt;    label.set_alignment(xalign=0, yalign=0.5) &lt;br /&gt;    &lt;br /&gt;    self.swin_text.add_with_viewport(label)    &lt;br /&gt;    self.swin_text.show()    &lt;br /&gt;    &lt;br /&gt;    self.window.show_all()&lt;br /&gt;&lt;br /&gt;def main(path = None):  &lt;br /&gt;  '''&lt;br /&gt;  '''&lt;br /&gt;  if (path == None):&lt;br /&gt;    &lt;br /&gt;    filechooser = gtk.FileChooserDialog(&lt;br /&gt;      title=None,&lt;br /&gt;      action=gtk.FILE_CHOOSER_ACTION_OPEN,&lt;br /&gt;      buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK))&lt;br /&gt;    &lt;br /&gt;    filter_stdxmlfiles = gtk.FileFilter()&lt;br /&gt;    filter_stdxmlfiles.set_name("Std XML Files")&lt;br /&gt;    filter_stdxmlfiles.add_pattern("*.xml")&lt;br /&gt;    filter_stdxmlfiles.add_pattern("*.wsdl")&lt;br /&gt;    filechooser.add_filter(filter_stdxmlfiles)&lt;br /&gt;  &lt;br /&gt;    filter_allfiles = gtk.FileFilter()&lt;br /&gt;    filter_allfiles.set_name("All files")&lt;br /&gt;    filter_allfiles.add_pattern("*")&lt;br /&gt;    filechooser.add_filter(filter_allfiles)&lt;br /&gt;    &lt;br /&gt;    response = filechooser.run()    &lt;br /&gt;    &lt;br /&gt;    if response == gtk.RESPONSE_OK:&lt;br /&gt;      path = filechooser.get_filename()&lt;br /&gt;    elif response == gtk.RESPONSE_CANCEL:&lt;br /&gt;      pass&lt;br /&gt;      #log failure&lt;br /&gt;&lt;br /&gt;    filechooser.destroy()&lt;br /&gt;  &lt;br /&gt;  if (path != None):&lt;br /&gt;    tree_view = XMLTreeView(path)&lt;br /&gt;    gtk.main()&lt;br /&gt;  return&lt;br /&gt;  &lt;br /&gt;def src_file_from_cmd_args(args):&lt;br /&gt;  '''&lt;br /&gt;  '''&lt;br /&gt;  akapy = [&lt;br /&gt;    'pyxtree',&lt;br /&gt;    'pyxtree.py',&lt;br /&gt;    'python',&lt;br /&gt;    'python.exe',&lt;br /&gt;    'python2.5',&lt;br /&gt;    'python25.exe',&lt;br /&gt;    ]  &lt;br /&gt;  cleaned = []&lt;br /&gt;  for arg in args:&lt;br /&gt;    washed = arg.strip().lower()&lt;br /&gt;    if (washed not in akapy) and (washed.find('python') == -1):&lt;br /&gt;      cleaned.append(washed)    &lt;br /&gt;  if len(cleaned) == 0:&lt;br /&gt;    cleaned = [None]  &lt;br /&gt;  return cleaned&lt;br /&gt;&lt;br /&gt;def configure_logging(LOG_FILENAME='pyxtree.log'):&lt;br /&gt;  import logging  &lt;br /&gt;  logging.basicConfig(filename=LOG_FILENAME,level=logging.INFO)&lt;br /&gt;  log = logging.getLogger()&lt;br /&gt;  return log&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;def setup_command_line_options():&lt;br /&gt;  '''&lt;br /&gt;  using optparse&lt;br /&gt;  define command line arguments&lt;br /&gt;  return target filename, None if none specified&lt;br /&gt;  '''&lt;br /&gt;  parser = OptionParser()&lt;br /&gt;  parser.add_option('-f', dest='filename', help='target xml file to view')&lt;br /&gt;  (options, args) = parser.parse_args()&lt;br /&gt;  return(options.filename)  &lt;br /&gt;&lt;br /&gt;if __name__ == "__main__":&lt;br /&gt;  &lt;br /&gt;  print('\nPyXTree - david.barkhuizen@gmail.com')&lt;br /&gt;  print('help:  pyxtree -h\n')&lt;br /&gt;  &lt;br /&gt;  xmlfilepath = setup_command_line_options()  &lt;br /&gt;  &lt;br /&gt;  log = configure_logging()  &lt;br /&gt;  &lt;br /&gt;  log.info('target file specified at command line = %s' % xmlfilepath)&lt;br /&gt;  main(path=xmlfilepath)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-42136742007651504?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/42136742007651504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/pygtk-treeview-elementtree-xml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/42136742007651504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/42136742007651504'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/pygtk-treeview-elementtree-xml.html' title='PyXTree - pyGTK TreeView ElementTree XML Viewer'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2854386403392340907</id><published>2010-10-21T07:52:00.000-07:00</published><updated>2010-10-21T07:53:06.350-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>WPF Tutorials</title><content type='html'>http://bea.stollnitz.com/blog/?page_id=47&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2854386403392340907?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2854386403392340907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/wpf-tutorials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2854386403392340907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2854386403392340907'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/wpf-tutorials.html' title='WPF Tutorials'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5966518821105544189</id><published>2010-10-21T05:32:00.001-07:00</published><updated>2011-07-07T03:57:00.141-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Useful DataBase MetaData Scripts</title><content type='html'>1. given a column name, return a list of tables with similar columns names&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  declare @targetColumnName varchar(500)&lt;br /&gt;  set @targetColumnName = '%YourTargetColumnNameHere%'&lt;br /&gt;&lt;br /&gt;  select so.[name] as TableName, sc.[name] as ColumnName  &lt;br /&gt;  from sysobjects so&lt;br /&gt;  inner join syscolumns sc on (so.[id] = sc.[id])&lt;br /&gt;  where (so.[type] = 'U') and (sc.[name] like @targetColumnName)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2. given a table name, return a list of tables with similar name&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  declare @targetTableName varchar(500)&lt;br /&gt;  set @targetTableName = '%Entity%'&lt;br /&gt;&lt;br /&gt;  select so.[name] as TableName&lt;br /&gt;  from sysobjects so&lt;br /&gt;  where (so.[type] = 'U') and (so.[name] like @targetTableName)&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/1227041388185782445-5966518821105544189?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5966518821105544189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/10/useful-database-scripts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5966518821105544189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5966518821105544189'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/10/useful-database-scripts.html' title='Useful DataBase MetaData Scripts'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1618893060325811551</id><published>2010-09-12T05:45:00.001-07:00</published><updated>2010-09-12T08:43:18.609-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>MySQLdb - 1153, 'Got a packet bigger than 'max_allowed_packet' bytes'</title><content type='html'>the technology&lt;br /&gt;&lt;br /&gt;- mySQL Server 5.?&lt;br /&gt;- python 2.6&lt;br /&gt;- MySQLdb 2.3.1?&lt;br /&gt;- Windows 7&lt;br /&gt;&lt;br /&gt;the scenario&lt;br /&gt;&lt;br /&gt;1. import MySQLdb&lt;br /&gt;2. create a connection to the db:&lt;br /&gt;&gt; connxn = MySQLdb.connect(params_dict)&lt;br /&gt;3. loop, re-using the connection, each time inserting say 250 records in one query&lt;br /&gt;&gt; cursor = connxn.cursor()&lt;br /&gt;&gt; cursor.execute(multi_record_insert_statement)&lt;br /&gt;&gt; cursor.close()&lt;br /&gt;&gt; connxn.commit()&lt;br /&gt;&lt;br /&gt;problem is, i was getting the following errors:&lt;br /&gt;&lt;br /&gt;- 1153, 'Got a packet bigger than 'max_allowed_packet' bytes'&lt;br /&gt;then, when i tried to create a new connection, i was getting&lt;br /&gt;- 2006, 'MySQL server has gone away' &lt;br /&gt;&lt;br /&gt;&lt;TIME PASSES, GOOGLE IS INTERROGATED, HEAD IS SCRATCHED, CAFFEINE IS CONSUMED&gt;&lt;br /&gt;&lt;br /&gt;a solution was to edit the mysql service/daemon config file and increase the 'max_allowed_packet' value from its defaut value of 1 MB (1M), to something less aenemic. e.g 4MB (4M).&lt;br /&gt;&lt;br /&gt;add the following line:&lt;br /&gt;max_allowed_packet=4M&lt;br /&gt;&lt;br /&gt;to the mysql config file 'my.ini', which is typically located @ &lt;br /&gt;c:\program files\mysql\mysql server 5.1\my.ini&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-1618893060325811551?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1618893060325811551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/mysqldb-2006-1153-big-packet-gone-away.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1618893060325811551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1618893060325811551'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/mysqldb-2006-1153-big-packet-gone-away.html' title='MySQLdb - 1153, &apos;Got a packet bigger than &apos;max_allowed_packet&apos; bytes&apos;'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6292324436995351845</id><published>2010-09-11T10:05:00.000-07:00</published><updated>2010-09-11T10:06:03.736-07:00</updated><title type='text'>ubuntu splash screen</title><content type='html'>How to change the gnome splashimage.&lt;br /&gt;1. Put the splash image you want in "png" format and store it in /usr/share/pixmaps/splash. (You can use Nautilus or the "cp" or the "mv" command from the terminal window if you want. Just remember to use "sudo" before your command. )&lt;br /&gt;2. Press ALT-F2 then at the prompt type "gconf-editor" (without the quotes).&lt;br /&gt;3. Click on "apps" then "gnome-session" then "options".&lt;br /&gt;4. To the right of the Name "splash_image" double click on the Value "splash/ubuntu-splash.png".&lt;br /&gt;5. Change "splash/ubuntu-splash.png" to reflect your new splash image: "splash/newsplash.png".&lt;br /&gt;6. Click on "File" then "Quit".&lt;br /&gt;7. Logout then login in again to see your new splashimage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6292324436995351845?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6292324436995351845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/ubuntu-splash-screen.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6292324436995351845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6292324436995351845'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/ubuntu-splash-screen.html' title='ubuntu splash screen'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-9072845710497147797</id><published>2010-09-11T02:53:00.000-07:00</published><updated>2010-09-11T03:30:23.654-07:00</updated><title type='text'>ssh to ubuntu machine</title><content type='html'>http://mybroadband.co.za/vb/showthread.php/52204-How-to-do-VPN-with-iBurst-with-Linux&lt;br /&gt;&lt;br /&gt;https://wiki.ubuntu.com/AdvancedOpenSSH&lt;br /&gt;&lt;br /&gt;Did you install the SSH server on your Ubuntu box? Check with this:&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;which sshd&lt;br /&gt;&lt;br /&gt;and if you installed check with this if it's running:&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;ps -ef | grep sshd&lt;br /&gt;&lt;br /&gt;If both are true then check if you have it listening:&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;netstat -aln | grep ":22"&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;&lt;br /&gt;Eric&lt;br /&gt;&lt;br /&gt;Make sure SSH is running on Ubuntu:&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;ps -ae | grep sshd&lt;br /&gt;&lt;br /&gt;It should return something like:&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;720 ?        00:00:00 sshd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-9072845710497147797?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/9072845710497147797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/ssh-to-ubuntu-machine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/9072845710497147797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/9072845710497147797'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/ssh-to-ubuntu-machine.html' title='ssh to ubuntu machine'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6902192868154013637</id><published>2010-09-10T08:13:00.001-07:00</published><updated>2010-09-10T08:13:35.476-07:00</updated><title type='text'>king james bible word freq distribution analysis - open doc sheet</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6902192868154013637?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6902192868154013637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/king-james-bible-word-freq-distribution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6902192868154013637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6902192868154013637'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/king-james-bible-word-freq-distribution.html' title='king james bible word freq distribution analysis - open doc sheet'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2511114783276784604</id><published>2010-09-09T09:00:00.000-07:00</published><updated>2011-01-15T08:55:41.766-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python is Not Java - PJ Eby</title><content type='html'>When arriving at python from a statically typed OO language such as c# or java, many people are initially tempted to emulate the formalism required by a statically typed language.  Like S&amp;M being permissible in certain liberal jurisdictions, the free-form multi-paradigm environment that is python allows you to follow your slavish inclinations if you so desire, but it would be entirely your own choice - as python generally always offers alternatives, and often a more compact or concise one than that which first comes to the the python-naive mind.&lt;br /&gt;&lt;br /&gt;Phillip J. "PJ" Eby&lt;br /&gt;&lt;a href="http://dirtsimple.org/2004/12/python-is-not-java.html"&gt;Python is Not Java&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2511114783276784604?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2511114783276784604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/python-is-not-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2511114783276784604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2511114783276784604'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/python-is-not-java.html' title='Python is Not Java - PJ Eby'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2962175923289385805</id><published>2010-09-09T08:43:00.000-07:00</published><updated>2010-09-09T08:45:14.026-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='project_managment'/><title type='text'>The Joel Test</title><content type='html'>http://www.joelonsoftware.com/articles/fog0000000043.html&lt;br /&gt;http://en.wikipedia.org/wiki/The_Joel_Test&lt;br /&gt;http://stackoverflow.com/questions/402050/administering-the-joel-test&lt;br /&gt;&lt;br /&gt;The Joel Test&lt;br /&gt;&lt;br /&gt;Do you use source control?&lt;br /&gt;Can you make a build in one step?&lt;br /&gt;Do you make daily builds?&lt;br /&gt;Do you have a bug database?&lt;br /&gt;Do you fix bugs before writing new code?&lt;br /&gt;Do you have an up-to-date schedule?&lt;br /&gt;Do you have a spec?&lt;br /&gt;Do programmers have quiet working conditions?&lt;br /&gt;Do you use the best tools money can buy?&lt;br /&gt;Do you have testers?&lt;br /&gt;Do new candidates write code during their interview?&lt;br /&gt;Do you do hallway usability testing?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2962175923289385805?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2962175923289385805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/joel-test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2962175923289385805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2962175923289385805'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/joel-test.html' title='The Joel Test'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1140460133765732260</id><published>2010-09-03T07:18:00.000-07:00</published><updated>2010-09-03T07:20:10.565-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sqlite'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Use dotNET 2.0 Assembly in dotNET 4.0</title><content type='html'>ERROR&lt;br /&gt;&lt;br /&gt;Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.&lt;br /&gt;&lt;br /&gt;FIX&lt;br /&gt;&lt;br /&gt;ensure that app.config contains the following&lt;br /&gt;&lt;br /&gt;&lt;configuration&gt;&lt;br /&gt;&lt;br /&gt;  &lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt;&lt;br /&gt;    &lt;supportedRuntime version="v4.0"/&gt;&lt;br /&gt;  &lt;/startup&gt;&lt;br /&gt;&lt;br /&gt;&lt;/configuration&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-1140460133765732260?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1140460133765732260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/use-dotnet-20-assembly-in-dotnet-40.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1140460133765732260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1140460133765732260'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/use-dotnet-20-assembly-in-dotnet-40.html' title='Use dotNET 2.0 Assembly in dotNET 4.0'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-3042769736147789214</id><published>2010-09-02T07:34:00.000-07:00</published><updated>2010-12-24T11:38:21.453-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Exception Handling in Python</title><content type='html'>quoted directly from &lt;a href="http://www.doughellmann.com/articles/how-tos/python-exception-handling/"&gt;Doug Hellman&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/env python&lt;br /&gt;&lt;br /&gt;import sys&lt;br /&gt;import traceback&lt;br /&gt;&lt;br /&gt;def throws():&lt;br /&gt;    raise RuntimeError('error from throws')&lt;br /&gt;    &lt;br /&gt;def nested():&lt;br /&gt;    try:&lt;br /&gt;        throws()&lt;br /&gt;    except Exception, original_error:&lt;br /&gt;        try:&lt;br /&gt;            raise&lt;br /&gt;        finally:&lt;br /&gt;            try:&lt;br /&gt;                cleanup()&lt;br /&gt;            except:&lt;br /&gt;                pass # ignore errors in cleanup&lt;br /&gt;&lt;br /&gt;def cleanup():&lt;br /&gt;    raise RuntimeError('error from cleanup')&lt;br /&gt;&lt;br /&gt;def main():&lt;br /&gt;    try:&lt;br /&gt;        nested()&lt;br /&gt;        return 0&lt;br /&gt;    except Exception, err:&lt;br /&gt;        traceback.print_exc()&lt;br /&gt;        return 1&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    sys.exit(main())&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This construction prevents the original exception from being overwritten by the latter, and preserves the full stack in the traceback.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-3042769736147789214?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/3042769736147789214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/exception-handling-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3042769736147789214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3042769736147789214'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/exception-handling-in-python.html' title='Exception Handling in Python'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4811641025501608529</id><published>2010-09-01T06:32:00.001-07:00</published><updated>2010-09-01T06:32:52.712-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='UI'/><title type='text'>WPF Navigation OverView</title><content type='html'>file:///C:/Users/david/Desktop/coding_ref/dotNET/WPF/WPF%20Navigation%20-%20Paul%20Stovell.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4811641025501608529?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4811641025501608529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/wpf-navigation-overview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4811641025501608529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4811641025501608529'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/wpf-navigation-overview.html' title='WPF Navigation OverView'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6480097573517891892</id><published>2010-09-01T06:31:00.000-07:00</published><updated>2010-09-01T06:32:27.345-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UI'/><title type='text'>Microsoft Inductive User Interface Guidelines</title><content type='html'>&lt;a href="http://msdn.microsoft.com/en-us/library/ms997506.aspx"&gt;Microsoft Inductive User Interface Guidelines&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6480097573517891892?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6480097573517891892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/09/microsoft-inductive-user-interface.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6480097573517891892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6480097573517891892'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/09/microsoft-inductive-user-interface.html' title='Microsoft Inductive User Interface Guidelines'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-3706350749425829143</id><published>2010-08-26T01:35:00.000-07:00</published><updated>2011-02-06T10:16:24.561-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><title type='text'>WPF - Error 1 - Program does not contain a static 'Main' method suitable for an entry point</title><content type='html'>Error 1 Program does not contain a static 'Main' method suitable for an entry point.&lt;br /&gt;&lt;br /&gt;The scenario in which this arose for me was after &lt;span style="font-weight:bold;"&gt;importing a WPF project built in VS2008 into VS2010&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Solution&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Set the 'build action' property on App.xaml to 'Application Definition'.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-3706350749425829143?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/3706350749425829143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/wpf-error-1-program-does-not-contain.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3706350749425829143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3706350749425829143'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/wpf-error-1-program-does-not-contain.html' title='WPF - Error 1 - Program does not contain a static &apos;Main&apos; method suitable for an entry point'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5414632623865010423</id><published>2010-08-24T04:27:00.000-07:00</published><updated>2010-12-17T00:49:44.974-08:00</updated><title type='text'>To Execute a VSTO from a NetWork Drive</title><content type='html'>To Add a DLL to the GAC under Windows7&lt;br /&gt;http://www.codeproject.com/KB/winsdk/AddToGAC.aspx&lt;br /&gt;&lt;br /&gt;location of gacutil.exe under Windows7&lt;br /&gt;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin&lt;br /&gt;&lt;br /&gt;location of caspol.exe&lt;br /&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5414632623865010423?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5414632623865010423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/to-execute-vsto-from-network-drive.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5414632623865010423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5414632623865010423'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/to-execute-vsto-from-network-drive.html' title='To Execute a VSTO from a NetWork Drive'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1405812527744634415</id><published>2010-08-22T11:35:00.000-07:00</published><updated>2010-08-22T11:36:01.976-07:00</updated><title type='text'>reset nokia e72</title><content type='html'>hard reset&lt;br /&gt;*#7370# code = 12345&lt;br /&gt;&lt;br /&gt;soft reset (retain personal info)&lt;br /&gt;*#7780#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-1405812527744634415?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1405812527744634415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/reset-nokia-e72.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1405812527744634415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1405812527744634415'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/reset-nokia-e72.html' title='reset nokia e72'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6373147705840805756</id><published>2010-08-17T10:17:00.000-07:00</published><updated>2010-12-17T00:50:05.086-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Windows7 Power Scheme from the Command Line - PowerCFG</title><content type='html'>open an admin command prompt by right-clicking on the command prompt, which can be found @ (Start &gt; All Programs &gt; Accessories), and selecting 'run as administrator'.&lt;br /&gt;&lt;br /&gt;to list existing power schemes and associated GUIDs&lt;br /&gt;powercfg -l&lt;br /&gt;&lt;br /&gt;select guid (right-click &gt; mark), copy (enter)&lt;br /&gt;&lt;br /&gt;to set the active config&lt;br /&gt;powercfg -s guid&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6373147705840805756?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6373147705840805756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/windows7-power-scheme-from-command-line.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6373147705840805756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6373147705840805756'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/windows7-power-scheme-from-command-line.html' title='Windows7 Power Scheme from the Command Line - PowerCFG'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5165150879774193147</id><published>2010-08-15T11:01:00.001-07:00</published><updated>2010-08-15T11:01:43.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>debugging django</title><content type='html'>http://simonwillison.net/2008/May/22/debugging/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5165150879774193147?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5165150879774193147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/debugging-django.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5165150879774193147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5165150879774193147'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/debugging-django.html' title='debugging django'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6573185070099480087</id><published>2010-08-15T09:01:00.000-07:00</published><updated>2010-08-15T09:06:38.977-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><title type='text'>sqLite</title><content type='html'>Dr Dobbs&lt;br /&gt;http://www.drdobbs.com/184401773;jsessionid=0COIHAUN55BUJQE1GHOSKH4ATMY32JVN&lt;br /&gt;&lt;br /&gt;limitations of sqlite&lt;br /&gt;- http://www.sqlite.org/omitted.html&lt;br /&gt;- http://www.sqlite.org/limits.html&lt;br /&gt;- http://www.sqlite.org/limits.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6573185070099480087?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6573185070099480087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/sqlite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6573185070099480087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6573185070099480087'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/sqlite.html' title='sqLite'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-8259949382071237859</id><published>2010-08-06T02:41:00.000-07:00</published><updated>2010-08-06T02:42:37.332-07:00</updated><title type='text'>Data Access - Context based vs Generic</title><content type='html'>http://ayende.com/Blog/archive/2010/08/06/data-access-is-contextual-a-generic-approach-will-fail.aspx?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+AyendeRahien+(Ayende+%40+Rahien)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-8259949382071237859?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/8259949382071237859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/data-access-context-based-vs-generic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8259949382071237859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/8259949382071237859'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/data-access-context-based-vs-generic.html' title='Data Access - Context based vs Generic'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4214826449687793145</id><published>2010-08-06T02:40:00.000-07:00</published><updated>2011-04-01T00:54:26.051-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><title type='text'>Agile Dev &amp; Pair Programming</title><content type='html'>Martin Fowler from Thoughtworks speaks at Univ du SI&lt;br /&gt;http://universite-du-si.com/fr/conferences/6/sessions/909&lt;br /&gt;&lt;br /&gt;http://agilemanifesto.org/&lt;br /&gt;http://martinfowler.com/articles/newMethodology.html&lt;br /&gt;http://www.scrum.org/&lt;br /&gt;&lt;br /&gt;Ken Schwaber&lt;br /&gt;http://www.youtube.com/watch?v=IyNPeTn8fpo&lt;br /&gt;&lt;br /&gt;Agile Modeling&lt;br /&gt;http://www.agilemodeling.com/essays/introductionToAM.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4214826449687793145?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4214826449687793145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/agile-dev-pair-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4214826449687793145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4214826449687793145'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/agile-dev-pair-programming.html' title='Agile Dev &amp; Pair Programming'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7618425047643882881</id><published>2010-08-03T01:21:00.000-07:00</published><updated>2011-02-06T10:21:01.367-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vs2010'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Debugging Managed Code Called from an UnManaged External EXE</title><content type='html'>&lt;a href="http://connect.microsoft.com/VisualStudio/feedback/details/554067/cannot-debug-net-2-0-3-0-3-5-code-using-f5-in-mixed-mode-from-native-c-projects-or-c-project-with-start-external-program-set-to-native-exe"&gt;MSDN Bug Report with Problem Description&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Cannot debug .NET 2.0/3.0/3.5 code using F5 in mixed mode from native c++ projects or c# project with 'start external program' set to native .exe.&lt;br /&gt;&lt;br /&gt;For pure native c++ projects, when mixed mode debugging is selected in the properties of the startup project and the user presses 'F5', VS 2010 starts debugging for native and .NET 4.0 code - this assumption is not justified, since the user may want to debug native and .NET 2.0 code.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/b/debugger/archive/2010/04/30/can-t-hit-breakpoints-in-a-plug-in-or-can-t-debug-net-2-0-3-0-3-5-from-a-mixed-mode-exe-project-with-visual-studio-2010.aspx"&gt;MSDN Fix&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;There are two scenarios however that people have been encountering since Visual Studio 2010 released where Visual Studio cannot correctly determine which engine to attach with, and therefore uses the default of 4.0 leaving 2.0/3.0/3.5 applications “un-debuggable”; (1) developing a class library plug-in for a third party application (Excel, Work, AutoCAD, etc), and (2) interop debugging when launching a native .exe project.  In both cases the symptoms will be the same, you will be unable to hit breakpoints in your managed code (they will be hollow with a message that “No symbols have been loaded for this document”) as well as being unable to step into the managed code.&lt;br /&gt;&lt;br /&gt;As I explained above, the cause of this is the managed application is 3.5 or previous, and the debugger is attached with the 4.0 engine.  The best workaround is to add a &lt;supportedRuntime&gt; tag to your application’s *.exe.config file.  For example, if I am debugging the application foo.exe I would edit (or create if necessary) the foo.exe.config file in the same directory as foo.exe.  I would then add the &lt;supportedRuntime&gt; tag with the correct version of the .NET runtime in the &lt;startup&gt; section as shown in the example below.  This will let Visual Studio know which version of the .NET runtime you will be running (so if you are developing a class library plug-in for Excel, you would add the &lt;supportedRuntime&gt; tag to the excel.exe.config file).&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- sample foo.exe.config --&amp;gt;&lt;br /&gt;&amp;lt;?xml version ="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;    &amp;lt;startup&amp;gt;&lt;br /&gt;        &amp;lt;supportedRuntime version="v2.0.[version on your machine]" /&amp;gt;&lt;br /&gt;    &amp;lt;/startup&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&lt;br /&gt;To determine the correct [version on your machine] look in the “C:\Windows\Microsoft.NET\Framework” directory for the most recent “v2.0.xxxxx” folder.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7618425047643882881?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7618425047643882881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/08/debugging-managed-code-called-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7618425047643882881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7618425047643882881'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/08/debugging-managed-code-called-from.html' title='Debugging Managed Code Called from an UnManaged External EXE'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2603110681760633193</id><published>2010-07-31T11:57:00.000-07:00</published><updated>2010-12-17T00:50:23.054-08:00</updated><title type='text'>change apache/apache2 port</title><content type='html'>'ports.conf', if you're using ubuntu, is located @ '/etc/apache' (apache), '/etc/apache2' (apache2)&lt;br /&gt;&lt;br /&gt;$ sudo gedit etc/apache2/ports.conf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2603110681760633193?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2603110681760633193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/change-apacheapache2-port.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2603110681760633193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2603110681760633193'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/change-apacheapache2-port.html' title='change apache/apache2 port'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5775438879872380708</id><published>2010-07-30T00:38:00.000-07:00</published><updated>2010-07-30T00:40:17.517-07:00</updated><title type='text'>netwrokking</title><content type='html'>http://blog.ksplice.com/2010/07/learning-by-doing-writing-your-own-traceroute-in-8-easy-steps/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5775438879872380708?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5775438879872380708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/netwrokking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5775438879872380708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5775438879872380708'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/netwrokking.html' title='netwrokking'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-3083246239414103750</id><published>2010-07-25T03:51:00.000-07:00</published><updated>2010-07-25T04:34:54.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='os'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>to mount a disk in linux</title><content type='html'>all devices are listed as files in /dev&lt;br /&gt;&lt;br /&gt;e.g. $ ls -l /dev&lt;br /&gt;for a list of all devices in /dev&lt;br /&gt;&lt;br /&gt;to filter it down to devices containing the string 'sda'&lt;br /&gt;$ ls -l /dev | grep -i sda&lt;br /&gt;&lt;br /&gt;which for example returns &lt;br /&gt;&lt;br /&gt;ptysd&lt;br /&gt;sda&lt;br /&gt;sda1&lt;br /&gt;sda2&lt;br /&gt;sda5&lt;br /&gt;sdb&lt;br /&gt;... and more&lt;br /&gt;&lt;br /&gt;then&lt;br /&gt;$ sudo fdisk -l /dev/sda&lt;br /&gt;&lt;br /&gt;fdisk in this case yields partition information for the device&lt;br /&gt;fdisk --help for usage&lt;br /&gt;&lt;br /&gt;also&lt;br /&gt;$ cat /var/log/messages&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-3083246239414103750?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/3083246239414103750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/to-mount-disk-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3083246239414103750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3083246239414103750'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/to-mount-disk-in-linux.html' title='to mount a disk in linux'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-3027439716362615985</id><published>2010-07-25T02:58:00.001-07:00</published><updated>2010-07-25T03:18:08.977-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='service_model'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>mod_wsgi</title><content type='html'>mod_wsgi is now the effective supercedent of mod_python&lt;br /&gt;&lt;br /&gt;http://code.google.com/p/modwsgi/&lt;br /&gt;&lt;br /&gt;ubuntu package = libapache2-mod-wsgi&lt;br /&gt;&lt;br /&gt;ERROR&lt;br /&gt;apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName&lt;br /&gt;FIX - courtesy of Mohamed Aslam&lt;br /&gt;&lt;br /&gt;http://mohamedaslam.com/how-to-fix-apache-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127011-for-servername-error-on-ubuntu/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-3027439716362615985?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/3027439716362615985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/modwsgi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3027439716362615985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3027439716362615985'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/modwsgi.html' title='mod_wsgi'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5250872448187146669</id><published>2010-07-25T02:46:00.000-07:00</published><updated>2010-12-24T07:18:52.418-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>What is mod_python ?</title><content type='html'>mod_python&lt;br /&gt;1. &lt;a href="http://onlamp.com/pub/a/python/2003/10/02/mod_python.html"&gt;o'Reilly article by Gregory Trubetskoy&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://en.wikipedia.org/wiki/Mod_python"&gt;WikiPedia&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;but, most importantly, it appears that &lt;br /&gt;MOD_PYTHON IS DEAD !&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;LONG LIVE &lt;b&gt;MOD_WSGI&lt;/b&gt; !&lt;br /&gt;&lt;a href="http://code.google.com/p/modwsgi/"&gt;WSGI Project Page&lt;/a&gt; @ Google Code&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.dscpl.com.au/2010/06/modpython-project-is-now-officially.html"&gt;modpython-project-is-now-officially-dead&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blog.dscpl.com.au/2010/05/modpython-project-soon-to-be-officially.html"&gt;modpython-project-soon-to-be-officially-dead&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.djangoproject.com/ticket/9970"&gt;from django&lt;/a&gt;&lt;br /&gt;&lt;a href="http://pycruft.wordpress.com/2010/06/17/mod_python-is-dead/"&gt;Blog Piece&lt;/a&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/3319545/mod-wsgi-mod-python-or-just-cgi"&gt;StackOverflow Thread&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5250872448187146669?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5250872448187146669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/what-is-modpython.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5250872448187146669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5250872448187146669'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/what-is-modpython.html' title='What is mod_python ?'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4503497406474445076</id><published>2010-07-25T02:10:00.000-07:00</published><updated>2010-07-25T02:22:15.861-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>to run a pythonscript from ubuntu command line</title><content type='html'>to run a pythonscript from ubuntu command line&lt;br /&gt;&lt;br /&gt;to execute script 'hw.py'&lt;br /&gt;from the command line&lt;br /&gt;in the director of 'hw.py' [i.e. if you entered 'ls' you would see hw.py in the listing)&lt;br /&gt;&lt;br /&gt;first, make script executable by granting rights&lt;br /&gt;$ sudo chmod +x hw.py&lt;br /&gt;&lt;br /&gt;add the following line to the beginning of the script&lt;br /&gt;#!/usr/bin/python&lt;br /&gt;&lt;br /&gt;this instructs the shell to hand the script over to the the python runtime binary,&lt;br /&gt;which is located /usr/bin/python&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4503497406474445076?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4503497406474445076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/to-run-pythonscript-from-ubuntu-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4503497406474445076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4503497406474445076'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/to-run-pythonscript-from-ubuntu-command.html' title='to run a pythonscript from ubuntu command line'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7105617150290002721</id><published>2010-07-21T00:46:00.000-07:00</published><updated>2010-07-21T00:49:37.844-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='samples'/><category scheme='http://www.blogger.com/atom/ns#' term='mssql'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>mssql-08 sample databases</title><content type='html'>available from CodePlex:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msftdbprodsamples.codeplex.com/"&gt;official ms sample databases&lt;/a&gt;&lt;br /&gt;&lt;a href="http://sqlserversamples.codeplex.com/"&gt;community samples&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7105617150290002721?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7105617150290002721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/mssql-08-sample-databases.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7105617150290002721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7105617150290002721'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/mssql-08-sample-databases.html' title='mssql-08 sample databases'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6886937704796439783</id><published>2010-07-20T14:49:00.000-07:00</published><updated>2010-07-21T07:10:30.338-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>DocPy - Python Source Doc Gen</title><content type='html'>&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# docpy.py - david.barkhuizn@gmail.com&lt;br /&gt;&lt;br /&gt;# 1.    module methods - signature, followed by docstring&lt;br /&gt;# 2.    module fields ?&lt;br /&gt;# 3.    module classes&lt;br /&gt;#           class name, parent class, __init__ method parameters &amp; docstring&lt;br /&gt;#           instance fields (get from self.? refs in __init__ method)&lt;br /&gt;&lt;br /&gt;# ---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;# ISSUES&lt;br /&gt;# need to strip out classes before extracting method info&lt;br /&gt;# can't handle multi-line method signatures&lt;br /&gt;&lt;br /&gt;# ---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;# ---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;single_marker = '\'\'\''&lt;br /&gt;double_marker = '\"\"\"'    &lt;br /&gt;&lt;br /&gt;# ---------------------------------------------------------------        &lt;br /&gt;&lt;br /&gt;class MethodInfo:&lt;br /&gt;    &lt;br /&gt;    def __init__(self, method_name, params, docstrings):&lt;br /&gt;        '''&lt;br /&gt;        method_name - string&lt;br /&gt;        params - list of param name strings        &lt;br /&gt;        '''&lt;br /&gt;        self.method_name = method_name&lt;br /&gt;        self.params = params&lt;br /&gt;        self.docstrings = docstrings      &lt;br /&gt;&lt;br /&gt;# ---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;def load_text_file(file_path):&lt;br /&gt;    '''&lt;br /&gt;    return list of lines in text file @ 'file_path'&lt;br /&gt;    '''&lt;br /&gt;&lt;br /&gt;    try:&lt;br /&gt;        text_file = open(file_path, 'r')&lt;br /&gt;        text_block = text_file.read()&lt;br /&gt;        lines = text_block.split('\n')&lt;br /&gt;        text_file.close()&lt;br /&gt;        return lines&lt;br /&gt;        &lt;br /&gt;    except Exception, err:   &lt;br /&gt;        print('error during reading of text file %s' % file_path)&lt;br /&gt;        print(err)&lt;br /&gt;        return []&lt;br /&gt;&lt;br /&gt;def src_file_path_from_cmdargs():&lt;br /&gt;&lt;br /&gt;    valid_args = []    &lt;br /&gt;&lt;br /&gt;    for arg in sys.argv:&lt;br /&gt;        if arg.lower() not in ['docpy.py', 'python']:        &lt;br /&gt;            valid_args.append(arg.lower())&lt;br /&gt;   &lt;br /&gt;    return 'docpy.py'&lt;br /&gt;   &lt;br /&gt;    if len(valid_args) != 1:&lt;br /&gt;        return ''&lt;br /&gt;    else:&lt;br /&gt;        return valid_args[0]&lt;br /&gt;        &lt;br /&gt;def get_sig_line_idxs(lines):&lt;br /&gt;    '''&lt;br /&gt;    lines = list of lines in python source file (in sequence)&lt;br /&gt;    '''    &lt;br /&gt;    token = 'def '   &lt;br /&gt;    &lt;br /&gt;    indices = []&lt;br /&gt;    &lt;br /&gt;    for i in range(len(lines)):&lt;br /&gt;        if lines[i].strip()[:4] == token:&lt;br /&gt;            indices.append(i)&lt;br /&gt;&lt;br /&gt;    return indices&lt;br /&gt;&lt;br /&gt;def parse_method_sig(sig):    &lt;br /&gt;&lt;br /&gt;    # e.g.'    def parse_methodsig(sig):#comment    '&lt;br /&gt;    &lt;br /&gt;    sig = sig.strip()&lt;br /&gt;    # e.g.'def parse_methodsig(sig):#comment'&lt;br /&gt;    &lt;br /&gt;    sig = sig[4:len(sig)]&lt;br /&gt;    # e.g.'parse_methodsig(sig):#comment'&lt;br /&gt;    &lt;br /&gt;    i = sig.find('#')&lt;br /&gt;    if i != -1:&lt;br /&gt;        sig = sig[:i-1]&lt;br /&gt;    # e.g.'parse_methodsig(sig):&lt;br /&gt;    &lt;br /&gt;    left = sig.find('(')&lt;br /&gt;    right = sig.rfind(')')&lt;br /&gt;    &lt;br /&gt;    meth_name = sig[:left]&lt;br /&gt;    &lt;br /&gt;    params = []&lt;br /&gt;    &lt;br /&gt;    if right - left != 1:&lt;br /&gt;    &lt;br /&gt;        params = sig[left+1:right]&lt;br /&gt;        &lt;br /&gt;        params = params.replace(',', ' ')&lt;br /&gt;        &lt;br /&gt;        got_double = True&lt;br /&gt;        while got_double == True:    &lt;br /&gt;            got_double = (params.find('  ') != -1)&lt;br /&gt;            if got_double:&lt;br /&gt;                params = params.replace('  ', ' ')&lt;br /&gt;        &lt;br /&gt;        params = params.split(' ')&lt;br /&gt;    &lt;br /&gt;    return MethodInfo(meth_name, params, [])   &lt;br /&gt;    &lt;br /&gt;def extract_single_line_docstring(docstring):&lt;br /&gt;    '''example of single line method docstring'''&lt;br /&gt;    &lt;br /&gt;    lsingle = docstring.find(single_marker)&lt;br /&gt;    ldouble = docstring.find(double_marker)&lt;br /&gt;    &lt;br /&gt;    marker = ''&lt;br /&gt;    left = -1&lt;br /&gt;    if lsingle != -1:&lt;br /&gt;        marker = single_marker&lt;br /&gt;        left = lsingle&lt;br /&gt;    elif ldouble != -1:&lt;br /&gt;        marker = double_marker&lt;br /&gt;        left = ldouble&lt;br /&gt;    else:&lt;br /&gt;        return ''&lt;br /&gt;        &lt;br /&gt;    right = docstring.rfind(marker)&lt;br /&gt;    &lt;br /&gt;    if (right != -1) and (right != left):&lt;br /&gt;        return docstring[left+3:right]&lt;br /&gt;    else:&lt;br /&gt;        return ''&lt;br /&gt;  &lt;br /&gt;def strip_leading_triplequotes(line):&lt;br /&gt;    &lt;br /&gt;    left = line.find(single_marker)&lt;br /&gt;    if left == -1:&lt;br /&gt;        left = line.find(double_marker)&lt;br /&gt;        if left == -1:&lt;br /&gt;            return ''&lt;br /&gt;        &lt;br /&gt;    return line[left + 3:]&lt;br /&gt;&lt;br /&gt;def strip_trailing_triplequotes(line):&lt;br /&gt;    &lt;br /&gt;    right = line.rfind(double_marker)&lt;br /&gt;    if right == -1:&lt;br /&gt;        right = line.rfind(double_marker)&lt;br /&gt;        if right == -1:&lt;br /&gt;            return ''&lt;br /&gt;        &lt;br /&gt;    return line[:right]&lt;br /&gt;    &lt;br /&gt;def extract_docstrings(lines, meth_sig_idx, next_meth_sig_idx):&lt;br /&gt;&lt;br /&gt;    # determine line indices of starting and ending triple quotes&lt;br /&gt;    &lt;br /&gt;    start = -1&lt;br /&gt;    end = -1&lt;br /&gt;    &lt;br /&gt;    for i in range(meth_sig_idx + 1, next_meth_sig_idx):&lt;br /&gt;        &lt;br /&gt;        line = lines[i]&lt;br /&gt;        &lt;br /&gt;        sidx = line.find(single_marker)&lt;br /&gt;        &lt;br /&gt;        if sidx == -1:&lt;br /&gt;            sidx = line.find(double_marker)        &lt;br /&gt;        &lt;br /&gt;        if sidx != -1:&lt;br /&gt;            if start == -1:&lt;br /&gt;                start = i&lt;br /&gt;            else:&lt;br /&gt;                end = i&lt;br /&gt;                break&lt;br /&gt;&lt;br /&gt;    if start == -1:&lt;br /&gt;        return []&lt;br /&gt;    elif end == -1:&lt;br /&gt;        single_line = extract_single_line_docstring(lines[start])&lt;br /&gt;        if single_line != '':&lt;br /&gt;            return [ single_line ]&lt;br /&gt;        else:&lt;br /&gt;            return []&lt;br /&gt;    else:&lt;br /&gt;        docstrings = []&lt;br /&gt;        &lt;br /&gt;        for i in range(start, end + 1):&lt;br /&gt;            no_whitespace = lines[i].strip()&lt;br /&gt;            if i == start:&lt;br /&gt;                stripped = strip_leading_triplequotes(no_whitespace)&lt;br /&gt;                if stripped != '':&lt;br /&gt;                    docstrings.append(stripped)&lt;br /&gt;            elif i == end:&lt;br /&gt;                stripped = strip_trailing_triplequotes(no_whitespace)&lt;br /&gt;                if stripped != '':&lt;br /&gt;                    docstrings.append(stripped)&lt;br /&gt;            else:&lt;br /&gt;                docstrings.append(no_whitespace)&lt;br /&gt;        &lt;br /&gt;        return docstrings&lt;br /&gt;&lt;br /&gt;def get_method_info(lines, meth_sig_idx, next_meth_sig_idx):&lt;br /&gt;    &lt;br /&gt;    method_info = parse_method_sig(lines[meth_sig_idx])&lt;br /&gt;    method_info.docstrings = extract_docstrings(lines, meth_sig_idx, next_meth_sig_idx)&lt;br /&gt;    &lt;br /&gt;    return method_info&lt;br /&gt;        &lt;br /&gt;def mock_method(one, two, three, four):&lt;br /&gt;    print('vokol')&lt;br /&gt;&lt;br /&gt;def display_module_method_info(meth_info):&lt;br /&gt;&lt;br /&gt;    print(meth_info.method_name)&lt;br /&gt;    for p in meth_info.params:&lt;br /&gt;        print('  ' + p)&lt;br /&gt;    for docstring in meth_info.docstrings:&lt;br /&gt;        print(docstring)    &lt;br /&gt;    &lt;br /&gt;def main():&lt;br /&gt;&lt;br /&gt;    text_file_path = src_file_path_from_cmdargs()&lt;br /&gt;    lines = load_text_file(text_file_path)&lt;br /&gt;    sig_line_idxs = get_sig_line_idxs(lines)&lt;br /&gt;    &lt;br /&gt;    module_methods_info = []    &lt;br /&gt;    &lt;br /&gt;    for i in range(len(sig_line_idxs)):&lt;br /&gt;       &lt;br /&gt;        idx = sig_line_idxs[i]&lt;br /&gt;        &lt;br /&gt;        if i &lt; len(sig_line_idxs) - 1:&lt;br /&gt;            next_idx = sig_line_idxs[i + 1]&lt;br /&gt;        else:&lt;br /&gt;            next_idx = len(sig_line_idxs)&lt;br /&gt;        &lt;br /&gt;        module_methods_info.append( get_method_info(lines, idx, next_idx) )&lt;br /&gt;&lt;br /&gt;    for meth_info in module_methods_info:&lt;br /&gt;        display_module_method_info(meth_info)&lt;br /&gt;       &lt;br /&gt;        &lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;    main()&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6886937704796439783?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6886937704796439783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/docpy-python-source-doc-gen.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6886937704796439783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6886937704796439783'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/docpy-python-source-doc-gen.html' title='DocPy - Python Source Doc Gen'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1062330249321011233</id><published>2010-07-19T01:16:00.001-07:00</published><updated>2010-12-04T04:48:49.903-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='mssql'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Untangling Object Dependencies in MS-SQL-08</title><content type='html'>useful &lt;a href="http://blogs.techrepublic.com.com/datacenter/?p=277"&gt;TechRepublic Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1. get a list of all system objects from &lt;b&gt;sys.objects&lt;/b&gt;&lt;br /&gt;name,object_id,parent_object_id,type&lt;br /&gt;&lt;br /&gt;2. determine individual dependencies from &lt;b&gt;sys.sql_dependencies&lt;/b&gt;&lt;br /&gt;object_id, referenced_major_id&lt;br /&gt;&lt;br /&gt;3. use a &lt;a href="http://www.danbala.com/python/tsort.py.html"&gt;topological sort&lt;/a&gt; to untangle the list of dependencies to a simple dependency tree.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-1062330249321011233?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1062330249321011233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/untangling-object-dependencies-in-ms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1062330249321011233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1062330249321011233'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/untangling-object-dependencies-in-ms.html' title='Untangling Object Dependencies in MS-SQL-08'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4463828098685906141</id><published>2010-07-18T10:54:00.000-07:00</published><updated>2010-12-17T00:50:57.002-08:00</updated><title type='text'>setting up iburst driver for ubuntu 8-10 intrepid ibex</title><content type='html'>http://blog.hostinghabitat.com/2009/02/iburst-usb-modem-installation-tutorial.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4463828098685906141?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4463828098685906141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/setting-up-iburst-driver-for-ubuntu-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4463828098685906141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4463828098685906141'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/setting-up-iburst-driver-for-ubuntu-8.html' title='setting up iburst driver for ubuntu 8-10 intrepid ibex'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4386611176106140453</id><published>2010-07-18T09:10:00.000-07:00</published><updated>2010-12-04T04:04:28.743-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iburst'/><category scheme='http://www.blogger.com/atom/ns#' term='drivers'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>ibdriver (iburst driver) for ubuntu 10.04</title><content type='html'>&lt;a href="http://sourceforge.net/projects/ibdriver/files/"&gt;Driver for 2.6.28 kernel&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Patch from 2.6.28 to 2.6.31:&lt;br /&gt;&lt;a href="http://jkroon.blogs.uls.co.za/it/networking/ibdriver-and-the-2631-kernel-iburst-linux-drivers"&gt;option 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://jkroon.blogs.uls.co.za/wp-content/uploads/2009/10/ibdriver-134-linux-2628-2631.patch"&gt;option 2&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4386611176106140453?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4386611176106140453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/ibdriver-iburst-driver-for-ubuntu-1004.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4386611176106140453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4386611176106140453'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/ibdriver-iburst-driver-for-ubuntu-1004.html' title='ibdriver (iburst driver) for ubuntu 10.04'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2234976961373177195</id><published>2010-07-17T09:47:00.000-07:00</published><updated>2010-12-04T05:03:24.146-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='service'/><category scheme='http://www.blogger.com/atom/ns#' term='python yahoo finance client'/><category scheme='http://www.blogger.com/atom/ns#' term='yahoo_finance'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>yapyfin.py Python Yahoo Finance Client</title><content type='html'>Yahoo Finance exposes a large amount of historical US equity data via their html api.  The python code below downloads the open-high-low-close-adjclose-volume data for British Petroleum (BP) = stock ticker symbol BP, between 1900/01/01 and 2010/07/18, to text file BP.csv&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;import httplib&lt;br /&gt;httplib.HTTPConnection.debuglevel = 1&lt;br /&gt;import urllib&lt;br /&gt;&lt;br /&gt;def enc_quote(ticker, fromY, fromM, fromD, toY, toM, toD):&lt;br /&gt;&lt;br /&gt;    quote = dict()&lt;br /&gt;&lt;br /&gt;    quote['s'] = ticker&lt;br /&gt;    quote['a'] = fromM&lt;br /&gt;    quote['b'] = fromD&lt;br /&gt;    quote['c'] = fromY&lt;br /&gt;    quote['d'] = toD&lt;br /&gt;    quote['e'] = toM&lt;br /&gt;    quote['f'] = toY&lt;br /&gt;    quote['g'] = "d" &lt;br /&gt;&lt;br /&gt;    return urllib.urlencode(quote)&lt;br /&gt;    &lt;br /&gt;url_stem = 'http://ichart.yahoo.com/table.csv?'&lt;br /&gt;quote_tokens = enc_quote('BP', '1900', '01', '01', '2010', '07', '18')&lt;br /&gt;url = url_stem + "&amp;ignore=.csv" + quote_tokens&lt;br /&gt;&lt;br /&gt;f = urllib.urlopen(url)&lt;br /&gt;body = f.read()&lt;br /&gt;f.close()&lt;br /&gt;&lt;br /&gt;try:&lt;br /&gt;    f = open('BP.csv', 'w')&lt;br /&gt;    f.write(body)&lt;br /&gt;    f.close()&lt;br /&gt;except Exception, err:&lt;br /&gt;    print('ERROR: %s\n' % str(err))&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2234976961373177195?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2234976961373177195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/yapyfinpy-python-yahoo-finance-client.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2234976961373177195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2234976961373177195'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/yapyfinpy-python-yahoo-finance-client.html' title='yapyfin.py Python Yahoo Finance Client'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-592828649104538176</id><published>2010-07-15T05:33:00.000-07:00</published><updated>2010-12-04T04:02:45.189-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='mssql'/><category scheme='http://www.blogger.com/atom/ns#' term='fix'/><title type='text'>PyMSSql - import _mssql - ImportError:  DLL load failed:  The specific module could not be found</title><content type='html'>under windows xp pro,&lt;br /&gt;When attempting to import pymssql.py,&lt;br /&gt;I experienced the following error:&lt;br /&gt;&lt;br /&gt;"&lt;br /&gt;import _mssql&lt;br /&gt;ImportError:  DLL load failed:  The specific module could not be found&lt;br /&gt;"&lt;br /&gt;&lt;br /&gt;So this is all a bit cryptic, but after googling, which suggested using a windows diagnostic tool [&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;ProcessMonitor&lt;/a&gt;] to locate the failing process, it turns out that what is missing is an (accessible) copy of 'mscvr71.dll', which can be &lt;a href="http://www.dll-files.com/msvcr71.zip?0VLdREXMiO"&gt;downloaded off the net&lt;/a&gt;, and should be copied to 'c:\windows\system32\', or 'c:\windows\system\' if running 64bit windows.&lt;br /&gt;&lt;br /&gt;you then need to run 'regsvr32 msvcr71.dll' from the command line, in the directory that you copied the dll to.&lt;br /&gt;&lt;br /&gt;if you get a 'cant find entrypoint' type error message, its actually still all ok, pymssql should run just fine by that point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-592828649104538176?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/592828649104538176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/pymssql-import-mssql-importerror-dll.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/592828649104538176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/592828649104538176'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/pymssql-import-mssql-importerror-dll.html' title='PyMSSql - import _mssql - ImportError:  DLL load failed:  The specific module could not be found'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2570445153983095836</id><published>2010-07-13T06:10:00.001-07:00</published><updated>2010-07-13T06:10:42.541-07:00</updated><title type='text'>Matching File Extension to Applications</title><content type='html'>http://filext.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2570445153983095836?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2570445153983095836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/matching-file-extension-to-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2570445153983095836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2570445153983095836'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/matching-file-extension-to-applications.html' title='Matching File Extension to Applications'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7303608657454056934</id><published>2010-07-11T05:11:00.000-07:00</published><updated>2011-08-08T11:22:11.413-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Python Client Consumes WCF Web Service</title><content type='html'>- &lt;a href="http://users.skynet.be/pascalbotte/rcx-ws-doc/python.htm"&gt;Make a SOAP client with Python&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://stackoverflow.com/questions/115316/how-can-i-consume-a-wsdl-soap-web-service-in-python"&gt;StackOverFlow - How can I consume a WSDL (SOAP) web service in Python?&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://pywebsvcs.sourceforge.net/"&gt;SourceForge - Python Web Services Project&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7303608657454056934?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7303608657454056934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/python-client-consumes-wcf-web-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7303608657454056934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7303608657454056934'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/python-client-consumes-wcf-web-service.html' title='Python Client Consumes WCF Web Service'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4778166878010104901</id><published>2010-07-01T07:18:00.000-07:00</published><updated>2010-12-04T04:30:20.047-08:00</updated><title type='text'>RSA ID Number Check-Sum Algorithm</title><content type='html'>infomation sourced from &lt;a href="http://www.oppiweb.com/forum/index.php?topic=332.msg356;topicseen"&gt;this site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;13 digit South African Identity Numbers have the following format&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;{YYMMDD}{G}{SSS}{A}{Z}&lt;br /&gt;&lt;br /&gt;YYMMDD  Date of birth&lt;br /&gt;G       Gender:  0-4 = Female, 5-9 = Male&lt;br /&gt;SSS     Sequence No. for DOB/G combination.&lt;br /&gt;C       Citizenship: 0 = SA, 1 = other&lt;br /&gt;A       generally, but not strictly = 8, 9&lt;br /&gt;Z       CheckSum Digit&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Calculation of Checksum Digit = Z&lt;br /&gt;&lt;br /&gt;A = sum of digits in odd position (excluding last checksum digit)&lt;br /&gt;B = sum of all the digits of the product of 2 and the number formed from the original be removing all the odd digits&lt;br /&gt;C = A + B&lt;br /&gt;Z = 10 - (second digit of C)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4778166878010104901?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4778166878010104901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/07/rsa-id-number-check-sum-algorithm.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4778166878010104901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4778166878010104901'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/07/rsa-id-number-check-sum-algorithm.html' title='RSA ID Number Check-Sum Algorithm'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4911293795804640936</id><published>2010-06-13T00:21:00.000-07:00</published><updated>2010-06-13T00:22:34.136-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><title type='text'>Test Driven Python Development [link]</title><content type='html'>http://www.slideshare.net/Skud/test-driven-development-tutorial&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4911293795804640936?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4911293795804640936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/06/test-driven-python-development-link.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4911293795804640936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4911293795804640936'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/06/test-driven-python-development-link.html' title='Test Driven Python Development [link]'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7393131350861653172</id><published>2010-06-13T00:17:00.000-07:00</published><updated>2010-06-13T00:19:34.352-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='admin'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Linux Admin Blog [excellent]</title><content type='html'>http://utcc.utoronto.ca/~cks/space/blog/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7393131350861653172?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7393131350861653172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/06/linux-admin-blog-excellent.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7393131350861653172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7393131350861653172'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/06/linux-admin-blog-excellent.html' title='Linux Admin Blog [excellent]'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-4735748776685479794</id><published>2010-05-30T00:36:00.000-07:00</published><updated>2010-05-30T00:37:56.622-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Unit Testing C# with NUnit</title><content type='html'>MonoDevelop&lt;br /&gt;http://www.dijksterhuis.org/using-nunit-with-monodevelop/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-4735748776685479794?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/4735748776685479794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/05/unit-testing-c-with-nunit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4735748776685479794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/4735748776685479794'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/05/unit-testing-c-with-nunit.html' title='Unit Testing C# with NUnit'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6298998852561623738</id><published>2010-05-26T06:49:00.000-07:00</published><updated>2010-05-26T06:50:22.179-07:00</updated><title type='text'>How-To Change the Names of SQL Server DB Files</title><content type='html'>http://www.kodyaz.com/articles/change-sql-server-database-file-names.aspx&lt;br /&gt;http://timothychenallen.blogspot.com/2007/02/sql-server-how-to-change-database-file.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6298998852561623738?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6298998852561623738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/05/how-to-change-names-of-sql-server-db.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6298998852561623738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6298998852561623738'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/05/how-to-change-names-of-sql-server-db.html' title='How-To Change the Names of SQL Server DB Files'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2312156919342381185</id><published>2010-05-26T06:02:00.000-07:00</published><updated>2010-05-26T06:03:34.969-07:00</updated><title type='text'>Power-Commands for Visual Studio 2008</title><content type='html'>http://code.msdn.microsoft.com/PowerCommands&lt;br /&gt;http://visualstudiogallery.msdn.microsoft.com/en-us/e5f41ad9-4edc-4912-bca3-91147db95b99&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2312156919342381185?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2312156919342381185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/05/power-commands-for-visual-studio-2008.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2312156919342381185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2312156919342381185'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/05/power-commands-for-visual-studio-2008.html' title='Power-Commands for Visual Studio 2008'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-418950400956583449</id><published>2010-04-26T07:13:00.000-07:00</published><updated>2011-02-06T09:47:38.121-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='decorator'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='oop'/><title type='text'>Decorators &amp; OO in Python</title><content type='html'>Jack Diederich&lt;br /&gt;&lt;a href="http://mail.python.org/pipermail/python-3000/2007-March/006119.html"&gt;[Python-3000] PEP Draft: Class Decorators&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cesar Otero - IBM DevelopWorks White Paper&lt;br /&gt;Python 3 primer, Part 2: Advanced topics&lt;br /&gt;&lt;a href="http://www.ibm.com/developerworks/linux/library/l-python3-2/index.html"&gt;Metaclasses, decorators, and other strange creatures&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-418950400956583449?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/418950400956583449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/04/decorators-oo-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/418950400956583449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/418950400956583449'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/04/decorators-oo-in-python.html' title='Decorators &amp; OO in Python'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2392670107135786344</id><published>2010-04-26T02:52:00.000-07:00</published><updated>2010-07-17T07:59:05.125-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reflection'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='oop'/><title type='text'>Python Introspection/Reflection Utility Class</title><content type='html'>So the code below is for a python module 'mir.py', and contains a class 'Mir' and a rather thin main method 'run()' which demos the class.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;class Mir:&lt;br /&gt;    """mirror introspection/reflection class"""&lt;br /&gt;&lt;br /&gt;    meth_lookup_token_len = len('&amp;lt;function')&lt;br /&gt;    meth_type_lookup = {&lt;br /&gt;        '&amp;lt;bound me' : 'instance',&lt;br /&gt;        '&amp;lt;function' : 'static',&lt;br /&gt;        '&amp;lt;method-wr' : 'wrapper',&lt;br /&gt;        '&amp;lt;built-in ' : 'built-in'&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    def __init__(self):&lt;br /&gt;        """docstring for initializer"""&lt;br /&gt;        pass&lt;br /&gt;    &lt;br /&gt;    @staticmethod&lt;br /&gt;    def ins(target,show_magic_meths=False):&lt;br /&gt;    &lt;br /&gt;        lines = []&lt;br /&gt;    &lt;br /&gt;        """provide basic information on the target"""&lt;br /&gt;&lt;br /&gt;        # column widthss&lt;br /&gt;        c1 = 20&lt;br /&gt;        c2 = 20&lt;br /&gt;        c3 = 40        &lt;br /&gt;&lt;br /&gt;        field_names = []&lt;br /&gt;        method_names = []&lt;br /&gt;        mangled_field_names = []&lt;br /&gt;&lt;br /&gt;        dir_list = dir(target)&lt;br /&gt;        &lt;br /&gt;        for ob in dir_list:&lt;br /&gt;&lt;br /&gt;            if (callable(getattr(target, ob))):&lt;br /&gt;                method_names.append(ob)&lt;br /&gt;            else:&lt;br /&gt;                field_names.append(ob)&lt;br /&gt;&lt;br /&gt;        # FIELDS --------------------------------------&lt;br /&gt;&lt;br /&gt;        #  double leading and trailing underscore&lt;br /&gt;        magic_fields = []&lt;br /&gt;        # starts and ends with alphabetic&lt;br /&gt;        normal_fields = []&lt;br /&gt;&lt;br /&gt;        # double leading underscore # mangledFields = []&lt;br /&gt;        # single leading underscore # privateFields = []&lt;br /&gt;&lt;br /&gt;        for field_name in field_names:&lt;br /&gt;&lt;br /&gt;            a = getattr(target, field_name)&lt;br /&gt;            l = len(field_name)&lt;br /&gt;&lt;br /&gt;            # magic fields&lt;br /&gt;            if (field_name[0:2] == '__'):&lt;br /&gt;                if (field_name[l - 2 : l] == '__'):&lt;br /&gt;                    magic_fields.append(field_name)&lt;br /&gt;                else:&lt;br /&gt;                    mangled_field_names.append(field_names)&lt;br /&gt;            else:&lt;br /&gt;                normal_fields.append(field_name)&lt;br /&gt;&lt;br /&gt;        if '__doc__' in magic_fields:&lt;br /&gt;            docstring = getattr(target, '__doc__')&lt;br /&gt;        else:&lt;br /&gt;            docstring = 'no doc string'&lt;br /&gt;&lt;br /&gt;        if '__module__' in magic_fields:&lt;br /&gt;            moduleName = getattr(target, '__module__')&lt;br /&gt;        else:&lt;br /&gt;            moduleName = 'no module'&lt;br /&gt;&lt;br /&gt;        # METHODS&lt;br /&gt;&lt;br /&gt;        # class methods&lt;br /&gt;        # instance methods&lt;br /&gt;        # - constructor&lt;br /&gt;        # - vanilla&lt;br /&gt;&lt;br /&gt;        static_methods = []&lt;br /&gt;        instance_methods = []&lt;br /&gt;&lt;br /&gt;        magic_methods = []&lt;br /&gt;&lt;br /&gt;        meth_info = []&lt;br /&gt;&lt;br /&gt;        for method_name in method_names:&lt;br /&gt;            &lt;br /&gt;            # DETERMINE METHOD TYPE = INSTANCE, STATIC&lt;br /&gt;&lt;br /&gt;            a = getattr(target, method_name)&lt;br /&gt;            try:&lt;br /&gt;                s = (str(a))&lt;br /&gt;                token = s[0:Mir.meth_lookup_token_len+1]&lt;br /&gt;                meth_type = Mir.meth_type_lookup[token]&lt;br /&gt;            except:&lt;br /&gt;                meth_type = s[0:c2]&lt;br /&gt;            else:&lt;br /&gt;                pass&lt;br /&gt;            &lt;br /&gt;            # GET METHOD DOC-STRING&lt;br /&gt;            &lt;br /&gt;            meth_docstring = getattr(a, '__doc__')&lt;br /&gt;&lt;br /&gt;            if (meth_docstring == None):&lt;br /&gt;                meth_docstring = ''&lt;br /&gt;            else:&lt;br /&gt;                meth_docstring = meth_docstring.replace('\n', ' | ')&lt;br /&gt;&lt;br /&gt;            if (meth_type == 'static'):&lt;br /&gt;                static_methods.append((method_name, meth_docstring))&lt;br /&gt;            elif (meth_type == 'instance'):&lt;br /&gt;                instance_methods.append((method_name, meth_docstring))&lt;br /&gt;            else:&lt;br /&gt;                pass&lt;br /&gt;&lt;br /&gt;            L = len(method_name)&lt;br /&gt;            prefix =  (method_name[0:2] == '__')&lt;br /&gt;            suffix =  (method_name[L-2:L] == '__')&lt;br /&gt;            if (prefix and suffix):&lt;br /&gt;                magic_methods.append(method_name)&lt;br /&gt;&lt;br /&gt;            meth_info.append((method_name, meth_type, meth_docstring))&lt;br /&gt;&lt;br /&gt;        lines.append('----------------------------------------------------------------------')    &lt;br /&gt;        lines.append('target = ' + str(target))&lt;br /&gt;        lines.append('target type = ' + str(type(target)))&lt;br /&gt;        lines.append('source module:  %s' % moduleName)&lt;br /&gt;        lines.append('----------------------------------------------------------------------')&lt;br /&gt;        lines.append('docstring:  %s' % docstring)&lt;br /&gt;        lines.append('')&lt;br /&gt;        lines.append('----------------------------------------------------------------------')&lt;br /&gt;        lines.append('FIELDS')&lt;br /&gt;        lines.append('---------------')&lt;br /&gt;        # static&lt;br /&gt;        # class&lt;br /&gt;        # instance&lt;br /&gt;&lt;br /&gt;        for field_name in normal_fields:&lt;br /&gt;            a = getattr(target, field_name)&lt;br /&gt;            lines.append(field_name.ljust(20) + str(a).ljust(30))&lt;br /&gt;&lt;br /&gt;        if (show_magic_meths):&lt;br /&gt;            lines.append('----------------------------------------------------------------------')&lt;br /&gt;            lines.append('METHODS - MAGIC')&lt;br /&gt;            lines.append('---------------')&lt;br /&gt;            for (meth_name, meth_type, methDoc) in meth_info:&lt;br /&gt;                if (meth_name in magic_methods):&lt;br /&gt;                    lines.append(meth_name.ljust(c1) + meth_type.ljust(c2) + methDoc.ljust(c3))&lt;br /&gt;&lt;br /&gt;        lines.append('----------------------------------------------------------------------')&lt;br /&gt;        lines.append('METHODS - NON-MAGIC')&lt;br /&gt;        lines.append('---------------')&lt;br /&gt;        for (meth_name, meth_type, methDoc) in meth_info:&lt;br /&gt;            if (meth_name not in magic_methods):&lt;br /&gt;                lines.append(meth_name.ljust(c1) + meth_type.ljust(c2) + methDoc.ljust(c3))&lt;br /&gt;        &lt;br /&gt;        return lines&lt;br /&gt;&lt;br /&gt;    @staticmethod&lt;br /&gt;    def inspect(target):    &lt;br /&gt;    &lt;br /&gt;        lines = Mir.ins(target)            &lt;br /&gt;        &lt;br /&gt;        for line in lines:&lt;br /&gt;            print(line)                    &lt;br /&gt;                    &lt;br /&gt;    @staticmethod&lt;br /&gt;    def ins2f(target, fname):&lt;br /&gt;        &lt;br /&gt;        file = open(fname, 'w')&lt;br /&gt;        for line in Mir.ins(target):&lt;br /&gt;            file.write(line + '\n')&lt;br /&gt;        file.close()      &lt;br /&gt;    &lt;br /&gt;                    &lt;br /&gt;# #########################################################&lt;br /&gt;&lt;br /&gt;def run():&lt;br /&gt;&lt;br /&gt;    lis = []&lt;br /&gt;    Mir.inspect(lis)&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2392670107135786344?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2392670107135786344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/04/python-introspection-utility-work-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2392670107135786344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2392670107135786344'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/04/python-introspection-utility-work-in.html' title='Python Introspection/Reflection Utility Class'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-6901908066662789223</id><published>2010-04-25T04:24:00.000-07:00</published><updated>2010-12-17T00:51:19.912-08:00</updated><title type='text'>Some OO Concepts in Python</title><content type='html'>&lt;b&gt;PRIVATE VS PUBLIC&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;the short answer is no - in other words, this is not productively supported.&lt;br /&gt;&lt;br /&gt;use the convention of prefixing 'would otherwise be private if the dumb language supported it' fields with an underscore, e.g.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class TheClass:&lt;br /&gt;&lt;br /&gt;  def __init__(self):&lt;br /&gt;    self._nominallyPrivateField = 'private'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;CLASS vs INSTANCE OBJECTS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Class Objects support&lt;br /&gt;- instantiation&lt;br /&gt;- attribute referencing&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class TheClass:&lt;br /&gt;&lt;br /&gt;  classLevelField = 'class level field'&lt;br /&gt;&lt;br /&gt;  def __init__(self):&lt;br /&gt;    self.instanceLevelField = 'instance level field'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Making our descriptively named class more accurately self-referential:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class TheClass:&lt;br /&gt;&lt;br /&gt;  classLevelField = 'class level field'&lt;br /&gt;&lt;br /&gt;  def __init__(self):&lt;br /&gt;    self._nominallyPrivateInstanceLevelField = 'only nominally private instance level field'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Finally, just to avoid any lurking confusion, THE FOLLOWING IS FLAWED&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class TheClass:&lt;br /&gt;&lt;br /&gt;  classLevelField = 'class level field'&lt;br /&gt;&lt;br /&gt;  self._nominallyPrivateInstanceLevelField = 'only nominally private instance level field'&lt;br /&gt;&lt;br /&gt;  def __init__(self):&lt;br /&gt;    pass&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and fails miserably, raising a NameError exception;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;NameError: name 'self' is not defined&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;So, annotating a method with the @classmethod produces something quite similar to a C# static method.  In other words, within the class method only local and class level references are possible, or rather, no instance level field or method is accessible (short of instantiating an object of that class within the class method, and calling the method on that instance).&lt;br /&gt;&lt;br /&gt;Where C# and python differ, however, is that in C# to call the static method DoStuff() on class TheClass, you would have something like this&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;TheClass.DoStuff()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In other words, you can't have something like this, where you call the class method on an instance variable&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;TheClass myClass = new TheClass();&lt;br /&gt;myClass.DoStuff();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The compiler will kick you in the head.&lt;br /&gt;&lt;br /&gt;In python, however, there is no such limitation.  You can happily call a class method on an instance variable (the class method still won't have access to the instance level scope).&lt;br /&gt;&lt;br /&gt;ABSTRACT BASE CLASSES &amp; QUASI-INTERFACES&lt;br /&gt;- ABCs - PEP 3119 = http://www.python.org/dev/peps/pep-3119/&lt;br /&gt;- from the pythondocs:  http://docs.python.org/library/abc.html&lt;br /&gt;- James Tauber's take on interfaces:  http://jtauber.com/blog/2007/03/04/interfaces_versus_abstract_base_classes_in_python/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-6901908066662789223?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/6901908066662789223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/04/some-oo-concepts-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6901908066662789223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/6901908066662789223'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/04/some-oo-concepts-in-python.html' title='Some OO Concepts in Python'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1486862304256516682</id><published>2010-04-15T06:32:00.001-07:00</published><updated>2010-04-15T06:35:58.473-07:00</updated><title type='text'>To Force a Line-Break in a VS2008 Method Summary Comment</title><content type='html'>enclose the target text in &lt;para&gt; &lt;/para&gt; tags.&lt;br /&gt;this will force a line-break afterwards.&lt;br /&gt;&lt;br /&gt;note that a line with &lt;para&gt;&lt;/para&gt; will simply be ignored, and will not produce and empty line as might be expected.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-1486862304256516682?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1486862304256516682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/04/to-force-line-break-in-vs2008-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1486862304256516682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1486862304256516682'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/04/to-force-line-break-in-vs2008-method.html' title='To Force a Line-Break in a VS2008 Method Summary Comment'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5974985327628330548</id><published>2010-04-10T08:03:00.000-07:00</published><updated>2011-01-16T03:20:12.575-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python Resources</title><content type='html'>WHAT IS PYTHON ?&lt;br /&gt;- interpreted&lt;br /&gt;- compiled to intermediate bytecode&lt;br /&gt;- dynamically typed&lt;br /&gt;- functional, object oriented and imperative paradigms&lt;br /&gt;&lt;br /&gt;SOME PYTHON USERS&lt;br /&gt;- google&lt;br /&gt;- facebook ?&lt;br /&gt;- nasa&lt;br /&gt;&lt;br /&gt;A COUPLE OF NOTES ON VERSIONING&lt;br /&gt;- latest release = 3.1&lt;br /&gt;- 2.7 = offers features from 3.0 but and backwards compatibility with 2.x&lt;br /&gt;get the latest version from the &lt;a href="http://www.python.org/download/"&gt;OFFICIAL DOWNLOAD PAGE&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Python-specific Integrated Development Environments (IDE's)&lt;br /&gt;- #1 - &lt;a href="http://www.geany.org/"&gt;GEANY&lt;/a&gt; Light-Weight w. Introspective Predictive Text !!&lt;br /&gt;- &lt;a href="http://dlc.sun.com.edgesuite.net/netbeans/6.5/python/ea/"&gt;netbeans 6.5 python early-access stand-alone&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://netbeans.org/downloads/"&gt;netbeans java with python plugin&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.eclipse.org/downloads/"&gt;eclipse with pydev plugin&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.scintilla.org/SciTEDownload.html"&gt;SCITE text editor&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;TUTORIALS&lt;br /&gt;&lt;br /&gt;Good places to start&lt;br /&gt;- &lt;a href="http://www.python.org/doc/"&gt;The Official Docs&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://diveintopython.org/"&gt;Dive into Python&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;STYLE GUIDEs&lt;br /&gt;- &lt;a href="http://www.python.org/dev/peps/pep-0008/"&gt;PEP 8 - an Official Style Guide&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://google-styleguide.googlecode.com/svn/trunk/pyguide.html"&gt;official google python style guide&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html"&gt;'Coding Like a Pythonista' - Idiomatic Python&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;UNIT TESTING&lt;br /&gt;- &lt;a href="http://docs.python.org/library/unittest.html"&gt;unittest&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;OBJECT ORIENTED PARADIGM&lt;br /&gt;- &lt;a href="http://mail.python.org/pipermail/python-3000/2007-March/006119.html"&gt;decorators&lt;/a&gt;, &lt;a href="http://users.rcn.com/python/download/Descriptor.htm"&gt;decorators&lt;/a&gt;&lt;br /&gt;- abstract base classes&lt;br /&gt;- &lt;a href="http://www.ibm.com/developerworks/linux/library/l-python3-2/index.html"&gt;meta_classes&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://adam.gomaa.us/blog/2008/aug/11/the-python-property-builtin/"&gt;properties&lt;/a&gt;, &lt;a href="http://tomayko.com/writings/getters-setters-fuxors"&gt;properties&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://stackoverflow.com/questions/136097/what-is-the-difference-between-staticmethod-and-classmethod-in-python"&gt;staticmethods &amp; classmethods&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;WIDGET KITS&lt;br /&gt;- &lt;a href="http://www.pygtk.org/"&gt;pygtk&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.wxpython.org/"&gt;wxpython&lt;/a&gt;&lt;br /&gt;- light-weight - &lt;a href="http://wiki.python.org/moin/TkInter"&gt;tkinter&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;WEB&lt;br /&gt;- &lt;a href="http://www.djangoproject.com/"&gt;django&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;NUMERIC AND SCIENTIFIC LIBRARIES&lt;br /&gt;- &lt;a href="http://numpy.scipy.org/"&gt;numpy&lt;/a&gt; and &lt;a href="http://www.scipy.org/"&gt;scipy&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PLOTTING&lt;br /&gt;- &lt;a href="http://matplotlib.sourceforge.net/"&gt;matplotlib&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;LOGGING and other timber-related activities&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxjournal.com/article/3882"&gt;Why Python ?&lt;/a&gt;&lt;br /&gt;by Eric S Raymond, author of 'The Cathedral and the Bazaar"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5974985327628330548?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5974985327628330548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/04/python-lowdown.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5974985327628330548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5974985327628330548'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/04/python-lowdown.html' title='Python Resources'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-5781748617083633197</id><published>2010-03-26T02:39:00.000-07:00</published><updated>2010-03-26T04:07:47.411-07:00</updated><title type='text'>Access App.Settings Config from CLR Stored Proc</title><content type='html'>The situation:&lt;br /&gt;&lt;br /&gt;You've got a CLR stored proc deployed to a MS SQL Server 2008 DB, and you want to access a standard xml config from within the CLR stored proc (which is in turn called from within a standard stored proc)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sqlclr.net/Articles/tabid/54/articleType/ArticleView/articleId/33/Default.aspx"&gt;link&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-5781748617083633197?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/5781748617083633197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/03/access-appsettings-config-from-clr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5781748617083633197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/5781748617083633197'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/03/access-appsettings-config-from-clr.html' title='Access App.Settings Config from CLR Stored Proc'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-2408872235505540233</id><published>2010-03-23T07:40:00.000-07:00</published><updated>2010-03-23T07:43:59.446-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DevExpress'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='UI'/><title type='text'>DevExpress XtraGrid - Group by Column - Enable/Disable</title><content type='html'>assuming you have&lt;br /&gt;&lt;br /&gt;DevExpress.XtraGrid.GridControl gridControl;&lt;br /&gt;DevExpress.XtraGrid.Views.Grid.GridView gridView;&lt;br /&gt;&lt;br /&gt;to enable grouping capability&lt;br /&gt;gridView.OptionsView.ShowGroupPanel = true&lt;br /&gt;&lt;br /&gt;to disable&lt;br /&gt;gridView.OptionsView.ShowGroupPanel = false&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-2408872235505540233?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/2408872235505540233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/03/devexpress-xtragrid-group-by-column.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2408872235505540233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/2408872235505540233'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/03/devexpress-xtragrid-group-by-column.html' title='DevExpress XtraGrid - Group by Column - Enable/Disable'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-1637382679226744613</id><published>2010-03-03T07:27:00.000-08:00</published><updated>2010-03-03T07:28:05.566-08:00</updated><title type='text'>CLR-Excel Interop</title><content type='html'>&lt;a href="http://csharp.net-informations.com/excel/csharp-excel-tutorial.htm"&gt;Tutorial Series&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-1637382679226744613?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/1637382679226744613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/03/clr-excel-interop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1637382679226744613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/1637382679226744613'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/03/clr-excel-interop.html' title='CLR-Excel Interop'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-7355605971677018119</id><published>2010-01-23T04:46:00.000-08:00</published><updated>2010-12-17T00:52:09.619-08:00</updated><title type='text'>Sikorsky - the Helicopter &amp; the Man</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Helicopter"&gt;helicopter&lt;/a&gt;[wikipedia]&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Helicopter"&gt;Igor Sikorsky, father of the helicopter&lt;/a&gt;[wikipedia]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-7355605971677018119?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/7355605971677018119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/01/sikorsky-helicopter-man.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7355605971677018119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/7355605971677018119'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/01/sikorsky-helicopter-man.html' title='Sikorsky - the Helicopter &amp; the Man'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1227041388185782445.post-3407171014774012064</id><published>2010-01-10T08:10:00.000-08:00</published><updated>2010-09-10T08:57:14.297-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mandelbrot'/><category scheme='http://www.blogger.com/atom/ns#' term='modelling'/><category scheme='http://www.blogger.com/atom/ns#' term='fractal'/><category scheme='http://www.blogger.com/atom/ns#' term='power_law'/><title type='text'>word frequency distribution in the king james bible - zipf's law</title><content type='html'>a plain-text version of the king-james bible can be downloaded as http://patriot.net/~bmcgin/kjv12.txt .&lt;br /&gt;&lt;br /&gt;check this python module, featuring methods that&lt;br /&gt;- open the as-formatted king james, and parse it to a list of text lines&lt;br /&gt;- fragment a list of text lines to a [list] sequence of words, by splitting on punctuation and white-space&lt;br /&gt;- sieve a word sequence to a word frequency distribution dictionary&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;from time import time&lt;br /&gt;&lt;br /&gt;def p(s):&lt;br /&gt;  print(s.strip())&lt;br /&gt;        &lt;br /&gt;def extract_text_from_file(path):&lt;br /&gt;  '''&lt;br /&gt;  expects string filepath&lt;br /&gt;  parse king james bible text located at file path 'path'&lt;br /&gt;  strip out all info except for raw text lines, without&lt;br /&gt;  verse/verse number annotations&lt;br /&gt;  returns list of text lines&lt;br /&gt;  '''&lt;br /&gt;  book_count = 0&lt;br /&gt;  line_count = 0&lt;br /&gt;  text_lines = []&lt;br /&gt;  try:&lt;br /&gt;    f = open(path, 'r')&lt;br /&gt;    completed = False&lt;br /&gt;    i = 0&lt;br /&gt;    start_time = time()&lt;br /&gt;    line = ''&lt;br /&gt;    while completed == False:&lt;br /&gt;      line = f.readline()      &lt;br /&gt;      i = i + 1&lt;br /&gt;      if (line == None) or (line == ''):&lt;br /&gt;        completed = True&lt;br /&gt;        continue&lt;br /&gt;      if len(line) &lt; 8:&lt;br /&gt;        continue&lt;br /&gt;      # BOOK&lt;br /&gt;      # Book 01 Genesis&lt;br /&gt;      if line[:4] == 'Book':&lt;br /&gt;        book_count += 1&lt;br /&gt;        line = line.strip()&lt;br /&gt;        splut = line.split('\t')&lt;br /&gt;        book_num_str = splut[0].split(' ')[1]&lt;br /&gt;        book_num = int(book_num_str)&lt;br /&gt;        book_name = splut[1]&lt;br /&gt;        continue&lt;br /&gt;      # INIT VERSE LINE&lt;br /&gt;      # 001:002 And the earth was without form, and void; and darkness was&lt;br /&gt;      if line[3] == ':':&lt;br /&gt;        verse_book_num = int(line[0:3])&lt;br /&gt;        verse_num = int(line[4:7])&lt;br /&gt;        text = line[8:len(line)-1]&lt;br /&gt;        text_lines.append(text)&lt;br /&gt;        line_count += 1&lt;br /&gt;        continue&lt;br /&gt;      # SUBSEQUENT VERSE LINE&lt;br /&gt;      # upon the face of the deep. And the Spirit of God moved upon&lt;br /&gt;      if line[:8] == '        ':&lt;br /&gt;        text = line[8:len(line)-1]&lt;br /&gt;        text_lines.append(text)&lt;br /&gt;        line_count += 1&lt;br /&gt;        continue  &lt;br /&gt;    end_time = time()&lt;br /&gt;    duration = end_time - start_time&lt;br /&gt;    print('file load process took %s seconds' % duration)  &lt;br /&gt;  finally:&lt;br /&gt;    f.close()&lt;br /&gt;  return text_lines   &lt;br /&gt;   &lt;br /&gt;def fragment_text_to_word_sequence(text):  &lt;br /&gt;  '''&lt;br /&gt;  expects text = list of lines of punctuated text&lt;br /&gt;  returns string list corresponding to the word_sequence of the text&lt;br /&gt;  '''&lt;br /&gt;  word_sequence = []  &lt;br /&gt;  init_punc_split_chars = [ ',', '.', '\"', ':', ';', '!', '(', ')', ' ', '?']&lt;br /&gt;  start_time = time()&lt;br /&gt;  for line in text:&lt;br /&gt;    split_chars = init_punc_split_chars    &lt;br /&gt;    current = [line]&lt;br /&gt;    for split_char in split_chars:&lt;br /&gt;      next = []&lt;br /&gt;      for piece in current:&lt;br /&gt;        for fragment in piece.split(split_char):&lt;br /&gt;          if fragment != '':&lt;br /&gt;            next.append(fragment)&lt;br /&gt;      current = next          &lt;br /&gt;    word_sequence.extend(current)&lt;br /&gt;  end_time = time()&lt;br /&gt;  duration = end_time - start_time&lt;br /&gt;  print('split to word sequence took %s seconds' % duration)  &lt;br /&gt;  return word_sequence&lt;br /&gt;&lt;br /&gt;def build_word_dist_for_sequence(word_seq):&lt;br /&gt;  '''&lt;br /&gt;  construct word frequency distribution for given word sequence&lt;br /&gt;  '''&lt;br /&gt;  freqs = {}&lt;br /&gt;  keys = []&lt;br /&gt;  start_time = time()&lt;br /&gt;  for word in word_seq:&lt;br /&gt;    word = word.lower()&lt;br /&gt;    if word in keys:&lt;br /&gt;      freqs[word] += 1&lt;br /&gt;    else:&lt;br /&gt;      freqs[word] = 1&lt;br /&gt;      keys.append(word)&lt;br /&gt;  end_time = time()&lt;br /&gt;  duration = end_time - start_time&lt;br /&gt;  print('sieving of word sequence to frequency distribution took %s seconds' % duration)  &lt;br /&gt;  return freqs&lt;br /&gt;&lt;br /&gt;def write_word_freqs_to_disc(freqs):&lt;br /&gt;  dest = open('dist.txt', 'w')&lt;br /&gt;  for key,value in freqs.items():&lt;br /&gt;    s = str(key) + ',' + str(value) + '\n'&lt;br /&gt;    dest.write(s)&lt;br /&gt;  dest.close()    &lt;br /&gt;  &lt;br /&gt;def main():&lt;br /&gt;  path = 'z://self/data/bible_king_james_version.txt'&lt;br /&gt;  text = extract_text_from_file(path)&lt;br /&gt;  word_seq = fragment_text_to_word_sequence(text)&lt;br /&gt;  freqs = build_word_dist_for_sequence(word_seq)&lt;br /&gt;  write_word_freqs_to_disc(freqs)&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;  main()&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;the idea is to test whether Zipf's (power) law as mentioned by Benoit Mandelbrot in his 'The Misbehaviour of Markets', holds in the case of the KJV.&lt;br /&gt;&lt;br /&gt;Zipf's Law @ Wikipedia&lt;br /&gt;http://en.wikipedia.org/wiki/Zipf's_law&lt;br /&gt;&lt;br /&gt;Zipf-Mandelbrot Law&lt;br /&gt;http://en.wikipedia.org/wiki/Zipf%E2%80%93Mandelbrot_law&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1227041388185782445-3407171014774012064?l=socialripple.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://socialripple.blogspot.com/feeds/3407171014774012064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://socialripple.blogspot.com/2010/01/word-frequency-distribution-in-king.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3407171014774012064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1227041388185782445/posts/default/3407171014774012064'/><link rel='alternate' type='text/html' href='http://socialripple.blogspot.com/2010/01/word-frequency-distribution-in-king.html' title='word frequency distribution in the king james bible - zipf&apos;s law'/><author><name>david</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
