This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>小説家になろう APIリクエスト</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> | |
<div> | |
<ul id="app"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- | |
To change this license header, choose License Headers in Project Properties. | |
To change this template file, choose Tools | Templates | |
and open the template in the editor. | |
--> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>言語別推移</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
ORM::configure('mysql:host=localhost;dbname=qiita'); | |
ORM::configure('username', 'xxxx'); | |
ORM::configure('password', 'xxxx'); | |
$sql = "SELECT CASE WHEN ( `title` like '%php%' OR `body` like '%php%' ) THEN 'PHP' | |
WHEN ( `title` like '%ruby%' OR `body` like '%ruby%' ) THEN 'Ruby' | |
WHEN ( `title` like '%python%' OR `body` like '%python%' ) THEN 'Python' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function TestStrCount() { | |
//サロゲートベア文字+全角 | |
assert.strictEqual(StrCount.str_count_sum("𠮷野家"), 3); | |
//サロゲートベア文字 | |
assert.strictEqual(StrCount.str_count_sum("𡈽𡌛𡑮𪚲𪘚"), 5); | |
//半角 | |
assert.strictEqual(StrCount.str_count_sum("abcdefg"), 3.5); | |
//\r | |
assert.strictEqual(StrCount.str_count_sum("\r"), 1); | |
//改行 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 文字数測定 | |
var StrCount = { | |
//改行 | |
line: 1, | |
//全角 | |
em: 1, | |
//半角 | |
em_half: 0.5, | |
//4バイト文字 | |
surrogate: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>文字列を丸める</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://code.jquery.com/jquery-2.2.3.min.js" integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=" crossorigin="anonymous"></script> | |
<script src="./jquery.ry.js"></script> | |
<script> | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//ini_set("display_errors", 1); | |
//error_reporting(-1); | |
ini_set("max_execution_time", 0); | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>動画ダウンロード</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* youtube-dlコマンド実行と進捗状況の取得 | |
*/ | |
class youtube_dl_run_progress{ | |
//外部コマンド設定 | |
public static $config = array( | |
'time' => '', | |
'output_path' => '', | |
'url' => '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* youtube-dlコマンド 動画情報取得 | |
*/ | |
class youtube_dl_get_info { | |
private $info; | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-Type: text/html; charset=UTF-8"); | |
require_once 'get_csv.php'; | |
$filepath = "./euc.csv"; | |
$from_encoding = "EUC"; | |
$gc = new get_csv($filepath, $from_encoding); | |
$csv = $gc->csv_array_convert(); | |
NewerOlder