データベース開発ツールSqlEndia 2.6.1テスト版ダウンロードURLを公開します。
http://www.sqlendia.com/download/sqlendia2.6.1.zip
対応内容:
①SqlServer2008対応
②バグ修正
自分で作ったり提供したりするものは、まず自分自身で使ってみろろということです。自分じゃ使わないものなら人はいくらでも無責任にも無思考にもなれる。そういう投げやりな「サービス」やら「プロダクツ」なんて、だれだってイヤだ。自分が作り手と同時に利用者の立場になれば、ちゃんと使えるレベルのものを提供しようとします。
2010年11月24日水曜日
2010年11月19日金曜日
c# string compareto
C#でストリング比較関数(CompareTo)実行結果をメモします。
string teststring = "20101115";
System.Diagnostics.Debug.WriteLine(teststring.CompareTo("20101114"));
System.Diagnostics.Debug.WriteLine(teststring.CompareTo("20101115"));
System.Diagnostics.Debug.WriteLine(teststring.CompareTo("20101116"));
実行結果:
1
0
-1
また
string teststring = "20101115";
System.Diagnostics.Debug.WriteLine("20101113".CompareTo(teststring));
System.Diagnostics.Debug.WriteLine("20101114".CompareTo(teststring));
System.Diagnostics.Debug.WriteLine("20101115".CompareTo(teststring));
System.Diagnostics.Debug.WriteLine("20101116".CompareTo(teststring));
System.Diagnostics.Debug.WriteLine("20101117".CompareTo(teststring));
実行結果:
-1
-1
0
1
1
string teststring = "20101115";
System.Diagnostics.Debug.WriteLine(teststring.CompareTo("20101114"));
System.Diagnostics.Debug.WriteLine(teststring.CompareTo("20101115"));
System.Diagnostics.Debug.WriteLine(teststring.CompareTo("20101116"));
実行結果:
1
0
-1
また
string teststring = "20101115";
System.Diagnostics.Debug.WriteLine("20101113".CompareTo(teststring));
System.Diagnostics.Debug.WriteLine("20101114".CompareTo(teststring));
System.Diagnostics.Debug.WriteLine("20101115".CompareTo(teststring));
System.Diagnostics.Debug.WriteLine("20101116".CompareTo(teststring));
System.Diagnostics.Debug.WriteLine("20101117".CompareTo(teststring));
実行結果:
-1
-1
0
1
1
2010年11月10日水曜日
asp.net mvc2 controller attributeサンプル
asp.net mvc2フレームワークのコントローラー属性を定義するサンプルです。
ShowMessageAttribute.cs
ShowMessageAttribute.cs
namespace MvcApplicationEmpty.Attributes
{
public class ShowMessageAttribute : ActionFilterAttribute
{
public string Message { get; set; }
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
//base.OnActionExecuting(filterContext);
filterContext.HttpContext.Response.Write("[OnActionExecuting " + Message + "]");
}
public override void OnActionExecuted(ActionExecutedContext filterContext)
{
//base.OnActionExecuted(filterContext);
filterContext.HttpContext.Response.Write("[OnActionExecuted " + Message + "]");
}
public override void OnResultExecuting(ResultExecutingContext filterContext)
{
//base.OnResultExecuting(filterContext);
filterContext.HttpContext.Response.Write("[OnResultExecuting " + Message + "]");
}
public override void OnResultExecuted(ResultExecutedContext filterContext)
{
//base.OnResultExecuted(filterContext);
filterContext.HttpContext.Response.Write("[OnResultExecuted " + Message + "]");
}
}
}
asp.net mvc複数ボタンの処理
asp.net mvcフレームワークのformに複数のSubmitボタンを配置して、押したボタン情報のみサーバーに送信する処理を説明します。
①まずViewModelにCmdプロパティを定義する。
public string Cmd { get; set; }
②画面にSubmitボタンを配置する。
<button name="Cmd" value="btn1">確定1</button>
<button name="Cmd" value="btn2">確定2</button>
③コントローラーにCmd引数を判定して、ボタン処理を振り分ける。
①まずViewModelにCmdプロパティを定義する。
public string Cmd { get; set; }
②画面にSubmitボタンを配置する。
<button name="Cmd" value="btn1">確定1</button>
<button name="Cmd" value="btn2">確定2</button>
③コントローラーにCmd引数を判定して、ボタン処理を振り分ける。
[HttpPost]
public ViewResult DoLink2(GuestResponse pobjGuestResponse)
{
switch (pobjGuestResponse.Cmd)
{
case "btn1":
break;
case "btn2":
break;
}
...
}
asp.net mvc2メモ
参照用ソースのメモです。
1、Controllersフォルダにコントローラーを作る 2、Viewsフォルダにコントローラーごとにフォルダを作って、下にコントローラーメッソド(Action)ごとにビューページを作る 3、Global.asax.csにデフォールトページ或はコントローラーを指定する
2010年11月9日火曜日
jQuery ajaxサンプル
jQuery ajax関数のサンプルをメモします。
ソース:
ソース:
<script type="text/javascript">
$(function () {
$("#btn01").click(function () {
$.ajax(
{
async: false,
global: false,
ifModified:false,
url: "/txt/txt1.txt",
cache: false,
beforeSend: function () {
$("#div01").append("<hr/>");
},
dataFilter: function(data, type){
return "<b>" + data + "</b>";
},
success: function (msg, textStatus) {
$("#div01").append(msg + "<br/>");
},
error: function(xhrobj, status, errorEx){
$("#div01").append(status + "<br/>");
},
complete: function (xhrobj, textStatus) {
$("#div01").append(textStatus + "(complete)<hr/>");
}
}
);
});
$("#btn02").click(function () {
$.ajax(
{
type: "post",
url: "/Home/AjaxTest",
cache:false,
dataType: "text", // xml, html, script, json, jsonp, text
data:
{
data: "あいうえお",
data1: ["aaa", "bbb"],
},
success: function (msg, textStatus) {
$("#div02").append("success:<br/>");
$("#div02").append(msg + "<br/>");
var obj = jQuery.parseJSON(msg);
$("#div02").append("obj.a=" + obj.a + ",obj.b=" + obj.b + "<br/>");
},
}
);
});
});
</script>
2010年11月8日月曜日
2010年11月5日金曜日
2010年11月4日木曜日
SqlEndia 2.6 ダウンロードURL
データベースクライアントツールSqlEndia最新版2.6をここにリリースします、下記のURLからごダウンロードください。
url:
http://www.sqlendia.com/download/sqlendia2.6.zip
url:
http://www.sqlendia.com/download/sqlendia2.6.zip
2010年11月2日火曜日
jQuery formサンプル
jQuery Ajax Formサンプルを紹介します。
このサンプルで、クライアント側でファイルをアップロードすると、画面サブミットせずにアップロードできます。
このサンプルで、クライアント側でファイルをアップロードすると、画面サブミットせずにアップロードできます。
<script src="jquery-1.4.3.min.js" type="text/javascript"></script>
<script src="jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var options = {
//target: // target element(s) to be updated with server response
success: function (responseText, statusText, xhr, $form) {
alert("サブミット完了しました。[" + response + "]");
}
, iframe: true
};
$('#uploadFileForm').ajaxForm(options);
});
<form id="uploadFileForm" runat="server" enctype = "multipart/form-data">
<div>
<input type="file" id="fileUpload1" name="fileUpload"/>
<asp:Button ID="Button1" runat="server" Text="アップロード"/>
</div>
</form>
Google jQueryライブラリの利用方法
Google社提供しているJavascriptライブラリの利用方法を紹介します。
このトピックでjQueryの利用サンプルを説明します。
【Google API Test】ボタンを押して、Google jQueryライブラリを経由して【Hello】メッセージを出します。
このトピックでjQueryの利用サンプルを説明します。
【Google API Test】ボタンを押して、Google jQueryライブラリを経由して【Hello】メッセージを出します。
登録:
コメント (Atom)