Skip to content

Instantly share code, notes, and snippets.

View earlgreyxxx's full-sized avatar

Kenji Nakagawa earlgreyxxx

  • Far West Kobe, Hyogo, Japan
  • 06:35 (UTC +09:00)
View GitHub Profile
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
/* グリッドコンテナ */
#excel-grid {
height: 500px;
overflow: auto;
/*******************************************************************************
ミッション:
ローカルのエクセルファイルを選択して疑似グリッドビュー編集を行う。
*******************************************************************************/
(function($,undefined) {
// エクセルファイルロードのトリガー
$('input#select-file[type=file]').on('change',on_input_type_file_change);
// グリッドセルのイベントハンドラ登録
/******************************************************************
使用方法:
CopyWindowsSpotLight.exe コピー元 コピー先
コピー元は 上記の %LOCALAPPDATA%..... を指定する。
コピー元のディレクトリとコピー先のディレクトリを指定して次の条件でコピーする。
1)ファイルサイズ400KB以上のファイルをJPEGファイルとしてみなす。
(本来はファイルの先頭32ビットぐらいを読んでJPEGファイルかの判別をする必要がありますが・・・)
2)ランドスケープ(幅が高さより大きい)
/********************************************************************
filename: jquery.enterNext.js
usage: call bellow...
$('form').enterNext();
********************************************************************/
(function($,undefined)
{
$.enterNext =
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style type="text/css"><!--
form input[type=text] {
display: block;
margin: 1em 0;
padding: 5px;
}
/******************************************************************
入力必須の際のエラーメッセージをカスタマイズします。
usage:
<input type="text" pattern="^[0-9]*$" name="hogehoge" />
$('input[type=text]').validity('半角数字で入力してください');
*******************************************************************/
;
(function($,undefined)
/******************************************************************************
thead固定テーブル
require following...
<div class="table-wrap" style="position: relative;">
<table>
<thead>...</thead>
<tbody>...</tbody>
</table>
</div>
<script type="text/javascript">
<div class="table-container">
<table>
<thead>
<tr>
<th>カラム1</th>
<th>カラム2</th>
<th>カラム3</th>
<th>カラム4</th>
<th>カラム5</th>
</tr>
<?php
/*************************************************************************************
SQLServer名前付きインスタンスの情報を得る。
File: query_sqlbrowser.php
*************************************************************************************/
function queryNamedInstance($host,$instanceName,$queryPort = 1434)
{
static $timeout = 5;
$fp = fsockopen('udp://'.$host,$queryPort,$errno,$errstr,$timeout);
if($fp === false)
/*******************************************
* JUST ONLY PLAY SOUND FILE(WAV)
build:
>> csc -target:winexe playsound.cs
usage:
>> playsound logon.wav
namespaceは適当に変えてね。
*******************************************/
using System.IO;
using System.Media;