INFO [2017-09-12 04:13:13,025] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: /
INFO [2017-09-12 04:13:13,025] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: /
INFO [2017-09-12 04:13:13,028] io.dropwizard.hibernate.SessionFactoryFactory: Entity classes: [io.budgetapp.model.AuthToken, io.budgetapp.model.Budget, io.budgetapp.model.BudgetType, io.budgetapp.model.Category, io.budgetapp.model.Recurring, io.budgetapp.model.Transaction, io.budgetapp.model.User]
INFO [2017-09-12 04:13:13,037] org.hibernate.dialect.Dialect: HHH000400: Using dialect: io.budgetapp.hibernate.dialect.CustomHSQLDialect
INFO [2017-09-12 04:13:13,062] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.util.Currency] overrides previous : org.hibernate.type.CurrencyType@6c6e30
INFO [2017-09-12 04:13:13,062] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.time.Duration] overrides previous : org.hibernate.type.DurationType@5c65f571
INFO [2017-09-12 04:13:13,062] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.time.Instant] overrides previous : org.hibernate.type.InstantType@caa11e8
INFO [2017-09-12 04:13:13,062] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.time.LocalDate] overrides previous : org.hibernate.type.LocalDateType@1ce95d55
INFO [2017-09-12 04:13:13,062] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.time.LocalDateTime] overrides previous : org.hibernate.type.LocalDateTimeType@2425cce2
INFO [2017-09-12 04:13:13,062] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.time.LocalTime] overrides previous : org.hibernate.type.LocalTimeType@305d818c
INFO [2017-09-12 04:13:13,063] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.time.OffsetDateTime] overrides previous : org.hibernate.type.OffsetDateTimeType@66886127
INFO [2017-09-12 04:13:13,063] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.time.OffsetTime] overrides previous : org.hibernate.type.OffsetTimeType@6cc0f3c8
INFO [2017-09-12 04:13:13,063] org.hibernate.type.BasicTypeRegistry: HHH000270: Type registration [java.time.ZonedDateTime] overrides previous : org.hibernate.type.ZonedDateTimeType@71e700cb
WARN [2017-09-12 04:13:13,091] com.google.common.cache.CacheBuilder: ignoring weigher specified without maximumWeight
INFO [2017-09-12 04:13:13,092] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: /
INFO [2017-09-12 04:13:13,092] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: /
INFO [2017-09-12 04:13:13,092] io.dropwizard.server.ServerFactory: Starting budget-app
____ _ _
| _ \ | | | | /\
| |_) |_ _ __| | __ _ ___| |_ / \ _ __ _ __
| _ <| | | |/ _` |/ _` |/ _ \ __| / /\ \ | '_ \| '_ \
| |_) | |_| | (_| | (_| | __/ |_ / ____ \| |_) | |_) |
|____/ \__,_|\__,_|\__, |\___|\__| /_/ \_\ .__/| .__/
__/ | | | | |
|___/ |_| |_|
INFO [2017-09-12 04:13:13,094] org.eclipse.jetty.setuid.SetUIDListener: Opened application@f0694bb{HTTP/1.1,[http/1.1]}{<IP_ADDRESS>:9999}
INFO [2017-09-12 04:13:13,095] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6ffad2fe{HTTP/1.1,[http/1.1]}{<IP_ADDRESS>:8081}
INFO [2017-09-12 04:13:13,095] org.eclipse.jetty.server.Server: jetty-9.4.2.v20170220
INFO [2017-09-12 04:13:13,095] io.budgetapp.managed.MigrationManaged: begin migration
INFO [2017-09-12 04:13:13,106] liquibase: Successfully acquired change log lock
INFO [2017-09-12 04:13:13,156] liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO [2017-09-12 04:13:13,161] liquibase: Successfully released change log lock
INFO [2017-09-12 04:13:13,162] io.budgetapp.managed.MigrationManaged: finish migration
DEBUG [2017-09-12 04:13:13,165] io.budgetapp.job.RecurringJob: Start Recurring job job
DEBUG [2017-09-12 04:13:13,165] io.budgetapp.service.FinanceService: Begin update recurrings...
INFO [2017-09-12 04:13:13,166] org.hibernate.hql.internal.QueryTranslatorFactoryInitiator: HHH000397: Using ASTQueryTranslatorFactory
DEBUG [2017-09-12 04:13:13,173] org.hibernate.SQL:
/* SELECT
r
FROM
Recurring r
WHERE
(
r.recurringType = :daily
AND DAY(r.lastRunAt) = :yesterday
)
OR (
r.recurringType = :weekly
AND WEEK(r.lastRunAt) = :lastWeek
AND DAYOFWEEK(r.lastRunAt) = DAYOFWEEK(CURRENT_TIMESTAMP)
)
OR (
r.recurringType = :monthly
AND MONTH(r.lastRunAt) = :lastMonth
AND DAY(r.lastRunAt) = DAY(CURRENT_TIMESTAMP)
)
OR (
r.recurringType = :yearly
AND YEAR(r.lastRunAt) = :lastYear
AND MONTH(r.lastRunAt) = MONTH(CURRENT_TIMESTAMP)
)
OR r.lastRunAt IS NULL */ select
recurring0_.id as id1_4_,
recurring0_.amount as amount2_4_,
recurring0_.budget_type_id as budget_t7_4_,
recurring0_.created_at as created_3_4_,
recurring0_.last_run_at as last_run4_4_,
recurring0_.type as type5_4_,
recurring0_.remark as remark6_4_
from
recurrings recurring0_
where
recurring0_.type=?
and day(recurring0_.last_run_at)=?
or recurring0_.type=?
and extract(week_of_year
from
recurring0_.last_run_at)=?
and dayofweek(recurring0_.last_run_at)=dayofweek(CURRENT_TIMESTAMP)
or recurring0_.type=?
and month(recurring0_.last_run_at)=?
and day(recurring0_.last_run_at)=day(CURRENT_TIMESTAMP)
or recurring0_.type=?
and year(recurring0_.last_run_at)=?
and month(recurring0_.last_run_at)=month(CURRENT_TIMESTAMP)
or recurring0_.last_run_at is null
DEBUG [2017-09-12 04:13:13,174] io.budgetapp.service.FinanceService: Found 0 recurring(s) item to update
DEBUG [2017-09-12 04:13:13,174] io.budgetapp.service.FinanceService: Finish update recurrings...
DEBUG [2017-09-12 04:13:13,174] io.budgetapp.job.RecurringJob: Complete Recurring job job and took 9ms
INFO [2017-09-12 04:13:13,174] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
89565 nanoseconds spent acquiring 2 JDBC connections;
37025 nanoseconds spent releasing 2 JDBC connections;
452761 nanoseconds spent preparing 1 JDBC statements;
175604 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
0 nanoseconds spent executing 0 flushes (flushing a total of 0 entities and 0 collections);
5290 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
INFO [2017-09-12 04:13:13,176] org.eclipse.jetty.ContextHandler.58a5d944: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
INFO [2017-09-12 04:13:13,283] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources:
GET /api/budgets (io.budgetapp.resource.BudgetResource)
POST /api/budgets (io.budgetapp.resource.BudgetResource)
GET /api/budgets/suggests (io.budgetapp.resource.BudgetResource)
DELETE /api/budgets/{id} (io.budgetapp.resource.BudgetResource)
GET /api/budgets/{id} (io.budgetapp.resource.BudgetResource)
PUT /api/budgets/{id} (io.budgetapp.resource.BudgetResource)
GET /api/budgets/{id}/transactions (io.budgetapp.resource.BudgetResource)
GET /api/categories (io.budgetapp.resource.CategoryResource)
POST /api/categories (io.budgetapp.resource.CategoryResource)
GET /api/categories/suggests (io.budgetapp.resource.CategoryResource)
GET /api/categories/summary (io.budgetapp.resource.CategoryResource)
DELETE /api/categories/{id} (io.budgetapp.resource.CategoryResource)
GET /api/categories/{id} (io.budgetapp.resource.CategoryResource)
GET /api/categories/{id}/budgets (io.budgetapp.resource.CategoryResource)
GET /api/health/ping (io.budgetapp.resource.HealthCheckResource)
GET /api/recurrings (io.budgetapp.resource.RecurringResource)
POST /api/recurrings (io.budgetapp.resource.RecurringResource)
DELETE /api/recurrings/{id} (io.budgetapp.resource.RecurringResource)
GET /api/recurrings/{id}/transactions (io.budgetapp.resource.RecurringResource)
POST /api/reports/transactions (io.budgetapp.resource.ReportResource)
GET /api/transactions (io.budgetapp.resource.TransactionResource)
POST /api/transactions (io.budgetapp.resource.TransactionResource)
GET /api/transactions/monthly (io.budgetapp.resource.TransactionResource)
GET /api/transactions/summary (io.budgetapp.resource.TransactionResource)
GET /api/transactions/today (io.budgetapp.resource.TransactionResource)
DELETE /api/transactions/{id} (io.budgetapp.resource.TransactionResource)
GET /api/transactions/{id} (io.budgetapp.resource.TransactionResource)
POST /api/users (io.budgetapp.resource.UserResource)
PUT /api/users (io.budgetapp.resource.UserResource)
GET /api/users/account (io.budgetapp.resource.UserResource)
POST /api/users/auth (io.budgetapp.resource.UserResource)
PUT /api/users/password (io.budgetapp.resource.UserResource)
GET /api/users/ping (io.budgetapp.resource.UserResource)
GET /api/users/usage (io.budgetapp.resource.UserResource)
INFO [2017-09-12 04:13:13,284] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@58a5d944{/,null,AVAILABLE}
INFO [2017-09-12 04:13:13,285] io.dropwizard.setup.AdminEnvironment: tasks =
POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask)
POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask)
INFO [2017-09-12 04:13:13,286] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@30d25bdf{/,null,AVAILABLE}
INFO [2017-09-12 04:13:13,287] org.eclipse.jetty.server.AbstractConnector: Started application@f0694bb{HTTP/1.1,[http/1.1]}{<IP_ADDRESS>:9999}
INFO [2017-09-12 04:13:13,289] org.eclipse.jetty.server.AbstractConnector: Started admin@6ffad2fe{HTTP/1.1,[http/1.1]}{<IP_ADDRESS>:8081}
INFO [2017-09-12 04:13:13,289] org.eclipse.jetty.server.Server: Started @9445ms
DEBUG [2017-09-12 04:13:13,305] io.budgetapp.resource.ResourceIT: 1 * Sending client request on thread Test worker
1 > POST http://localhost:9999/api/users
1 > Accept: application/json
1 > Content-Type: application/json
{"username":"50cd9f20@cfb9b1af.com","password":"bd3bf1df"}
WARN [2017-09-12 04:13:13,314] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,315] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_6_0_,
this_.created_at as created_2_6_0_,
this_.currency as currency3_6_0_,
this_.name as name4_6_0_,
this_.password as password5_6_0_,
this_.username as username6_6_0_
from
users this_
where
lower(this_.username)=?
DEBUG [2017-09-12 04:13:13,317] io.budgetapp.dao.UserDAO: Add new user<EMAIL_ADDRESS>password='ffa9ac70485b1d52777b0f2f790e87696e606f15e1938356df0264c5483db0c1abde7b93ad6f30b7'}
DEBUG [2017-09-12 04:13:13,317] org.hibernate.SQL:
/* insert io.budgetapp.model.User
*/ insert
into
users
(id, currency, name, password, username)
values
(default, ?, ?, ?, ?)
WARN [2017-09-12 04:13:13,318] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,318] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_3_1_,
this_.created_at as created_2_3_1_,
this_.name as name3_3_1_,
this_.type as type4_3_1_,
this_.user_id as user_id5_3_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
categories this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.user_id=?
order by
this_.type desc
DEBUG [2017-09-12 04:13:13,319] io.budgetapp.service.FinanceService: Create default categories and budgets User{id=4<EMAIL_ADDRESS>9-2017
DEBUG [2017-09-12 04:13:13,319] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Income', type=INCOME, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,320] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,321] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Home', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,321] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,321] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Transportation', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,322] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,322] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Health', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,322] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,323] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Charity/Gifts', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,323] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,323] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Daily Living', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,324] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,324] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Entertainment', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,324] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,325] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Savings', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,325] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,325] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Obligations', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,326] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,326] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='Miscellaneous', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,326] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,326] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,327] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Wages & Tips', createdAt=null, user=null, category=Category{id=37, name='Income', type=INCOME, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,327] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,328] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,328] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Dividends', createdAt=null, user=null, category=Category{id=37, name='Income', type=INCOME, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,328] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,329] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,329] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Gifts Received', createdAt=null, user=null, category=Category{id=37, name='Income', type=INCOME, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,329] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,329] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,329] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Refunds/Reimbursements', createdAt=null, user=null, category=Category{id=37, name='Income', type=INCOME, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,329] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,330] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,330] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Transfer From Savings', createdAt=null, user=null, category=Category{id=37, name='Income', type=INCOME, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,330] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,332] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,332] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Electricity', createdAt=null, user=null, category=Category{id=38, name='Home', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,332] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,332] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,332] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Gas/Oil', createdAt=null, user=null, category=Category{id=38, name='Home', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,332] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,336] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,337] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Improvements', createdAt=null, user=null, category=Category{id=38, name='Home', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,337] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,337] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,337] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Vehicle Payments', createdAt=null, user=null, category=Category{id=39, name='Transportation', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,337] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,337] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,338] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Auto Insurance', createdAt=null, user=null, category=Category{id=39, name='Transportation', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,338] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,349] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,349] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Groceries', createdAt=null, user=null, category=Category{id=42, name='Daily Living', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,349] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,350] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,350] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Personal Supplies', createdAt=null, user=null, category=Category{id=42, name='Daily Living', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,351] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,362] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,362] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Games', createdAt=null, user=null, category=Category{id=43, name='Entertainment', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,363] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,379] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,379] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Transfer to Savings', createdAt=null, user=null, category=Category{id=44, name='Savings', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,380] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,383] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,383] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Education', createdAt=null, user=null, category=Category{id=44, name='Savings', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,384] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,389] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,389] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='State/Local Taxes', createdAt=null, user=null, category=Category{id=45, name='Obligations', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,389] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)

