Skip to content

Instantly share code, notes, and snippets.

View pczajkowski's full-sized avatar
🙉
I have no idea what I'm doing

Piotr Czajkowski pczajkowski

🙉
I have no idea what I'm doing
View GitHub Profile
/*
csvtest - reads CSV data from stdin and output properly formed equivalent
useful for testing the library
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define _GNU_SOURCE //asks stdio.h to include asprintf
#include <archive.h>
#include <archive_entry.h>
#include <stdlib.h>
#include <string.h>
#include "stopif.h"
char* printFileSize(long int size){
char *fileSize;
@pczajkowski
pczajkowski / NoDuplicatedSource.cs
Created June 24, 2021 08:34
Remove segments where source is duplicated from TMX file while streaming it
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
namespace DuplicatesInTMX
{
class Program
{
@pczajkowski
pczajkowski / BellmanFord.cs
Last active March 16, 2022 11:42
Bellman Ford Algorithm in C#
using System;
using System.Collections.Generic;
using System.Linq;
// Adapted from JavaScript example in The Imposter's Handbook by Rob Conery
namespace BellmanFord
{
class Path
{
@pczajkowski
pczajkowski / Djikstra.cs
Created December 21, 2017 11:10
Djikstra algorithm for C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// Adapted from JavaScript example in The Imposter's Hanbook by Rob Conery
// Doesn't support negative edges!
namespace Djikstra
{
@pczajkowski
pczajkowski / Comparison.cs
Created January 21, 2024 14:08
CsvHelper vs Sep in the land of bad CSVs
namespace CSVHelperVsSep;
public class Comparison
{
public string? Original;
public string? Sep;
public string? CsvHelper;
}