How to get your Limesurvey updated to latest version.

  • If  you are using old version of Limesurvey then  when you get logged into your limesurvey, you will get a message “Update available: version + (build no.)” on top right corner in bright red color.
  • If you don’t get any message then go to  limesurvey/version.php and check the build number and the current version you are using.
  • There are two methods to get your version updated : “manually” or by using “3-Click Comfort Update“.
  • If you want to update it manually then go to the following link :

http://docs.limesurvey.org/Upgrading+from+a+previous+version&structure=English+Instructions+for+LimeSurvey

  • Download the latest version of limesurvey.
  • If you want to go with 3-Click Comfort update then follow the below given procedure:

Click on the message ” Update avialable: version + (build no.)” as shown below:

It will ask you the method you want to use for update shown here :

step

Click on the 3-click Comfort Update and it will ask you about a limesurvey update key .

Click on the update key button, it will display update key is valid.Then click on the “Proceed to step 2” button.

After that it will ask to give a write permissions to a long list of files. Use following command to give write

and  execute permissions to your whole Limesurvey folder :

$ chmod +wx  foldername

Replace the /limesurvey/scripts/survey_runtime.js file with the latest survey_runtime.js file.

Then click on the “proceed to step3” buton.

It will create the Database and file back up. you can check it at limesurvey/tmp/ filename.

Then click on the “procced to step 4 button“.

Your limesurvey is up to date now . You can check it from limesurvey/version.php file .There will be latest version and build no. written in the file.

Thats all 🙂

 

 

Advertisements

How to create LaTeX Input files ?

LATEX input files can be created with any text  editor . It contains the LATEX commands and the data which you want to add in your document.The input for LaTeX is a plain ASCII text file.The commands used in it tells LaTeX how to typeset the text.

A minimal example looks something like the following:

\documentclass{article}
\begin{document}
Hello I am Rimpy Garg.
\end{document}
It is a simple document file created in Latex . Extension of your latex file should be .tex .

To create the pdf of your file, go to terminal and run the following command :

$ pdflatex filename.tex

Pdf file has been created where you have placed your input file.

Example 2 :

\documentclass{article}
\begin{document}

This is my \emph{first} document prepared in \LaTeX{}.
\end{document}

“Whitespace” characters, such as blank or tab, are treated uniformly as “space” by  LaTeX.Several consecutive whitespace    characters are treated as one “space”.                                                          

Text from the input file :

It does not matter whether you
enter one or several             spaces
after a word.

Formatted output :

It does not matter whether you enter one or several spaces after a word.

Latex Commands :

A few commands MUST appear in every LaTeX input file in a certain order. They are:

\documentstyle{stylename}
\begin{document}
\end{document}

The documentstyle has a required argumentstylename to select an overall typesetting style for the document; the one you normally use isarticle(there are alsobook,report,letterandmemo). It also has an optional argument to select 11pt or 12pt normal type size (10pt is the default size).

Between the\documentstyleand\begin{document} commands you can place commands that will affect the environment of the entire document, such as changes to margin widths.

The actual text of your document and associated commands go between the\begin{document}and\end{document}commands.

LaTeX commands are case sensitive, and take one of the following two formats:

  • They start with a backslash \ and then have a name consisting of letters only. Command names are terminated by a space, a number or any other “non-letter”.
  • They consist of a backslash \ and exactly one non-letter.

Some commands need an argument, which has to be given between curly braces { } after the command name. Some commands support optional parameters, which are added after the command name in square brackets [ ]. The general syntax is:

\commandname[option1,option2,…]{argument1}{argument2}…


How to install LaTeX on Linux.

LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. LaTeX is the de-facto standard for the communication and publication of scientific documents. LaTeX is available as free software.

