Wednesday, 9 October 2013

How to remove .svn folder recursively in Ubuntu System



However the problem is that SVN engine that you used created in every folder of the project the .svnmetadata directory.
If you want to clean all folders of the project of this hidden folder.
Here is the command you can use to clean all .svn.

Open the Ubuntu terminal, Goto to the particualar folder 

1) cd /var/www/app/

2)  type the following command 
find -type d -name '.svn' -exec rm -rfv {} \;

It will remove all the .svn metadata directory from the folder ..


Enjoy ubuntu

Beginners Easy Steps of Css Menu Design

There are lot of tutorial for menu design in web but all are so complex. After searching for the appropriate tutorial of Css Menu design
for beginners I started myself to write Css Menu design for beginners.

On a web page, the navigation can be taken as a table of content.
In HTML, table of content can be represent by the <ol> element. ol stands for ordered list.

The code to making a simple ordered list:

<ol >
<li>Chapter 1</li>
<li>Chapter 2</li>
<li>Chapter 3</li>
</ol>
The above code will result:

1. Chapter 1
2. Chapter 2
3. Chapter 3

If we want to link an item the Table of content will look like below:

<ol id="menu">
<li class="current"><a href="chapter1.html">Chapter 1</li>
<li><a href="chapter2.html">Chapter 2</li>
<li><a href="chapter3.html">Chapter 3</li>
</ol>

The HTML above shows that we want an ordered list of chapters that contain links to other sections of a site.
We can see that a couple of the elements above have some attributes set. The attributes the class and id.
The class attribute should be considered as metadata for the element it is applied to. For example, one of the list chapter has the class=" current".
This means us that one chapter is currently selected. The id attribute uniquely identifies a particular element.

The content
Content is generally made up of one or more headers, some paragraphs with text and every now and then some other stuff such as images, lists, quotes etc.
We'll want to encapsulate the content so that we can put other things outside it without having trouble identifying it later on.
A <div> (division, section) element is good for this, because it's sole purpose is to hold a collection of elements.
We'll give it an identifying class, because there might be other <div> elements on the page:

<div class="content">
<h2>Page 1</h2>
<p>Text...</p>
</div>
Now we put together the Table of content and content :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
For the file to validate, it needs a document type. The document type specifies what rules the document must follow for it to be valid. I usually go with XHTML 1.0 Strict,
but there are other document types that are more... forgiving. I won't be covering them in this tutorial.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Homepage</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
</head>
The <meta> tag holds metadata about the document. In this particular case, it holds the character encoding of the page, so that the browser doesn't have to guess.
The <link> element is used for linking to external resources, in this case a stylesheet. We'll be making the stylesheet.

<body>
<h1>My Frist Menu Design</h1>
<ol id="menu">
<li class="current"><a href="chapter1.html">Chapter 1</li>
<li><a href="chapter2.html">Chapter 2</li>
<li><a href="chapter3.html">Chapter 3</li>
</ol>
<div class="content">
<h2>Page 1</h2>
<p>Text...</p>
</div>
</body>
</html>

That's right, we'll only be dealing with one image. It doesn't matter if we have five different states for the tab, it can all be done with one image. I'll start by answering the obvious question: Why?
Splitting the image into pieces left, middle and right requires six separate images for two states. If we were to add another state, for example a hover effect, the number of images required would increase to nine. Other than extra file management and more work when editing the images, what does this mean?

Each image has a header section. The filesize of six small images would be about twice as big as the filesize of one big image.
Each image requires its own HTTP request. This wastes both bandwidth and server processing time.
Due to the images being requested separately this also means that the page will take longer to load, especially if the user's browser downloads the files one by one.
There is no way to apply the method I'm going to describe using three images for one tab, since each tab consists of only two elements (<li> and <a>) and only one background image can be applied to an element.
Hopefully I've convinced you that putting everything into one image is much better than using several images. Moving on...

Each state will take up one row of the image and will be 500 pixels wide. The idea is that the left side of the tab will be drawn in one element, then the rest will be drawn on top of it in a child element. I will explain how in the next step. Each row is 60 pixels high. This will allow the tab to be up to 60 pixels high, but it can be smaller.

Now, you might be worried. Worried about the "500 pixel" bit of my previous paragraph. Don't be, though. We will be saving this rather big image as a GIF image, which in my case took it down to just a couple of kilobytes. If you know that you will never have tabs even close to 500 pixels wide, you can of course shrink it. Even 200 pixels might be enough. But thanks to compression, the difference probably won't be more than a few bytes.

 

