Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
namespace FastWeightedSelect
{
class Program
{
struct Element
{
using System;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
var t = new MyType() == true;
<?php
function ping($host, $port=25565, $timeout=30) {
//Set up our socket
$fp = fsockopen($host, $port, $errno, $errstr, $timeout);
if (!$fp) return false;
//Send 0xFE: Server list ping
fwrite($fp, "\xFE");
fwrite($fp, "\x00");
import socket
def get_info(host, port):
#Set up our socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
#Send 0xFE: Server list ping