Skip to content

Instantly share code, notes, and snippets.

@therightstuff
therightstuff / RSAKeys.cs
Last active November 3, 2023 16:34
Import and export RSA Keys between C# and PEM format using BouncyCastle
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Security.Cryptography;
namespace MyProject.Data.Encryption
{

Acceleration of Two Objects Connected by a Cord

A ball of mass m1 and a block of mass m2 are attached by a lightweight cord that passes over a frictionless pulley of negligible mass, as shown in the figure below. The block lies on a frictionless incline of angle θ. Find the magnitude of the acceleration of the two objects and the tension in the cord.

Let's solve this problem using Symbolism, a computer algebra library for C#.

Free-body diagram for the ball:

@fenrir-naru
fenrir-naru / How to use NinjaScan-Light with RTKLIB
Last active May 19, 2017 02:55
How to use NinjaScan-Light with RTKLIB
1. Make an empty file named "direct.gps" in a MicroSD(HC).
2. Make a file named "gps.cfg" in the MicroSD(HC) with containing the following binary (printed in hex format).
B5 62 09 01 10 00 C8 16 00 00 00 00 00 00 97 69 21 00 00 00 02 10 2B 22
B5 62 09 01 10 00 0C 19 00 00 00 00 00 00 83 69 21 00 00 00 02 11 5F F0
B5 62 06 01 08 00 02 10 00 01 01 01 00 00 24 2F
B5 62 06 01 08 00 02 11 00 01 01 01 00 00 25 36
(This information depends on GPS receiver firmware version. please see http://wiki.openstreetmap.org/wiki/UbloxRAW)
3. Insert the MicroSD(HC) to NinjaScan-Light and power-on. NinjaScan-Light will be recognized as COMx.
4. Configure RTKLIB input; Rover from Serial type via COMx and u-blox format.