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 stackoverflow; | |
| public class Hexdump { | |
| public static void main(String[] args) { | |
| // This is mocked. Get the actual filename | |
| String filename = "Qwertypsadfksadf"; | |
| // Log the hexdump | |
| System.out.println(hexdump(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
| <html> | |
| <head> | |
| <script src="jquery-2.0.3.min.js"></script> | |
| <script src="underscore-min.js"></script> | |
| <script src="mustache.js"></script> | |
| <script> | |
| $(function(){ | |
| $('.btn').click(function(e) { | |
| var user = $.parseJSON( _.unescape( $(this).next().text() ) ); |
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 ArtifactsWhenUsingDialogFont { | |
| public static void main(String... args) throws Exception { | |
| PrinterJob job = PrinterJob.getPrinterJob(); | |
| job.setPrintService(PrintServiceLookup.lookupDefaultPrintService()); | |
| job.setPrintable(new Printable(){ | |
| @Override | |
| public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { | |
| graphics.translate( (int) pageFormat.getImageableX(), (int) pageFormat.getImageableY() ); |
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
| RewriteEngine On | |
| RewriteRule index.php index.php [END] | |
| RewriteRule (.*) index.php?request=$1 [END] |
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 stackoverflow; | |
| import java.util.ArrayList; | |
| import java.util.Calendar; | |
| import java.util.Date; | |
| import java.util.List; | |
| public class PlotBandCalculator { | |
| private int hourStart, lengthInHours; |
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 stackoverflow; | |
| public interface Acceptable { | |
| boolean accept(); | |
| } |
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 stackoverflow; | |
| import java.io.UnsupportedEncodingException; | |
| import java.nio.charset.Charset; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; |
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 app; | |
| import org.joox.JOOX; | |
| import org.w3c.dom.Document; | |
| import org.w3c.dom.Element; | |
| import javax.xml.transform.*; | |
| import javax.xml.transform.dom.DOMSource; | |
| import javax.xml.transform.stream.StreamResult; |
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
| #!/usr/bin/env python | |
| # Usage add_to_whitelist.py $FILENAME $USERNAME | |
| import sys | |
| def eval_line(line): | |
| if line.startswith('#'): | |
| return line | |
| if '=' in line: | |
| key, val = line.split('=') | |
| if key == 'app.store.access.list': |
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 stackoverflow; | |
| import sun.org.mozilla.javascript.internal.Context; | |
| import javax.script.ScriptEngine; | |
| import javax.script.ScriptEngineManager; | |
| import java.util.Date; | |
| /* | |
| * See question at http://stackoverflow.com/q/30185079/315306 |