Senin, 16 Desember 2013

artikel tentang Mesran.net








 Mesran.net adalah salah satu website tempat belajar bahasa pemrograman. Di mesran.net teman-teman dapat menemukan berbagai macam artikel tentang bahasa pemrograman mulai dari VB.NET, Prog. Java, Visual Basic, Prog. Pascal dll. Di mesran.net teman-teman juga dapat langsung bertanya dengan berkomentar, pasti setiap pertanyaan sobat akan di jawab.

Mesran.net merupakan salah satu dari sekian banyak website tempat belajar bahasa pemrograman yang menurut saya cukup lengkap. Di mesran.net teman-teman juga dapat menemukan berbagai macam informasi yang tentunya berguna buat sobat, dan mesran.net merupakan tempat mahasiswa/I Budidarma belajar bahasa pemrograman. Apalagi di Akhir semester mesran.net akan menjadi tempat yang ramai di kunjungi mahasiswa/I Budidarma, untuk melihat Nilai atau IP selama belajar satu semester.

Program Pembelian Barang

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        KB.Items.Add("TS0001")
        KB.Items.Add("TS0002")
        KB.Items.Add("VG0001")
        KB.Items.Add("VG0002")

        Call BuatTabel()

    End Sub
    Sub BuatTabel()
        LV.Columns.Add("No. Pembelian", 80, HorizontalAlignment.Center)
        LV.Columns.Add("Kode Barang", 180, HorizontalAlignment.Center)
        LV.Columns.Add("Nama Barang", 180, HorizontalAlignment.Center)
        LV.Columns.Add("Merk", 180, HorizontalAlignment.Center)
        LV.Columns.Add("Harga", 180, HorizontalAlignment.Center)
        LV.Columns.Add("Jumlah Beli", 180, HorizontalAlignment.Center)
        LV.Columns.Add("Total Harga", 180, HorizontalAlignment.Center)

        LV.View = View.Details
        LV.GridLines = True
        LV.FullRowSelect = True
    End Sub
    Sub isitabel()
        Dim Lst As New ListViewItem
        Lst.Text = NP.Text
        Lst.SubItems.Add(KB.Text)
        Lst.SubItems.Add(NB.Text)
        Lst.SubItems.Add(merk.Text)
        Lst.SubItems.Add(Harga.Text)
        Lst.SubItems.Add(JB.Text)
        Lst.SubItems.Add(TH.Text)

        LV.Items.Add(Lst)
    End Sub

       Private Sub SkL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SkL.Click
        Call isitabel()
    End Sub

    Private Sub KB_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KB.SelectedIndexChanged
        Dim x As String
        x = Microsoft.VisualBasic.Left(KB.Text, 2)
        If x = "TS" Then
            merk.Text = "Toshiba"
        ElseIf x = "TS" Then
            merk.Text = "Toshiba"
        ElseIf x = "VG" Then
            merk.Text = "V-Gen"
        ElseIf x = "VG" Then
            merk.Text = "V-Gen"
        End If
        x = Microsoft.VisualBasic.Right(KB.Text, 3)
        If x = "001" Then
            NB.Text = "Flashdisk 4 GB"
        ElseIf x = "TS" Then
            NB.Text = "Flashdisk 2 GB"
        ElseIf x = "VG" Then
            NB.Text = "Flashdisk 4 GB"
        ElseIf x = "VG" Then
            NB.Text = "Flashdisk 2 GB"
        End If
    End Sub

    Private Sub TH_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TH.KeyPress
        TH.Text = Harga.Text * JB.Text

    End Sub

       Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keluar.Click
        End

    End Sub

    Private Sub Bersih_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bersih.Click
        NP.Text = ""
        KB.Text = ""
        NB.Text = ""
        merk.Text = ""
        Harga.Text = ""
        JB.Text = ""
        TH.Text = ""

    End Sub

    Private Sub HSD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HSD.Click
        LV.Items.Remove(LV.SelectedItems(0))
    End Sub

    Private Sub HDP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HDP.Click
        LV.Items.Clear()
    End Sub
End Class


Minggu, 02 Juni 2013

