Write a simple server that sends a notification about every 2 seconds. To receive the notification, a client has to register with the server.
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
| Visual Studio 2019 Professional: NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y | |
| Visual Studio 2017 Professional: KBJFW-NXHK6-W4WJM-CRMQB-G3CDH | |
| Visual Studio 2015 Professional: HMGNV-WCYXV-X7G9W-YCX63-B98R2 | |
| Visual Studio 2013 Professional: XDM3T-W3T3V-MGJWK-8BFVD-GVPKY | |
| Visual Studio 2012 Professional: 4D974-9QX42-9Y43G-YJ7JG-JDYBP |
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
| deps/engines-3.7.0-11.qe-napi-2-7d9243c73ade811196e360a14435eb4756076300 |
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
| package main | |
| // StringNode Is a node in a binary tree | |
| type StringNode struct { | |
| Data string | |
| Left *StringNode | |
| Right *StringNode | |
| } | |
| /* Tree traversal functions (Depth-first traversal) */ |
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
| package algo | |
| // BubbleSort returns a sorted list of integers using the bubble sort algorithm | |
| func BubbleSort(elems []int) []int { | |
| if elems == nil { | |
| return nil | |
| } | |
| for mx := len(elems) - 1; mx >= 0; mx-- { | |
| for idx := 1; idx <= mx; idx++ { |
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
| (* This is a code fragment in OCaml *) | |
| match watever with | |
| | (true, _) -> | |
| match String.lowecase Path.GetExtension path with | |
| | ".sln" | ".csproj" | ".fsproj" -> Path.GetFullPath path | |
| _ -> failwith "Whatever" |
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
| defmodule SpawnEx1 do | |
| import :timer, only: [sleep: 1] | |
| def greet(pid) do | |
| send pid, {:ok, "I'm alive"} | |
| exit(:dead) | |
| end | |
| def process_messages() do | |
| receive do |
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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <stddef.h> | |
| typedef int *ptr_int; | |
| typedef struct unordered { | |
| int a; | |
| double b; |
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
| package com.cprieto.samples | |
| class ShortToStringConverterListener: ArrayInitBaseListener() { | |
| private val builder = StringBuilder() | |
| override fun enterInit(ctx: ArrayInitParser.InitContext?) { | |
| builder.append("{") | |
| } | |
| override fun toString(): String { |
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
| /* BASICS */ | |
| .CodeMirror { | |
| /* Set height, width, borders, and global font properties here */ | |
| font-family: monospace; | |
| height: 300px; | |
| color: black; | |
| direction: ltr; | |
| } |
NewerOlder