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
| func (p *Proxy) GetHttpImapConnection(imapServer string) (net.Conn, error) { | |
| proxyAddr := p.IpAddress + ":" + strconv.Itoa(p.Port) | |
| conn, err := net.Dial("tcp", proxyAddr) | |
| if err != nil { | |
| return nil, err | |
| } | |
| request := "CONNECT " + imapServer + " HTTP/1.1\r\nHost: " + imapServer + "\r\n" | |
| if p.HasCredentials() { | |
| credentials := p.GetEncodedCredentials() |
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
| %{ | |
| const symbols = {}; | |
| let currentScope = 0; | |
| let nextScope = 1; | |
| let lastType = null; | |
| function enterScope() { | |
| currentScope = nextScope; | |
| nextScope++; | |
| } |
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
| %{ | |
| const symbols = {}; | |
| let currentScope = 0; | |
| let nextScope = 1; | |
| let lastType = null; | |
| function enterScope() { | |
| currentScope = nextScope; | |
| nextScope++; | |
| } |
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
| var input = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 23 }; | |
| var list = new List<int>(input); | |
| foreach (var n in input) | |
| { | |
| var actualIndex = list.IndexOf(n); | |
| var foundIndex = FindAt(input, n, 0, input.Length - 1); | |
| Console.WriteLine($"[{n}] Expected: {actualIndex} | Found: {foundIndex}"); | |
| } |
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
| public sealed class CheckedOverflowChecks : TimeSpanOverflowChecksContext | |
| { | |
| public static TimeSpan Interval(int days = 0, int hours = 0, long minutes = 0, long seconds = 0, | |
| long milliseconds = 0, long microseconds = 0) | |
| { | |
| try | |
| { | |
| long ticks = checked((long)days * TicksPerDay | |
| + (long)hours * TicksPerDay | |
| + minutes * TicksPerMinute |
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
| [RegisterSingleton] | |
| public class LabelEngine | |
| { | |
| private readonly ILogger _logger; | |
| private readonly Timer _timer; | |
| private readonly AsyncReaderWriterLock _lock = new(); | |
| private IBrowser _browser = null!; | |
| private readonly string _browserPath; | |
| public LabelEngine(ILogger logger, IOptions<LabelEngineOptions> options) |
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
| [ | |
| { | |
| "nome": "Afonso Cláudio", | |
| "latitude": -20.0778, | |
| "longitude": -41.1261, | |
| "vizinhos": [ | |
| { | |
| "nome": "Itarana", | |
| "distancia": 34.54 | |
| }, |
NewerOlder