- Открываем два окна psql: session_1 и session_2;
- В session_1:
BEGIN;
UPDATE bank_accounts SET amount = amount - 100 WHERE id = 1;
- В session_2:
BEGIN;
UPDATE bank_accounts SET amount = amount + 100 WHERE id = 2;
export const PRICE_PRECISION = 18; | |
export const Q96 = BigNumber(Math.pow(2, 96)); | |
export const Q128 = BigNumber(Math.pow(2, 128)); | |
export const Q256 = BigNumber(Math.pow(2, 256)); | |
export const ZERO = BigNumber(0); |
BEGIN;
UPDATE bank_accounts SET amount = amount - 100 WHERE id = 1;
BEGIN;
UPDATE bank_accounts SET amount = amount + 100 WHERE id = 2;
Итоговый вывод Postgres можно посмотреть в файле resulting_output.md. Команды, как я создавал и наполнял таблицы - в creating_and_filling_tables.md. Результат того, как бы сделал я, я поместил в таблицу up_to_me_trips, а того, что соответствует 6НФ - в таблицу up_to_6nf_trips. Общая идея такая:
users:
first_name
second_name
patronymic_name
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: postgres-deployment | |
labels: | |
app: demo-voting-app | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
curl -X 'POST' \ | |
'https://murmuring-forest-17162.herokuapp.com/receipts' \ | |
-H 'accept: application/json' \ | |
-H 'Authorization: 7b89ff5a9f267d457a2b239f282f3fbf6da9dabfdad7b8ae16598579f8dcd616' \ | |
-H 'Content-Type: application/json' \ | |
-d '{ | |
"receipt": { | |
"description": "Описание рецепта", | |
"portions_count": 4, | |
"cooking_duration": 30, |
const generateBoxShadowStyle = ( | |
xOffset, | |
yOffset, | |
shadowColorIos, | |
shadowOpacity, | |
shadowRadius, | |
elevation, | |
shadowColorAndroid, | |
) => { | |
if (Platform.OS === 'ios') { |
import * as React from "react" | |
import Svg, { G, Rect, Path, Defs } from "react-native-svg" | |
/* SVGR has dropped some elements not supported by react-native-svg: filter */ | |
function HardGreenCircle(props) { | |
return ( | |
<Svg | |
width={72} | |
height={72} | |
viewBox="0 0 72 72" |
ransacker :director do | |
subquery = <<-SQL.squish | |
( | |
SELECT users.lastname | |
FROM users | |
LEFT OUTER JOIN members ON members.project_id = projects.id | |
LEFT OUTER JOIN member_roles ON member_roles.member_id = members.id | |
LEFT OUTER JOIN roles ON roles.id = member_roles.role_id | |
WHERE roles.id = 8 AND projects.id = projects.id | |
LIMIT 1 |
# RubyProf CallGrind report | |
# ruby 15-ruby-prof-callgrind.rb | |
# brew install qcachegrind | |
# qcachegrind ruby_prof_reports/... | |
require 'ruby-prof' | |
require_relative '../task-2.rb' | |
RubyProf.measure_mode = RubyProf::WALL_TIME | |
result = RubyProf.profile do |
В качестве решения прислать в чат лог из терминала.