Updates from Shafiul Azam RSS Toggle Comment Threads | Keyboard Shortcuts

  • Shafiul Azam 7:05 pm on May 5, 2012 Permalink | Reply
    Tags: Bison, , Lex, YACC   

    Flex & Bison in Ubuntu 

    Instruction for flex & bison in Debian Linux (Ubuntu/Linux Mint)

    PRE-REQUISITE

    (A) Install flex from terminal: sudo apt-get install flex
    (B) Install bison from terminal: sudo apt-get install bison
    (C) If you dont have gcc installed, you can get it using sudo apt-get install gcc

    + +++++++++++++++++++++ +
    + PROCESSING +
    + +++++++++++++++++++++ +

    (1) Process the .lex file with flex
    ————————————-
    flex filename.lex
    >> lex.yy.c will be created

    (2) Process .y file with bison
    ————————————-
    bison -yd filename.y
    >> Two files: y.tab.c and y.tab.h will be created

    (3) Compile all files with gcc
    ————————————-
    gcc -Wall y.tab.c y.tab.h -ly lex.yy.c -lfl -o myexecutable
    >> myexecutable is your desired executable file, run in in the terminal using command: ./myexecutable

     
  • Shafiul Azam 6:41 pm on April 30, 2012 Permalink | Reply
    Tags: review, , ubuntu 12.04   

    Ubuntu 12.04 Quick User Review 

    Using Ubuntu 12.04 and quite satisfactory so far! I’ll update this post regularly as I continue using it!

    Pros (+)

    1. It’s cool! My Notebook was getting extremely hot and was getting turned off in Ubuntu 11.10. The notebook (Dell Inspiron 14z) is remaining cool most of the time. Even if when it get’s hot, it cools down after some time.
    2. The Network Manager is improved. In previous versions of Ubuntu, network manager could not re-establish a connection if my wireless router was turned off by power failure. But in 12.04, network manager can re-establish WiFi connection after it gets disconnected from wireless router.
    3. The look-&-feel is improved. Window movement, animations are catchy. It’s really looks cool!

    Cons (-)

    1. Like previous versions, it happens to freeze – so far it happened once in the week. Everything in the screen just freezes and I have to restart using Power switch.
    2. Skype hangs some time when starting, and after that, it closes. And the whole OS acts weird. I can not find apps searching in the launcher, the problem only solves after I log-out & log-in again.
     
  • Shafiul Azam 12:51 am on April 30, 2012 Permalink | Reply
    Tags: collaboration, , merging   

    Collaborating using git: make merging less painful! 

    Hi, I’m Shafiul! Me along with Ibrahim & Sifat are working in a project which we maintain using git. We’ve decided to follow a simple protocol to merge our works effeciently in a painless way!

    All of us will work in our own branches (learn first about branching if you’re not familiar with it). At the end of the day, the one who finishes his work after the rest of the team, should merge all of our works!

    Say, after working all day long, I figured out Ibrahim was still working before I went to bed. So it became Ibrahim’s due responsibility to merge everyone’s work :)

    The first step is: create a new branch for you, where only you will work, and no one else will touch.

    Create a new Branch named “shafiul”:

    git branch shafiul

    To work in this branch, I need to check-out to work in this branch:

    git checkout shafiul

    While working, Commit any time:

    git add -A
    git commit -m "Message"

    When you’re done, push your commits to the server:

    git push origin shafiul:shafiul

    Note the command: It pushes your commits made in local “shafiul” branch to origin’s (server’s) “shafiul” branch.

    Like me, Ibrahim & Sifat has also crated their own branches named “ibrahim” & “sifat” and they’re working in their branches.


    Merging everybody’s work

    The one who will be merging has to do followings:
    First, download everyone’s commits from origin (server) to his local machine:

    git fetch origin shafiul:shafiul
    git fetch origin ibrahim:ibrahim
    git fetch origin sifat:sifat

    Now time to merge. Check-out to master branch. With this branch, we will merge all other branches.

    git checkout master

    Now merge all other branches with master:

    git merge shafiul
    git merge ibrahim
    git merge sifat

    Cool! master is now merged with everyones code (Congratulations if no conflicts has occurred. But don’t get panicked if conflicts occur, to learn how to resolve conflicts, see the end of this article) – now Push your local “master” to origin (server):

    git push origin master:master

    Everyone’s duty: Update your branches…

    The next day, before working, everyone should update their branches. First, everyone needs to pull updated “master” branch from origin (server) and merge it with your local copy of master branch:

    git checkout master
    git pull origin master:master

    Now your local copy of master branch is updated. Finally, checkout to your own branch and merge it with updated master:

    git checkout shafiul
    git merge master

     
  • Shafiul Azam 12:00 pm on February 18, 2012 Permalink | Reply
    Tags: , phpunit, ,   

    Install PHPUnit in Windows, Wamp using PEAR 

    Go to the directory where PHP is located. Typically, this is <PATH-TO-YOUR-WAMP-INSTALLATION>\bin\php\php5.3.8

    We’ll call this path “PHP’s location” throughout this article.

     

    Now, install PEAR following instructions in this tutorial.

     

    Open a command-prompt, go to PHP’s location using cd, and type:

     

    pear channel-discover components.ez.no
    pear channel-discover pear.phpunit.de
    pear channel-discover pear.symfony-project.com
    pear install –alldeps phpunit/PHPUnit

     

    We’re done! type phpunit –version to confirm installation.

     

    Reference:

    http://www.ankara-gtug.org/2011/11/15/phpunit-installation-on-wamp-in-windows-7-and-integration-with-eclipse-2/

     

     
  • Shafiul Azam 11:48 am on February 18, 2012 Permalink | Reply
    Tags: , , ,   

    Installing PEAR in Windows, Wamp 

    Go to the directory where PHP is located. Typically, this is <PATH-TO-YOUR-WAMP-INSTALLATION>\bin\php\php5.3.8

    We’ll call this path “PHP’s location” throughout this article.

    1. Download “go-pear.phar” from this location: pear.php.net/go-pear.phar
    2. Create a folder “pear” in your PHP’s location
    3. Put the downloaded “go-pear.phar” file in this location.

    Open a command prompt with administrative privilege. For this, click on start menu, type “cmd” – you can see the cmd.exe icon. Right-click on this icon and click “Run as administrator”

    Cmd.exe will open. Go to the direcotry of your PHP’s location, by typing “cd” command. For example, my wamp is located in “D:\wamp”, so I write following command:

    D:
    cd wamp\bin\php\php5.3.8
    

    Now run the downloaded file, by typing:

    php .\pear\go-pear.phar
    

     

    Installation will begin! During installation, you’ll need to respond to some prompts, just hit enter/press “Y” when necessary.

    After installing, double-click and instal “PEAR_ENV.reg” found in your PHP’s location.

    Optionally, you can add your PHP’s location in your PATH variable.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel
Follow

Get every new post delivered to your Inbox.