Skip to content

Instantly share code, notes, and snippets.

@ikhwaniril
ikhwaniril / css-only-semi-circle-pie-chart.markdown
Created December 15, 2022 10:33
CSS Only semi-circle pie chart
CREATE TABLE `tagihanlistrik` (
`Id` int(11) NOT NULL,
`idpel` varchar(20) NOT NULL,
`bln` varchar(30) NOT NULL,
`thn` int(5) NOT NULL,
`tagihan` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `tagihanlistrik` (`Id`, `idpel`, `bln`, `thn`, `tagihan`) VALUES
<?php
define('BOT_TOKEN', 'TOKEN BOT TELEGRAM ANDA');
define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/');
function apiRequestWebhook($method, $parameters) {
if (!is_string($method)) {
error_log("Method name must be a string\n");
return false;
}
<?php
define('BOT_TOKEN', 'GANTI DENGAN TOKEN BOT ANDA');
define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/');
function apiRequestWebhook($method, $parameters) {
if (!is_string($method)) {
error_log("Method name must be a string\n");
return false;
}
CREATE TABLE `data_siswa` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`nim` int(11) DEFAULT NULL,
`nama` varchar(255) DEFAULT NULL,
`alamat` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `data_siswa` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`nim` int(8) NOT NULL,
`nama` varchar(60) NOT NULL,
`alamat` text NOT NULL,
`cek` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
<?php
mysql_connect('localhost', 'user', 'password');
mysql_select_db('data_siswa');
// proses pencarian data
require_once('lib/nusoap.php');
// baca keyword pencarian dari form
$key = 'o';
// instansiasi obyek untuk class nusoap client, arahkan URL ke script server.php di server A
$client = new nusoap_client('http://ikhwaniril.com/server1.php');
<html>
<head>
<title>Contoh NuSOAP Web Service </title>
</head>
<body>
<!-- form pencarian data -->
<script type="text/javascript">
function Ajaxs()
{
var
<?php
require_once('lib/nusoap.php');
$server = new soap_server;
// registrasi method 'search'
$server->register('search');
// detail method 'search' dengan parameter $key
function search($key)
{
<?php
function terbilang($bilangan) {
$angka = array('0','0','0','0','0','0','0','0','0','0',
'0','0','0','0','0','0');
$kata = array('','satu','dua','tiga','empat','lima',
'enam','tujuh','delapan','sembilan');
$tingkat = array('','ribu','juta','milyar','triliun');
$panjang_bilangan = strlen($bilangan);
/* pengujian panjang bilangan */
if ($panjang_bilangan > 15) {