Skip to content

Instantly share code, notes, and snippets.

View TheJavaGuy's full-sized avatar

Ivan Milosavljević TheJavaGuy

View GitHub Profile
@TheJavaGuy
TheJavaGuy / AlphanumComparator.java
Created May 25, 2022 12:44
Implementation of Alphanumeric sorting by Dave Koelle
/*
* Copyright © 2021 Dave Koelle www.davekoelle.com/
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@TheJavaGuy
TheJavaGuy / sp500_40yrs_1474peryear.txt
Created March 20, 2022 18:52
What if you have invested $1474 per year for 40 years in S&P 500?
AVG = 1036209.9228178628
MIN = 648236.6946178721
MAX = 1883831.0153112006
Median = 1000298.5276975499
Start 1926, End 1965, Sum 1212329.47
Start 1927, End 1966, Sum 1021426.21
Start 1928, End 1967, Sum 1190142.01
Start 1929, End 1968, Sum 1260362.72
Start 1930, End 1969, Sum 1114411.32
@TheJavaGuy
TheJavaGuy / sp500_40yrs_1200peryear.txt
Created March 20, 2022 18:50
What if you have invested $1200 per year for 40 years in S&P 500?
AVG = 843590.1678300105
MIN = 527736.7934473859
MAX = 1533648.0450294716
Median = 814354.2966330119
Start 1926, End 1965, Sum 986971.08
Start 1927, End 1966, Sum 831554.58
Start 1928, End 1967, Sum 968908.01
Start 1929, End 1968, Sum 1026075.49
Start 1930, End 1969, Sum 907254.80