• Enter Slide 1 Title Here

    This is slide 1 description. This Blogger Template is Designed By NewBloggerThemes.com. Go to Edit HTML and find this content. Replace it your own description. For More Blogger Templates, please visit NewBloggerThemes.com. If you need a premium blogger template or customize this template then contact me. I will do a greate design for you[...]

  • Rasmus Lerdorf

    Inspirator

    Rasmus Lerdorf merupakan seorang pemrogram dari Denmark/Greenland dan pencipta bahasa pemrograman PHP.

  • Enter Slide 3 Title Here

    This is slide 3 description. This Blogger Template is Designed By NewBloggerThemes.com. Go to Edit HTML and find this content. Replace it your own description. For More Blogger Templates, please visit NewBloggerThemes.com. If you need a premium blogger template or customize this template then contact me. I will do a greate design for you[...]

  • Enter Slide 4 Title Here

    This is slide 4 description. This Blogger Template is Designed By NewBloggerThemes.com. Go to Edit HTML and find this content. Replace it your own description. For More Blogger Templates, please visit NewBloggerThemes.com. If you need a premium blogger template or customize this template then contact me. I will do a greate design for you[...]

  • Enter Slide 5 Title Here

    This is slide 5 description. This Blogger Template is Designed By NewBloggerThemes.com. Go to Edit HTML and find this content. Replace it your own description. For More Blogger Templates, please visit NewBloggerThemes.com. If you need a premium blogger template or customize this template then contact me. I will do a greate design for you[...]

  • Enter Slide 6 Title Here

    This is slide 6 description. This Blogger Template is Designed By NewBloggerThemes.com. Go to Edit HTML and find this content. Replace it your own description. For More Blogger Templates, please visit NewBloggerThemes.com. If you need a premium blogger template or customize this template then contact me. I will do a greate design for you[...]

Senin, 12 Januari 2015

Create Chart Extjs 5

Posted by reyzal on 22.06 with No comments
Saya memakai xond 2 untuk membuat chart
mula - mula buat bacn end nya sudah tau kan routingnya
langsung ke front end kita bikin 3 file di model,store,view
aplication.js di require
di app.json tambahin di require sencha-charts
sencha app build misal error
ada documentasi di blog ini yang membahas errornya sudah berhasil tidak ada masalah maka akan muncul

Fatal Error Install Sass And Compass

