Skip to main content

Posts

Remove or avoid %20 from url in PHP

Avoid the Empty spaces between the ( &name=%d ) variables. If you give empty space means  20% will occur in the url. ( &name=emptyspace%d )   Avoid Like this , It's cause the %20 in the url:  sprintf(' <a href="?page=list& name= %d " /> sharelist </a> ',$row['id'] );   Correct method :  sprintf(' <a href="?page=list& name=%d " /> sharelist </a>',$row['id'] );

Creating Custom directives in AngularJS with Example

Directive is a unique and powerful feature available only in Angular. Directive let you invent new html syntax, specific to your application. Directive can add:     1. Behaviors     2. Data binding to scope     3. Replace or to extend the Html element <html>     <head>         <title> Creating Custom directives in AngularJS </title>         <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>         <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular-route.min.js"></script>     </head>     <body ng-app=" docsSimpleDirective ">         <h1>  Creating Custom directives using AngularJS </h1>    ...

Simple RESTful Json parsing using AngularJs Tutorials - 1

<html ng-app id="customersApp">   <head>     <title>RESTful JSON Parsing using AngularJs Tutorials - 1</title>     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>     <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>     <script>      function CustomersController ($scope,$http){                                         $http.jsonp('http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callback=JSON_CALLBACK')         .success(function(data) {           $scope.value = data;    ...

Simple RESTful Json parsing using AngularJs Tutorials

REST mean Representational State Transfer <html ng-app id="customersApp">   <head>     <title>RESTful JSON Parsing using AngularJs Tutorials</title>     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>     <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>     <script>       function CustomersController ($scope, $http) {                               $http.get('http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts')         .success(function (data) {           console.log(data.found);        ...

Assign the value to the variable in ng-click using AngularJS

<html ng-app> <head>      <title>ActiveTuts - AngularJs Tutorials</title> <script type="text/javascript"     src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> </head>      <body>      <div ng-controller=" TodoCtrl ">           <h2>Show and Hide the text using AngualrJs</h2>        <div ng-controller="TodoCtrl">           <input type="button" value="Show" ng-click =" showText=true ">           <input type="button" value="Hide" ng-click =" showText=false ">           <br/><br/><br/>           <div ng-show=" showTex...

PG::DuplicateTable: ERROR: relation "taggings" already exists in Ruby on Rails

Error: PG::DuplicateTable: ERROR:  relation "taggings" already exists Solution : Already the table present in your database.But migration also trying to create a table in database.For this reason error occurred. So try to remove the table (taggings) from your database.   postgresql :     > DROP TABLE IF EXISTS taggings;   Rails console :     > ActiveRecord::Migration.drop_table(:taggings)

How to limit the number of displayed lines using CSS

<html>   <head>    <style>     . restrict-lines {        //max-height : 40px;   /* Display 2 lines */       max-height : 20px; /* Display one line */        overflow: hidden;     }   </style>  </head> <body> <h1>How to limit the number of displayed lines using CSS</h1> <div class=" restrict-lines "> Styles are normally saved in external .css files. External style sheets enable you to change the appearance and layout of all the pages in a Web site, just by editing one single file! <div> </body> </html>