text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W29741_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">GAS CAPTURE PLAN AFFIDAVIT

    <p class="styleSans1.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">STATE OF TEXAS

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">COUNTY OF HARRIS

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Robert Eason, being duly sworn, states as follows:

    <p class="styleSans13.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">1. He is employed by Oasis Petroleum North America LLC ("Oasis") as Marketing
Manager, is over the age of 21 and has personal knowledge of the matters set forth in this affidavit.

    <p class="styleSans13.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">2. This affidavit is submitted in conjunction with the Application for Permit to Drill for the State 5792 41-15 8T well, with a surface location in the SW SW of Section 15, Township 157 North, Range 92 West, Mountrail County, North Dakota (the "Well").

    <p class="styleSans13.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">3. Oasis currently anticipates that gas to be produced from the Well will be gathered by Bison Midstream LLC (the "Gathering Company"). Oasis has advised the Gathering Company of its intent to drill the Well and has advised the Gathering Company that it
currently anticipates that the Well will be completed in Q1 2015, with an initial gas production rate of approximately 347 mcf/day.

    <p class="styleSans3.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">cm 2a..

Robert H. Eason Marketing Manager

    <p class="styleSans16.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Subscribed and sworn to before me this '7 day «$414082

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">.2014.

    <p class="styleSans1.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans52.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">,, ARMANDNA BARRON ": N01on Public. 810's of Iexos
My Commlsslon Explres June 05. 2018

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">('0':

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans24.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Qchg~¢;::
Notary Public in and for the State of Texas My Commission expires:  5 - I 8"


text:
#ifndef REFS_H
#define REFS_H

struct ref_lock {
	char *ref_name;
	char *orig_ref_name;
	struct lock_file *lk;
	unsigned char old_sha1[20];
	int lock_fd;
	int force_write;
};

struct ref_transaction;

/*
 * Bit values set in the flags argument passed to each_ref_fn():
 */

/* Reference is a symbolic reference. */
#define REF_ISSYMREF 0x01

/* Reference is a packed reference. */
#define REF_ISPACKED 0x02

/*
 * Reference cannot be resolved to an object name: dangling symbolic
 * reference (directly or indirectly), corrupt reference file, or
 * symbolic reference refers to ill-formatted reference name.
 */
#define REF_ISBROKEN 0x04

/*
 * The signature for the callback function for the for_each_*()
 * functions below.  The memory pointed to by the refname and sha1
 * arguments is only guaranteed to be valid for the duration of a
 * single callback invocation.
 */
typedef int each_ref_fn(const char *refname,
			const unsigned char *sha1, int flags, void *cb_data);

/*
 * The following functions invoke the specified callback function for
 * each reference indicated.  If the function ever returns a nonzero
 * value, stop the iteration and return that value.  Please note that
 * it is not safe to modify references while an iteration is in
 * progress, unless the same callback function invocation that
 * modifies the reference also returns a nonzero value to immediately
 * stop the iteration.
 */
extern int head_ref(each_ref_fn, void *);
extern int for_each_ref(each_ref_fn, void *);
extern int for_each_ref_in(const char *, each_ref_fn, void *);
extern int for_each_tag_ref(each_ref_fn, void *);
extern int for_each_branch_ref(each_ref_fn, void *);
extern int for_each_remote_ref(each_ref_fn, void *);
extern int for_each_replace_ref(each_ref_fn, void *);
extern int for_each_glob_ref(each_ref_fn, const char *pattern, void *);
extern int for_each_glob_ref_in(each_ref_fn, const char *pattern, const char* prefix, void *);

extern int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
extern int for_each_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
extern int for_each_ref_in_submodule(const char *submodule, const char *prefix,
		each_ref_fn fn, void *cb_data);
extern int for_each_tag_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
extern int for_each_branch_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);
extern int for_each_remote_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data);

extern int head_ref_namespaced(each_ref_fn fn, void *cb_data);
extern int for_each_namespaced_ref(each_ref_fn fn, void *cb_data);

static inline const char *has_glob_specials(const char *pattern)
{
	return strpbrk(pattern, "?*[");
}

/* can be used to learn about broken ref and symref */
extern int for_each_rawref(each_ref_fn, void *);

extern void warn_dangling_symref(FILE *fp, const char *msg_fmt, const char *refname);
extern void warn_dangling_symrefs(FILE *fp, const char *msg_fmt, const struct string_list* refnames);

/*
 * Lock the packed-refs file for writing.  Flags is passed to
 * hold_lock_file_for_update().  Return 0 on success.
 * Errno is set to something meaningful on error.
 */
extern int lock_packed_refs(int flags);

/*
 * Add a reference to the in-memory packed reference cache.  This may
 * only be called while the packed-refs file is locked (see
 * lock_packed_refs()).  To actually write the packed-refs file, call
 * commit_packed_refs().
 */
extern void add_packed_ref(const char *refname, const unsigned char *sha1);

/*
 * Write the current version of the packed refs cache from memory to
 * disk.  The packed-refs file must already be locked for writing (see
 * lock_packed_refs()).  Return zero on success.
 * Sets errno to something meaningful on error.
 */
extern int commit_packed_refs(void);

/*
 * Rollback the lockfile for the packed-refs file, and discard the
 * in-memory packed reference cache.  (The packed-refs file will be
 * read anew if it is needed again after this function is called.)
 */
extern void rollback_packed_refs(void);

/*
 * Flags for controlling behaviour of pack_refs()
 * PACK_REFS_PRUNE: Prune loose refs after packing
 * PACK_REFS_ALL:   Pack _all_ refs, not just tags and already packed refs
 */
#define PACK_REFS_PRUNE 0x0001
#define PACK_REFS_ALL   0x0002

/*
 * Write a packed-refs file for the current repository.
 * flags: Combination of the above PACK_REFS_* flags.
 */
int pack_refs(unsigned int flags);

extern int repack_without_refs(const char **refnames, int n,
			       struct strbuf *err);

extern int ref_exists(const char *);

extern int is_branch(const char *refname);

/*
 * If refname is a non-symbolic reference that refers to a tag object,
 * and the tag can be (recursively) dereferenced to a non-tag object,
 * store the SHA1 of the referred-to object to sha1 and return 0.  If
 * any of these conditions are not met, return a non-zero value.
 * Symbolic references are considered unpeelable, even if they
 * ultimately resolve to a peelable tag.
 */
extern int peel_ref(const char *refname, unsigned char *sha1);

/*
 * Locks a "refs/" ref returning the lock on success and NULL on failure.
 * On failure errno is set to something meaningful.
 */
extern struct ref_lock *lock_ref_sha1(const char *refname, const unsigned char *old_sha1);

/** Locks any ref (for 'HEAD' type refs). */
#define REF_NODEREF	0x01
/* errno is set to something meaningful on failure */
extern struct ref_lock *lock_any_ref_for_update(const char *refname,
						const unsigned char *old_sha1,
						int flags, int *type_p);

/** Close the file descriptor owned by a lock and return the status */
extern int close_ref(struct ref_lock *lock);

/** Close and commit the ref locked by the lock */
extern int commit_ref(struct ref_lock *lock);

/** Release any lock taken but not written. **/
extern void unlock_ref(struct ref_lock *lock);

/** Writes sha1 into the ref specified by the lock. **/
extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg);

/*
 * Setup reflog before using. Set errno to something meaningful on failure.
 */
int log_ref_setup(const char *refname, char *logfile, int bufsize);

/** Reads log for the value of ref during at_time. **/
extern int read_ref_at(const char *refname, unsigned long at_time, int cnt,
		       unsigned char *sha1, char **msg,
		       unsigned long *cutoff_time, int *cutoff_tz, int *cutoff_cnt);

/** Check if a particular reflog exists */
extern int reflog_exists(const char *refname);

/** Delete a reflog */
extern int delete_reflog(const char *refname);

/* iterate over reflog entries */
typedef int each_reflog_ent_fn(unsigned char *osha1, unsigned char *nsha1, const char *, unsigned long, int, const char *, void *);
int for_each_reflog_ent(const char *refname, each_reflog_ent_fn fn, void *cb_data);
int for_each_reflog_ent_reverse(const char *refname, each_reflog_ent_fn fn, void *cb_data);

/*
 * Calls the specified function for each reflog file until it returns nonzero,
 * and returns the value
 */
extern int for_each_reflog(each_ref_fn, void *);

#define REFNAME_ALLOW_ONELEVEL 1
#define REFNAME_REFSPEC_PATTERN 2
#define REFNAME_DOT_COMPONENT 4

/*
 * Return 0 iff refname has the correct format for a refname according
 * to the rules described in Documentation/git-check-ref-format.txt.
 * If REFNAME_ALLOW_ONELEVEL is set in flags, then accept one-level
 * reference names.  If REFNAME_REFSPEC_PATTERN is set in flags, then
 * allow a "*" wildcard character in place of one of the name
 * components.  No leading or repeated slashes are accepted.  If
 * REFNAME_DOT_COMPONENT is set in flags, then allow refname
 * components to start with "." (but not a whole component equal to
 * "." or "..").
 */
extern int check_refname_format(const char *refname, int flags);

extern const char *prettify_refname(const char *refname);
extern char *shorten_unambiguous_ref(const char *refname, int strict);

/** rename ref, return 0 on success **/
extern int rename_ref(const char *oldref, const char *newref, const char *logmsg);

/**
 * Resolve refname in the nested "gitlink" repository that is located
 * at path.  If the resolution is successful, return 0 and set sha1 to
 * the name of the object; otherwise, return a non-zero value.
 */
extern int resolve_gitlink_ref(const char *path, const char *refname, unsigned char *sha1);

