Software / Technology Tips

How to create custom model validator in Rails

Rails ships with nice collection of model validations. By default rails facilitizes our application with validations like presence, uniquiness, format etc etc. In most applications default supplied validations are enough to serve our purpose. But in few cases we are required to add few custom validations to our rails applications. Problem statement : Let’s assume,…

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

Why can you execute Javascript code from URL bar of a browser ?

Lately, I have come across a lot of technical write-ups which demonstrate how to perform some operations by typing Javascript code, right in the URL bar. These are implementations of Javascript protocol but most authors have not used the term which makes the title sound ambigous. The use of the term, Javascript protocol can help…

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

Move an object to left, right, up, down on button click using Lua

In some instances we need to move our object to various direction as per the rule in game app. So here is some basic code to move an object to right, left, up and down. Code Block : --Make a box local box = display.newRect(200, 250, 100, 100) --Set the color of the box box:setFillColor(204,…

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

Implementing HSTS (HTTP Srict Transport Security)

Sending information over a HTTP connection was always a risky proposition, at least ever since cookies were introduced, but the recent release of Firesheep has caused bit of an alarm. During a normal HTTP session, anyone (with skills) who can intercept the data packets of a victim in the network may end up stealing the…

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

Fetching data from Accounts in Quotes using jQuery and REST Service

Goal To create a new Quote. Choose the Potential Customer, which is none other than an Account. Get the address associated with the account and display in the Bill to and Ship to address. Step 1 : Navigate to Settings >> System Customization >> Customize the System >> Web Resources Step 2 : Create a…

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

Use of Custom ConfigurationVariables

Instead of using hard-coded values in the application, better to keep those in the configuration file and while needed just parse it into an array and use it in your application. Here I am going to discuss how to create a custom configuration file and load it as per the environment(developement, testing, production) in ror(Rails3).…

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

Tag mapping in ASP.NET

Yesterday while I was going through the web config, I came across a section which tempted me to explore it further . The section is ” ” inside , inside . Now allow me share, what I learnt. I think its little known and rarely used feature of ASP.NET. Rarely used because there’s only a…

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

Using AJAX with jQuery

Ajax is most easy thing with jQuery. jQuery has a number of beautiful functions to make easy stuff more easier and compelx stuff as simple as possible. .load() This function load a chunck of code dynamically into a page. $(“#button”).click(function(){ $(“#div”).load(“test.php”); }); $.post() &&  $.get() $.get(url, , , ) or $.post(url, , , ) url: (String) The URL…

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

Workaround for ASP.NET AjaxControlToolkit Combo Box issue

Problem ComboBox is one of the exotic controls present in AjaxControlToolkit . But I have come across some problems while using it. They are : After clearing all the items of Combo Box , the selected item does not get cleared , even after post back. Sometimes after binding the data , Combo box is…

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

Table listener in Corona

Introduction : Table listener is the one of the way to define listener for any display object in corona. Description : To describe table listener, lets have a window with a rectangle box and will add table listener with that box to show message on console. CODE BLOCK : main.lua local myBox = display.newRect( 100,…

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