This file contains hidden or 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
public class ImageKey { | |
private final String fileName; | |
public ImageKey(String fileName) { | |
this.fileName = fileName; | |
} | |
@Override | |
public String toString() { | |
return fileName; |
This file contains hidden or 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 java.util.Map; | |
import java.util.WeakHashMap; | |
public class JavaWeakHashMapExample { | |
private static final Map<ImageKey, String> imageCache = new WeakHashMap<>(); | |
public static void main(String[] args) { | |
ImageKey firstImageKey = new ImageKey("firstImage.jpg"); | |
ImageKey secondImageKey = new ImageKey("secondImage.jpg"); |
This file contains hidden or 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
WeakReference<String> weakReference = new WeakReference<>(new String("This is a Weak Reference!")); |
This file contains hidden or 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
SoftReference<String> softReference = new SoftReference<>(new String("This is a Soft Reference!")); |
This file contains hidden or 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
String strongReference = new String("This is a Strong Reference!"); |
This file contains hidden or 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 sympy import symbols, integrate | |
print(f"The Fact: Software Engineering = {integrate(1, (symbols('x'), 0, 1))}") |
This file contains hidden or 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
source ~/.zshrc |
This file contains hidden or 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
# alias definitions. add aliaes into ~/.bash_aliases file. | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi |
This file contains hidden or 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
source ~/.bash_aliases |
This file contains hidden or 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
# alias definitions | |
# MyGitHub Short Cuts | |
alias my-github='cd /Volumes/MyGitHub' | |
alias community-workspace='cd /Volumes/MyGitHub/community-workspace' | |
alias java-examples='cd /Volumes/MyGitHub/java-examples' | |
alias qr-code-generator-backend='cd /Volumes/MyGitHub/qr-code-generator-workspace/qr-code-generator-backend' | |
alias qr-code-generator-frontend='cd /Volumes/MyGitHub/qr-code-generator-workspace/qr-code-generator-web-frontend' | |
alias spring-boot-project='cd /Volumes/MyGitHub/spring-boot-project-example' |
NewerOlder