enum action_on_err {
	UPDATE_REFS_MSG_ON_ERR,
	UPDATE_REFS_DIE_ON_ERR,
	UPDATE_REFS_QUIET_ON_ERR
};

/*
 * Begin a reference transaction.  The reference transaction must
 * be freed by calling ref_transaction_free().
 */
struct ref_transaction *ref_transaction_begin(void);

/*
 * The following functions add a reference check or update to a
 * ref_transaction.  In all of them, refname is the name of the
 * reference to be affected.  The functions make internal copies of
 * refname, so the caller retains ownership of the parameter.  flags
 * can be REF_NODEREF; it is passed to update_ref_lock().
 */

/*
 * Add a reference update to transaction.  new_sha1 is the value that
 * the reference should have after the update, or zeros if it should
 * be deleted.  If have_old is true, then old_sha1 holds the value
 * that the reference should have had before the update, or zeros if
 * it must not have existed beforehand.
 * Function returns 0 on success and non-zero on failure. A failure to update
 * means that the transaction as a whole has failed and will need to be
 * rolled back. On failure the err buffer will be updated.
 */
int ref_transaction_update(struct ref_transaction *transaction,
			   const char *refname,
			   const unsigned char *new_sha1,
			   const unsigned char *old_sha1,
			   int flags, int have_old,
			   struct strbuf *err);

/*
 * Add a reference creation to transaction.  new_sha1 is the value
 * that the reference should have after the update; it must not be the
 * null SHA-1.  It is verified that the reference does not exist
 * already.
 */
void ref_transaction_create(struct ref_transaction *transaction,
			    const char *refname,
			    const unsigned char *new_sha1,
			    int flags);

/*
 * Add a reference deletion to transaction.  If have_old is true, then
 * old_sha1 holds the value that the reference should have had before
 * the update (which must not be the null SHA-1).
 */
void ref_transaction_delete(struct ref_transaction *transaction,
			    const char *refname,
			    const unsigned char *old_sha1,
			    int flags, int have_old);

/*
 * Commit all of the changes that have been queued in transaction, as
 * atomically as possible.  Return a nonzero value if there is a
 * problem.
 * If err is non-NULL we will add an error string to it to explain why
 * the transaction failed. The string does not end in newline.
 */
int ref_transaction_commit(struct ref_transaction *transaction,
			   const char *msg, struct strbuf *err);

/*
 * Free an existing transaction and all associated data.
 */
void ref_transaction_free(struct ref_transaction *transaction);

/** Lock a ref and then write its file */
int update_ref(const char *action, const char *refname,
		const unsigned char *sha1, const unsigned char *oldval,
		int flags, enum action_on_err onerr);

extern int parse_hide_refs_config(const char *var, const char *value, const char *);
extern int ref_is_hidden(const char *);

#endif /* REFS_H */

redpajama_set_name: RedPajamaGithub


text:
package com.iluwatar.doubledispatch.dispatch2;

import com.iluwatar.doubledispatch.dispatch1.AbsGameObject;
import com.iluwatar.doubledispatch.dispatch1.Meteoroid;

/**
 *
 * Flaming asteroid game object
 *
 */
public class FlamingAsteroid extends Meteoroid {

	public FlamingAsteroid(int left, int top, int right, int bottom) {
		super(left, top, right, bottom);
		setOnFire(true);
	}

	@Override
	public void collision(AbsGameObject gameObject) {
		gameObject.collisionResolve(this);
	}
}


text:
return NOTESKIN:LoadActor("UpLeft","Hold Head")..{
	--InitCommand=cmd(rotationy,180);
	--BaseRotationY=180;
};


text:
package com.sequenceiq.it.cloudbreak.client;

import java.util.List;

import org.springframework.stereotype.Service;

import com.sequenceiq.common.api.type.AdjustmentType;
import com.sequenceiq.it.cloudbreak.CloudbreakClient;
import com.sequenceiq.it.cloudbreak.action.Action;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.CheckVariant;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXBlueprintRequestAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXChangeImageCatalogAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXCreateAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXCreateInternalAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXDeleteAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXForceDeleteAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXGetAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXInternalGetAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXOSUpgradeByUpgradeSetsAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXRefreshAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXRemoveInstancesAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXRepairAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXRepairInstancesAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXRotateSaltPasswordAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXScaleAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXScaleStartInstancesAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXScaleStopInstancesAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXShowBlueprintAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXStartAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXStopAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXUpgradeAction;
import com.sequenceiq.it.cloudbreak.action.v1.distrox.DistroXVerticalScaleAction;
import com.sequenceiq.it.cloudbreak.action.v4.util.RenewDistroXCertificateAction;
import com.sequenceiq.it.cloudbreak.cloud.HostGroupType;
import com.sequenceiq.it.cloudbreak.dto.distrox.DistroXTestDto;
import com.sequenceiq.it.cloudbreak.dto.distrox.image.DistroXChangeImageCatalogTestDto;
import com.sequenceiq.it.cloudbreak.dto.util.RenewDistroXCertificateTestDto;

@Service
public class DistroXTestClient {

