Skip to content

Instantly share code, notes, and snippets.

View mcsee's full-sized avatar
🏠
Working from home

mcsee mcsee

🏠
Working from home
View GitHub Profile
struct Point {
float angle;
float distance;
}
@mcsee
mcsee / point.c
Last active July 15, 2020 23:54
Struct Point in C
struct Point {
float x;
float y;
}
<?
final class Polygon {
private $vertices;
public function getVertices(): Collection {
return $this->vertices;
}
public function setVertices(Collection $newVertices) {
<?
final class Polygon {
public $vertices;
}
<?
final class Point {
private $x;
private $y;
}
<?
final class Point {
private $angle;
private $distance;
}
<?
final class TwitterAccount {
private $followers;
private function __construct() {
$this->followers = [];
}
}
<?
$mcsee1 = new TwitterAccount('mcsee1');
$pontifex = new TwitterAccount('pontifex');
$mcsee1->addFollower($pontifex);
<?
$mcsee1 = new TwitterAccount('mcsee1');
$pontifex = new TwitterAccount('pontifex');
$mcsee1->getFollowers()[] = $pontifex;
<?
StrategySupervisedHelper::getInstance()->optimize($processId);