This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
using System; | |
using Android.App; | |
namespace MyApp.Droid | |
{ | |
[Application(Theme = "@style/MyMaterialTheme")] | |
public class MyApplication : Application | |
{ | |
public static Android.Content.Context CurrentContext { get; private set; } |
This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.IO; | |
using System.Net; | |
using System.Text; | |
/* EXAMPLE USAGE | |
FileDownloader fileDownloader = new FileDownloader(); |
// requires Jint | |
// | |
// this can be used for video streams as well, with few modifications | |
public async Task<string> GetYtAudioUrl(string id) | |
{ | |
await Task.Yield(); | |
var utf8 = new UTF8Encoding(false); | |
var wc = new WebClient(); |
using System; | |
using System.Numerics; | |
namespace System.Numerics | |
{ | |
class RandomBigInteger : Random | |
{ | |
public RandomBigInteger() : base() | |
{ | |
} |
public static class KeyValuePairExtension | |
{ | |
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> source, out TKey Key, out TValue Value) | |
{ | |
Key = source.Key; | |
Value = source.Value; | |
} | |
} |
// Shinobi (http://shinobi.video) - FFMPEG H.264 over HTTP Test | |
// How to Use raw H.264 (Simulated RTSP) | |
// 1. Start with `node ffmpegToWeb.js` | |
// 2. Get the IP address of the computer where you did step 1. Example : 127.0.0.1 | |
// 3. Open VLC and "Open Network Stream". | |
// 4. Input the following without quotes : `http://127.0.0.1:8001/h264` and start. | |
var child = require('child_process'); | |
var io = require('socket.io'); | |
var events = require('events'); |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
DiscordClient
by calling .UseLavalink()
. This method returns an instance of LavalinkExtension
.var lavaconfig = new LavalinkConfiguration
{
RestEndpoint = new ConnectionEndpoint { Hostname = "localhost", Port = 2333 },
SocketEndpoint = new ConnectionEndpoint { Hostname = "localhost", Port = 80 },
Password = "youshallnotpass"
} // replace the ports and the password with the values from your lavalink's application.yml