Today’s Work

Today I got to know about i.e Fedora (A linux Distro)

You can try different distros ISO from here

Apart from this, I am still in modifying my Web Octave Project.

Here is another tag for opening any link through HTML in different tab:

<a href=’ target=”_blank”>blog</a>

I had made a your_comments.php file having content:
<!DOCTYPE html>


This file is a part of Web Interface to Octave project.

 echo ‘<p class=”msg”>Your Comments are highly acknowledged’;
      echo ‘<form action=”index.php” method=”post”>
        <th><label for=”login”>Comment</label>
        <td><input type=”text” name=”login” id=”login”>
            <p> <input type=”submit” value=”Add Comment” >

 echo ‘<p class=”msg”>Please give your feedback’;


But in my project each tab opens up below in same page but comments is opening in different manner.

So now I want above file go in same previous manner. I also want Database Connectivity to play its role here.

Apart from this I got to know about Gsoc and talking about the fun part I really enjoyed Damanpreet’s di stories.







Some Modifications

Today I got to know much about Phone-Gap. I had discussed about it also in my blogs.

This is just a simple one but I didn’t know about the full form of pdf. So here it is Portable document format.

Apart from this I modified my Web Octave project.

  • Firstly I added my name and email instead of FIXME string by changing the config/config.php file.
  • I added my blogs link also by changing index.php file.
  •   You can add links using:

This adds a link named blog<a href=’‘>blog</a>.

  • You can give sudo permission to all the files in a single directory using:

sudo chmod -R 777 ./

  • I had made a new box for Comments in my project by adding a line in index.php file i.e:

echo ‘<li><a href=”?p=y#menus” ‘.$yc_tab_class_active.’>Comments</a>’;

  • Then I made a comments.php file and gave its address in index.php by making a new case in switch statement:

case ‘y’:
                 $content = new Comment($user);
                 $yc_tab_class_active = ‘ class=”active”‘;

  • For writing text in small size make use of div class i.e “fineprint”
  •  For changing colour and background image go to weboctave.css file:

background-color: white;

background-image: url(“images/gradback.png”);

I am still working for showing a separate block for comments in my project but facing some problem in it. Hopefully will publish regarding its success. 🙂

Octave installation on ubuntu 15.10

Octave is one of the free and open source software, can be used for numerical computations, image processing, data analysis and in many fields.

Firstly, Install octave using commands:

sudo apt-add-repository ppa:octave/stable

I here install PPA on my system to get updated version of octave.

To get more info related to pa you may refer my friend blog

Now Install the required dependencies using command:

sudo apt-get build-dep octave

Now Install Octave

sudo apt-get install octave

You can update the system also using: sudo apt-get update( But its not compulsory)

NOTE: Sometimes problem arise that octave is not opening. Permission denied. In this case give 777 permission to:


Now, just write octave on terminal and GUI will open up. To open it in CLI give command:


Done 🙂

Octave and some extra spice ;)

Octave-Forge is a collection of packages for GNU Octave, something similar to the Matlab toolboxes. It is developed in 1988 by James B. Rawlings and John W. Eaton at the University of Texas. John W. Eaton was the original author of Octave, starting full-time development in February 1992.

Its both CLI and GUI. GNU Octave basically came into play in 1997. It runs on many OS like Linux, MAC, Windows.

Origin of Octave?

Octave’s name has nothing to do with music. It’s named after Octave Levenspiel, a former professor of John who was famous for his ability to do quick calculations.

Who uses Octave?

Lots of people. It seems that universities use it for research and teaching, companies of all sizes for development, individuals for simple numerical purpose.

  • NASA use it to develop spacecraft systems.
  • Jaguar Racing use it to display and analyse data transmitted from their Formula 1 cars.
  • Sheffield University use it to develop software to recognise cancerous cells. It makes it very easy to write mathematical programs quickly, and display data in a wide range of different ways.