DEBUG [2017-09-12 04:13:13,391] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,391] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='Postage', createdAt=null, user=null, category=Category{id=46, name='Miscellaneous', type=EXPENDITURE, createdAt=null, user=User{id=4<EMAIL_ADDRESS>DEBUG [2017-09-12 04:13:13,391] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,395] io.budgetapp.resource.ResourceIT: 1 * Client response received on thread Test worker
1 < 201
1 < Content-Length: 177
1 < Content-Type: application/json
1 < Date: Tue, 12 Sep 2017 04:13:13 GMT
1 < Location: http://localhost:9999/api/users/4
{"id":4,"username":"50cd9f20@cfb9b1af.com","name":null,"createdAt":null,"currency":null,"token":null,"avatar":"https://www.gravatar.com/avatar/c976de541e3bb4ba9cca1266b0dcd624"}
DEBUG [2017-09-12 04:13:13,396] io.budgetapp.resource.ResourceIT: 2 * Sending client request on thread Test worker
2 > POST http://localhost:9999/api/users/auth
2 > Accept: application/json
2 > Content-Type: application/json
{"username":"50cd9f20@cfb9b1af.com","password":"bd3bf1df"}
INFO [2017-09-12 04:13:13,397] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
45841 nanoseconds spent acquiring 2 JDBC connections;
30678 nanoseconds spent releasing 2 JDBC connections;
17336426 nanoseconds spent preparing 147 JDBC statements;
8973757 nanoseconds spent executing 147 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
474270 nanoseconds spent executing 1 flushes (flushing a total of 145 entities and 0 collections);
87802 nanoseconds spent executing 2 partial-flushes (flushing a total of 1 entities and 1 collections)
}
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/users HTTP/1.1" 201 177 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 90
WARN [2017-09-12 04:13:13,400] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,400] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_6_0_,
this_.created_at as created_2_6_0_,
this_.currency as currency3_6_0_,
this_.name as name4_6_0_,
this_.password as password5_6_0_,
this_.username as username6_6_0_
from
users this_
where
lower(this_.username)=?
WARN [2017-09-12 04:13:13,402] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,403] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.user_id=?
DEBUG [2017-09-12 04:13:13,404] org.hibernate.SQL:
/* insert io.budgetapp.model.AuthToken
*/ insert
into
auth_tokens
(id, token, user_id)
values
(default, ?, ?)
DEBUG [2017-09-12 04:13:13,406] io.budgetapp.resource.ResourceIT: 2 * Client response received on thread Test worker
2 < 200
2 < Content-Length: 220
2 < Content-Type: application/json
2 < Date: Tue, 12 Sep 2017 04:13:13 GMT
{"id":4,"username":"50cd9f20@cfb9b1af.com","name":null,"createdAt":1505189593318,"currency":null,"token":"2adc64f3-c4b0-4ab1-9a72-0746c748e1e4","avatar":"https://www.gravatar.com/avatar/c976de541e3bb4ba9cca1266b0dcd624"}
INFO [2017-09-12 04:13:13,419] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
47250 nanoseconds spent acquiring 2 JDBC connections;
28915 nanoseconds spent releasing 2 JDBC connections;
842754 nanoseconds spent preparing 3 JDBC statements;
173489 nanoseconds spent executing 3 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
81808 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
88507 nanoseconds spent executing 2 partial-flushes (flushing a total of 1 entities and 1 collections)
}
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/users/auth HTTP/1.1" 200 220 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 22
DEBUG [2017-09-12 04:13:13,426] io.budgetapp.resource.ResourceIT: 1 * Sending client request on thread Test worker
1 > POST http://localhost:9999/api/categories
1 > Accept: application/json
1 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
1 > Content-Type: application/json
{"id":null,"name":"67127ad0","type":"EXPENDITURE","createdAt":null,"user":null}
WARN [2017-09-12 04:13:13,428] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,429] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,430] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
53598 nanoseconds spent acquiring 2 JDBC connections;
39493 nanoseconds spent releasing 2 JDBC connections;
366016 nanoseconds spent preparing 1 JDBC statements;
121652 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
125532 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5994 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,436] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='67127ad0', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,436] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
INFO [2017-09-12 04:13:13,439] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
34909 nanoseconds spent acquiring 2 JDBC connections;
40903 nanoseconds spent releasing 2 JDBC connections;
132584 nanoseconds spent preparing 1 JDBC statements;
87097 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
77928 nanoseconds spent executing 1 flushes (flushing a total of 1 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,440] io.budgetapp.resource.ResourceIT: 1 * Client response received on thread Test worker
1 < 201
1 < Content-Length: 259
1 < Content-Type: application/json
1 < Date: Tue, 12 Sep 2017 04:13:13 GMT
1 < Location: http://localhost:9999/api/categories/47
{"id":47,"name":"67127ad0","type":"EXPENDITURE","createdAt":null,"user":{"id":4,"username":"50cd9f20@cfb9b1af.com","name":null,"createdAt":1505189593318,"currency":null,"token":null,"avatar":"https://www.gravatar.com/avatar/c976de541e3bb4ba9cca1266b0dcd624"}}
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/categories HTTP/1.1" 201 259 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 12
DEBUG [2017-09-12 04:13:13,441] io.budgetapp.resource.ResourceIT: 2 * Sending client request on thread Test worker
2 > POST http://localhost:9999/api/budgets
2 > Accept: application/json
2 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
2 > Content-Type: application/json
{"name":"6bcb20cf","projected":0.0,"categoryId":47}
WARN [2017-09-12 04:13:13,443] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,443] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,444] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
56419 nanoseconds spent acquiring 2 JDBC connections;
29620 nanoseconds spent releasing 2 JDBC connections;
334281 nanoseconds spent preparing 1 JDBC statements;
63824 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
75813 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5289 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,449] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
DEBUG [2017-09-12 04:13:13,450] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='6bcb20cf', createdAt=null, user=null, category=Category{id=47, name='null', type=null, createdAt=null, user=null}}
DEBUG [2017-09-12 04:13:13,450] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
INFO [2017-09-12 04:13:13,454] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
34557 nanoseconds spent acquiring 2 JDBC connections;
26093 nanoseconds spent releasing 2 JDBC connections;
213685 nanoseconds spent preparing 2 JDBC statements;
156563 nanoseconds spent executing 2 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
77576 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,454] io.budgetapp.resource.ResourceIT: 2 * Client response received on thread Test worker
2 < 201
2 < Content-Length: 212
2 < Content-Type: application/json
2 < Date: Tue, 12 Sep 2017 04:13:13 GMT
2 < Location: http://localhost:9999/api/budgets/277
{"id":277,"name":"6bcb20cf","projected":0.0,"actual":0.0,"period":1504242000000,"createdAt":null,"category":{"id":47,"name":null,"type":null,"createdAt":null,"user":null},"budgetType":{"id":277,"createdAt":null}}
DEBUG [2017-09-12 04:13:13,457] io.budgetapp.resource.ResourceIT: 3 * Sending client request on thread Test worker
3 > POST http://localhost:9999/api/transactions
3 > Accept: application/json
3 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
3 > Content-Type: application/json
{"amount":10.0,"remark":null,"transactionOn":1505189593456,"recurring":null,"recurringType":null,"budget":{"id":277,"name":"6bcb20cf","projected":0.0,"actual":0.0,"period":null,"createdAt":null,"category":{"id":47,"name":"67127ad0","type":"EXPENDITURE","createdAt":null,"user":null},"budgetType":null}}
WARN [2017-09-12 04:13:13,459] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,459] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,460] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
54655 nanoseconds spent acquiring 2 JDBC connections;
35261 nanoseconds spent releasing 2 JDBC connections;
295493 nanoseconds spent preparing 1 JDBC statements;
62766 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
70523 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5289 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,465] org.hibernate.SQL:
select
budget0_.id as id1_2_0_,
budget0_.actual as actual2_2_0_,
budget0_.type_id as type_id7_2_0_,
budget0_.category_id as category8_2_0_,
budget0_.created_at as created_3_2_0_,
budget0_.name as name4_2_0_,
budget0_.period_on as period_o5_2_0_,
budget0_.projected as projecte6_2_0_,
budget0_.user_id as user_id9_2_0_
from
budgets budget0_
where
budget0_.id=?
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/budgets HTTP/1.1" 201 212 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 13
DEBUG [2017-09-12 04:13:13,466] io.budgetapp.dao.TransactionDAO: Add transaction Transaction{id=null, amount=10.0, remark='null', transactionOn=Mon Sep 11 23:13:13 CDT 2017, createdAt=null, budget=Budget{id=277, actual=0.0, name='6bcb20cf', createdAt=null, user=null, category=Category{id=47, name='67127ad0', type=EXPENDITURE, createdAt=null, user=null}}}
DEBUG [2017-09-12 04:13:13,466] org.hibernate.SQL:
/* insert io.budgetapp.model.Transaction
*/ insert
into
transactions
(id, amount, auto, budget_id, name, recurring_id, remark, transaction_on)
values
(default, ?, ?, ?, ?, ?, ?, ?)
DEBUG [2017-09-12 04:13:13,468] org.hibernate.SQL:
/* update
io.budgetapp.model.Budget */ update
budgets
set
actual=?,
name=?,
projected=?
where
id=?
INFO [2017-09-12 04:13:13,470] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
35614 nanoseconds spent acquiring 2 JDBC connections;
25389 nanoseconds spent releasing 2 JDBC connections;
578645 nanoseconds spent preparing 3 JDBC statements;
334281 nanoseconds spent executing 3 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
1059262 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,471] io.budgetapp.resource.ResourceIT: 3 * Client response received on thread Test worker
3 < 201
3 < Content-Length: 336
3 < Content-Type: application/json
3 < Date: Tue, 12 Sep 2017 04:13:13 GMT
3 < Location: http://localhost:9999/api/transactions/3
{"id":3,"name":"6bcb20cf","amount":10.0,"remark":null,"auto":false,"transactionOn":1505189593456,"createdAt":null,"budget":{"id":277,"name":"6bcb20cf","projected":0.0,"actual":0.0,"period":null,"createdAt":null,"category":{"id":47,"name":"67127ad0","type":"EXPENDITURE","createdAt":null,"user":null},"budgetType":null},"recurring":null}
DEBUG [2017-09-12 04:13:13,472] io.budgetapp.resource.ResourceIT: 4 * Sending client request on thread Test worker
4 > POST http://localhost:9999/api/transactions
4 > Accept: application/json
4 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
4 > Content-Type: application/json
{"amount":10.0,"remark":null,"transactionOn":1505189593472,"recurring":null,"recurringType":null,"budget":{"id":277,"name":"6bcb20cf","projected":0.0,"actual":0.0,"period":null,"createdAt":null,"category":{"id":47,"name":"67127ad0","type":"EXPENDITURE","createdAt":null,"user":null},"budgetType":null}}
WARN [2017-09-12 04:13:13,473] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,474] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,475] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
43725 nanoseconds spent acquiring 2 JDBC connections;
24684 nanoseconds spent releasing 2 JDBC connections;
283857 nanoseconds spent preparing 1 JDBC statements;
81455 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
112838 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5995 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,475] org.hibernate.SQL:
select
budget0_.id as id1_2_0_,
budget0_.actual as actual2_2_0_,
budget0_.type_id as type_id7_2_0_,
budget0_.category_id as category8_2_0_,
budget0_.created_at as created_3_2_0_,
budget0_.name as name4_2_0_,
budget0_.period_on as period_o5_2_0_,
budget0_.projected as projecte6_2_0_,
budget0_.user_id as user_id9_2_0_
from
budgets budget0_
where
budget0_.id=?

