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
import org.seasar.doma.Entity; | |
import org.seasar.doma.Id; | |
@Entity | |
public class Dept { | |
@Id | |
private Integer id; | |
private String name; |
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 xhr = new Xhr({ | |
baseUrl: 'http://localhost:8080/api', | |
user: "", | |
password: "", | |
type: 'json', | |
preHandler: function () {}, | |
postHandler: function () {}, | |
errorHandler, function () {} | |
headers: {}, | |
data: {}, |
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
public static class WebApiConfig | |
{ | |
public static void Register(HttpConfiguration config) | |
{ | |
config.Routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); |
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.Diagnostics; | |
using System.IO; | |
using System.Text; | |
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Generic; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
// see http://msdn.microsoft.com/library/windows/apps/hh761488.aspx |
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
member this.SetupCommand (ps:PreparedStatement) (command:DbCommand) = | |
command.CommandText <- ps.Text | |
let dbParams = | |
ps.Parameters | |
|> List.map (fun param -> | |
let dbParam = command.CreateParameter() | |
dialect.SetupDbParameter(param, dbParam) | |
dbParam ) | |
|> List.toArray | |
command.Parameters.AddRange(dbParams) |
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
open System | |
open System.Collections.Generic | |
open System.Net | |
open System.Net.Http | |
open System.Web.Http | |
open System.Web.Http.Dispatcher | |
open System.Web.Http.SelfHost | |
open Microsoft.VisualStudio.TestTools.UnitTesting | |
open Newtonsoft.Json.Linq | |
open Newtonsoft.Json.Serialization |
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 _View = Backbone.View; | |
Backbone.View = function () { | |
logger.info('before'); | |
var init = this.initialize; | |
if (init) { | |
this.initialize = function () { | |
logger.info('before initialize'); | |
init.call(this); | |
logger.info('after initialize'); | |
}.bind(this); |
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
package tutorial.dao; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import org.seasar.doma.jdbc.Config; | |
public class DeleteDelegate { | |
protected final Config config; |
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
// .01010101... | |
type Symbol = | |
| None | |
| Str of string | |
| Num of int | |
type Op = | |
| P of Symbol | |
| R |
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
// .01000000... | |
type Symbol = | |
| None | |
| Str of string | |
| Num of int | |
type Op = | |
| P of Symbol | |
| R |