Posts

Showing posts from July, 2013

New Hottest Web Design Trends

It can be very challenging for you as a designer to keep up with the ever-changing trends in web designing if you don’t upgrade your skills. The best possible way to enrich the knowledge base is by subscribing to the latest innovations and practicing them on your own. Here we will discuss about some of the new and hottest web designing trends, which you can use to hone your designing skills. Single Page Designing The flying visitors of this age get frustrated on navigating around different pages and going through loads of sections to gather what they need. So, the new method of single page website design is now being practiced widely. In this, the entire content is arranged in one single page, which is split horizontally with easy navigation and pointer options. This makes browsing through the website easier without requiring moving back and forth between pages. Photo Background A well-placed photo or picture can replace thousand words. This is a highly creative approach used by many d

How to add Syntax Highlighter in blogger blog

It was confusing to me when I tried to add Syntax Highlighter in my blog because I failed most of the time. Adding syntax highlighter in blogger blog is not really a very awful task but it seems to be awful for you when you follow incomplete tutorial. I got rid of this problem by following a simple tutorial. In this portion I will try to provide you proper guideline to add syntax highlighter in your blogger blog. To add html, css, java or any other code snippet in the post, bloggers like to use syntax highlighter. There's lot of syntax highlighter but I like this following syntax highlighter most because it is really easy to use in blogger post.  Steps to add syntax highlighter in your blogger post It is really an easy task. We can follow some steps before playing with blogger syntax highlighter. At first take a backup for your blogger template. It is important. If unwanted error occurs after applying syntax highlighter code, you can go back to the original template. Then go to t

CakePHP: URL Rewriting

Image
What is Mod_Rewrite? Simply put, mod_rewrite is an Apache module that let’s you rewrite urls based on rules you define. Other common uses of mod_rewrite:  • All traffic from multiple domain names can be directed to one domain. • Traffic from specific websites can be blocked. • You can block spammy searchbots and offline browsers from spidering your site and eating your bandwidth. • Mask file extensions can be done. • Image hotlinking (means ,other web pages that links to images that resides on your server) can be Prevented.  By using the overwrite rule and modifying the htacess file of the root folder CakePHP URLs can be made SEO friendly as shown below. This is an example of URL Rewrites for the site that has n level menus,  <IfModule mod_rewrite.c>    RewriteEngine on    RewriteRule ^([^/]+html)$ app/webroot/controller_name/function_name/$1 [L]    RewriteRule ^[^/]+/([^/]+html)$ app/webroot/controller_name/function_name/$1 [L]    RewriteRule ^[^/]+/[^/]+/([^/]+html)$ app/w

URL rewriting is not properly configured on your server.

Image
You are reading this post that means you are facing the error of “ URL rewriting". Without solving this error ,you cant go ahead. To solve this issue you need to make some changes in the httpd.conf file of the apache server. If you are using wamp server,you can access the httpd.conf file as bellow. If you are using XAMPP server then, you can found httpd.conf file in the xampp/apache/conf/httpd.conf.For any other apache based server config file can be found in“apache/conf/httpd.conf”. Once you open the config file,you can find a line as “#LoadModule rewrite_module modules/mod_rewrite.so” .See the image bellow. Just remove the “#” in that line in the httpd.conf file. then save & restart the Apache Server. The problem must be solved. If not then make sure that the code written in apache/conf/extra/httpd-vhosts.conf file is like as the code given below. <VirtualHost *:80>     ServerAdmin admin@localhost     DocumentRoot "c:/wamp/www/"     ServerName localhost <

How to install CakePHP on localhost Wamp

