Skip to content

Instantly share code, notes, and snippets.

@Criipi
Criipi / Arduino_interfacing.cs
Last active December 15, 2017 19:05
A simple example showing how to interface the Arduino with a C# program
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ArduinoInterfacingDemo
{
class Program
@Criipi
Criipi / Azure DB Connect
Last active July 16, 2016 19:01
Shows how to connect to an Azure database using SQLSRV and PHP to get all of the data from a specified table and print each 'FIELDNAME' that we got from the db
<?php
if (!extension_loaded("sqlsrv"))
{
die("SQLSRV hasn't been loaded.");
}
// Connection details
$server = "tcp:<FULL SERVER ADDRESS>, <PORT>";
$user = "<DB USER>@<SERVER ADDRESS>";
$pwd = "<PASS>";
$db = "<DB NAME>";
@Criipi
Criipi / Simple message on Android
Created September 15, 2014 11:44
Show message on Android
// Shows the user a simple message
Toast.makeText(getApplicationContext(), "Enter text here", Toast.LENGTH_LONG).show();
@Criipi
Criipi / JSON.NET Example
Created September 2, 2014 14:38
JSON.NET Example
var dict = (JObject)JsonConvert.DeserializeObject(e.Result);
foreach (var obj in dict["category"])
{
string id = obj["itemInCategory"].ToString();
}