Tutorial Blog

Senin, 23 April 2012

Mencari jumlah karakter

Assalamualaikum...


Program untuk mencari jumlah karakter. . .
cekidot gan . . .


Bismillah...



public class indekstring {
public static void main (String[]yoga){
String kalimat= "kalimat dapat diganti sesukanya";
int[] indeks= new int [kalimat.length()];
System.out.println("String yg digunakan : "+kalimat);
System.out.println("Karakter a ditemukan pada indeks");
for (int i=0;i<kalimat.length();i++)

indeks[i]=kalimat.indexOf ('a',i);}
int jumlah =0;
int k=0;
int j;
while (k<(kalimat.length()-1))
{
if(indeks[k]==-1)
break;
j=k+1;
if(indeks[j]!=indeks[k]){
jumlah++;
if(jumlah==1)
System.out.println(indeks[k]);
System.out.println(indeks[j]);
k=j;
}
else 
k++;
}
System.out.println("Panjang sting "+kalimat.length());
System.out.println("Jumlah karakter yg ditemukan "+(jumlah+1));
}
}
Output




Read More..

Program C++ : fungsi virtual

Assalamualaikum...


Langsung aja gan contoh program C++ mengenai fungsi virtual. . .
Cekidot :D


Bismillah...



<#include <iostream>

#include <conio.h>


using namespace std;


class induk{

public :

virtual int cetak(int p){

return p*p;

}

int cetak1(int p){

return cetak(p)/2;

}

};


class turunan: public induk{

public :

int cetak(int p){

return p*p*p;

}

};


int main(){

turunan A;

cout<<"hasil fungsi virtual : "<<A.cetak(5)<<endl;


cout<<"hasil fungsi biasa : "<<A.cetak1(5);

_getch();


return 0;


}
Output




Read More..

Minggu, 22 April 2012

Cara Membuat Menu Dropdown Pada Blogger

Dropdown menu adalah menu yang berisi sekumpulan teks atau link yang disingkat menjadi sebuah menu tunggal.


Contoh tampilannya seperti ini:



Isinya hanya akan tampil jika anda mengklik pada menu tersebut sehingga bisa hemat ruangan blog. Cara ini bisa dijadikan sebagai alternatif blogroll atau kebutuhan lainnya.

Nah untuk membuatnya, caranya sangat mudah:


1. Login ke Blogger. Klik menu Design-> Page Elements
2. Klik Add a Gadget -> HTML/ Javascript
3. Masukkan kode dibawah ini kedalam kotak



<select onChange="document.location.href=this.options[this.selectedIndex].
value;">

<option value="http://alamatblog.com/#" selected>Blogroll</option> 
<option value="http://alamatLink.com/">Nama Link</option>
 
<option value="http://alamatLink.com/">Nama Link</option>
 
<option value="http://alamatLink.com/">Nama Link</option>
 
</select>



Jika anda ingin menambah link baru lagi tambahkan kode 

<option value="http://alamatLink.com/">Nama Link</option> diatas 
</select>
Ganti alamatblog dengan dengan alamat blog anda.
Ganti teks berwarna merah dengan alamat link yang ingin dipasang.
Ganti teks berwarna biru dengan nama link yang ingin ditampilkan.


4. Jika sudah klik Save. Selesai


Warning:
kode diatas untuk membuka link dalam halaman yang sama. Jika anda ingin membuka link pada halaman baru. Ganti kode



<select onChange="document.location.href=this.options[this.selectedIndex].
value;">
Menjadi


<select onchange="javascript:window.open(this.options[this.selectedIndex].
value);">
Good luck . . . 
Read More..

Membuat Readmore Otomatis (auto readmore)

