Sabtu, 25 Desember 2010

Secreat File

c:\>copy /b 123.jpg+123.rar gabung.jpg

Rabu, 10 November 2010

in php we usualy use $_GET['variable_name']


but in joomla 15 we user

JRequest::getVar('parametername');


to get parameter from form with action get

Selasa, 09 November 2010

Simple modul Joomla 15

defined('_JEXEC') or die('Restricted access');

$items = $params->get('items', 1);
$db =& JFactory::getDBO();
$query = "SELECT id, title, author, synopsis FROM #__books WHERE published = '1' ORDER BY id DESC";
$db->setQuery( $query, 0 , $items ); // hanya mencetak sebuah record yang ada
$rows = $db->loadObjectList();
foreach($rows as $row)
{
echo 'id.'&task=view&title='.$row->title).'">'.$row->title.'';
echo '('.$row->author.')
';
echo substr($row->synopsis,0,25).'...
';
}

Minggu, 24 Oktober 2010

MethodParameter

class MethodParameter
{
/*
static int num1 =3;
static int num2 =5;
*/
static int answer =0;

public static void main(String[] args)
{
int result = yes(4,7);
System.out.println(result);
}

private static int yes(int num1,int num2)
{
answer = num1+num2;
return answer;
}
};

Java Method Jumlah

class Jumlah
{
static int num1 = 8;
static int num2 = 7;
static int answer = 0;
public static void main(String[] args)
{
System.out.println(jumlah());
}

private static int jumlah()
{
answer = num1 + num2;
return answer;
}

}

Java Method

class Hello
{
public static void main(String[] args){
yes();
}
private static void yes()
{
System.out.println(" Cetak ini ");
}

}

Selasa, 14 September 2010

free mail server

  1. Zimbra
  2. Argosoft
  3. Kerio

Minggu, 28 Februari 2010

IPaddessExample.cs

using System; // For String and Console
using System.Net; // For Dns, IPHostEntry, IPAddress
using System.Net.Sockets; // For SocketException

class IPAddressExample {

static void PrintHostInfo(String host) {

try {
IPHostEntry hostInfo;

// Attempt to resolve DNS for given host or address
hostInfo = Dns.Resolve(host);

// Display the primary host name
Console.WriteLine("\tCanonical Name: " + hostInfo.HostName);

// Display list of IP addresses for this host
Console.Write("\tIP Addresses: ");
foreach (IPAddress ipaddr in hostInfo.AddressList) {
Console.Write(ipaddr.ToString() + " ");
}
Console.WriteLine();

// Display list of alias names for this host
Console.Write("\tAliases: ");
foreach (String alias in hostInfo.Aliases) {
Console.Write(alias + " ");
}
Console.WriteLine("\n");
} catch (Exception) {
Console.WriteLine("\tUnable to resolve host: " + host + "\n");
}
}

static void Main(string[] args) {

// Get and print local host info
try {
Console.WriteLine("Local Host:");
String localHostName = Dns.GetHostName();
Console.WriteLine("\tHost Name: " + localHostName);

PrintHostInfo(localHostName);
} catch (Exception) {
Console.WriteLine("Unable to resolve local host\n");
}

// Get and print info for hosts given on command line
foreach (String arg in args) {
Console.WriteLine(arg + ":");
PrintHostInfo(arg);
}
}
}