Yuk! Belajar Konsep Pemrograman Di Mesran.Blogspot.Com


#include "iostream.h"
#include "conio.h"
void main()
{
int i ;
jawaban soal 1:
clrscr ();
cout <<" nilai keterangan \n";
cout <<".................";
for (i:1; i<=5; i++) {
cout<<i<<"\n";
}


jawaban soal 2;

#include"iostream.h"
#include"conio.h"

void main()
{
    int HPL,JLr=0;
    clrscr();
    cout<<"menghitung jumlah harga\n____________";
    cout<<"masukkan HPL:";
        cin>>"harga;

    harga=HPL*jumlah Lembar;
    cout<<jumlah Lembar:"<<JL;
}


supriantoni
npm:12110950
mesran.net


Jumat, 31 Mei 2013

Network Programming with Perl

Perl has been called the glue that holds the Internet together because it is an extremely powerful text processing and CGI programming language. Although Perl was designed in the beginning to be a text manipulation language, it has evolved into a potent multi-purpose programming language. One area in which Perl has shown its power is that of network programming.
Perl makes network programming easy by providing built-in functions that can be used to create low-level client/server programs from scratch. Also, many modules are freely available that make programming common networking tasks simple and quick. These tasks include pinging remote machines, TELNET and FTP sessions. This article presents examples of each of these types of network programs.
Introduction
Client/server network programming requires a server running on one machine to serve one or more clients running on either the same machine or different machines. These different machines can be located anywhere on the network.
To create a server, simply perform the following steps using the built-in Perl function indicated:
  • Create a socket with socket.
  • Bind the socket to a port address with bind.
  • Listen to the socket at the port address with listen.
  • Accept client connections with accept.
Establishing a client is even easier:
  • Create a socket with socket.
  • Connect (the socket) to the remote machine with connect.
Several other required functions and variables are defined in the Socket.pm module. This module is probably already installed on your machine, but if not, it is available at the Comprehensive Perl Archive Network (CPAN), the official Perl source code repository (see Resources). To use this module in our programs, the following statement is required at the top of the program:
use Socket;
This statement will locate the file Socket.pm and import all of its exported functions and variables.
Viewing Module Documentation
All examples in this article use modules that are available at no cost from CPAN.
Perl modules are usually self-documenting. If the author of the module follows the generally accepted rules of creating a Perl module, they will add Plain Old Documentation (POD) to the module's .pm file. One way to view the POD for the Socket module (assuming Perl and Socket.pm were installed correctly) is to execute the following at the shell:
perldoc Socket
This command displays Socket.pm's POD converted to a man page. The output is a relatively thorough discussion of the functions and variables defined in this module.
Another way to view the documentation is to convert the POD to text using:
pod2text \
/usr/lib/perl5/i686-linux/5.00404/Socket.pm | more
The program pod2text is included in the Perl distribution, as are the programs pod2html, pod2man, pod2usage and pod2latex.
A Simple Server
Listing 1.
Our first programming example is a simple server running on one machine that can service only one client program at a time connecting from the same or a different machine. Recall that the steps for creating a server were to create a socket, bind it to a port, listen at the port and accept client connections.
Listing 1, server1.pl, is the source code for this simple server. First, it is generally a good idea to compile using Perl's strict rules:
use strict;
This requires all variables to be declared with the my function before they are used. Using my may be inconvenient, but it can catch many common syntactically correct yet logically incorrect programming bugs.
The variable $port is assigned the first command-line argument or port 7890 as the default. When choosing a port for your server, pick one that is unused on your machine. Note that the only way to ensure you select a port that does not have a predefined use is to look at the appropriate RFC (see Resources).
Next, the socket is created using the socket function. A socket is like a file handle—it can be read from, written to or both. The function setsockopt is called to ensure that the port will be immediately reusable.
The sockaddr_in function obtains a port on the server. The argument INADDR_ANY chooses one of the server's virtual IP addresses. You could instead decide to bind only one of the virtual IP addresses by replacing INADDR_ANY with
inet_aton("192.168.1.1")
or
gethostbyname("server.onsight.com")
The bind function binds the socket to the port, i.e., plugs the socket into that port. Then, the listen function causes the server to begin listening at the port. The second argument to the listen function is the maximum queue length or the maximum number of pending client connections. The value SOMAXCONN is the maximum queue length for the machine being used. Once the server begins listening at the port, it can accept client connections using the accept function. When the client is accepted, a new socket is created named CLIENT which can be used like a file handle. Reading from the socket reads the client's output and printing to the socket sends data to the client.
To read from a file handle or socket in Perl, wrap it in angle brackets (<FH>). To write to it, use the print function:
print SOCKET;
The return value of the accept function is the Internet address of the client in a packed format. The function sockaddr_in takes that format and returns the client's port number and the client's numeric Internet address in a packed format. The packed numeric Internet address can be converted to a text string representing the numeric IP using inet_ntoa (numeric to ASCII). To convert the packed numeric address to a host name, the function gethostbyaddr is used.
Let's assume all of the servers referred to in this article are started on the machine named server.onsight.com. To start the server on this machine, execute:
[james@server networking]$ server1.pl
SERVER started on port 7890
The server is now listening at port 7890 on server.onsight.com, waiting for clients to connect.

Artikel SMS Gateway

SMS Gateway adalah suatu platform yang menyediakan mekanisme untuk EUA menghantar dan menerima SMS dari peralatan mobile (HP, PDA phone, dll) melalui SMS Gateway’s shortcode (sbg contoh 9221). Di bawah ini disertakan sedikit ilustrasi mengenai penjelasan di atas.
SMS Gateway membolehkan UEA untuk berkomunikasi dengan Telco SMSC (telkomsel, indosat, dll) atau SMS platform untuk menghantar dan menerima pesan SMS dengan sangat mudah, Karena SMS Gateway akan melakukan semua proses dan koneksi dengan Telco. SMS Gateway juga menyediakan UEA dengan interface yang mudah dan standar.
UEA dapat berupa berbagai aplikasi yang memerlukan penggunaan SMS. Seperti berbagai aplikasi web yang telah banyak menggunakan SMS (free sms, pendaftaran, konfirmasi melalui SMS, aplikasi perkantoran, dsb), CMS, acara pengundian di televisi, dll.
UEA melakukan komunikasi dengan SMS Gateway melalui Internet menggunakan standard HTTP GET atau HTTPS (untuk komunikasi yang aman).
Telco SMSC akan menghantar pesan (SMS) tersebut kepada perusahaan SMS Gateway (sesuai dengan nomor yang telah disewa) dengan menggunakan protokol yang khusus. Dan berdasarkan keyword yang telah dituliskan pada SMS, maka sistem SMS Gateway akan menghantar SMS tersebut ke URL yang telah ditentukan. UEA dapat menghantar SMS reply kepada pelanggan melalui SMS Gateway tersebut. Dan UEA dapat menentukan besarnya biaya (charging) yang akan dikenakan kepada pelanggan. Biasanya telah ditentukan regulasi biayanya (microcharging mechanism), contoh Rp 0 (gratis); Rp 500,- ; Rp 1000,- ; Rp2000,- dst.
Suatu perusahaan SMS Gateway biasanya support untuk pesan yang berupa teks, unicode character, dan juga smart messaging (ringtone, picture message, logo operator,dll)

PROGRAMMING

pada abad 20 yang lalu sering disebut denagan abad teknologi dan informatika.
karena kenyataan bahwateknologi dan informatika sangat penting dalam kehidupan sehari hari manusia, termasuk juga dalam pendidikan.
yang ada di indonesia ..
dengan adanya kemajuan teknologi dan informatika semakin mempermudah manusia dalam melakukan aktifitasnya.
salah satu bentuknya adalah komputer.
komputer dapat membuat beberapa program seperti C/C++ , Pascal, dll ...
kita juga dapat mendisain program kita sesuai keinginan kita atau sesuai perkembanggan jaman.

mesran.net dapat membantu anda dalam mempelajari berbagai bahasa program, seperti Pascal, atau C/C++ dan masi banyak lagi ....


Sumber : tonileox.blogspot.com