<?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:blogger='http://schemas.google.com/blogger/2008' 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-7394359554198517259</id><updated>2026-03-21T11:08:55.195+00:00</updated><category term="Django"/><category term="Python"/><category term="pymysql"/><category term="Mysql"/><category term="Mysqldb"/><category term="Setuptools"/><category term="Windows"/><category term="bug"/><category term="disappears"/><category term="easy_install"/><category term="favicon"/><category term="firefox"/><category term="javascript"/><category term="jquery"/><title type='text'>Web Engineering</title><subtitle type='html'>Get help in Web engineering solutions, web languages and the latest  informations about web engineering,&#xa;The most popular languages such as php python, java and c#/.net.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://web-eng-help.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://web-eng-help.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/02912530044399715001</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7394359554198517259.post-1630743414705863961</id><published>2012-09-17T00:55:00.001+01:00</published><updated>2012-09-17T03:13:17.635+01:00</updated><title type='text'>Share a directory with windows using samba to everybody in the local network</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;st&quot;&gt;Samba is a free software implementation of the SMB/CIFS networking protocol&lt;wbr&gt;&lt;/wbr&gt;, originally developed by Andrew Tridgell. it alows people to share files between&amp;nbsp;&lt;/span&gt; &lt;span style=&quot;background-color: white; font-family: arial, sans-serif; font-size: x-small; line-height: 16px;&quot;&gt;Linux machine and Window Machine.&lt;br /&gt;
&lt;br /&gt;
To install samba run tis command:&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;sudo apt-get install samba&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;-First let&#39;s&amp;nbsp;make sure only your local network can access samba service. Open and edit &lt;span class=&quot;tech&quot;&gt;/etc/samba/smb.conf&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;tech&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;tech&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;file&quot;&gt;&lt;span class=&quot;tech&quot;&gt;interfaces = lo eth0
bind interfaces only = true&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;span class=&quot;tech&quot;&gt;lo an eth0 should your network interfaces name run (ifconfig) to get the right names.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;span class=&quot;tech&quot;&gt;-To share a directory with everybody withour login/password: change &lt;em&gt;security&lt;/em&gt; to &lt;em&gt;share&lt;/em&gt; instead of &lt;em&gt;user&lt;/em&gt; than enable guest account:
security = share&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;span class=&quot;tech&quot;&gt;guest account = nobody&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;span class=&quot;tech&quot;&gt;-Now, you can create a share to be accessible to users:

&lt;pre class=&quot;file&quot;&gt;[public]
    comment = this folder is accessible by everybody
    path = /tmp #path the dir to share
    browseable = yes
    read only = yes
    guest ok = yes&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;To allow people to write to directory change  read only to no and add the folowing&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;writable=yes&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;You can test you configuration using the command&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;$testparm&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;If everything is fine, reload samba service to have your new configuration taken into account:
