Skip to content

Instantly share code, notes, and snippets.

View agungsijawir's full-sized avatar
😊
Slow but sure coming back to live

Agung Andika agungsijawir

😊
Slow but sure coming back to live
View GitHub Profile
<?php
class Cart extends \yii\base\Object {
/**
* @var integer
*/
public $id;
/**
@agungsijawir
agungsijawir / How to Install PHP Phalcon
Created January 13, 2016 10:18
Step by step install phalcon to ubuntu 14.04
How to Install PHP Phalcon v2.9
1. Clone specific tag version to working directory
```
# git clone --branch phalcon-v2.0.9 https://github.com/phalcon/cphalcon.git /home/vagrant/cphalcon2.9
```
Wait until cloning process completed. Try to change to cloned directory:
```
[10:12 AM]-[root@andromega]-[/home/vagrant/cphalcon2.9]-[git (phalcon-v2.0.9)]
@agungsijawir
agungsijawir / console.js
Created October 4, 2015 08:29
variant of console variants
<script>
window.console.log("%c Hello Green World.","color: rgb(155, 201, 74); font-size: 24px;");
window.console.log("%c https://agungandika.com/perihal-saya","font-size: 20px;");
</script>
@agungsijawir
agungsijawir / ubuntu-php5.6-zts-pthreads
Created June 25, 2015 17:31
Howto: Install isolated PHP 5.6 ZTS enabled (thread-safe) with pthreads
##############################################################################
# INSTALL isolated PHP 5.6 ZTS (Thread-safe) with pthreads on Ubuntu 14.04 ###
##############################################################################
1) Install necessary bison version
wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb
wget http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb
dpkg -i bison_2.7.1.dfsg-1_amd64.deb
@agungsijawir
agungsijawir / FiboDoWhile.java
Created April 26, 2015 14:38
Fibonacci using do-while
import java.util.Scanner;
public class FiboDoWhile {
public static void main(String []args)
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Input n (integer): ");
int n = keyboard.nextInt();
int n_2 = 0, n_1 = 1, a = 0;
@agungsijawir
agungsijawir / copydir.php
Last active August 29, 2015 14:03
php copy recursive directory
<?php
/**
* $source = source path to be copied
* $dest = destination path
*
* Example $source directory structure
* c:/Sumber/
* /file1.txt
* /file2.txt
* /file3.txt
package StackQueueAlgo;
public class ArrayStack implements Stack {
public static final int CAPACITY = 10;
private static int _capacity;
private static Object _S[];
private static int _top = -1;
public ArrayStack() {
this(CAPACITY);
@agungsijawir
agungsijawir / ArrayQueue1.java
Last active August 29, 2015 14:02
Implementation of Queue with Array (Java)
public class ArrayQueue1 implements Queue {
private static Object [] arr;
private static int currentSize;
private static int front;
private static int back;
private static final int DEFAULT_CAPACITY = 10;
public ArrayQueue1()
{
import java.io.*;
public class tebakan2 {
public static void main(String[] args) {
int lariknya2[] = new int[100];
int tebakan = (int) (Math.random() * (( 100 - 0) + 1));
int tebakan_user = 0, mencoba_tebak = 0, lariknya2_size = lariknya2.length;
boolean ketebak = false;
BufferedReader baca_tebakan = new BufferedReader(new InputStreamReader(System.in));
@agungsijawir
agungsijawir / SequenceCase02.java
Created May 24, 2014 06:06
Sequence Search - Find value, highest, lowest and count them.
/*
* Author: [email protected]
*
*/
public class SequenceCase02 {
public static void main(String[] args) {
int lariknya[] = new int[]{11, 12, 10, 15, 6, 10, 13, 7, 14, 6, 15};
int a = 0;
int a_size = lariknya.length;
int cari;