Spiga

GetAFreelancer - the best source for online jobs

I just a found a GetAFreelancer a couple of days ago, after I learned about GetACoder. The site is filled with freelance jobs that you can do.
The most popular job here it seems is writing job, but they have lots of programming jobs too, and it's divided into several programming languages.

Hijri Date Conversion Unit - Delphi Source Code

Here’s a little Hijri calendar conversion unit that I wrote a few years ago. I converted this from a JavaScript that I found on a website.
Hope this would be useful to you.
// Created by Irwan A. 
// irwan.a@gmail.com 
// 
// adapted from a Javascript source code that 

// i found somewhere on the net. 
// but i lost the URL. hope the author doesn't mind :) 
// Month & day names are taken from 
// http://en.wikipedia.org/wiki/Islamic_calendar 
// thanks to @bu @hs@n  
// for pointing this out 

unit Hijri; 

interface 

uses 
Windows, Messages, SysUtils, Classes, Graphics, 
Controls, Math; 

type 
THijriDate = record 
HijriDate: integer; 
HijriMonth: integer; 
HijriYear: integer; 
JulianDate: integer; 
HijriDay: string; 
end; 

function IntPart(Num : real) : integer; 
function WeekDay(Wdn : integer) : string; 
function Gre2Hijri(var D, M, Y : word): THijriDate; 
function HijriMonths(Mth : integer) : string; 

implementation 

function IntPart(Num : real) : integer; 
begin 
if Num < -0.0000001 then 
Result := Ceil(Num - 0.0000001) 
else 
Result := Floor(Num + 0.0000001); 
end; 

function WeekDay(Wdn : integer) : string; 
begin 
case Wdn of 
0: Result := 'Al-Ithnayn'; 
1: Result := 'Ath-Thalatha'; 
2: Result := 'Al-Arba`a'; 
3: Result := 'Al-Khamis'; 
4: Result := 'Al-Jum`a'; 
5: Result := 'As-Sabt'; 
6: Result := 'Al-Ahad'; 
end; 
end; 

function Gre2Hijri(var D, M, Y : word): THijriDate; 
var 
jd, l, n, j : integer; 
begin 
if ((Y > 1582) or ((Y = 582) and (M > 10)) 
or ((Y = 1582) and (M = 10) and (D>14))) then 
begin 
jd := IntPart((1461 * (Y + 4800 + 
IntPart((M - 14)/12)))/4) + 
IntPart((367 * (M - 2 - 12 * 
(IntPart((M - 14)/12))))/12) - 
IntPart((3 * (IntPart((Y + 4900 + 
IntPart((M - 14)/12))/100)))/4) + D - 32075; 
end 
else 
begin 
jd := 367 * Y - IntPart((7 * (Y + 5001 + 
IntPart((M - 9)/7)))/4) + IntPart((275 * M)/9) 
+ D + 1729777; 
end; 

l := jd -1948440 + 10632; 
n := IntPart((l - 1)/10631); 
l := l - 10631 * n + 354; 

j := (IntPart((10985 - l)/5316)) * 
(IntPart((50 * l)/17719)) + (IntPart(l/5670)) * 
(IntPart((43 * l)/15238)); 

l := l - (IntPart((30 - j)/15)) * 
(IntPart((17719 * j)/50)) - (IntPart(j/16)) * 
(IntPart((15238 * j)/43)) + 29; 

m := IntPart((24 * l)/709); 
d := l - IntPart((709 * m)/24); 
y := 30 * n + j - 30; 

Result.HijriDate := d; 
Result.HijriMonth := m; 
Result.HijriYear := y; 
Result.JulianDate := jd; 
Result.HijriDay := WeekDay(jd mod 7); 

end; 

