This file contains 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
public static MoveDirections CalculateDirectionY(float y, int yCoeficient) | |
{ | |
var locationY = MoveDirections.DownFar; | |
var currentLocationY = y * yCoeficient; | |
if (currentLocationY > 20000) | |
{ | |
locationY = MoveDirections.UpFar; | |
} | |
else if (currentLocationY > 10000) | |
{ |
This file contains 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
private void ProcessMovements(MoveDirection moveDirection, bool fire) | |
{ | |
switch (moveDirection.CombinedXy) | |
{ | |
case MoveDirections.Center: | |
_rocket.StopMovements(); | |
break; | |
case MoveDirections.Left: | |
case MoveDirections.LeftFar: | |
_rocket.MoveLeft(); |
This file contains 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
public override System.Threading.Tasks.Task OnConnected() | |
{ | |
// some weird stuff here | |
return base.OnConnected(); | |
} | |
public void JoinToArea(string area) | |
{ | |
Groups.Add(Context.ConnectionId, area); | |
} |
This file contains 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
<script type="text/javascript"> | |
var hub; | |
$(window).ready(function () { | |
console.log("windows ready para SignalR"); | |
hub = $.connection.SampleHub; | |
$.connection.hub.start().done( | |
function () { | |
var area = 'default'; | |
console.log("hub started, area:" + area); | |
hub.server.JoinToArea(area); |
This file contains 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
<script type="text/javascript"> | |
var hub; | |
$(window).ready(function () { | |
console.log("windows ready para SignalR"); | |
hub = $.connection.SampleHub; | |
// dummy call to force the [OnConnected()] method on signalR hub | |
hub.client.foo = function () { }; | |
$.connection.hub.start().done( | |
function () { | |
var area = 'default'; |
This file contains 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
private static void Main() | |
{ | |
BluetoothAddress arduinoAdress = null; | |
_blueToothClient = new BluetoothClient(); | |
var devices = _blueToothClient.DiscoverDevices(); | |
foreach (var device in devices.Where(device => device.DeviceName == "IoT Arduino - Mainframe Bridge")) | |
{ | |
arduinoAdress = device.DeviceAddress; | |
Console.WriteLine("Device found, Address:" + arduinoAdress.ToString()); | |
} |
This file contains 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 <pebble.h> | |
static Window *window; | |
static TextLayer *text_layer; | |
enum { | |
KEY_EXCHANGEDATA = 0, | |
}; | |
// END Interaction with JS |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>@ViewBag.Title</title> | |
@Styles.Render("~/Content/css") | |
</head> | |
<body> | |
<h2>El Bruno - LeafLet demo 01</h2> |
This file contains 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
/// <summary> | |
/// Array for the bodies | |
/// </summary> | |
private readonly Body[] _bodies; | |
private void Reader_BodyFrameArrived(object sender, BodyFrameArrivedEventArgs e) | |
{ | |
var dataReceived = false; | |
var hasTrackedBody = false; |
This file contains 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
using System; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string name = "Valentino"; | |
int age = 7; |