LaTeX was first released in 1985 by Leslie Lamport as an extension of TeX. Tex was developed by Donald E. Knuth. It was first released in 1978. LaTeX is used, as mentioned, earlier in academic environments for book publication and article publication. Not to go off-topic, but LaTeX is also used to create the formulas displayed on wikimedia applications such as Wikipedia! In addition to its ability to display formulas and beautifully created pages, LaTeX can do much more but that goes beyond the scope of this article.

Installation :

To install LaTeX on Debian (& Ubuntu) run the following commands:

# apt-get update

# apt-get install texlive texlive-base

If you want the full LaTeX package run :

# apt-get install texlive-full 

The latter command should be unnecessary, for the purposes 
of this article.However if you run into any issues,go back and
install the texlive-full package.
 

Validations in Limesurvey using Regular Expressions.

  • First of all create survey from ” create or import new survey” button and give proper settings from 5 tabs i.e. General, Presentation & Navigation , Publication & access control , Notification & Data management.
  • After saving the created survey , create groups for that survey .
  • Then start adding questions to each group that you have created.
  • To do the same , click on the “add new question to the group” button.
  • First of all, give code of the question.
  • Put Question .
  • Give help for the question (it is optional).
  • Set question type which is suitable for your question.
  • After that in validation box, give regular expression for your question.

For example : If you want to set a condition that participant should write their name with first letter capital  and if they don’t write it will not proceed further untill the answer is not given in a valid manner.For such condition you have to write the following regular expression in validation box :

                                                                ([A-Z]{1}[a-z]*)

In this way, you can set validation for each question by giving suitable regular expression.

 

How to view images without graphical environment ?

  • First of all install aview , for this type following command in terminal:

           sudo apt-get insall aview

aview:  It is a high quality ASCII art image viewer and video player aview is a high quality ASCII art image viewer and video player. It is especially useful with a text-based browser such as lynx, links or w3m. It supports the pnm, pgm, pbm and ppm image formats, as well as the FLI and FLC video formats. It also supports output via stdio, (n)curses and slang and even has support for gpm.

  • Install imagemagick by typing following command in terminal:

           sudo apt-get install imagemagick

ImageMagick: It  provides a suite of commandline utilities for creating, converting, editing, and displaying images.

  • When the above two packages are installed then type in terminal :

          $ asciiview filename.format

Example : asciiview rimpy.jpg

You will see the ASCII view of the image which you have given in the above command.

For example :

The graphical image is :

And the ASCII view is :

Thats all 🙂 Enjoy ASCII views .

Definition and Usage of Different functions in PHP MySQL.

mysql_connect() :

Connection to Mysql database can be established by using mysql_connect function.We can check the success of the function by checking the result. We will get a true result in case connection is established. Based on this we can even print a message saying the details. This function takes three parameters, first one is hostname then user-id and then password. We can give the port number along with the hostname also.

die() :

The die() function prints a message and exits the current script.This function is an alias of the exit() function.

Syntax :

die(message)

mysql_select_db:

The mysql_select_db() function sets the active MySQL database.

This function returns TRUE on success, or FALSE on failure.

Syntax:

mysql_select_db(database,connection)

mysql_query():

The mysql_query() function executes a query on a MySQL database.

This function returns the query handle for SELECT queries, TRUE/FALSE for other queries, or FALSE on failure.

Syntax:

mysql_query(query,connection)

mysql_fetch_array():

The mysql_fetch_array() function returns a row from a record set as an associative array and/or a numeric array.

This function gets a row from the mysql_query() function and returns an array on success, or FALSE on failure or when there are no more rows.

Syntax:

mysql_fetch_array(data,array_type)

 

How to set conditions on questions in limesurvey.

  • After adding questions to the survey select the question for which you want to set condition.

 

  • Click on the “set conditions for this question” button.

 

  • Select the question on which you want to set the condition.

 

  • Select the comparison operator.

  • Select the answer option of the question.

  • After that click on the add “condition button”.
  • Now the condition is applied on the question and if the condition met while completing the survey for that particular question then it will display the next question otherwise it will jump to the other question(according to your condition) and hide the in between questions.