function HijriMonths(Mth : integer) : string; 
begin 
case Mth of 
1: Result := 'Muharram'; 
2: Result := 'Safar'; 
3: Result := 'Rabi'' al-awwal'; 
4: Result := 'Rabi'' al-thani'; 
5: Result := 'Jumada al-awwal'; 
6: Result := 'Jumada al-thani'; 
7: Result := 'Rajab'; 
8: Result := 'Sha''ban'; 
9: Result := 'Ramadan'; 
10: Result := 'Shawwal'; 
11: Result := 'Dhu al-Qi''dah'; 
12: Result := 'Dhu al-Hijjah'; 
end; 
end; 

end. 

Note:
As the hijri calendar is based on the lunar movement, the dates calculated using this code may be off +1/-1 day from the actual date. When determining the beginning of the Ramadan or Shawwal (or other important dates), please consult the local authorities for such matter.

Tag Property in Delphi

Tag is a small property that I rarely use. Until recently, that small property plays a really big role in my application.

As you know, Tag is an integer type property that you can use to… well… tag! If you’re not a big fan of array, tag can be used as an index (although not as powerful as index, but surely easier to code). As this is only a small app, so performance is not an issue.

In my app I have a table that contains 16 date fields, named Date1, Date2, …, Date16. I also have 16 labels that shows whether a certain date field is filled or not, by changing its FontStyle property.

Each labels corresponds to the each Date fields. So Label with tag 1 is used to show the Date1 field data.

Here’s the function I used to change the FontStyle of each labels:

procedure TfrmMain.SetLabels; 
var
i, j : Integer;
begin
// Iterate through 16 labels & 16 images

for i := 1 to 16 do
begin
// Find non empty date fields
if dtmMain.tblInvTracking.FieldByName('Date' +
IntToStr(i)).Value <> null then
begin
// Iterate through all components on the form

for j := 0 to ComponentCount-1 do
begin
// Sets the label's font style
if (Components[j] is TLabel) and
((Components[j] as TLabel).Tag = i) then
TLabel(Components[j]).Font.Style :=
TLabel(Components[j]).Font.Style + [fsBold];
end;
end
else
begin
for j := 0 to ComponentCount-1 do
begin
if (Components[j] is TLabel) and
((Components[j] as TLabel).Tag = i) then
TLabel(Components[j]).Font.Style :=
TLabel(Components[j]).Font.Style - [fsBold];
end;
end;
end;
end;


Prior to using the Tag, I have to find the correct object type with using the “is” reserved word

Components[j] is TLabel

And using the “as” reserved word

Components[j] as TLabel

With these two reserved words, I can be sure that only the Tag property of TLabel that I processed.

Mengatasi Defisit

Defisit? Nah… kalo yang satu ini saya yakin Anda pernah mengalaminya. Meski sekali seumur hidup (beruntungnya Anda…) atau bahkan sudah menjadi kebiasaan Anda setiap bulannya (kasiaaan deh lu). Biasanya kalau sudah terjadi defisit, mau tidak mau kehidupan Anda menjadi mantab alias makan tabungan.

Memang yang satu ini sangatlah sulit untuk dihindari. Karena pengelolaan keuangan merupakan satu ketrampilan yang tiap semua orang miliki. Tapi dengan artikel ini, diharapkan Anda dapat mengurangi kemungkinan terjadinya defisit pada keuangan Anda.

Solusi

Defisit, kalau menurut definisinya adalah suatu kondisi keuangan yang terjadi saat jumlah pengeluaran melampaui jumlah pendapatan. Untuk “memusnahkan” makhluk yang bernama defisit ini hanya ada tiga cara, yaitu:

  1. Menurunkan pengeluaran
  2. Meningkatkan pendapatan
  3. Melakukan keduanya

Yaah… kalo itu mah nenek-nenek juga tau! Memang ketiga cara tersebut tampaknya sederhana, namun aplikasinya sangatlah sulit. Setuju? Tentu saja… Anda kan pembaca yang baik. Tapi, itu hanyalah solusi yang Anda tahu, tapi tahukah Anda agar dapat melakukan salah satu solusi tersebut Anda harus melakukan beberapa persiapan? Tanpa adanya persiapan-persiapan tersebut, Anda akan mengalami banyak kesulitan dalam melakukan salah satu solusi tersebut.

