using System.Net;
using System.Net.Sockets;
using UnityEngine.Networking;
var address = IPAddress.Parse("0.0.0.0");
int port;
using (var tempSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)) {
tempSocket.Bind(new IPEndPoint(address, port: 0));
port = ((IPEndPoint) tempSocket.LocalEndPoint).Port;
This file contains hidden or 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
| package org.frankversnel.rxquartz | |
| import java.time.Instant | |
| import java.util.UUID | |
| import scala.concurrent.{ExecutionContext, Promise, Future} | |
| import com.typesafe.scalalogging.Logger | |
| import org.quartz._ | |
| import rx.lang.scala.{Observer, Subscription, Observable} |
This file contains hidden or 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.Diagnostics; | |
| using System.Threading; | |
| using BulletSharp; | |
| using BulletSharp.Math; | |
| using BulletUnity; | |
| using UnityEngine; | |
| using Vector3 = BulletSharp.Math.Vector3; | |
| public class MultithreadingTest : MonoBehaviour { | |
| private MotionState _bodyView; |
This file contains hidden or 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
| namespace Lateralus { | |
| public struct ComplexNumber { | |
| public readonly double Direct; // Real part | |
| public readonly Lateral Lateral; // Imaginary part | |
| public ComplexNumber(double direct, Lateral lateral) { | |
| Direct = direct; | |
| Lateral = lateral; |
This file contains hidden or 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
| import spire.implicits._ | |
| import spire.math._ | |
| class MachineLearning1[Number](implicit fractional: Fractional[Number]) { | |
| import fractional.pow | |
| private def number(integer: Int): Number = fractional.fromInt(integer) | |
| type Hypothesis = Number => Number |
This file contains hidden or 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
| (ns babaisyou.spec | |
| (:require [clojure.spec.alpha :as s])) | |
| (s/def ::subject | |
| #{:word/baba :word/wall :word/flag :word/grass}) | |
| (s/def ::verb | |
| #{:word/is}) | |
| (s/def ::object | |
| #{:word/you :word/push :word/stop :word/win}) | |
| (s/def ::sentence |
OlderNewer