Skip to content

Instantly share code, notes, and snippets.

View Suchiman's full-sized avatar

Robin Sue Suchiman

  • Germany
  • 10:36 (UTC +02:00)
View GitHub Profile
@Suchiman
Suchiman / Program.cs
Last active October 27, 2023 18:40 — forked from nblumhardt/Program.cs
Enrich.WithCaller()
using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using Serilog;
using Serilog.Configuration;
using Serilog.Core;
using Serilog.Events;
namespace ConsoleApp24
@Suchiman
Suchiman / ParallelRunner.cs
Last active August 6, 2020 00:37 — forked from mmoroni/ParallelRunner.cs
Code Review!
public class ParallelRunner<T>
{
private List<Task<List<T>>> MultiTasks = new List<Task<List<T>>>();
private List<Task<T>> SingleTasks = new List<Task<T>>();
/// <summary>
/// Queues the specified work to run
/// </summary>
public void Run(Task<List<T>> task)
{
ID Value CreatedAt GroupNumber Reason for new group
036a2e7d-b809-48a4-9097-05460b06f1b4 1 2019-09-13T17:08:00 1 First in ID group
036a2e7d-b809-48a4-9097-05460b06f1b4 2 2019-09-13T17:09:00 1 None
036a2e7d-b809-48a4-9097-05460b06f1b4 3 2019-09-13T17:10:00 1 None
036a2e7d-b809-48a4-9097-05460b06f1b4 1 2019-09-13T17:11:00 2 Previous entry by CreatedAt in this ID group reached Value 3
6c5fbe89-ce79-4394-8c11-3efb7d924efb 1 2019-09-13T17:12:00 3 First in ID group
6c5fbe89-ce79-4394-8c11-3efb7d924efb 2 2019-09-13T17:13:00 3 None
02d97338-ea82-4a1e-a1be-638a120c08e5 1 2019-09-13T17:14:00 4 First in ID group
@Suchiman
Suchiman / Program.cs
Created June 2, 2019 22:51 — forked from brianmed/Program.cs
LexicographSort Integer List
using System;
using System.Collections.Generic;
using System.Linq;
namespace LexicographicSortIntegerList
{
class Program
{
static void Main(string[] args)
{
using System;
using System.ComponentModel.DataAnnotations;
namespace WarehouseBuilder.Common.API
{
public class BuildComponent
{
public virtual long Id { get; set; }
public virtual Warehouse Warehouse { get; set; }
public virtual int Order { get; set; }
@Suchiman
Suchiman / Lib.csproj
Last active August 15, 2017 20:28
Set Startup.csproj as startup, start debugging with F11 and step through, all works fine. Stop debugging, modify "Hello you" to "Hello World", start debugging with F11 again, try to step into Stuff.Test() and then i get "the source file is different from when the module was built"
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DBAF8EEE-E88C-4694-B2E0-AB6DDB93B057}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Lib</RootNamespace>
var take = options.count > 0 ? options.count : 12;
var page = options.page > 0 ? options.page : 1;
var skip = take * (page - 1);
var analysis = _DBContext.Analysis
.Select(a => new
{
comment_count = _DBContext.Comments.Count(c => c.AnalysisID == a.AnalysisID),
created_at = a.CreatedAt,
description = a.Description,
game = new
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using ProjectPatronBackoffice.Models;
using ProjectPatronBackoffice.Repositories;
using GalaSoft.MvvmLight.Command;
namespace ProjectPatronBackoffice.ViewModels
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Net.Sockets;
using System.Text;
using System.Windows.Forms;
namespace competition2
{
@Suchiman
Suchiman / MainTeam.cs
Created June 5, 2016 20:08 — forked from sethdorris/MainTeam.cs
ef error
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Web;
namespace NashGaming.Models
{