Postgresql order by field

We have been using  PostgresSQL  in our new product Quiz Stack. Quiz Stack is a SAAS based  product. Which can  conduct,manage,analysis quizzes.We are using rails and postgresql as our backend.It’s subdomain app and hence we decide to use postgresql schema based approach for storing/querying data. While working on one of the feature It was needed to draw some random fixed questions for each user.So each user has different order of questions which  is maintain for each specific user. In Mysql it’s

Continue Reading

Searching Articles In Refinery Cms

I was working with Refinery cms  some times back.I want blogging facility to my CMS. Refinery has various engine which can easily plug and play including blogging. Blog Engine doesn’t facilitate with searching facility default,but it’s easy to add searching facility. Following Snippet will help you to do this. # app/models/refinery/blog/post.rb module Refinery module Blog class Post < ActiveRecord::Base ........ ....... class

Continue Reading

PubSub Chat Using HTML5 Web Socket and em-websocket

It’s 5 in the morning and i am tired and its a possibility that i may be writing a long post, Last night i asked my self what is it that i have learned in the las t couple of months and out of nothingness i rememberd a VIDEO CHAT APPLICATION which my friend Viren and I worked on. I thought it might be useful for some of you. When we started, we didnt have enough knowledge where to begin

Continue Reading

acts_as_flying_saucer on Rails 3.1 and Heroku

Just quick post how to use acts_as_flying_saucer with rails 3.1 and Heroku. I was testing acts_as_flying_saucer with rails 3.1.It is working fine so far. but when i have added external style sheet it was hanging on dev mode. and later on i figure out it is external style sheet causing an issue. So i precomplied css and then try to generate pdf it is working. Now it is time to test on heroku. I am using cedar stack and ruby

Continue Reading

Convert Speex file into MP3

Speex to Mp3 using ffmpeg and lame In one of the project we receive a speex(.spx) file from client and we have to play on browser as well as in local machine. So i am using ffmpeg and lame to do this job.It is 2 step process. Step 1 Speex(.spx) file first need to covert into wave(.wav) file using ffmpeg. Step 2 After wave(.wav) conversion convert into mp3 using lame library More info regarding lame you can find out here. You can also manipulate ffmpeg

Continue Reading

Dynamic Report In Ruby On Rails

In my recent work i have face some difficulties for generating different report for different organization or client using same application,because every client have their own reporting format. Like SAAS based application if it is generate some MIS report and if client require some more or less information depending upon his requirement we can give some editable facilities to edit and generate report. So to fulfill this kind of requirement user editable report which contains Markup + ruby code for

Continue Reading

Rchart Charts And Graphs For Ruby

Rchart is ruby port of the slick pChart charting library. Using Rchart we can develop various format of chart. Line Chart Cubic Curve Chart Bar Chart Pie Chart Filled Line Chart Stacked Bar Chart And many more ,You can checkout examples of rchart.Some of examples are listed below. Rchart gem require ruby-gd gem and GD library. To install rchart gem on ubuntu following packages needed. sudo apt-get install libgd-ruby sudo apt-get install libpng-dev sudo apt-get install libgd2-xpm-dev sudo gem install

Continue Reading

Convert open office document to another open office format

In many application we want to convert one office format to another office format e.g doc to PDF , doc to html etc.We can import/export document using OpenOffice easily,but this is manual way.But standalone/Web based application we have to automate this functionality. JODConverter,the Java OpenDocument Converter, It converts documents between different office formats using OpenOffice. JODConverter supports all conversion which is given by OpenOffice.More Info regarding format you can visit here. Now,JODConverter is a java library so it can be

Continue Reading

Site Footer