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 boolean sendMail(String to, String from, String subject, String text, String host, String port, String user, String password) throws MessagingException { | |
| Properties props = new Properties(); | |
| props.put("mail.smtps.host", host); | |
| props.put("mail.smtps.port", port); | |
| props.put("mail.smtps.user", user); | |
| props.put("mail.smtps.password", password); | |
| return sendMail(to, from, subject, text, props); | |
| } |
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
| private static Set<String> adminNeeded = Collections.synchronizedSet(new HashSet<String>()); | |
| ... | |
| StringBuilder sb = new StringBuilder(); | |
| for (StackTraceElement ste : Thread.currentThread().getStackTrace()) { | |
| String className = ste.getClassName(); | |
| if (className.startsWith("javax.servlet.http.HttpServlet")) break; | |
| if (className.startsWith("java.lang.Thread") | |
| || !className.startsWith("bagcheck") | |
| || className.startsWith("bagcheck.services.Util")) continue; |
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
| KeyValue[] raw = result.raw(); | |
| for (KeyValue kv : raw) { | |
| byte[] value = kv.getValue(); | |
| switch(kv.getBuffer()[kv.getQualifierOffset()]) { | |
| case DATA_COLUMN_BYTE: | |
| dataBytes = value; | |
| break; | |
| case VERSION_COLUMN_BYTE: | |
| versionBytes = value; | |
| break; |
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
| KeyValue[] raw = result.raw(); | |
| for (KeyValue kv : raw) { | |
| byte[] buffer = kv.getBuffer(); | |
| int offset = kv.getValueOffset(); | |
| int length = kv.getValueLength(); | |
| switch(buffer[kv.getQualifierOffset()]) { | |
| case DATA_COLUMN_BYTE: | |
| value = readValue(buffer, schema, format, offset, length); | |
| break; | |
| case VERSION_COLUMN_BYTE: |
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 com.javarants.instanttalk; | |
| import com.sun.jersey.spi.container.servlet.ServletContainer; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.server.handler.ContextHandlerCollection; | |
| import org.eclipse.jetty.servlet.ServletContextHandler; | |
| import org.eclipse.jetty.servlet.ServletHolder; | |
| import javax.ws.rs.GET; | |
| import javax.ws.rs.Path; |
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
| <plugin> | |
| <artifactId>maven-assembly-plugin</artifactId> | |
| <configuration> | |
| <descriptorRefs> | |
| <descriptorRef>jar-with-dependencies</descriptorRef> | |
| </descriptorRefs> | |
| <archive> | |
| <manifest> | |
| <mainClass>bagcheck.cli.BagCheckCLI</mainClass> |
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 preloadagent; | |
| /** | |
| Copyright 2010 Sam Pullara | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
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
| /** | |
| * Create a modal dialog box. | |
| */ | |
| ; | |
| (function($) { | |
| $.fn.makeDialog = function () { | |
| return this.each(function() { | |
| var $dialog = $(this); | |
| $dialog.hide().draggable().css('z-index', 3).bind('dlg-launch', null, function() { | |
| var win = $(window); |
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 bagcheck.scraper; | |
| import com.google.inject.Inject; | |
| import com.google.inject.Singleton; | |
| import org.w3c.dom.Document; | |
| import org.w3c.tidy.Tidy; | |
| import org.w3c.tidy.TidyUtils; | |
| import org.xml.sax.InputSource; | |
| import org.xml.sax.SAXException; |
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
| var $javarants = jQuery.noConflict(true); | |
| $javarants(document).ready(function($) { | |
| function replacetext(node) { | |
| if (node.nodeType == 3 && node.parentNode.nodeName != "SCRIPT") { | |
| var wordlist = [ | |
| "d***", "s***", "f***", "f***", "a***", "a***", "f***", | |
| "f***", "h***", "d***", "c***", "f***", "g***", "g***", "s***", | |
| "c***", "c***", "s***" | |
| ]; | |
| if (node.nodeValue.replace(/\s/g, '') == "") { |