Tuesday, February 2, 2016

CSS3 3D Animation

The introduction of CSS 3 has changed the over all look and feel of the websites. CSS3 animations; transitions and transforms are the most interesting things in CSS3 ie. CSS3 3D animation . CSS transforms allows elements styled with CSS to be transformed in two-dimensional or three-dimensional space. No javascrip, no flash is required for creating 3D animations. It works well in latest browsers and just fine in less capable browsers.


CSS3 3D animation Explained

While we do CSS3 3D animation, we have to know two properties in CSS 3D transforms. One is “Perspective”. To activate 3D space, an element needs perspective. This can be applied with transform property, with the perspective as a functional notation
transform: perspective
Second thing is 3D transform functions. 3D transform uses the same transform propety used for 2D transforms.

CSS3 3D animation Example

Here I am going to give an example of 3D animation using a Mobile. When we hover the phone image it rotates and we are able to see the other side of the mobile.

HTML required for CSS3 3D animation

<div class="container">
<div class="mobile-front"></div>
<div class="mobile-back"></div>
</div>

CSS required CSS3 3D animation Example

/*Adding a container for the animation*/
.container{
 perspective: 800px;
 -webkit-perspective: 800px;
 width:500px;
 height:500px;
 margin:0 auto;
 border-radius:6px;
 position:relative;
 background: #1e5799;
 background: -moz-linear-gradient(top, #1e5799 0%, #2989d8 81%, #7db9e8 83%, #3297e5 100%);
 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1e5799), color-stop(81%,#2989d8), color-stop(83%,#7db9e8), color-stop(100%,#3297e5));
 background: -webkit-linear-gradient(top, #1e5799 0%,#2989d8 81%,#7db9e8 83%,#3297e5 100%);
 background: -o-linear-gradient(top, #1e5799 0%,#2989d8 81%,#7db9e8 83%,#3297e5 100%);
 background: -ms-linear-gradient(top, #1e5799 0%,#2989d8 81%,#7db9e8 83%,#3297e5 100%);
 background: linear-gradient(to bottom, #1e5799 0%,#2989d8 81%,#7db9e8 83%,#3297e5 100%);
}
.mobile-front,
.mobile-back{
        transform-style: preserve-3d; /* Enabling 3D transforms */
 -webkit-transform-style: preserve-3d;
 backface-visibility: hidden;
 -webkit-backface-visibility: hidden;
        width:255px;
 height: 470px;
        position:absolute;
 top:50%;
 left:50%;
 margin:-235px 0 0 -120px;
        background:url(mobile1.png) no-repeat left center;
 transition:0.8s;
}
.mobile-back{
 transform:rotateY(180deg);
 -webkit-transform:rotateY(180deg);
        background-position:right center;
}
.container:hover .mobile-front{
 transform:rotateY(180deg);
 -webkit-transform:rotateY(180deg);
}

.container:hover .mobile-back{
 transform:rotateY(360deg);
 -webkit-transform:rotateY(360deg);
}

CSS for CSS3 3D animation Explained

In the first place, we are enabling the 3D transforms. We are using two DIVs for the two sides of the mobile. And by using backface-visibility: hidden, we are hiding the DIVs when they are flipped. We animate the transitions with transition: 0.8s. With the class ‘mobile-back’, we are flipping the DIV which contains the other side of the mobile, to 180 degree as its default state. When we hover the container, we’ll flip the front side and hide the DIV and at the same time, we’ll flip the second container with the back side of the mobile.

Thursday, January 28, 2016

Google moving its Services into not free

Google has moved his services into payable yes the Google’s famous free services is known as Google AdWords Services has been used all the times as free for online marketing. Today  suddenly Google changed its policy,  it’s  really  frustration the people who are doing Online Market Research, Search Engine Optimization (SEO).



So when you are creating Google AdWords account anymore the process is going to be tuff basically the tool Google AdWords used to find best competitive keywords for targeting a significant words and the  location in the world  for an example if you a product owner you wanted to sell your product in online so obviously you need consultant who can do SEO, SEM, at all the time.


The consultant will understand your domain of the product, according to that he will be started to keyword Researching so he use almost Google AdWords also other tools are available when the product company’s point of view they need to create a campaign according to their product while the SEO Analyst creating, AdWords account on behalf of the Production company.



With regarding to new tweak the client have to pay for their ads anymore if you already have account on AdWords you were lucky and will not be struggle any issues with related payments 





Admin



JavaScript Scientific Calculator with Well-designed User Interface

In this tutorial shows how to create a simple JavaScript Scientific Calculator just in single HTML page with well-designed User Interface just try it your self  

File Name: Index.html





<!DOCTYPE html>
<html>
<head>
<style>
form{
width:440px;
padding:25px;
margin:auto;
border:5px solid #aaa;
border-radius:15px 15px;
}

input{
background:#888;
color:#fff;
font-size:15px;
padding-top:15px;
padding-bottom:15px;
padding-left:19px;
padding-right:19px;
margin:6px;
}

h2{
text-align:center;
}

.sc{
background:#fff;
color:#000;
}
</style>
<script>
function addChar(input, character) {
if(input.value == null || input.value == "0")
input.value = character
else
input.value += character
}

function cos(form) {
form.display.value = Math.cos(form.display.value);
}

function sin(form) {
form.display.value = Math.sin(form.display.value);
}

function tan(form) {
form.display.value = Math.tan(form.display.value);
}

function sqrt(form) {
form.display.value = Math.sqrt(form.display.value);
}

function ln(form) {
form.display.value = Math.log(form.display.value);
}

function exp(form) {
form.display.value = Math.exp(form.display.value);
}

function deleteChar(input) {
input.value = input.value.substring(0, input.value.length - 1)
}

function changeSign(input) {
if(input.value.substring(0, 1) == "-")
input.value = input.value.substring(1, input.value.length)
else
input.value = "-" + input.value
}

function compute(form) {
form.display.value = eval(form.display.value)
}

function square(form) {
form.display.value = eval(form.display.value) * eval(form.display.value)
}

function checkNum(str) {
for (var i = 0; i < str.length; i++) {
var ch = str.substring(i, i+1)
if (ch < "0" || ch > "9") {
if (ch != "/" && ch != "*" && ch != "+" && ch != "-" && ch != "."
&& ch != "(" && ch!= ")") {
alert("invalid entry!")
return false
}
}
}
return true
}
</script>
</head>
<body>
<br>
<form name="sci-calc">
<h2>SCIENTIFIC CALCULATOR</h2>
<table cellspacing="0" cellpadding="1">
<TR>
<TD COLSPAN="5" ALIGN="center"><input NAME="display" class="sc" VALUE="0" SIZE="44" MAXLENGTH="25"></TD>
</TR>
<TR>                                
<td align="center"><input type="button" value="Clear" ONCLICK="this.form.display.value = 0 "></TD>
<td align="center" colspan="2"><input type="button" value="      Backspace     " ONCLICK="deleteChar(this.form.display)"></TD>
<td align="center" colspan="2"><input type="button" value="           Enter          " NAME="Enter" ONCLICK="if (checkNum(this.form.display.value)) { compute(this.form) }"></TD>
</TR>
<TR>
<td align="center"><input type="button" value=" exp " ONCLICK="if (checkNum(this.form.display.value)) { exp(this.form) }"></TD>
<td align="center"><input type="button" value="  7  " ONCLICK="addChar(this.form.display, '7')"></TD>
<td align="center"><input type="button" value="  8  " ONCLICK="addChar(this.form.display, '8')"></TD>
<td align="center"><input type="button" value="  9  " ONCLICK="addChar(this.form.display, '9')"></TD>
<td align="center"><input type="button" value="   /   " ONCLICK="addChar(this.form.display, '/')"></TD>
</TR>                                
<TR>                                
<td align="center"><input type="button" value="  ln   " ONCLICK="if (checkNum(this.form.display.value)) { ln(this.form) }"></TD>
<td align="center"><input type="button" value="  4  " ONCLICK="addChar(this.form.display, '4')"></TD>
<td align="center"><input type="button" value="  5  " ONCLICK="addChar(this.form.display, '5')"></TD>
<td align="center"><input type="button" value="  6  " ONCLICK="addChar(this.form.display, '6')"></TD>
<td align="center"><input type="button" value="   *   " ONCLICK="addChar(this.form.display, '*')"></TD>
</TR>                                
<TR>                                  
<td align="center"><input type="button" value=" sqrt " ONCLICK="if (checkNum(this.form.display.value)) { sqrt(this.form) }"></TD>
<td align="center"><input type="button" value="  1  " ONCLICK="addChar(this.form.display, '1')"></TD>
<td align="center"><input type="button" value="  2  " ONCLICK="addChar(this.form.display, '2')"></TD>
<td align="center"><input type="button" value="  3  " ONCLICK="addChar(this.form.display, '3')"></TD>
<td align="center"><input type="button" value="   -   " ONCLICK="addChar(this.form.display, '-')"></TD>
</TR>                                
<TR>                                
<td align="center"><input type="button" value="  sq  " ONCLICK="if (checkNum(this.form.display.value)) { square(this.form) }"></TD>
<td align="center"><input type="button" value="  0  " ONCLICK="addChar(this.form.display, '0')"></TD>
<td align="center"><input type="button" value="   .  " ONCLICK="addChar(this.form.display, '.')"></TD>
<td align="center"><input type="button" value=" +/- " ONCLICK="changeSign(this.form.display)"></TD>
<td align="center"><input type="button" value="   +  " ONCLICK="addChar(this.form.display, '+')"></TD>
</TR>                                
<TR>                                
<td align="center"><input type="button" value="   (    " ONCLICK="addChar(this.form.display, '(')"></TD>
<td align="center"><input type="button" value="cos" ONCLICK="if (checkNum(this.form.display.value)) { cos(this.form) }"></TD>
<td align="center"><input type="button" value=" sin " ONCLICK="if (checkNum(this.form.display.value)) { sin(this.form) }"></TD>
<td align="center"><input type="button" value=" tan" ONCLICK="if (checkNum(this.form.display.value)) { tan(this.form) }"></TD>
<td align="center"><input type="button" value="   )   " ONCLICK="addChar(this.form.display, ')')"></TD>
</TR>                              

</table>
</form>
</body>
</html>

How to set Password for Google

In this tutorial we are going to learn how to disable text box in 3 failure login attempts. The user is only given 3 chances to enter the correct username and password. Once is correct it will redirect to google index page
Username: test
Password: test
You can modify the username and password inside the script.
You need internet connection for this




<!DOCTYPE html>
<html>
<head>
<style>
table{ 
      margin:auto;
    }
input{
      border:1px solid #888;
      padding:5px;
    }
</style>
</head>
<body>
<script type = "text/javascript">

var count = 2;
function validate() {
var un = document.myform.username.value;
var pw = document.myform.pword.value;
var valid = false;

var unArray = ["admin", "test", "sample"];  
var pwArray = ["admin", "test", "sample"]; 

for (var i=0; i <unArray.length; i++) {
if ((un == unArray[i]) && (pw == pwArray[i])) {
valid = true;
break;
}
}

if (valid) {
alert ("Login Successfully!");
window.location = "http://www.google.com";
return false;
}

var t = " tries";
if (count == 1) {t = " try"}

if (count >= 1) {
alert ("Invalid Username or Password.  You have " + count + t + " left.");
document.myform.username.value = "";
document.myform.pword.value = "";
setTimeout("document.myform.username.focus()", 25);
setTimeout("document.myform.username.select()", 25);
count --;
}

else {
alert ("Still incorrect! You have no more tries left!");
document.myform.username.value = "No more tries allowed!";
document.myform.pword.value = "";
document.myform.username.disabled = true;
document.myform.pword.disabled = true;
return false;
}

}

</script>
<br><br><br><br>
<br><br><br><br>
<br><br>
<table cellpadding="5">
<form name = "myform">
<tr>
<td><label>Username: </label></td><td> <input type="text" name="username"></td>
</tr>
<tr>
<td><label>Password: </label></td><td> <input type="password" name="pword"></td>
</tr>
<tr>
<td></td><td><input type="button" value="Log In" name="Submit" onclick= "validate()"></td>
</tr>
</form>
</table>
</body>

</html>


Monday, January 18, 2016

Google Hummingbird Update and How It Affects SEO



by Kerry Butters  SEO 
It’s been a busy few years for the engineers at Google; not only have we had the much-discussed Penguin and Panda updates, but last year brought us the biggest update we’ve seen since 2001. So what does Hummingbird mean to SEO? Why did it come about and is it likely to hit your site as hard as the Penguin/Panda updates did.

It’s pretty safe to say that if you haven’t been affected by the update already, then you can breathe easily, so long as you stick to the rules. Hummingbird was released very quietly in August 2013 and most site owners didn’t notice a difference.


What Hummingbird is all About

Whilst Panda and Penguin were changes to a part of the old algorithm, Hummingbird is the new algorithm, which is made up of more than 200 factors that can affect ranking and search. The biggest changes were made with a sharp eye on mobile and that’s not surprising given the explosion of the mobile market in recent years.
This brought about ‘conversational search’ being added to the Hummingbird algorithm, which is designed to focus on the meaning of a phrase, rather than individual keywords. This is because many people now use voice when searching on mobile, rather than typing – let’s face it, it’s a lot easier to say something than to type on a soft keyboard.
So instead of working in such a way that looks for individual words, Hummingbird works in such a way that it can better understand a question, such as “where can I find a chemist in Birmingham”. It looks for the meaning behind the words, rather than just at the words themselves and it looks at the entire phrase to decipher that meaning.


What does it mean for SEO?

Not much really, unless you’re bending or breaking the rules, a white hat approach will mean that SEO shouldn’t be affected. Despite the tired old cries of “SEO is Dead!” doing the usual rounds online, if you’re a publisher of quality content then Hummingbird will make no difference. For SEO professionals, it’s actually a good thing as it helps to weed out the black hats that make outrageous (and unfounded) claims that they can get your site on page one of Google search results within a week.
For content publishers and writers, Hummingbird is also a good thing, so long as the content being produced is worthwhile. The algorithm is intended to help get rid of irrelevant content and spam and put more weight on industry thought leaders and influencers.
The authorship program goes hand-in-hand with this as it allows Google to find authors that produce high-quality content and rely on them to be ‘trusted’ authors.
Link building practices are also affected, as the algorithm seeks to find dodgy practices (such as poor quality guest blogging) by evaluating inbound links in a more complex manner.


Why Bring in Hummingbird

Aside from making search more intuitive and developing its Knowledge Graph further, Google is attempting to make the web a better, more useful place. Slowly but surely, content mills, link wheels and similar black hat search-enhancing tactics are going away. For those of us that remember the days when a search often brought back results that took you to a page full of useless links, this is a big step in the direction of making the net what it was – somewhere you could do a little research and find out all kinds of fantastic facts without having to dig your way through a pile full of dross first.
Of course, this has been happening for a few years now, Hummingbird isn’t an instant fix of all the things that have been wrong, it’s been slowly taking place for ages.
Take a look at the image above from Google and you can see that this has been an evolving process for many years – even voice search was introduced in late 2008, it’s not a new idea that’s been plonked into Hummingbird.


Long-tail Keywords

As Hummingbird uses phrases, rather than keywords, the use of long-tail keywords are likely to become more important than ever in SEO. ‘How to’ content is also very valuable if you consider how many people across the world may use the phrase “How can I learn” or similar.
Long-tail keywords are basically a phrase which are generally used for content in order to get picked up in search and this also isn’t a new practice.

Again, it’s all about the phrases, so if you have a site that sells your services as a Spanish teacher for example, you would have various phrases littered around the site such as ‘learn how to speak Spanish’ and ‘experienced Spanish teacher’ rather than just having ‘speak Spanish’ or ‘learn Spanish’ stuffed into as many places as possible.
Hummingbird is more intelligent than the last algorithm engine, so it recognises keyword stuffing and issues penalties accordingly.
Take a look at the ‘periodic table below from searchengineland for a great overview of ‘SEO Success Factors’ and how many factors make up great SEO. You’ll find that Hummingbird and all of it parts is made up of many, many things that can affect ranking.




All of these work together in order to return the best possible results to the person doing the searching and if you can get the balance right, you’re in business. It’s not easy to compete online, but Hummingbird is intended to make sure that those who do it right get their rewards. That means that for any site owner, looking at the bigger picture is necessary. It’s no longer enough to have the office junior slap up the odd, badly-written blog anymore – if you want decent content then you have to pay for it.

It’s also not enough to tinker with the SEO yourself or allow someone making grandiose claims to do it for you. Today’s site owners, content producers, SEO professionals and publishers have to concentrate on one thing – quality and integrity in everything that they do online.

Friday, January 8, 2016

Implementation of Polymorphism


Polymorphism is derived from two Greek words. Poly (meaning many) and morph (meaning forms). Polymorphism means many forms. In C you have two methods with the same name that have different function signatures and hence by passing the correct function signature you can invoke the correct method.

This is how polymorphism is achieved in languages like C where in a function sum(int, int) differs from sum(float, float). Therefore the method sum() has many forms depending on the parameters being passed to it.

The meaning with Object Oriented languages changes. With Object Oriented language polymorphism happens:

When the decision to invoke a function call is made by inspecting the object at runtime it is called Polymorphism


PHP 5 Polymorphism


Since PHP 5 introduces the concept of Type Hinting, polymorphism is possible with class methods. The basis of polymorphism is Inheritance and overridden methods.

Lets look at an example:
 
class BaseClass {
   public function myMethod() 
    {
      echo "BaseClass method called";
    }
}
 
class DerivedClass extends BaseClass 
    {
   public function myMethod() {
      echo "DerivedClass method called";
    }
}
 
function processClass(BaseClass $a) {
   $a->myMethod();
}
 
$a = new DerivedClass();
processClass($a);


In this code object $a of class DerievedClass is executed and passed to the processClass() method. The parameter accepted in processClass() is that of BaseClass, within in processClass() the method myMethod() is being called Since the method is being called on the class variable of BaseClass. 






















Monday, December 14, 2015

8 Essential SEO Techniques for New Website

These eight essential SEO techniques will help you build more traffic to your website. They’re the basic ways to help the search engines notice your website so you can be ranked higher for more keywords. They don’t involve playing to every single change a search engine makes. Instead, they’re time-tested, proven ways to steadily gain ranking with search engines so your site gets noticed!

1. Choose the right keywords

Choosing the right keywords is essential to successfully building a website! If you don’t have the keywords people are searching for, how will anyone find your site through a search engine?
Keyword selection is probably the most vital of our eight essential SEO techniques. The key here is to choose keywords that people search for often but that aren’t too competitive. If there are thousands of other websites using the exact keywords you use, you just won’t be able to keep up with the competition. Luckily, with the right tools, such as the Google Keyword Search tool, finding keywords that your customers are using and your competitors aren’t isn’t that difficult.

2. Get keyword density right

Keyword density is how often a keyword appears on a page compared to the total number of words on that page. We normally talk about it in percentages. For example, 2% density means you’ve got your keyword appearing twice for every hundred words on the page.
The density that different search engines look for can vary a little bit, but not much. Basically, a search engine wants to know that your page is really centred on your chosen keyword. On the other hand, stuffing your pages with keywords at the cost of great content will turn search engines off to your website.

3. Use keywords in hyperlinks

This is perhaps one of the most overlooked of our eight essential SEO techniques. Search engines really like it though, when you have a hyperlink embedded in the keyword you’re using. The link can be to another page on your website or even to an external website, as long as the link is relevant to where your visitor will end up.

4. Get meta data right

Meta data used to be what you’d find on the card indexes of libraries. Now, it’s the data that describes the data on a web page. It sounds confusing, but it’s really not. Your meta data is your page title, keywords and description. Meta data is what the search engines use to learn what they should find in the content of a web page. If your meta data matches up to your on-page content, the search engine will like what it finds. So often, the meta data isn’t filled in for websites, so make sure you speak to your web developer or webmaster about completing it.

5. Make your navigation clean

It’s vital that your website be easy for both the search engine spiders and humans to navigate. Of the eight essential SEO techniques we’ve listed here, this one probably takes the most planning. Before you even start building your website, you need to know how different pages will link into one another.
You should have a clean, simple way for visitors to get from one page to another. The bonus to having clean navigation is that once visitors find your website, they’re more likely to stick around for longer. This gets you more business and better rankings with the search engines.

6. Use internal links

When you’re thinking about navigation, don’t limit yourself to a navigation bar and links at the bottom of most pages. Instead, also think about linking internally between pages. Using in-text links is a great way to do this. If your website has lots of interesting content, your visitors are going to want to read what you’ve got to say on other parts of your website. Linking between pages is a really easy way to help visitors and the search engines find your other interesting content. Plus if you use a keyword as your hyperlink text, even better.

7. Have a clear, comprehensive sitemap

Chances are your human visitors aren’t going to use a sitemap to get around. Search engine spiders will, though. In fact, in order to get your website noticed by search engines at all, you’ll have to submit your sitemap to them. Having a clear sitemap will mean you rank better with all the major search engines.

8. Get credible websites to link to you

Of the eight essential SEO techniques, this is probably the most time consuming. Finding quality websites and developing a relationship with them in order to get them to link to you takes time and lots of effort, but is essential in order to increase your rankings in the search engines.

The bottom line

The bottom line is that you are capable of incorporating all of these eight essential SEO techniques into your website. If you can use these techniques as you’re creating and developing your website, you’ll increase your ranking in the search engines, get more traffic and convert more business.