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
var createElement = (tag, props, ...children) => { | |
var el | |
if (typeof tag === 'string') { | |
el = document.createElement(tag) | |
} else if (typeof tag === 'function') { | |
el = tag() | |
} | |
if (children) { | |
for (const child of children) { |
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
import { | |
PlatformNext, | |
UndefinedModelDefinition, | |
DefaultStreamerOptions, | |
} from '@pureweb/platform-sdk'; | |
import { | |
useStreamer, | |
useLaunchRequest, | |
VideoStream, |
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
import sys | |
import os | |
import ctypes | |
from enum import IntEnum | |
dir_path = os.path.dirname(os.path.realpath(__file__)) | |
handle = ctypes.CDLL(dir_path + "/../SDK/Bin/libEOSSDK-Mac-Shipping.dylib") | |
class CtypesEnum(IntEnum): | |
@classmethod |
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
/** | |
The idea is to write CSS/SCSS in the component file, but in a form of JS template string | |
During build time it gets gathered in a single CSS file | |
As a template string it MAYBE can even be evaluated in compile time to provide dynamic styling | |
*/ | |
import styles from './some_style.module.css' | |
// in build time it exports a style to separate css file | |
exportStaticStyle(` |
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
// Copyright Illia Komsa 2022. All rights reserved. | |
#include "GameFramework/GameModeBase.h" | |
#include "GameFramework/PlayerState.h" | |
#include "Kismet/GameplayStatics.h" | |
#include "GameLiftGameModeExample.generated.h" | |
/** | |
* An example PlayerSession class, that adds property to store PlayerSessionId | |
*/ | |
UCLASS(Abstract) |
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
#pragma once | |
#include "Subsystems/LocalPlayerSubsystem.h" | |
#include "Engine/DeveloperSettings.h" | |
#include "MySubsystem.generated.h" | |
class ULocalPlayer; | |
UCLASS(Config=Game, defaultconfig) |
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
var values = Array.from('AKQJT98765432') | |
// values.map(j => `${values[Math.min(i,j)]}${values[Math.max(i,j)]}${i > j ? 's' : i < j ? 'o' : ''}`).join(', ') | |
var result = values.map( | |
(_,i) => values.map( | |
(_,j) => `${values[Math.min(i,j)]}${values[Math.max(i,j)]}${i > j ? 's' : i < j ? 'o' : ''}`.padEnd(4) | |
).join('') | |
).join('\n') | |
console.log(result) | |
/* |
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
from random import randrange | |
from ortools.algorithms import pywrapknapsack_solver | |
PLAYERS_COUNT = 6 | |
PLAYERS_IN_MATCH = 6 | |
regions = { | |
'eu': 0, | |
'na': 1, |
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
<title>JS node editor</title> | |
<link rel="stylesheet" href="style.css"> | |
<div class=node style='left:50px; top: 50px;'> | |
<div class='in'>input label</div> | |
<div class='out'>output label</div> | |
</div> | |
<svg class=link width=50 height=127 style='left:350px;top: 95px'> | |
<path d="M 0 0, C 50 0, 00 127, 50 127" /> |
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
const model = { | |
normalKey: 1, | |
coRRupTkey: 2, | |
innErKey: { | |
x: 3, | |
Y: 4 | |
}, | |
aRR: [ | |
{ first: 5 } | |
] |
NewerOlder