Assalamualaikum...


  Biasanya biar gak terlalu panjang, maka postingan pada halaman depan itu disingkat, maksudnya yang tadinya panjang hanya sebagian saja yang ditampilkan, nah untuk membuat yang semacam itu menggunakan read more, jika pembaca ingin melanjutkan membaca postingan tersebut yaitu dengan cara mengklik read more atau bahasa indo nya baca selengkapnya . . .
   Dari pada membuat read more secara manual yang ribet dan banyak kendalanya bagi blog yang terlanjur sudah memiliki banyak artikel tentu akan banyak makan waktu dan tenaga untuk mengedit satu persatu. . .

Langsung aja gan nih cara-caranya, cekidot . . .

Bismillah....
Image


(1)


(2)


(3)

Selanjutnya,cari kode </head>,setelah ketemu tepat diATASnya letakkan kode javascript berikut :


<script type='text/javascript'>
var thumbnail_mode = &quot;float&quot; ;
summary_noimg = 150;
summary_img = 150;
img_thumb_height = 100;
img_thumb_width = 120;
</script>

<script type='text/javascript'>
//<![CDATA[
/******************************************
Auto-readmore link script, version 2.0 (for blogspot)

(C)2008 by Anhvo

visit http://en.vietwebguide.com to get more cool hacks
********************************************/
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}

function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = summary_noimg;
if(img.length>=1) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
summ = summary_img;
}

var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;
}
//]]>
</script>



Kemudian cari kembali kode <data:post.body/> atau <p><data:post.body/></p>hapus kode tersebut dan gantilah dengan kode berikut:


<b:if cond='data:blog.pageType != &quot;item&quot;'>
<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>
<span style='float:right'><a expr:href='data:post.url'>Read More..</a></span> 
<b:else/>
<data:post.body/>
</b:if> 


Lalu simpan templates dan lihat hasilnya.
Untuk yang terlanjur menggunakan read more secara manual seperti di sini,tinggal hapus kode:


 <b:if cond='data:post.hasJumpLink'>
      <div class='jump-link'>
        <a expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'><data:post.jumpText/></a>
      </div>
    </b:if>


Selamat mencoba. . :D
Read More..

Kamis, 19 April 2012

Membuat Buku Tamu Tersembunyi di Blog

Buku tamu merupakan salah satu hal yang tidak wajib ada di blog kita, namun buku tamu bisa mempercantik blog kita. Selain itu pengunjung blog kita bisa dengan mudah menyapa kita sebagai admin (atau pengunjung lainnya), walau cuma sebatas kalimat (mampir gan, malam, kunjungi blog saya juga ya, dsb...)



Read More..

Senin, 16 April 2012

Program Travel

Assalamualaikum...


ini gan program travel berguna untuk menghitung harga tiket dengan tujuan berbeda-beda,,begitulah...
cekidot..


Bismillah...
Read More..

Membuat matrik dengan menggunakan Array

Assalamualaikum...


langsung aja gan..
cekidot..


Bismillah...

Read More..

Program untuk memanggil class berbeda

Assalamualaikum...


nih gan program berbeda,, misalnya kita membuat satu program untuk di jalankan lalu kita membuat class berbeda untuk melakukan perhitungan...
langsung aja gan cekidot contohnya...


Bismillah...
Read More..

Cara mengatasi tampilan game full screen pada windows 7

Untuk para pengguna VGA NVIDIA Geforce :
  • Langkah pertama matikan dulu aero dan juga matikan UAC
  • kemudian klik kanan pada tampilan dekstop kamu
  • klik Nvidia Control Panel
  • Pilih Advance Setting
Read More..

Kamis, 12 April 2012

Kaldr – The Ancient Apparition

Versi Map : 6.73c
Photobucket

Defeated in a battle long forgotten, this once great mage was banished to a tomb of ice for all eternity. For countless ages he lay in unbearable anguish until he was discovered by minions of the Lich King. In a vain attempt to gain favour with this ancient soul for his own purposes, the Lich King released him. But this soul no longer knew gratitude, it no longer knew friend from foe, it knew only pain. With its body long since decayed, the soul took up the only form it knew. Consumed with hatred, even a touch from this monstrosity causes agony. Able to conjure devastating ice storms with a mere thought and hurl soul-shattering bolts of frost seemingly impossible distances, this creature punishes all who dare to stand their ground against it.
Read More..

