oleh Taufan Aditya
a. Sekilas tentang "native" PHP
Mari kita perhatikan sejenak kode berikut ini :
oleh Taufan Aditya
a. Sekilas tentang "native" PHP
Mari kita perhatikan sejenak kode berikut ini :
<?php | |
/* | |
* This file is part of the Juriya CMF. | |
* | |
* (c) Taufan Aditya <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
<?php namespace Model; | |
use \Gas\ORM; | |
use \Gas\Core; | |
class Base extends ORM { | |
/** | |
* Initial _init, that should be overided by sub-classes | |
*/ |
<?php | |
class Fibonaci { | |
/** | |
* Penggunaan : | |
* $fib = new Fibonaci(); | |
* echo 'Angka fibonaci ke-1:'.$fib->term(1); // 0 | |
* echo 'Angka fibonaci ke-2:'.$fib->term(2); // 1 | |
* echo 'Angka fibonaci ke-20:'.$fib->term(20); // 4181 | |
* |
<?php | |
class Foo { | |
public function doSomething() { | |
// ... 60 lines of code here.... | |
} | |
} | |
class Bar { | |
protected $foo; |
<?php | |
/** | |
* Program interogasi sederhana | |
* | |
* @author Taufan Aditya <[email protected]> | |
*/ | |
class Node { | |
public $question; |
import cv2 | |
import sys | |
def detect(img,out): | |
color = (0,255,0) | |
cascade = cv2.CascadeClassifier("res/haarcascade_frontalface_alt.xml") | |
faces = cascade.detectMultiScale(img, 1.2, 2, 0, (100,100)) | |
if (faces == None): | |
print "None found!" | |
else: |
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/objdetect/objdetect.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <iostream> | |
const char* keys = | |
{ | |
"{i|input| |The source image}" | |
"{d|dir| |The resource directory}" | |
}; |
{"foo":"bar","lorem":"ipsum"} |
Vivas El Barca! |