Sayfalar

2 Haziran 2014 Pazartesi

Stacks

Stack is a data structure which have system called LIFO(Last in First out).
We can imagine like there are over and over dirty plates and if
we want to clean this plates we must start with last dirty plates
and this plate came last to this structure.I implement a integer stack





Stacks have three main functions;

pop :// delete item which is on top
push : // create new item and place to top
top : // which element is on top




23 Mayıs 2014 Cuma

Installation and Compiling Haskell on Ubuntu 13.10

First you should check the universe repository

 sudo gedit /etc/apt/sources.list  and add

deb http://us.archive.ubuntu.com/ubuntu saucy main universe

 line in sources.list if it is not in this file.

Then update : sudo apt-get update

Last install haskell :

sudo apt-get install haskell-platform

Now we try to write first haskell program and build it.


Firstly open a text editor and write

 main = putStrLn "Hello, World!"

Then save as first.hs  In terminal give command like this : ghc -o hello first.hs then ./hello

Welcome the Functional Programming World and Haskell.



26 Şubat 2014 Çarşamba

#Vim tips


Vim has a lot of cool things for developers some of them is very cool and useful there is some of them :)

:syntax on

with this command our codes are will be colorful and looks cool.





























:! gcc code.c -o app

with :! command we can run terminal code so if ve typed gcc commands we can compile the our code in wim.





:vsp

it separate the window vertically 2 pices.with ctlr+w you can switch
screen.if you use like :vsp newcode.c two files are seen on screen like



İf you use sp instead of vsp screen separate horizontally.


#if you have missing brackets {[( -or unmatched  -only you should do is bring cursor on bracket and typing "%" character vim will matched and you will able to fixing situation.