Vol’jin – The Witch Doctor

Versi Map : 6.72f
Photobucket

Vol'Jin is a risk-taker. Anyone who has ever crossed paths with him can tell you that. As a voodoo priest, you need a certain degree of it. It's too bad he never learned the value of discretion. Vol'Jin's experiments in jungle magic yielded brilliant results- the ability to mend wounds, casks filled with paralyzing combinations of herbs that could scatter for miles, and even a curse capable of stripping the life force from a living being. Of course, no amount of power gained goes without notice. As Vol'Jin's experiments became more and more unstable and destructive, the Lich King made his move.
Read More..

Leshrac the Malicious - Tormented Soul

Photobucket

Torment around me. Torment in me. Torment be with me. And let us conquer our foes. They do not understand our pain. Do you? No. Not a soul can. And for that, We shall make them feel the torment... The torment that inhabits my soul.
Read More..

Visage – The Necro’lic

Photobucket

A terrifying spirit created by uniting a thousand of souls of the warriors fell in the War of the Magi; Visage roams this world with never-ending thirst for souls. This restless ghost consumes the essence of the enemies he slays, and the death moan of his victims is what he enjoys the most. The weakening power of his wrath puts even the greatest warriors in misery, and the sight of sky filled with Visage and his undead minions is unimaginable. He is a nightmare in its worst, most sickening form, a true living horror, the Necro'lic.
Read More..

Kael – The Invoker



Quas. Wex. Exort. The essence of a storm. The heart of a blizzard. The soul of a phoenix. After his people were broken and scattered to the corners of the earth, Kael was left with only the relics of his once great world. Thirsting for vengeance, he sold his own soul to Ner'Zhul, and in exchange acquired near limitless power. Taking on the mantle of the Blood Mages of old, the Invoker strode into war with nothing but the elements at his command. He can fuse the elements into deadly incantations, tearing apart the very heavens in his fury. His genius knows no bounds, and the Sentinel shall come to know the rage of the Invoker.
Read More..

Dazzle – The Shadow Priest

Versi Map : 6.72c
Photobucket

Little is known to the Shadowtooth Clan, likely because this group of shadowy trolls never unveil the secrets of their mystifying sacrament. Nevertheless, the Loa they worship is much more powerful than most elementals, thus their favors must be kept in confidentiality. In return, these Primal Gods granted these trolls the power over paralyzing toxins, life-bending voodoo, and even endowment of life beyond the grave. A living eternity of death and misery, Dazzle now marches within the ranks of the undead, announcing the apocalypse of the Scourge that may lead them to much anticipated ascendancy.
Read More..

Jin’zakk – The Batrider


Once an expendable spy, Jin'zakk has outlived the suicidal tendencies of other Bat Riders to create a unique style, one that favours control and precision instead of wanton destruction. His years of battle experience have allowed him to innovate creative uses for his fiery arts: He can douse enemies in a bath of sticky oil that restricts their movements before igniting it, fire an explosive that blows enemies away, or take flight to leave behind a trail of flame. However, his most deadly skill involves lassoing his opponent and dragging the unfortunate foe into the arms of his allies.
Read More..

Eredar – The Shadow Demon


Long before the war of the Scourge and the Sentinel, an ancient demon named Eredar waged war on all creation. No champion of Light could match him, but he was betrayed and killed by his own underlings. However, the faintest sliver of his shadow survived; over the millenia Eredar regained a portion of his former being and grows stronger each day, but in a twist of fate his new form was that of a gnoll. Eredar's new form is not well suited to direct confrontation, but he knows a number of objurations and tricks to deal with his foes; his skills include banishment, poison, curses, and darker demonic arts.
Read More..

