Saturday, December 14, 2013

흡각료법


가만 생각해보니 노폐물 제거에는 단식과 흡각요법이 탁월한거 같으며
바른자세를 유지하는데 는 몸살림운동이
올바른 식생활은 음양식사법이
내력과 기력을 키우는데는 제대로 된 단전호흡이
여기다 내력이 뒷받침되었을때 외력을 키울 수 있는 운동을 하고
건강한 몸과 마음에 의해 자기를 되돌아보는 자세와 습관까지
갖춘다면 인간으로서 태어나서 자기가 하여야 할 일을 제대로 할 수 있으리라 본다.

즉 위의 것들은 건강과 기력과 깨우침을 위한 근본적인 틀이라 할 수 있다고 본다.
그 외 많은 양한방의 치료법, 각종 건강법, 민간요법까지 필요에 따라 상황에 따라
병행한다면 더할 나위가 없다고 본다.



Thursday, March 14, 2013

i5 (iPhone 5) uploading pictures to PC

How to uploading pictures from i5 (iPhone 5) to PC (windows)

1. In PC, open Control Panel
2. Open Scanner and Camera
3. Open iPhone to launch Scanner and Camera Wizard
4. Start downloading the pictures


Monday, March 4, 2013

Sublime Text 2 (What I did)

★. Forget the opened files
Preferences->Settings Default
    "hot_exit": false,
    "remember_open_files": false,

. Key Bindings
Preferences->Key Bindings Default
        [
            { "keys": ["alt+s"], "command": "save" }
        ]

Monday, December 31, 2012

FuelPHP 3. Using Auth Package

Auth


1. Config


    Add auth to always_load array

        return array(

            'default_timezone'   => 'Asia/Seoul',

            'always_load'  => array(
                    'packages'  => array(
                     'orm',
                     'auth',
                  ),
            ),
        );

2. DB Table Name

    Notice the table name should be 'users' by looking at the file J:/fuel/packages/auth/config/simpleauth.php


/**
     * DB table name for the user table
     */
'table_name' => 'users',

3. Create DB Table by using oil

        php oil g model user username:string password:string group:int email:string last_login:string login_hash:string profile_fields:string

    Those fields are as shown in the simpleauth.php

    And then perform migration

        php oil r migrate


4. Create a controller

    php oil g controller users login logout register




Sunday, December 30, 2012

FuelPHP 2. Start after Installation

Start

I followd this tutorial http://ucf.github.com/fuelphp-crash-course/

1. Create a database


    uncomment the orm package in the app/config/config.php




return array(

'default_timezone'   => 'Asia/Seoul',

'always_load'  => array(
'packages'  => array(
'orm',
),
),
);



    create a database with any name, say fuel_dev

        mysql> create database fuel_dev;

    update the app/config/development/db.php

        return array(
            'default' => array(
                'connection'  => array(
                    'dsn'        => 'mysql:host=localhost;dbname=fuel_dev',
                    'username'   => 'xyz',
                    'password'   => '12345',
                ),
            ),
        );

2. Scaffolding

    Use oil to generate a scaffolding which fills the database with a table and creates some fuel runnable codes

        J:/vhosts/words> php oil generate scaffold messages name:string message:text

    Here, string is varchar(255)
    Some fields are automatically added
    Those added fields are id(int, 11, auto_increment), created_at(int, 11), and updated_at(int, 11)

    It does not create a real table in the database, but just a schema as a file

3. Migration


    To create a real database table, do migration

        J:/vhosts/words> php oil refine migrate

    That will create a real table named messages
    And another table is created named migration


FuelPHP 1. Installation

Installation

1. Download

    http://fuelphp.com

    version 1.4 (as of 1st January 2013)

2. Environment of Apache

    My document_root of Apache is actually J:/www
    But the virutal localhost is J:/vhosts which is configured in httpd-vhosts.conf


    <Directory j:/vhosts>
Order Deny,Allow
Allow from all
    </Directory>

    <VirtualHost *:80>
        DocumentRoot "j:/vhosts"
        ServerName localhost
    </VirtualHost>

    <VirtualHost *:80>
        DocumentRoot "j:/vhosts/words"
        ServerName words
    </VirtualHost>

3. Installation

    I've made 2 directories, one in the document_root (J:/vhosts) and the other in outside the document_root (J:/) and moved the files there

    1. public files: J:/vhosts/words/(assets, htaccess, index.php)

        (Move oil to this directory)


    2. fuel files: J:/fuel/(app, core, packages, htaccess, LICENSE)


4. Edit firephp/index.php

    This index.php is actually found in public/index.php from the downloaded archive
    But now in J:/vhosts/words/index.php

    The links to the installed programs are modified

    /**
     * Path to the application directory.
     */
    define('APPPATH', realpath(__DIR__.'/../../fuel/app/').DIRECTORY_SEPARATOR);

    /**
     * Path to the default packages directory.
     */
    define('PKGPATH', realpath(__DIR__.'/../../fuel/packages/').DIRECTORY_SEPARATOR);

    /**
     * The path to the framework core.
     */
    define('COREPATH', realpath(__DIR__.'/../../fuel/core/').DIRECTORY_SEPARATOR);


    * modify oil the same as index.php

    visit http://localhost/words to see the installed welcome page


5. Set TimeZone


    Modify app/config/config.php


return array( 'default_timezone' => 'Asia/Seoul', );


    Test the timezone by touching J:/fuel/app/views/welcome/index.php

    <h1>Welcome!</h1>
    <?php echo date("Y-m-d H:i:s"); ?>

    visit http://localhost/words to see the localized date time


6. Visit HOME

    http://localhost/words/

    This will visit the fuelphp located under the document_root
    And is routed to the fuelphp application pages as indicated by the words/index.php

    The chain of links to the welcome page is as follows

    http://localhost/words/
    ==> J:/vhosts/words/index.php
    ==> J:/fuel/app/bootstrap.php
    ==> J:/fuel/app/classes/controller/welcome.php
    ==> action_index() in controller/welcome.php
    ==> J:/fuel/app/views/welcome/index.php

    if you add hello to the above url, you will see another demo page

    http://localhost/words/hello

    which calls one method called function action_hello() in welcome.php

7. Change the Default Page


    It is possible to change the route of the first page which is automatically directed when the url has nothing but the base_url like http://www.world.com/

    Edit the config file named routes.php in app/config


    return array(
    '_root_'  => 'main/index',  // The default route
    '_404_'   => 'main/404',    // The main 404 route

    'hello(/:name)?' => array('main/hello', 'name' => 'hello'),
    );

 

8. Test oil

    To execute php, add the path to php.exe to the environment variable in the computer system

        c:\wamp\bin\php\php5.3.5;

    Then go to the oil directory (now in J:/vhosts/words), and run windows cmd utility

    And run oil as

        J:\vhosts\words> php oil