This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
a.*, | |
(SELECT nama FROM penduduk WHERE nik=a.nik_kadus) as nama_kadus, | |
(SELECT COUNT(*) FROM rw WHERE id_dusun=a.id) as jumlah_rw, | |
(SELECT COUNT(*) FROM rt WHERE id_rw IN (SELECT id FROM rw WHERE id_dusun=a.id)) as jumlah_rt, | |
(SELECT COUNT(*) FROM kk WHERE id_rt IN (SELECT id FROM rt WHERE id_rw = (SELECT id FROM rw WHERE id_dusun=a.id))) as jumlah_kk, | |
(SELECT COUNT(*) FROM penduduk WHERE id_rt IN (SELECT id FROM rt WHERE id_rw IN (SELECT id FROM rw WHERE id_dusun=a.id))) as jumlah_jiwa, | |
(SELECT COUNT(*) FROM penduduk WHERE id_rt IN (SELECT id FROM rt WHERE id_rw IN (SELECT id FROM rw WHERE id_dusun=a.id)) && jenis_kelamin='laki - laki') as jumlah_jiwa, | |
(SELECT COUNT(*) FROM penduduk WHERE id_rt IN (SELECT id FROM rt WHERE id_rw IN (SELECT id FROM rw WHERE id_dusun=a.id)) && jenis_kelamin='perempuan') as jumlah_jiwa | |
FROM dusun AS a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container-non-responsive" id="content" data-baseurl="<?php echo base_url();?>"> | |
<?php | |
if (isset($_POST['negara']) or isset($_POST['provinsi']) or isset($_POST['kota']) or isset($_POST['klinik']) or isset($_POST['dokter']) or isset($_POST['spesialis'])) { | |
$negara = $this->input->post('negara'); | |
$prop = $this->input->post('provinsi'); | |
$kota = $this->input->post('kota'); | |
$klinik = $this->input->post('klinik'); | |
$dokter = $this->input->post('dokter'); | |
$spesialis = $this->input->post('spesialis'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Anggota extends CI_Controller { | |
public function __construct() | |
{ | |
parent::__construct(); | |
header('Content-type: application/json'); | |
header('Access-Control-Allow-Origin: *'); | |
$this->load->model('model_konsultasi'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// url nya sama kayak kemarin, /remote/anggota/.. | |
public function get_jadwal_konsultasi_online() | |
{ | |
$negara = $this->input->post('negara'); | |
$prop = $this->input->post('provinsi'); | |
$kota = $this->input->post('kota'); | |
$klinik = $this->input->post('klinik'); | |
$dokter = $this->input->post('dokter'); | |
$spesialis = $this->input->post('spesialis'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Antrian { | |
node genapdepan; | |
node ganjildepan; | |
node genapbelakang; | |
node ganjilbelakang; | |
int jumlahgenap; | |
int jumlahganjil; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Node { | |
Node kanan, kiri; | |
Integer data; | |
public Node(){ | |
} | |
public Node(Integer x) { | |
data = x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT *, | |
( | |
3959 | |
* acos( cos( radians( {$lat} ) ) | |
* cos( radians( `lat` ) ) | |
* cos( radians( `long` ) | |
- radians( {$long} ) ) | |
+ sin( radians( {$lat} ) ) | |
* sin( radians( `lat` ) ) ) | |
* 1.609344 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//untuk menentukan FPB 2 bilangan maka panggil fungsi gcf(angka1, angka2); | |
function gcf($a, $b) { | |
return ( $b == 0 ) ? ($a):( gcf($b, $a % $b) ); | |
} | |
//untuk menentukan KPK 2 bilangan maka panggil fungsi lcm(angka1, angka2); | |
function lcm($a, $b) { | |
return ( $a / gcf($a,$b) ) * $b; | |
} | |
echo "Soal Nomor 1-3. <br/>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function kekata($x) { | |
$x = abs($x); | |
$angka = array("", "satu", "dua", "tiga", "empat", "lima", | |
"enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas"); | |
$temp = ""; | |
if ($x <12) { | |
$temp = " ". $angka[$x]; | |
} else if ($x <20) { | |
$temp = kekata($x - 10). " belas"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app.resources', ['ngResource']) | |
.factory('api', function ($resource) { | |
var api = { | |
defaultConfig : {id: '@id'}, | |
extraMethods: { | |
'update' : { | |
method: 'PUT' | |
} |
OlderNewer