I had told about Web Octave in my previous blogs. Its now working upon php earlier  it was on CGI. Now, lets talk about some of the reasons to move on PHP instead of CGI.

  • PHP was specially designed for a websites, the facilities that web designers typically want in a scripting language are built into it.
  • Another convenience is its handling of form input. Take for example a form with a field like:
    <input type=text name="dateofbirth">

    You can immediately access that field with the $dateofbirth variable. No need to parse form inputs. All fields in the form are automatically converted to variables that you can access.

  • Accessing databases is just as easy. There are built-in facilities in PHP to access MySQL, Dbase, Oracle, InterBase, and so on (the list is very long). Need to MIME encode your message? There’s a function to do it for you too.

  • When PHP scripts runs,If in case  you get error then messages will be like pinpointing the offending lines in your code to help you locate the error. However, the message is sometimes a cryptic “parse error” or the like, so you still have to crack your head to figure out the problem. But at least you know where it occurred.With CGI scripts, an “Internal Server Error” could have arisen from any number of causes, from a syntax error to a simple case of forgetting to make the file executable or uploading it in text mode.

Now talking about some fun,

Yesterday the day starts with ravishing weather. I really enjoyed the rain but somewhere I want it to stop as its cancling my plan for a party. Somehow then I managed to reach there.

It was an awesome-blossom :p 😉 party. I really enjoyed there. Though I didn’t expected that as I am not that much familiar with all GD members. But now I guess being friendly is in blood of all GD members 🙂

Overall dancing, enjoying, being foody :p , and the Weather (everything else which I failed to mention here) and yeah sir presence made the party wonderful.

My internet was also not working properly yesterday. So I tried giving random commands and pressing tab on terminal. There I got to know about a monopoly game which is already there in ubuntu.

Just type: monop

Keep Rocking 😉

Working with Experimental server

Initial step is to type following command on terminal:


SSH: It is a Secure Socket Shell, is a network protocol that provides administrators with a secure way to access a remote computer.

Then type your password in the terminal for accessing exp. server

You have successfully entered in experimental server now 🙂

You can simply type ‘llcommand to list the detail information of files and folder of a current directory.

And can make a directory if needed using ‘mkdir’ command.

Lets talk about a new term “mosh”

MOSH:  It is a software tool used to connect from a client computer to a server over the Internet, to run a remote terminal. Mosh is similar to SSH with some additional feature.

You need to install it first on localhost(i.e your system)

sudo apt-get install mosh

Then type: mosh

“mosh helps in reconnecting to the Internet if in case your connection is slow”

And after entering password you will be directed to experimental server.

Then give command : tmux

tmux is basically a terminal multiplexer. It is used so that within
one terminal window we can open multiple windows and split-views. Each
view/pane will contain its own, independently running terminal
It is also used to set a shared terminal environment.

You can work over there.

Working with Weboctave in experimental server

How to Move data from your localhost to experimental server?

Give this command on your localhost terminal:

scp -r /home/deepti/Downloads/weboctave-0.1.0.tar.bz2

In Unix, you can use SCP (the scp command) to securely copy files and directories between remote hosts without starting an FTP session or logging into the remote systems explicitly. The scp command uses SSH to transfer data, so it requires a password.
 Now got to experimental,
Then you need to untar this file on exp. server using command:
tar xvfj weboctave-0.1.0.tar.bz2
Now repeat the same procedure of my ‘Introduction to Weboctave’ Blog.
You need to give permissions to all files.
Struggles: 1. I was not able to see anything on my url i.e url  for that I need to check apache error log file for which I need permissions to access that.
You need to go to /var/log/apache2
and then give command:
tail -f error.log
2. There I found few of my errors though some of them are silly
like, I had unknowingly written extra ‘i’ in config.php file.
3. I was getting parse php error ,it means there is a mistake related to php.
For that, I checked in weboctave/code/dbaccess.php file and there was a mistake that I had changed the name,user,password,host. But there is no need to change  anything in this file.
4. My main problem is related to Mysql.
In weboctave/setup/db.sql
delete this line:
USE your_database_name; or you can add your database name here.
5.Now you need to import your database into mysql
For that, go to db.sql location i.e till setup
and give the command:
mysql -u username -p databasename < filename
Now go to mysql command line and give command:
use deepti_w; (Which is the name of the Database)
Then to see the tables give the command,
show tables;
Then go to url and see beautifull plotted graphs over there.
“Extra things which I got to learn about while doing this project are: Vim editor, use of ctrl+D in mysql, use of ctrl+r and a little bit about php.”
Stay tuned 😉