    public Action<DistroXTestDto, CloudbreakClient> create() {
        return new DistroXCreateAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> createInternal() {
        return new DistroXCreateInternalAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> delete() {
        return new DistroXDeleteAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> forceDelete() {
        return new DistroXForceDeleteAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> blueprintRequest() {
        return new DistroXBlueprintRequestAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> get() {
        return new DistroXGetAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> refresh() {
        return new DistroXRefreshAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> getInternal() {
        return new DistroXInternalGetAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> stop() {
        return new DistroXStopAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> start() {
        return new DistroXStartAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> scale(String hostGroup, Integer count) {
        return new DistroXScaleAction(hostGroup, count, AdjustmentType.EXACT, null);
    }

    public Action<DistroXTestDto, CloudbreakClient> scale(String hostGroup, Integer count, AdjustmentType adjustmentType, Long threshold) {
        return new DistroXScaleAction(hostGroup, count, adjustmentType, threshold);
    }

    public Action<DistroXTestDto, CloudbreakClient> scaleStopInstances() {
        return new DistroXScaleStopInstancesAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> scaleStartInstances(String hostGroup, Integer count) {
        return new DistroXScaleStartInstancesAction(hostGroup, count);
    }

    public Action<DistroXTestDto, CloudbreakClient> postStackForBlueprint() {
        return new DistroXShowBlueprintAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> removeInstances() {
        return new DistroXRemoveInstancesAction();
    }

    public Action<RenewDistroXCertificateTestDto, CloudbreakClient> renewDistroXCertificateV4() {
        return new RenewDistroXCertificateAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> repair(HostGroupType... hostGroupTypes) {
        return new DistroXRepairAction(List.of(hostGroupTypes));
    }

    public Action<DistroXTestDto, CloudbreakClient> repairInstances() {
        return new DistroXRepairInstancesAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> upgrade() {
        return new DistroXUpgradeAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> osUpgradeByUpgradeSets() {
        return new DistroXOSUpgradeByUpgradeSetsAction();
    }

    public Action<DistroXChangeImageCatalogTestDto, CloudbreakClient> changeImageCatalog() {
        return new DistroXChangeImageCatalogAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> checkVariant(String variant) {
        return new CheckVariant(variant);
    }

    public Action<DistroXTestDto, CloudbreakClient> rotateSaltPassword() {
        return new DistroXRotateSaltPasswordAction();
    }

    public Action<DistroXTestDto, CloudbreakClient> verticalScale(String verticalScaleKey) {
        return new DistroXVerticalScaleAction(verticalScaleKey);
    }
}


text:
package feliperrm.reversiandroid.Uteis;

import android.media.MediaPlayer;
import android.util.Log;

import feliperrm.reversiandroid.R;

/**
 * Created by Felipe on 06/09/2015.
 */
public class Application extends android.app.Application {

    String p1Name;
    String p2Name;
    final String p1NameKey="P1_NAME";
    final String p2NameKey="P2_NAME";
    final String p1ImageResKey="P1_RES";
    final String p2ImageResKey="P2_RES";
    final String p1ImagePathKey="P1_PATH";
    final String p2ImagePathKey="P2_PATH";
    final String p2ImageNumberKey="P2_IMG_NUM";
    final String p1ImageNumberKey="P1_IMG_NUM";
    final String clickSoundKey="SOUND_KEY";
    final String musicSoundKey="MUSIC_KEY";
    final String bgImageResKey="BG_RES";
    final String bgImagePathKey="BG_PATH";
    final String bgImageNumberKey="BG_IMG_NUM";
    final String boardSizeKey="SIZE_KEY";
    int p1ImageRes, p2ImageRes, bgImageRes;
    int p1ImageNum, p2ImageNum, bgImageNum;
    String p1ImagePath, p2ImagePath, bgImagePath;
    boolean clickSound;
    boolean music;
    MediaPlayer mp;
    int boardSize;

    @Override
    public void onCreate() {
        super.onCreate();
        /* Assim que iniciar o aplicativo, carrega os ultimos nomes definidos e seta eles */
        p1Name=Uteis.loadSharedPreference(getApplicationContext(),p1NameKey,"Player1");
        p2Name=Uteis.loadSharedPreference(getApplicationContext(), p2NameKey, "Player2");
        bgImageRes= Integer.parseInt(Uteis.loadSharedPreference(getApplicationContext(), bgImageResKey, String.valueOf(-1)));
        bgImagePath=Uteis.loadSharedPreference(getApplicationContext(), bgImagePathKey, null);
        bgImageNum= Integer.parseInt(Uteis.loadSharedPreference(getApplicationContext(), bgImageNumberKey, String.valueOf(0)));
        p1ImageRes= Integer.parseInt(Uteis.loadSharedPreference(getApplicationContext(), p1ImageResKey, String.valueOf(-1)));
        p2ImageRes= Integer.parseInt(Uteis.loadSharedPreference(getApplicationContext(), p2ImageResKey, String.valueOf(-1)));
        p1ImagePath=Uteis.loadSharedPreference(getApplicationContext(), p1ImagePathKey, null);
        p2ImagePath=Uteis.loadSharedPreference(getApplicationContext(), p2ImagePathKey, null);
        p1ImageNum= Integer.parseInt(Uteis.loadSharedPreference(getApplicationContext(), p1ImageNumberKey, String.valueOf(0)));
        p2ImageNum= Integer.parseInt(Uteis.loadSharedPreference(getApplicationContext(), p2ImageNumberKey, String.valueOf(1)));
        boardSize = Integer.parseInt(Uteis.loadSharedPreference(getApplicationContext(), boardSizeKey, String.valueOf(6)));
        music = Boolean.parseBoolean(Uteis.loadSharedPreference(getApplicationContext(), musicSoundKey, String.valueOf(true)));
        mp = MediaPlayer.create(getApplicationContext(), R.raw.music_bg);
        mp.setLooping(true);
        resumeMusic();
        clickSound = Boolean.parseBoolean(Uteis.loadSharedPreference(getApplicationContext(), clickSoundKey, String.valueOf(true)));
        Log.d("Image1Res", String.valueOf(p1ImageRes));
        Log.d("Image2Res", String.valueOf(p2ImageRes));
        if(p1ImageRes==-1 && p1ImagePath==null){
            p1ImageRes = R.drawable.white_piece;
        }
        if(p2ImageRes==-1 && p2ImagePath==null){
            p2ImageRes = R.drawable.black_piece;
        }
        if(bgImageRes==-1 && bgImagePath==null){
            bgImageRes = R.drawable.background;
        }

    }

    public int getBoardSize() {
        return boardSize;
    }

    public void setBoardSize(int boardSize) {
        this.boardSize = boardSize;
        Uteis.salvarSharedPreference(getApplicationContext(),boardSizeKey, String.valueOf(boardSize));
    }

    public String getBgImagePath() {
        return bgImagePath;
    }

    public void setBgImagePath(String bgImagePath) {
        Uteis.salvarSharedPreference(getApplicationContext(),bgImagePathKey, bgImagePath);
        Uteis.deleteSharedPreference(getApplicationContext(), bgImageResKey);
        this.bgImageRes = -1;
        this.bgImagePath = bgImagePath;
    }

    public int getBgImageNum() {
        return bgImageNum;
    }

    public void setBgImageNum(int bgImageNum) {
        this.bgImageNum = bgImageNum;
        Uteis.salvarSharedPreference(getApplicationContext(),bgImageNumberKey, String.valueOf(bgImageNum));

    }

    public int getBgImageRes() {
        return bgImageRes;
    }

    public void setBgImageRes(int bgImageRes) {
        Uteis.salvarSharedPreference(getApplicationContext(),bgImageResKey, String.valueOf(bgImageRes));
        Uteis.deleteSharedPreference(getApplicationContext(), bgImagePathKey);
        this.bgImagePath = null;
        this.bgImageRes = bgImageRes;
    }

    public void pauseMusic(){
        if(mp!=null){
            mp.pause();
        }
    }

    public void resumeMusic(){
        if(mp!=null && music){
            mp.start();
        }
    }

    public boolean isMusic() {
        return music;
    }

    public void setMusic(boolean music) {
        this.music = music;
        Uteis.salvarSharedPreference(getApplicationContext(),musicSoundKey, String.valueOf(music));
        if(music==false){
            mp.pause();
        }
        else{
            mp.start();
        }
    }

    public boolean isClickSound() {
        return clickSound;
    }

    public void setClickSound(boolean clickSound) {
        this.clickSound = clickSound;
        Uteis.salvarSharedPreference(getApplicationContext(),clickSoundKey, String.valueOf(clickSound));

    }

    public int getP1ImageNum() {
        return p1ImageNum;
    }

    public void setP1ImageNum(int p1ImageNum) {
        this.p1ImageNum = p1ImageNum;
        Uteis.salvarSharedPreference(getApplicationContext(),p1ImageNumberKey, String.valueOf(p1ImageNum));
    }

    public int getP2ImageNum() {
        return p2ImageNum;
    }

    public void setP2ImageNum(int p2ImageNum) {
        this.p2ImageNum = p2ImageNum;
        Uteis.salvarSharedPreference(getApplicationContext(),p2ImageNumberKey, String.valueOf(p2ImageNum));
    }

    public int getP1ImageRes() {
        return p1ImageRes;
    }

    public void setP1ImageRes(int p1ImageRes) {
        Uteis.salvarSharedPreference(getApplicationContext(),p1ImageResKey, String.valueOf(p1ImageRes));
        Uteis.deleteSharedPreference(getApplicationContext(), p1ImagePathKey);
        this.p1ImagePath = null;
        this.p1ImageRes = p1ImageRes;
    }

    public int getP2ImageRes() {
        return p2ImageRes;
    }

    public void setP2ImageRes(int p2ImageRes) {
        Uteis.salvarSharedPreference(getApplicationContext(),p2ImageResKey, String.valueOf(p2ImageRes));
        Uteis.deleteSharedPreference(getApplicationContext(), p2ImagePathKey);
        this.p2ImagePath = null;
        this.p2ImageRes = p2ImageRes;
    }

    public String getP1ImagePath() {
        return p1ImagePath;
    }

    public void setP1ImagePath(String p1ImagePath) {
        Uteis.salvarSharedPreference(getApplicationContext(),p1ImagePathKey,p1ImagePath);
        Uteis.deleteSharedPreference(getApplicationContext(), p1ImageResKey);
        this.p1ImageRes = -1;
        this.p1ImagePath = p1ImagePath;
    }

    public String getP2ImagePath() {
        return p2ImagePath;
    }

    public void setP2ImagePath(String p2ImagePath) {
        Uteis.salvarSharedPreference(getApplicationContext(),p2ImagePathKey,p2ImagePath);
        Uteis.deleteSharedPreference(getApplicationContext(),p2ImageResKey);
        this.p2ImageRes = -1;
        this.p2ImagePath = p2ImagePath;
    }

    public String getP1Name() {
        return p1Name;
    }

    public void setP1Name(String p1Name) {
        Uteis.salvarSharedPreference(getApplicationContext(),p1NameKey,p1Name);
        this.p1Name = p1Name;
    }

    public String getP2Name() {
        return p2Name;
    }

    public void setP2Name(String p2Name) {
        Uteis.salvarSharedPreference(getApplicationContext(),p2NameKey,p2Name);
        this.p2Name = p2Name;
    }

    public void clearP1Name(){
        Uteis.deleteSharedPreference(getApplicationContext(),p1NameKey);
        p1Name=Uteis.loadSharedPreference(getApplicationContext(),p1NameKey,"Player1");
    }

    public void clearP2Name(){
        Uteis.deleteSharedPreference(getApplicationContext(),p2NameKey);
        p2Name=Uteis.loadSharedPreference(getApplicationContext(),p2NameKey,"Player2");
    }
}


text:
package org.apache.commons.dbutils.wrappers;

import java.io.ByteArrayInputStream;
import java.io.CharArrayReader;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.net.MalformedURLException;
import java.net.URL;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;

import org.apache.commons.dbutils.BaseTestCase;
import org.apache.commons.dbutils.ProxyFactory;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

/**
 * Test cases for {@code SqlNullCheckedResultSet} class.
 */
public class SqlNullCheckedResultSetTest extends BaseTestCase {

    private SqlNullCheckedResultSet rs2 = null;

    /**
     * Sets up instance variables required by this test case.
     */
    @Override
    public void setUp() throws Exception {
        super.setUp();

        rs2 =
            new SqlNullCheckedResultSet(
                ProxyFactory.instance().createResultSet(
                    new SqlNullUncheckedMockResultSet()));

        rs = ProxyFactory.instance().createResultSet(rs2); // Override superclass field
    }

    /**
     * Tests the getAsciiStream implementation.
     */
    public void testGetAsciiStream() throws SQLException {

        assertNull(rs.getAsciiStream(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getAsciiStream("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final InputStream stream = new ByteArrayInputStream(new byte[0]);
        rs2.setNullAsciiStream(stream);
        assertNotNull(rs.getAsciiStream(1));
        assertEquals(stream, rs.getAsciiStream(1));
        assertNotNull(rs.getAsciiStream("column"));
        assertEquals(stream, rs.getAsciiStream("column"));

    }

    /**
     * Tests the getBigDecimal implementation.
     */
    public void testGetBigDecimal() throws SQLException {

        assertNull(rs.getBigDecimal(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getBigDecimal("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final BigDecimal bd = new BigDecimal(5.0);
        rs2.setNullBigDecimal(bd);
        assertNotNull(rs.getBigDecimal(1));
        assertEquals(bd, rs.getBigDecimal(1));
        assertNotNull(rs.getBigDecimal("column"));
        assertEquals(bd, rs.getBigDecimal("column"));

    }

    /**
     * Tests the getBinaryStream implementation.
     */
    public void testGetBinaryStream() throws SQLException {

        assertNull(rs.getBinaryStream(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getBinaryStream("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final InputStream stream = new ByteArrayInputStream(new byte[0]);
        rs2.setNullBinaryStream(stream);
        assertNotNull(rs.getBinaryStream(1));
        assertEquals(stream, rs.getBinaryStream(1));
        assertNotNull(rs.getBinaryStream("column"));
        assertEquals(stream, rs.getBinaryStream("column"));

    }

    /**
     * Tests the getBlob implementation.
     */
    public void testGetBlob() throws SQLException {

        assertNull(rs.getBlob(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getBlob("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final Blob blob = new SqlNullCheckedResultSetMockBlob();
        rs2.setNullBlob(blob);
        assertNotNull(rs.getBlob(1));
        assertEquals(blob, rs.getBlob(1));
        assertNotNull(rs.getBlob("column"));
        assertEquals(blob, rs.getBlob("column"));

    }

    /**
     * Tests the getBoolean implementation.
     */
    public void testGetBoolean() throws SQLException {

        assertEquals(false, rs.getBoolean(1));
        assertTrue(rs.wasNull());
        assertEquals(false, rs.getBoolean("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        rs2.setNullBoolean(true);
        assertEquals(true, rs.getBoolean(1));
        assertEquals(true, rs.getBoolean("column"));

    }

    /**
     * Tests the getByte implementation.
     */
    public void testGetByte() throws SQLException {

        assertEquals((byte) 0, rs.getByte(1));
        assertTrue(rs.wasNull());
        assertEquals((byte) 0, rs.getByte("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final byte b = (byte) 10;
        rs2.setNullByte(b);
        assertEquals(b, rs.getByte(1));
        assertEquals(b, rs.getByte("column"));

    }

    /**
     * Tests the getByte implementation.
     */
    public void testGetBytes() throws SQLException {

        assertNull(rs.getBytes(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getBytes("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final byte[] b = new byte[5];
        for (int i = 0; i < 5; i++) {
            b[0] = (byte) i;
        }
        rs2.setNullBytes(b);
        assertNotNull(rs.getBytes(1));
        assertArrayEquals(b, rs.getBytes(1));
        assertNotNull(rs.getBytes("column"));
        assertArrayEquals(b, rs.getBytes("column"));

    }

    private static void assertArrayEquals(final byte[] expected, final byte[] actual) {
        if (expected == actual) {
            return;
        }
        if (expected.length != actual.length) {
            failNotEquals(null, Arrays.toString(expected), Arrays.toString(actual));
        }
        for (int i = 0; i < expected.length; i++) {
            final byte expectedItem = expected[i];
            final byte actualItem = actual[i];
            assertEquals("Array not equal at index " + i, expectedItem, actualItem);
        }
    }

    /**
     * Tests the getCharacterStream implementation.
     */
    public void testGetCharacterStream() throws SQLException {

        assertNull(rs.getCharacterStream(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getCharacterStream("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final Reader reader = new CharArrayReader("this is a string".toCharArray());
        rs2.setNullCharacterStream(reader);
        assertNotNull(rs.getCharacterStream(1));
        assertEquals(reader, rs.getCharacterStream(1));
        assertNotNull(rs.getCharacterStream("column"));
        assertEquals(reader, rs.getCharacterStream("column"));

    }

    /**
     * Tests the getClob implementation.
     */
    public void testGetClob() throws SQLException {

        assertNull(rs.getClob(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getClob("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final Clob clob = new SqlNullCheckedResultSetMockClob();
        rs2.setNullClob(clob);
        assertNotNull(rs.getClob(1));
        assertEquals(clob, rs.getClob(1));
        assertNotNull(rs.getClob("column"));
        assertEquals(clob, rs.getClob("column"));

    }

    /**
     * Tests the getDate implementation.
     */
    public void testGetDate() throws SQLException {

        assertNull(rs.getDate(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getDate("column"));
        assertTrue(rs.wasNull());
        assertNull(rs.getDate(1, Calendar.getInstance()));
        assertTrue(rs.wasNull());
        assertNull(rs.getDate("column", Calendar.getInstance()));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final java.sql.Date date = new java.sql.Date(new java.util.Date().getTime());
        rs2.setNullDate(date);
        assertNotNull(rs.getDate(1));
        assertEquals(date, rs.getDate(1));
        assertNotNull(rs.getDate("column"));
        assertEquals(date, rs.getDate("column"));
        assertNotNull(rs.getDate(1, Calendar.getInstance()));
        assertEquals(date, rs.getDate(1, Calendar.getInstance()));
        assertNotNull(rs.getDate("column", Calendar.getInstance()));
        assertEquals(date, rs.getDate("column", Calendar.getInstance()));

    }

    /**
     * Tests the getDouble implementation.
     */
    public void testGetDouble() throws SQLException {

        assertEquals(0.0, rs.getDouble(1), 0.0);
        assertTrue(rs.wasNull());
        assertEquals(0.0, rs.getDouble("column"), 0.0);
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final double d = 10.0;
        rs2.setNullDouble(d);
        assertEquals(d, rs.getDouble(1), 0.0);
        assertEquals(d, rs.getDouble("column"), 0.0);

    }

    /**
     * Tests the getFloat implementation.
     */
    public void testGetFloat() throws SQLException {
        assertEquals(0, rs.getFloat(1), 0.0);
        assertTrue(rs.wasNull());
        assertEquals(0, rs.getFloat("column"), 0.0);
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final float f = 10;
        rs2.setNullFloat(f);
        assertEquals(f, rs.getFloat(1), 0.0);
        assertEquals(f, rs.getFloat("column"), 0.0);
    }

    /**
     * Tests the getInt implementation.
     */
    public void testGetInt() throws SQLException {
        assertEquals(0, rs.getInt(1));
        assertTrue(rs.wasNull());
        assertEquals(0, rs.getInt("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final int i = 10;
        rs2.setNullInt(i);
        assertEquals(i, rs.getInt(1));
        assertEquals(i, rs.getInt("column"));
    }

    /**
     * Tests the getLong implementation.
     */
    public void testGetLong() throws SQLException {
        assertEquals(0, rs.getLong(1));
        assertTrue(rs.wasNull());
        assertEquals(0, rs.getLong("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final long l = 10;
        rs2.setNullLong(l);
        assertEquals(l, rs.getLong(1));
        assertEquals(l, rs.getLong("column"));
    }

    /**
     * Tests the getObject implementation.
     */
    public void testGetObject() throws SQLException {

        assertNull(rs.getObject(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getObject("column"));
        assertTrue(rs.wasNull());
        assertNull(rs.getObject(1, (Map<String, Class<?>>) null));
        assertTrue(rs.wasNull());
        assertNull(rs.getObject("column", (Map<String, Class<?>>) null));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final Object o = new Object();
        rs2.setNullObject(o);
        assertNotNull(rs.getObject(1));
        assertEquals(o, rs.getObject(1));
        assertNotNull(rs.getObject("column"));
        assertEquals(o, rs.getObject("column"));
        assertNotNull(rs.getObject(1, (Map<String, Class<?>>) null));
        assertEquals(o, rs.getObject(1, (Map<String, Class<?>>) null));
        assertNotNull(rs.getObject("column", (Map<String, Class<?>>) null));
        assertEquals(o, rs.getObject("column", (Map<String, Class<?>>) null));

    }

    /**
     * Tests the getRef implementation.
     */
    public void testGetRef() throws SQLException {

        assertNull(rs.getRef(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getRef("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final Ref ref = new SqlNullCheckedResultSetMockRef();
        rs2.setNullRef(ref);
        assertNotNull(rs.getRef(1));
        assertEquals(ref, rs.getRef(1));
        assertNotNull(rs.getRef("column"));
        assertEquals(ref, rs.getRef("column"));

    }

    /**
     * Tests the getShort implementation.
     */
    public void testGetShort() throws SQLException {

        assertEquals((short) 0, rs.getShort(1));
        assertTrue(rs.wasNull());
        assertEquals((short) 0, rs.getShort("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final short s = (short) 10;
        rs2.setNullShort(s);
        assertEquals(s, rs.getShort(1));
        assertEquals(s, rs.getShort("column"));
    }

    /**
     * Tests the getString implementation.
     */
    public void testGetString() throws SQLException {
        assertEquals(null, rs.getString(1));
        assertTrue(rs.wasNull());
        assertEquals(null, rs.getString("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final String s = "hello, world";
        rs2.setNullString(s);
        assertEquals(s, rs.getString(1));
        assertEquals(s, rs.getString("column"));
    }

    /**
     * Tests the getTime implementation.
     */
    public void testGetTime() throws SQLException {

        assertNull(rs.getTime(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getTime("column"));
        assertTrue(rs.wasNull());
        assertNull(rs.getTime(1, Calendar.getInstance()));
        assertTrue(rs.wasNull());
        assertNull(rs.getTime("column", Calendar.getInstance()));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final Time time = new Time(new java.util.Date().getTime());
        rs2.setNullTime(time);
        assertNotNull(rs.getTime(1));
        assertEquals(time, rs.getTime(1));
        assertNotNull(rs.getTime("column"));
        assertEquals(time, rs.getTime("column"));
        assertNotNull(rs.getTime(1, Calendar.getInstance()));
        assertEquals(time, rs.getTime(1, Calendar.getInstance()));
        assertNotNull(rs.getTime("column", Calendar.getInstance()));
        assertEquals(time, rs.getTime("column", Calendar.getInstance()));

    }

    /**
     * Tests the getTimestamp implementation.
     */
    public void testGetTimestamp() throws SQLException {

        assertNull(rs.getTimestamp(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getTimestamp("column"));
        assertTrue(rs.wasNull());
        assertNull(rs.getTimestamp(1, Calendar.getInstance()));
        assertTrue(rs.wasNull());
        assertNull(rs.getTimestamp("column", Calendar.getInstance()));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final Timestamp ts = new Timestamp(new java.util.Date().getTime());
        rs2.setNullTimestamp(ts);
        assertNotNull(rs.getTimestamp(1));
        assertEquals(ts, rs.getTimestamp(1));
        assertNotNull(rs.getTimestamp("column"));
        assertEquals(ts, rs.getTimestamp("column"));
        assertNotNull(rs.getTimestamp(1, Calendar.getInstance()));
        assertEquals(ts, rs.getTimestamp(1, Calendar.getInstance()));
        assertNotNull(rs.getTimestamp("column", Calendar.getInstance()));
        assertEquals(ts, rs.getTimestamp("column", Calendar.getInstance()));
    }

    /**
     * Tests the getURL and setNullURL implementations.
     *
     * Uses reflection to allow for building under JDK 1.3.
     */
    public void testURL() throws SQLException, MalformedURLException,
            IllegalAccessException, IllegalArgumentException,
            java.lang.reflect.InvocationTargetException
    {
        Method getUrlInt = null;
        Method getUrlString = null;
        try {
            getUrlInt = ResultSet.class.getMethod("getURL", Integer.TYPE);
            getUrlString = ResultSet.class.getMethod("getURL", String.class);
        } catch(final NoSuchMethodException | SecurityException e) {
            // ignore
        }
        if (getUrlInt != null && getUrlString != null) {
            assertEquals(null, getUrlInt.invoke(rs, Integer.valueOf(1)) );
            assertTrue(rs.wasNull());
            assertEquals(null, getUrlString.invoke(rs, "column") );
            assertTrue(rs.wasNull());
            // Set what gets returned to something other than the default
            final URL u = new URL("http://www.apache.org");
            rs2.setNullURL(u);
            assertEquals(u, getUrlInt.invoke(rs, Integer.valueOf(1)) );
            assertEquals(u, getUrlString.invoke(rs, "column") );
        }
    }

    /**
     * Tests the setNullAsciiStream implementation.
     */
    public void testSetNullAsciiStream() throws SQLException {

        assertNull(rs2.getNullAsciiStream());
        // Set what gets returned to something other than the default
        final InputStream stream = new ByteArrayInputStream(new byte[0]);
        rs2.setNullAsciiStream(stream);
        assertNotNull(rs.getAsciiStream(1));
        assertEquals(stream, rs.getAsciiStream(1));
        assertNotNull(rs.getAsciiStream("column"));
        assertEquals(stream, rs.getAsciiStream("column"));

    }

    /**
     * Tests the setNullBigDecimal implementation.
     */
    public void testSetNullBigDecimal() throws SQLException {

        assertNull(rs2.getNullBigDecimal());
        // Set what gets returned to something other than the default
        final BigDecimal bd = new BigDecimal(5.0);
        rs2.setNullBigDecimal(bd);
        assertNotNull(rs.getBigDecimal(1));
        assertEquals(bd, rs.getBigDecimal(1));
        assertNotNull(rs.getBigDecimal("column"));
        assertEquals(bd, rs.getBigDecimal("column"));

    }

    /**
     * Tests the setNullBinaryStream implementation.
     */
    public void testSetNullBinaryStream() throws SQLException {

        assertNull(rs2.getNullBinaryStream());
        // Set what gets returned to something other than the default
        final InputStream stream = new ByteArrayInputStream(new byte[0]);
        rs2.setNullBinaryStream(stream);
        assertNotNull(rs.getBinaryStream(1));
        assertEquals(stream, rs.getBinaryStream(1));
        assertNotNull(rs.getBinaryStream("column"));
        assertEquals(stream, rs.getBinaryStream("column"));

    }

    /**
     * Tests the setNullBlob implementation.
     */
    public void testSetNullBlob() throws SQLException {

        assertNull(rs2.getNullBlob());
        // Set what gets returned to something other than the default
        final Blob blob = new SqlNullCheckedResultSetMockBlob();
        rs2.setNullBlob(blob);
        assertNotNull(rs.getBlob(1));
        assertEquals(blob, rs.getBlob(1));
        assertNotNull(rs.getBlob("column"));
        assertEquals(blob, rs.getBlob("column"));

    }

    /**
     * Tests the setNullBoolean implementation.
     */
    public void testSetNullBoolean() throws SQLException {

        assertEquals(false, rs2.getNullBoolean());
        // Set what gets returned to something other than the default
        rs2.setNullBoolean(true);
        assertEquals(true, rs.getBoolean(1));
        assertEquals(true, rs.getBoolean("column"));

    }

    /**
     * Tests the setNullByte implementation.
     */
    public void testSetNullByte() throws SQLException {

        assertEquals((byte) 0, rs2.getNullByte());
        // Set what gets returned to something other than the default
        final byte b = (byte) 10;
        rs2.setNullByte(b);
        assertEquals(b, rs.getByte(1));
        assertEquals(b, rs.getByte("column"));

    }

    /**
     * Tests the setNullByte implementation.
     */
    public void testSetNullBytes() throws SQLException {
        // test the default, unset value
        assertEquals(null, rs2.getNullBytes());

        // test that setting null is safe
        rs2.setNullBytes(null);
        assertEquals(null, rs2.getNullBytes());

        // Set what gets returned to something other than the default
        final byte[] b = new byte[5];
        for (int i = 0; i < 5; i++) {
            b[0] = (byte) i;
        }
        rs2.setNullBytes(b);
        assertNotNull(rs.getBytes(1));
        assertArrayEquals(b, rs.getBytes(1));
        assertNotNull(rs.getBytes("column"));
        assertArrayEquals(b, rs.getBytes("column"));

    }

    /**
     * Tests the setNullCharacterStream implementation.
     */
    public void testSetNullCharacterStream() throws SQLException {

        assertNull(rs2.getNullCharacterStream());
        // Set what gets returned to something other than the default
        final Reader reader = new CharArrayReader("this is a string".toCharArray());
        rs2.setNullCharacterStream(reader);
        assertNotNull(rs.getCharacterStream(1));
        assertEquals(reader, rs.getCharacterStream(1));
        assertNotNull(rs.getCharacterStream("column"));
        assertEquals(reader, rs.getCharacterStream("column"));

    }

    /**
     * Tests the setNullClob implementation.
     */
    public void testSetNullClob() throws SQLException {

        assertNull(rs2.getNullClob());
        // Set what gets returned to something other than the default
        final Clob clob = new SqlNullCheckedResultSetMockClob();
        rs2.setNullClob(clob);
        assertNotNull(rs.getClob(1));
        assertEquals(clob, rs.getClob(1));
        assertNotNull(rs.getClob("column"));
        assertEquals(clob, rs.getClob("column"));

    }

    /**
     * Tests the setNullDate implementation.
     */
    public void testSetNullDate() throws SQLException {
        // test the default, unset value
        assertEquals(null, rs2.getNullDate());

        // test that setting null is safe
        rs2.setNullDate(null);
        assertEquals(null, rs2.getNullDate());

        // Set what gets returned to something other than the default
        final java.sql.Date date = new java.sql.Date(new java.util.Date().getTime());
        rs2.setNullDate(date);
        assertNotNull(rs.getDate(1));
        assertEquals(date, rs.getDate(1));
        assertNotNull(rs.getDate("column"));
        assertEquals(date, rs.getDate("column"));
        assertNotNull(rs.getDate(1, Calendar.getInstance()));
        assertEquals(date, rs.getDate(1, Calendar.getInstance()));
        assertNotNull(rs.getDate("column", Calendar.getInstance()));
        assertEquals(date, rs.getDate("column", Calendar.getInstance()));

    }

    /**
     * Tests the setNullDouble implementation.
     */
    public void testSetNullDouble() throws SQLException {
        assertEquals(0.0, rs2.getNullDouble(), 0.0);
        // Set what gets returned to something other than the default
        final double d = 10.0;
        rs2.setNullDouble(d);
        assertEquals(d, rs.getDouble(1), 0.0);
        assertEquals(d, rs.getDouble("column"), 0.0);
    }

    /**
     * Tests the setNullFloat implementation.
     */
    public void testSetNullFloat() throws SQLException {
        assertEquals((float) 0.0, rs2.getNullFloat(), 0.0);
        // Set what gets returned to something other than the default
        final float f = (float) 10.0;
        rs2.setNullFloat(f);
        assertEquals(f, rs.getFloat(1), 0.0);
        assertEquals(f, rs.getFloat("column"), 0.0);
    }

    /**
     * Tests the setNullInt implementation.
     */
    public void testSetNullInt() throws SQLException {
        assertEquals(0, rs2.getNullInt());
        assertEquals(0, rs.getInt(1));
        assertTrue(rs.wasNull());
        assertEquals(0, rs.getInt("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        final int i = 10;
        rs2.setNullInt(i);
        assertEquals(i, rs.getInt(1));
        assertEquals(i, rs.getInt("column"));
    }

    /**
     * Tests the setNullLong implementation.
     */
    public void testSetNullLong() throws SQLException {
        assertEquals(0, rs2.getNullLong());
        // Set what gets returned to something other than the default
        final long l = 10;
        rs2.setNullLong(l);
        assertEquals(l, rs.getLong(1));
        assertEquals(l, rs.getLong("column"));
    }

    /**
     * Tests the setNullObject implementation.
     */
    public void testSetNullObject() throws SQLException {
        assertNull(rs2.getNullObject());
        // Set what gets returned to something other than the default
        final Object o = new Object();
        rs2.setNullObject(o);
        assertNotNull(rs.getObject(1));
        assertEquals(o, rs.getObject(1));
        assertNotNull(rs.getObject("column"));
        assertEquals(o, rs.getObject("column"));
        assertNotNull(rs.getObject(1, (Map<String, Class<?>>) null));
        assertEquals(o, rs.getObject(1, (Map<String, Class<?>>) null));
        assertNotNull(rs.getObject("column", (Map<String, Class<?>>) null));
        assertEquals(o, rs.getObject("column", (Map<String, Class<?>>) null));
    }

    /**
     * Tests the setNullShort implementation.
     */
    public void testSetNullShort() throws SQLException {

        assertEquals((short) 0, rs2.getNullShort());
        // Set what gets returned to something other than the default
        final short s = (short) 10;
        rs2.setNullShort(s);
        assertEquals(s, rs.getShort(1));
        assertEquals(s, rs.getShort("column"));

    }

    /**
     * Tests the setNullString implementation.
     */
    public void testSetNullString() throws SQLException {
        assertEquals(null, rs2.getNullString());
        // Set what gets returned to something other than the default
        final String s = "hello, world";
        rs2.setNullString(s);
        assertEquals(s, rs.getString(1));
        assertEquals(s, rs.getString("column"));
    }

    /**
     * Tests the setNullRef implementation.
     */
    public void testSetNullRef() throws SQLException {
        assertNull(rs2.getNullRef());
        // Set what gets returned to something other than the default
        final Ref ref = new SqlNullCheckedResultSetMockRef();
        rs2.setNullRef(ref);
        assertNotNull(rs.getRef(1));
        assertEquals(ref, rs.getRef(1));
        assertNotNull(rs.getRef("column"));
        assertEquals(ref, rs.getRef("column"));
    }

    /**
     * Tests the setNullTime implementation.
     */
    public void testSetNullTime() throws SQLException {
        // test the default, unset value
        assertEquals(null, rs2.getNullTime());

        // test that setting null is safe
        rs2.setNullTime(null);
        assertEquals(null, rs2.getNullTime());

        // Set what gets returned to something other than the default
        final Time time = new Time(new java.util.Date().getTime());
        rs2.setNullTime(time);
        assertNotNull(rs.getTime(1));
        assertEquals(time, rs.getTime(1));
        assertNotNull(rs.getTime("column"));
        assertEquals(time, rs.getTime("column"));
        assertNotNull(rs.getTime(1, Calendar.getInstance()));
        assertEquals(time, rs.getTime(1, Calendar.getInstance()));
        assertNotNull(rs.getTime("column", Calendar.getInstance()));
        assertEquals(time, rs.getTime("column", Calendar.getInstance()));
    }

    /**
     * Tests the setNullTimestamp implementation.
     */
    public void testSetNullTimestamp() throws SQLException {
        // test the default, unset value
        assertEquals(null, rs2.getNullTimestamp());

        // test that setting null is safe
        rs2.setNullTimestamp(null);
        assertEquals(null, rs2.getNullTimestamp());

        // Set what gets returned to something other than the default
        final Timestamp ts = new Timestamp(new java.util.Date().getTime());
        rs2.setNullTimestamp(ts);
        assertNotNull(rs.getTimestamp(1));
        assertEquals(ts, rs.getTimestamp(1));
        assertNotNull(rs.getTimestamp("column"));
        assertEquals(ts, rs.getTimestamp("column"));
        assertNotNull(rs.getTimestamp(1, Calendar.getInstance()));
        assertEquals(ts, rs.getTimestamp(1, Calendar.getInstance()));
        assertNotNull(rs.getTimestamp("column", Calendar.getInstance()));
        assertEquals(ts, rs.getTimestamp("column", Calendar.getInstance()));
    }

    public void testWrapResultSet() throws SQLException {
        final ResultSet wrappedRs = mock(ResultSet.class);
        final ResultSet rs = SqlNullCheckedResultSet.wrap(wrappedRs);
        rs.beforeFirst();
        verify(wrappedRs).beforeFirst();
        rs.next();
        verify(wrappedRs).next();
    }
}

class SqlNullUncheckedMockResultSet implements InvocationHandler {

    /**
     * Always return false for booleans, 0 for numerics, and null for Objects.
     * @see java.lang.reflect.InvocationHandler#invoke(Object, java.lang.reflect.Method, Object[])
     */
    @Override
    public Object invoke(final Object proxy, final Method method, final Object[] args)
        throws Throwable {

        final Class<?> returnType = method.getReturnType();

        if (method.getName().equals("wasNull")) {
            return Boolean.TRUE;

        }
        if (returnType.equals(Boolean.TYPE)) {
            return Boolean.FALSE;

        }
        if (returnType.equals(Integer.TYPE)) {
            return Integer.valueOf(0);

        }
        if (returnType.equals(Short.TYPE)) {
            return Short.valueOf((short) 0);

        }
        if (returnType.equals(Double.TYPE)) {
            return new Double(0);

        }
        if (returnType.equals(Long.TYPE)) {
            return Long.valueOf(0);

        }
        if (returnType.equals(Byte.TYPE)) {
            return Byte.valueOf((byte) 0);

        }
        if (returnType.equals(Float.TYPE)) {
            return new Float(0);

        }
        return null;
    }
}

class SqlNullCheckedResultSetMockBlob implements Blob {

    @Override
    public InputStream getBinaryStream() throws SQLException {
        return new ByteArrayInputStream(new byte[0]);
    }

    @Override
    public byte[] getBytes(final long param, final int param1) throws SQLException {
        return new byte[0];
    }

    @Override
    public long length() throws SQLException {
        return 0;
    }

    @Override
    public long position(final byte[] values, final long param) throws SQLException {
        return 0;
    }

    @Override
    public long position(final Blob blob, final long param) throws SQLException {
        return 0;
    }

    @Override
    public void truncate(final long len) throws SQLException {

    }

    @Override
    public int setBytes(final long pos, final byte[] bytes) throws SQLException {
        return 0;
    }

    @Override
    public int setBytes(final long pos, final byte[] bytes, final int offset, final int len)
        throws SQLException {
        return 0;
    }

    @Override
    public OutputStream setBinaryStream(final long pos) throws SQLException {
        return null;
    }

    /**
     * @throws SQLException
     */
    @Override
    public void free() throws SQLException {

    }

    /**
     * @throws SQLException
     */
    @Override
    public InputStream getBinaryStream(final long pos, final long length) throws SQLException {
      return null;
    }

}

class SqlNullCheckedResultSetMockClob implements Clob {

    @Override
    public InputStream getAsciiStream() throws SQLException {
        return null;
    }

    @Override
    public Reader getCharacterStream() throws SQLException {
        return null;
    }

    @Override
    public String getSubString(final long param, final int param1) throws SQLException {
        return "";
    }

    @Override
    public long length() throws SQLException {
        return 0;
    }

    @Override
    public long position(final Clob clob, final long param) throws SQLException {
        return 0;
    }

    @Override
    public long position(final String str, final long param) throws SQLException {
        return 0;
    }

    @Override
    public void truncate(final long len) throws SQLException {

    }

    @Override
    public OutputStream setAsciiStream(final long pos) throws SQLException {
        return null;
    }

    @Override
    public Writer setCharacterStream(final long pos) throws SQLException {
        return null;
    }

    @Override
    public int setString(final long pos, final String str) throws SQLException {
        return 0;
    }

    @Override
    public int setString(final long pos, final String str, final int offset, final int len)
        throws SQLException {
        return 0;
    }

    /**
     * @throws SQLException
     */
    @Override
    public void free() throws SQLException {

    }

    /**
     * @throws SQLException
     */
    @Override
    public Reader getCharacterStream(final long pos, final long length) throws SQLException {
      return null;
    }

}

class SqlNullCheckedResultSetMockRef implements Ref {

    @Override
    public String getBaseTypeName() throws SQLException {
        return "";
    }

    @Override
    public Object getObject() throws SQLException {
        return null;
    }

    @Override
    public void setObject(final Object value) throws SQLException {

    }

    @Override
    public Object getObject(final Map<String,Class<?>> map) throws SQLException {
        return null;
    }

}


text:
package net.roboconf.core.commands;

import java.io.File;
import java.util.List;

import net.roboconf.core.internal.tests.TestApplication;
import net.roboconf.core.model.beans.Instance;
import net.roboconf.core.model.helpers.InstanceHelpers;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

/**
 * @author Vincent Zurczak - Linagora
 */
public class ContextTest {

	private TestApplication app;
	private Context context;

	@Before
	public void initialize() throws Exception {
		this.app = new TestApplication();
		this.context = new Context( this.app, new File( "whatever" ));
	}

	@Test
	public void testConstructor() {

		List<Instance> instances = InstanceHelpers.getAllInstances( this.app );
		Assert.assertEquals( instances.size(), this.context.instancePathToComponentName.size());

		for( Instance instance : instances ) {
			String path = InstanceHelpers.computeInstancePath( instance );
			Assert.assertEquals( instance.getComponent().getName(), this.context.instancePathToComponentName.get( path ));
		}
	}

	@Test
	public void testInstanceExists() {

		Assert.assertTrue( this.context.instanceExists( "/tomcat-vm" ));
		Assert.assertTrue( this.context.instanceExists( "/tomcat-vm/tomcat-server" ));
		Assert.assertFalse( this.context.instanceExists( "/tomcat-vm/invalid" ));
		Assert.assertFalse( this.context.instanceExists( "invalid" ));
	}

	@Test
	public void testResolveInstance() {

		Assert.assertEquals( "vm", this.context.resolveInstance( "/tomcat-vm" ).getComponent().getName());
		Assert.assertEquals( "tomcat", this.context.resolveInstance( "/tomcat-vm/tomcat-server" ).getComponent().getName());
		Assert.assertNull( this.context.resolveInstance( "/tomcat-vm/invalid" ));

		this.context.instancePathToComponentName.put( "not a path", "whatever" );
		Assert.assertNull( this.context.resolveInstance( "not a path" ));
		Assert.assertNull( this.context.resolveInstance( "" ));

		this.context.instancePathToComponentName.put( "", "vm" );
		Assert.assertNull( this.context.resolveInstance( "" ));
	}

	@Test
	public void testGetName() {

		Assert.assertEquals( "test", new Context( this.app, new File( "test" )).getName());
		Assert.assertNull( new Context( this.app, null ).getName());
	}
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
    <link rel="stylesheet" href="../../build/aui-css/css/bootstrap.css">

AlloyUI - Tabview

From markup

foo

bar

baz

foo Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente officia minus nobis obcaecati neque sint fugit reiciendis dolorum quia nihil numquam sunt eum? Odio doloribus laborum quisquam enim aliquam iure.

bar Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas non iste perspiciatis explicabo distinctio quaerat maiores ab aut quasi quod aliquid iusto possimus neque eius consequuntur deserunt inventore doloremque rerum.

baz Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore aut officia commodi maxime ea cumque nulla quam molestias odit ipsam sapiente laudantium minima reprehenderit. Esse laboriosam fuga beatae doloremque officiis.

Stacked

Pills

Stacked pills

List

List Header

foo

List Header

bar

baz

qux

foo Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente officia minus nobis obcaecati neque sint fugit reiciendis dolorum quia nihil numquam sunt eum? Odio doloribus laborum quisquam enim aliquam iure.

bar Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas non iste perspiciatis explicabo distinctio quaerat maiores ab aut quasi quod aliquid iusto possimus neque eius consequuntur deserunt inventore doloremque rerum.

baz Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore aut officia commodi maxime ea cumque nulla quam molestias odit ipsam sapiente laudantium minima reprehenderit. Esse laboriosam fuga beatae doloremque officiis.

qux Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore aut officia commodi maxime ea cumque nulla quam molestias odit ipsam sapiente laudantium minima reprehenderit. Esse laboriosam fuga beatae doloremque officiis.


text:
@import UIKit;

@interface MAFActionSheetTableViewCell : UITableViewCell

@end


text:
package net.dougqh.jak.jvm.operations;

import java.lang.reflect.Type;

import net.dougqh.jak.jvm.JvmOperationProcessor;

public final class lushr extends BinaryOperation {
	public static final String ID = "lushr";
	public static final byte CODE = LUSHR;

	public static final lushr instance() {
		return new lushr();
	}

	private lushr() {}

	@Override
	public final String getId() {
		return ID;
	}

	@Override
	public final int getCode() {
		return CODE;
	}

	@Override
	public final String getOperator() {
		return UNSIGNED_RIGHT_SHIFT;
	}

	@Override
	public final Type lhsType() {
		return long.class;
	}

	@Override
	public final Type rhsType() {
		return int.class;
	}

	@Override
	public final Type resultType() {
		return long.class;
	}

	@Override
	public final <T> T fold( final Object lhs, final Object rhs ) {
		return BinaryOperation.<T>as( (Long)lhs >>> (Integer)rhs );
	}

	@Override
	public final void process( final JvmOperationProcessor processor ) {
		processor.lushr();
	}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MvpFramework.Binding;
using DiExtension;
using JohnLambe.Util;
using MvpFramework.Generator;
using System.Reflection;

namespace MvpFramework.WinForms
{
    /// <summary>
    /// Subclass of <see cref="FormGeneratorBase{T}"/> for WinForms.
    /// </summary>
    public class FormGenerator : FormGeneratorBase<Control>
    {
        public FormGenerator(ControlMappings<Control> mappings = null, IDiContext diContext = null)
            : base(mappings,diContext)
        {
        }

        public override void StartGenerate()
        {
            AddMapping(typeof(object), typeof(TextBox));  //XXX temporary

            base.StartGenerate();
            Target.SuspendLayout();
        }

        public override void EndGenerate()
        {
            Target.ResumeLayout();
            base.EndGenerate();
        }

        public override Control CreateGroup(IUiGroupModel parent, IUiGroupModel group)
        {
            var uiGroup = base.CreateGroup(parent, group);
            if (group.AutoGenerate)
            {
                var groupBox = new GroupBox();
                groupBox.Dock = DockStyle.Top;
                groupBox.Text = group.DisplayName;
                groupBox.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                groupBox.AutoSize = true;

                /*
                FlowLayoutPanel panel = new FlowLayoutPanel();
                panel.Dock = DockStyle.Fill;
                groupBox.Controls.Add(panel);
                */

                Target.Controls.Add(groupBox);
                Target.Controls.SetChildIndex(groupBox, 0);

                return groupBox;
            }

            return uiGroup;
        }

        /*
        public override Control CreateControl(ControlGeneratorContext<Control> context)
        {
            base.CreateControl(context);

            return null;
        }*/

        protected override void AfterCreateControl(ControlGeneratorContext<Control> context)
        {
            var panel = new Panel();
            panel.Dock = DockStyle.Top;

            //TODO: Refactor this with a control (could be a subclass of Panel etc.) that combines the Label and Field (data) control,
            // and also handles validation (populates validation properties on Field Control,
            // and attaches an event handler for other validation).

            var captionControl = new Label();
            captionControl.Text = Accelerators.SetAccelerator(context.PropertyBinder.DisplayName,AcceleratorCaptionUtil.Auto);
            captionControl.Left = HSpacing;
            captionControl.Top = VSpacing / 2;
            panel.Controls.Add(captionControl);
//            panel.Controls.SetChildIndex(captionControl,0);

            //TODO: delegate to interface; implementation per control type (DataType mapped to control type; could be overridden by attribute).
            // e.g. bool mapped to CheckBox.
            var dataControl = context.NewControl; //new TextBox();
            dataControl.Left = FieldControlLeft;
            dataControl.Top = captionControl.Top;
            dataControl.Width = panel.Width - HSpacing - dataControl.Left;   // fill width of panel
            dataControl.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            dataControl.Tag = "" + GeneralControlBinder.TagPrefix + StrUtil.BlankPropagate(ModelProperty, ".") + context.PropertyBinder.Name + GeneralControlBinder.TagSuffix;

            panel.Height = dataControl.Bottom + VSpacing / 2;

            panel.TabIndex = context.Index;

            panel.Controls.Add(dataControl);

            context.ParentControl.Controls.Add(panel);
            context.ParentControl.Controls.SetChildIndex(panel, 0);
        }

        /// <summary>
        /// X-coordinate of field controls.
        /// </summary>
        protected virtual int FieldControlLeft { get; set; } = 200;

        /// <summary>
        /// Vertical spacing between controls, in pixels.
        /// </summary>
        protected const int VSpacing = 4;
        /// <summary>
        /// Horizontal padding.
        /// </summary>
        protected const int HSpacing = 4;
    }

}


text:
#ifndef JPY_JOBJ_H
#define JPY_JOBJ_H

#ifdef __cplusplus
extern "C" {
#endif

#include "jpy_compat.h"

/**
 * The Java Object representation in Python.
 * @see JPy_JArray
 */
typedef struct JPy_JObj
{
    PyObject_HEAD
    jobject objectRef;
}
JPy_JObj;

int JObj_Check(PyObject* arg);

PyObject* JObj_New(JNIEnv* jenv, jobject objectRef);
PyObject* JObj_FromType(JNIEnv* jenv, JPy_JType* type, jobject objectRef);

int JObj_InitTypeSlots(PyTypeObject* type, const char* typeName, PyTypeObject* superType);

#ifdef __cplusplus
}  /* extern "C" */
#endif
#endif /* !JPY_JOBJ_H */


text:
@javax.xml.bind.annotation.XmlSchema(
                namespace = LocationConstants.Namespaces.LOCATION_NAMESPACE_2_0,
                elementFormDefault=XmlNsForm.QUALIFIED)
package org.kuali.rice.location.api.state;

import org.kuali.rice.location.api.LocationConstants;

import javax.xml.bind.annotation.XmlNsForm;


text:
package org.apache.commons.math4.userguide.genetics;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.math4.genetics.Chromosome;
import org.apache.commons.math4.genetics.MutationPolicy;

public class RandomPolygonMutation implements MutationPolicy {

    private float mutationRate;
    private float mutationAmount;

    public RandomPolygonMutation(float mutationRate, float mutationAmount) {
        this.mutationRate = mutationRate;
        this.mutationAmount = mutationAmount;
    }

    public Chromosome mutate(Chromosome chromosome) {
        if (!(chromosome instanceof PolygonChromosome)) {
            throw new IllegalArgumentException();
        }

        PolygonChromosome polygons = (PolygonChromosome) chromosome;
        List<Polygon> repr = polygons.getPolygonRepresentation();

        List<Polygon> newRepr = new ArrayList<>(repr.size());
        for (Polygon p : repr) {
            newRepr.add(p.mutate(mutationRate, mutationAmount));
        }
        return new PolygonChromosome(newRepr);
    }
}


text:
=begin
#ESP Documentation

#The Evident Security Platform API (version 2.0) is designed to allow users granular control over their Amazon Web Service security experience by allowing them to review alerts, monitor signatures, and create custom signatures.

OpenAPI spec version: v2_sdk

Generated by: https://github.com/swagger-api/swagger-codegen.git

=end

require 'spec_helper'
require 'json'
require 'date'

# Unit tests for ESP::Suppression
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
# Please update as you see appropriate
describe 'Suppression' do
  before do
    # run before each test
    @instance = ESP::Suppression.new
  end

  after do
    # run after each test
  end

  describe 'test an instance of Suppression' do
    it 'should create an instance of Suppression' do
      expect(@instance).to be_instance_of(ESP::Suppression)
    end
  end
  describe 'test attribute "id"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "created_at"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "include_new_accounts"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "reason"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "resource"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "status"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "updated_at"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "organization"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "organization_id"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "created_by"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "created_by_id"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "regions"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "region_ids"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "external_accounts"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "external_account_ids"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "signatures"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "signature_ids"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "custom_signatures"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

  describe 'test attribute "custom_signature_ids"' do
    it 'should work' do
       # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

end


text:
CLASS({
  package: 'foam.browser',
  name: 'BrowserConfig',
  documentation: 'Configuration object for FOAM\'s browser. ' +
      'Create an instance of this model and load it in a BrowserView.',

  requires: [
    'foam.dao.EasyDAO',
    'foam.dao.NullDAO',
    'foam.mlang.CannedQuery',
    'foam.ui.DAOListView',
    'foam.ui.md.CannedQueryCitationView',
    'foam.ui.md.CitationView',
  ],

  exports: [
    'dao'
  ],

  properties: [
    {
      name: 'title',
      defaultValueFn: function() {
        return this.model && this.model.name ? this.model.name + ' Browser' :
            'Browser';
      }
    },
    {
      model_: 'foam.core.types.DAOProperty',
      name: 'dao',
      documentation: 'The master DAO to browse. Will default to an MDAO if not provided.',
      lazyFactory: function() {
        return this.instance_.model && this.EasyDAO.create({
          model: this.model,
          daoType: 'MDAO',
          seqNo: true,
        });
      }
    },
    {
      model_: 'ModelProperty',
      name: 'model',
      required: true,
      factory: function() { return this.instance_.dao && this.dao.model; }
    },
    {
      name: 'filteredDAO',
      documentation: 'The filtered version of $$DOC{ref:".dao"} that\'s ' +
          'being viewed right now.',
      dynamicValue: function() {
        this.dao; this.query; this.sortOrder;
        var query = this.query || (this.showAllWithNoQuery ? TRUE : FALSE);
        var dao = this.dao.where(this.query);
        if (this.sortOrder) dao = dao.orderBy(this.sortOrder);
        return dao;
      },
      view: 'foam.ui.DAOListView',
    },
    {
      name: 'query',
      documentation: 'The authoritative mlang query. Formed from $$DOC{ref:".search"} ' +
          'AND $$DOC{ref:".cannedQuery"}. Dynamic value, should not need to ' +
          'be set directly.',
      dynamicValue: function() {
        // TODO(braden): Is AND the right semantics here? Maybe searches should
        // span the whole DAO without limiting by canned query.
        this.search; this.cannedQuery; this.searchWithinCannedQuery;
        var canned = this.cannedQuery.expression;
        if (this.search !== '') {
          var query = this.queryParser.parseString(this.search);
          return this.searchWithinCannedQuery ? AND(query, canned) : query;
        } else {
          return canned;
        }
      },
    },
    {
      name: 'queryParser',
      documentation: 'Parser for user-entered search strings. Should return ' +
          'an mlang suitable for searching $$DOC{ref:".dao"}. Defaults to KEYWORD.',
      defaultValue: { parseString: KEYWORD }
    },
    {
      model_: 'foam.core.types.DAOProperty',
      name: 'cannedQueryDAO',
      documentation: 'A DAO of $$DOC{ref:"foam.mlang.CannedQuery"} objects.',
      factory: function() {
        return this.NullDAO.create();
      },
      postSet: function(old, nu) {
        if (nu && !this.query && !this.cannedQuery) {
          nu.limit(1).select([])(function(arr) { this.cannedQuery = arr[0]; }.bind(this));
        }
      },
      view: {
        factory_: 'foam.ui.DAOListView',
        rowView: 'foam.ui.md.CannedQueryCitationView',
      },
    },
    {
      name: 'cannedQuery',
      documentation: 'Currently selected canned query. Combined into $$DOC{ref:".query"} ' +
          'by ANDing its expression with $$DOC{ref:".search"}.',
    },
    {
      name: 'sortChoices',
      factory: function() {
        return [];
      }
    },
    {
      name: 'sortOrder',
      factory: function() {
        return this.sortChoices && this.sortChoices.length && this.sortChoices[0][0];
      }
    },
    {
      model_: 'StringProperty',
      name: 'search',
      view: {
        factory_: 'foam.ui.md.TextFieldView',
        label: 'Search',
        floatingLabel: false,
        placeholder: 'Search',
        onKeyMode: true,
      },
    },
    {
      model_: 'ViewFactoryProperty',
      name: 'listView',
      defaultValue: {
        factory_: 'foam.ui.DAOListView',
        rowView: 'foam.ui.md.CitationView',
        minWidth: 350,
        preferredWidth: 500,
        maxWidth: 500,
      }
    },
    {
      model_: 'ViewFactoryProperty',
      name: 'detailView',
      documentation: 'A ViewFactory for the main detail view. You usually ' +
          'will want to override $$DOC{ref:".innerDetailView"} rather than ' +
          'this property.',
      defaultValue: { factory_: 'foam.ui.md.UpdateDetailView', perferredWidth: 1000 },
    },
    {
      model_: 'ViewFactoryProperty',
      name: 'innerDetailView',
      defaultValue: 'foam.ui.md.DetailView'
    },
    {
      model_: 'ViewFactoryProperty',
      name: 'createView',
      documentation: 'The view for creating a new item. Defaults to creating ' +
          'a new empty instance of $$DOC{ref:".model"} and passing it to ' +
          '$$DOC{ref:".detailView"}.',
      defaultValue: function(args, X) {
        var newObj = this.model.create();
        return this.detailView({
          data: newObj,
          innerView: this.innerDetailView
        }, X);
      }
    },
    {
      model_: 'FunctionProperty',
      name: 'createFunction',
      documentation: 'Runs createView and adds the new view. "this" is the BrowserView, "this.data" is the BrowserConfig.',
      defaultValue: function() {
        this.stack.pushView(this.data.createView(null,
            this.Y.sub({ dao: this.data.dao })));
      },
    },
    {
      model_: 'ViewFactoryProperty',
      name: 'menuRowView',
      defaultValue: 'foam.ui.md.CannedQueryCitationView'
    },
    {
      model_: 'ViewFactoryProperty',
      name: 'menuHeaderView',
      documentation: 'Rendered at the top of the menu. Empty by default.',
    },
    {
      name: 'menuFactory',
      documentation: 'The menuFactory returns a View for the left-side menu. ' +
          'By default, it returns the view for $$DOC{ref:".cannedQueryDAO"}.',
      defaultValue: function() {
        var view = this.DAOListView.create({
          data: this.cannedQueryDAO.orderBy(
              this.CannedQuery.SECTION,
              this.CannedQuery.ORDER,
              this.CannedQuery.LABEL
          ),
          rowView: this.menuRowView
        }, this.Y.sub({
          selection$: this.cannedQuery$
        }));

        // Listen for the DAOListView's ROW_CLICK event, and emit our own
        // MENU_CLOSE event when it fires. This was originally a postSet on
        // cannedQuery, which is bound to the selection, but that only updates
        // when the value actually changes.
        view.subscribe(view.ROW_CLICK, function() {
          this.publish(this.MENU_CLOSE);
        }.bind(this));

        return view;
      }
    },
    {
      name: 'busyStatus',
      documentation: 'Optional busyStatus. If defined, a spinner will be ' +
          'shown when the BusyStatus is set to true.'
    },
    {
      name: 'headerColor',
      documentation: 'Globally sets a browser-header-color CSS class',
      defaultValue: '#3e50b4'
    },
    {
      name: 'backgroundColor',
      documentation: 'Globally sets a browser-body-color CSS class',
      defaultValue: '#ffffff'
    },
    {
      name: 'showAllWithNoQuery',
      documentation: 'When there is no query set, should the browser ' +
          'render all the data, or none of it? Defaults to all, set false if ' +
          'you have a lot of data and don\'t want to render it all.',
      defaultValue: true,
    },
    {
      model_: 'BooleanProperty',
      name: 'showAdd',
      documentation: 'An action to create a new value in $$DOC{ref:".dao"} ' +
          'will be rendered when this is set to true (the default).',
      defaultValue: true,
    },
    {
      model_: 'BooleanProperty',
      name: 'searchWithinCannedQuery',
      documentation: 'By default, searches are against all of the DAO. To ' +
          'restrict searches to the currently selected canned query, set ' +
          'this to true.',
      defaultValue: false,
    },
  ],

  constants: {
    MENU_CLOSE: ['menu-close']
  },
});


text:
class GeoEntitySearch
  include CacheIterator
  include SearchCache # this provides #cached_results and #cached_total_cnt

  def initialize(options)
    initialize_params(options)
    initialize_query
  end

  def results
    @query.reload
  end

  private

  def initialize_params(options)
    @geo_entity_types_set = GeoEntityType::SETS.key?(
      options[:geo_entity_types_set]
      ) &&
      options[:geo_entity_types_set] ||
      GeoEntityType::DEFAULT_SET
    @locale =
      if options[:locale] &&
        ['en', 'es', 'fr'].include?(options[:locale].downcase)
        options[:locale]
      else
        I18n.locale
      end
    @options = {
      geo_entity_types_set: @geo_entity_types_set,
      locale: @locale
    }
  end

  def initialize_query
    geo_entity_types = GeoEntityType::SETS[@geo_entity_types_set]
    @query = GeoEntity.
      joins(:geo_entity_type).
      includes(:geo_entity_type).
      order("name_#{@locale}")
    if GeoEntityType::CURRENT_ONLY_SETS.include?(@geo_entity_types_set)
      @query = @query.current
    end
    unless geo_entity_types.empty?
      @query = @query.
        where('geo_entity_types.name' => geo_entity_types)
    end
  end
end


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: String.prototype.lastIndexOf can't be used as constructor
es5id: 15.5.4.8_A7
description: Checking if creating the String.prototype.lastIndexOf object fails
---*/

var FACTORY = String.prototype.lastIndexOf;

assert.throws(TypeError, function() {
  new FACTORY;
});