Image
In this post we will learn how to install & configure the CakePHP on localhost Wamp. I am using  Wamp Server as the web server but, it will remain same in XAMPP & many other Apache Based web servers as well because all those are build based on apache core. So, the configurations are mostly same as Wamp Server. So what you need to do is just follow the steps given below in order to install CakePHP on localhost. Step 1 : Go to CakePHP Official Website and Download updated Cake PHP and unzip the file. Step 2 :  Copy the downloaded folder in wamp folder : C->www->wamp->(cakefolder) Step 3 : Now Go to (cakefolder)->app->Config->database.php.defult and rename it as database.php.Now you need to make required changes in it.After the changes, the configuration setting look like bellow. class DATABASE_CONFIG {     public $default = array(         'datasource' => 'Database/Mysql',         'persistent' => false,         'host' =&g

MVC architecture of CakePHP

Image
CakePHP follows the MVC software design pattern. MVC Programming pattern will separate the application into three parts: - Model layer - View layer - Controller layer The Model layer The Model layer represents one part of the application that implements the business logic. Models are representations of database tables. They can connect to database, query it and save data to the database. In order to work with MVC its very important to note that there must be no interaction between models and views.All the logic will be handled by controllers. It’s responsible for fetching data and then after converting them into meaningful concepts for the application by processing,validating, associating or other similar tasks related to handling data. MVC Request The View layer You can describe Views as template files that present their content to the user.variables, arrays and objects that are used in views are registered through a controller.A presentation of the modeled data will be rendered b

Introduction to CakePHP

Image
CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, deploying, and maintaining applications. It uses MVC software design pattern.The CakePHP framework also provides valuable reusable libraries for dealing with common tasks. Using CakePHP’s scaffolding feature, it’s possible to build a prototype application very quickly, using a less amount of code and with a large number of helper classes available to extend and customize your application.CakePHP is being actively developed, and is backed by extensive documentation and has a lively support community. Features of CakePHP Although CakePHP Development has multiple features supporting it to be chosen as the most preferable framework for developing complex web applications, we put in highlights a few convincing ones.      (1)  It is Compatible with both PHP4 and PHP5.     (2)  It provides DBMS support for rapid and bendable templating.     (3)  Ease of plug-in support.     (4)  Data abs

Slides Show: A new face of Home Page

Image
Easing slider is one of the most fantastic Word Press slideshow plug-in’s, enabling the users to create stunning slide shows without messing around with the codes, this plud-in has recently picked up much popularity amongst the online users. Its user-friendly interface facilitates the users to generate unlimited slideshows, and entails the users to attach numerous images, videos, links, and buttons, to each slide show. Users can link the slide shows with various web pages for their easy access. The responsive nature of the Easing slider allows the slide shows, to smoothly fit in with various screens of smart phones, and tablets.    To install the Easing sliders Pro, the user can simply browse through the Word Press online storehouse, or various open markets of applications to download. However, before downloading, users, have to check the minimum requirements i.e. Word Press should to be of a version similar to 3.5, and easily supports PHP 5.2 and JQuery 1.4.2. The users can easily l

Monads

Monads All the code for this post are available here. https://github.com/santoshrajan/monadjs Consider the map functor from the last chapter. We could use map to iterate over two arrays adding each element of the first to the second. var result = [1, 2].map(function(i) { return [3, 4].map(function(j) { return i + j }) }) console.log(result) ==>> [ [ 4, 5 ], [ 5, 6 ] ] The type signature of the inner function is f: int -> int and the type signature of the inner map is map: [int] -> [int] The type signature of the outer function is f: int -> [int] and the type signature of the outer map is map: [int] -> [[int]] This is the right behaviour you would expect from a functor. But this is not what we want. We want the result to be flattened like below. [ 4, 5, 5, 6 ] Array Monad For that to happen, the type signature of a functor should always be restricted to F: [int] -> [int] But functors do not place any such restriction. But mon

Password Strength Checker using jQuery

Image
What is Password Strength? In general you can say that it's a measurement of how effective a password is.I mean how its difficult for anyone to guess it and brute-force attacks.In general the strength of a password is depended on  its length, unpredictability, and complexity. You might have seen the password strength checker while filling any online form like Gmail Registration Form.Right hand side of the password field you can see the indicator of its strength.Some very complex algorithms are used to measure the strength of the password. Of course,i am not going to teach you that algorithm, but i’ll teach you how to make such  password strength checker using jQuery. In this demo,one javascript “password_strenght.js” file is used containing checks performed on the value of the password field .Checks that are considered to calculate the strength of the password are as follow. (1) Length of password (2) Uppercase (3) Lowercase (4) Numbers (5) Special characters On the basis of the ch

Functors

Consider the function below. function plus1(value) { return value + 1 } It is just a function that takes an integer and adds one to it. Similarly we could could have another function plus2. We will use these functions later. function plus2(value) { return value + 2 } And we could write a generalised function to use any of these functions as and when required. function F(value, fn) { return fn(value) } F(1, plus1) ==>> 2 This function will work fine as long as the value passed is an integer. Try an array. F([1, 2, 3], plus1) ==>> '1,2,31' Ouch. We took an array of integers, added an integer and got back a string! Not only did it do the wrong thing, we ended up with a string having started with an array. In other words our program also trashed the structure of the input. We want F to do the "right thing". The right thing is to "maintain structure" through out the operation. So what do we mean by "maintain

WordPress: The New Great Option for Local Businesses

WordPress is the best CMS present on the internet right now and it also provides its users with facilities of a website which is cost effective, user friendly, and very easy to maintain. WE also know that there are a number of companies and small organizations and firms which have started using this platform to do deal in their daily work and help their businesses grow. This article deals with how local businesses benefit using WordPress.   There are a number of benefits which WordPress provides to its users who use this platform as a local business website. Right from the fact that a high number of people will visit your site to the fact that a WordPress site can be easily created into an eCommerce site using plugins, everything points out to the fact that its is a good idea for any local business to flourish. So, if you have a brand which is not national and you are looking for a website platform, WordPress is the place to be. Read on to know the advantages. User- Friendly This is

Word Counter in javascript

Image
Before writing this post,when i have searched for the word counter in javascript i found so many scripts that are not up to the mark.The script was like below. function countwords(textarea){  var words=textarea.split(" ");  alert(words.length+" words"); } This script is wrong.You are having question why its wrong?.Because splitting with space is used in the above script.Its not the only thing to separate the words. A newline will be inserted if there is Return at the end of the word, which won't be counted as a word separator by the above code.commas or other punctuations  which are not followed by a space are also not handled in the above script.Even if you leave a space at the end of the word it will also counted as a word that is totally wrong. So what could be the right solution for this case? As a solution, in the following script we are using regular expression.The pattern '\w+'used here will match a srting of characters of the word.Using this scri

Login Form Using Ajax and jQuery

Image
Hi friends, In the last post labeled under ajax category you learnt how to make user poll script using ajax and php.In this post we'll be creating an ajax login form using jquery and php. This post contains five simple steps which are as below. First of all we are creating database that contains the data of the registered users.To create the database just copy and paste the code given below in the step:1 Step:1 Create table - registered_users CREATE TABLE IF NOT EXISTS `registered_users`( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL, `password` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) Download Source Now we have database of the users.Its time to create a login form through which user can login.Create file named index.php and copy paste the code of step:2. Step:2 Create file - index.php In index.php file we'll have the small login form through which user can enter Username and Password.Entered data will be checked against the correct credentials for the

How to calculate total row heights of listView in android?

Developing apps for mobile devices come fun when you get rid of those problems which are not so easy at all. Your apps development are getting stuck but you are passionate guys who love to write code for android devices. Few days ago I got same problem that was so painful to me as well as to my clients. As I am not good writer but share it to you and helping other programmers, I like to solve this issue through hands on code sample. Along this discussion I will help you to calculate total row heights of android listview .  What was my problems:  My problem was to add comments under VideoView where A scrollview has covered videoview and commentsview. Actually commentsview was a listview. I had to calculate the total heights of listview rows.  Mostly it calculated the accurate height of the listview but when comments content is too much then it cannot provide you the actual height.  Way to calculate total row heights of listView in android:  To solve this problem, I am trying to write tw