This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE SEQUENCE sync_id; | |
| CREATE FUNCTION bump_sync_id() RETURNS trigger AS $$ | |
| begin | |
| NEW.sync_id := nextval('sync_id'); | |
| RETURN NEW; | |
| END; | |
| $$ LANGUAGE PLPGSQL; | |
| CREATE TABLE dogs (id SERIAL, name VARCHAR NOT NULL, sync_id INTEGER NOT NULL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| * { | |
| box-sizing: border-box; | |
| } | |
| body { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- FAIL: TestCommentsStandalone (0.00 seconds) | |
| mustache_test.go:52: returned "Begin.\n\nEnd.\n", | |
| expected "Begin.\nEnd.\n" | |
| --- FAIL: TestCommentsIndentedStandalone (0.00 seconds) | |
| mustache_test.go:63: returned "Begin.\n \nEnd.\n", | |
| expected "Begin.\nEnd.\n" | |
| --- FAIL: TestCommentsStandaloneLineEndings (0.00 seconds) | |
| mustache_test.go:74: returned "|\r\n\r\n|", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- FAIL: TestInterpolationAmpersand (0.00 seconds) | |
| mustache_test.go:375: returned "These characters should not be HTML escaped: \n", | |
| expected "These characters should not be HTML escaped: & \" < >\n" | |
| --- FAIL: TestInterpolationAmpersandIntegerInterpolation (0.00 seconds) | |
| mustache_test.go:411: returned "\" miles an hour!\"", | |
| expected "\"85 miles an hour!\"" | |
| --- FAIL: TestInterpolationAmpersandDecimalInterpolation (0.00 seconds) | |
| mustache_test.go:447: returned "\" jiggawatts!\"", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- FAIL: TestCommentsStandalone (0.00 seconds) | |
| mustache_test.go:44: returned "Begin.\n\nEnd.\n", | |
| expected "Begin.\nEnd.\n" | |
| --- FAIL: TestCommentsIndentedStandalone (0.00 seconds) | |
| mustache_test.go:55: returned "Begin.\n \nEnd.\n", | |
| expected "Begin.\nEnd.\n" | |
| --- FAIL: TestCommentsStandaloneLineEndings (0.00 seconds) | |
| mustache_test.go:66: returned "|\r\n\r\n|", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # select * from users; | |
| id | name | personality | |
| ----+---------+------------- | |
| 1 | adam | f | |
| 2 | bob | f | |
| 3 | charles | t | |
| (3 rows) | |
| # select * from things; | |
| id | name | owner_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net/http" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import re | |
| import sys | |
| import urllib2 | |
| from datetime import datetime | |
| print "# Generated by %s at %s" % (sys.argv[0], datetime.now()) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "rows": [ | |
| [7, 3, 1, 1, 7], | |
| [1, 1, 2, 2, 1, 1], | |
| [1, 3, 1, 3, 1, 1, 3, 1], | |
| [1, 3, 1, 1, 6, 1, 3, 1], | |
| [1, 3, 1, 5, 2, 1, 3, 1], | |
| [1, 1, 2, 1, 1], | |
| [7, 1, 1, 1, 1, 1, 7], | |
| [3, 3], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/parser.c b/src/parser.c | |
| index afbfed5..0f459f2 100644 | |
| --- a/src/parser.c | |
| +++ b/src/parser.c | |
| @@ -332,7 +332,7 @@ int parse_line(struct prog_info *pi, char *line) | |
| } | |
| return(True); | |
| } | |
| - strcpy(pi->fi->scratch, &pi->fi->scratch[i]); | |
| + memmove(pi->fi->scratch, &pi->fi->scratch[i], strlen(&pi->fi->scratch[i])+1); |