DEBUG [2017-09-12 04:13:13,477] org.hibernate.SQL:
/* update
io.budgetapp.model.Budget */ update
budgets
set
actual=?,
name=?,
projected=?
where
id=?
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/transactions HTTP/1.1" 201 336 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 13
INFO [2017-09-12 04:13:13,478] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
29620 nanoseconds spent acquiring 2 JDBC connections;
28210 nanoseconds spent releasing 2 JDBC connections;
510590 nanoseconds spent preparing 3 JDBC statements;
218976 nanoseconds spent executing 3 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
569124 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,479] io.budgetapp.resource.ResourceIT: 4 * Client response received on thread Test worker
4 < 201
4 < Content-Length: 336
4 < Content-Type: application/json
4 < Date: Tue, 12 Sep 2017 04:13:13 GMT
4 < Location: http://localhost:9999/api/transactions/4
{"id":4,"name":"6bcb20cf","amount":10.0,"remark":null,"auto":false,"transactionOn":1505189593472,"createdAt":null,"budget":{"id":277,"name":"6bcb20cf","projected":0.0,"actual":0.0,"period":null,"createdAt":null,"category":{"id":47,"name":"67127ad0","type":"EXPENDITURE","createdAt":null,"user":null},"budgetType":null},"recurring":null}
DEBUG [2017-09-12 04:13:13,479] io.budgetapp.resource.ResourceIT: 5 * Sending client request on thread Test worker
5 > GET http://localhost:9999/api/transactions/4
5 > Accept: application/json
5 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
DEBUG [2017-09-12 04:13:13,481] org.hibernate.SQL:
select
transactio0_.id as id1_5_0_,
transactio0_.amount as amount2_5_0_,
transactio0_.auto as auto3_5_0_,
transactio0_.budget_id as budget_i8_5_0_,
transactio0_.created_at as created_4_5_0_,
transactio0_.name as name5_5_0_,
transactio0_.recurring_id as recurrin9_5_0_,
transactio0_.remark as remark6_5_0_,
transactio0_.transaction_on as transact7_5_0_
from
transactions transactio0_
where
transactio0_.id=?
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/transactions HTTP/1.1" 201 336 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 6
INFO [2017-09-12 04:13:13,484] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
48662 nanoseconds spent acquiring 2 JDBC connections;
28209 nanoseconds spent releasing 2 JDBC connections;
497543 nanoseconds spent preparing 1 JDBC statements;
53598 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
74755 nanoseconds spent executing 1 flushes (flushing a total of 1 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,484] io.budgetapp.resource.ResourceIT: 5 * Client response received on thread Test worker
5 < 200
5 < Content-Length: 154
5 < Content-Type: application/json
5 < Date: Tue, 12 Sep 2017 04:13:13 GMT
5 < Vary: Accept-Encoding
{"id":4,"name":"6bcb20cf","amount":10.0,"remark":null,"auto":false,"transactionOn":1505106000000,"createdAt":1505189593477,"budget":null,"recurring":null}
DEBUG [2017-09-12 04:13:13,485] io.budgetapp.resource.ResourceIT: 6 * Sending client request on thread Test worker
6 > POST http://localhost:9999/api/categories
6 > Accept: application/json
6 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
6 > Content-Type: application/json
{"id":null,"name":"c16cf1da","type":"EXPENDITURE","createdAt":null,"user":null}
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "GET /api/transactions/4 HTTP/1.1" 200 154 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 6
WARN [2017-09-12 04:13:13,486] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,487] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,488] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
46898 nanoseconds spent acquiring 2 JDBC connections;
25741 nanoseconds spent releasing 2 JDBC connections;
293025 nanoseconds spent preparing 1 JDBC statements;
79692 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
138226 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
11989 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,489] io.budgetapp.dao.CategoryDAO: Add new category Category{id=null, name='c16cf1da', type=EXPENDITURE, createdAt=null, user=null}
DEBUG [2017-09-12 04:13:13,489] org.hibernate.SQL:
/* insert io.budgetapp.model.Category
*/ insert
into
categories
(id, name, type, user_id)
values
(default, ?, ?, ?)
INFO [2017-09-12 04:13:13,491] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
29973 nanoseconds spent acquiring 2 JDBC connections;
24682 nanoseconds spent releasing 2 JDBC connections;
108254 nanoseconds spent preparing 1 JDBC statements;
68760 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
73344 nanoseconds spent executing 1 flushes (flushing a total of 1 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,491] io.budgetapp.resource.ResourceIT: 6 * Client response received on thread Test worker
6 < 201
6 < Content-Length: 259
6 < Content-Type: application/json
6 < Date: Tue, 12 Sep 2017 04:13:13 GMT
6 < Location: http://localhost:9999/api/categories/48
{"id":48,"name":"c16cf1da","type":"EXPENDITURE","createdAt":null,"user":{"id":4,"username":"50cd9f20@cfb9b1af.com","name":null,"createdAt":1505189593318,"currency":null,"token":null,"avatar":"https://www.gravatar.com/avatar/c976de541e3bb4ba9cca1266b0dcd624"}}
DEBUG [2017-09-12 04:13:13,493] io.budgetapp.resource.ResourceIT: 7 * Sending client request on thread Test worker
7 > POST http://localhost:9999/api/budgets
7 > Accept: application/json
7 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
7 > Content-Type: application/json
{"name":"10ab4c26","projected":0.0,"categoryId":48}
WARN [2017-09-12 04:13:13,494] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,494] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,495] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
44077 nanoseconds spent acquiring 2 JDBC connections;
28916 nanoseconds spent releasing 2 JDBC connections;
273278 nanoseconds spent preparing 1 JDBC statements;
84276 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
106491 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5289 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,496] org.hibernate.SQL:
/* insert io.budgetapp.model.BudgetType
*/ insert
into
budget_types
(id)
values
(default)
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/categories HTTP/1.1" 201 259 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 6
DEBUG [2017-09-12 04:13:13,497] io.budgetapp.dao.BudgetDAO: User User{id=4<EMAIL_ADDRESS>add budget Budget{id=null, actual=0.0, name='10ab4c26', createdAt=null, user=null, category=Category{id=48, name='null', type=null, createdAt=null, user=null}}
DEBUG [2017-09-12 04:13:13,497] org.hibernate.SQL:
/* insert io.budgetapp.model.Budget
*/ insert
into
budgets
(id, actual, type_id, category_id, name, period_on, projected, user_id)
values
(default, ?, ?, ?, ?, ?, ?, ?)
INFO [2017-09-12 04:13:13,498] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
35968 nanoseconds spent acquiring 2 JDBC connections;
50425 nanoseconds spent releasing 2 JDBC connections;
202050 nanoseconds spent preparing 2 JDBC statements;
111426 nanoseconds spent executing 2 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
72286 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,499] io.budgetapp.resource.ResourceIT: 7 * Client response received on thread Test worker
7 < 201
7 < Content-Length: 212
7 < Content-Type: application/json
7 < Date: Tue, 12 Sep 2017 04:13:13 GMT
7 < Location: http://localhost:9999/api/budgets/278
{"id":278,"name":"10ab4c26","projected":0.0,"actual":0.0,"period":1504242000000,"createdAt":null,"category":{"id":48,"name":null,"type":null,"createdAt":null,"user":null},"budgetType":{"id":278,"createdAt":null}}
DEBUG [2017-09-12 04:13:13,500] io.budgetapp.resource.ResourceIT: 8 * Sending client request on thread Test worker
8 > POST http://localhost:9999/api/transactions
8 > Accept: application/json
8 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
8 > Content-Type: application/json
{"amount":10.0,"remark":null,"transactionOn":1505189593500,"recurring":null,"recurringType":null,"budget":{"id":278,"name":null,"projected":0.0,"actual":0.0,"period":null,"createdAt":null,"category":null,"budgetType":null}}
WARN [2017-09-12 04:13:13,501] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,502] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,503] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
78987 nanoseconds spent acquiring 2 JDBC connections;
50423 nanoseconds spent releasing 2 JDBC connections;
293025 nanoseconds spent preparing 1 JDBC statements;
57124 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
69113 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5289 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,503] org.hibernate.SQL:
select
budget0_.id as id1_2_0_,
budget0_.actual as actual2_2_0_,
budget0_.type_id as type_id7_2_0_,
budget0_.category_id as category8_2_0_,
budget0_.created_at as created_3_2_0_,
budget0_.name as name4_2_0_,
budget0_.period_on as period_o5_2_0_,
budget0_.projected as projecte6_2_0_,
budget0_.user_id as user_id9_2_0_
from
budgets budget0_
where
budget0_.id=?