Sebenarnya menarik untuk membahas ketiga topik di atas, tapi kayaknya bakal panjang, jadi saya bahas di sini persiapan-persiapan untuk menjalankan ketiga di atas.

Persiapan-Persiapan

Berikut adalah persiapan-persiapan yang Anda perlukan.

1. Kuatkan niat Anda

Bila Anda memang Anda ingin menghindari defisit, Anda harus kuatkan niat Anda. Karena yang akan Anda jalani akan mengurangi kenyamanan-kenyamanan atau aktivitas-aktivitas menyenangkan yang biasa Anda jalani sehari-hari. Memang, tidak sedrastis yang Anda bayangkan, tapi tetap saja Anda akan mengalami saat-saat yang menggoda Anda agar melakukan pengeluaran lebih agar Anda dapat melakukan aktivitas-aktivitas seperti biasanya. Bila niat Anda kuat, saya yakin Anda dapat menekan defisit keuangan Anda.

2. Tentukan strategi.

Memangnya hanya pertandingan atau perang saja yang perlu strategi? Untuk mengelola keuangan keluarga Anda agar tidak mengalami defisit juga perlu strategi. Anda harus menentukan langkah-langkah yang hendak Anda ambil agar tujuan utama Anda tercapai.

Untuk itu Anda harus menentukan tujuan-tujuan jangka pendek terlebih dahulu. Dengan adanya pemecahan tujuan jangka panjang menjadi beberapa tujuan jangka pendek, Anda akan menjadi lebih mudah dalam melaksanakannya.

Misalnya Anda hendak menurunkan pengeluaran Anda agar tidak mengalami defisit. Anda tahu bahwa ada beberapa pengeluaran Anda merupakan pengeluaran yang tidak perlu, misalnya nonton di bioskop setia minggu (ingat, ini hanya contoh lho...). Jadi tujuan jangka pendek Anda adalah mengurangi kebiasaan nonton di bioskop tiap minggu. Bila Anda telah terbiasa dengan menonton di bioskop, misalnya, sebulan sekali, tanpa terasa Anda telah mengurangi pengeluaran Anda.

3. Kenali hambatan-hambatan yang mungkin terjadi

Ada orang bijak yang mengatakan bahwa dengan mengenali kekuatan musuh, kita telah memenangkan setengah dari peperangan. Dia benar. Demikian juga dalam pembuatan strategi “pengentasan defisit”. Dengan mengetahui hambatan-hambatan yang mungkin terjadi, Anda dapat merencanakan berbagai solusinya.

Jangan sampai Anda telah setengah jalan dalam melaksanakan strategi Anda, lalu Anda menghadapi masalah yang cukup besar sehingga Anda memilih mundur dari pada menyelesaikan masalah tersebut.

Memang tidak semua masalah dapat kita perkirakan dari awal, setidaknya sebagian masalah tersebut sudah Anda antisipasi, sehingga jumlah masalah yang terjadi bisa dieliminir. Yang pasti Anda harus “Prepare for the worst, do for the best”. Cieee.... keren kan slogannya :)

4. Persiapkan keluarga Anda

Bila Anda masih single tentu tidak akan masalah. Karena semua penghasilan Anda akan Anda habiskan sebagian besarnya hanya untuk Anda sendiri. Yang repot kalau Anda telah double atau bahkan triple (berkeluarga) J.

“Gimana mau berhemat, kalau istri minta dibeliin macem-macem! Belum lagi Si Buyung dan Si Upik mau …..” Kurang lebih itu yang terlintas saat Anda baru memulai strategi pengurangan defisit Anda.

