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
struct TopHalfCircle: Shape { | |
func path(in rect: CGRect) -> Path { | |
var path = Path() | |
path.addArc( | |
center: .zero, | |
radius: 1, | |
startAngle: .radians(.pi), | |
endAngle: .zero, | |
clockwise: false |
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
// Image+Trim.swift | |
// | |
// Copyright © 2020 Christopher Zielinski. | |
// https://gist.github.com/chriszielinski/aec9a2f2ba54745dc715dd55f5718177 | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
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
#include <string.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
typedef struct str_pos { | |
ssize_t letter_pos; | |
ssize_t word_pos; | |
} str_pos; |
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
#include <iostream> | |
#include <vector> | |
#include <iomanip> | |
#define lenBigInt 9 | |
#define divBigInt 1000000000 | |
// Возвращет вектор в обратном порядке, 12 345 678 987 654 123 -> 987654123 12345678 | |
std::vector<unsigned int> parseBigIntReverced(std::string str) { | |
int i = str.size(); |
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
#include <iostream> | |
#include <vector> | |
#include <iomanip> | |
#define lenBigInt 9 | |
#define divBigInt 1000000000 | |
// Возвращет вектор в обратном порядке, 12 345 678 987 654 123 -> 987654123 12345678 | |
std::vector<unsigned int> parseBigIntReverced(std::string str) { | |
int i = str.size(); |