» 2017 » March の記事

~ centos7 install jdk ~

connie 2017.03.31 | centos, java | | No Comments
yum install wget

wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.rpm"

rpm -ivh jdk-8u45-linux-x64.rpm

 

~ Centos7 php7 install pThread ~

connie 2017.03.30 | centos, php | | No Comments
yum install gcc php70w-devel

git clone https://github.com/krakjoe/pthreads.git
cd pthreads
zts-phpize
./configure --with-php-config=/usr/bin/zts-php-config
make

cp modules/pthreads.so /usr/lib64/php-zts/modules/
nano /etc/php-zts.d/pthreads.ini
extension=pthreads.so

Testing for Thread Safety enable

/etc/php-zts.d/pthreads.ini

Should see those thing below
Thread Safety => enabled
pthreads

Execute server-side Script

zts-php -q ws_server.php

instead of using 
php -q 

 

~ 變更group concat最大長度的限制 ~

connie 2017.03.26 | mariadb, mysql | | No Comments
預設1024 data lenght 

nano my.cnf

[mysqld]

group_concat_max_len=200000

 

~ 2D mouse click on unity ~

connie 2017.03.03 | unity | | No Comments

在要hit test的gameobject內加入Box Collider 2D

01

 // Update is called once per frame
    void Update() {
        if (Input.GetMouseButtonDown(0))
        {
            print("mousedown");

            RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);

            if (hit.collider != null)
            {
                print(hit.collider.gameObject.name);
            }
        }
    }

 

| HOME |