Skip to content

Instantly share code, notes, and snippets.

@tsathis
tsathis / TempDeserializer.java
Created June 25, 2020 13:07
temporary deserializer ##spring ##java ##deserializer
public class AnimalDeserializer extends StdDeserializer<Animal>
{
@Autowired
ObjectMapper mapper;
public AnimalDeserializer( Class<?> vc, ObjectMapper mapper )
{
super( vc );
this.mapper = mapper;
}
@tsathis
tsathis / BeanDeserializerModifier_modifyDeserializer.java
Last active June 25, 2020 08:31
[BeanDeserializerModifier modifyDeserializer] #spring #jackson
private static ObjectMapper configureObjectMapper(
ObjectMapper objectMapper, boolean shouldIncludeRawResponses) {
if (shouldIncludeRawResponses) {
SimpleModule module = new SimpleModule();
module.setDeserializerModifier(new BeanDeserializerModifier() {
@Override
public JsonDeserializer<?> modifyDeserializer(DeserializationConfig config,
BeanDescription beanDesc,
JsonDeserializer<?> deserializer) {
if (Response.class.isAssignableFrom(beanDesc.getBeanClass())) {
@tsathis
tsathis / dev.to.yaml
Created May 29, 2020 10:01 — forked from cor-bee/dev.to.yaml
Overdocumented Instant View Template for dev.to (https://instantview.telegram.org/contest/dev.to/template28/)
## General info:
# Function starts with @
# Variable starts with $
# Return of the most recently run function made by $@
# Key comments marked with ##
## Version of IV must be set first
~version: "2.1"
# Telegram doesn't support JW Player which is used in videoheaders
@tsathis
tsathis / index.html
Last active December 25, 2019 04:20
testing_playground
<h1>Hi there</h1>
@tsathis
tsathis / clustering_and_association_rule_mining.ipynb
Last active June 25, 2019 09:30
Clustering and Association Rule Mining
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tsathis
tsathis / quick_funcs.cpp
Last active August 2, 2018 06:10
Fuctions for quick use
/**
* Delete White Spaces
* @param str The input string which contains white spaces
* @return The output string which does not contain white spaces
*/
string delSpaces(string &str)
{
str.erase(std::remove(str.begin(), str.end(), ' '), str.end());
return str;
}
@tsathis
tsathis / Int_stack.cpp
Created May 30, 2018 13:51
Integer Stack class using Linked Lists C++
#include <iostream>
//Node class
class Node {
private:
//private members
int data;
Node *next;
public:
@tsathis
tsathis / IntLinkedList.cpp
Last active May 30, 2018 13:49
Integer Linked List using C++ from Scratch
#include <iostream>
//Node class
class Node {
private:
//private members
int data;
Node *next;
public:
@tsathis
tsathis / flood_fill_algorithm.cpp
Last active May 29, 2018 18:28
Simple Implementation of Flood Fill Algorithm using C++
#include <iostream>
#include <fstream>
using namespace std;
//Assume picture dimension is 10 letters X 25 letters
void printArray(char c[10][25]){
for(int a=0;a<10;a++){
for(int b=0;b<25;b++){
cout<< c[a][b];