3.5kg fruit, ~50:50 elderberries and blackberries.
2.1kg sugar
| #include <stdio.h> | |
| #include <stdlib.h> // Include stdlib for malloc and free | |
| #include <limits.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| void sieve_of_eratosthenes(unsigned long n) { | |
| // Dynamically allocate memory for the prime array on the heap | |
| bool *prime = (bool *)malloc((n + 1) * sizeof(bool)); | |
| if (!prime) { |
| # Another simple make example. Creates 2 bins which include the same c file. | |
| # Assumes e.g. you have main.c, main2.c, mylib.c and mylib.h. | |
| # CC = gcc # Optional. Will use system default if not given here e.g. gcc or clang. | |
| CFLAGS = -g -Wall -fanalyzer # $(shell pkg-config --cflags openssl) | |
| # LIBS=$(shell pkg-config --libs openssl) | |
| # LDFLAGS = $(LIBS) | |
| bins = myprogram1 myprogram2 | |
| all: $(bins) |
| # CC = gcc # Optional. Will use system default if not given here e.g. gcc or clang. | |
| CFLAGS = -g -Wall -fanalyzer $(shell pkg-config --cflags openssl) | |
| LIBS=$(shell pkg-config --libs openssl) | |
| LDFLAGS = $(LIBS) | |
| bins = decrypt_file encrypt_file | |
| all: $(bins) | |
| clean: | |
| @for file in $(bins); do \ |
| # Cancel workflow if new workflow in same group is in progress. | |
| # https://docs.github.com/en/enterprise-cloud@latest/actions/using-jobs/using-concurrency | |
| name: Build | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| # allow only certain types of pull_request. | |
| pull_request: | |
| types: [ opened, reopened, synchronize ] |
| #!/bin/sh | |
| # Credits to Andy5995 for finding many (currently all) of these commands. | |
| # commands for indenting C code with 2 spaces | |
| indent -ci2 -bl -bli0 -nut -npcs *.c *.h | |
| # If you make a script from this command... | |
| indent -ci2 -bl -bli0 -nut -npcs $1 $2 | |
| # build with openssl |
| Get-ChildItem -Directory | ForEach-Object { | |
| echo "Folder: $($_.Name)" | |
| echo "Size: $((Get-ChildItem $_.Name -Recurse | Measure-Object -Property Length -Sum).Sum/(1024*1024*1024))GiB" | |
| echo "" | |
| } |
| #!/bin/bash | |
| # . /etc/os-release | |
| # if [[ $ID != "ubuntu" || $VERSION_ID != "18.04" ]]; | |
| # then | |
| # echo "Ubuntu 18.04 is required! System found: $ID $VERSION_ID" | |
| # fi; | |
| AppImageMG="AppImageMG" | |
| rm -rf $AppImageMG | |
| mkdir $AppImageMG |
| // import commonly used items from the prelude: | |
| // use rand::prelude::*; | |
| use std::{ rc::Rc, cell::RefCell }; | |
| fn destroy<T>(_: T) { | |
| } | |
| fn main() { | |
| let val = Rc::new(5); |
| # Creates a space-separated list of packages installed in your vcpkg instance. | |
| # Expects to be executed in the same dir as your vcpkg.exe. | |
| $packages_list = "" | |
| # Used to exclude packages with square brackets, because they're a subpackage of another package. | |
| # Also only select x64-windows-static installed packages. | |
| $packages_select_string = "[^\]]:x64-windows-static" | |
| .\vcpkg.exe list | Select-String $packages_select_string | ForEach-Object -Process { | |
| $packages_list += ($_ -split ' ')[0] + ' ' | |
| } |