Software / Technology Tips

How to work with CSRF token while AJAX posting in Rails 3.1.

Hi Railities Here is a tip on how to work with CSRF token while ajax posting in rails 3.1. Query:- While we are doing AJAX post , automatically the current session destroys in rails 3, and the current user automatically logged out. Description for the query:- While creating a rails app it creats a CSRF(Cross…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

PHP function for Time Zone conversion

I recently found that PHP doesn’t have an inbuilt function for conversion of time/datebetween multiple time zones and neither could I find a  third-party function for the purpose.  However, I did find the PEAR class which has inbuilt support for multiple time-zones but it cannot be used by “including”  itself in the php page. PEAR…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Select the previous or next row of the grid on button click

Here is a simple tip on jqGrid. Sometimes in jqGrid, there might be a requirement that we need to select the previous or next row of the grid on button click. So, let’s say that you have selected the 2nd row and now you want to go 3rd row. So you can do that by…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Create Dynamic Objects at runtime using Reflection

Sometimes there is a need to create duplicateinstances of a same class ( objects with same values for the properties, and fields. ) When the class is of known type,  it’s easy to duplicate the instances. For e.g.: Consider a class called MyClassExample Class MyClassExample { public int NUMBER1 {get; set;} public int NUMBER2{get; set;}…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

How to exclude empty array (null value) while using String.Split Method

A string can be split into an array of strings using String.Split() method. It returns a string array that contains the substrings of this orignal string instance that are delimited by elements of a specified character. Let us suppose an user input field is filled in an irregular manner with more than a single space…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Call a Suitelet script from another Suitelet script

Generally, when we create a suitelet page, we add the script(a suitelet script which is going to be called from another suitelet) to the button of another suitelet page, by which clicking that button from the first suitelet, we can redirect to another suitelet page. But that will be possible, if either we don’t need…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Read and Write Data to Resource File Programmatically

Following are the step by step process to create, read and write into resource file using code. 1.Open a new project in c# . 2. Add a ResourceFile.resx in the project. 3. Add a new class and name it as ResourceCreator 4. Add these following namespaces: using System.Windows.Forms; using System.Resources; using System.Drawing; using System.IO; 5.Add…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Using jQuery AJAX Calls to send parameters securely

We are always providing all sorts of validations both at client and server side for security purposes. But some times a small mistake at client end during validation can pass wrong data to the server. So, there are some points that we need to keep in mind, when we pass additional parameters to the server…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

How to Import a XSL File inside a XML File

This tip describes, how you can use a XSL(extensible StyleSheet file) inside a XML file to generate a HTML format of that file thus making it more user-friendly. Let’s Convert this XML File to a Html Format Using XSL StyleSheet: HindolaRoad Dhenkanal BBSR OR 12345 IN/country> Miss Monalisha Nayak Polasara Berhampur BBSR OR 12345 IN/country>…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

What is cURL And How To Enable It For XAMPP?

But before that let me explain what cURL is for the benefit of the uninitiated (i was one of which, just a couple of months back!), cURL is a command line tool for transferring files with URL syntax. It supports a number of transfer protocols including HTTP and FTP. One of the most important usage of…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!