#ubuntu
$sudo /etc/init.d/samba reload
or
$sudo reload samba
#debian
$/etc/init.d/smbd reload
Or just
$reload smbd&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;That&#39;s all, anybody in your local network have now access to the folder /tmp.&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;file&quot;&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-eng-help.blogspot.com/feeds/1630743414705863961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7394359554198517259/1630743414705863961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/1630743414705863961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/1630743414705863961'/><link rel='alternate' type='text/html' href='http://web-eng-help.blogspot.com/2012/09/share-directory-with-windows-using.html' title='Share a directory with windows using samba to everybody in the local network'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/02912530044399715001</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394359554198517259.post-6871558120513308033</id><published>2012-03-08T01:38:00.000+00:00</published><updated>2012-03-08T01:38:57.875+00:00</updated><title type='text'>Free stemming API</title><content type='html'>&lt;em style=&quot;background-color: white; font-family: arial, sans-serif; font-size: small; font-style: normal; font-weight: bold; line-height: 15px;&quot;&gt;Assalamualaikum&lt;/em&gt;&lt;b&gt;&amp;nbsp;/ Hello / Hola / Bonjour,&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
It&#39;s been a while since my last article here, today i&#39;m&amp;nbsp;coming&amp;nbsp;with something really interesting and very useful, i was looking for in while, an api that regroup many stemming algorithms , it support all languages and you can use it just using curl. you give it the word the language an the algorithm and you get the step like magic, and what&#39;s very cool is that all algorithms are open source &amp;nbsp;wow that&#39;s really cool! yea you can download it and change it if necessary than use it, isn&#39;t cool?&lt;br /&gt;
What?&lt;br /&gt;
Well if you don&#39;t know what the stemming is let me give a short definition: It&#39;s the process of reducing a word to it&#39;s origin(base) word called &lt;a href=&quot;http://en.wikipedia.org/wiki/Word_stem&quot;&gt;stem&lt;/a&gt;, it&#39;s used in search engine and dictionary.&lt;br /&gt;
&lt;br /&gt;
&#39;play&#39;, &#39;playing&#39; and &amp;nbsp;&#39;plays&#39; for example have one common base word witch is &amp;nbsp;&#39;play&#39;: more details are&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Stemming&quot;&gt;http://en.wikipedia.org/wiki/Stemming&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can find the API in this link :&amp;nbsp;&lt;a href=&quot;http://text-processing.com/docs/stem.html&quot;&gt;http://text-processing.com/docs/stem.html&lt;/a&gt;&lt;br /&gt;
and here is an example of using it in php:&lt;br /&gt;
ps: Of course you need to have curl installed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
function get_stem_word($parameters) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $curl = curl_init();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $header[0] = &quot;Accept: text/xml,application/xml,application/xhtml+xml,&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $header[0] .= &quot;text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $header[] = &quot;Cache-Control: max-age=0&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $header[] = &quot;Connection: keep-alive&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $header[] = &quot;Keep-Alive: 300&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $header[] = &quot;Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $header[] = &quot;Accept-Language: en-us,en;q=0.5&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_URL, &#39;http://text-processing.com/api/stem/&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_USERAGENT, &#39;Googlebot/2.1 (+http://www.google.com/bot.html)&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_HTTPHEADER, $header);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_REFERER, &#39;http://www.google.com&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_POST, 1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($parameters));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_ENCODING, &#39;gzip,deflate&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_AUTOREFERER, true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_setopt($curl, CURLOPT_TIMEOUT, 10);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $result = curl_exec($curl); // execute the curl command&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl_close($curl); // close the curl connection&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return json_decode($result);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$stem_object = get_stem_word(array(&#39;text&#39;=&amp;gt;&#39;playing&#39;, &#39;language&#39;=&amp;gt;&#39;english&#39;,&#39;stemmer&#39;=&amp;gt;&#39;porter&#39;));&lt;br /&gt;
$stem = $stem_object-&amp;gt;text;&lt;br /&gt;
echo $stem;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Parameters:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; text : The word you want it&#39;s stem, required;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; language: The laguage of the word, Optional, The default value is english;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; stemmer: the stemming algorithm, Optional, &amp;nbsp;The default value is porter.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Bounmed,&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-eng-help.blogspot.com/feeds/6871558120513308033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7394359554198517259/6871558120513308033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/6871558120513308033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/6871558120513308033'/><link rel='alternate' type='text/html' href='http://web-eng-help.blogspot.com/2012/03/free-stemming-api.html' title='Free stemming API'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/02912530044399715001</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394359554198517259.post-7354134930036252883</id><published>2011-03-25T18:48:00.001+00:00</published><updated>2011-03-25T18:49:29.246+00:00</updated><title type='text'>[PHP : is_writeable — Alias of is_writable()] is this a joke?</title><content type='html'>&lt;div class=&quot;refentry&quot; id=&quot;function.is-writeable&quot;&gt;&lt;div class=&quot;refnamediv&quot;&gt;&lt;/div&gt;&lt;div class=&quot;refnamediv&quot;&gt;&lt;/div&gt;&lt;div class=&quot;refnamediv&quot;&gt;&lt;/div&gt;&lt;div class=&quot;refnamediv&quot;&gt;&lt;/div&gt;&lt;div class=&quot;refnamediv&quot;&gt;&lt;div class=&quot;verinfo&quot;&gt;I just saw this function in the php.net manual (&lt;a href=&quot;http://www.php.net/manual/en/function.is-writeable.php&quot;&gt;here&lt;/a&gt;) read it and tell me what do you think??&lt;/div&gt;&lt;h1 class=&quot;refname&quot;&gt;&lt;a href=&quot;http://www.php.net/manual/en/function.is-writeable.php&quot;&gt;is_writeable&lt;/a&gt;&lt;/h1&gt;&lt;div class=&quot;verinfo&quot;&gt;&amp;nbsp;(PHP 4, PHP 5)&lt;/div&gt;&lt;div class=&quot;refpurpose&quot;&gt;&lt;span class=&quot;refname&quot; style=&quot;color: blue;&quot;&gt;is_writ&lt;span style=&quot;color: red;&quot;&gt;e&lt;/span&gt;able&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;— &lt;span class=&quot;dc-title&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Alias of &lt;/span&gt;&lt;span class=&quot;function&quot; style=&quot;color: blue;&quot;&gt;is_writable()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;refsect1 description&quot;&gt;&lt;div class=&quot;reportbug&quot;&gt;&lt;span class=&quot;function&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-eng-help.blogspot.com/feeds/7354134930036252883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7394359554198517259/7354134930036252883' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/7354134930036252883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/7354134930036252883'/><link rel='alternate' type='text/html' href='http://web-eng-help.blogspot.com/2011/03/php-iswriteable-alias-of-iswritable-is.html' title='[PHP : is_writeable — Alias of is_writable()] is this a joke?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/02912530044399715001</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394359554198517259.post-4725369268710750272</id><published>2011-02-13T16:10:00.003+00:00</published><updated>2012-06-14T18:11:23.382+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bug"/><category scheme="http://www.blogger.com/atom/ns#" term="disappears"/><category scheme="http://www.blogger.com/atom/ns#" term="favicon"/><category scheme="http://www.blogger.com/atom/ns#" term="firefox"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>The favicon appears briefly, then it disappears [Bug firefox]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;code&gt;Firefox have a weird bug related to the change of location.hash value, when you change this value the favicon disappears, I&#39;ve spent a whole &lt;/code&gt;&lt;code&gt;day searching how to fix this&lt;/code&gt;&lt;code&gt;, the solution is simple all you have to do is to remove the favicon link then set it again after any change of the &lt;/code&gt;&lt;code&gt;location.hash value&lt;/code&gt;&lt;code&gt;.&lt;/code&gt;&lt;br /&gt;
Here’s the jQuery function from&amp;nbsp; &lt;a href=&quot;http://kilianvalkhof.com/2010/javascript/the-case-of-the-disappearing-favicon/&quot;&gt;http://kilianvalkhof.com/2010/javascript/the-case-of-the-disappearing-favicon/&lt;/a&gt;:&lt;code&gt; &lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; &lt;/code&gt;&lt;br /&gt;
&lt;pre&gt;function setFavicon() {
  var link = $(&#39;link[type=image/x-icon]&#39;).remove().attr(&quot;href&quot;);
  $(&#39;&amp;lt;link href=&quot;&#39;+ link +&#39;&quot; rel=&quot;shortcut icon&quot; type=&quot;image/x-icon&quot; /&amp;gt;&#39;).appendTo(&#39;head&#39;);
}&lt;/pre&gt;
&lt;pre&gt;and add setFavicon();  after any location.hash=url;&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;Based on the second comment bellow 



&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify; white-space: normal;&quot;&gt;1- You should use quotes in the attribute selector like follow to make it work with new version of JQuery:&lt;/span&gt;

&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify; white-space: normal;&quot;&gt;$(&#39;link[type=&quot;image/x-icon&quot;]&#39;).remove().attr(&quot;href&quot;);&lt;/span&gt;

&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify; white-space: normal;&quot;&gt;2- It&#39;s better to test on the rel attribute instead of testing on the type attribute because firstly a Favicon is not necessarily of type ico&lt;/span&gt;
&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify; white-space: normal;&quot;&gt;and secondly if we follow the HTML standard (http://en.wikipedia.org/wiki/Favicon) a favicon is known by the rel=&quot;icon&quot; attribute value:&lt;/span&gt;

&lt;span style=&quot;background-color: whitesmoke; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: justify; white-space: normal;&quot;&gt;$(&#39;link[rel*=&quot;icon&quot;]&#39;).remove().attr(&quot;href&quot;);&lt;/span&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-eng-help.blogspot.com/feeds/4725369268710750272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7394359554198517259/4725369268710750272' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/4725369268710750272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/4725369268710750272'/><link rel='alternate' type='text/html' href='http://web-eng-help.blogspot.com/2011/02/favicon-appears-briefly-then-it.html' title='The favicon appears briefly, then it disappears [Bug firefox]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/02912530044399715001</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394359554198517259.post-198930568979986009</id><published>2010-09-05T18:44:00.005+00:00</published><updated>2011-04-08T06:24:42.612+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Django"/><category scheme="http://www.blogger.com/atom/ns#" term="pymysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Installing Django on Windows</title><content type='html'>&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;You hear about the &lt;/span&gt;&lt;span class=&quot;short_text&quot; id=&quot;result_box&quot;&gt;&lt;span title=&quot;&quot;&gt;the power of python and his framwork Django, you&lt;/span&gt;&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; want to taste the joys of web development using &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Python &lt;/span&gt;technology&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Here&#39;s a quick step by step &lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;tutorial&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; to install python and Django on your Windows PC:&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://www.python.org/ftp/python/2.7/python-2.7.msi&quot; hreflang=&quot;en&quot;&gt;Download and install Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Modify The %PATH% environment variable:&lt;br /&gt;
- Windows Vista &amp;amp; 7&amp;nbsp; :&lt;br /&gt;
Start --&amp;gt; Control Panel --&amp;gt; System and maintenance --&amp;gt; System --&amp;gt; Advanced system settings --&amp;gt; Environment variables --&amp;gt; System variables --&amp;gt; Path&lt;br /&gt;
-Windows XP :&lt;br /&gt;
Start --&amp;gt; Control Panel --&amp;gt; Performance and maintenance --&amp;gt; System --&amp;gt; Advanced --&amp;gt; Environment variables --&amp;gt; System variables --&amp;gt; Path&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;br /&gt;
- add &lt;q&gt;&lt;b&gt;C:\Python27;C:\Python27\Lib\site-packages\django\bin&lt;/b&gt;&lt;/q&gt; to the value of the variable path&lt;br /&gt;
&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;Download the latest release of Django &lt;a class=&quot;reference external&quot; href=&quot;http://www.djangoproject.com/download/&quot;&gt;download &lt;/a&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://www.djangoproject.com/download/&quot;&gt;page&lt;/a&gt; (&lt;a href=&quot;http://www.djangoproject.com/download/1.2.1/tarball/&quot;&gt;Django-1.2.1.tar.gz&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Untar the downloaded file, (You can use a GUI-based tool such as &lt;a class=&quot;reference external&quot; href=&quot;http://www.7-zip.org/&quot;&gt;7-zip&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Open a prompt command and change into the directory created in step 4.&lt;/li&gt;
&lt;li&gt;Run the command &quot;python &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;setup.py&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;install&lt;/span&gt;&lt;/tt&gt;&quot;&lt;br /&gt;
&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;django is installed&lt;/span&gt; &lt;/li&gt;
&lt;li&gt; &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Install Mysql&lt;/span&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;, the easiest way is to use &lt;/span&gt;&lt;a href=&quot;http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.0/WampServer2.0i.exe/download&quot;&gt;WampServer2&lt;/a&gt; or &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;a href=&quot;http://www.apachefriends.org/fr/xampp-windows.html&quot; hreflang=&quot;fr&quot;&gt;XAMPP&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Installer pymysql&lt;br /&gt;
see my tutorial &lt;a href=&quot;http://web-eng-help.blogspot.com/2010/09/install-mysql-5-for-python-26-and.html&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;Everything is now installed!&lt;/span&gt;  &lt;span onmouseout=&quot;_tipoff()&quot; onmouseover=&quot;_tipon(this)&quot;&gt;&lt;span class=&quot;google-src-text&quot; style=&quot;direction: ltr; text-align: left;&quot;&gt;&lt;/span&gt;You can start having fun with django: &lt;a href=&quot;http://translate.googleusercontent.com/translate_c?hl=fr&amp;amp;ie=UTF-8&amp;amp;sl=fr&amp;amp;tl=en&amp;amp;u=http://www.djangoproject.com/documentation/&amp;amp;prev=_t&amp;amp;rurl=translate.google.co.ma&amp;amp;twu=1&amp;amp;usg=ALkJrhgbJUWc8GLZtL315mY1Qp9PG7lBkg&quot; hreflang=&quot;en&quot;&gt;http://www.djangoproject.com/documentation/&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-eng-help.blogspot.com/feeds/198930568979986009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7394359554198517259/198930568979986009' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/198930568979986009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/198930568979986009'/><link rel='alternate' type='text/html' href='http://web-eng-help.blogspot.com/2010/09/installing-django-on-windows.html' title='Installing Django on Windows'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/02912530044399715001</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394359554198517259.post-8375099107509317903</id><published>2010-09-04T05:05:00.017+00:00</published><updated>2011-03-21T22:18:49.877+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Django"/><category scheme="http://www.blogger.com/atom/ns#" term="easy_install"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Mysqldb"/><category scheme="http://www.blogger.com/atom/ns#" term="pymysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Setuptools"/><title type='text'>Install MySQL 5 for Python 2.6 (and django) on Windows</title><content type='html'>I&#39;ve heard a lot about python and his framework Django, But because i love php i never found the time to test python and honestly i didn&#39;t fell the need to do. untill this year (2010)&amp;nbsp; but the start was not very good. I installed puython django i did some tests. wow&amp;nbsp; thats amazing, very simple , now&amp;nbsp; i want to add mysql. I did some researches about mysql connectors&lt;i&gt; &lt;/i&gt;i found Mysqldb but there is no binary  distribution for Python 2.6 damn it!! thats the version i use.&lt;br /&gt;
&lt;br /&gt;
It took me 4 days looking how to install this Mysqldb &lt;span class=&quot;fplc&quot;&gt;to no avail&lt;/span&gt;.&amp;nbsp; i found a lot of sulutions no one is working with me&lt;br /&gt;
I tried to build it from the  source with many ways &lt;span class=&quot;fplc&quot;&gt;to no avail&lt;/span&gt;. My environment is  Windows XP. MySQL 5.0. Python 2.6 (windows version).&lt;br /&gt;
&lt;br /&gt;
Yesterday&lt;span class=&quot;short_text&quot; id=&quot;result_box&quot;&gt;&lt;span style=&quot;background-color: white;&quot; title=&quot;&quot;&gt; i received&lt;/span&gt;&lt;/span&gt; an email from a friend about another mysql connector named &quot;pymysql&quot; it&#39;s very easy to install it in three steps:&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Step1:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Install &lt;a href=&quot;http://pypi.python.org/pypi/setuptools&quot;&gt;Python setuptools&lt;/a&gt; (easy_install.exe) if you haven’t installed it. It is required to install pymysql.&lt;br /&gt;
To install setuptools &lt;br /&gt;
Download these two files and put them into the same directory: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;external free&quot; href=&quot;http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6.egg#md5=ca37b1ff16fa2ede6e19383e7b59245a&quot; rel=&quot;nofollow&quot; title=&quot;http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6.egg#md5=ca37b1ff16fa2ede6e19383e7b59245a&quot;&gt;http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6.egg#md5=ca37b1ff16fa2ede6e19383e7b59245a&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;external free&quot; href=&quot;http://peak.telecommunity.com/dist/ez_setup.py&quot; rel=&quot;nofollow&quot; title=&quot;http://peak.telecommunity.com/dist/ez_setup.py&quot;&gt;http://peak.telecommunity.com/dist/ez_setup.py&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;Open a command prompt in this directory and type &quot;python ez_setup.py setuptools-0.6c9-py2.6.egg&quot;&lt;br /&gt;
&lt;br /&gt;
Add  the path where easy_install  is installed  into your environment PATH  ({PYTHON_PATH}\Scripts, {PYTHON_PATH} is the path where python is installed).&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Step2:&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Install pymysql, it&#39;s easy just donwload the latest version of &lt;a href=&quot;http://code.google.com/p/pymysql/downloads/detail?name=PyMySQL-0.3-py2.6.egg&amp;amp;can=2&amp;amp;q=&quot; style=&quot;white-space: nowrap;&quot;&gt;PyMySQL-0.3-py2.6.egg&lt;/a&gt;, put it in a directory and open a command prompt, change to this directory. then&amp;nbsp; run &quot;easy_install.exe  PyMySQL-0.3-py2.6.egg&quot; if it doesn&#39;t work try an absolute path&lt;i&gt; &lt;/i&gt;of  easy-install ({PYTHON_PATH}\Scripts\easy_install.exe PyMySQL-0.3-py2.6.egg)&lt;br /&gt;
&amp;nbsp;&lt;u&gt;&lt;b&gt;Step3: &lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Now you can test it in python just open the &quot;IDLE(Python GUI)&quot; and run the test &lt;span class=&quot;short_text&quot; id=&quot;result_box&quot;&gt;&lt;span title=&quot;&quot;&gt;below&lt;/span&gt;&lt;/span&gt;:&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;span class=&quot;kwd&quot;&gt;import&lt;/span&gt; pymysql&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;span class=&quot;com&quot;&gt;conn = pymysql.connect(host=&#39;localhost&#39;, port=3306, user=&#39;root&#39;, passwd=None, db=&#39;mysql&#39;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&amp;gt;&amp;gt;&amp;gt;&lt;span class=&quot;pln&quot;&gt;cur &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; conn&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&amp;gt;&amp;gt;&amp;gt;&lt;span class=&quot;pln&quot;&gt;cur&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;SELECT Host,User FROM user&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&amp;gt;&amp;gt;&amp;gt;&lt;span class=&quot;kwd&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; r &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; cur&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&amp;gt;&amp;gt;&amp;gt;&lt;span class=&quot;pln&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; r&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;span class=&quot;pln&quot;&gt;cur&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&amp;gt;&amp;gt;&amp;gt;&lt;span class=&quot;pln&quot;&gt;conn&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pun&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;u&gt;&lt;b&gt;Step 4 for django:&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pun&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pun&quot;&gt;To use it with django you need one more step:&lt;/span&gt;&lt;/pre&gt;go to the django directory, exactly in this directory&lt;br /&gt;
{..\PythonPath}\Lib\site-packages\django\db\backends\mysql&lt;br /&gt;
and simply  do a search and replace of MySQLdb with pymysql&lt;br /&gt;
in the two files &quot;base.py&quot; and&amp;nbsp; &quot;introspection.py&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#39;s it.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;thanks to mouad for the link and to &lt;span class=&quot;fontsize2 author&quot;&gt;&lt;span style=&quot;color: #00681c;&quot;&gt;Pete &lt;span style=&quot;color: black;&quot;&gt;for this great lib.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-eng-help.blogspot.com/feeds/8375099107509317903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7394359554198517259/8375099107509317903' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/8375099107509317903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394359554198517259/posts/default/8375099107509317903'/><link rel='alternate' type='text/html' href='http://web-eng-help.blogspot.com/2010/09/install-mysql-5-for-python-26-and.html' title='Install MySQL 5 for Python 2.6 (and django) on Windows'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/02912530044399715001</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry></feed>