DEBUG [2017-09-12 04:13:13,505] org.hibernate.SQL:
/* update
io.budgetapp.model.Budget */ update
budgets
set
actual=?,
name=?,
projected=?
where
id=?
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/budgets HTTP/1.1" 201 212 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 5
INFO [2017-09-12 04:13:13,506] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
33852 nanoseconds spent acquiring 2 JDBC connections;
27151 nanoseconds spent releasing 2 JDBC connections;
478501 nanoseconds spent preparing 3 JDBC statements;
229906 nanoseconds spent executing 3 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
911515 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,507] io.budgetapp.resource.ResourceIT: 8 * Client response received on thread Test worker
8 < 201
8 < Content-Length: 257
8 < Content-Type: application/json
8 < Date: Tue, 12 Sep 2017 04:13:13 GMT
8 < Location: http://localhost:9999/api/transactions/5
{"id":5,"name":"10ab4c26","amount":10.0,"remark":null,"auto":false,"transactionOn":1505189593500,"createdAt":null,"budget":{"id":278,"name":null,"projected":0.0,"actual":0.0,"period":null,"createdAt":null,"category":null,"budgetType":null},"recurring":null}
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/transactions HTTP/1.1" 201 257 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 7
DEBUG [2017-09-12 04:13:13,508] io.budgetapp.resource.ResourceIT: 9 * Sending client request on thread Test worker
9 > GET http://localhost:9999/api/budgets/278/transactions
9 > Accept: application/json
9 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
WARN [2017-09-12 04:13:13,509] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,509] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,510] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
49366 nanoseconds spent acquiring 2 JDBC connections;
29620 nanoseconds spent releasing 2 JDBC connections;
284209 nanoseconds spent preparing 1 JDBC statements;
54303 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
79692 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5642 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
WARN [2017-09-12 04:13:13,511] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,513] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_5_1_,
this_.amount as amount2_5_1_,
this_.auto as auto3_5_1_,
this_.budget_id as budget_i8_5_1_,
this_.created_at as created_4_5_1_,
this_.name as name5_5_1_,
this_.recurring_id as recurrin9_5_1_,
this_.remark as remark6_5_1_,
this_.transaction_on as transact7_5_1_,
budget1_.id as id1_2_0_,
budget1_.actual as actual2_2_0_,
budget1_.type_id as type_id7_2_0_,
budget1_.category_id as category8_2_0_,
budget1_.created_at as created_3_2_0_,
budget1_.name as name4_2_0_,
budget1_.period_on as period_o5_2_0_,
budget1_.projected as projecte6_2_0_,
budget1_.user_id as user_id9_2_0_
from
transactions this_
inner join
budgets budget1_
on this_.budget_id=budget1_.id
where
budget1_.id=?
and budget1_.user_id=?
order by
this_.transaction_on desc,
this_.id desc
INFO [2017-09-12 04:13:13,516] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
39141 nanoseconds spent acquiring 2 JDBC connections;
29621 nanoseconds spent releasing 2 JDBC connections;
568067 nanoseconds spent preparing 1 JDBC statements;
100143 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
310656 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
6347 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,517] io.budgetapp.resource.ResourceIT: 9 * Client response received on thread Test worker
9 < 200
9 < Content-Length: 293
9 < Content-Type: application/json
9 < Date: Tue, 12 Sep 2017 04:13:13 GMT
9 < Vary: Accept-Encoding
[{"id":5,"name":"10ab4c26","amount":10.0,"remark":null,"auto":false,"transactionOn":1505106000000,"createdAt":1505189593504,"budget":{"id":278,"name":"10ab4c26","projected":0.0,"actual":10.0,"period":1504242000000,"createdAt":1505189593497,"category":null,"budgetType":null},"recurring":null}]
DEBUG [2017-09-12 04:13:13,519] io.budgetapp.resource.ResourceIT: 10 * Sending client request on thread Test worker
10 > POST http://localhost:9999/api/transactions
10 > Accept: application/json
10 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
10 > Content-Type: application/json
{"amount":10.0,"remark":null,"transactionOn":1505189593518,"recurring":null,"recurringType":null,"budget":{"id":277,"name":"6bcb20cf","projected":0.0,"actual":0.0,"period":null,"createdAt":null,"category":{"id":47,"name":"67127ad0","type":"EXPENDITURE","createdAt":null,"user":null},"budgetType":null}}
WARN [2017-09-12 04:13:13,520] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,520] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "GET /api/budgets/278/transactions HTTP/1.1" 200 293 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 9
INFO [2017-09-12 04:13:13,521] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
41961 nanoseconds spent acquiring 2 JDBC connections;
26798 nanoseconds spent releasing 2 JDBC connections;
307482 nanoseconds spent preparing 1 JDBC statements;
54655 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
117069 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5642 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,522] org.hibernate.SQL:
select
budget0_.id as id1_2_0_,
budget0_.actual as actual2_2_0_,
budget0_.type_id as type_id7_2_0_,
budget0_.category_id as category8_2_0_,
budget0_.created_at as created_3_2_0_,
budget0_.name as name4_2_0_,
budget0_.period_on as period_o5_2_0_,
budget0_.projected as projecte6_2_0_,
budget0_.user_id as user_id9_2_0_
from
budgets budget0_
where
budget0_.id=?

