A Step-By-Step Guide from Unboxing to Creative Coding
// g++ vector_vs_stack_array.cpp -O3 -o vector | |
#include <numeric> | |
#include <vector> | |
#include <chrono> | |
#include <iostream> | |
#include <cmath> | |
using namespace std::chrono; | |
double sumNewArray( int N ) { |
This document describes the relationship between Memory<T>
and its related classes (MemoryPool<T>
, IMemoryOwner<T>
, etc.). It also describes best practices when accepting Memory<T>
instances in public API surface. Following these guidelines will help developers write clear, bug-free code.
-
Span<T>
is the basic exchange type that represents contiguous buffers. These buffers may be backed by managed memory (such asT[]
orSystem.String
). They may also be backed by unmanaged memory (such as viastackalloc
or a rawvoid*
). TheSpan<T>
type is not heapable, meaning that it cannot appear as a field in classes, and it cannot be used acrossyield
orawait
boundaries. -
Memory
is a wrapper around an object that can generate aSpan
. For instance,Memory
instances can be backed byT[]
,System.String
(readonly), and evenSafeHandle
instances.Memory
cannot be backed by "transient" unmanaged me
#! /bin/bash | |
set -e | |
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG | |
trap 'echo FAILED COMMAND: $previous_command' EXIT | |
#------------------------------------------------------------------------------------------- | |
# This script will download packages for, configure, build and install a GCC cross-compiler. | |
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running. | |
# If you get an error and need to resume the script from some point in the middle, | |
# just delete/comment the preceding lines before running it again. |
extension CMTime: Codable { | |
public init(from decoder: Decoder) throws { | |
let container = try decoder.container(keyedBy: CodingKeys.self) | |
self.value = try container.decode(CMTimeValue.self, forKey: .value) | |
self.timescale = try container.decode(CMTimeScale.self, forKey: .timescale) | |
self.flags = CMTimeFlags(rawValue: try container.decode(UInt32.self, forKey: .flags)) | |
self.epoch = try container.decode(CMTimeEpoch.self, forKey: .epoch) | |
} |
#include "ofMain.h" | |
#include "ofAppNoWindow.h" | |
#define WPA_PATH "/etc/wpa_supplicant/wpa_supplicant.conf" | |
class ofApp : public ofBaseApp | |
{ | |
public: | |
string essid; | |
string passwd; |
// | |
// ColorCubeHelper.swift | |
// | |
// Created by Joshua Sullivan on 10/01/16. | |
// Copyright © 2016 Joshua Sullivan. All rights reserved. | |
// | |
import UIKit | |
import Accelerate |
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Windows; | |
using System.Windows.Interop; | |
namespace KinectRun.Host.Controls | |
{ | |
// GameHost is a FrameworkElement and can be added to controls like so: | |
// var gameHost = new GameHost(container.ActualWidth, container.ActualHeight); |
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### OR take a look at | |
### https://github.com/HotCakeX/Harden-Windows-Security |
#ON THE RPI (if you haven't downloaded openFrameworks) | |
cd | |
curl -O http://192.237.185.151/versions/nightly/of_v20151008_linuxarmv6l_nightly.tar.gz | |
mkdir openFrameworks | |
tar vxfz of_v20151008_linuxarmv6l_nightly.tar.gz -C openFrameworks --strip-components 1 | |
cd /home/pi/openFrameworks/scripts/linux/debian | |
sudo ./install_dependencies.sh | |
#INSTALL SMB WITH / ACCESS |