Skip to main content

Posts

Showing posts with the label pemrograman

Stack Implementation in Python

Stack is one of important concepts in data structure. Stack can be defined as abstract data type (ADT) that collects items with LIFO (last in, first out) principle. Two operations are known for stack i.e. push and pop. Push will add an item into stack, while pop will remove the last element that was added into stack.  You may think stack concept as if you arrange your plates. You will put a plate above other plates, but when you want to take one plate, you will take it from the top. To implement it in python, you will have at least three methods i.e. __init__, push, and pop. However, here we will add some more methods i.e. isEmpty (to check if the stack is empty), peek (to get the item at the top) and size(to get the number of item(s) in the stack). Here are the implementation in python: class Stack: def __init__(self): self.items = [] def isEmpty(self): return self.items == [] def push(self, item): self.items.append(item) def pop(s...

How to Start Your Career as a Freelancer?

I started my career as freelancer since beginning of 2012 as freelance programmer at High-Performance Computing Labs, Universiti Teknologi PETRONAS, Malaysia. Being a freelancer for 2 years, I am not thinking myself as a freelance master. Thus, this article is not a "how-to-be lecturing", but it's a kind of a reflection. This article is based on my experience and discussions with some friends whom working as freelancer. First thing first, freelancer is a skill-based position . You don't have to get any degree from any university (even in some case it will give a value-added). As freelancer, even if you are still 5 years in age, as long as you have skill or set of skills needed, then you are ready to go. Because freelancer is a skill-based position, showing your skill is paramount. You are very lucky that you are now living in the world where most of the platforms you need as freelancer are provided for free. Here are some examples of free platforms you can use to ...

Support netbeans untuk AJAX

Netbeans memang luar biasa. Setelah sukses dengan support beberapa bahasa pemrograman selain java (Ruby, C, C++, dan lain-lain) di versi 6.0, di versi 6.1 kali ini netbeans kembali ujuk gigi dengan menggelar support untuk PHP, javascript dan XML (walaupun sebenarnya XML sudah disupport dari dulu). Netbeans yang mensupport PHP dan JavaScript ini dibundel dalam program yang berbeda, tidak berupa modul yang menyatu dalam netbeans biasanya. Akan tetapi, program ini dibundel dalam program bernama Netbeans IDE EarlyAccess for PHP. Saya telah mencobanya, dan nampaknya saya lebih memilih ini daripada dreamweaver (walaupun lebih berat daripada dreamweaver). Penasaran? Download aja langsung di sini .