<?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>Tara Andrei &#187; others</title>
	<atom:link href="http://www.andreitara.com/category/others/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andreitara.com</link>
	<description>a developer&#039;s blog</description>
	<lastBuildDate>Sun, 18 Jul 2010 17:46:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The magic of mode_rewrite</title>
		<link>http://www.andreitara.com/2010/06/the-magic-of-mode_rewrite/</link>
		<comments>http://www.andreitara.com/2010/06/the-magic-of-mode_rewrite/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 20:00:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programare]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[others]]></category>
		<category><![CDATA[web app]]></category>
		<category><![CDATA[apache mode_rewrite]]></category>
		<category><![CDATA[installing mode_rewrite on linux]]></category>
		<category><![CDATA[installing mode_rewrite on windows]]></category>

		<guid isPermaLink="false">http://www.andreitara.com/?p=244</guid>
		<description><![CDATA[There&#8217;s a long time in the galaxy since I haven&#8217;t post on my blog and now,  finally here I am, posing a new article. Today I will speak about htaccess mod_rewrite. Well despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo.
The majority of the web servers, that are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.andreitara.com/wp-content/uploads/2010/06/images.jpg"><img class="alignleft size-full wp-image-252" title="images" src="http://www.andreitara.com/wp-content/uploads/2010/06/images.jpg" alt="images" width="179" height="134" /></a>There&#8217;s a long time in the galaxy since I haven&#8217;t post on my blog and now,  finally here I am, posing a new article. Today I will speak about <a title=".Htaccess rewrites, Mod_Rewrite Tricks and Tips" href="http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html">htaccess mod_rewrite</a>. Well despite the tons of examples and docs, <strong>mod_rewrite</strong> is voodoo. Damned cool voodoo, but still voodoo.</p>
<p>The majority of the web servers, that are based on Apache, have the mod_rewrite enabled so you don&#8217;t have to get dirty to install it on the hosting server.But anyone of those that are developing web application based on Apache server,  using PHP have a local installed server therefore mode_rewrite is also  necessary in testing process.<br />
<span id="more-244"></span></p>
<p>Installing mod_rewrite :</p>
<ol>
<li>On Linux: edit the Apache configuration file (  httpd.conf ) and uncomment   <em>LoadModule rewrite_module modules/mod_rewrite.so</em> (remove the  pound &#8216;#&#8217; sign from in front of the line) . Also be sure that the lines containing <em>ClearModuleList</em> and <em>AddModule mod_rewrite.c are</em> uncommented . Now you can create the famous .htacess file on the root of you website and start adding your code.</li>
<li>On Windows: well as we are expecting, things are a bit more complicated because on Windows you cannot create a file that doesn&#8217;t have a name (.htacess is a file that only have an extension). For first just uncomment the same lines as in the Linux example. Now you have to tell Apache to use you&#8217;re custom file instead of  .htacess file, so search in the configuration file (httpd.conf)  for the following lines:</li>
</ol>
<p style="padding-left: 60px;"><strong># AccessFileName: The  name of the file to look for in each directory # for additional  configuration directives. See also the AllowOverride<br />
# directive.<br />
#<br />
AccessFileName .htaccess (change the .htaccess to [name].htaccess where name can be whatever what you wish )</strong></p>
<p style="padding-left: 30px;">You can escape this step and create the .htacess file even on windows, actually the restriction of creating a file without name is an restriction of Windows Explorer is not an restriction of the operating system<strong> </strong>. Open the command (cmd), go to the root folder of the website and type <strong>copy con .htacess </strong>and press <strong>Ctrl+Z</strong>. well&#8230; that&#8217;s all folks.</p>
<p>Maybe you are asking yourself  about mod_rewrite and where to use it, well the short and  simple answer is :  for simplifying the URL of a website, simpler/shorter URL are easier to write easier to remember. For example instead of having an URL  like this www.example.com?id_product=23123&amp;color=23 you can have something like www.example.com/iphone-white. Mod_rewrite basicly make   use of regular expression to rewrite an specified URL.</p>
<p style="padding-left: 30px;">When to use it: mod_rewrite can be used in many circumstances where you may want to rewrite the an URL, also you can create dynamically virtual hosting entry;  practically mode_rewrite is an &#8220;Swiss Army Knife&#8221;.</p>
<p style="padding-left: 30px;">When not to use it: well as I have mentioned  before mode_rewrite make use of regular expression, and evaluating regular expression takes time, use memory and the global performance of the server is decreasing.</p>
<p>I will provide you some basic example of using mode_rewrite. .htaccess file should begin with:</p>
<pre style="padding-left: 60px;"><strong>Options +FollowSymLinks
RewriteEngine On
RewriteBase /

</strong></pre>
<ol>
<li><span style="text-decoration: underline;">Redirecting</span> <strong> </strong><br />
<strong>Redirect /index.php   http://www.example.com</strong>/    -this example redirect the current site to www.example.com<br />
RedirectMatch (.*)\.gif http://images.example.com$1.png      -In this example, we’ve taken all of our GIF files, converted them to PNG files, and<br />
moved them to another server</li>
<li><span style="text-decoration: underline;">Require www</span>
<pre>Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]</pre>
</li>
<li>Denying access to a folder except of fopen file from php
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+)/.*\ HTTP [NC]
RewriteRule .* - [F,L]</pre>
</li>
<li>Limit access during some hours
<pre class="odd">Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# If the hour is 7
RewriteCond %{TIME_HOUR} ^7$
RewriteRule ^.*$ - [F,L]</pre>
</li>
</ol>
<p>These samples are here just to open your appetite for mode_rewrite. Practically this tool can be used in any other ways,yes&#8230; the limit is your imagination.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andreitara.com/2010/06/the-magic-of-mode_rewrite/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web browser in 2 pasi</title>
		<link>http://www.andreitara.com/2009/01/web-browser-in-2-pasi/</link>
		<comments>http://www.andreitara.com/2009/01/web-browser-in-2-pasi/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 21:26:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[others]]></category>
		<category><![CDATA[java web browser]]></category>
		<category><![CDATA[web broser]]></category>

		<guid isPermaLink="false">http://www.andreitara.com/?p=79</guid>
		<description><![CDATA[Recent intr-un proiect am avut nevoie de un web browser propriu. In loc sa folosesc un activeX de Internet Explo(r/d)er am ales sa imi constriuesc propria componenta din mai multe considerente:  in primul rand proiectul era in Java si  nu doream sa folosesc JNI (java native interface- pentru cei care nu sunt familiarizati [...]]]></description>
			<content:encoded><![CDATA[<p>Recent intr-un proiect am avut nevoie de un web browser propriu. In loc sa folosesc un activeX de Internet Explo(r/d)er am ales sa imi constriuesc propria componenta din mai multe considerente:  in primul rand proiectul era in Java si  nu doream sa folosesc JNI (java native interface- pentru cei care nu sunt familiarizati cu termenul in doua cuvinte este vorba de o tehnologie ce va permite sa accesati cod nativ din programele de java.)  si al doilea motiv era ca nu aveam nevoie de un web browser foarte complex care sa suporte &#8216;nspe mii de plugin-uri.<br />
Iata un exemplu minimal :</p>
<p>import javax.swing.event.HyperlinkEvent;<br />
import javax.swing.*;<br />
import java.io.*;<br />
import javax.swing.event.HyperlinkListener;</p>
<p>public class SimpleWebBrowser {<br />
static JEditorPane jep = new JEditorPane();<br />
public static void main(String[] args) {</p>
<p>String initialPage = &#8220;http://www.google.ro/&#8221;;<br />
if (args.length &gt; 0) initialPage = args[0];</p>
<p>jep.setEditable(false);</p>
<p>jep.addHyperlinkListener(new HyperlinkListener() {</p>
<p>public void hyperlinkUpdate(HyperlinkEvent e) {<br />
try {<br />
jep.setPage(e.getURL());<br />
} catch (IOException ex) {<br />
Logger.getLogger(SimpleWebBrowser.class.getName()).log(Level.SEVERE, null, ex);<br />
}<br />
}<br />
});</p>
<p>try {<br />
jep.setPage(initialPage);<br />
}<br />
catch (IOException e) {<br />
System.err.println(&#8221;Usage: java SimpleWebBrowser url&#8221;);<br />
System.err.println(e);<br />
System.exit(-1);<br />
}</p>
<p>JScrollPane scrollPane = new JScrollPane(jep);<br />
JFrame f = new JFrame(&#8221;Simple Web Browser&#8221;);<br />
f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);<br />
f.getContentPane().add(scrollPane);<br />
f.setSize(512, 342);<br />
f.show();</p>
<p>}</p>
<p>}</p>
<p>Si iata cum ar arata &#8220;miniborwser-ul&#8221;</p>
<p><a href="http://www.andreitara.com/wp-content/uploads/2009/01/untitled2.jpg"><img title="untitled2" src="http://www.andreitara.com/wp-content/uploads/2009/01/untitled2-300x186.jpg" alt="" width="300" height="186" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.andreitara.com/2009/01/web-browser-in-2-pasi/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Blue brain</title>
		<link>http://www.andreitara.com/2008/11/blue-brain/</link>
		<comments>http://www.andreitara.com/2008/11/blue-brain/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 16:47:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hi-teack]]></category>
		<category><![CDATA[others]]></category>
		<category><![CDATA[blue brain]]></category>
		<category><![CDATA[tehnologie esteme]]></category>

		<guid isPermaLink="false">http://www.andreitara.com/?p=54</guid>
		<description><![CDATA[Desi nu prea obijnuiesc sa ma uit la TV prea des, zilele acestea am vazut un documentar pe arte, un post TV destul de avangardist in felul sau ..dar nu despre asta este vorba. In documentar era vorba despre diverese proiecte hi-tech, printre aceste unul foarte intersant numit Blue brain.
Cica tipii astia ce se ocupa [...]]]></description>
			<content:encoded><![CDATA[<p>Desi nu prea obijnuiesc sa ma uit la TV prea des, zilele acestea am vazut un documentar pe arte, un post TV destul de avangardist in felul sau ..dar nu despre asta este vorba. In documentar era vorba despre diverese proiecte hi-tech, printre aceste unul foarte intersant numit <a href="http://bluebrain.epfl.ch/">Blue brain</a>.<br />
Cica tipii astia ce se ocupa de proiectul respectiv vor sa fac un reverse-enginering pe creierul mamiferelo si sa produca un fel de simulator al neocoretexului folosind un supercomputer.Se vorbea la un moment dat despre posibilitatea de a creea un calculator care este capabil sa invete precum invata un copil sau chear se merge mai departe, teoretic s-ar putea creea un  avatat al unei persoane adica proiectia constiintei sale intr-un calculator, evident problema prinicipala ar reprezenta-o  interfata intre creierul uman si calculator..dar zic eu ca nu suntem pe departe &#8230;si matrix vi se parea pura fictiune <img src='http://www.andreitara.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  .<br />
Am gasit pe youtube un filmulet destul de intersant</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="322" height="261" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/3KquJWhsx_g&amp;hl=en&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6" /><embed type="application/x-shockwave-flash" width="322" height="261" src="http://www.youtube.com/v/3KquJWhsx_g&amp;hl=en&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Asa ca si un fel de concluzie : omul este masura tuturor lucrurilor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andreitara.com/2008/11/blue-brain/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hello world</title>
		<link>http://www.andreitara.com/2008/11/hello-world/</link>
		<comments>http://www.andreitara.com/2008/11/hello-world/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 16:06:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[others]]></category>
		<category><![CDATA[about me]]></category>
		<category><![CDATA[hello world]]></category>

		<guid isPermaLink="false">http://www.andreitara.com/?p=3</guid>
		<description><![CDATA[OK &#8230;for start some words about me: my name is Andrei and I am a student on Computer Since I am passionated by all what is mean computer,  programming and  computer graphics . Because when I was at beginning I get a lot of help from others now is time for payback: is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.andreitara.com/wp-content/uploads/2008/11/472097903_b781a0f4f8.jpg"><img class="aligncenter size-medium wp-image-4" title="hello world" src="http://www.andreitara.com/wp-content/uploads/2008/11/472097903_b781a0f4f8-300x225.jpg" alt="" width="300" height="225" /></a>OK &#8230;for start some words about me: my name is Andrei and I am a student on Computer Since I am passionated by all what is mean computer,  programming and  computer graphics . Because when I was at beginning I get a lot of help from others now is time for payback: is my time to help others so here you will find a lot of interesting things, things that you will not find them in other places for free. I hope to have enought time to spend on writing intersting things on this blog .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andreitara.com/2008/11/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
