This file contains 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
for (i = r; i < r+8; i++) { | |
for (j = c; j < c+8; j++) { | |
... | |
tmp = A[i][j]; | |
B[j][i] = tmp; | |
... | |
} | |
} |
This file contains 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
I hereby claim: [15/76896] | |
* I am hbd on github. | |
* I am mister (https://keybase.io/mister) on keybase. | |
* I have a public key ASBD9YjzUdtA_MMMkI4GUJ45IDk7FMMbYsWNpzX3geOHdAo | |
To claim this, I am signing this object: | |
```json | |
{ |
This file contains 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
alert(); |
This file contains 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
# taken from discussion -- not original code | |
n = int(input().strip()) | |
bucket = defaultdict(list) # bucket, actually a list with 1 key/n values | |
# store each input in the appropriate sub-bucket location | |
# use the string's length as the index (key), and appends it at that sub-bucket location | |
# this collects all string of the same length in the same sub-bucket location | |
for _ in range(n): | |
number = input().strip() | |
bucket[len(number)].append(number) |
This file contains 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
/* | |
Instructions: | |
To enable dark mode in Slack, add this to bottom of /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js | |
document.addEventListener('DOMContentLoaded', function() { | |
$.ajax({ | |
url: 'https://gist.githubusercontent.com/hbd/04bdcb1af1658230374279c9013b91f0/raw/acbca2a4b40d892f44b65d62ce49626848351b15/slack-dark-mode.css', | |
success: function(css) { | |
let overrides = ` | |
code { background-color: #535353; color: #85c5ff; } // Change color: to whatever font color you want |
This file contains 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 ( | |
"fmt" | |
) | |
func main() { | |
fmt.Println("h3ll0, w0rld!") | |
} |
This file contains 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 bing | |
func (c *Client) DriveTime(ctx context.Context, locations ...Location) (float64, error) { | |
// Call external API. | |
driveTime, err := c.httpclient.Post(ctx, c.config.Endpoint+"/routing/time", ...) | |
... | |
return driveTime, nil | |
} |
This file contains 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 locationiface | |
type Client interface { | |
DriveTime(context.Context, ...Location) (float64, error) | |
} |
This file contains 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 location | |
type Client struct { | |
clients []locationiface.Client | |
} | |
func NewClient(clients ...locationiface.Client) *Client { | |
return &Client{clients: clients} | |
} |