DEBUG [2017-09-12 04:13:13,524] org.hibernate.SQL:
/* update
io.budgetapp.model.Budget */ update
budgets
set
actual=?,
name=?,
projected=?
where
id=?
INFO [2017-09-12 04:13:13,525] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
34910 nanoseconds spent acquiring 2 JDBC connections;
34203 nanoseconds spent releasing 2 JDBC connections;
483439 nanoseconds spent preparing 3 JDBC statements;
209808 nanoseconds spent executing 3 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
549731 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,526] io.budgetapp.resource.ResourceIT: 10 * Client response received on thread Test worker
10 < 201
10 < Content-Length: 336
10 < Content-Type: application/json
10 < Date: Tue, 12 Sep 2017 04:13:13 GMT
10 < Location: http://localhost:9999/api/transactions/6
{"id":6,"name":"6bcb20cf","amount":10.0,"remark":null,"auto":false,"transactionOn":1505189593518,"createdAt":null,"budget":{"id":277,"name":"6bcb20cf","projected":0.0,"actual":0.0,"period":null,"createdAt":null,"category":{"id":47,"name":"67127ad0","type":"EXPENDITURE","createdAt":null,"user":null},"budgetType":null},"recurring":null}
DEBUG [2017-09-12 04:13:13,527] io.budgetapp.resource.ResourceIT: 11 * Sending client request on thread Test worker
11 > DELETE http://localhost:9999/api/transactions/6
11 > Accept: application/json
11 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
WARN [2017-09-12 04:13:13,528] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "POST /api/transactions HTTP/1.1" 201 336 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 6
DEBUG [2017-09-12 04:13:13,528] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,529] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
48661 nanoseconds spent acquiring 2 JDBC connections;
26799 nanoseconds spent releasing 2 JDBC connections;
318413 nanoseconds spent preparing 1 JDBC statements;
53598 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
67702 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
6700 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,531] org.hibernate.SQL:
/*
FROM
Transaction t
WHERE
t.id = :id
AND t.budget.user = :user */ select
transactio0_.id as id1_5_,
transactio0_.amount as amount2_5_,
transactio0_.auto as auto3_5_,
transactio0_.budget_id as budget_i8_5_,
transactio0_.created_at as created_4_5_,
transactio0_.name as name5_5_,
transactio0_.recurring_id as recurrin9_5_,
transactio0_.remark as remark6_5_,
transactio0_.transaction_on as transact7_5_
from
transactions transactio0_ cross
join
budgets budget1_
where
transactio0_.budget_id=budget1_.id
and transactio0_.id=?
and budget1_.user_id=?
DEBUG [2017-09-12 04:13:13,532] org.hibernate.SQL:
select
budget0_.id as id1_2_0_,
budget0_.actual as actual2_2_0_,
budget0_.type_id as type_id7_2_0_,
budget0_.category_id as category8_2_0_,
budget0_.created_at as created_3_2_0_,
budget0_.name as name4_2_0_,
budget0_.period_on as period_o5_2_0_,
budget0_.projected as projecte6_2_0_,
budget0_.user_id as user_id9_2_0_
from
budgets budget0_
where
budget0_.id=?
DEBUG [2017-09-12 04:13:13,533] org.hibernate.SQL:
/* update
io.budgetapp.model.Budget */ update
budgets
set
actual=?,
name=?,
projected=?
where
id=?
DEBUG [2017-09-12 04:13:13,534] org.hibernate.SQL:
/* delete io.budgetapp.model.Transaction */ delete
from
transactions
where
id=?
INFO [2017-09-12 04:13:13,536] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
33852 nanoseconds spent acquiring 2 JDBC connections;
27151 nanoseconds spent releasing 2 JDBC connections;
831825 nanoseconds spent preparing 4 JDBC statements;
282800 nanoseconds spent executing 4 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
2960222 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5642 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,537] io.budgetapp.resource.ResourceIT: 11 * Client response received on thread Test worker
11 < 204
11 < Date: Tue, 12 Sep 2017 04:13:13 GMT
DEBUG [2017-09-12 04:13:13,538] io.budgetapp.resource.ResourceIT: 12 * Sending client request on thread Test worker
12 > DELETE http://localhost:9999/api/transactions/9223372036854775807
12 > Accept: application/json
12 > Authorization: Bearer 2adc64f3-c4b0-4ab1-9a72-0746c748e1e4
WARN [2017-09-12 04:13:13,539] org.hibernate.orm.deprecation: HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
DEBUG [2017-09-12 04:13:13,540] org.hibernate.SQL:
/* criteria query */ select
this_.id as id1_0_1_,
this_.created_at as created_2_0_1_,
this_.token as token3_0_1_,
this_.user_id as user_id4_0_1_,
user2_.id as id1_6_0_,
user2_.created_at as created_2_6_0_,
user2_.currency as currency3_6_0_,
user2_.name as name4_6_0_,
user2_.password as password5_6_0_,
user2_.username as username6_6_0_
from
auth_tokens this_
inner join
users user2_
on this_.user_id=user2_.id
where
this_.token=?
INFO [2017-09-12 04:13:13,541] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
51130 nanoseconds spent acquiring 2 JDBC connections;
33498 nanoseconds spent releasing 2 JDBC connections;
276804 nanoseconds spent preparing 1 JDBC statements;
58887 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
83570 nanoseconds spent executing 1 flushes (flushing a total of 2 entities and 0 collections);
5994 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,541] org.hibernate.SQL:
/*
FROM
Transaction t
WHERE
t.id = :id
AND t.budget.user = :user */ select
transactio0_.id as id1_5_,
transactio0_.amount as amount2_5_,
transactio0_.auto as auto3_5_,
transactio0_.budget_id as budget_i8_5_,
transactio0_.created_at as created_4_5_,
transactio0_.name as name5_5_,
transactio0_.recurring_id as recurrin9_5_,
transactio0_.remark as remark6_5_,
transactio0_.transaction_on as transact7_5_
from
transactions transactio0_ cross
join
budgets budget1_
where
transactio0_.budget_id=budget1_.id
and transactio0_.id=?
and budget1_.user_id=?
INFO [2017-09-12 04:13:13,543] org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: Session Metrics {
31736 nanoseconds spent acquiring 2 JDBC connections;
26800 nanoseconds spent releasing 2 JDBC connections;
476739 nanoseconds spent preparing 1 JDBC statements;
49367 nanoseconds spent executing 1 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
0 nanoseconds spent executing 0 flushes (flushing a total of 0 entities and 0 collections);
4937 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections)
}
DEBUG [2017-09-12 04:13:13,544] io.budgetapp.resource.ResourceIT: 12 * Client response received on thread Test worker
12 < 404
12 < Content-Length: 0
12 < Date: Tue, 12 Sep 2017 04:13:13 GMT
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "DELETE /api/transactions/6 HTTP/1.1" 204 0 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 10
<IP_ADDRESS> - - [12/Sep/2017:04:13:13 +0000] "DELETE /api/transactions/9223372036854775807 HTTP/1.1" 404 0 "-" "Jersey/2.25.1 (HttpUrlConnection 1.8.0_144)" 4
INFO [2017-09-12 04:13:13,546] org.eclipse.jetty.server.AbstractConnector: Stopped application@f0694bb{HTTP/1.1,[http/1.1]}{<IP_ADDRESS>:9999}
INFO [2017-09-12 04:13:13,547] org.eclipse.jetty.server.AbstractConnector: Stopped admin@6ffad2fe{HTTP/1.1,[http/1.1]}{<IP_ADDRESS>:8081}
INFO [2017-09-12 04:13:13,547] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@30d25bdf{/,null,UNAVAILABLE}
INFO [2017-09-12 04:13:13,548] org.eclipse.jetty.ContextHandler.58a5d944: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called
INFO [2017-09-12 04:13:13,548] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@58a5d944{/,null,UNAVAILABLE}