<img alt="" src="http://blixt.org/media/a/1/tabs-hover/tabs.gif" />

&nbsp;

Save this image where you saved chapter<code>1.html</code>, or make your own image. Name it&nbsp;<code>tabs.gif</code>.
<br />
<h4>
The tabs</h4>
The first thing we'll do is to style the ordered list that represents our Table Of Content&nbsp;(<code>&lt;ol id="menu"&gt;</code>):
<br />
<pre>ol#menu {
&nbsp; &nbsp; height: 2em;
&nbsp; &nbsp; list-style: none;
&nbsp; &nbsp; margin: 0;
&nbsp; &nbsp; padding: 0;
}</pre>
<pre></pre>
<pre>Stle of Default State of each Chapter:</pre>
<pre>ol#menu li {
&nbsp; &nbsp; background: #bdf url(tabs.gif);
&nbsp; &nbsp; float: left;
&nbsp; &nbsp; margin: 0 1px 0 0;
&nbsp; &nbsp; padding-left: 10px;
}</pre>
<pre>Style for the link:</pre>
<pre>ol#menu a {
&nbsp; &nbsp; background: url(tabs.gif) 100% 0;
&nbsp; &nbsp; color: #008;
&nbsp; &nbsp; float: left;
&nbsp; &nbsp; line-height: 2em;
&nbsp; &nbsp; padding-right: 10px;
&nbsp; &nbsp; text-decoration: none;
}</pre>
<pre>&nbsp;Style for the current :</pre>
<pre>ol#menu li.current {
&nbsp; &nbsp; background-color: #48f;
&nbsp; &nbsp; background-position: 0 -60px;
}</pre>
<pre>Style for the current menu link</pre>
<pre>ol#menu li.current a {
&nbsp; &nbsp; background-position: 100% -60px;
&nbsp; &nbsp; color: #fff;
&nbsp; &nbsp; font-weight: bold;</pre>
<pre>}</pre>
<pre>Style for The content :</pre>
<pre>div.content {
&nbsp; &nbsp; border: #48f solid 3px;
&nbsp; &nbsp; clear: left;
&nbsp; &nbsp; padding: 1em;
}</pre>
<pre></pre>
<pre>All are together will look like this:</pre>
<pre>ol#menu {
&nbsp; &nbsp; height: 2em;
&nbsp; &nbsp; list-style: none;
&nbsp; &nbsp; margin: 0;
&nbsp; &nbsp; padding: 0;
}

ol#menu li {
&nbsp; &nbsp; background: #bdf url(tabs.gif);
&nbsp; &nbsp; float: left;
&nbsp; &nbsp; margin: 0 1px 0 0;
&nbsp; &nbsp; padding-left: 10px;
}

ol#menu a {
&nbsp; &nbsp; background: url(tabs.gif) 100% 0;
&nbsp; &nbsp; color: #008;
&nbsp; &nbsp; display: block;
&nbsp; &nbsp; float: left;
&nbsp; &nbsp; height: 2em;
&nbsp; &nbsp; line-height: 2em;
&nbsp; &nbsp; padding-right: 10px;
&nbsp; &nbsp; text-decoration: none;
}

ol#menu li.current {
&nbsp; &nbsp; background-color: #48f;
&nbsp; &nbsp; background-position: 0 -60px;
}

ol#menu li.current a {
&nbsp; &nbsp; background-position: 100% -60px;
&nbsp; &nbsp; color: #fff;
&nbsp; &nbsp; font-weight: bold;
}

div.content {
&nbsp; &nbsp; border: #48f solid 3px;
&nbsp; &nbsp; clear: left;
&nbsp; &nbsp; padding: 1em;
}</pre>
<pre>And hence the end of the tutorial.</pre>
<pre></pre>
<pre>If you want to test the above created menu then follow the steps:</pre>
<pre><strong>Step 1:</strong></pre>
<pre>Make a folder named menu:</pre>
<pre><strong>Step 2:</strong></pre>
<pre>make three blank html files in it:</pre>
<pre>Chapter1.html</pre>
<pre>Chapter2.html</pre>
<pre>Chapter3.html</pre>
<pre>Style.css</pre>
<pre>To make html file open text editor :</pre>
<pre>file -&gt;save-&gt;save as type-&gt;choose all file -&gt;file name-&gt;type filename.html-&gt;ok</pre>
<pre>in case of Style.css file type style.css in file name instade of html</pre>
<pre>step 3:</pre>
<pre>Right click on Chapter1.html -&gt;open with-&gt;notepad</pre>
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;My Homepage&lt;/title&gt;
&lt;link href="Style.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;My Homepage&lt;/h1&gt;
&lt;ol id="menu"&gt;
&lt;li class="current"&gt;&lt;a href="Chapter1.html"&gt;&lt;span&gt;Page 1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href="Chapter2.html"&gt;&lt;span&gt;Page 2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="Chapter3.html"&gt;&lt;span&gt;Page 3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="content"&gt;
&lt;h2&gt;Page 2&lt;/h2&gt;
&lt;p&gt;Text...&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;

