Skip to content

Instantly share code, notes, and snippets.

radityo radityopw

View GitHub Profile
@radityopw
radityopw / gen_trans_log_restore.php
Last active Apr 3, 2018
script untuk generate transaction log sqlserver dari list file yang ada di folder
View gen_trans_log_restore.php
<?php
/*
asumsi adalah nama trans log adalah *.trn
asumsi lain adalah nama log file melambangkan waktu dicreate nya , nama sudah terurut
*/
$dir = $argv[1]."\\*.trn";
$dbname = $argv[2];
View curl.php
<?php
$cURL = curl_init();
$User_Agent = 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31';
$cookies = 'CookieName1=Value;CookieName2=Value';
curl_setopt($cURL, CURLOPT_USERAGENT, $User_Agent);
curl_setopt($cURL, CURLOPT_COOKIE, $cookies);
curl_setopt($cURL, CURLOPT_URL, $url);
curl_setopt($cURL, CURLOPT_HTTPGET, true);
View dummy_code_kupon.php
<?php
// membuat koneksi
$con = mysqli_connect('localhost','root','');
mysqli_select_db($con,"coupon_test");
// set kode kupon
$code = "CQ839";
@radityopw
radityopw / kupon.sql
Created Feb 15, 2017
contoh pembuatan tabel kupon.sql
View kupon.sql
CREATE TABLE `kupon` (
`code` varchar(5) NOT NULL,
`max_usage` int(11) NOT NULL DEFAULT '10',
`usage` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `kupon` (`code`, `max_usage`, `usage`) VALUES ('CQ839', '10', '0');
View catatan_tugas_on_spot_pbd_2016.txt
buatlah presentasi ppt / pptx
mengenai relational model dan relational algebra
menggunakan tools https://dbis-uibk.github.io/relax/calc.htm
presentasi secara umum bebas dan kreatif namun berisi hal2 ini :
1. penjelasan tentang schema yang digunakan
a. penjelasan tentang Relation nya termasuk structural feature dan feature yang lainnya yang dibutuhkan
b. Penjelasan tentang Key yang ada pada setiap relation, kenapa memilih key itu
View sp_6.sql
use tempdb
go
-- membuat functions
CREATE FUNCTION dbo.salesOrderTerakhir(@nilai_terakhir int = 5)
returns table
as
return (
select * from (
View sp_5.sql
use tempdb
go
-- membuat functions
CREATE FUNCTION dbo.minimum(@nilai1 float, @nilai2 float)
returns float
as
begin
declare @min float
View sp_4.sql
use tempdb
go
select avg(totaldue) as rata from adventureworks2012.sales.salesOrderHeader
View sp_3.sql
use tempdb
go
-- membuat stored procedure
CREATE PROCEDURE dbo.usp_mencoba1 @min_len_middle_name int , @max_len_middle_name int, @jml int out
as
begin
select @jml = count(*) from AdventureWorks2012.Person.Person where len(middleName) between @min_len_middle_name and @max_len_middle_name
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.