Oleh karena itu, jelaskan “program” Anda pada keluarga Anda. Terutama pada pasangan Anda (istri/suami). Saya yakin, bila Anda menjelaskannya dengan baik dan benar (kayak Bahasa Indonesia aja, ya?), pasangan Anda akan mendukung Anda. Dengan dukungan keluarga, semua akan berjalan lebih ringan. Bila Anda agak “tergoda”, ada yang dapat mengingatkan Anda. Itu hanya beberapa keuntungannya. Masih banyak lagi keuntungannya yang akan Anda dapatkan bila Anda telah mempersiapkan keluarga Anda.

5. Membuat anggaran

Ini merupakan satu langkah yang paling sulit. Karena Anda harus melakukan banyak kalkulasi. Tapi, tenang… cuman pakai tambah, kurang, kali dan bagi saja… Tidak ada hitung luas, volume atau bahkan menggunakan matematika kalkulus, kok…. J

Meskipun susah-susah gampang, namun banyak orang yang hendak mengelola keuangan keluarga yang gagal pada tahap ini. Kenapa? (lho... saya kok nanya ke Anda? Anda kan Cuma pembaca, penulisnya kan saya) Ini disebabkan karena mereka gagal mengenali pos-pos pengeluaran mereka. Sehingga banyak pengeluaran yang sebenarnya tidak masuk dalam anggaran mereka, tapi terpaksa harus dilakukan. Dan ini tidak terjadi satu atau dua kali saja, melainkan seringkali. Makanya, mereka jadi gagal.

Jangan khawatir, saya tidak menakut-nakuti Anda, kok. Hanya saja saya ingin menekankan pentingnya untuk mengenali pengeluaran-pengeluaran Anda serta pola-polanya, agar Anda tidak terjerumus dalam lubang kesalahan... hiii... serem...

Untuk mempelajari bagaimana membuat anggaran rumah tangga yang baik, Anda bisa baca artikel berikut ini.

6. Konsekuen dan konsisten

Dua kata yang hampir mirip ini harus Anda jalankan. Anda telah menentukan tujuan Anda dan jalan yang hendak Anda tempuh, maka Anda harus konsekuen dengan pilihan Anda. Anda jangan menjadi ragu. Anda harus yakin. Selama Anda yakin tujuan dan jalan yang pilih adalah benar, dan apalagi dengan dukungan keluarga, saya rasa tidak ada alasan bagi Anda untuk berhenti.

Meski Anda yakin dengan tujuan dan jalan Anda, bila Anda masih malas-malasan mengerjakannya, tentu strategi Anda tidak akan seefektif yang Anda rencanakan semula. Jangan sampai di tengah perjalanan Anda jadi malas, kemudian semangat, lalu malas lagi... Karena itu Anda harus konsisten dalam melaksanakannya. Tidak boleh patah semangat. Ingat, yang Anda lakukan adalah demi kepentingan keluarga.

7. Berdoa

Apalah kita, manusia, kalau kita dibandingkan dengan Sang Pencipta. Pepatah mengatakan, manusia berusaha, tapi Tuhan yang menentukan. Memang, kalau kita sudah berusaha habis-habisan, tapi bila Tuhan menghendaki yang lain, apa boleh buat. Karena itu, sebagai umat beragama, kita tidak boleh lupa, bahwa kita harus terus berdoa agar segala usaha dan upaya kita diridhai-Nya. Amin.

Penutup

Bila ketujuh poin di atas telah Anda lakukan, sudah saatnya Anda melaksanakan salah satu solusinya, baik itu menurunkan pengeluaran, meningkatkan pendapatan atau melaksanakan keduanya.

Semoga Anda berhasil “mengentaskan defisit” dari kehidupan Anda...

Weebly - The Instant Web Builder

I just found a great site today! It's weebly.com, a free WYSIWYG web builder. You can build a website in an instant.
With drag and drop, no coding, many (I mean MANY) templates design to use, you can build your website or blog faster than you can cook an instant noodle! :) Oh, did I mention its FREE???