Do this for Chapter2.html
<br />
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;My Homepage&lt;/title&gt;
&lt;link href="Style.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;My Homepage&lt;/h1&gt;
&lt;ol id="menu"&gt;
&lt;li&gt;&lt;a href="Chapter1.html"&gt;&lt;span&gt;Page 1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li &nbsp;class="current" &gt;&lt;a href="Chapter2.html"&gt;&lt;span&gt;Page 2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="Chapter3.html"&gt;&lt;span&gt;Page 3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;h2&gt;Page 2&lt;/h2&gt;
&lt;p&gt;Text...&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<pre>Do this for Chapter3.html</pre>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;My Homepage&lt;/title&gt;
&lt;link href="Style.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;My Homepage&lt;/h1&gt;
&lt;ol id="menu"&gt;
&lt;li&gt;&lt;a href="Chapter1.html"&gt;&lt;span&gt;Page 1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href="Chapter2.html"&gt;&lt;span&gt;Page 2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="current" &gt;&lt;a href="Chapter3.html"&gt;&lt;span&gt;Page 3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;</pre>
<pre>&lt;/ol&gt;
&lt;div&gt;
&lt;h2&gt;Page 2&lt;/h2&gt;
&lt;p&gt;Text...&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<pre>For Style.css</pre>
<pre></pre>
<pre></pre>
<pre>ol#menu {
&nbsp; &nbsp; height: 2em;
&nbsp; &nbsp; list-style: none;
&nbsp; &nbsp; margin: 0;
&nbsp; &nbsp; padding: 0;
}

ol#menu li {
&nbsp; &nbsp; background: #bdf url(tabs.gif);
&nbsp; &nbsp; float: left;
&nbsp; &nbsp; margin: 0 1px 0 0;
&nbsp; &nbsp; padding-left: 10px;
}

ol#menu a {
&nbsp; &nbsp; background: url(tabs.gif) 100% 0;
&nbsp; &nbsp; color: #008;
&nbsp; &nbsp; display: block;
&nbsp; &nbsp; float: left;
&nbsp; &nbsp; height: 2em;
&nbsp; &nbsp; line-height: 2em;
&nbsp; &nbsp; padding-right: 10px;
&nbsp; &nbsp; text-decoration: none;
}

ol#menu li.current {
&nbsp; &nbsp; background-color: #48f;
&nbsp; &nbsp; background-position: 0 -60px;
}

ol#menu li.current a {
&nbsp; &nbsp; background-position: 100% -60px;
&nbsp; &nbsp; color: #fff;
&nbsp; &nbsp; font-weight: bold;
}

div.content {
&nbsp; &nbsp; border: #48f solid 3px;
&nbsp; &nbsp; clear: left;
&nbsp; &nbsp; padding: 1em;
}</pre>
<pre>Save the above images as tabs.gif</pre>
</div>

Ways to Speed Up MySQL

Only SELECT the fields you require

All to often web developers will SELECT * which selects all fields for a record. However, you'd be surprised how much of a strain SELECT * can cause when running a query, especially on larger tables. So, instead of selecting absolutely everything, just select the fields you need. it takes up less memory on your server and thus allowing your database server to use that free memory to handle other queries and processes.

Use EXPLAIN to analyze your query

This is probably one of the first recommendations you will run into when you are trying to optimise a MySQL query. EXPLAIN is a useful command in MySQL which can provide you some great details about how a query is ran, what index is used, how many rows it needs to check through and if it needs to do file sorts, temporary tables and other nasty things you want to avoid. To use EXPLAIN, I firstly recommend downloading MySQL Workbench which will provide you with a query browser which you can run queries and see the results of them without sticking them in PHP,etc. If you find that your query is using a file sort or temporary tables, you may be able to optimise your query and thus speed up it's execution time.

