This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
//! Shows how to manually convert a group of enums / ints into a packed struct and then into an integer | |
//! which can be used in a switch statement. Useful for eliminting complicated nested switches / ifs. | |
//! | |
//! Then creates helpers switchable() and switchableAny() for doing the same. | |
//! | |
//! Note: the second part only works with stage1 as of 9/25/22 (zig version | |
//! 0.10.0-dev.4115+75e9a8c7f). stage2 currently crashes on this but will likely work soon. | |
const std = @import("std"); |
This document now exists on the official ASP.NET core docs page.
static ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_PassthruCentralNode; | |
// We are using the ImGuiWindowFlags_NoDocking flag to make the parent window not dockable into, | |
// because it would be confusing to have two docking targets within each others. | |
ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking; | |
ImGuiViewport* viewport = ImGui::GetMainViewport(); | |
ImGui::SetNextWindowPos(viewport->Pos); | |
ImGui::SetNextWindowSize(viewport->Size); | |
ImGui::SetNextWindowViewport(viewport->ID); |
// Test helper for imgui_freetype | |
#include "misc/freetype/imgui_freetype.h" | |
struct FreeTypeTest | |
{ | |
enum FontBuildMode { FontBuildMode_FreeType, FontBuildMode_Stb }; | |
FontBuildMode BuildMode = FontBuildMode_FreeType; | |
bool WantRebuild = true; |
WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines
A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.
Nowadays lots of companies choose engines like [Unreal](https:
record Provider.WebSocket.Subscription { | |
onOpen : Function(WebSocket, Promise(Never, Void)), | |
onMessage : Function(String, Promise(Never, Void)), | |
onError : Function(Promise(Never, Void)), | |
onClose : Function(Promise(Never, Void)), | |
url : String | |
} | |
provider Provider.WebSocket : Provider.WebSocket.Subscription { | |
fun open (url : String, socket : WebSocket) : Array(a) { |
return await knex.transaction(async t => { | |
try { | |
// Retrieve table names (excluding migrations_lock) | |
const tables = (await knex | |
.raw(` | |
SELECT table_name FROM information_schema.tables | |
WHERE table_schema = 'public' | |
`) | |
.transacting(t) | |
) |
const R = 6371; // earths radius in km | |
function radiansFromDegrees(deg) { | |
return deg * (Math.PI / 180); | |
} | |
// reduce number of positions using the Ramer–Douglas–Peucker algorithm | |
// https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm | |
// Code based on: https://www.namekdev.net/2014/06/iterative-version-of-ramer-douglas-peucker-line-simplification-algorithm/ | |
function simplifyGeoCoordinates(positions, tolerance) { |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');