Demnok Lannik – The Warlock

Photobucket

Former cultist of the Blacksun, Lannik was among the first of many orcs enslaved by the wretched demons when the Legion's taint befell the lands of Kalimdor - a dire affliction that grew stronger over the years. Mannoroth's sudden and unexpected demise severed this Warlock's ties to demonology, and the absence of its corrupting influenced caused his body to wither onto the verge of death. In exchange for life beyond the grave, he bound a pact with the Lich King.
Read More..

Akasha – The Queen of Pain

Photobucket

Akasha is one of the many souls claimed by the blade, Frostmourne. Raised to serve the Lich King as a Banshee, she desired to become pure substance once more. Driving deep into the forests, she was able to subdue and possess a Succubus minion. Rightly bearing the title, Queen of Pain, she enjoys nothing more than inflicting massive damage on her foes, using both the poisonous strikes of her succubus host and the vicious howls retained from her Banshee nature. Akasha breaks her enemies' eardrums with torturing screams, some so loud they manifest into powerful waves that ripple across the lands, shattering all in their wake.
Read More..

Harbinger – The Obsidian Destroyer

Photobucket

An obsidian construct brought to life through the ill conceived necromancy of the Lich King, Harbinger craves magic to make up for the emptiness brought on by the incomplete nature of its summoning. Ironically however, to devour the magic that it so desires, Harbinger must tap into his own pool of mana time and time again, expending to the point where it ends up with even less than it began with. Yet despite this, the Obsidian Destroyer is a proud servant of the Undead Scourge, and takes great pleasure in annihilating the foolish Sentinels it encounters through psionic exploitation.
Read More..

Pugna – The Oblivion

Photobucket

Forcefully raised from the dead with little memory of his former self, Pugna is truly a terrible sight to behold. Retaining traces of necromantic magic, this shamble of bones finds sadistic pleasure in temporarily sending his enemies into a tormented dimension and greeting their return with a blast of unholy energy. Those who survived an encounter with the horror often recount with fearful eyes of how the Oblivion literally drains life from his enemies, giving him a brief, but satisfying, taste of the living.
Read More..

Rotund' jere – The Necrolyte


Slain for sins of heresy by men who declared themselves holy, death only gifted Rotund'jere with an immense wrath for the living, that he can express by sending evil spirits at his foes. Taking pleasure and growing more powerful every time a living thing dies by his hands, each step of his reeks of death, and his very presence makes living things rot and wither. Now a master of torture and pain, the Necrolyte mercilessly slays any weaklings who might cross his path, always with a nasty smile on his dead face.
Read More..

Kel'Thuzad – The Lich


Forcibly raised from the dead by the Lich King to serve as his elite magical guard, the Lich has the burning cold of Northrend in his realm of control. Evoking numerous freezing blasts, his talent in life still remains in death. Delving into the essence of cold magic, he has the power to cause ice to condense into an orb that bounces from foe to foe, causing tremendous pain in its wake. Sacrificing his allies for magical power, the Lich is a murderer without a trace of warmth.
Read More..

Darchrow – The Enigma



The result of a collapsed star entombed within a field of elemental magic, Darchrow is one of the most dangerous beings in existence, consuming hundreds of worlds into the void of his hate and hunger. He is not above using his own allies as portals for his own servants to come through. Capable of manipulating both void and shadow in combat, his greatest pleasure is to release the oblivion within him upon the world, creating an abyss that draws enemies ever closer to destruction.
Read More..

Lion – The Demon Witch

Versi Map : 6.73


A renegade wizard who delved deeper in studying demonic arts, this old aged archmagus was sentenced to damnation by the Dalaran council. As a last resort of escaping death, he performed a forbidden ritual and sold his soul to Archimonde's bidding. Without trace of compassion and with a twisted mind, he seeks retribution to his comrades. He commands earth to stagger those who hinders his path with sharp spikes or siphons their will out. Never hesitating to transmogrify others to impunity nor doubtful of ripping his enemy inward out with his fatal touch, Lion like a predator loves doing it all over again.
Read More..

