Skip to content

CHICPRO

  • Life Log
  • Cycling Log
  • Photo Log
    • Portrait
    • Landscape
    • Flower
    • Etc
  • Coding Log
  • Information

Category: 코딩 이야기

[jQuery] AJAX 요청을 Queue를 이용해 순차적으로 처리하기

2017-05-31 by 편리

ajax 요청 처리를 순차적으로 처리할 필요성이 있어 jQuery ajaxQueue 플러그인을 사용했다. 데모 : http://demo.codepub.net/ajaxqueue.html <!DOCTYPE html> <html> <head> <meta charset=”utf-8″> <title>ajaxQueue Demo</title> <link rel=”stylesheet” href=”./css/common.css”> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js”></script> <script src=”./js/jquery.ajaxQueue.min.js”></script> </head> <body> <div class=”ajaxQueue”> <ul id=”ajaxQueue-items”> <li>Item 0</li> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> <ul id=”ajaxQueue-output”> </ul> <div><button type=”button” id=”run”>Run</button></div> </div> <script> $(function() { $(“#run”).on(“click”, function(e) …

Continue Reading

[PHP] PHPExcel을 이용한 엑셀파일 읽기

2017-05-29 by 편리

엑셀파일의 데이터를 읽어 DB에 저장하는 작업이 있어 PHPExcel을 이용해 기능을 구현했다. 아래 코드에서는 엑셀 파일에서 데이터를 읽어 $sheetData 에 배열로 저장하는 것까지만 된다. <?php require_once(‘./PHPExcel/IOFactory.php’); $file = ‘./excel.xlsx’; try { $inputFileType = PHPExcel_IOFactory::identify($file); $objReader = PHPExcel_IOFactory::createReader($inputFileType); $objPHPExcel = $objReader->load($file); } catch(Exception $e) { die(‘Error loading file “‘.pathinfo($file, PATHINFO_BASENAME).'” : ‘.$e->getMessage()); } $sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, …

Continue Reading

[PhantomJS] 팬텀JS evaluate 에서 ajax 실행

2017-05-26 by 편리

PhantomJS를 이용해 서비스 개발 중 evaluate 안에서 AJAX 처리가 필요한 경우가 있어 아래 코드를 작성했다. 대상 웹페이지에 jQuery는 이미 로드된 상태라고 가정한다. “use strict”; var sys = require(“system”); var page = require(“webpage”).create(); var args = sys.args; page.open(‘http://example.com’, function(status) { var text = page.evaluate(function(arg) { var result; var category = arg[1]; jQuery.ajax({ async: false, cache: false, …

Continue Reading

[Python] rake-nltk 모듈을 이용한 키워드 추출

2017-05-18 by 편리

서비스 개발에 앞서 텍스트에서 주요한 키워드를 추출할 수 있는 기능을 테스트해보고 있다. RAKE (Rapid Automatic Keyword Extraction) 알고리즘을 이용했는데 파이썬에서는 쉽게 사용할 수 있는 모듈이 있어서 쉽게 구현할 수 있다. 사용한 모듈은 rake-nltk 이다. 그 외에 python-rake 모듈도 있으나 rake-nltk 모듈은 nltk 가 적용돼서 뭔가 좀 더 좋은 게 아닌가 싶어 사용했다. 사용은 PHP 에서 …

Continue Reading

[PHP] curl POST 전송 때 파라미터 전달되지 않는 경우 해결법

2017-04-28 by 편리

아래와 같이 PHP에서 POST 요청을 curl 로 처리할 때 $param 배열의 파라미터가 제대로 전달되지 않는 경우가 있다. <?php $url = ‘https://example.com/api’; $param = array( ‘mid’ => $mid, ‘key’ => $key, ‘token’ => $token ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $param); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); …

Continue Reading

Posts pagination

  • Previous
  • 1
  • …
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • …
  • 88
  • Next

Recent Posts

  • SK 세븐모바일 유심 셀프교체
  • php 배열 연산에서 + 와 array_merge 의 차이
  • pcntl_fork 를 이용한 다중 프로세스 실행
  • 아이폰 단축어를 이용하여 주중 공휴일엔 알람 울리지 않게 하기
  • 구글 캘린더 전체일정 재동기화
  • OpenLiteSpeed 웹서버에 HTTP 인증 적용
  • OpenLiteSpeed 웹어드민 도메인 연결
  • WireGuard를 이용한 VPN 환경 구축
  • Ubuntu 22.04 서버에 OpenLiteSpeed 웹서버 세팅
  • 맥 vim 세팅

Recent Comments

  • 편리 on 업무관리용 그누보드 게시판 스킨
  • 임종섭 on 업무관리용 그누보드 게시판 스킨
  • 캐논 5D 펌웨어 | Dslr 펌웨어 업그레이드 방법 82 개의 베스트 답변 on 캐논 EOS 30D 펌웨어 Ver 1.0.6 , EOS 5D 펌웨어 Ver 1.1.1
  • Top 5 캐논 5D 펌웨어 Top 89 Best Answers on 캐논 EOS 30D 펌웨어 Ver 1.0.6 , EOS 5D 펌웨어 Ver 1.1.1
  • 편리 on 워드프레스 애니메이션 gif 파일을 mp4로 변환하여 출력하기
  • 임팀장 on 워드프레스 애니메이션 gif 파일을 mp4로 변환하여 출력하기
  • 편리 on Notepad++ NppFTP 플러그인 수동 설치
  • paul-j on Notepad++ NppFTP 플러그인 수동 설치
  • YS on Windows 10 iCloud 사진 저장 폴더 변경
  • 편리 on Docker를 이용한 Centos7 + httpd + php 5.4 개발환경 구축

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 CHICPRO | Built using WordPress and SuperbThemes