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
sumElement([], 0). | |
sumElement([Head|Tail], Max):- sumElement(Tail, Temp), Max is Temp + Head. | |
deleteElement(Element, [Head|Tail], Tail). | |
deleteElement(Element, [Head|Tail], [Head|Neu]):- deleteElement(Element, Tail, Neu). | |
sumLst(X, Y, S):- S is X +Y. | |
maxE(X, Y, Max):- X > Y, Max is X. | |
maxE(X, Y, Max):- Y > X, Max is Y. |
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: http://tex.stackexchange.com/a/11125 | |
# .pdf and .synctex.gz will still keep in that folder | |
# *nix based LaTeX installations | |
pdflatex -output-directory=folder <file> | |
# windows based LaTeX installations | |
pdflatex --aux-directory=folder <file> |
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
long freeSpace = 0; | |
long totalSpace = 0; | |
try { | |
FileStore fileStore = Files.getFileStore(Paths.get(".")); | |
freeSpace = fileStore.getUsableSpace(); | |
totalSpace = fileStore.getUsableSpace(); | |
} catch (IOException ioEx) { | |
Logger.getGlobal().log(Level.WARNING, "Cannot calculate free/total disk space", ioEx); | |
} |
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
*.aux | |
*.bbl | |
*.blg | |
*.log | |
*.out | |
*.toc | |
*.idx | |
*.dvi | |
*.lof |
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
<h3>Changelog for VERSION</h3> | |
<h6><span style="color: #008000;"><strong>Added</strong></span></h6> | |
<ul> | |
<li>stuff</li> | |
</ul> | |
<h6><strong><span style="color: #ff9900;">Changed/Fixed</span></strong></h6> | |
<ul> | |
<li>stuff</li> |
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
<?php | |
define ('SPEED_OF_LIGHT', 299792458); // in m/s | |
define ('CIRCUMFERENCE_OF_EARTH', 40075000); // in m | |
$cachefile = 'cached_locations'; | |
// If the cache file exists and it is younger than 12 hrs and 'flush' get var is is not set ... | |
if (file_exists($cachefile)) { | |
if (time() - filectime($cachefile) < 12 * 3600 && !isset($_GET['flush'])) { |
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
# -r recursive | |
# -nH don't create host directories. | |
# -nd don't create directories. | |
# -e robots=off | |
wget --no-parent -nH -r -e robots=off TARGET |
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
# apt | |
sudo apt update | |
sudo apt upgrade | |
sudo apt dist-upgrade | |
# pacman | |
pacman -Syu | |
# zypper | |
zypper refresh |
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
:A | |
@ECHO OFF | |
java -Xmx3G -server -Xdebug -XX:+UnlockDiagnosticVMOptions -Xrunjdwp:transport=dt_socket,address=1000,server=y,suspend=n -jar paperclip.jar | |
pause | |
goto A: |
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
while true; | |
do | |
java -Xmx3G -server -Xdebug -XX:+UnlockDiagnosticVMOptions -Xrunjdwp:transport=dt_socket,address=1000,server=y,suspend=n -jar paperclip.jar | |
read -rsp $'Press any key to continue...\n' -n 1 key | |
done |