This file contains hidden or 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
/* | |
* REST_Helper: Helper untuk mengakses layanan REST | |
* Bisa digunakan walaupun fungsi cURL diblokir | |
* | |
* @param string $url URL yang mau kita buka | |
* @param optional array $params data yang mau kita POST ke $url | |
* @param optional string method either POST or GET | |
* @param optional string format payload | |
*/ | |
function rest_helper($url, $params = null, $verb = 'GET', $format = 'text') |
This file contains hidden or 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
-- ------------------------- | |
-- ini stored procedure-nya | |
-- ------------------------- | |
CREATE PROCEDURE InsertDataSMS | |
@KodeKel int, | |
@KodeTPS int, | |
@SuaraPartai int, | |
@KodeCaleg1 int = -1, | |
@SuaraCaleg1 int = -1, | |
@KodeCaleg2 int = -1, |
This file contains hidden or 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
mysql> ------------------------------------- | |
mysql> ini execution plan | |
mysql> untuk query langsung ke base table | |
mysql> ------------------------------------- | |
mysql> explain | |
-> select a.*, b.account_id, b.item_id, b.debet, b.credit | |
-> from journals a | |
-> join journal_details b on a.id=b.journal_id | |
-> where a.id=1 ; | |
+----+-------------+-------+-------+-----------------------------+---------+---------+-------+------+-------------+ |
This file contains hidden or 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
<table> | |
<tr> | |
<th rowspan="3">No.</th> | |
<th rowspan="3">Nomor Induk</th> | |
<th rowspan="3">Nama Lengkap</th> | |
<th colspan="12">Aspek Penilaian</th> | |
<th rowspan="3">NR</th> | |
</tr> | |
<tr> | |
<th colspan="5">Tugas</th> |
This file contains hidden or 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
Imports System.Data | |
Imports System.Data.SqlClient | |
Public Class Form1 | |
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load | |
InitializeComboBox() | |
End Sub | |
Private Sub InitializeComboBox() |
This file contains hidden or 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
mysql> use test ; | |
Database changed | |
mysql> -- -------------------------------------- | |
mysql> -- create table contoh | |
mysql> -- -------------------------------------- | |
mysql> create table garansi ( | |
-> id int auto_increment primary key, | |
-> awal_garansi date null, | |
-> akhir_garansi date null |
This file contains hidden or 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
private string HitungUsia(DateTime awal, DateTime akhir) | |
{ | |
TimeSpan selisih = akhir.Subtract(awal); | |
int tahun = Convert.ToInt32(selisih.Days / 365); | |
int bulan = Convert.ToInt32(selisih.Days % 365 / 30); | |
int hari = selisih.Days - tahun * 365 - bulan * 30; | |
return String.Format("Usia {0} tahun {1} bulan {2} hari", tahun, bulan, hari); | |
} |
This file contains hidden or 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
using System; | |
class Program | |
{ | |
/// <summary> | |
/// Pengkodean Caesar dengan menggeser huruf. | |
/// </summary> | |
static string Caesar(string value, int shift) | |
{ | |
char[] buffer = value.ToCharArray(); |
This file contains hidden or 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
D:\xampp\mysql\bin>mysql -u root | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 1 | |
Server version: 5.5.16 MySQL Community Server (GPL) | |
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. | |
Oracle is a registered trademark of Oracle Corporation and/or its | |
affiliates. Other names may be trademarks of their respective | |
owners. |
This file contains hidden or 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 referrals_search_cardlist2() { | |
global $user; | |
$output = drupal_render(drupal_get_form('referrals_form_listpin')); | |
return $output; | |
} | |
function referrals_form_listpin() | |
{ |