This file contains hidden or 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
| /* | |
| * program untuk mencari solusi persamaan | |
| * dari fungsi x^2 + x = cos(x) | |
| * dengan menggunakan metode raphson | |
| * f(x) = x^2 + x - cos(x) | |
| * f(x)' = 2x + 1 + sin(x) | |
| * @author Duken Marga | |
| */ | |
| #include <stdio.h> |
This file contains hidden or 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
| /* | |
| * metode numerik dengan bisection method | |
| * author : duken marga | |
| */ | |
| #include <stdio.h> | |
| #include <math.h> | |
| #define EPSILON 10E-10 | |
| #define PHI 3.141592654 |
This file contains hidden or 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
| /* | |
| compile with g++ (MinGW) | |
| ex : g++ square.cpp -o square | |
| @author Duken Marga | |
| dukenmarga at gmail dot com | |
| */ | |
| #include <iostream> | |
| #include <iomanip> | |
| using namespace std; |
This file contains hidden or 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
| #basic | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get install package-name | |
| #clean cache | |
| sudo apt-get clean && sudo apt-get update | |
| #upgrade version | |
| sudo apt-get install update-manager-core | |
| sudo do-release-upgrade |
This file contains hidden or 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
| dpkg --force-depends --install /home/duken/libc6-i686_2.11.1-0ubuntu7.8_i386.deb /home/duken/findutils_4.4.2-1ubuntu1_i386.deb |
This file contains hidden or 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 author ( | |
| `id_author` INT NOT NULL, | |
| `username` VARCHAR(45) NOT NULL , | |
| `password` VARCHAR(32) NOT NULL , | |
| `email` VARCHAR(60) NOT NULL , | |
| `first_name` VARCHAR(45) NULL , | |
| `last_name` VARCHAR(45) NULL , | |
| PRIMARY KEY (`id_author`) ); | |
| CREATE TABLE IF NOT EXISTS post ( |
This file contains hidden or 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 insert($table = '1', $values = array(' ' => ' ')){ | |
| if (is_array($values)){ | |
| foreach($values as $value){ | |
| $field .= "$value,"; | |
| } | |
| } | |
| $val = str_replace(',', '', $val); | |
| $query = "INSERT INTO $table VALUES ($val)"; |
This file contains hidden or 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
| # BEGIN WordPress | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [L] | |
| ################################################## | |
| # Redirect to http://duken.info :) | |
| RewriteCond %{HTTP_HOST} ^duken-mt\.co\.cc | |
| RewriteRule ^(.*)$ http://duken.info/$1 [R=permanent,L] |
This file contains hidden or 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 | |
| /** | |
| * @author Duken Marga | |
| * dukenmarga [at] gmail.com | |
| * Get profile picture from twitter | |
| * You can clean up and optimize the code | |
| **/ | |
| getImageTwitter('dukenmarga'); | |
| function getImageTwitter($account = 'dukenmarga'){ |
This file contains hidden or 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 | |
| $month = 8; | |
| print date("M", mktime(0, 0, 0, $month)); | |
| ?> |