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
<Button | |
android:id="@+id/btnStart" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:background="@drawable/button_stateful" | |
/> |
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
private void UpdateProducts() { | |
using (var context = new MyEntities()) { | |
using (var cn = context.Database.Connection) { | |
cn.Open(); | |
using (var tr = context.Database.Connection.BeginTransaction()) { | |
try { | |
//1. ADO.NETで独自のSQL文を実行。 | |
var sql = "UPDATE [Products] SET [Price] = [Price] * 1.1 "; | |
var cmd = cn.CreateCommand(); | |
cmd.Transaction = tr; |
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
private void UpdateProducts() { | |
using (var context = new MyEntities()) { | |
using (var cn = context.Database.Connection) { | |
cn.Open(); | |
using (var tr = context.Database.Connection.BeginTransaction()) { | |
try { | |
//1. ADO.NETで独自のSQL文を実行。 | |
var sql = "UPDATE [Products] SET [Price] = [Price] * 1.1 "; | |
var cmd = cn.CreateCommand(); | |
cmd.Transaction = tr; |
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
private void UpdateProducts() { | |
//EFと同じ接続文字列を使って先にSqlConnectionを作成。 | |
using (var sqlConnection = new SqlConnection(new MyEntities().Database.Connection.ConnectionString)) { | |
//作成済みのSqlConnectionを使ってDbContextを作成。 | |
using (var context = new MyEntities(sqlConnection)) { | |
//EntityConnectionのOpenメソッドを呼ぶ。 | |
IDbConnection entityConnection = ((IObjectContextAdapter)context).ObjectContext.Connection; |
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(){ | |
$("input[type=text]").keypress(function(e) { | |
var c = e.which ? e.which : e.keyCode; | |
return c != 13; | |
}); | |
}); |
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(){ | |
var elements = "input[type=text]"; | |
$(elements).keypress(function(e) { | |
var c = e.which ? e.which : e.keyCode; | |
if (c == 13) { | |
var index = $(elements).index(this); | |
$(elements + ":gt(" + index + "):first").focus(); | |
e.preventDefault(); | |
} | |
}); |
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(){ | |
var elements = "input[type=text]"; | |
$(elements).keypress(function(e) { | |
var c = e.which ? e.which : e.keyCode; | |
if (c == 13) { | |
var index = $(elements).index(this); | |
var criteria = e.shiftKey ? ":lt(" + index + "):last" : ":gt(" + index + "):first"; | |
$(elements + criteria).focus(); | |
e.preventDefault(); | |
} |
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
final ScaleAnimation scale = new ScaleAnimation(1.0f, 0.1f, 1.0f, 0.1f, | |
Animation.RELATIVE_TO_SELF, 0.5f, | |
Animation.RELATIVE_TO_SELF, 0.5f); | |
final AlphaAnimation alpha = new AlphaAnimation(0.9f, 0.1f); | |
final AnimationSet set = new AnimationSet(true); | |
set.addAnimation(scale); | |
set.addAnimation(alpha); | |
set.setFillAfter(true); | |
set.setDuration(1500); |
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
final ScaleAnimation scale = new ScaleAnimation(1.0f, 0.1f, 1.0f, 0.1f, | |
Animation.RELATIVE_TO_SELF, 0.5f, | |
Animation.RELATIVE_TO_SELF, 0.5f); | |
final AlphaAnimation alpha = new AlphaAnimation(0.9f, 0.1f); | |
final AnimationSet set = new AnimationSet(true); | |
set.addAnimation(scale); | |
set.addAnimation(alpha); | |
set.setFillAfter(true); | |
set.setDuration(1500); |
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
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Helpers; | |
using System.Web.Mvc; | |
using System.Web.Security; | |
using System.Text; | |
using System.Reflection; |