SELECT L <> R FROM table
;
L | R | L <> R |
L IS DISTINCT FROM R |
---|---|---|---|
NULL | NULL | NULL | f |
1 | NULL | NULL | t |
NULL | 1 | NULL | t |
1 | 1 | f | f |
1 | 2 | t | t |
SELECT L <> R FROM table
;
L | R | L <> R |
L IS DISTINCT FROM R |
---|---|---|---|
NULL | NULL | NULL | f |
1 | NULL | NULL | t |
NULL | 1 | NULL | t |
1 | 1 | f | f |
1 | 2 | t | t |
## | |
# Find CDN output that has invalid UTF8 byte sequences. | |
# Fix them. | |
# | |
# NB: This requires an iconv that supports --byte-subst | |
# | |
FAILURES=utf8_failures | |
FAILURE_STRING=__WUBWUB__ |
## | |
# Find CDN output that has invalid UTF8 byte sequences. | |
# Fix them. | |
# | |
# NB: This requires an iconv that supports --byte-subst | |
# | |
FAILURES=utf8_failures | |
FAILURE_STRING=__WUBWUB__ |
ls -alh | awk -v table_name=$1 ' | |
BEGIN { | |
if(table_name == "") { | |
print "table_name required" | |
exit(1) | |
} | |
myi = table_name ".MYI" | |
myd = table_name ".MYD" | |
} | |
$9 ~ /#.*MYD/ { |
for i in {5..100..5} | |
do | |
PATHS="coverage/defra_darwin.txt" | |
bin/hits coverage -t $i logfiles/defra_darwin/darwin.defra.gov.uk > $PATHS | |
COUNT=`wc -l $PATHS` | |
git add $PATHS | |
git commit -m "$COUNT paths with >= $i all-time hits" | |
done |
SELECT m.path, | |
Sum(h.count) AS hit_count | |
FROM mappings m | |
INNER JOIN sites s | |
ON m.site_id = s.id | |
LEFT JOIN hits h | |
ON h.mapping_id = m.id | |
WHERE s.id = 50 | |
GROUP BY m.path_hash | |
ORDER BY hit_count DESC |
mysql> INSERT INTO hosts (site_id, hostname, created_at, updated_at) VALUES (NULL, 'test.me', '2014-01-01', '2014-01-01'); | |
ERROR 1048 (23000): Column 'site_id' cannot be null | |
mysql> INSERT INTO hosts (site_id, hostname, created_at, updated_at) VALUES (1, 'test.me', '2014-01-01', '2014-01-01'); | |
Query OK, 1 row affected (0.00 sec) | |
mysql> UPDATE `hosts` SET `site_id` = NULL WHERE `hosts`.`site_id` = 1 AND `hosts`.`id` IN (1) | |
-> ; | |
Query OK, 1 row affected, 1 warning (0.00 sec) | |
Rows matched: 1 Changed: 1 Warnings: 1 |
first_spelling | second_spelling | |
---|---|---|
postgres | postgres |
RSpec::Matchers.define :have_svg_text do |text| | |
match do |page| | |
doc = Nokogiri::HTML(page.body) | |
doc.at_xpath("//text[text()='#{text}']") | |
end | |
failure_message_for_should do |actual| | |
"expected #{actual} to have SVG text #{text}, was not found" | |
end | |
end |