Posted by reyzal on 19.46 with No comments
Open cmd with ruby
ERROR:  Could not find a valid gem 'compass' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://api.rubygems.org/latest_specs.4.8.gz)
gem source -a http://rubygems.org/
gem install sass
Fetching: sass-3.4.9.gem (100%)
Successfully installed sass-3.4.9
Parsing documentation for sass-3.4.9
Installing ri documentation for sass-3.4.9
Done installing documentation for sass after 25 seconds
WARNING:  Unable to pull data from 'https://rubygems.org/': SSL_connect returned
=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (htt
ps://api.rubygems.org/latest_specs.4.8.gz)
1 gem installed
sass --version
gem install compass
compass --version
atau sesuaikan rubynya dengan versi bit windows


- cara instal sass dan compasshttp://prastowo.net/2014/02/installasi-sass-dan-compass.dsp

Rabu, 29 Oktober 2014

Belajar format criteria ,propel dll

Posted by reyzal on 19.20 with No comments
http://web.archive.org/web/20121115181748/http://trac.propelorm.org/wiki/Documentation/1.6/BasicCRUD

http://propelorm.org/blog/2010/02/16/propel-query-by-example.html

https://web.archive.org/web/20111001083356/http://trac.propelorm.org/wiki/Documentation/1.3/Criteria

https://web.archive.org/web/20130418115652/http://trac.propelorm.org/wiki/Documentation/1.3/Relationships

http://trac.propelorm.org/127.0.0.1_8882/wiki/Documentation/1.3/BasicCRUD.html

http://www.symfony-project.org/get/pdf/jobeet-1.2-propel-en.pdf

http://www.cheat-sheets.org/saved-copy/sfmodelcriteriacriterionrsrefcard_enus.pdf

http://subcoder77.wordpress.com/2013/05/13/test-enabled-framework-for-ajax-development-with-silex-extjs-4/

Minggu, 26 Oktober 2014

ketik + R,lalu ketikan regedit tekan OK.
Masuk ke HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
klik 2 klik di AutoRun lalu hapus data yang di "value data".
setelah itu coba install kembali dan berhasil

A+

Kamis, 23 Oktober 2014

Membuat PHP project dengan micro framework silex dan ORM propel 2.*

  • Buat folder kosong untuk menyimpan project. misal: myproject
  • Instalasi silex dan propel2 menggunakan composer. buat file composer.json di dalam folder myproject. Berikut codenya :
composer.json
{
    "require": {
        "silex/silex": "~1.2",
        "propel/propel": "~2.0@dev",
        "propel/propel-service-provider": "*"
    },
    "autoload": {
        "classmap": ["conf/generated-classes/"],
        "psr-0": { "bookstore": "conf/generated-classes/" }
      }
}
  • Buka cmd, masuk ke folder myproject, ketikan composer install (Untuk windows). Tunggu sampai selesai
  • Dalam folder myproject, buat folder sebagai berikut :
myproject
- app
- conf
- web
  • lanjut setting propel, dalam folder conf buatlah beberapa file sebagai berikut:
set_path.bat
PATH=%PATH%;d:\projects\localhost\propel-project\vendor\bin
schema.xml
<?xml version="1.0" encoding="UTF-8"?>
<database name="bookstore" defaultIdMethod="native">
  <table name="book" phpName="Book">
    <column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
    <column name="title" type="varchar" size="255" required="true" />
    <column name="isbn" type="varchar" size="24" required="true" phpName="ISBN"/>
    <column name="publisher_id" type="integer" required="true"/>
    <column name="author_id" type="integer" required="true"/>
    <foreign-key foreignTable="publisher" phpName="Publisher" refPhpName="Book">
      <reference local="publisher_id" foreign="id"/>
    </foreign-key>
    <foreign-key foreignTable="author">
      <reference local="author_id" foreign="id"/>
    </foreign-key>
  </table>
  <table name="author" phpName="Author">
    <column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
    <column name="first_name" type="varchar" size="128" required="true"/>
    <column name="last_name" type="varchar" size="128" required="true"/>
  </table>
  <table name="publisher" phpName="Publisher">
   <column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" />
   <column name="name" type="varchar" size="128" required="true" />
  </table>
</database>
propel.json
{
    "propel": {
        "database": {
            "connections": {
                "bookstore": {
                    "adapter": "mysql",
                    "classname": "Propel\\Runtime\\Connection\\ConnectionWrapper",
                    "dsn": "mysql:host=localhost;dbname=bookstore",
                    "user": "root",
                    "password": "r00tdb",
                    "attributes": []
                }
            }
        },
        "runtime": {
            "defaultConnection": "bookstore",
            "connections": ["bookstore"]
        },
        "generator": {
            "defaultConnection": "bookstore",
            "connections": ["bookstore"]
        }
    }
}
    buatlah manual folder generated-classes di folder conf dan wamp harus aktif
*catatan : untuk schema.xml dan propel.json bisa dilihat di dokumentasi propel
  • Buat database bookstore
  • Build propel dengan menggunakan langkah sebagai berikut:
    • buka cmd, masuk folder myproject/conf
    • ketikan set_path.bat
    • ketikan propel sql:build
    • ketikan propel sql:insert
    • ketikan propel model:build
    • ketikan propel config:convert
  • Masuk dalam folder myproject/app buat file sebagai berikut:
app.php
<?php

use Symfony\Component\HttpFoundation\Request;

$app = require_once __DIR__ . '/bootstrap.php';

$app['debug'] = true;

$app->get('/', function (Request $request) use ($app) {
    $authors = AuthorQuery::create()->find();
    // $authors contains a collection of Author objects
    // one object for every row of the author table
    foreach($authors as $author) {
      echo $author->getFirstName()."<br/>";
    }
})->bind('homepage');

return $app;
bootstrap.php
<?php

require_once '/../vendor/autoload.php';

error_reporting(E_ERROR);

$app = new Silex\Application();

//Connection to Propel
$app->register(new Propel\Silex\PropelServiceProvider(), array(
    'propel.config_file' => __DIR__.'/../conf/generated-conf/config.php',
    'propel.model_path' => __DIR__.'/../conf/generated-classes'
));

return $app;
  • Masuk dalam folder myproject/web buat file sebagai berikut:
.htaccess
<IfModule mod_rewrite.c>
    Options -MultiViews

    RewriteEngine On
    #RewriteBase /path/to/app
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]
</IfModule>
index.php
<?php

