Skip to content

Instantly share code, notes, and snippets.

SELECT
"transaction".id, "transaction".amount,
"transaction".currency, current_status.status
FROM "transaction" JOIN (
SELECT
transaction_id, MAX(id) AS max_id
FROM transaction_history
GROUP BY transaction_id) max_ids JOIN (
SELECT
id, transaction_id, status
+--+----------+---------------+-------+---------+
|id| source_id| destination_id| amount| currency|
+--+----------+---------------+-------+---------+
|t1| b1 | b2 | 780 | USD |
|t2| b3 | b4 | 9900 | CAD |
+--+----------+---------------+-------+---------+
+-------+-----------------+---------------------+
| id | status | transaction_id |
+-------+-----------------+---------------------+
INSERT INTO transaction_history
(id, transaction_id, status)
VALUES (2, 't1', 'unverified');
SELECT * FROM transaction WHERE id='t1';
SELECT * FROM transaction_history WHERE transaction_id='t1';
INSERT INTO transaction VALUES(...);
INSERT INTO transaction_history
(id, transaction_id, status)
VALUES (1, 't1', 'opened');
package main
import (
"fmt"
"os"
"strconv"
"math"
"runtime"
)
<!-- product.php -->
<?php
class Product {
function __construct() {
}
}
?>
<!-- client.php -->
<?php
import time
def test0():
assert False
def test1():
time.sleep(1)
assert True
>>> def foo():
... def bar():
... pass
... return bar
...
>>> foo()
<function bar at 0x7f648fe7d758>
>>> foo()
<function bar at 0x7f648fe7d7d0>
>>> foo()
@kevinjqiu
kevinjqiu / newrelic-evolve.ini.diff
Created October 26, 2012 21:17
newrelic-evolve.ini.diff
:100644 100644 14b1174... ca189d5... M newrelic-evolve.ini
diff --git a/newrelic-evolve.ini b/newrelic-evolve.ini
index 14b1174..ca189d5 100644
--- a/newrelic-evolve.ini
+++ b/newrelic-evolve.ini
@@ -56,7 +56,7 @@ monitor_mode = true
# output to standard error output. This would normally result in
# output appearing in your web server log.
# XXX FIX ME