Use COUNT(1) to count the number of records

This point slightly crosses over into PHP. In PHP there is a function called mysql_num_rows(). It's purpose is to count the number of results returned by a query. While this sounds like a really good idea, my experience shows that this takes a whole lot longer than running a second COUNT(1) query on MySQL.

Apply indexes to useful fields

Indexes are like the letter tabs in a phone book. They make it quicker for you to find the data you need that match a certain criteria. Creating good indexes is an art and you need to think about how you will be querying your data. Things to consider are what fields are you going to use in your WHERE and how you are going to ORDER BY. When you have this information you will be able to create indexes that will speed up your queries instantly.

Use multiple inserts if possible

Do you have a lot of INSERT queries to run at once? Why not send them all to MySQL together. It will be executed a lot quicker. That can be especially useful when doing imports of data.

Use correct field types for the data

There are a lot of different field types available through MySQL, but I suggest getting familiar with the string and numeric types to get a better idea of which are best of your data. For instance, if you are only going to ever store the numbers 1, 2 and 3 in a field, use TINYINT rather than INTERGER. It takes up less space on your server.

Use the correct table storage engine type

So many people opt-in for the MyISAM storage engine. Don't get me wrong, its a fantastic engine and can be really fast. But once you get to the point that your database is really large and you are running 100s maybe 1000s of queries per sec you will start to run into locked tables. This is where MyISAM fails. A table lock happens when MyISAM needs to run a query. The longer the query takes to run, the longer the lock. Because of this, other queries will have to wait for that query to finish and thus causing a slow down on your site. if you don't need the FULLTEXT index type, I suggest using InnoDB. It may be initially slower than MyISAM, but its much more reliable and alot safer in the case of a server crash.

Microsoft announced Windows Phone 8 system update

Windows Phone 8 shares much of its code with the firm's PC system, making it easier for developers to write programs for different types of devices. The company said it should indicate there would be various "amazing games" for handsets running its new release. A tie-up with Nokia has already brought some Windows Phone devices to market, but sales lag some way behind models running Android or Apple's iOS. Microsoft said HTC, Samsung, Nokia and Huawei would all be making devices powered by the system upgrade.   High-def handsets Other new features announced at the Windows Phone Summit event in San Francisco included: Support for multi-core chips, allowing devices to turn on cores to access extra processing power when needed, and to switch off cores when not to preserve battery life. The capability to work with different screen resolutions including the high definition 720p format. Support for removable Micro SD cards allowing users to store more media files or install apps saved on the format. A new "wallet" app allowing the phone to act as both membership and credit cards. It also supports NFC (near field communication) payments. Built-in maps from Nokia's Navteq division with turn-by-turn navigation. A more customizable start screen allowing users the selection of three tile sizes to represent installed software and more color options. A warning alert if the software believes a website contains malware or is otherwise unsafe. Windows Phone 8 screenshot Application tiles can be made to look smaller.
  Background Skype The update also allows internet call software based on video chat technologies and VoIP (voice over internet protocol) to run in the background. This addresses a complaint that the firm's own Skype program could not be used to receive calls while its owner was using another application - a function offered on rival platforms. The firm said VoIP calls should now "feel like any other call" received or made by Windows Phone handsets. Windows Phone 8 and Windows 8 strongly resemble each other - at least when the PC system is run under its Metro interface - and Microsoft was keen to stress that their relationship goes deeper than appearance alone. The two will share a range of components including graphic drivers, the DirectX collection ofapplication programming interfaces (APIs) and the NT kernel that ties application software to the hardware it is installed on. They can also both support native code in the C and C++ programming languages. Microsoft said this should not only build it easier to port software between the two environments, but should speed up the time it takes developers to recode programs originally built for Android and iOS.   More games Microsoft noted more than 100,000 apps had been released for Windows Phone 7. By contrast there are more than 466,500 programs in the Android marketplace according to search site Appbrain, and "over 500,000" in Apple's app store according to the iPhone maker. Surface tablet the system software that powers Microsoft's Surface tablets shares many components with Windows Phone 8 Securing "marquee titles" is more important to some than raw numbers, and Microsoft addressed this too with news that Game loft’s Nova 3 and Zynga's Draw Something were coming to Windows Phone. "Until now handsets running Microsoft's system have been missing some of the most innovativeapplications and popular games," said Malik Saadi, principal analyst at Informa Telecoms. "Now with the update from Windows Phone 7 to 8 this should be addressed. Many of the developers I had spoken to had said they were holding off until they knew more about the new system. It looks like that barrier has now gone."