$app = require_once __DIR__ . '/../app/app.php';
$app->run();
    insert data ke tabel yang sudah di buat misal: di phpmyadmin
Oke semua langkah sudah oke, jangan lupa tambahkan vhost apache nya ke myproject/web
    lalu panggil index.php bila terjadi error composer harus di update

Kalo masih ga paham, langsung datangan weh jelemana...
http://jalantikus.com/tips/detail/4254/cara-remote-komputer-menggunakan-smartphone-android

Rabu, 22 Oktober 2014

BAHAN - BAHAN
  • xampp vesi baru 1.8
  • redits x86 dan x64
  • navicat premium dan sql server
  • file 2 pdo
  • php.ini
  • file project
  • Microsoft SQL Server 2012 Native Client ODBC
Install xampp terlebih dahulu,
bila ada kesalahan instal xampp coba install redist x86 dan x64,
lalu install navicat premium sesudah itu instal Microsoft SQL Server 2012 Native Client ODBC supaya tidak error pas pengecekan routing,
file php.ini coba di copy replace ke xampp/php,
file 2 pdo copas di xampp/php/ext,
selanjutnya git clone project wajar-dikdas yang ada di bitbucket ditujukan ke folder d:/projects/localhost/ disitu,
setelah git clone lihat folder yang  ada di app/config apakah ada 2 folder sql dan conf kalau tidak ada anda BUILD masuk ke cmd lalu tujukan ke app/config tadi jalankan perintah set_path.bat
kalau misalkan error masuk ke file set_path.bat rubah sesuai settingan anda,
dan coba jalankan perintah itu lagi ketika tidak ada error atau berhasil anda tinggal masukan perintah yang kedua yaitu propel-gen,selesai 
lalu cek folder app/config apakah ada folder sql dan conf kalau ada cek apakah 2 folder tersebut filenya ada kalau ada anda masuk ke tahapan selanjutnya yaitu setting xampp
masuk ke httpd config tekan ctr+f listen bilan anda akan memindahkan port atau menambah port,
lalu ctrl+f  vhost bila ada komentar hapus,
selanjutnya cek di shell dalam control panel xampp lalu jalankan perintah httpd bila ada kesalahan berarti apache tidak bisa distart maka anda cek di shell tersebut bila ada kesalahan maka atasi masalah tersebut,
apache sudah di start maka jangan lupa settings vhost,
coba cek apakah data di databse muncul di web kalau tidak maka cek  navicat hubungkan dengan server contoh ip :192.168.137.1 test connection berhasil tinggal click button ok muncul database lalu masuk ke wajar_dikdas/app/config/conf/wajar_dikdas-conf buka via sublime ubah ip lalu save,
selanjutnya kita mengerjakan query :
database:
Table rekap_peserta_didik
Table rekap_ptk
Table rekap_sekolah

src/wajar_dikdas/ :
peserta_didik
sekolah
ptk
prasarana
sarana

