Skip to content

Instantly share code, notes, and snippets.

View OpenSrcerer's full-sized avatar
😘
no ticket = no work

Daniel Stefani OpenSrcerer

😘
no ticket = no work
View GitHub Profile
@OpenSrcerer
OpenSrcerer / DtoMapper.java
Last active April 29, 2023 13:55
A mapper made in Java that moves contents of the source DTO to the target, if a method with the name of the source or a field with the name of the source field exists.
/*
So what does this code do? Here's an example:
A.java
class A {
int x = 3;
int y = 4;
}
B.java
@OpenSrcerer
OpenSrcerer / lgbtqpp.kt
Last active September 21, 2023 16:30
LGBTQ++
// This is a description of Genders, Sexual interests and orientations through the means of code.
// Femboys
class Guy : Girl
// Lesbians
class Girl {
fun wooHoo(otherGirl: girl) {
otherGirl.scissor(this);
}
@OpenSrcerer
OpenSrcerer / pseudocode.js
Created March 23, 2022 19:00
GeoJSON to Matrix Algorithm
/**
* Given a geoJson object, outputs a matrix with "0's" as open paths and "1's" as obstacles.
* @param geoJson Serialized GeoJson file to parse
* @param start Starting point for the path search
* @param end Ending point for the path
*/
function geoToMat(geoJson: Buffer, start: Point, end: Point): Double[][] {
var bbox = WhateverService.generateBbox(start, end);
var geoParsed: GeoJsonObject = GeoJsonParser.parse(geoJson); // parse serialized geojson into object
@OpenSrcerer
OpenSrcerer / exercises.java
Created January 28, 2021 11:55
1-20 + Extra Exercises CS106
package tester;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Test {
public static void main(String[] args) {