Sunday, July 22, 2012

Show Hidden Files and Folder

Read Indonesian Version Here
Have you ever had an empty flashdisk or some folder/file disappear when viewed using Windows Explorer, but when use "right-clicked --> Properties" there is a space that is used. Well .. if you are experiencing the same problem, do not format the flashdisk, because chances are your data is hidden.
I try to share a little knowledge to all to deal with this problem. OK just do like this.
  1. Open your Windows Explore, enter to Tools --> Folder Options --> View. Then Select  Hidden files and Folders chose Show Hidden files and Folders. click OK. If this can not display the file / folder, let's do the second way.
  2. The second way is using Command Prompt. This method can be an alternative.
    • First Open Commang Prompt from run ( Window + R ) then press CMD and Enter. When the window console is out, type the name of the drive to position your flashdisk example "H:" and press Enter.
    • When you have entered on the H drive, like the picture above type attrib -r -h -s /s /d and press Enter so that it becomes as follows.
    H:\>attrib -r -h -s /s /d 
    • Wait until the H:\>_ shown, and this the simple way to show hidden file / folder.
    • Change the "-" into "+" if you want to set hide back .

***Good Luck***

Tuesday, July 10, 2012

Upgrade Codeigniter Version 2.1.0 to 2.1.2

Read Indonesian version here
A few weeks ago codeigniter was release the newest version 2.1.2. Then how do we upgrade CodeIgniter version 2.1.0 or 2.1.1 to version 2.1.2. Here are step by step.
  1. Download newest version here
  2. Set your site into offline mode
  3. Create backup from your file/folder.
  4. Replace all file in folder "system" and replace file index.php, with new file has been downloaded (codeigniter versi 2.1.2)
    Note : If you have any custom file in this folder, copy and paste it from backup.
  5. Replace file mime.php located on the config/mime.php
  6. To get support IPv6, upgrade field IP_address to 45 characters for example.
    ALTER TABLE ci_sessions Ganti IP_address IP_address varchar (45) standar '0 'NOT NULL
  7. If you have codeigniter version 2.1.1 just go to step no. 3

Friday, June 29, 2012

Create View on CodeIgniter

Read The Indonesian Version
This time the authors would like to share a little knowledge about using MVC model in CodeIgniter, for this example we try to discuss how to Create View on CodeIgniter. Before starting make sure you have the required below
  • Codeigniter versi 2.1.0 can download here
  • Create database with name "latihan"
For the first create Table "user" :
 
id (int 4) autoincrement

username (varchar 30)

access (varchar 10) 
 
and insert into table, min 2 record.

Next create file "view.php" put on application->controller
 
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class View extends CI_Controller{

     function __construct(){

          parent::__construct();

          $this->load->model("crud");
     }

     function index(){

         $data['title']="View User";
         $data['header']="View User";
         $data['query']=$this->crud->view();

         $this->load->view('view',$data);

     }
?>
 
Then create file "view.php", at this time place on application->view
 
<table>

     <thead>
         <tr>
               <th>No</th>
               <th>User</th>
               <th>Access</th>
        </tr>
     </thead>

     <tbody>
         <?php
               $no = 1;
               foreach($query as $row){
         ?> 
         <tr>
               <td><?php echo $no;?></td>
               <td><?php echo $row->username;?></td>
               <td><?php echo $row->access;?></td>   
         </tr>
         <?php $no ++;      } 
         ?> 
     </tbody>

</table>

 
For the last, create file "crud.php" place it on application->model
 
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Crud extends CI_Model{

    function view_user(){
        #Table Properties
        $tabel = "user";

        #Query
        $query = $this->db->select("*")->from($tabel)->get();
        if ($query->num_rows() > 0) {
           return $query->result();
        } else {
           return array();
        }
    }
}
?> 
type on address bar www(dot)example(dot)com/index(dot)php?/view

Friday, June 8, 2012

Introduction to Codeigniter


Read The Indonesian Version
CodeIgniter is open source PHPFramework. It's free to use and manipulate as you wish. CodeIgniter uses MVC (Model View Controller) model programming. MVC is a programming concept where logic and layout are separated, so that the programmers and designers can do their job in focus. Codeigniter can download here.



Picture MVC model programming

Model Used to process the database in this case is the CRUD (Create, Read, Update, Delete)
Controller Class and / or function that will be called on the browser address bar and use to get query results from the model and then display it on the view
View Here is the WEB design area, here they are working enhance the data display query results, by adding the CSS and JS

For the begining let us give instance, how to create "Hello PHP" with controller and view.
Create a php file and rename it with c_hello.php, copy this following code
 
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class C_hello extends CI_Controller{
            
   function __construct(){
                
     parent:: __construct();
                
   }
            
   function index(){ 
     $data['hello'] = "Hello PHP";
     $this->load->view('v_hello',$data);
   }
}
?>
  
Second create view and named it with v_hello.php, copy this following code
 
<?= $hello; ?>
 

** GOOD LUCK **

Friday, May 18, 2012

Create Page Number Different Format In One File Ms. Word 2007

Read The Indonesian Version
In the past when I make a proposal regarding the final project. I was looking on the internet about how to create different page number format. The first numeral and the second decimal. Finally I found the article "Menyisipkan Format Nomor Halaman yang Berbeda dalam Satu File Word 2007" on Arihdya Caesar's Blog. Here are the steps by step that I do from the reference article
  1. Open your file that will be given page number
  2. Give the page with the roman numeral format on all pages "Insert->Page Number->Format Page Number", on Number Format choose the roman numeral then press OK


  3. Set Page Number depend on the Bottom of Page, actually up to you to put where depends on your taste
  4. Next specify on the number of pages will placed the decimal numbers. In this case I chose the sixth pages as the first of decimal.
  5. Place the kursor in front of the first letter, and then choose menu Page Layout->Breaks->Next Page


  6. For the next step do do step number 2, this time change Page Number Format to number 1, 2, 3,...
  7. And see the results on the sixth Page Number Format turn into decimal number.
  8. To set the "sixth" into "first" Double klick on "4"->select Page Number Format set Page Numbering->Start at fill with "1" and see the "6" turn into "1".
**GOOD LUCK**