Skip to content

Instantly share code, notes, and snippets.

View ayitinya's full-sized avatar
😌

Rudy Ayitinya Sulley ayitinya

😌
View GitHub Profile
// shared/commonMain/kotlin/package/resource/UserResources.kt
import io.ktor.resources.*
import kotlinx.serialization.Serializable
@Serializable
@Resource("/users")
class UsersResource {
@Serializable
@Resource("/me")
from typing import Dict, List
def main():
bus_admittances: Dict[str, complex] = {
"1-2": 2.5 - 4j,
"1-3": 1 - 2j,
"2-3": 1.5 - 2j,
"1-0": 0.4 - 1j,
"2-0": 0.5 - 1j,
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int sumAvg(int, int);
void bubbleSort(int *, int);
int min(int *, int);
int max(int *, int);
int main()
@ayitinya
ayitinya / factorial.c
Created April 28, 2022 08:22
I used an unsigned long long int. In python3, there is no limit to the max int, it depends on what your system memory can take. In C, I ran the code in linux, an unsigned long has a range of 0 to 18446744073709551615.
#include <stdio.h>
unsigned long long int factorial(int n)
{
if (n == 0)
{
return 1;
}
else
{
<div class="home">
<nav class="navbar navbar-expand-lg navbar-dark" ref="navbar">
<div class="container-fluid">
<span class="navbar-brand text-white">Outbox</span>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"