--- layout: post status: publish published: true title: Computer Graphics author: display_name: ian login: ian email<EMAIL_ADDRESS>url: http://iancwill.com/blog author_login: ian author_email<EMAIL_ADDRESS>author_url: http://iancwill.com/blog wordpress_id: 38 wordpress_url: http://iancwill.com/blog/?p=38 date: '2011-02-10 20:37:02 -0700' date_gmt: '2011-02-11 01:37:02 -0700' ---
In my computer graphics class we're basically recreating a graphics pipeline over the course of the semester in a series of labs. Here are some results from the first lab. It culls the back facing polygons, but doesn't scan convert anything so they're technically transparent.


Given a string, return its encoding defined as follows:
First, the string is divided into the least possible number of disjoint substrings consisting of identical characters
for example, "aabbbc"
is divided into ["aa", "bbb", "c"]
Next, each substring with length greater than one is replaced with a concatenation of its length and the repeating character
for example, substring "bbb"
is replaced by "3b"
Finally, all the new strings are concatenated together in the same order and a new string is returned.
A substring of a string S
is another string S'
that occurs in S
. For example, "Fights"
is a substring of "CodeFights"
, but "CoFi"
isn’t.
Example
For s = "aabbbc"
, the output should be lineEncoding(s) = "2a3bc"
.
Input/Output
Constraints: 4 ≤ s.length ≤ 15.
Solution:
import re
def lineEncoding(s):
grub = [ m.group(0) for m in re.finditer(r"(\w)\1*", s )]
numb = 0
out = []
for i in grub:
numb += 1
if len(i) > 1:
out.append(grub[numb-1].replace(grub[numb-1], str(len(i))+i[0]))
else:
out.append(i)
return ''.join(out)
Result Tests:
>>>
s = "aabbbc"
>>> lineEncoding(s)
"2a3bc"
>>>
>>> s = "abbcabb"
>>> lineEncoding(s)
"a2bca2b"
>>>
>>> s = "abcd"
>>> lineEncoding(s)
"abcd"
>>>


