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
class Node | |
attr_writer :data, :index, :next, :prev | |
attr_reader :data, :index, :next, :prev | |
end | |
class My_list | |
attr_reader :node,:total | |
def add(data) | |
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
require "find" | |
require "fileutils" | |
targets = ARGV | |
for target in targets | |
Find.find(target) do |path| | |
if FileTest.directory?(path) | |
next | |
else | |
print path,"\n" | |
end |
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
require 'webrick' | |
include WEBrick | |
port = 8090 | |
if ARGV.length > 0 then | |
port = ARGV[0] | |
end | |
# Create an HTTP server |
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 | |
$con = mysql_pconnect("server location","server user","server pass"); | |
mysql_select_db("yourdb",$con); | |
function list_all_kategori($parent_id,$level=0){ | |
global $con; | |
$sql = "SELECT * FROM kategori WHERE parent_id='".$parent_id."'"; | |
$res = mysql_query($sql,$con); | |
$data = array(); |
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
CREATE TABLE IF NOT EXISTS `kategori` ( | |
`id` bigint(255) NOT NULL AUTO_INCREMENT, | |
`nama` varchar(255) NOT NULL, | |
`parent_id` bigint(255) NOT NULL DEFAULT '0', | |
PRIMARY KEY (`id`) | |
) |
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
CREATE TABLE IF NOT EXISTS `mail_in` ( | |
`id` bigint(255) NOT NULL auto_increment, | |
`tanggal` varchar(255) NOT NULL, | |
`uid` varchar(255) NOT NULL, | |
`from` varchar(255) NOT NULL, | |
`to` varchar(255) NOT NULL, | |
`subject` varchar(255) NOT NULL, | |
`body` longtext NOT NULL, | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `uid` (`uid`) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="win"?> | |
<!-- | |
index.zul | |
{{IS_NOTE | |
Purpose: | |
Description: |
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
/** | |
* @author radityo.p.w (radityo.p.w@gmail.com) | |
* @version 1.0 | |
*/ | |
package controller; | |
import entity.DaftarMahasiswa; | |
import entity.Mahasiswa; | |
import java.util.ArrayList; | |
import java.util.Iterator; |
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 my_correlation($a_x,$a_y){ | |
$len = count($a_x); | |
$jml_x = 0; | |
$jml_y = 0; | |
$jml_xy = 0; |
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 | |
$con = mssql_pconnect("server","user","pass"); | |
if (!$con || !mssql_select_db('database', $con)) { | |
die('Unable to connect or select database!'); | |
} | |
$fp = fopen($_FILES['upload']['tmp_name'], 'rb'); | |
$file_content = fread($fp, filesize($_FILES['upload']['tmp_name'])); | |
fclose($fp); |
OlderNewer