Monday, December 10, 2012

Interactive way of doing presentations

You guys may already using this technique. But thought to share it with you guys.
There is an alternative method of doing presentation rather than typical way of using slides.
This method is effective for Marketing presentation or Marketing research presentations etc. In my personal view I don't think this is a good way for academic or any other professional presentations but I would like to hear your feed backs on what this is good for and what it isn't.

Ref:-
Open source tools that have more features.


Demo of Infact in action - http://apps.forskning.se/InfactPlaneten/index.html?lang=eng

Infact - http://infact.se/english/

Dizzy (with demo) - http://dizzy.metafnord.org/#intro

Impressi.js - https://github.com/bartaz/impress.js

Reveal.js (with demo) - http://lab.hakim.se/reveal-js/#/

Impressive - http://impressive.sourceforge.net/

Sozi (an addon to Inkscape) - http://sozi.baierouge.fr/wiki/doku.php

Friday, December 7, 2012

Mulithreading in 'Quickly', python RAD tool by canonical

I was doing my WiMixer application through Quickly tool by Canonical for developing application for Ubuntu/Linux. But when I had to do socket programming phase I can't start a threading inside the Quickly.

I was so frustrated and tried everything. After a while a help from Michael Hall in IRC chat of Quickly channel + thanks to this this post in askubuntu. I found out how to do it. I thought it might be valubale to some if I shared it in here with you.

What you have to do is simple. At the very beginning of the python file which your thread will fire, include these lines.

import threading
from gi.repository import GObject
GObject.threads_init()

and then as usually done in python just start the thready as

listener_thread = threading.Thread(target=function_name)
listener_thread.start()

We want to initialize the GObject as quickly uses gi repository to import GUI from the glade file. So it initially starts in a separate thread at beginning of the loading of GUI. So the next threads we start won't be started until GUI (gobject thread) is closed.

I'll conclude this post as my usual statement. If you are using open source, you will always have a way to solve your problems or you might find a friend that will help you. :-)

Tuesday, November 13, 2012

How to zip a folder in google drive without having repeated files in it

Using google appscript we can zip a google drive folder. But one problem arises. In google drive you can keep repeating named (same named) files in single folder. But zip file can't do it. So gives a fatal error without even giving a hint. By using this code you can get rid of repeated files and zip folder.
function zipfolder(e) {
  var foldername = e.parameter.emailAddressbx;
      try{
      var folder = DocsList.getFolder("CV/"+foldername);
        }
  catch (e) {
    Browser.msgBox(e);
    Browser.msgBox("Given folder doesn't exist!");
    }
  var cvlist=[];
  var j=0;
  var found = false;

  for(i=0;i    for(k=0;k    if(folder.getFiles()[i].getName() == cvlist[k].getName())
    { found = true;
    break;}
      }
    if (found == false){
   cvlist.push(folder.getFiles()[i].getBlob());
      j++;
    }
    found = false;  
  }
  if(cvlist.length>0){
  var zip = Utilities.zip(cvlist, 'For_download.zip');
  folder.createFile(zip);
  }
}

Saturday, October 27, 2012

OpenGL and freeglut on Linux + Codeblocks

Hey everyone,
After long time I'm writing on this blog. Hope to keep things up from here onwards but cant promise.

This post is about doing OpenGL programming in codeblocks.

Codeblocks is a C/CPP IDE. Usually opengl c programming is done in this. Our lecturer, Ms. G. S. Makalanda ( Senior Lecturer) B.Sc.(Math)(SL), M.Sc.(Stat)(SL), M.Sc. (Comp. Sci.)(UK),  has asked us to install code-blocks in order to do C programming on opengl. Well everyone except me is working on windows pc's. This is my story, problems, solutions I found to overcome to run code successfully on codeblocks.

Codeblocks was in Ubuntu Software center so no problem in installing it. I guess there was opengl installed in default. When I create new opengl project, the sample code runs smoothly. But when I create a new glut project it says,  
CG/gluttest.o:gluttest.c:function display: error||undefined reference to 'glClear'|
CG/gluttest.o:gluttest.c:function display: error||undefined reference to 'glColor3f'|
CG/gluttest.o:gluttest.c:function display: error||undefined reference to 'glBegin'|
CG/gluttest.o:gluttest.c:function display: error||undefined reference to 'glVertex3f'|
CG/gluttest.o:gluttest.c:function display: error||undefined reference to 'glVertex3f'|
CG/gluttest.o:gluttest.c:function display: error||undefined reference to 'glVertex3f'|
CG/gluttest.o:gluttest.c:function display: error||undefined reference to 'glVertex3f'|
*some more references like same*
||=== Build finished: 33 errors, 0 warnings ===|
 like wise gives build error for each gl function. Other guys on windows pc had the same problem but they seems to fix it when they changed glut library. So I did some search and found that I have to install freeglut (linux version of the glut).