This file contains 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 net.zeddev.util; | |
import java.lang.reflect.Field; | |
/** | |
* <p> | |
* A utility to assist in creating <code>hashCode()</code> implementations. | |
* Can simply be used like so; | |
* </p> | |
* |
This file contains 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 net.zeddev.util; | |
import java.lang.ref.SoftReference; | |
import java.lang.reflect.Array; | |
/** | |
* <p> | |
* A small, compact in-memory cache designed for high data throughput. | |
* The cache can be simply integrated with existing source using the following | |
* pattern; |
This file contains 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 net.zeddev.util; | |
import java.awt.Frame; | |
import java.io.File; | |
import javax.swing.JFileChooser; | |
import javax.swing.JOptionPane; | |
import java.util.logging.Logger; | |
/** | |
* <p> |
This file contains 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 net.zeddev.android.util; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.BlockingQueue; | |
import java.util.concurrent.LinkedBlockingDeque; | |
import android.util.Log; |
This file contains 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 net.zeddev.util; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* <p> | |
* A simple facility to support design-by-contract principles. | |
* Significantly smaller and simpler than other more heavy-weight frameworks | |
* (such as contract2j, OVal, etc) but provides better functionality over the |
This file contains 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 net.zeddev.util; | |
import java.lang.annotation.Annotation; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.logging.Level; |
This file contains 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 net.zeddev.util; | |
import java.util.concurrent.Semaphore; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import net.zeddev.util.AnnotatedLogger.LogName; | |
import static net.zeddev.util.Assertions.*; | |
/** | |
* <p> |
This file contains 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 | |
/** | |
* Converts to JSON, in a 'pretty', human readable format (yet still | |
* valid JSON). | |
* | |
* This code was modified from this GitHub | |
* <a href="https://gist.github.com/GloryFish/1045396">Gist</a>. | |
* | |
* @param string $json The JSON code to prettify. |
This file contains 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
/** jQuery plugin to preload images */ | |
$.fn.preload = function() { | |
this.each(function(){ | |
$('<img/>')[0].src = this; | |
}); | |
} | |
// use like so: | |
$(['img/pic1.jpg', 'img/pic2.jpg', ...]).preload(); |
This file contains 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 | |
namespace \net\zeddev\util; | |
/** An error while uploading. */ | |
class UploaderException extends \Exception { } | |
/** An invalid type for uploaded file. */ | |
class UploaderTypeException extends UploaderException { } |
OlderNewer