Introduction to WebOctave

Weboctave is a package that provides functionality to run Octave on a web server. It provides support for same functionality as we run Octave in terminal. It provides a text input box on a web page in which we can type our octave commands. There is a ‘Submit to octave’ button pressing which the command executes and the output is returned below the input box. It also supports plotting graphs as it computes on server and return the image of that output graph on HTML page.

I downloaded weboctave-0.1.0 from weboctave

Extract the weboctave-0.1.0.tar.bz2 and it contains the README file which says the basic requirements:

1) WWW server with PHP>=5 support (ex. Apache)
2) SQL server (ex. MySQL, may be remote)
3) Octave>=3.0.0

I had used octave 4.0.0 version.

1) Unpack weboctave archive to a directory available to be accessed by WWW server.

I had extracted it in my web document root i.e. /var/www/html/

a. You can change permissions of directories “data”
and “Logs” to be writeable by WWW server.

sudo chown root:www-data data/ -R
sudo chown root:www-data Logs/ -R

2) Create database to be used by WebOctave.

To go to MYSQL command line give this command in terminal:

mysql -u root -p

“Here p is for password”

I created a database called “weboct” from MySQL command line as:

create database weboct;
3) Set database entries. Use "setup/db.sql" script, but edit it first
   to supply the database name.
   USE weboct;
4) Copy "config/config.php.example" to "config/config.php".
5) Edit "config/config.php" and set your preferences. 
   You have to set database data.
define("DB_HOST", "localhost");



 6) Make sure, that user that WWW server runs under (ex. www-data,...) has
 rwx rights to directories "data" and "Logs". Now your WebOctave
 environment is ready to work and should be accessible by any web browser.

Go to Web Browser and type localhost/weboctave. “Here, weboctave is the name of folder that’s placed in the web document root.”

Struggles: 1. I installed apache2 on my system but later on got to know that it does not contain php having version >=5 that is why I was not able to see text box for input in the interface,  Then I installed lampp server furthur which is having php in it.

sudo apt-get install lamp-server^

Then I checked the version of php using command,

php -version


  1. As I am not at all familiar with php, so was not able to judge the error in index.php file.Though it was the simplest i.e to add php in beginning tag of Show content part.

// load content

‘php’ written in red above was missing in that file and need to be written.

  1. Third problem which I faces was that when I press submit to octave button in interface of weboctave, its not showing the output i.e


To solve the first error , type in terminal

locate octave-cli

Find its path and give permissions. Then, rename octave to octave-gui and octave-cli to octave, so that by default octave-cli gets opened.

I had done it using my command i.e Example

mv octave octave-gui

After  this one only ‘dispatch’ error is left.

  1. User-defined functions
Functions may be created and managed by Functions tag. User may change old functions by Show
Functions subtag or define new with Define Function subtag.  Remember
to end function with "endfunction" command, not just "end".
New functions can also be defined in Commands tag directly in Octave
commands textbox. After clicking Submit to Octave they will be created
and may be used in the computation immediately. 
'Below is the funtion written'
function varargout = dispatch (varargin)
  varargout = cell (nargout, 1);
  [ varargout{:} ] = __dispatch__ (varargin{:});

varargout is an output variable in a function definition statement that allows the function to return any number of output arguments. Specify varargout using lowercase characters. When the function executes, varargout is a 1-by-N cell array, where N is the number of outputs requested after the explicitly declared outputs.

  This will result in beautiful plots on the browser.

You can try with different commands like
5. But still I was getting an error under this plotted graph i.e
warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: print.m: fig2dev binary is not available.
Some output formats are not available.
To solve this I gave commands:
sudo apt-get install epstool
sudo apt-get install transfig

Transfig/xfig is a package which contains fig2dev in it.
Problem solved :) :)

 What is EPS?

Encapsulated Postscript Vector graphics EPS is a file extension for a graphics file format. EPS stands for Encapsulated PostScript. An EPS file can contain text as well as graphics.

In addition, XFig is a drawing tool and Transfig has Utilities for converting XFig figure files.

If you want to have a trial before all this, you may visit over here