<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>how to</title>
	<atom:link href="http://www.neteyaz.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.neteyaz.com</link>
	<description>linux and open source tips</description>
	<lastBuildDate>Tue, 23 Feb 2010 23:01:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fatal error: Allowed memory size wp-settings.php on line 307</title>
		<link>http://www.neteyaz.com/fatal-error-allowed-memory-size-wp-settings-php-on-line-307</link>
		<comments>http://www.neteyaz.com/fatal-error-allowed-memory-size-wp-settings-php-on-line-307#comments</comments>
		<pubDate>Tue, 23 Feb 2010 23:01:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp-settings]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=166</guid>
		<description><![CDATA[if you get an error like this: Fatal error: Allowed memory size wp-settings.php on line 307

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 235726 bytes) in /home/uno1093/public_html/wp-includes/class-simplepie.php on line 13070
or
Fatal error: Allowed memory size wp-settings.php on line 307
add this line to your wp-config.php
define('WP_MEMORY_LIMIT', '64M');
]]></description>
			<content:encoded><![CDATA[<p>if you get an error like this: Fatal error: Allowed memory size wp-settings.php on line 307</p>
<p><span id="more-166"></span></p>
<p>Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 235726 bytes) in /home/uno1093/public_html/wp-includes/class-simplepie.php on line 13070</p>
<p>or</p>
<p>Fatal error: Allowed memory size wp-settings.php on line 307</p>
<p><strong>add</strong> this line to your <code>wp-config.php</code><br />
<code>define('WP_MEMORY_LIMIT', '64M');</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/fatal-error-allowed-memory-size-wp-settings-php-on-line-307/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do not start MySQL on startup</title>
		<link>http://www.neteyaz.com/do-not-start-mysql-on-startup</link>
		<comments>http://www.neteyaz.com/do-not-start-mysql-on-startup#comments</comments>
		<pubDate>Sun, 20 Dec 2009 13:34:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tips]]></category>
		<category><![CDATA[chkconfig]]></category>
		<category><![CDATA[init.d]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqld]]></category>
		<category><![CDATA[stop]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=162</guid>
		<description><![CDATA[Stopping to autostart mysql service
(firstly u must be sure to there is a&#60;strong&#62; /etc/init.d/mysql or mysqld&#60;/strong&#62; )

# chkconfig --list &#124; grep mysqld
mysqld          0:off   1:off   2:off   3:on   4:on   5:on   6:off
# chkconfig --level 345 mysql off
error reading information on service mysql: No such file or directory
# chkconfig --level 345 mysqld off
# reboot

]]></description>
			<content:encoded><![CDATA[<p>Stopping to autostart mysql service</p>
<p>(firstly u must be sure to there is a&lt;strong&gt; /etc/init.d/mysql or mysqld&lt;/strong&gt; )</p>
<pre class="pretyprint">
# chkconfig --list | grep mysqld
mysqld          0:off   1:off   2:off   3:on   4:on   5:on   6:off
# chkconfig --level 345 mysql off
error reading information on service mysql: No such file or directory
# chkconfig --level 345 mysqld off
# reboot
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/do-not-start-mysql-on-startup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to autostart MYSQL (init.d and chkconfig)</title>
		<link>http://www.neteyaz.com/how-to-autostart-mysql-init-d-and-chkconfig</link>
		<comments>http://www.neteyaz.com/how-to-autostart-mysql-init-d-and-chkconfig#comments</comments>
		<pubDate>Sun, 20 Dec 2009 13:30:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tips]]></category>
		<category><![CDATA[autostart]]></category>
		<category><![CDATA[chkconfig]]></category>
		<category><![CDATA[init.d]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=158</guid>
		<description><![CDATA[chkconfig
The chkconfig command can also be used to activate and deactivate services. If you use the chkconfig &#8211;list command, you will see a list of system services and whether they are started (on) or stopped (off) in runlevels 0-6 (at the end of the list, you will see a section for the services managed by [...]]]></description>
			<content:encoded><![CDATA[<p><strong>chkconfig</strong></p>
<p>The chkconfig command can also be used to activate and deactivate services. If you use the chkconfig &#8211;list command, you will see a list of system services and whether they are started (on) or stopped (off) in runlevels 0-6 (at the end of the list, you will see a section for the services managed by xinetd.<br />
<span id="more-158"></span><br />
If you use chkconfig &#8211;list to query a service managed by xinetd, you will see whether the xinetd service is enabled (on) or disabled (off). For example, the following command shows that finger is enabled as an xinetd service: </p>
<p><strong>$ chkconfig &#8211;list finger<br />
finger          on</strong></p>
<p>As shown above, if xinetd is running, finger is enabled.</p>
<p>If you use chkconfig &#8211;list to query a service in /etc/rc.d, you will see the service&#8217;s settings for each runlevel, like the following:</p>
<p><strong>$ chkconfig &#8211;list anacron<br />
anacron         0:off   1:off   2:on    3:on    4:on    5:on    6:off</strong></p>
<p>More importantly, chkconfig can be used to set a service to be started (or not) in a specific runlevel. For example, to turn nscd off in runlevels 3, 4, and 5, use the command:</p>
<p><strong>chkconfig &#8211;level 345 nscd off</strong></p>
<p>See the chkconfig man page for more information on how to use it.<br />
<strong><br />
Warning</strong></p>
<p>Services managed by xinetd are immediately affected by chkconfig. For example, if xinetd is running, finger is disabled, and the command chkconfig finger on is executed, finger is immediately enabled without having to restart xinetd manually. Changes for other services do not take effect immediately after using chkconfig. You must stop or start the individual service with the command service daemon stop. In the previous example, replace daemon with the name of the service you want to stop; for example, httpd. Replace stop with start or restart to start or restart the service. </p>
<p>To autostart you mysql service : (firstly u must be sure to there is a<strong> /etc/init.d/mysql or mysqld</strong> )</p>
<pre class="pretyprint">
# chkconfig --list | grep mysqld
mysqld          0:off   1:off   2:off   3:off   4:off   5:off   6:off
# chkconfig --level 345 mysql on
error reading information on service mysql: No such file or directory
# chkconfig --level 345 mysqld on
# reboot
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/how-to-autostart-mysql-init-d-and-chkconfig/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drawing Line With DDA Algorithm using OpenGL in C++</title>
		<link>http://www.neteyaz.com/drawing-line-with-dda-algorithm-using-opengl-in-c</link>
		<comments>http://www.neteyaz.com/drawing-line-with-dda-algorithm-using-opengl-in-c#comments</comments>
		<pubDate>Sun, 06 Dec 2009 19:38:01 +0000</pubDate>
		<dc:creator>TaZ</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[DDA]]></category>
		<category><![CDATA[glutMouseFunc]]></category>
		<category><![CDATA[Line Drawing]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=152</guid>
		<description><![CDATA[The code is based on the popularly used dda line drawing algorithm.It picks up two point from the window and change the color of pixels which are closest to vectorial line between them.



#include &#60;GL/glut.h&#62;
#include &#60;math.h&#62;
#include &#60;time.h&#62;
#define W 512
#define H 512
int points[2][2];
int point_count=0;
void initialize(){
	glClearColor( 0.0, 0.0, 0.0, 0.0);//set background color to black
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluOrtho2D(0, W,0,H);
}

void setPixel(int x, int [...]]]></description>
			<content:encoded><![CDATA[<p>The code is based on the popularly used dda line drawing algorithm.It picks up two point from the window and change the color of pixels which are closest to vectorial line between them.<br />
<span id="more-152"></span><br />
<img src="http://www.neteyaz.com/files/2009/12/adsız-300x163.jpg" alt="changing color of closest pixels to vectorial line " title="changing color of closest pixels to vectorial line " width="300" height="163" class="alignnone size-medium wp-image-154" /></p>
<pre>
#include &lt;GL/glut.h&gt;
#include &lt;math.h&gt;
#include &lt;time.h&gt;
#define W 512
#define H 512
int points[2][2];
int point_count=0;
void initialize(){
	glClearColor( 0.0, 0.0, 0.0, 0.0);//set background color to black
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluOrtho2D(0, W,0,H);
}

void setPixel(int x, int y){	//change color of a pixel
	glColor3f(1, 1, 1);
	y=H-y;
	glBegin(GL_POINTS);
	glVertex2f(x,y);
	glEnd();
}

void LineWithDDA(int x0, int y0, int x1, int y1) {//DDa line algorithm
    int dy = y1 - y0;
    int dx = x1 - x0;
    int steps,i;
    float xinc,yinc,x=x0,y=y0;
    if( fabs(dx) &gt; fabs(dy)){
        steps=fabs(dx);
    }else{
          steps=fabs(dy);
    }
    xinc=(float) dx/ (float) steps;
    yinc=(float) dy/ (float) steps;
    setPixel(round(x), round(y));
    for(i=0;i&lt;steps;i++){
         x+=xinc;
         y+=yinc;
         setPixel(round(x), round(y));
    }
    glutSwapBuffers();
}
void lineSegment(){
    glClear(GL_COLOR_BUFFER_BIT);
    glutSwapBuffers();
    LineWithDDA(W/2,0,W/2,H);
    LineWithDDA(0,H/2,W,H/2);
}
void Control(int button, int state, int x, int y){

  // Respond to mouse button presses.
  // If button1 pressed, mark this state so we know in motion function.

  if (button == GLUT_LEFT_BUTTON &amp;&amp; state == GLUT_DOWN)
    {
  			setPixel(x,y);
  			if(point_count&lt;1){
					points[0][0]=x;
					points[0][1]=y;
					point_count++;
			}else{
					points[1][0]=x;
	 			    points[1][1]=y;
			        use_dda(points[0][0],points[0][1],points[1][0],points[1][1]);
			        point_count=0;
			}
	      glutSwapBuffers();
    }
}
int main(int argc, char** argv) {
	glutInit(&amp;argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB);
	glutInitWindowPosition(0,0);
	glutInitWindowSize(W,H);
	glutCreateWindow("OpenGL Mouse Function");
	initialize();
	glutMouseFunc(Control);
	glutDisplayFunc(lineSegment);
	glutMainLoop();
	return 0;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/drawing-line-with-dda-algorithm-using-opengl-in-c/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xml to text with php</title>
		<link>http://www.neteyaz.com/xml-to-text-with-php</link>
		<comments>http://www.neteyaz.com/xml-to-text-with-php#comments</comments>
		<pubDate>Wed, 02 Dec 2009 18:57:38 +0000</pubDate>
		<dc:creator>banias</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[reader]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=137</guid>
		<description><![CDATA[There is lots of xml reading methods and classes. Some of them is too compicated. if you want to read xml with real php and simpliest way, u can use this code

php simple xml reader script
Gets only one element which you want from xml data.


1 &#8211; $file = &#8220;xml.xml&#8221;; //original xml file
2 &#8211; $handle = [...]]]></description>
			<content:encoded><![CDATA[<p>There is lots of xml reading methods and classes. Some of them is too compicated. if you want to read xml with real php and simpliest way, u can use this code</p>
<p><span id="more-137"></span></p>
<h2>php simple xml reader script</h2>
<p>Gets only one element which you want from xml data.<br />
<code><br />
</code><br />
1 &#8211; $file = &#8220;xml.xml&#8221;; //original xml file<br />
2 &#8211; $handle = @fopen($file, &#8220;r&#8221;);<br />
3 &#8211; $write = @fopen(&#8221;results.txt&#8221;, &#8220;w&#8221;); //output file<br />
4 &#8211; $i = 0;<br />
5 &#8211; if ($handle) {<br />
6 &#8211; while (!feof($handle)) {<br />
7 &#8211; $buffer = fgets($handle, 4096);<br />
8 &#8211; $satir = $buffer;<br />
9 &#8211; $satir = str_replace(&#8221;<br />
10 &#8211;
<phrase>&#8220;,&#8221;",$satir); //your starting pattern<br />
11 &#8211; $satir = str_replace(&#8221;</phrase>&#8220;,&#8221;",$satir); // your ending pattern<br />
12 &#8211; if($satir != $buffer){<br />
13 &#8211; $i++;<br />
14 &#8211; $satir = str_replace(&#8221;\n&#8221;,&#8221;",$satir);<br />
15 &#8211; $satir = trim($satir);<br />
16 &#8211; $satir = $i.&#8221; &#8211; &#8220;.$satir;<br />
17 &#8211; $satir = $satir.&#8221;\n&#8221;;<br />
18 &#8211; fputs($write,$satir);<br />
19 &#8211; }<br />
20 &#8211; }<br />
21 &#8211; fclose($handle);<br />
22 &#8211; }<br />
23 &#8211; ?></pre>
<p>u can use this with compicated xml files too. this code will get only one type of element like phrases between<strong> &lt;phrase&gt; &lt;/phrase&gt;</strong> tags.<br />
example xml data.</p>
<pre>&lt;element&gt;
&lt;url&gt;neteyaz.com&lt;/url&gt;
&lt;phrase&gt;banias - php coder&lt;/url&gt;
&lt;title&gt;linux and coding blog&lt;/title&gt;
&lt;/element&gt;
&lt;element&gt;
&lt;url&gt;idealkilohesaplama.com&lt;/url&gt;
&lt;phrase&gt;calculate your ideal weight&lt;/url&gt;
&lt;title&gt;turkish web site&lt;/title&gt;
&lt;/element&gt;</pre>
<p>output will be like this:</p>
<pre>1 - banias - php coder
2 - calculate your ideal weight</pre>
<p>enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/xml-to-text-with-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Use Template Class or Function in C++ (Stack Implemantation)</title>
		<link>http://www.neteyaz.com/how-to-use-template-class-or-function-in-c-stack-implemantation</link>
		<comments>http://www.neteyaz.com/how-to-use-template-class-or-function-in-c-stack-implemantation#comments</comments>
		<pubDate>Mon, 30 Nov 2009 10:44:58 +0000</pubDate>
		<dc:creator>banias</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[C++ Template]]></category>
		<category><![CDATA[overloading vs template]]></category>
		<category><![CDATA[Stack Template]]></category>
		<category><![CDATA[using templates]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=128</guid>
		<description><![CDATA[How to Use Template Class or Function in C++ (Stack Implemantation)
1-How to use a function with different data types in c++. i mean, i have a function
that name is abs() and i want to use it just like this:
int x;foo(x);   or
float x;foo(x); or
char x;foo(x)&#8230;

The solution is simple for this problem:Overloadding isn&#8217;t it?
2-Alright, if [...]]]></description>
			<content:encoded><![CDATA[<h2>How to Use Template Class or Function in C++ (Stack Implemantation)</h2>
<p><strong>1-How to use a function with different data types in c++. i mean, i have a function<br />
that name is abs() and i want to use it just like this:</strong><br />
int x;foo(x);   or<br />
float x;foo(x); or<br />
char x;foo(x)&#8230;<br />
<span id="more-128"></span><br />
The solution is simple for this problem:Overloadding isn&#8217;t it?<br />
2-Alright, if i want to store my datas in a stack and when i chosee my data type(int,char,float), compiler could create a stack that can work data type which i have choosed. Is it possible? Of course:)</p>
<p>So firstly, i want to solve my first problem using templates:</p>
<pre>template &lt;class type_name&gt;
void foo(type_name x){
   cout&lt;&lt;x&lt;&lt;endl;
}</pre>
<p>You can call this function with different data types.For example:<br />
foo(3);foo(“a”);foo(3.14);</p>
<p>What is the difference between overloading and template class?When we overload a function compiler choose a correct version of the function in  runtime and we have to write the function for each data types that we have.</p>
<p>On the other hand,if we use templates compiler creates a placeholder for our arguments.And in runtime compiler changes it with our data type.So that we dont have to write the same codes for different data types.</p>
<p>I dont mean overloading is unnecessary.I just want to show the differences between overloading a function and creating a function using template class.</p>
<p>Next topic is “How to implement a stack data type with using template class?”.</p>
<pre>
#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
template &lt;class node_element&gt;
class Node{
      public:
             node_element data;
             Node * next;
};
template &lt;class stack_type&gt;
class Stack{
      public:
             Stack();
             void add(stack_type);
             stack_type pop();
             stack_type top();
             bool isempty();
		 void print();
             int get_count(){return count;}
      private:
             Node&lt;stack_type&gt; ptr;
             int count;
};
template &lt;class stack_type&gt;
Stack&lt;stack_type&gt;::Stack(){
     count=0;
     ptr.next=NULL;

}
template &lt;class stack_type&gt;
bool Stack&lt;stack_type&gt;::isempty(){
     return (get_count()==0)?1:0;
}
template &lt;class stack_type&gt;
void Stack&lt;stack_type&gt;::add(stack_type c){
     Node&lt;stack_type&gt;*newNode=new Node&lt;stack_type&gt;;
     newNode-&gt;data = c;
     if(isempty()){
          ptr.next= newNode;
          newNode-&gt;next = NULL;
     }else{
           newNode-&gt;next = ptr.next;
           ptr.next = newNode;
     }
     count++;
}
template &lt;class stack_type&gt;
stack_type Stack&lt;stack_type&gt;::pop(){
     if(get_count()==0){
         cout&lt;&lt;"Stack is empty!"&lt;&lt;endl;
     }else{
           Node&lt;stack_type&gt; * temp = ptr.next;
           ptr.next = temp-&gt;next;
           stack_type data= temp-&gt;data;
           delete temp;
           count--;
           return data;
     }
}

template &lt;class stack_type&gt;
stack_type Stack&lt;stack_type&gt;::top(){
     return ptr.next-&gt;data;
}
template &lt;class stack_type&gt;
void Stack&lt;stack_type&gt;::print(){
     Node&lt;stack_type&gt; * explorer=ptr.next;
     while(ptr.next!=0){
          cout&lt;&lt;ptr.next-&gt;data&lt;&lt;endl;
          ptr.next=ptr.next-&gt;next;

     }

     ptr.next=explorer;
}

int main(){
	Stack&lt;int&gt; intStack;
	intStack.add(3);
	intStack.add(4);
	intStack.add(5);
	intStack.pop();
	intStack.print();
	Stack&lt;char&gt; charStack;
	charStack.add('a');
	charStack.add('b');
	charStack.add('c');
	charStack.print();
	charStack.pop();
	charStack.print();
}
</pre>
<p><strong>Page about: How to Use Template Class or Function in C++ (Stack Implemantation), C++ Template,Stack Template,overloading vs template,using templates</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/how-to-use-template-class-or-function-in-c-stack-implemantation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Decoding Morse and Encoding Morse with Python</title>
		<link>http://www.neteyaz.com/how-to-decoding-morse-and-encoding-morse-with-python</link>
		<comments>http://www.neteyaz.com/how-to-decoding-morse-and-encoding-morse-with-python#comments</comments>
		<pubDate>Mon, 30 Nov 2009 10:35:38 +0000</pubDate>
		<dc:creator>banias</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Decode Morse]]></category>
		<category><![CDATA[Encode to Morse]]></category>
		<category><![CDATA[Morse Encoding]]></category>
		<category><![CDATA[raw_input]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=125</guid>
		<description><![CDATA[Python Morse Converter
Maybe one day you can meet an asume alien girl however she don&#8217;t know any language except morse alphabet (she communicates only this way:-)). So, what will you do? Dont be sad cause i wrote a python code to decode what she says and encode yours.


1 - MORSE=[".-","-...","-.-.","-..",".","..-.",
2 -     [...]]]></description>
			<content:encoded><![CDATA[<h2>Python Morse Converter</h2>
<p>Maybe one day you can meet an asume alien girl however she don&#8217;t know any language except morse alphabet (she communicates only this way:-)). So, what will you do? Dont be sad cause i wrote a python code to decode what she says and encode yours.<br />
<span id="more-125"></span></p>
<pre class="prettyprint">
1 - MORSE=[".-","-...","-.-.","-..",".","..-.",
2 -       "--.","....","..",".---","-.-",
3 -       ".-..","--","-.","---",".--.",
4 -       "--.-",".-.","...","-","..-",
5 -       "...-",".--","-..-","-.--","--.."]
6 - SP=["a","b","c","d","e",
7 -    "f","g","h","i","j",
8 -    "k","l","m","n","o",
9 -    "p","q","r","s","t",
10 -    "u","v","w","x","y","z"]
11 - def encode(normal):
12 -     encoding=""
13 -     for i in range(len(normal)):
14 -         encoding+=MORSE[SP.index(normal[i])]
15 -         encoding+=" "
16 -     print encoding
17 - def decode(morse):
18 -     normal=""
19 -     morse=morse.split(" ")
20 -     for i in range(len(morse)):
21 -         normal+=SP[MORSE.index(morse[i])]
22 -     print normal
23 -
24 - choice=int(raw_input("Choose the operation\n1-Normal To Morse\n2-Morse To Normal\nChoice:"))
25 - if(choice==1):
26 -     expression=raw_input("Type your words without spaces:")
27 -     encode(expression)
28 - elif(choice==2):
29 -     expression=raw_input("Type your morse expresion:")
30 -     decode(expression)
31 - </pre>
<p>This Code is About: How to Decoding Morse and Encoding Morse with Python, Decode Morse,Encode to Morse,Morse Encoding,raw_input,Python</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/how-to-decoding-morse-and-encoding-morse-with-python/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find wordpress sites by google</title>
		<link>http://www.neteyaz.com/how-to-find-wordpress-sites-by-google</link>
		<comments>http://www.neteyaz.com/how-to-find-wordpress-sites-by-google#comments</comments>
		<pubDate>Sun, 22 Nov 2009 20:47:18 +0000</pubDate>
		<dc:creator>banias</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=123</guid>
		<description><![CDATA[u cant find directly wordpress sites by google. u can search like &#8216;powered by wordpress&#8217; but that will not be effective.

instead of those u must use: Google Blog Search
that is a great blog search engine
]]></description>
			<content:encoded><![CDATA[<p>u cant find directly wordpress sites by google. u can search like &#8216;powered by wordpress&#8217; but that will not be effective.<br />
<span id="more-123"></span><br />
instead of those u must use: <a href="http://blogsearch.google.com">Google Blog Search</a></p>
<p>that is a great blog search engine</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/how-to-find-wordpress-sites-by-google/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress get page number (template tag)</title>
		<link>http://www.neteyaz.com/wordpress-get-page-number-template-tag</link>
		<comments>http://www.neteyaz.com/wordpress-get-page-number-template-tag#comments</comments>
		<pubDate>Sun, 22 Nov 2009 12:02:08 +0000</pubDate>
		<dc:creator>banias</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=121</guid>
		<description><![CDATA[if you want to get active pages number u can use this


if(!empty($paged))$page = $paged; else $page = 1;

$page argument will be active pages number.
(how to get wordpress page number)
]]></description>
			<content:encoded><![CDATA[<p>if you want to get active pages number u can use this<br />
<span id="more-121"></span></p>
<pre class="pretyprint">
if(!empty($paged))$page = $paged; else $page = 1;
</pre>
<p><strong>$page</strong> argument will be active pages number.</p>
<p>(how to get wordpress page number)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/wordpress-get-page-number-template-tag/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>javascript infix and postfix example with stack</title>
		<link>http://www.neteyaz.com/javascript-infix-and-postfix-example-with-stack</link>
		<comments>http://www.neteyaz.com/javascript-infix-and-postfix-example-with-stack#comments</comments>
		<pubDate>Sun, 22 Nov 2009 11:26:17 +0000</pubDate>
		<dc:creator>banias</dc:creator>
				<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[calculator]]></category>
		<category><![CDATA[infix]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.neteyaz.com/?p=117</guid>
		<description><![CDATA[Infix calculator
postfix calculator
infix to postfix algorithm
postfix to infix algorithm
stack methods
how to do infix and postfix notation with stack

click here for live example

1 - /*
2 -   Infix ~ Postfix Conversion
3 -   - Converts an Infix(Inorder) expression to Postfix(Postorder) and vice-versa
4 -   - Valid Operators are +,-,*,/,^,()
5 -   - [...]]]></description>
			<content:encoded><![CDATA[<p>Infix calculator<br />
postfix calculator<br />
infix to postfix algorithm<br />
postfix to infix algorithm<br />
stack methods<br />
how to do infix and postfix notation with stack<br />
<span id="more-117"></span><br />
<a href="http://scriptasylum.com/tutorials/infix_postfix/infix_postfix.html" rel="nofollow external" target="_blank">click here</a> for live example</p>
<pre class="prettyprint">
1 - /*
2 -   Infix ~ Postfix Conversion
3 -   - Converts an Infix(Inorder) expression to Postfix(Postorder) and vice-versa
4 -   - Valid Operators are +,-,*,/,^,()
5 -   - No Error Handling in this version
6 -   JavaScript Implementation
7 -   - © 2002 Premshree Pillai
8 -   See algorithms at
9 -   -http://www.qiksearch.com/articles/cs/infix-postfix/index.htm
10 -   -http://www.qiksearch.com/articles/cs/postfix-evaluation/index.htm
11 -   Created : 03/08/02 (dd/mm/yy)
12 -   Modified : 23/10/02 (dd/mm/yy)
13 -   Web : http://www.qiksearch.com
14 -   E-mail : qiksearch@rediffmail.com
15 - */
16 -
17 - function push_stack(stackArr,ele)
18 - {
19 - 	stackArr[stackArr.length]=ele;
20 - }
21 -
22 - function pop_stack(stackArr)
23 - {
24 - 	var _temp=stackArr[stackArr.length-1];
25 - 	delete stackArr[stackArr.length-1];
26 - 	stackArr.length--;
27 - 	return(_temp);
28 - }
29 -
30 - function isOperand(who)
31 - {
32 - 	return((!isOperator(who) &#038;&#038; (who!="(") &#038;&#038; (who!=")"))? true : false);
33 - }
34 -
35 - function isOperator(who)
36 - {
37 - 	return((who=="+" || who=="-" || who=="*" || who=="/" || who=="^")? true : false);
38 - }
39 -
40 - function topStack(stackArr)
41 - {
42 - 	return(stackArr[stackArr.length-1]);
43 - }
44 -
45 - function isEmpty(stackArr)
46 - {
47 - 	return((stackArr.length==0)? true : false);
48 - }
49 -
50 - /* Check for Precedence */
51 - function prcd(who)
52 - {
53 - 	if(who=="^")
54 - 		return(5);
55 - 	if((who=="*")||(who=="/"))
56 - 		return(4);
57 - 	if((who=="+")||(who=="-"))
58 - 		return(3);
59 - 	if(who=="(")
60 - 		return(2);
61 - 	if(who==")")
62 - 		return(1);
63 - }
64 -
65 - function InfixToPostfix(infixStr,postfixStr,retType)
66 - {
67 - 	var postfixStr=new Array();
68 - 	var stackArr=new Array();
69 - 	var postfixPtr=0;
70 - 	infixStr=strToTokens(infixStr);
71 - 	for(var i=0; i<infixStr.length; i++)
72 - 	{
73 - 		if(isOperand(infixStr[i]))
74 - 		{
75 - 			postfixStr[postfixPtr]=infixStr[i];
76 - 			postfixPtr++;
77 - 		}
78 - 		if(isOperator(infixStr[i]))
79 - 		{
80 - 			if(infixStr[i]!="^")
81 - 			{
82 - 				while((!isEmpty(stackArr)) &#038;&#038; (prcd(infixStr[i])<=prcd(topStack(stackArr))))
83 - 				{
84 - 					postfixStr[postfixPtr]=topStack(stackArr);
85 - 					pop_stack(stackArr);
86 - 					postfixPtr++;
87 - 				}
88 - 			}
89 - 			else
90 - 			{
91 - 				while((!isEmpty(stackArr)) &#038;&#038; (prcd(infixStr[i])
<prcd(topStack(stackArr))))
92 - 				{
93 - 					postfixStr[postfixPtr]=topStack(stackArr);
94 - 					pop_stack(stackArr);
95 - 					postfixPtr++;
96 - 				}
97 - 			}
98 - 			push_stack(stackArr,infixStr[i]);
99 - 		}
100 - 		if(infixStr[i]=="(")
101 - 			push_stack(stackArr,infixStr[i]);
102 - 		if(infixStr[i]==")")
103 - 		{
104 - 			while(topStack(stackArr)!="(")
105 - 			{
106 - 				postfixStr[postfixPtr]=pop_stack(stackArr);
107 - 				postfixPtr++;
108 - 			}
109 - 			pop_stack(stackArr);
110 - 		}
111 - 	}
112 - 	while(!isEmpty(stackArr))
113 - 	{
114 - 		if(topStack(stackArr)=="(")
115 - 			pop_stack(stackArr)
116 - 		else
117 - 			postfixStr[postfixStr.length]=pop_stack(stackArr);
118 - 	}
119 - 	var returnVal='';
120 - 	for(var i=0; i<postfixStr.length; i++)
121 - 	{
122 - 		returnVal+=postfixStr[i];
123 - 	}
124 - 	if(retType==0)
125 - 		return(returnVal);
126 - 	else
127 - 		return(postfixStr);
128 - }
129 -
130 - function PostfixToInfix(postfixStr)
131 - {
132 - 	var stackArr=new Array();
133 - 	postfixStr=postfixStr.split('');
134 - 	for(var i=0; i<postfixStr.length; i++)
135 - 	{
136 - 		if(isOperand(postfixStr[i]))
137 - 			push_stack(stackArr,postfixStr[i]);
138 - 		else
139 - 		{
140 - 			var temp=topStack(stackArr);
141 - 			pop_stack(stackArr);
142 - 			var pushVal='('+topStack(stackArr)+postfixStr[i]+temp+')';
143 - 			pop_stack(stackArr);
144 - 			push_stack(stackArr,pushVal);
145 - 		}
146 - 	}
147 - 	return(topStack(stackArr));
148 - }
149 -
150 - function strToTokens(str)
151 - {
152 - 	var strArr=str.split("");
153 - 	var tempStr=new String("");
154 - 	var tokens=new Array();
155 - 	var tokens_index=0;
156 - 	for(var i=0; i<strArr.length; i++)
157 - 	{
158 - 		if(isOperand(strArr[i]))
159 - 		{
160 - 			tempStr+=strArr[i];
161 - 		}
162 - 		if(isOperator(strArr[i]) || strArr[i]==")" || strArr[i]=="(")
163 - 		{
164 - 			if(tempStr!="")
165 - 			{
166 - 				tokens[tokens_index]=tempStr;
167 - 				tokens_index++;
168 - 			}
169 - 			tempStr="";
170 - 			tokens[tokens_index]=strArr[i];
171 - 			tokens_index++;
172 - 		}
173 - 		if(i==strArr.length-1)
174 - 			if(tempStr!="")
175 - 				tokens[tokens_index]=tempStr;
176 - 	}
177 - 	return(tokens);
178 - }
179 -
180 - function PostfixSubEval(num1,num2,sym)
181 - {
182 - 	var returnVal;
183 - 	if(sym=="+")
184 - 		returnVal=num1+num2;
185 - 	if(sym=="-")
186 - 		returnVal=num1-num2;
187 - 	if(sym=="*")
188 - 		returnVal=num1*num2;
189 - 	if(sym=="/")
190 - 		returnVal=num1/num2;
191 - 	if(sym=="^")
192 - 		returnVal=Math.pow(num1,num2);
193 - 	return(returnVal);
194 - }
195 -
196 - function PostfixEval(postfixStr)
197 - {
198 - 	var stackArr=new Array();
199 - 	for(var i=0; i<postfixStr.length; i++)
200 - 	{
201 - 		if(isOperand(postfixStr[i]))
202 - 			push_stack(stackArr,postfixStr[i]);
203 - 		else
204 - 		{
205 - 			var temp=parseFloat(topStack(stackArr));
206 - 			pop_stack(stackArr);
207 - 			var pushVal=PostfixSubEval(parseFloat(topStack(stackArr)),temp,postfixStr[i]);
208 - 			pop_stack(stackArr);
209 - 			push_stack(stackArr,pushVal);
210 - 		}
211 - 	}
212 - 	return(topStack(stackArr));
213 - }
214 - </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.neteyaz.com/javascript-infix-and-postfix-example-with-stack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
