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
while True: | |
nama = raw_input('Nama: ') | |
if not nama: continue | |
alamat = raw_input('Alamat: ') | |
if not alamat: continue | |
hobi = raw_input('Hobi: ') | |
if not hobi: continue | |
break; | |
print '\n\n' |
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 | |
class Config { | |
private static $items = array(); | |
public static function load($config_file){ | |
self::$items = require $config_file; | |
} | |
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 | |
return array( | |
'base_url' => 'http://localhost/myapp/', | |
); |
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 | |
require 'Config.php'; | |
Config::load('config/main.php'); | |
Config::set('timezone', 'Asia/Jakarta'); | |
echo Config::get('base_url'); | |
echo '<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
import sys | |
with open(sys.argv[1]) as the_file: | |
websites = [line.rstrip('\n') for line in the_file] | |
print websites |
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 | |
/** | |
* UserIdentity represents the data needed to identity a user. | |
* It contains the authentication method that checks if the provided | |
* data can identity the user. | |
*/ | |
class UserIdentity extends CUserIdentity | |
{ | |
const ERROR_LIMIT_REACHED = 666; |
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 | |
/** | |
* LoginForm class. | |
* LoginForm is the data structure for keeping | |
* user login form data. It is used by the 'login' action of 'SiteController'. | |
*/ | |
class LoginForm extends CFormModel | |
{ | |
public $username; |
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 | |
class RulesMerger | |
{ | |
public static function merge() | |
{ | |
$urlManager = Yii::app()->getUrlManager(); | |
$path = Yii::getPathOfAlias('application.modules'); | |
foreach(Yii::app()->getModules() as $k => $v) | |
{ |
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 function actionSearchSriwijaya(){ | |
Yii::import('application.vendors.*'); | |
require_once('curl/curl.php'); | |
require_once('simple_html_dom.php'); | |
$curl = new Curl; | |
$curl->options['CURLOPT_SSL_VERIFYPEER'] = false; | |
$response = $curl->get('https://agent.sriwijayaair.co.id/b2b/secure/home.jsp'); |
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 | |
$array1 = array( | |
array('b','d'), | |
array('c','a'), | |
array('b','d'), | |
array('a','d'), | |
array('c'), | |
array('c'), | |
array('a','d','e'), |
OlderNewer