This file contains hidden or 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
@Dao(config = AppConfig.class) | |
public interface BetaDomaTableDao { | |
/** | |
* | |
* @param beta_doma_id 必要事項:カラム名と一致 | |
* @return | |
*/ | |
@Select | |
BetaDoma selectById(Integer beta_doma_id); |
This file contains hidden or 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
@Entity(naming = NamingType.SNAKE_LOWER_CASE) | |
public class BetaDoma { | |
@Id | |
@Column(name = "beta_doma_id") | |
public Integer id; | |
@Column(name = "beta_doma_message") | |
public String message; | |
@Column(name = "beta_doma_number") |
This file contains hidden or 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 class AppConfig extends DomaAbstractConfig { | |
protected static final LocalTransactionalDataSource dataSource = createDataSource(); | |
protected static final Dialect dialect = new MysqlDialect(); | |
public DataSource getDataSource() { | |
return dataSource; | |
} |
This file contains hidden or 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 class Main { | |
public static void main(String[] args){ | |
LocalTransaction tx = AppConfig.getLocalTransaction(); | |
try{ | |
tx.begin(); | |
BetaDomaTableDao dao = new BetaDomaTableDaoImpl(); | |
BetaDoma betaDomaTable = dao.selectById(2); |
This file contains hidden or 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
application: guestbook-app | |
version: 1 | |
runtime: python27 | |
api_version: 1 | |
threadsafe: yes | |
libraries: | |
- name: webapp2 | |
version: latest | |
handlers: |
This file contains hidden or 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
#coding: UTF-8 | |
''' | |
Created on 2014/05/24 | |
@author: masahiro | |
''' | |
import cgi | |
from google.appengine.api import users |
This file contains hidden or 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
#codint: UTF-8 | |
from google.appengine.api import users | |
import webapp2 | |
class MainPage(webapp2.RequestHandler): | |
def get(self): | |
user = users.get_current_user() | |
if user: |
This file contains hidden or 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 webapp2 | |
class MainPage(webapp2.RequestHandler): | |
def get(self): | |
self.response.headers['Content-Type'] = 'text/plain' | |
self.response.write('Hello, masahiro\'s World!') | |
This file contains hidden or 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
#coding: UTF=8 | |
__author__ = 'masahiro' | |
import math, random, numpy | |
from datetime import date | |
print math.ceil(5.2) | |
for i in range(5): | |
print random.random() |
This file contains hidden or 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
# coding: UTF=8 | |
import DotInstall3 | |
__author__ = 'masahiro' | |
class SuperUser(DotInstall3.User): | |
def shout(self): | |
print "%s! is SUPER!" % self.name | |
tom = SuperUser("tom") |