buat lah query untuk menampilkan peserta didik di setiap kelas contoh
public function jumlahSiswaPerKelas($wilayahId, $request){
   $bentukPendidikanId = ($request->get('bentuk')) ? $request->get('bentuk') : 5;
   if($request->get('wilayah') == 2){
       $where = "AND rekap_peserta_didik.provinsi_id = ".$wilayahId;
   }else if($request->get('wilayah') == 3){
       $where = "AND rekap_peserta_didik.kabupaten_kota_id = ".$wilayahId;
   }
   if ($bentukPendidikanId == 5) {
   $kolom = ("sum(j_l_kelas_1+j_p_kelas_1) \"kelas 1\",
sum(j_l_kelas_2+j_p_kelas_2) \"kelas 2\",
sum(j_l_kelas_3+j_p_kelas_3) \"kelas 3\",
sum(j_l_kelas_4+j_p_kelas_4) \"kelas 4\",
sum(j_l_kelas_5+j_p_kelas_5) \"kelas 5\",
sum(j_l_kelas_6+j_p_kelas_6) \"kelas 6\"");
   } else {
   $kolom = ("sum(j_l_kelas_7+j_p_kelas_7) \"kelas 7\",
sum(j_l_kelas_8+j_p_kelas_8) \"kelas 8\",
sum(j_l_kelas_9+j_p_kelas_9) \"kelas 9\"");  
   }
   $cakupan = getCakupan($request->get('wilayah'));
   $sql = "SELECT
   {$cakupan},
   $kolom
   from
   rekap_peserta_didik
   LEFT JOIN sekolah on rekap_peserta_didik.sekolah_id = sekolah.sekolah_id
   WHERE
   rekap_peserta_didik.bentuk_pendidikan_id = {$bentukPendidikanId}
   and rekap_peserta_didik.semester_id = ".SMT_BERJALAN."
   {$where}
   GROUP BY
   {$cakupan}";
   $data = getDataBySql($sql);
   return $data;
}
ini untuk menampilkan 2 routing

untuk menampilkan saja query ini :

public function jumlahAgamaPerKelas($wilayahId, $request){
   $bentukPendidikanId = ($request->get('bentuk')) ? $request->get('bentuk') : 5;
   if($request->get('wilayah') == 2){
       $where = "AND rekap_peserta_didik.provinsi_id = ".$wilayahId;
   }else if($request->get('wilayah') == 3){
       $where = "AND rekap_peserta_didik.kabupaten_kota_id = ".$wilayahId;
   }
   $cakupan = getCakupan($request->get('wilayah'));
   $sql = "SELECT
   {$cakupan},
   sum(j_islam) Islam,
   sum(j_kristen_protestan) \"kristen Protestan\",
   sum(j_kristen_katolik) \"kristen Katolik\",
   sum(j_hindu) Hindu,
   sum(j_budha) Budha,
   sum(j_konghucu) Konghucu,
   sum(j_Lainnya) Lainnya
   from
   rekap_peserta_didik
   LEFT JOIN sekolah on rekap_peserta_didik.sekolah_id = sekolah.sekolah_id
   WHERE
   rekap_peserta_didik.bentuk_pendidikan_id = {$bentukPendidikanId}
   and rekap_peserta_didik.semester_id = ".SMT_BERJALAN."
   {$where}
   GROUP BY
   {$cakupan}";
   $data = getDataBySql($sql);
   return $data;
}
lalu tes di routing ke url lalu masukan perintah ini
contoh : http://localhost/table/PesertaDidik/3/6/jumlahUsiaPerKelas?wilayah_id=20500

jangan lupa git push
tahap-tahapaannya
git status
git add .
git commit -m ""
masukan email
masukan nama
git push

bila anda ingin mengupdate projects bila ada yang merubah tinggal git pull bila ada kesalahan public key ,anda bikin key ssh di bitbucket

selesai A+