JSONP is JQuery(JavaScript) method used to request data from a server in a different domain, something prohibited by typical web browsers because of the same-origin policy. JSONP takes advantage of the fact that browsers do not enforce the same-origin policy on<script> tags. JSONP is a viable solution for cross-domain Ajax. JSONP does not work with …
Category: Ubuntu
Permanent link to this article: https://blog.openshell.in/2014/06/how-to-use-jsonp-method-in-jquery/
May 01
How to declare dependencies and use composer in php
Using Composer: We will now use Composer to install the dependencies of the project. To use Composer in your project, you’ll need one file: composer.json. In this file you will describe the dependencies of your project. So let’s create the file: [code]vim composer.json[/code] Declaring Dependencies: Once you created a composer.json file within your project which …
Permanent link to this article: https://blog.openshell.in/2014/05/how-to-declare-dependencies-and-use-composer-in-php/
Apr 30
How To Install and Use Composer on Ubuntu
Introduction Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. Dependency management Composer is not a package manager. Yes, it deals with “packages” or libraries, but it manages them on a per-project basis, installing …
Permanent link to this article: https://blog.openshell.in/2014/04/how-to-install-and-use-composer-on-ubuntu/
Mar 02
Rails 3 GEM to handling where the error has occurred
It’s Better Errors GEM. It will handle the error and we can see exactly where the error has occurred in development machine. GITHUB : https://github.com/charliesome/better_errors Steps to configure in our rails3 application 1. Install the gem install airbrake -v ‘3.1.8’ 2. In your Gemfile add group :development do gem “better_errors” end If you would like …
Permanent link to this article: https://blog.openshell.in/2014/03/rails-3-better-errors-gem-handling-where-the-error-has-occurred/
Mar 02
How to download file from remote URL in PHP
There are many ways in PHP to download file from the remote server. We can use php functions like copy, file_get_content, fopen, fsockopen & Curl to download the remote files. For your reference here I have explained about copy, fopen and Curl method, I have choosen these methods based on simplify and easily everyone can …
Permanent link to this article: https://blog.openshell.in/2014/03/how-to-download-file-from-remote-url-in-php/
Jan 22
Use Number() instead of parseInt() in javascript
Recently I came across the issue in converting string to integer in Javascript(JS). I was used parseInt() method to convert string value into integer value. unfortunately, I was faced issue in chrome browser but all other browsers like firefox, ie and safari are worked fine. Its too hard time for me to find out the …
Permanent link to this article: https://blog.openshell.in/2014/01/use-number-instead-of-parseint-in-javascript/
Jan 03
Serailization & Unserialization in PHP
Serialization which help us to store or transport PHP data structure such as an array or object. All the storage meduim or database can store String type. It will generates a storable representation of a value. This is useful for storing or passing PHP values around without losing their type and structure. Essentially, it takes a …
Permanent link to this article: https://blog.openshell.in/2014/01/serailization-unserialization-in-php/
Nov 14
How to use serialized object in Active Record using Rails?
Serializing Object Will help us to store multiple column values in single Database column and even making processing using that column simple. It helps to extended the table without adding new column in table. Because we can store multiple column values in single column as Hash value. So, It reduce the difficulty of retriving and …
Permanent link to this article: https://blog.openshell.in/2013/11/how-to-use-serialized-object-in-active-record-using-rails/
Oct 23
Stripe Payment Gateway Implementation
Stripe Payment Gateway Implementation: Steps to Implement: Download the stripe package(stripe). Extract that into the web accessible folder. Create an account in stripe using this url: https://manage.stripe.com/login After Created the account get the test secret key and test publishable key from your stripe account using this url: https://manage.stripe.com/account/apikeys Now in config.php file change the “testSecretKey” …
Permanent link to this article: https://blog.openshell.in/2013/10/stripe-payment-gateway-implementation/
Oct 18
How to retrieve the last record in each group using mysql
In single SQL query itself we can retrieve the last record in each group. It will help us to perform action better, faster and simpler. In this post I will explain about you how to do it. Here is my table structure for your reference. [sql] desc post_status; +—————-+————-+——+—–+———+—————-+ | Field | Type | Null …
Permanent link to this article: https://blog.openshell.in/2013/10/how-to-retrieve-the-last-record-in-each-group-using-mysql/