Free Download Mozila fire Fox

Tuesday, August 14, 2007

C++ Tutorial

Probably the best way to start learning a programming language is by writing a program. Therefore, here is our first program:
// my first program in C++

#include
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}
Hello World!

The first panel shows the source code for our first program. The second one shows the result of the program once compiled and executed. The way to edit and compile a program depends on the compiler you are using. Depending on whether it has a Development Interface or not and on its version. Consult the compilers section and the manual or help included with your compiler if you have doubts on how to compile a C++ console program.

The previous program is the typical program that programmer apprentices write for the first time, and its result is the printing on screen of the "Hello World!" sentence. It is one of the simplest programs that can be written in C++, but it already contains the fundamental components that every C++ program has. We are going to look line by line at the code we have just written:

// my first program in C++
This is a comment line. All lines beginning with two slash signs (//) are considered comments and do not have any effect on the behavior of the program. The programmer can use them to include short explanations or observations within the source code itself. In this case, the line is a brief description of what our program is.
#include
Lines beginning with a pound sign (#) are directives for the preprocessor. They are not regular code lines with expressions but indications for the compiler's preprocessor. In this case the directive #include tells the preprocessor to include the iostream standard file. This specific file (iostream) includes the declarations of the basic standard input-output library in C++, and it is included because its functionality is going to be used later in the program.
using namespace std;
All the elements of the standard C++ library are declared within what is called a namespace, the namespace with the name std. So in order to access its functionality we declare with this expression that we will be using these entities. This line is very frequent in C++ programs that use the standard library, and in fact it will be included in most of the source codes included in these tutorials.
int main ()
This line corresponds to the beginning of the definition of the main function. The main function is the point by where all C++ programs start their execution, independently of its location within the source code. It does not matter whether there are other functions with other names defined before or after it - the instructions contained within this function's definition will always be the first ones to be executed in any C++ program. For that same reason, it is essential that all C++ programs have a main function.

The word main is followed in the code by a pair of parentheses (()). That is because it is a function declaration: In C++, what differentiates a function declaration from other types of expressions are these parentheses that follow its name. Optionally, these parentheses may enclose a list of parameters within them.

Right after these parentheses we can find the body of the main function enclosed in braces ({}). What is contained within these braces is what the function does when it is executed.

cout << "Hello World";
This line is a C++ statement. A statement is a simple or compound expression that can actually produce some effect. In fact, this statement performs the only action that generates a visible effect in our first program.

cout represents the standard output stream in C++, and the meaning of the entire statement is to insert a sequence of characters (in this case the Hello World sequence of characters) into the standard output stream (which usually is the screen).

cout is declared in the iostream standard file within the std namespace, so that's why we needed to include that specific file and to declare that we were going to use this specific namespace earlier in our code.

Notice that the statement ends with a semicolon character (;). This character is used to mark the end of the statement and in fact it must be included at the end of all expression statements in all C++ programs (one of the most common syntax errors is indeed to forget to include some semicolon after a statement).

return 0;
The return statement causes the main function to finish. return may be followed by a return code (in our example is followed by the return code 0). A return code of 0 for the main function is generally interpreted as the program worked as expected without any errors during its execution. This is the most usual way to end a C++ console program.

You may have noticed that not all the lines of this program perform actions when the code is executed. There were lines containing only comments (those beginning by //). There were lines with directives for the compiler's preprocessor (those beginning by #). Then there were lines that began the declaration of a function (in this case, the main function) and, finally lines with statements (like the insertion into cout), which were all included within the block delimited by the braces ({}) of the main function.

The program has been structured in different lines in order to be more readable, but in C++, we do not have strict rules on how to separate instructions in different lines. For example, instead of

int main ()
{
cout << " Hello World ";
return 0;
}

We could have written:

int main () { cout << "Hello World"; return 0; }

All in just one line and this would have had exactly the same meaning as the previous code.

In C++, the separation between statements is specified with an ending semicolon (;) at the end of each one, so the separation in different code lines does not matter at all for this purpose. We can write many statements per line or write a single statement that takes many code lines. The division of code in different lines serves only to make it more legible and schematic for the humans that may read it.

Let us add an additional instruction to our first program:

// my second program in C++

#include

using namespace std;

int main ()
{
cout << "Hello World! ";
cout << "I'm a C++ program";
return 0;
}
Hello World! I'm a C++ program

In this case, we performed two insertions into cout in two different statements. Once again, the separation in different lines of code has been done just to give greater readability to the program, since main could have been perfectly valid defined this way:

int main () { cout << " Hello World! "; cout << " I'm a C++ program "; return 0; }

We were also free to divide the code into more lines if we considered it more convenient:

int main ()
{
cout <<
"Hello World!";
cout
<< "I'm a C++ program";
return 0;
}

And the result would again have been exactly the same as in the previous examples.

Preprocessor directives (those that begin by #) are out of this general rule since they are not statements. They are lines read and processed by the preprocessor and do not produce any code by themselves. Preprocessor directives must be specified in their own line and do not have to end with a semicolon (;).

Comments

Comments are parts of the source code disregarded by the compiler. They simply do nothing. Their purpose is only to allow the programmer to insert notes or descriptions embedded within the source code.

C++ supports two ways to insert comments:

// line comment
/* block comment */

The first of them, known as line comment, discards everything from where the pair of slash signs (//) is found up to the end of that same line. The second one, known as block comment, discards everything between the /* characters and the first appearance of the */ characters, with the possibility of including more than one line.
We are going to add comments to our second program:

/* my second program in C++
with more comments */


#include
using namespace std;

int main ()
{
cout << "Hello World! "; // prints Hello World!
cout << "I'm a C++ program"; // prints I'm a C++ program
return 0;
}
Hello World! I'm a C++ program
If you include comments within the source code of your programs without using the comment characters combinations //, /* or */, the compiler will take them as if they were C++ expressions, most likely causing one or several error messages when you compile it.

SEO Tips

Looking for some free SEO tips? One of the first SEO techniques everyone learns is that the selected search terms must be included in the page title, meta description and, optionally, in the meta keywords tags. Surprisingly, the first of our seo tips is often overlooked and not emphasized enough is that those same search terms must also be in the body text of the page for the tuning to be effective. Most search engine spiders ignore terms in the title, meta description and meta keywords tags if they are not also found in the body.

This may seem obvious but, in over 5 years of consulting for SEO, we have witnessed thousands of cases where the major SEO tags and the body text are not consistent with each other. The surprising part is that these pages can end up in the top 10 in search engine results for millions of search terms, simply because this problem is so common. That makes it pretty easy to break into the top 10 positions on some significant search terms by simply aligning the major SEO tags and the body text. And it is also the best foundation for getting top search ranking for the more competitive search terms.

Here are seven search engine optimization tips you can use:

* SEO TIP #1 Make sure that your targeted search terms are in the body text and/or image alt tags on the page.
* SEO TIP #2 Build your title using your top 2 to 6 search terms. For example, "Widget Works, Inc. - Wholesale Widgets - red widgets wholesale, large widgets wholesale ". For maximum impact, especially on more competitive search terms, keep the length to about 30 characters. Each page should have a unique title.
* SEO TIP #3 Expand on your title to create the meta description tag content. In this example, "With 60 years in the wholesale widget trade, we offer skinny red widgets, industrial red widgets and large aluminum widgets from stock and can also provide custom widgets to your specification. Visit today and see why we are a top wholesale widget distributor". A
* SEO TIP #4 Make sure that your targeted search terms are in the body text and/or image alt tags on the page. Stop! Isn't that what you said search engine optimization tip #1 is? Yes. How many people do you know that are maybe a little overweight, but don't know to lose weight they should exercise more and eat less? It cannot be stressed enough - place the key phrases you want to be found on in the body text.
* SEO TIP #5 Some consider it optional, however, it's not a bad idea to create your meta keywords tag content by copying the important search terms from the meta description tag and separating each term with a comma. In this instance, "wholesale widget, skinny red widgets, industrial red widgets, large widgets, large aluminum widgets, custom widgets, wholesale widget distributor".
* SEO TIP #6 Use your important key phrases in text links to your pages. Avoid statements like "Click here". Instead, link meaningful text to the page, like Don't forget The Best SEO TIP!
* SEO TIP #7 Get professional help. Search engine optimization and tuning is not so technical you can't do it yourself. But there is a lot more to know than these seven search engine optimization tips, and you have more important things to do with your time and a trained professional will ultimately be faster and be a better return on investment. If YOU are that good, and don't have other things to do, we are hiring professional search engine optimizers.

Monday, August 13, 2007

Arti penting warna

Warna merupakan pertimbangan emosional, karena variasi warna dapat menyebabkan
emosi yang berbeda pada tiap orang. Kita semua tahu bahwa hijau adalah
simbol uang (mata duitan), tapi apakah kita tahu juga bahwa hijau merupakan simbol
ketamakan, iri hati, dan kecemburuan? Pilihan warna akan mendapat efek langsung dari pengunjung tentang persepsi perusahaan atau produk kita tawarkan. Ini menjadi rumit dengan adanya fakta bahwa penggunaan warna pada web sekarang tak terbatas: perkembangan teknologi membolehkan kita membuat jutaan kombinasi warna.
Jadi bagaimana dengan pilihan kita? Artikel ini akan membantu mempermudah memahami dasar-dasar dari pemilihan warna.

Ini penting untuk dimengerti bahwa setiap warna ditentukan positif dan negatif dari
emosi yang menghubungkannya dgn itu, mungkin bisa disebut dengan ‘makna warna’. Maksudnya adalah bahwa warna akan mempengaruhi emosional customer bagi perusahan, merek atau produk yang ditawarkan. Jadi ketika memilih skema warna untuk website, atau tipe media lain, anda perlu yakin dengan pemberian warna pada perusahaan atau produk dengan warna-warna yang mengajak audiens untuk selalu memilih web perusahaan atau produk kita
Mari beristirahat sejenak dan melihat ruang makan, kulkas,atau lemari kaca dapur
yang berisi produk yang kita beli dari toko sembako. Warna apa yang kebanyakan kita
lihat? Kebanyakan, dari yang terlihat adalah merah, dan banyak yang lain diantaranya.
Hanya sekilas terlihat dilemari kaca, sekarang apakah kita tahu apa yang terlihat di
dalamnya itu,produk yang penuh dng warna merah.Chef Boyardee,Kellogg’s,Lipton,Carnation, Ragu, aunt Jemima,Betty Crocker,Orville Redenbacher’s, Heinz, Pam, semua merek ini menggunakan label merah. Mengapa? Merah Adalah suatu warna” panas”, dan sangat emosional juga. Didalam studi, merah benar-benar mempunyai suatu phisik mempengaruhi orang-orang, meningkan jantung dan menyebabkan tekanan darah untuk naik, menarik perhatian kita, tindakan keributan.
dan suatu warna yang sangat kuat untuk produk pembungkus.

Semua warna yang pas/cocok dimasukkan ke dalam tiga kategori; sejuk, hangat
dan netral. Sedangkan kita bisa memilih semua warna yang kita suka dari kategori
yang sama,itu mungkin sering mencapai efek yang lebih sangat kuat dengan memperkenalkan warna dari satu di antara kelompok yang lain. Mari kita liat pandangan/persepsi sekarang bagaimana warna-warna bekerja bersama dan masing2 warna berarti bagi yang melihatnya.

Warna-warna sejuk
Biru, Hijau, Ungu, Pirus dan Perak adalah warna-warna sejuk.
Warna-warna sejuk cenderung berpengaruh memberikan perasaan tenang bagi yang melihatnya.
Meskipun digunakan sendiri, warna-warna ini bisa mempunyai rasa dingin atau impersonal, oleh sebab itu memilih warna-warna sejuk, mungkin bijaksana untuk menambahkan warna dari kelompok lain untuk menghindari ini.

Berikut beberapa makna dari beberapa warna sejuk:
Biru
Positif: keheningan, mencintai, kesetiaan, keamanan, percaya, intelligence
Negatif: kedinginan, ketakutan, kejantanan

Hijau
Positif: uang, pertumbuhan, kesuburan, kesegaran, healing
Negatif: iri hati, kecemburuan, kesalahan, kekacauan

Ungu
-Ungu adalah kombinasi biru dan merah, oleh sebab itu ditemukan baik kategori-kategori
hangat maupun sejuk
Positif: raja, kaum ningrat, spirituality, kemewahan, ambition
Negatif: misteri, kemasgulan

Pirus
Positif: rohani, sembuh, perlindungan, sophisticated
Negatif: cemburu, kewanitaan

Perak
Positif: glamor, tinggi, anggun, sleek
Negatif: pengkhayal, tidak tulus

Warna Hangat
Merah, merah muda, kuning, orange, warna ungu, dan emas adalah warna hangat.
Warna hangat cenderung mempunyai suatu efek kegairahan bagi yang melihatnya.
Bagaimanapun ketika warna ini digunakan sendiri dapat menstimulasi,
membangitkan emosi kekerasan/kehebatan dan kemarahan. Ketika memilih nada hangat,
menambahkan warna dari kelompok yang lain akan membantu ke arah menyeimbangkan ini.

Berikut beberapa makna dari beberapa warna hangat:

Merah
positif: cinta, energi, kuasa, kekuatan, penderitaan, panas
negatif: kemarahan, bahaya, peringatan, ketidaksabaran

Merah muda
positif: sehat, bahagia, feminin, rasa kasihan, manis, suka melucu
negatif: kelemahan, kewanitaan, ketidak dewasaan

Kuning
positif: terang/cerdas, energi, matahari, kreativitas, akal, bahagia
negatif: penakut, tidak bertanggungjawab, tidak stabil

Orange
positif: keberanian, kepercayaan, kehangatan/keramahan, keakraban, sukses
negatif: ketidak-tahuan, melempem, keunggulan

Ungu
- Warna ungu ditemukan di dalam kedua-duanya warna dingin dan hangat
positif: royalti, kebangsawanan, kerohanian, kemewahan, ambisi
negatif: kegaiban, kemurungan

Emas
positif: kekayaan, kemakmuran, berharga, tradisional
negatif: ketamakan, pemimpi

Warna Netral
Coklat, berwarna coklat, gading, kelabu, putih dan hitam adalah warna netral.
Warna netral adalah suatu pemilihan agung untuk bergaul dengan suatu palet(lukis)
hangat atau dingin. warna-warna itu adalah yang baik untuk latar belakang dalam
suatu disain, dan juga cenderung untuk berbicara lebih pelan, penggunaan dari yang lain
lebih menaklukkan warna. Tambahkan hitam untuk menciptakan suatu yang lebih gelap
” keteduhan” tentang suatu warna utama, sedang putih ditambahkan untuk menciptakan
suatu tongkang/geretan ” warna”.

Berikut beberapa makna dari beberapa warna netral:

Hitam
positif: perlindungan, dramatis, serius, bergaya/anggun, formalitas
negatif: kerahasiaan, kematian, kejahatan/ malapetaka, kegaiban

Kelabu
positif: keamanan, keandalan, kecerdasan/inteligen, padat, konservatif
negatif: muram, sedih, konservatif

Cokelat
positif: ramah, bumi, keluar rumah, umur panjang, konservatif
negatif: dogmatis, konservatif

Tan ( wol halus yang masih putih)
positif: ketergantungan, fleksibel, keriting, konservatif
negatif: tumpul, membosankan, konservatif

Gading
positif: ketenangan, kenyamanan, kebersihan/kesucian, hangat
negatif: lemah, tidak stabil

Putih
positif: kebaikan, keadaan tak bersalah, kemurnian, segar, gampang, bersih
negatif: musim dingin, dingin, jauh

Kita mungkin bertanya-tanya, ” Apa yang merupakan kebenaran mewarnai kombinasi
untuk bisnis website?” Selagi tidak ada kemutlakan “kebenaran” untuk mewarnai
website, kamu perlu memahami target pendengar, dan mempertimbangkan tanggapan mereka tentang warna, yang tidak dimilik. Jika gol akhir adalah untuk memilih produk atau perusahaan, kemudian palet warna harus ditetapkan. Ada keseluruhan faktor
yang menandai apa yang pengunjung suka atau tidak suka.

Faktor dasar target pengunjung untuk dipertimbangkan adalah perbedaan umur/zaman,
perbedaan kelas, perbedaan jenis kelamin dan keseluruhan kecenderungan warna.
(Dilist)
Perbedaan umur/zaman adalah suatu faktor pokok yang tidak boleh diabaikan.
Jika anak remaja dan anak-anak adalah target pengunjung, kemudian mereka menyukai
terang, warna dasar, warna primer merah, biru, kuning dan hijau.
Bagaimanapun, berbeda dengan orang dewasa, lebih tua, mereka akan menyukai
warna yang lebih gelap, sama dengan mewarnai dari kelompok warna-warna
yang netral.

Perbedaan kelas adalah faktor pokok yang lain di dalam memilih warna.
Riset Amerika Serikat telah menunjukkan kelas pekerja menyukai warna
seperti biru, merah, hijau, dan lain lain .
yang lebih terdidik cenderung untuk menyukai yang lebih mengaburkan
warna seperti taupe, warna biru langit, celadon, ikan salem, dll.

Perbedaan jenis kelamin adalah suatu faktor nyata didalam memilih warna.
laki-laki cenderung untuk menyukai warna cool seperti hijau dan biru, di mana wanita
menyukai warna lebih hangat, merah dan orange. Jika kita mempunyai pendengar/pemerhati keduanya para laki-laki dan perempuan, yang akan mempertimbangkan pencampuran beberapa warna dari palet cool dan hangat kepada keduanya laki-laki dan perempuan dapat bertanya pada mereka.

Yang terakhir tapi bukan tidak penting adalah kecenderungan warna. Menurut definisi,
suatu kecenderungan berarti “tren”. Memilih warna yang populer boleh2 saja
untuk beberapa bentuk websites dan produk, tetapi jika kita ingin menyajikan
umur yang panjang dan stabilitas web, kemudian warna populer tidak memungkinkan jadi yang terbaik untuk web kita. Sebagai gantinya, kita boleh mempertimbangkan warna yang lebih tradisional yang berdiri dari waktu ke waktu.

Memilih warna lebih kepada mengambil apa yang dirasa baik oleh kita, adalah menimbulkan suatu tanggapan lain dari yang melihat web kita. Dengan mengetahui target
dan efek yang berbeda dari warna yang ditimbulkan, kita memperoleh suatu kemampuan
lebih besar untuk menentukan apa yang menjadi warna terbaik untuk menarik pengunjung.

Satu catatan terakhir tentang warna. Pengunjung web biasanya menggunakan monitor berbeda, browsers berbeda , dan sistem operasi berbeda. Itu hampir mustahil untuk memastikan bahwa warna yang kita buat akan sama pada tiap-tiap komputer seperti halnya sedang dicetak.
Jangan hanya terkait dengan perbedaan pada komputer yang berbeda, tetapi bagaimana kita mencoba menjadikan konsisten. Bagaimana kita menciptakan suatu palet warna untuk perusahaan,identitas merek, atau warna produk, konsistensi adalah kunci. Gunakanlah warna yang sama pada seluruh usaha pemasaran untuk menciptakan keakraban dengan produk atau perusahaan. Konsistensi akan membantu menarik pengunjung.