Here are the features as listed in the website:

----

Add Content
Content elements, such as videos, pictures, maps, and text are added to your website by simply dragging them from the Weebly bar to your webpage. We have a bunch of cool elements and add more all the time. Are we missing an element you'd like? Suggest it, and we'll include it as soon as we can.

Choose a Design
Deciding on a look for your website couldn't be easier. Click over to the "Design" tab and you'll see thumbnail pictures of available designs. Hover your mouse over a thumbnail to preview the new look instantaneously or click the thumbnail to select it as the design for your website.

Customize Your Content
Once elements have been added to your page, customize everything just by double-clicking. Double-click a picture to upload a new one, double-click text to change it, or double-click a map to set the address. Rearrange the elements by dragging them into a new order.

Easily Manage Your Pages
Adding and organizing your website's pages is completed in the "Pages" tab. When you add a new page to your website, it's automatically added to the navigation bar. Reordering pages is simple, just drag and drop them into place.


----

I think I'm going to see a lot of weebly in coming days!

RentACoder

I just browsed through a website called RentACoder.com that lists lots of projects that are offered to people through the internet.

Here's the official description

Rent A Coder is a global marketplace that connects buyers of services (such as programing, design, marketing and translations) with sellers. It is the home of the world's largest number of completed software projects and is currently made up of 115,367 buyers and 246,884 coders. These participants come from virtually every country in the world, and negotiate and complete thousands of projects each month.

Rent A Coder statistics provide an instantaneous pulse reading on global trends in domestic and global outsourcing, offshoring and nearshoring. It has been the subject of numerous studies by leading educational instutitutions, including Harvard University, American University, University of Massachusetts and numerous others. (If you are a public research institution and have a project you'd like to propose, please contact us.)

It's quite interesting. If you have a spare time, why don't you use your skill to do any of the projects offered and get side income? The projects ranging from coding to blogging to market research. The project amount ranging from less than $100 to $1000!

You can also offer your projects to the others using this media. Maybe, you can save more than hiring someone.

I've put a box listing the projects that are available in that site at the lower right of this page. Just go and see it for yourself!

It's called Mindset!!

As my friend was passing the elephants, he suddenly stopped, confused by the fact that these huge creatures were being held by only a small rope tied to their front leg. No chains, no cages. It was obvious that the elephants could, at anytime, break away from the ropes they were tied to but for some reason, they did not. My friend saw a trainer nearby and asked why these beautiful, magnificent animals just stood there and made no attempt to get away.

"Well," he said, "when they are very young and much smaller we use the same size rope to tie them and, at that age, it's enough to hold them. As they grow up, they are conditioned to believe they cannot break away. They believe the rope can still hold them, so they never try to break free." My friend was amazed. These animals could at any time break free from their bonds but because they believed they couldn't, they were stuck right where they were.

Like the elephants, how many of us go through life hanging onto a belief that we cannot do something, simply because we failed at it once before? So make an attempt to grow further.... Why shouldn't we try it again?

"YOUR ATTEMPT MAY FAIL, BUT NEVER FAIL TO MAKE AN ATTEMPT."

Same thing applies to fishes. There's an experiment of putting big fish n groups of small fishes in an aquarium together. First, a glass was put in the middle separating the big and small fishes. At first, the big fish kept trying to pass to the other side but kept banging its head on the glass. After couple of days, it stopped trying. When the glass separator was removed, the big fish has stopped trying and swam quietly on his own side of aquarium.

Moral of the story: never give up trying

Flock Browser

Have you tried the Flock Browser (www.flock.com)?
I just downloaded & installed it. First impression...Flock REALLY impressed me!

It really is the browser for Web 2.0!
Blogging, photo & video sharing, social networking, etc, can be done in one intuitive interface.
This entry is my attempt to test Flock's blog editor.