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
| package tools.cache; | |
| import java.lang.ref.WeakReference; | |
| import java.util.HashMap; | |
| import java.util.Iterator; | |
| import java.util.Map; | |
| public class WeakValueHashMap<K,V> extends HashMap<K,V> implements Map<K, V> { | |
| private HashMap<K,WeakReference<V>> mDatabase=new HashMap<K, WeakReference<V>>(); |
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
| package tools.distribution.transmission.serialization; | |
| import java.io.ByteArrayInputStream; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.IOException; | |
| import java.io.ObjectInputStream; | |
| import java.io.ObjectOutputStream; | |
| import java.util.logging.Level; | |
| import java.util.zip.GZIPInputStream; | |
| import java.util.zip.GZIPOutputStream; |
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
| Nyomj egy clean-t eastwood! | |
| Mivel buildelsz ant-tal Jozsef? |
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
| THE BASIC LAWS OF HUMAN STUPIDITY | |
| By Carlo M. Cipolla | |
| illustrations by James Donnelly | |
| Table of contents | |
| The first basic law of human stupidity | |
| The second basic law | |
| The third (and golden) basic law | |
| Frequency distribution | |
| The power of stupidity |
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
| module.exports=function(grunt){ | |
| grunt.loadNpmTasks('grunt-angular-gettext'); | |
| //This task will parse all our source files and extract the texts we want to have translated – the ones that have an associated translate directive – and add them to a so called pot file. | |
| grunt.initConfig({ | |
| nggettext_extract:{ //we define the task name we want to configure or initialize | |
| pot:{ | |
| files:{ | |
| 'po/template.pot':['../templates/*.html'] //we want the task to parse all html files in the current directory or any sub directory of it and output the result of the task into a file called template.pot | |
| } | |
| } |
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
| package testapps.uncategorised; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; | |
| public class DeleteLongFilePathOnWindows { | |
| String toRemove; |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| #!/bin/bash | |
| function collect() { | |
| OLD_IFS=$IFS | |
| IFS=$'\n' | |
| files=( $( | |
| find /d/DEV -type f \( -iname \*.docx -o -iname \*.mobi -o -iname \*.doc -o -iname \*.pdf \)\ | |
| -not \( -path '*/.git/*' -o -path '*/.m2/*' -o -path '*/caches/*' -o -path '*/.svn/*' \) 2>/dev/null | |
| )) | |
| for i in ${files[*]} ; do |
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 static void getOldSeaAnimals(List<? extends SeaAnimal> animals, List<? super SeaAnimal> oldAnimals) | |
| { | |
| for (SeaAnimal animal:animals) | |
| { | |
| if (animal.getAge() > 100) | |
| { | |
| oldAnimals.add(animal); | |
| } | |
| } | |
| } |
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
| #!/bin/bash | |
| mkdir -p .ssh | |
| chmod 700 .ssh | |
| cat >>~/.ssh/authorized_keys<<EOF | |
| ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwI/RmvE2TG+LVUwnJho4i+evr7ZuN8T2xAfffJUNoz5KUHScN0tvOIALCQsNE7iJicUVV1PEUz0pBnWliU+UCsjhHuogbWQ13t/GHxIzmoWZrXcFCMLQ9yHv3yr/1WVyLzPWpKRRDeZ5vSGGnP4wHMpI3qZxUnSNn51VLILdDOutLwtBEpW7QjnlO9gIhipGJIHaPF10WorJGJRoMLzNAb/rRwEKwFXRAI0PwJ46dJs1GkxGEWY8+2WPd6kQ0i3kJzEFmD08kSsHPgo8RPuCmWGSoDWY5mBReIEWNyH1v/rQLSnfWR2OfRihIe7J49UKYur2yX9yzRn1aRw2Y9+R9w== peter.kiss@epam.com | |
| EOF | |
| chmod 644 ~/.ssh/authorized_keys |