Skip to content

Instantly share code, notes, and snippets.

@Unripe01
Unripe01 / Lambda with Return Value
Created November 28, 2012 05:00
Lambda with Return Value
//Has Return Value
bool isOK = ( (Func<bool>)( () => { return true;  } ) )();
System.Console.Write( isOK ); //true
 
//Has Return Value with Argument
bool isSame = ((Func< int, int, bool >)((i, j) => i == j))( 0, 1 );
System.Console.Write( isSame ); // false
@Unripe01
Unripe01 / SearchStringWithRegularExpressions
Created November 29, 2012 08:52
I want to write more simple [if] statement at [//Add a string all matching] comments
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace SearchStringWithRegularExpressions
{
class Program
@Unripe01
Unripe01 / index.js
Created November 30, 2012 08:25 — forked from jhonyspicy/mouseover.js
マウスオーバー
//マウスオーバー用
$('.rollOver img').each(function() {
$(this).data('image_src', $(this).attr('src'));
$('<img>').attr('src', $(this).data('image_src').replace(/^(.+)(\.[a-z]+)$/, '$1_over$2')); //プリロード用
}).mouseover(function() {
$(this).attr('src', $(this).data('image_src').replace(/^(.+)(\.[a-z]+)$/, '$1_over$2'));
}).mouseout(function() {
$(this).attr('src', $(this).data('image_src'));
});
@Unripe01
Unripe01 / SQLServerBackupCommand
Last active October 13, 2015 17:18
SQL Server Backup Command
USE myDataBase;
GO
BACKUP DATABASE myDataBase
--TO DISK = 'C:\work\mydb_backup_full.bak'
TO DISK = '\\pc01\Backup\backup.bat'
WITH INIT;
@Unripe01
Unripe01 / call.superTables.js
Created December 10, 2012 10:40
superTables.js Call Samlpe
//superTables.jsの呼び出し
(function () {
//GridViewが空のdivを吐き出すので、親divにクラスを設定
$('#GridView1').parent("div").addClass("fakeContainer");
new superTable("GridView1", {
cssSkin: "sDefault",
headerRows: 1,
fixedCols: 1
});
})();
@Unripe01
Unripe01 / jQuery.attrSample
Created December 10, 2012 10:51
jQuery attr Sample
rowTable.attr(‘id’, rowTable.attr(‘id’) + ‘_row’);
@Unripe01
Unripe01 / UseAccessibleHeaderSample
Created December 10, 2012 11:06
ASP GridView output thead and tbody
//url http://msdn.microsoft.com/ja-jp/library/ee712726(v=vs.100).aspx
GridView1.UseAccessibleHeader = true;
GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;
@Unripe01
Unripe01 / fakeContainer
Created December 10, 2012 11:14
css fakeContainer
.fakeContainer { /* The parent container */
margin: 0 0 20px;
border: 1px;
width: 600px; /* Required to set */
height: 150px; /* Required to set */
overflow: hidden; /* Required to set */
}
@Unripe01
Unripe01 / tablefixedsamples
Created December 10, 2012 11:17
sample code using the "Grid.js ", "superTables.js", "jquery.tablefix_1.0.0.js"
<%--プラグイン読み込み--%>
<script src="Scripts/superTables.js" type="text/javascript"></script>
<script src="Scripts/jquery.tablefix_1.0.0.js" type="text/javascript"></script>
<script src="Scripts/Grid.js" type="text/javascript"></script>
<%--テーブル固定の実装--%>
<script type="text/javascript">
//<![CDATA[
//superTables.jsの呼び出し
(function () {
//GridViewが空のdivを吐き出すので、親divにクラスを設定
@Unripe01
Unripe01 / 高さを整えるマクロ.vba
Created May 13, 2019 06:23
高さを整えるマクロ
Option Explicit
Sub セル操作_高さ調整_仮版()
Application.ScreenUpdating = False
'
' 高さ調整_仮版 Macro
' 改行を数えて1行15の高さにする。改行がなかったら15にする。
'
'Dim rng1, rng2, rng3 As Range 'VBAでは、このように宣言したとき、長整数型(Long)になるのは変数Cだけです。