Installation and use of morphological analysis (PHP)

Installation Environment: Centos7 Basic, php7 Yum Install GCC-C ++ Java-1.7.0-OPENJDK-Devel Python-Devel ZLIB-Devel OpenSSL-Devel Git-Y wget https://www.python.org/ftp/python/3.6.1/python-3.6.1.tgz TAR XF Python-3.* CD Python-3.* ./configure make Make Altinstall pip3.6 Install jpype1-Py3 PIP3.6 Install Konlpy CD .. wget https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.2.tar.gz TAR ZXFV MECAB-0.996-KO-0.2.2.tar.gz CD Mecab-0.996-KO-0.9.2 ./configure make Make Install CD .. wget https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.0.1-20150920.tar.gz TAR ZXFV MECAB-KO-DIC-2.0.1-20150920.tar.gz CD MECAB-KO-DIC-2.0.1-20150920 ./autogen.sh ./configure make Make Install CD/USR/Local/SRC/ git clone https://github.com/rsky/php-mecab.git CD/USR/LOCAL/SRC/PHP-MECAB/MECAB phpize ./configure --with-PHP-config =/usr/bin/php-config --with-mecab =/usr/local/bin/mecab-config make make test Make Install Echo "Extension = mecab.so"> /etc/php.d/mecab.ini Systemctl Restart httpd.service PHP ...

Registry Monitoring (Delphi)

How to use Procedure RegistryMonitor (Rootkey: hKey; Key: String; Proc: Tproc; WatchSub: boolean); begin TTHREAD.CREATEANYNYMOUSTHREAD (Procedure var Reg: Tregistry; Event: Cardinal; begin Reg: = trrewistry.create; Reg.rootkey: = rootKey; if reg.openkeyreadonly (key) begin Event: = Createevent (NIL, FALSE, FALSE, NIL); if event> 0 then begin while true do begin RegNotifychandureKeyvalue (reg.currentkey, watchsub, reg_notify_Change_last_set, event, true); if waitForsingleObject (event, infinite) = wait_object_0 the tthread.synchronize (TTHREAD.CURENTHREAD, Procedure Begin Proc End); End; End; End; Reg.Free; end) .start; End; // Proc: Enter command // WatchSub: Subside monitoring ...

Simple CDN service module made with PHP

I used Cloudflare to reduce the traffic load, but the connection location was LAX (Los Angeles), so I made it to be used to use it as a CDN form. The server is located in VULTR. The principle is that kilho.net/ {file} is connected to cdn.kilho.net/ {file} to disperse the traffic of the main hosting.[PHP] <? $cfg['url'] = 'kilho.net'; $cfg['cache'] = '../data/cache'; $url = $_SERVER['REQUEST_SCHEME'].'://'.$cfg['url'].$_SERVER['REQUEST_URI']; $url_arr = parse_url($url); switch($_SERVER['REQUEST_METHOD']) { case 'GET': $filename = $cfg['cache'].$url_arr['path']; $dirname = dirname($filename); if(!is_file($filename)) { if(!is_dir($dirname)) mkdir($dirname, 0707, true); $ch = curl_init(); $fp =...

HTTP access information record

When using OpenAPI, it is to check whether the test and access information is properly Messos value, host, POST value when connecting[PHP] <? $log = $_SERVER['REQUEST_METHOD'].' '.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."nn"; foreach($_SERVER as $k => $v) { if($k=='HTTP_HOST') continue; if(substr($k, 0,5)!='HTTP_') continue; $log .= '$k: $v'."n"; } $log .= "n"; $post = array_map('urldecode', explode('&', file_get_contents('php://input'))); foreach($post as $v) { $log .= "$vn"; } $log .= "-----------------------------------n"; file_put_contents('log.txt', $log, FILE_APPEND | LOCK_EX); ?> [/PHP]

Modify the WordPress theme

It is a method of modifying the file that is backed up (represented by a child theme) without touching the original when modifying the WordPress theme. To easily check the children theme used, create a new folder in the "WP-Content/Theme" folder by combining the theme name. Copy the "Style.css" of the original theme to the child theme folder and "Theme Name", "Themplate" as below ...

WordPress, Gnu Board linkage

It is currently linked to WordPress and Gnuboard in Kilhonet. After stabilizing the site more, I tried to release the sauce, and I uploaded something made by the request of Gnuboard users. (http://sir.co.kr/bbs/board.php?bo_table=cm_free&wr_id=741180) In the future, I think that the pages generated from the WordPress are directly loaded from the Head.php and Tail.php of the Head.php, and the cash processing and content areas are divided up and down and output. Based on the WordPress member DB, it is linked to Gnuboard, when writing BBS posts ...