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
static IEnumerable<(int pos, int size)> Ranges(ulong[] bitmap, int pos, int required) | |
{ | |
while (!is_at_end()) | |
{ | |
if (is_bit_zero()) | |
{ | |
var spos = pos; | |
var c = 0; | |
do | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Numerics; | |
using System.Security.Cryptography; | |
public class Program | |
{ | |
public static void Main() | |
{ |
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
using System; | |
using System.Linq; | |
using Raven.Client.Embedded; | |
using Raven.Client.Indexes; | |
using Raven.Client.Linq; | |
namespace ConsoleApplication | |
{ | |
class Program | |
{ |
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 decimal GetTaxes(decimal salary) | |
{ | |
var taxBrackets = new[] | |
{ | |
new {UpperLimit = 5070m, Taxation = 0.10m}, | |
new {UpperLimit = 8660m, Taxation = 0.14m}, | |
new {UpperLimit = 14070m, Taxation = 0.23m}, | |
new {UpperLimit = 21240m, Taxation = 0.30m}, | |
new {UpperLimit = 40230m, Taxation = 0.33m}, | |
new {UpperLimit = decimal.MaxValue, Taxation = 0.45m}, |