Google Eye Glasses Will Available Within Two Years

Google detailed its futuristic Project Glass - eyewear, having the functionality of live-stream images and audio, as well as perform various computing tasks.It can also use for show direction.Google expects to bring in market for consumer version of the electronic eyeware within two years, but there is no price tag yet for that. The technology is known as Google Glass.According to Sergey Brin, co-founder of Google, the consumer version will have a lower price than the current $1,500 price tag for U.S.-based developers attending the Google I/O developer conference. Developers can get their Google Glass gadgets from early next year.

7.85-inch iPad "mini" in October analyst predicts

Analyst Andy Hargreaves believes that,  Apple will introduce a 7.85-inch iPad in the fall with 8 GB of flash memory for $299, and sell 10 million of the minis by the end of 2012. Pacific Crest analyst Andy Hargreaves is predicting that Apple will introduce a 7.85-inch iPad in October,On the heels of Google's $199 Nexus 7.
"We anticipate an entry-level 7.85" iPad with 8GB of NAND capacity to price at $299 with an initial gross margin of 31%. We estimate Apple will sell 10.0 million 7.85" iPads in FQ1 (Dec. 2012) and 35.2 million in all of F2013. Based on estimated component order volume, we believe our iPad mini unit estimates are well within Apple's production capacity. We anticipate 25% cannibalization of the larger 9.7" iPad (for every four 7.85" iPads added, we reduced our 9.7" iPad estimate by one), so our total F2013 iPad estimate increases to 91.6 million from 65.2 million," he wrote in a report published Thursday. For a long time Apple has been  rumored  to be developing 7-inch version of the iPad, but Apple was silent on the topic. According to Tom Mainelli, IDC's research director of Mobile Connected Devices,  Apple could increase its market dominance with a iPad mini. "If Apple launches a sub-$300, 7-inch product into the market later this year as rumored, we expect the company's grip on this market to become even stronger," he wrote in a report issued ahead of the Nexus 7's unveiling. Hargreaves suggested that Apple would kill the $399 iPad 2, and could introduce a 16GB iPad mini in same  price. He also expects a refresh in October for the current  9.7-inch iPad, speculating that it will have a lighter battery and oxide TFT screen and new camera location. Hargreaves cranked up his price target for Apple from $630 to $690.

The Amazing Spider-Man now available for download on Android and iOS

The game based on the movie, The Amazing Spider-Man, is now available for download on the iOS and Android platform. Cost of the game  Rs. 398.66 on the Google Play store and cost on the Apple App Store   $6.99 (Rs. 394 approximately)
The game, The Amazing Spider-Man is based on the Hollywood blockbuster that hits theaters today. Minimum requirement for Android ,  is Android 2.2 or higher and it is compatible with the iPhone 4, iPhone 4S, iPod touch (4th generation), iPad 2 Wi-Fi, iPad 2 Wi-Fi + 3G, iPad (3rd generation) and iPad Wi-Fi + 4G, requiring iOS 4.0 or later.
Android users can download the game here. iOS users can download the game here.

Allied Computers Launched Very Low Cost Laptop at Rs. 4,999

Allied Computers International(Asia) launched ACi Icon-1100 laptop on wednesday, a laptop just of Rs. 4,999.

Hirji Patel,the managing director,  said that, "We are creating history and this is what the whole country has been waiting for, a full functional, high resolution 10.2 inch screen laptop at never before attempted price" .

Features of the laptop:

1) VIA Processor

2) 512MB expandable   to 1 GB  RAM

3)Storage 4GB expandable   to 32 GB

4) Webcam

5) High definition audio

6) 3 USB ports

7) 700 gms battery

How to Change Facebook Page URL

When you create a Page in Facebook, a random URL generates by the system to your page that looks something like this:
https://www.facebook.com/pages/yourpage/123456
When 25 or more users have “liked” your Page in Facebook, you can use an easy-to-remember username (or vanity URL) for your Page that may looks like this:
https://www.facebook.com/yourpage
Once you have claimed the URL (or username) for your Facebook Page, there was no option to change it. The only workaround was that you delete the old Facebook page (thus losing all the likes) and recreate a new one with the desired username (provided it is available). Well that old policy seems to have changed recently and Facebook Page owners can now change the usernames of Pages that they are admin of. To get start, Open any of your Facebook Pages, go to Edit Page – > Update Info and click the “Change Username” link under the Username option.