- Rename .OVA file to .7z
- Use winrar to extract .vmdk out of it
https://cloudbase.it/qemu-img-windows/
qemu-img convert "D:\VirtualBox\Open-disk001.vmdk" -O vhdx -o subformat=dynamic "D:\VirtualBox\Open.vhdx"
/// <summary> | |
/// Returns the distance in miles or kilometers of any two GeoCordinates | |
/// Ref: https://en.wikipedia.org/wiki/Haversine_formula | |
/// </summary> | |
/// <param name="pos1">Location 1</param> | |
/// <param name="pos2">Location 2</param> | |
/// <param name="unit">Miles or Kilometers or Meters</param> | |
/// <returns>Distance in the requested unit</returns> | |
public static double HaversineDistance(LatLng pos1, LatLng pos2, DistanceUnit unit) | |
{ |
public static double DegreesToRadians(double degrees) | |
{ | |
return degrees * Math.PI / 180.0; | |
} | |
public static double RadiansToDegrees(double radians) | |
{ | |
return radians * 180.0 / Math.PI; | |
} |
/// Converts Spherical to Cartesian coordinates | |
int earthRadius = 6367; //radius in km | |
private Cartesian convertSphericalToCartesian(double latitude, double longitude) | |
{ | |
var lat = DegreesToRadians(latitude); | |
var lon = DegreesToRadians(longitude); | |
var x = earthRadius * Math.Cos(lat) * Math.Cos(lon); | |
var y = earthRadius * Math.Cos(lat) * Math.Sin(lon); | |
var z = earthRadius * Math.Sin(lat); | |
return new Cartesian(x, y, z); |
// Interpolate between 2 colors in C# | |
// Taken from answer by user Jason | |
// http://stackoverflow.com/questions/1236683/color-interpolation-between-3-colors-in-net | |
class ColorInterpolator { | |
delegate byte ComponentSelector(Color color); | |
static ComponentSelector _redSelector = color => color.R; | |
static ComponentSelector _greenSelector = color => color.G; | |
static ComponentSelector _blueSelector = color => color.B; | |
public static Color InterpolateBetween( |
#region KeyFrame Animations | |
ScalarKeyFrameAnimation keyframeAnimation = _compositor.CreateScalarKeyFrameAnimation(); | |
keyframeAnimation.InsertKeyFrame(0.0f, 0.0f); // Optional | |
keyframeAnimation.InsertKeyFrame(1.0f, 360.0f, _compositor.CreateLinearEasingFunction()); | |
keyframeAnimation.Duration = TimeSpan.FromSeconds(3); | |
keyframeAnimation.IterationBehavior = AnimationIterationBehavior.Forever; |
#include <Wire.h> | |
void setup() { | |
Serial.begin (115200); | |
Serial.println (); | |
Serial.println ("I2C scanner. Scanning ..."); | |
byte count = 0; | |
Wire.begin(); | |
for (byte i = 8; i < 120; i++) |
"""============================== | |
Branded IPython Notebook Launcher | |
================================= | |
Executing this module will create an overlay over ipython notebooks own static | |
files and templates and overrides static files and templates and copies over all | |
example notebooks into a temporary folder and launches the ipython notebook server. | |
You can use this to offer an interactive tutorial for your library/framework/... |
using System; | |
using System.Globalization; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Socks | |
{ | |
public static class Socks5 |
https://cloudbase.it/qemu-img-windows/
qemu-img convert "D:\VirtualBox\Open-disk001.vmdk" -O vhdx -o subformat=dynamic "D:\VirtualBox\Open.vhdx"
-- When SQLite is compiled with the JSON1 extensions it provides builtin tools | |
-- for manipulating JSON data stored in the database. | |
-- This is a gist showing SQLite return query data as a JSON object. | |
-- https://www.sqlite.org/json1.html | |
-- An example table with some data | |
CREATE TABLE users ( | |
id INTEGER PRIMARY KEY NOT NULL, | |
full_name TEXT NOT NULL, | |
email TEXT NOT NULL, |