Krobelus – The Death Prophet



Krobelus spent her living days as a fervent member of a cult of Death Sayers. Her belief in the ways of death and the perfect harmony it brings has given her dead spirit a chance to wreak havoc among the chaotic living. She uses her abilities to call upon carnivorous bats and long dead spirits to lay to rest all who still pump blood through their veins. She augments her powers through the use of witchcraft, and she is able to make opponents gape in fear, losing the focus needed to cast spells. She is devoted to death in all it's aspects, and would see all turned to ash.
Read More..

Ish'kafel – The Dark Seer

Photobucket

Thought by some to be among the most cunning and manipulative among the Scourge's varied champions, the dark seer Ish'kafel, living in exile from his people, is also the most secretive, for he speaks to no one but the Lich King himself. His unconventional talents, which lie in augmenting himself and allies with a variety of both defensive and offensive supportive castings, are quite unusual and versatile, often capable of turning the tide of battle before it even starts.
Read More..

Atropos - The Bane Elemental

Versi Map : 6.73

Atropos is an elemental force personifying the nightmares and fear of this world. He manifests where there is promise of inflicting horror and feeding off dread. Sapping his foes' psyche heals him. Manifesting his enemies' fears, he greatly enfeebles their ability to fight. He revels in disabling foes by sending them into dread slumber. When need be he can rip his soul and force it into his foes, effectively immobilizing them with despair and pain. Atropos is, in one word, Fear.
Read More..

Dragonus - Skywrath Mage


Read More..

Rubick - The Grand Magus

Vesi Map : 6.73b

Rubick, the son of Aghanim, is a force to be reckoned with. Crowds marvel in wonder at his effortless ability to hurl objects through the air, using nothing but his mind. Many wizards have challenged him yet none have surpassed his powerful and debilitating magics. The Grand Magus, with his endless talent, will stop at nothing to bewilder and outsmart his enemies, even if it means turning their own magic against them. Renowned for his unique ability to steal magics with a mere thought, he is undeniably a favorable asset to the Sentinel in their fight against the Scourge.
Read More..

Rhasta – The Shadow Shaman


Once a gifted troll witch doctor, young Rhasta was well versed with the secrets of voodoo magic. When the war between the Sentinel and the Scourge began, Rhasta, then a Shadow Hunter, offered his allegiance to the Sentinels to vanquish the Scourge once and for all. While he was gifted as a witch doctor, Rhasta is a genius as a shadow hunter, exceeding his master by mastering the art of summoning multiple serpent wards, binding enemies for a short time and casting elemental lightning to several units.
Read More..

Boush – The Tinker



Goblin engineering was always innovative, but Boush brought it to such extreme that most refuse to believe that his powers lie in machine and rather think that he fights with magic. He can shoot focused light and homing projectiles as powerful and as flashy as most destructive Elven Arcane spells. It is said that not even best Necromancers can raise armies comparable to seemingly endless amount of clockwork goblins that Boush can easily summon. And while some refuse to believe in his machinery skills and other call him the master artist of engineering, none can deny the destructive force of his goblin.
Read More..

Jakiro – The Twin Head Dragon

Versi Map : 6.73
Photobucket

Originally found gnawing at the roots of the World Tree during an excavation, this magnificent Chimaera's age is impossible to determine. With his large snapping heads and aggressive, unpredictable behavior, Jakiro is an intimidating creature to say the least, yet is loyal to the Sentinel for reasons all his own. Due to his mystical nature, he has a strange affinity with the elemental forces of ice and fire. This allows him to devastate all in his path, and he is more than capable of keeping his opponents in his line of fury. The Scourge would do best to be wary of this dragon, lest they all freeze and shatter as their precious Frozen Throne melts before their eyes.
Read More..