There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull
example requires it.
Consider adopting the new property pattern, wherever you use IsNullOrEmpty
.
string? hello = "hello world";
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Display a map</title> | |
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /> | |
<script src="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js"></script> | |
<link href="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css" rel="stylesheet" /> | |
<script src="https://unpkg.com/pmtiles@2.0.0/dist/index.js"></script> | |
<style> |
## ----setup,include=FALSE,message=FALSE,warning=FALSE----------------------------------------------------------------------------------------------------------------------------------------------------- | |
library("here") # 1.0.1 | |
library("sf") # 1.0-14 | |
library("rgl") # 1.2.1 | |
library("geoviz") # 0.2.2 | |
library("raster") # 3.6-26 | |
library("rayshader") # 0.35.7 | |
library("osmdata") # 0.2.5 | |
library("tidyverse") # 2.0.0 |
There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull
example requires it.
Consider adopting the new property pattern, wherever you use IsNullOrEmpty
.
string? hello = "hello world";
using System; | |
namespace Vincenty | |
{ | |
public class Vincenty | |
{ | |
private double RadiusLong = 6378137.0; | |
private double Flatts = 1 / 298.257222101; | |
private double RadiusShort => RadiusLong * (1 - Flatts); |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
[assembly: ExportRenderer(typeof(HighlightableMap), typeof(IosHighlightableMapRenderer))] | |
public class IosHighlightableMapRenderer : MapRenderer | |
{ | |
private MapHighlight _currentHighlight; | |
protected override void OnElementChanged(ElementChangedEventArgs<View> e) | |
{ | |
base.OnElementChanged(e); |
FROM microsoft/dotnet-framework:4.7.2-sdk AS build | |
WORKDIR /app | |
# copy csproj and restore as distinct layers | |
COPY *.sln . | |
COPY aspnetapp/*.csproj ./aspnetapp/ | |
COPY aspnetapp/*.config ./aspnetapp/ | |
RUN nuget restore | |
# copy everything else and build app |
This optimizes a GLTF file that was exported by blender (or similar) by de-duplicating buffer views (i.e. chunks of bytes) that are equal and removing redundant accessors.
For example, 100 cubes of different scales/materials/rotations/etc should all end up using a single BufferGeometry in ThreeJS, which isn't the case with current GLTF exporters in Blender and parsers for ThreeJS.
In scenes with a lot of instancing, it can dramatically reduce total file size as well as render performance. In one test scene:
Before: 4.8MB file size, 832 THREE.Geometry
instances across 832 THREE.Mesh
objects
After: 661KB file size, 13 THREE.Geometry
instances across 832 THREE.Mesh
objects
using System; | |
using System.Diagnostics; | |
using static System.Math; | |
// Some helpers for converting GPS readings from the WGS84 geodetic system to a local North-East-Up cartesian axis. | |
// The implementation here is according to the paper: | |
// "Conversion of Geodetic coordinates to the Local Tangent Plane" Version 2.01. | |
// "The basic reference for this paper is J.Farrell & M.Barth 'The Global Positioning System & Inertial Navigation'" | |
// Also helpful is Wikipedia: http://en.wikipedia.org/wiki/Geodetic_datum |