{% extends "base.html" %} {% block title %}Static Website Compilation - Nolan Nicholson{% endblock %} {% block page_content %}
Last time, I discussed some of the challenges of rendering code in a modern-looking webpage, using helpful features like syntax highlighting. The most immediately available solution, a JavaScript library from Google, yielded good-looking code, but it required a server call to Google and some JavaScript execution for a result that we know will be the same every time - and that would therefore be more efficient just to bake into the page HTML, if we can. As implemented, it also required us to put our code snippets in the HTML page itself, making it difficult to develop and test the code.
This, it turns out, is symptomatic of a broader issue: there is a lot of "work" that is generally useful to be able to do automatically on HTML. Formatting code is just one example: it's also really useful to have things like page templating, so that much-reused components like headers and navigation bars don't have to be repeatedly copied and pasted.
This task of programmatically modifying HTML is usually what JavaScript is for. But using JavaScript for these tasks means performing them every single time a user loads your page. If your page is viewed n times, then pre-formatting the HTML beforehand is an O(1) algorithm, where formatting the page using JavaScript is O(n). The n executions just happen on other people's computers.
So, I've just finished reorganizing my website to use Jinja for automatic template compiling, and to perform some other automatic formatting (namely, syntax highlighting) through Python in the process. Jinja is a templating engine that dynamically generates HTML. It is most commonly used from within the web framework Flask, to generate HTML for dynamic websites. But that doesn't mean it can't be used for static websites too! In this case, I just use the Flask app to get a context, in which I can save the results of Flask's render_template() function to a file:
{{ code_snippet('compile.py', 27) | safe }}Using Python to bake the HTML beforehand also has the side benefit of letting you load text from external files into your HTML - a task which is harder than one might think to do at runtime, basically requiring either PHP or AJAX. Here, we can simply load it using Python and bake it right into the rendered HTML:
{{ code_snippet('compile.py', 9, 22) | safe }}With that defined, including external code in the template is as simple as:
{{ code_snippet('snippet_template.html') | safe }}
Below is the full script that performs the templating.
All of the page templates
are stored in the library templates
. They all
extend a single template, base.html
. Syntax highlighting is
then performed using the Python library
Pygments.
Writing and hands-on development are done on the templates; then,
a call to python3 compile.py
puts together the "real" HTML
files. I run this script manually, but I envision it could easily be
worked into a CI workflow and done automatically.
Fun fact: as of right now, the templates are still accessible on this
site. This page, for example, is made from two templates:
base.html
(for the
formatting and objects common to all the pages on this site) and
pagerendering.html
(for the content specific to this page.)
But they are unrendered templates - so don't expect anything pretty!
Overall, the result is quite maintainable, while still allowing a huge degree of freedom (you can still just specify a page's HTML completely from scratch with no templating and just pass it through, if you want to), and it performs all of the "busy work" just once - instead of delegating it to JavaScript on the reader's side, on every single page load. This idea isn't necessarily specific to purely static websites either; it could be used to lessen the redundant work done by a web server, or simply to help reduce load times by trimming some JavaScript fat.
I hope this is helpful! I made it in part because I didn't see a solution out there for avoiding some of the busy work of static website composition while still staying close to simple, clean HTML. (That second part disqualified full-fledged CMS's like WordPress and Medium.) But if there is such a solution I missed, please drop me a line - I'd love to know about it, and I'd still be happy to have gotten the experience putting this together.
Edit: After I posted this, a reader named Vitaly Potyarkin reached out to tell me about Pelican, a more full-featured static site generator written in Python. Pelican does everything my solution above does and more: it can take in input in reStructuredText or Markdown in addition to HTML, it can perform syntax highlighting through Pygments, it handles metadata and localization (topics I didn't even touch on here), and its architecture is open enough that you can easily extend its functionality to handle anything it doesn't natively cover. I'd likely recommend it over what I showed above - unless you are extremely interested in rolling a minimal solution yourself.
{% endblock %}


Do you want to auth with these jerks?
Authorize
Auto auth next time:
To use webkey, set up your email and a password.
Email:
This email will act as your username.
Password:
Its strongly recommended that you do NOT use the same password as your email account. Webkey will never send your password over the internet.
Accept


Amazon long-time executive Steve Kessel to step down
(Reuters) - E-commerce giant Amazon.com Inc’s (AMZN.O) long-serving executive Steve Kessel will leave the company after 20 years, a company spokesperson told Reuters on Friday.
Kessel, a senior vice president who has worked on Amazon’s “Kindle” and brick-and-mortar store “Amazon Go”, said he would be focusing on community service and not-for-profit work.
Beginning January, Dave Clark who is responsible for the company’s global supply chain and logistics operation will assume Kessel’s roles.


:a hood or long hooded cloak especially of a monk
:a draped neckline on a woman's garment
:a chimney covering designed to improve the draft
:the top portion of the front part of an automobile body forward of the two front doors to which are attached the windshield and instrument board
:cowling


To illustrate the use of McErlang we consider the messenger example from the ``Getting started with Erlang'' document in the Erlang/OTP R12B documentation2. To begin working with the example, locate the source code for the messenger example (messenger.erl) in the McErlang/examples/Simple_messenger directory.
The messenger is a program which allows users to log in on different nodes and send simple messages to each other. The messenger allows "clients" to connect to a central server, specifying their identities and locations that are then stored in the state of the server. Thus a user won't need to know the name of the Erlang node where a user is located to send a message to that user, only his identity.
Let us consider the example with three nodes depicted in Fig. , the node server_node where the messenger server is already running and two other nodes, Node1 and Node2. If a process in Node1 calls the messenger:logon(clara) command the result of this call is the spawning of a process registered as mess_client that will send a message to the messenger server containing the name of the user and the pid of the mess_client. The messenger will then look into its state and if it is empty it will add the new user to the UsersList and send a confirmation message to the mess_cient.
Lets now assume that both a user clara and a user fred in fig. are logged on and clara wants to send a message to fred. Again the message will be sent from the mess_client running in Node1 to the messenger server which, after checking that both clara and fred are logged on, will forward the message to the mess_client running in Node1.
Upon a logoff, the mess_client will send a message to the messenger server that will produce the deletion of the user that wanted to log off from the UsersList maintained by the messenger server.
Orosz György 2010-06-02


Instructor Demo: Docker Compose
In this demo, we'll illustrate:
- Starting an app defined in a docker compose file
- Inter-service communication using DNS resolution of service names
Exploring the Compose File
Please download the DockerCoins app from Github and change directory to ~/orchestration-workshop/dockercoins.
[centos@node-0 ~]$ git clone -b ee2.1 \ https://github.com/docker-training/orchestration-workshop.git [centos@node-0 ~]$ cd ~/orchestration-workshop/dockercoins
Let's take a quick look at our Compose file for Dockercoins:
version: "3.1" services: rng: image: training/dockercoins-rng:1.0 networks: - dockercoins ports: - "8001:80" hasher: image: training/dockercoins-hasher:1.0 networks: - dockercoins ports: - "8002:80" webui: image: training/dockercoins-webui:1.0 networks: - dockercoins ports: - "8000:80" redis: image: redis networks: - dockercoins worker: image: training/dockercoins-worker:1.0 networks: - dockercoins networks: dockercoins:
This Compose file contains 5 services, along with a bridge network.
When we start the app, we will see the service images getting downloaded one at a time:
[centos@node-0 dockercoins]$ docker-compose up -d
After starting, the images required for this app have been downloaded:
[centos@node-0 dockercoins]$ docker image ls | grep "dockercoins"
Make sure the services are up and running, as is the dedicated network:
[centos@node-0 dockercoins]$ docker-compose ps [centos@node-0 dockercoins]$ docker network ls
If everyting is up, visit your app at
<node-0 public IP>:8000
to see Dockercoins in action.
Communicating Between Containers
In this section, we'll demonstrate that containers created as part of a service in a Compose file are able to communicate with containers belonging to other services using just their service names. Let's start by listing our DockerCoins containers:
[centos@node-0 dockercoins]$ docker container ls | grep 'dockercoins'
Now, connect into one container; let's pick
webui
:[centos@node-0 dockercoins]$ docker container exec -it <Container ID> bash
From within the container, ping
rng
by name:[root@<Container ID>]# ping rng
Logs should be outputted resembling this:
PING rng (<IP_ADDRESS>) 56(84) bytes of data. 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=1 ttl=64 time=0.108 ms 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=2 ttl=64 time=0.049 ms 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=3 ttl=64 time=0.073 ms 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=4 ttl=64 time=0.067 ms 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=5 ttl=64 time=0.057 ms 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=6 ttl=64 time=0.074 ms 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=7 ttl=64 time=0.052 ms 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=8 ttl=64 time=0.057 ms 64 bytes from dockercoins_rng_1.dockercoins_dockercoins (<IP_ADDRESS>): icmp_seq=9 ttl=64 time=0.080 ms
Use
CTRL+C
to terminate the ping. DNS lookup for the services in DockerCoins works because they are all attached to the user-defineddockercoins
network.After exiting this container, let's navigate to the
worker
folder and take a look at a section ofworker.py
:[centos@node-0 dockercoins]$ cd worker [centos@node-0 worker]$ cat worker.py import logging import os from redis import Redis import requests import time DEBUG = os.environ.get("DEBUG", "").lower().startswith("y") log = logging.getLogger(__name__) if DEBUG: logging.basicConfig(level=logging.DEBUG) else: logging.basicConfig(level=logging.INFO) logging.getLogger("requests").setLevel(logging.WARNING) redis = Redis("redis") def get_random_bytes(): r = requests.get("http://rng/32") return r.content def hash_bytes(data): r = requests.post("http://hasher/", data=data, headers={"Content-Type": "application/octet-stream"}) hex_hash = r.text return hex_hash
As we can see in the last two stanzas, we can direct traffic to a service via a DNS name that exactly matches the service name defined in the docker compose file.
Shut down Dockercoins and clean up its resources:
[centos@node-0 dockercoins]$ docker-compose down
Conclusion
In this exercise, we stood up an application using Docker Compose. The most important new idea here is the notion of Docker Services, which are collections of identically configured containers. Docker Service names are resolvable by DNS, so that we can write application logic designed to communicate service to service; all service discovery and load balancing between your application's services is abstracted away and handled by Docker.


jquery.momentus
monitors mouse-wheel, mouse-drag and swipe(on touch screen) gestures, along with momentum effects.
coordinates:
x:
0
y:
0
velocity:
x:
0
y:
0


|
||||||||||
| PREV LETTER NEXT LETTER | FRAMES NO FRAMES |
SQLConnection
s and any other created resources.
Renamer
based on a fixed map of
original and replacement columns.ValueMaker
that takes its values from a single
column.MappingComponent
s.
|
||||||||||
| PREV LETTER NEXT LETTER | FRAMES NO FRAMES |


QuizSpot
Sign Up
Log In
QuizSpot
Online quiz by & for
Students
Learn More
Rushikesh Pande
Follow Me
Shoeb Sheikh
Follow Me
Vipul Tichkule
Follow Me
Yash Dharmik
Follow Me


Search with unique
Info: Type 'i' or 'u' letter for countries
Setting value without dataurl
Scenario: If there is no valueproperty set, value contains array of object. So value will be stored as array
of objects
Setting value with dataurl
Info: To set actual api to dataurl property use like - dataurl='api/countries?filter={"where": {"code":
{"inq": VALUE_STRING}}}'
Example VALUE_STRING would look like ["IN", "IR", "ID"]
Required
Store value as array of objects
Info: There might be a scenario where the value should be stored as array of objects. So, to acheive this
don't provide
valueproperty
({{item.code}} - {{item.description}})


