Category: DAILY DIARY

  • Doxygen – Documentation Builder

    Doxygen

    Generate documentation from source code

    Doxygen is the standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, Tcl, and to some extent D.

    Installation

    Run following command in terminal:

    $ sudo apt-get install doxygen

    Usage

    It’s very simple to use. Just type $ doxygen in terminal and you got its manual.

    For using comments format is very important. So before start check its comment instructions.

    To create documentation, move to folder where your source file exits through terminal and then type

    $ cd /path/to/your/project/source/
    $ doxygen -g [filename]

    You can fill any filename as your choice. Its configuration file and you can edit that according your project details like change project name in filename.(config file for doxygen)

    Then run

    $ doxygen [filename]

    By this your documentation will be generated. This will create 2 folders in your current directory.
    Folders:

    • html for html documentation open /path/to/project/source/html/index.html to check documentation.
    • latex for documentation using latex as pdf output. For that file run

      $ cd /path/to/your/project/source/latex
      $ make

    This will create refman.pdf file(check pdf file as file name may be changed in your case).

    That’s all. This is basic guide, you can do more by exploring filename.conf file.
    You can also add Special Commands in comments to make your documentation more descriptive.

    Hope this will help you.

  • Vim as your C/C++ IDE using c.vim Plugin

    c.vim : C/C++ IDE

    Features

    • Statement oriented editing of C / C++ programs.
    • Speed up writing new code considerably.
    • Write code und comments with a professional appearance from the beginning.
    • Use code snippets

    Download

    Dowload c.vim 6.0

    I have edited this plugin according to Doxygen comments for C/C++ Coding. I you want that then you can download it from here.

    Installation

    Open terminal and follow steps.

    $ mkdir ~/.vim

    $ cd ~/.vim

    $ unzip /path/to/c.vim.zip/file

    Enable the plugin by adding the following line in ~/.vimrc file.

    filetype plugin on

    Also check HotKeys for c.vim plugin

    Your plugin is installed. Have fun.

  • CGI Configuration on Apache

    There are 3 ways to use CGI.

    • First Way
      When we install Apache server, then /usr/lib/cgi-bin folder is automatically created. You can place c++ files in that folder and execute them on browser(localhost/cgi-bin/example).
    • Second Way
      You can also configure /var/www/cgi-bin for CGI programming.
    • Third Way
      You can also configure cgi-bin in home directory as /public_html/cgi-bin.

    According to me 3rd way is best as its in home directory and we don’t have to use sudo while compiling or creating any file.

    Steps to configure cgi-bin in public_html and public_html. Run following commands in terminal

    1. $ sudo a2enmod cgi
    2. $ sudo a2enmod cgid
    3. $ sudo a2enmod userdir
    4. $ sudo service apache2 restart
    5. $ mkdir ~/public_html
    6. $ cd ~/public_html
    7. $ mkdir cgi-bin
    8. $ cd /etc/apache2
    9. $ sudo vim sites-available/default
    10. Add following text in file:
       ScriptAlias /cgi-bin/ /home/*/public_html/cgi-bin/
       <Directory "/home/*/public_html/cgi-bin">
               AllowOverride None
               Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
               SetHandler cgi-script
               Order allow,deny
               Allow from all
       </Directory>
      
    11. $ sudo service apache2 restart
  • DAILY DIARY

    Welcome !

    Check out my diary. Hope you like it.


    Task 1   

    I did C++ programs using gcc compiler (g++). These programs are on Water Distribution System and Slot Machine. Its interesting job.


    Task 2 (12-05-2012) 

    Next I give presentation on above programs. Its was great experience. Seminar was good but I think Its was understood by few ones.


    Task 3 (14-05-2012)

    After that I started video chatting application which is good but Its not working well on LINUX systems. But their was a solution. I also tried that but its requires some configuration which may not available on some systems which lead to not working of OpenTok (Video chatting application). I also learn new things with this.


    15-05-2012

    Today, I am finding solution for Opentok to run it on LINUX systems. I surfed a lot.


    16-05-2012

    Yesterday’s problem was solved and I also implemented that and its working. I feel good. After that i have tried to access my page on localhost. In college its not working but at home its work well.


    17-05-2012

    Today’s task is to run video chat app. on experimental. Navdeep created account for me on experimental. After getting my account, I’m learning how to use that. I have learnt about how to use ssh and upload file on experimental.


    18-05-2012

    Finally I upload webpage for video chatting. But its not working. Because Its requirements are not fulfilled by user’s system. For that I have found solution i.e. installation of webcam studio on LINUX system to work well with OpenTok.


    21-05-2012

    Today, I surfed internet for better option for video chatting other than OpenTok. I found alternatives like Dialogoo. But this app does not gives facility to video recording, video archiving. And these facilities are available in OpenTok.


    22-05-2012

    Today, I write an article on OpenTok. Here’s the link for that :


    23-05-2012

    Today, I have started with next task i.e. Searching of best FOSS ERP software for schools. FOSS ( Free and Open Source Software ) is software that is both free software that is both free software and open source. It is liberally licensed to grant users the right to use, copy, study, change, and improve its design through the availability of its source code. ERP is an Enterprise Resource Planning. ERP is business management software that allows an organization to use a system of integrated applications to manage the business. ERP software integrates all facets of an operation, including development, manufacturing, sales and marketing.


    24-05-2012

    I surfed a lot for best ERP’s but each website has its own views and ideas about ERP Software’s. At last     I came to point of choosing one and best ERP for schools which is FOSS too. I go with Fedena.

        Fedena ERP is an open source school/campus management syatem based on Ruby on Rails framework. It’s an one stop solution for all kind of school manament related issues and helps you to manage student databases and all other activities online.

    To know more about Fedena follow this link :


    25-05-2012

    Today, I have implemented Fedena. I have successfully installed Fedena on my laptop. And checking out its features too. Its great software for schools and campuses. Nice project. Hope you also want to try this and like this too.


    26-05-2012    

    Yesterday, Fedena was installed without any error. But today when I tried PDF feature its not working.

    I was finding solution and i’m tired with that but at last I found my mistake. It was really a silly and careless mistake. I have downloaded wkhtmltopdf Static Library instead of wkhtmltopdf Static Binary.  

    wkhtmlpdf Binay file is required to create PDF file. From this I have learned that don’t do things in hurry, be calm and do things carefully. Hope after reading this no one do this again like me.


    28-05-2012

    Today, I am searching tutorials Ruby on Rails for knowing it well and for trying some examples.


    29-05-2012

    Today, I am trying Ruby on Rails example. This example is to create Blog application. But I am getting  error with this application at one step.


    30-05-2012

    My yesterday’s problem was not solved but i’m trying. At last I have found solution for that. I have created application with Ruby on Rails. Blog application is simple and takes few minutes to create this using Ruby on Rails.


    31-05-2012

    Today, I have started another Ruby on Rails application i.e. OSV (OpenStreetView). Its application for uploading photos on geographical areas.


    01-06-2012

    I am using OSV, but while uploading there’s an error of MiniMagick .


    02-06-2012

    Last day’s error of OSV is solved by installing ImageMagick software i.e. image viewing tool. Its very silly error.


    04-06-2012

    I am using OSV and side by side i’m exploring Fedena features to implement it on college. While using OSV, I noticed that after uploading images it does not processing images for next step. It takes too much time to solve the problem but don’t about this how to do this. I also searched for OSV mailing list but not able to get. Now I know the mailing list of OSV, I found that with the help of Rai sir. He mailed me the link for that and then i send mail to OSV for my problem and I’m waiting for their reply.


    05-06-2012

    Today I tried to solve my yesterdays problem, but its still unsolved.


    06-06-2012

    Today I got reply from OSV Mailing List. I really want to thanks to them for help me.

    Here’s the reply :

    —————————————————————————————————————————

    Hello Mandeep,

    To get pictures out of the “pending” state you have to run the file“script/tools/processor.rb”, which will process all pictures (createthumbnails, etc.). If you just start the script, it will keep runningforever and processing new pictures as they are added. You can removethe “while true” loop and then it will only process pictures once andexit afterwards.

    Also keep in mind that the default settings specify that each picturehas to be reviewed by three different persons before it shows up on themap.

    Cheers,David

    On Wed, Jun 6, 2012, at 08:42, Mandeep Kaur wrote:> Hello Friends,> I am using OpenStreetView on my localhost. I have downloaded the latest> code from github. Its working well but there is a problem in moderation> section. After uploading the photo, the push message for photo is not> available and photo status always set to pending. Can anyone help me to> solve this problem and also explain the installation procedure if i am> doing wrong.> Thanks > — Mandeep Kaurhttp://mandeepsimak.wordpress.com/ > _______________________________________________> Photos mailing list[email protected]http://lists.openstreetmap.org/listinfo/photos

    —————————————————————————————————————————–

    But i’m not able to do that because OSV doesn’t working …. : (

    Its sad news for me. But hope for best.

    I also searched for Ruby on Rails CMS for creating website. I found too many but shortlisted 3 RoR CMSs’

    1) Refinery CMS

         http://refinerycms.com/

    2) Radiant CMS    

         http://radiantcms.org/

    3) Browser CMS     

         http://www.browsercms.org/


    07-06-2012

    Today my task is to install OSV on experimental. Then I told admin of experimental to install Ruby on Rails so that I run OSV on experimental. After installation of RoR on experimental, I successfully installed OSV but its give same error of MiniMagick during uploading images as earlier on my laptop. Then I again asked to admin for installing ImageMagick on experimental. Its installed but giving error of libjpeg.so library. This error is solved by installing additionally libjpeg.so library on experimental. Fom these errors I have learned new things.

    I am trying to install Refinery CMS on my laptop but it gives error. Then i move to Radiant CMS but it also gives error. And at last Refinery CMS is installed on experimental by sir.


    08-06-2012

    Today, I buy my own domain name from bigrock.com. I want simak.com but its not available and I go for simak.in. Now I’m creating my own website using RoR CMS.

    As Radiant is installed on experimental but Its speed is slow then I have found solution for that.

    Ruby on Rails uses WEBrick to test applications in a development environment. 

    This makes speed of applications slow because WEBrick is doing a reverse DNS lookup on connecting IPs by default. In other words, it’s trying to see if your IP address is associated with a domain name. This is unnecessary and takes too long.

    so we can disable it by doing the following :

    :DoNotReserveLookup => nil,

    with

    :DoNotReserveLookup => true,

    Look for the file /usr/lib/ruby/1.9.1/webrick/config.rb and edit it.

    Replace the line

    Restart webrick and it’ll work well.


    09-06-2012

    Today I am studying how to build apps using Radiant or Refinery CMS.


    13-06-2012

    I have created my first sample website using Radiant CMS. I feel good to this success.

    Have a look :


    14-06-2012

    All is going well but after installing Refinery on experimental, OSV stops working. It giving script/../config/boot (LoadError) as It uses 2.3.8 version of Rails.


    16-06-2012

    Today told admin of experimental to install Rails 2.3.8 version for OSV. After installing that It gives following error :

    mandeep@experimental:~/public_html/OSV/OpenStreetView$ script/server -p 3007 

    /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: cannot load such file — script/../config/boot (LoadError)         from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’         from script/server:2:in `<main>’ 


    18-06-2012

    Today I tried to solve OSV problem by creating Gemfile. But this problem is not solved by this. Now I’m searching for Rails list for discussing my problem.


    19-06-2012

    Today, I send mail to Ruby on Rails mailing list related to OSV error. I used Gemfile for defining Rails version. But still giving error.


    20-06-2012

    I got reply of yesterday’s mail from RoR mailing list. From that I got link for turorial to how to use bundler with Rails 2.x version.

    Link for tutorial : 

    http://gembundler.com/rails23.html


    21-06-2012

    I have found that Heroku is a tool for hosting Rails 3.x apps from the discussin in RoR mailing list.

    Here’s the link for discussion :

    https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-talk/bCVxbkjpLtg

    Heroku offers free hosting space with an easy deployment process 

    (especially regarding database setup, which can be a bit of work to 

    configure a DB user, create/grant access to tables, … ) 

    https://devcenter.heroku.com/articles/quickstart

    To start, you first install the gem: 

    gem install heroku 

    Then, you need to register for a free account, and you can provide ssh 

    keys for authentication 

    and with heroku –help should also give some good starting information. 


    22-06-2012

    Trip to Rajgarh …. 🙂

    Have a look at my experience :

    http://mandeepsimak.wordpress.com/2012/07/01/trip-to-rajgarh-hp-22-06-2012/


    25-06-2012 to 30-06-2012

    In this week, I am working on OSV to run it on my computer using Rails 2 alongside Rails 3. But Its giving errors, then I mailed my problem on RoR mailing list.

    Here’s link of my discussion on RoR mailing list about my problem:

    https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-talk/Dm9QZDqi2aU

    I have tried all alternative mentioned in this discussion but not able to found the correct result. But got one more error and also discussed that on mailing list.

    Have a look at that discussion too:

    https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-talk/1ifFVEgfnoA


    02-07-2012 to 07-07-2012

    In these days, I re-install Ubuntu with latest version 12.04 for doing OSV. And also install virtual box tu run different OS’s without rebooting. Learned new thing and also successfully installed OSV on Ubuntu 11.10 installed through virtualbox.

    After that my next task was to run OSV on experimental. Then I told admin of experimental to re-install RoR for new start and also RoR version according to OSV requirements. But still having problems with re-installing RoR.

    I also learn about github and also learn the use of github. I also tried Heroku to run rails app and i was successful in that.

    09-07-2012 to 10-07-2012

    In these days I an trying more Rails apps and also do some work with Sandy in organizing qualification. That was nice task and also interesting.

    11-07-2012 to 14-07-2012

    These days are very interesting and learning to me. As i have started doing work on Seat Planning with my friend Satvir. This task was given to Satvir and Karam and Satvir told me to do that with her. Then I have started with her and this was going very interesting. Firstly we created the logic then Satvir implemented that logic means did coding for that in c++(OOPs Language). Then we did some changes to fulfil the requirement and we got the result as we needed.

    But our requirement was changes and its going to big challenge for us to do that. But we tried and find solution, logic.. to do that. Its done by hook or crook but still did few things manually. I feel bad but happy too as its done on time.

    16-07-2012 to 17-07-2012

    Now our next task i.e. seat planner with new start from scratch. We did planning for that and happy with great project. Also heard presentation of 2 weeks training students. Nice presentations.

    18-07-2012

    Today m doing work on seat planner and also help Jaspreet for diary project. Its my another knowledgeable task. I learn php with this as I am new to that but use basic concepts and did this thing well. But still something left. And i also explain some C++ concepts to Jasleen and Rimpy. I also revise that while explaining.

    19-07-2012

    Today I’m doing seat planner side by side diary making and also help Davi in creating C++ program. Nice experience. After creating seat planner everyone getting help from me about C++.

    21-07-2012

    Finding solutions and logic for seat planner. Too much thinking and thinking and thinking….!!!!

    22-07-2012

    Today I have created a diary code which is too lengthy and complicated. I can use same thing multiple times. When I noticed that I think its funny.

    24-07-2012

    Today, I modified the diary code into smaller one and feels good because its short and also solves the problem.

    25-07-2012

    Today I am working on my website. Its working but not created the nice front end.

    26-07-2012

    Today I have prepared presentation on slot machine but not did too much. As after discussion I feel my presentation was boring and need interesting thing to create it interesting.

    27-07-2012 to 31-07-2012

    Started coding of seat planner. Also using github to manage our code. We changed our coding time to time, creating logics, improving code, also reducing code, having fun with this project. Hope this will be finished as soon as possible.

    01-08-2012

    I am very happy….. : ) In seat planner project our first strategy is complete. Now only few things left like footer on page and report according to branches. Hope this will be completed soon …. : )

  • 22-05-2012

    Today, I write an article on OpenTok. Here’s the link for that :

  • 21-05-2012

    Today, I surfed internet for better option for video chatting other than OpenTok. I found alternatives like Dialogoo. But this app does not gives facility to video recording, video archiving. And these facilities are available in OpenTok.

  • 18-05-2012

    Finally I upload webpage for video chatting. But its not working. Because Its requirements are not fulfilled by user’s system. For that I have found solution i.e. installation of webcam studio on LINUX system to work well with OpenTok.

  • 17-05-2012

    Today’s task is to run video chat app. on experimental. Navdeep created account for me on experimental. After getting my account, I’m learning how to use that. I have learnt about how to use ssh and upload file on experimental.

  • 16-05-2012

    Yesterday’s problem was solved and I also implemented that and its working. I feel good. After that i have tried to access my page on localhost. In college its not working but at home its work well.

  • 15-05-2012

    Today, I am finding solution for Opentok to run it on LINUX systems. I surfed a lot.