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
# On slow systems, checking the cached .zcompdump file to see if it must be | |
# regenerated adds a noticable delay to zsh startup. This little hack restricts | |
# it to once a day. It should be pasted into your own completion file. | |
# | |
# The globbing is a little complicated here: | |
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct. | |
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error) | |
# - '.' matches "regular files" | |
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours. | |
autoload -Uz compinit |
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
#[derive(Debug, Clone, Copy)] | |
pub struct Color { | |
r: u8, | |
g: u8, | |
b: u8, | |
} | |
struct RenderTile { | |
glyph: char, | |
color: Color, |
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
In [1]: from urlparse import urlparse, parse_qs | |
In [2]: url = urlparse(u'https://yandex.ru/search/?text=привет&lr=213') | |
In [3]: url | |
Out[3]: ParseResult(scheme=u'https', netloc=u'yandex.ru', path=u'/search/', params='', query=u'text=\u043f\u0440\u0438\u0432\u0435\u0442&lr=213', fragment='') | |
In [4]: parse_qs(url.query) | |
Out[4]: {u'lr': [u'213'], u'text': [u'\u043f\u0440\u0438\u0432\u0435\u0442']} |
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
internal class Thing | |
{ | |
public string A { get; set; } | |
} | |
// C# Code | |
private static void M1(Thing thing) | |
{ | |
thing.A = thing.A + 10; | |
} |