Interested in NASA?
Add NASA as an interest to stay up to date on the latest NASA news, video, and analysis from ABC News. NASA Add Interest
"Black holes of such mass should not even exist in our Galaxy, according to most of the current models of stellar evolution," Professor Jifeng Liu, who led the team at the Chinese Academy of Sciences that made the discovery, said in a statement.
Scientists previously believed that the mass of an individual stellar black hole could not be more than 20 times that of the Sun. These stellar black holes are different than so-called supermassive black holes, which are found at the center of galaxies and can be billions of times the mass of our Sun.
The newly discovered black hole, named LB-1, is located 15,000 light-years from Earth, according to a press release from the Chinese Academy of Sciences.
Searching for black holes has only become possible in the last few years, thanks to recent developments in telescopes and detectors.
But even with the new technology, the academy said it is still "like looking for the proverbial needle in a haystack."
The telescope that spotted LB-1 -- Spain's 10.4-m Gran Telescopio Canarias and the 10-m Keck I telescope in the United States -- also found a star eight times heavier than the Sun that orbited the newly discovered 70-solar-mass black hole, every 79 days.
Scientists said the discovery would force them to "re-examine our models of how stellar-mass black holes form."
"This remarkable result ... really points towards a renaissance in our understanding of black hole astrophysics," David Reitze, the director of the Laser Interferometer Gravitational-Wave Observatory in Washington, said in a statement.


--- layout: post title: First Google phone actually Samsung phone date: 2006-12-31 00:00:00 categories: business digital-media interfaces-&-interaction mobile ---
First Google phone actually Samsung phone: "The Samsung deal, however, is among the first of Google’s efforts to get its software built into the phone at the manufacturing stage. In this it joins competitors such as Yahoo, which embeds its client into selected Nokia devices, and MSN, which has similar deals in place."
So, if this is true then Google aren't doing their own phone, they're just doing what every operator does today: customising a handset with their own applications. This isn't rocket science, doesn't involve anything at a network level, and is similar to the T-Mobile deal: getting prominence for Google's search engine as the first port of call for mobile browsers.
Interesting assumption here: that the browser will be the place mobile users go to have their information needs met. I don't see why this should be the case...


public class GameBoardDynamic extends GameBoard
This class is a dynamic implementation of GameBoard
.
Its size will increase when living cells appears close to the edge. This is done
by searching the edges for living cells and increasing the width and height variables
accordingly.
The initial width and height variables from GameBoard
represent the area that the user sees.
This area is only a small part of the allocated byte-arrays
(see variables: thisGeneration and nextGeneration) which represents the board that runs in the background.
The reason for having a larger board than what needs to be simulated, is to avoid having to continuously create
new arrays for every extending row or column
- now this only needs to be done when the size of the simulated area approaches the byte-array size.
The byte arrays store information about the state of a cell and how many living neighbours it has. The neighbour count for a cell is updated when a nearby cell is set alive. This count is read in the next simulation step and cleared when makeNextGenerationCurrent() is called.
There are some specific reasons for why we chose this solution instead of using a dynamic List implementation from the Java Collection library:
The Java Collection library offers allot of useful and convenient functionality, but for this specific
purpose we think our manual array implementation fits better. See the GameBoardDynamicList
class for a board implementation where Lists are used. We also wrote tests to support our claims, see the
GameBoardPerformanceTest class in the unitTests source folder.
DEFAULT_BOARD_HEIGHT, DEFAULT_BOARD_WIDTH, height, width
| Constructor and Description |
|---|
GameBoardDynamic(int width,
int height)
The constructor calculates the array sizes and initialises them.
|
| Modifier and Type | Method and Description |
|---|---|
void |
editThisGeneration(boolean state,
Point p)
Sets the state of a cell in the current generation.
|
int |
getAmountOfLivingNeighbours(Point p)
Gets the amount of living neighbours at a given point in the current generation.
|
protected GameBoard |
getNewInstance(int width,
int height)
This method returns a new instance of the current one.
|
void |
increaseBoardSizeIfNecessary()
Searches along the edges for living cells and increases the board size if necessary.
|
boolean |
isCellAliveInThisGeneration(Point p)
Gets the state of cell at a given point in the current generation.
|
void |
makeNextGenerationCurrent()
Makes the next generation become the current one.
|
void |
setStateInNextGeneration(boolean state,
Point p)
Sets the state of a cell in the next generation.
|
deepCopy, getBoundingBox, getHeight, getPopulation, getWidth, hashCode, trimmedCopy, trimmedCopy
public GameBoardDynamic(int width, int height)
width
- The initial width of the board.height
- The initial height of the board.public int getAmountOfLivingNeighbours(Point p)
GameBoard
getAmountOfLivingNeighbours
in class GameBoard
p
- The position from where to retrieve the neighbour count.public boolean isCellAliveInThisGeneration(Point p)
GameBoard
isCellAliveInThisGeneration
in class GameBoard
p
- The position to check.public void setStateInNextGeneration(boolean state, Point p)
setStateInNextGeneration
in class GameBoard
state
- The state indicating whether the cell should be living (true) or dead (false).p
- The position of the cell to be set.public void editThisGeneration(boolean state, Point p)
editThisGeneration
in class GameBoard
state
- The state indicating whether the cell should be living (true) or dead (false).p
- The position of the cell to be set.public void makeNextGenerationCurrent()
makeNextGenerationCurrent
in class GameBoard
public void increaseBoardSizeIfNecessary()
protected GameBoard getNewInstance(int width, int height)
GameBoard
getNewInstance
in class GameBoard
width
- The width of the new GameBoard.height
- The height of the new GameBoard.


hyper-personalized astrology
unlike the broad and vague horoscopes you see as memes, we use a full image of the sky when and where you were born to generate hyper-personalized horoscopes. get your chart by filling in the blanks below.
sun in sagittarius
the sun determines your ego, identity, and "role" in life. it's the core of who you are, and is the sign you're most likely to already know. your sun is in sagittarius, meaning you are fundamentally curious, restless, and independant. you have strong, thought-through ideas about meaning and what's right or wrong. interested in pushing the boundaries of the existent, you live to be free, to travelm and to learn.
it's in your seventh house, meaning you feel the need to distinguish yourself from others through close relationships and long-term partnerships.
work & health
the sixth house covers our productivity and stuff you normally don't notice. the planets have aligned to make sure you'll be checking off every task on your to-do list right now, and if your health has been suffering, it's about to get better.
how you come off
because of certain transits in your first house, you'll be feeling insecure and disappointed with yourself or how you come off. those voices are your enemies. not a person in this world hates you with the severity of those voices.
add your friends within the community to check your compatibilities!
(image of example)
(explanation of compatibilities)


Imren Grill
Karl-Marx-StraBe 75, 12043 Berlin, Germany
Cashier
| No. | Time | Order List | Quantity/Price | Total |
|---|
If the order is complete, please press enter to calculate the total
Financial Statement
12.12.2012
- Income:
- Transfer Bank:
- CASH:
List All Purchases
| No. | Time | Order List | Total |
|---|