text:
package go.graphics.android;

import android.content.Context;
import android.opengl.GLES11;
import android.opengl.GLES20;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.ShortBuffer;

import go.graphics.AbstractColor;
import go.graphics.EGeometryFormatType;
import go.graphics.GLDrawContext;
import go.graphics.GeometryHandle;
import go.graphics.TextureHandle;
import go.graphics.text.EFontSize;
import go.graphics.text.TextDrawer;

public class GLES11DrawContext implements GLDrawContext {

	private final Context context;

	private GeometryHandle lastGeometry = null;
	private TextureHandle lastTexture = null;
	private boolean tex_coord_on = false;

	public GLES11DrawContext(Context context) {
		this.context = context;
		GLES11.glClearColor(0, 0, 0, 1);
		GLES11.glPixelStorei(GLES11.GL_UNPACK_ALIGNMENT, 1);
		GLES11.glEnable(GLES11.GL_BLEND);
		GLES11.glBlendFunc(GLES11.GL_SRC_ALPHA, GLES11.GL_ONE_MINUS_SRC_ALPHA);

		GLES11.glDepthFunc(GLES11.GL_LEQUAL);
		GLES11.glEnable(GLES11.GL_DEPTH_TEST);

		init();
	}

	private float lr, lg, lb, la = -1;
	private float lx, ly, lz = -2;
	private float lsx, lsy, lsz = -1;

	public void draw2D(GeometryHandle geometry, TextureHandle texture, int primitive, int offset, int vertices, float x, float y, float z, float sx, float sy, float sz, AbstractColor color, float intensity) {
		if(lx != x || ly != y || lz != z || lsx != sx || lsy != sy || lsz != sz) {
			if(lsz != -1) GLES11.glPopMatrix();
			GLES11.glPushMatrix();
			if(x != 0 || y != 0 || z != 0) GLES11.glTranslatef(x, y, z);
			if(sx != 1 || sy != 1 || sz != 1) GLES11.glScalef(sx, sy, sz);
			lx = x; lsx = sx;
			ly = y; lsy = sy;
			lz = z; lsz = sz;
		}

		if(color != null) {
			float r = color.red*intensity;
			float g = color.green*intensity;
			float b = color.blue*intensity;
			float a = color.alpha;
			if(lr != r || lg != g || lb != b || la != a) GLES11.glColor4f(lr=r, lg=g, lb=b, la=a);
		} else {
			if(lr != lg || lr != lb || lr != intensity || la != 1) GLES11.glColor4f(intensity, intensity, intensity, 1);
			lr = lg = lb = intensity;
			la = 1;
		}

		bindTexture(texture);
		bindGeometry(geometry);
		EGeometryFormatType format = geometry.getFormat();

		if(format.getTexCoordPos() == -1) GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);

		specifyFormat(format);
		GLES11.glDrawArrays(primitive, offset * vertices, vertices);

		if(format.getTexCoordPos() == -1) GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
	}

	protected void specifyFormat(EGeometryFormatType format) {
		if (format.getTexCoordPos() == -1) {
			if(tex_coord_on) GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
			GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, 0);
		} else {
			if(!tex_coord_on) GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
			int stride = format.getBytesPerVertexSize();
			GLES11.glVertexPointer(2, GLES11.GL_FLOAT, stride, 0);
			GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, stride, format.getTexCoordPos());
		}

		tex_coord_on = format.getTexCoordPos() != -1;
	}

	protected void bindTexture(TextureHandle texture) {
		if (texture != lastTexture) {
			int id = 0;
			if (texture != null) {
				id = texture.getInternalId();
			}
			GLES11.glBindTexture(GLES11.GL_TEXTURE_2D, id);
			lastTexture = texture;
		}
	}

	public void setGlobalAttributes(float x, float y, float z, float sx, float sy, float sz) {
		// reset matrix stack
		if(lsz != -1) GLES11.glPopMatrix();
		lsz = -1;

		GLES11.glLoadIdentity();
		GLES11.glTranslatef(x, y, z);
		GLES11.glScalef(sx, sy, sz);
	}

	protected void bindGeometry(GeometryHandle geometry) {
		if(geometry != lastGeometry) {
			int id = 0;
			if(geometry != null) {
				id = geometry.getInternalId();
			}
			GLES11.glBindBuffer(GLES11.GL_ARRAY_BUFFER, id);
			lastGeometry = geometry;
		}
	}

	@Override
	public TextureHandle generateTexture(int width, int height, ShortBuffer data, String name) {
		TextureHandle texture = genTextureIndex();

		bindTexture(texture);
		GLES11.glTexImage2D(GLES11.GL_TEXTURE_2D, 0, GLES11.GL_RGBA, width,
				height, 0, GLES11.GL_RGBA, GLES11.GL_UNSIGNED_SHORT_4_4_4_4, data);
		setTextureParameters();
		return texture;
	}

	private TextureHandle genTextureIndex() {
		int[] textureIndexes = new int[1];
		GLES11.glGenTextures(1, textureIndexes, 0);
		return new TextureHandle(this, textureIndexes[0]);
	}

	/**
	 * Sets the texture parameters, assuming that the texture was just created and is bound.
	 */
	private static void setTextureParameters() {
		GLES11.glTexParameterf(GLES11.GL_TEXTURE_2D,
				GLES11.GL_TEXTURE_MAG_FILTER, GLES11.GL_NEAREST);
		GLES11.glTexParameterf(GLES11.GL_TEXTURE_2D,
				GLES11.GL_TEXTURE_MIN_FILTER, GLES11.GL_NEAREST);
		GLES11.glTexParameterf(GLES11.GL_TEXTURE_2D, GLES11.GL_TEXTURE_WRAP_S,
				GLES11.GL_REPEAT);
		GLES11.glTexParameterf(GLES11.GL_TEXTURE_2D, GLES11.GL_TEXTURE_WRAP_T,
				GLES11.GL_REPEAT);
	}

	@Override
	public void updateTexture(TextureHandle textureIndex, int left, int bottom,
			int width, int height, ShortBuffer data) {
		bindTexture(textureIndex);
		GLES11.glTexSubImage2D(GLES11.GL_TEXTURE_2D, 0, left, bottom, width, height,
				GLES11.GL_RGBA, GLES11.GL_UNSIGNED_SHORT_4_4_4_4, data);
	}

	public TextureHandle generateFontTexture(int width, int height) {
		TextureHandle texture = genTextureIndex();

		ByteBuffer data = ByteBuffer.allocateDirect(width * height * 4);
		while (data.hasRemaining()) {
			data.put((byte) 0);
		}
		data.rewind();

		bindTexture(texture);
		if(this instanceof GLES20DrawContext) {
			GLES11.glTexImage2D(GLES11.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, width,
					height, 0, GLES11.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, data);
		} else {
			GLES11.glTexImage2D(GLES11.GL_TEXTURE_2D, 0, GLES11.GL_ALPHA, width,
					height, 0, GLES11.GL_ALPHA, GLES11.GL_UNSIGNED_BYTE, data);
		}

		setTextureParameters();
		return texture;
	}

	public void updateFontTexture(TextureHandle textureIndex, int left, int bottom,
								   int width, int height, ByteBuffer data) {
		bindTexture(textureIndex);
		if(this instanceof GLES20DrawContext) {
			GLES11.glTexSubImage2D(GLES11.GL_TEXTURE_2D, 0, left, bottom, width,
					height, GLES11.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, data);
		} else {
			GLES11.glTexSubImage2D(GLES11.GL_TEXTURE_2D, 0, left, bottom, width,
					height, GLES11.GL_ALPHA, GLES11.GL_UNSIGNED_BYTE, data);
		}
	}

	private float[] heightMatrix;

	@Override
	public void setHeightMatrix(float[] matrix) {
		heightMatrix = matrix;
	}

	@Override
	public TextDrawer getTextDrawer(EFontSize size) {
		return AndroidTextDrawer.getInstance(size, this);
	}

	public void reinit(int width, int height) {
		GLES11.glViewport(0, 0, width, height);
		GLES11.glMatrixMode(GLES11.GL_PROJECTION);
		GLES11.glLoadIdentity();
		GLES11.glOrthof(0, width, 0, height, -1, 1);
		GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
	}

	public void init() {
		GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY);
		GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);

		GLES11.glAlphaFunc(GLES11.GL_GREATER, 0.1f);
		GLES11.glEnable(GLES11.GL_ALPHA_TEST);

		GLES11.glEnable(GLES11.GL_TEXTURE_2D);
	}

	@Override
	public GeometryHandle generateGeometry(int vertices, EGeometryFormatType format, boolean writable, String name) {
		GeometryHandle geometry = allocateVBO(format);

		bindGeometry(geometry);
		GLES11.glBufferData(GLES11.GL_ARRAY_BUFFER, vertices*format.getBytesPerVertexSize(), null,
				writable ? GLES11.GL_DYNAMIC_DRAW : GLES11.GL_STATIC_DRAW);
		return geometry;
	}

	public void drawTrianglesWithTextureColored(TextureHandle textureid, GeometryHandle vertexHandle, GeometryHandle colorHandle, int offset, int lines, int width, int stride, float x, float y) {
		bindTexture(textureid);
		int starti = offset < 0 ? (int)Math.ceil(-offset/(float)stride) : 0;

		if(lsz != -1) GLES11.glPopMatrix();
		GLES11.glPushMatrix();
		GLES11.glTranslatef(x, y, -.1f);
		GLES11.glScalef(1, 1, 0);
		GLES11.glMultMatrixf(heightMatrix, 0);

		if(!tex_coord_on) {
			GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
			tex_coord_on = true;
		}

		bindGeometry(vertexHandle);
		GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 5 * 4, 0);
		GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 5 * 4, 3 * 4);

		bindGeometry(colorHandle);
		GLES11.glColorPointer(4, GLES11.GL_UNSIGNED_BYTE, 0, 0);

		GLES11.glEnableClientState(GLES11.GL_COLOR_ARRAY);
		for (int i = starti; i != lines; i++) {
			GLES11.glDrawArrays(GLES11.GL_TRIANGLES, (offset + stride * i) * 3, width * 3);
		}
		GLES11.glDisableClientState(GLES11.GL_COLOR_ARRAY);

		GLES11.glPopMatrix();
		lsz = -1;
	}

	@Override
	public GeometryHandle storeGeometry(float[] geometry, EGeometryFormatType format, boolean writable, String name) {
		GeometryHandle vertexBufferId = allocateVBO(format);
		ByteBuffer bfr = ByteBuffer.allocateDirect(4*geometry.length).order(ByteOrder.nativeOrder());
		bfr.asFloatBuffer().put(geometry);
		GLES11.glBufferData(GLES11.GL_ARRAY_BUFFER, 4*geometry.length, bfr, writable ? GLES11.GL_DYNAMIC_DRAW : GLES11.GL_STATIC_DRAW);

		return vertexBufferId;
	}

	GeometryHandle allocateVBO(EGeometryFormatType type) {
		int[] vbos = new int[] {0};
		GLES11.glGenBuffers(1, vbos, 0);
		GLES11.glBindBuffer(GLES11.GL_ARRAY_BUFFER, vbos[0]);
		return lastGeometry = new GeometryHandle(this, vbos[0], 0, type);
	}

	@Override
	public void updateGeometryAt(GeometryHandle handle, int pos, ByteBuffer data) {
		bindGeometry(handle);
		data.rewind();
		GLES11.glBufferSubData(GLES11.GL_ARRAY_BUFFER, pos, data.limit(), data);
	}

	public Context getAndroidContext() {
		return context;
	}

	public void invalidateContext() {
		valid = false;
	}

	@Override
	public void deleteTexture(TextureHandle texture) {
		GLES11.glDeleteTextures(1, new int[] {texture.getInternalId()}, 0);
	}

	private boolean valid = true;

	@Override
	public boolean isValid() {
		return valid;
	}
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package socialpccontroller;

import com.mysql.jdbc.exceptions.jdbc4.CommunicationsException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 *
 * @author Praveen
 */
public class DatabaseManager {
    private String driver="com.mysql.jdbc.Driver";
    private String dbName="xxxxx";//Your Database name came here
    private String username="xxxxxx";//Your username came here
    private String password="xxxxxx";//Your password came here
    private String port="3306";
    private String url="jdbc:mysql://sql5.freesqldatabase.com:"+port+"/"+dbName;
    private Connection conn;

   public DatabaseManager() throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException
   {
        Class.forName(driver).newInstance();

        conn = DriverManager.getConnection(url,username,password);

   }
   public ResultSet selectQuery(String Query) throws SQLException
   {
        Statement pst=conn.createStatement();
        ResultSet temp=pst.executeQuery(Query);
        return temp;
   }
   public int updateQuery(String Query) throws SQLException
   {
       Statement pst=conn.createStatement();
        return pst.executeUpdate(Query);

   }
}

redpajama_set_name: RedPajamaGithub


text:
set -e

JOBS=${JOBS:-1}
export UBSAN_OPTIONS=halt_on_error=1
export ASAN_OPTIONS=halt_on_error=1
export MAKEFLAGS="-j$JOBS"

config=$1
echo ""
echo "Build Flatbuffers project for '$config' with jobs=$JOBS"

cmake . -DCMAKE_BUILD_TYPE=$config \
  -DFLATBUFFERS_BUILD_TESTS=ON -DFLATBUFFERS_CODE_SANITIZE=ON
cmake --build . --target all --clean-first -- -j$JOBS
ctest --extra-verbose --output-on-failure -j$JOBS

echo "Check generated code"
scripts/check-generate-code.sh

echo "C++ tests done"


text:
<?php
/**
 *
 */

namespace Mvc5\Request\Exception;

use Mvc5\View\ViewLayout;

interface ExceptionLayout
    extends ViewLayout
{
    /**
     * @return \Throwable
     */
    function exception() : \Throwable;
}


text:
package org.smartdeveloperhub.harvester.org.frontend.core.Organization;

public interface OrganizationVocabulary {

	static final String TYPE       = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
	static final String ORGANIZATION_CLASS = "http://www.smartdeveloperhub.org/vocabulary/organization#Organization";
	static final String ORGANIZATIONALCOLLABORATION = "http://www.smartdeveloperhub.org/vocabulary/organization#OrganizationalCollaboration";
	static final String PREFLABEL = "http://www.w3.org/2004/02/skos/core#prefLabel";
	static final String ORGID = "http://www.smartdeveloperhub.org/vocabulary/organization#id";
	static final String TITLE = "http://www.smartdeveloperhub.org/vocabulary/organization#title";
	static final String DESCRIPTION = "http://www.smartdeveloperhub.org/vocabulary/organization#description";
	static final String CLASSIFICATION = "http://www.w3.org/ns/org#classification";
	static final String PURPOSE = "http://www.w3.org/ns/org#purpose";
	static final String HASMEMBERORGANIZATION="http://www.smartdeveloperhub.org/vocabulary/organization#hasMemberOrganization";
	static final String HASPROJECT="http://www.smartdeveloperhub.org/vocabulary/organization#hasProject";
	static final String HASPRODUCT="http://www.smartdeveloperhub.org/vocabulary/organization#hasProduct";
	static final String HASMEMBER ="http://www.smartdeveloperhub.org/vocabulary/organization#hasMember";
	static final String MEMBERSHIP = "http://www.smartdeveloperhub.org/vocabulary/organization#membership";

	static final String SKOSCONCEPT = "http://www.w3.org/2004/02/skos/core#Concept";
	static final String LABEL = "http://www.w3.org/2000/01/rdf-schema#label";

	static final String PROJECTID = "http://www.smartdeveloperhub.org/vocabulary/organization#id";
	static final String PERSONID = "http://www.smartdeveloperhub.org/vocabulary/organization#id";

	static final String ORGPOSITION = "http://www.smartdeveloperhub.org/vocabulary/organization#organizationPosition";
	static final String ORGROLE = "http://www.smartdeveloperhub.org/vocabulary/organization#organizationRole";

	static final String DEPICTION = "http://xmlns.com/foaf/0.1/depiction";
	static final String IMAGE_CLASS = "http://xmlns.com/foaf/0.1/Image";
	static final String DEPICTS = "http://xmlns.com/foaf/0.1/depicts";

}


text:
#ifndef FLATCC_H
#define FLATCC_H

/*
 * This is the primary `flatcc` interface when compiling `flatcc` as a
 * library. Functions and types in the this interface will be kept
 * stable to the extend possible or reasonable, but do not rely on other
 * interfaces except "config.h" used to set default options for this
 * interface.
 *
 * This interface is unrelated to the standalone flatbuilder library
 * which has a life of its own.
 */

#ifndef UINT8_MAX
#include <stdint.h>
#endif

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4820) /* x bytes padding added in struct */
#endif

typedef struct flatcc_options flatcc_options_t;
typedef void (*flatcc_error_fun) (void *err_ctx, const char *buf, int len);

struct flatcc_options {
    size_t max_schema_size;
    int max_include_depth;
    int max_include_count;
    int disable_includes;
    int allow_boolean_conversion;
    int allow_enum_key;
    int allow_enum_struct_field;
    int allow_multiple_key_fields;
    int allow_scan_for_all_fields;
    int allow_string_key;
    int allow_struct_field_deprecate;
    int allow_struct_field_key;
    int allow_struct_root;
    int ascending_enum;
    int hide_later_enum;
    int hide_later_struct;
    int offset_size;
    int voffset_size;
    int utype_size;
    int bool_size;
    int require_root_type;
    int strict_enum_init;
    uint64_t vt_max_count;

    const char *default_schema_ext;
    const char *default_bin_schema_ext;
    const char *default_bin_ext;

    /* Code Generator specific options. */
    int gen_stdout;
    int gen_dep;

    const char *gen_depfile;
    const char *gen_deptarget;
    const char *gen_outfile;

    int gen_append;

    int cgen_pad;
    int cgen_sort;
    int cgen_pragmas;

    int cgen_common_reader;
    int cgen_common_builder;
    int cgen_reader;
    int cgen_builder;
    int cgen_verifier;
    int cgen_json_parser;
    int cgen_json_printer;
    int cgen_recursive;
    int cgen_spacing;

    int bgen_bfbs;
    int bgen_qualify_names;
    int bgen_length_prefix;

    /* Namespace args - these can override defaults so are null by default. */
    const char *ns;
    const char *nsc;

    const char **inpaths;
    const char **srcpaths;
    int inpath_count;
    int srcpath_count;
    const char *outpath;
};

/* Runtime configurable optoins. */
void flatcc_init_options(flatcc_options_t *opts);

typedef void *flatcc_context_t;

/*
 * Call functions below in order listed one at a time.
 * Each parse requires a new context.
 *
 * A reader file is named after the source base name, e.g.
 * `monster.fbs` becomes `monster.h`. Builders are optional and created
 * as `monster_builder.h`. A reader require a common header
 * `flatbuffers_commoner.h` and a builder requires
 * `flatbuffers_common_builder.h` in addition to the reader filers.  A
 * reader need no other source, but builders must link with the
 * `flatbuilder` library and include files in `include/flatbuffers`.
 *
 * All the files may also be concatenated into one single file and then
 * files will not be attempted included externally. This can be used
 * with stdout output. The common builder can follow the common
 * reader immediately, or at any later point before the first builder.
 * The common files should only be included once, but not harm is done
 * if duplication occurs.
 *
 * The outpath is prefixed every output filename. The containing
 * directory must exist, but the prefix may have text following
 * the directory, for example the namespace. If outpath = "stdout",
 * files are generated to stdout.
 *
 * Note that const char * options must remain valid for the lifetime
 * of the context since they are not copied. The options object itself
 * is not used after initialization and may be reused.
*/

/*
 * `name` is the name of the schema file or buffer. If it is path, the
 * basename is extracted (leading path stripped), and the default schema
 * extension is stripped if present. The resulting name is used
 * internally when generating output files. Typically the `name`
 * argument will be the same as a schema file path given to
 * `flatcc_parse_file`, but it does not have to be.
 *
 * `name` may be null if only common files are generated.
 *
 * `error_out` is an optional error handler. If null output is truncated
 * to a reasonable size and sent to stderr. `error_ctx` is provided as
 * first argument to `error_out` if `error_out` is non-zero, otherwise
 * it is ignored.
 *
 * Returns context or null on error.
 */
flatcc_context_t flatcc_create_context(flatcc_options_t *options, const char *name,
        flatcc_error_fun error_out, void *error_ctx);

/* Like `flatcc_create_context`, but with length argument for name. */
/*
 * Parse is optional - not needed for common files. If the input buffer version
 * is called, the buffer must be zero terminated, otherwise an input
 * path can be specified. The output path can be null.
 *
 * Only one parse can be called per context.
 *
 * The buffer size is limited to the max_schema_size option unless it is
 * 0. The default is reasonable size like 64K depending on config flags.
 *
 * The buffer must remain valid for the duration of the context.
 *
 * The schema cannot contain include statements when parsed as a buffer.
 *
 * Returns 0 on success.
 */
int flatcc_parse_buffer(flatcc_context_t ctx, const char *buf, size_t buflen);

/*
 * If options contain a non-zero `inpath` option, the resulting filename is
 * prefixed with that path unless the filename is an absolute path.
 *
 * Errors are sent to the error handler given during initialization,
 * or to stderr.
 *
 * The file size is limited to the max_schema_size option unless it is
 * 0. The default is reasonable size like 64K depending on config flags.
 *
 * Returns 0 on success.
 */
int flatcc_parse_file(flatcc_context_t ctx, const char *filename);

/*
 * Generate output files. The basename derived when the context was
 * created is used used to name the output files with respective
 * extensions. If the outpath option is not null it is prefixed the
 * output files. The `cgen_common_reader, cgen_common_builder,
 * cgen_reader, and cgen_builder` must be set or reset depending on what
 * is to be generated. The common files do not require a parse, and the
 * non-common files require a successfull parse or the result is
 * undefined.
 *
 * Unlinke the parser, the code generator produce errors to stderr
 * always. These errors are rare, such as using too long namespace
 * names.
 *
 * If the `gen_stdout` option is set, all files are generated to stdout.
 * In this case it is unwise to mix C and binary schema output options.
 *
 * If `bgen_bfbs` is set, a binary schema is generated to a file with
 * the `.bfbs` extension. See also `flatcc_generate_binary_schema` for
 * further details. Only `flatcc_generate_files` is called via the
 * `flatcc` cli command.
 *
 * The option `bgen_length_prefix` option will cause a length prefix to be
 * written to the each output binary schema. This option is only
 * understood when writing to files.
 *
 * Returns 0 on success.
 */
int flatcc_generate_files(flatcc_context_t ctx);

/*
 * Returns a buffer with a binary schema for a previous parse.
 * The user is responsible for calling `free` on the returned buffer
 * unless it returns 0 on error.
 *
 * Can be called instead of generate files, before, or after, but a
 * schema must be parsed first.
 *
 * Returns a binary schema in `reflection.fbs` format. Any included
 * files will be contained in the schema and there are no separate
 * schema files for included schema.
 *
 * All type names are scoped, mening that they are refixed their
 * namespace using `.` as the namespace separator, for example:
 * "MyGame.Example.Monster". Note that the this differs from the current
 * `flatc` compiler which does not prefix names. Enum names are not
 * scoped, but the scope is implied by the containing enum type.
 * The option `bgen_qualify_names=0` changes this behavior.
 *
 * If the default option `ascending_enum` is disabled, the `flatcc` will
 * accept duplicate values and overlapping ranges like the C programming
 * language. In this case enum values in the binary schema will not be
 * searchable. At any rate enum names are not searchable in the current
 * schema format.
 *
 */
void *flatcc_generate_binary_schema(flatcc_context_t ctx, size_t *size);

/*
 * Similar to `flatcc_generate_binary_schema` but copies the binary
 * schema into a user supplied buffer. If the buffer is too small
 * the return value will be negative and the buffer content undefined.
 */
int flatcc_generate_binary_schema_to_buffer(flatcc_context_t ctx, void *buf, size_t bufsiz);

/* Must be called to deallocate resources eventually - it valid but
 * without effect to call with a null context. */
void flatcc_destroy_context(flatcc_context_t ctx);

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif /* FLATCC_H */


text:
layout: page
title: Schwartz Family Reunion
date: 2016-05-24
author: James Chang
tags: weekly links, java
status: published
summary: Suspendisse laoreet porttitor suscipit. Ut.
banner: images/banner/leisure-02.jpg
booking:
  startDate: 07/18/2016
  endDate: 07/22/2016
  ctyhocn: MKCHSHX
  groupCode: SFR
published: true
---
Aenean fermentum sapien risus, eu iaculis ex faucibus sagittis. Fusce pellentesque dolor ac turpis gravida bibendum. Sed non lobortis leo. Fusce molestie, erat sed auctor tempor, eros nunc euismod odio, vitae lobortis massa felis consequat tellus. Sed ac consequat velit. Duis lobortis mi lacus, eget rhoncus nisi feugiat id. Morbi sed tortor odio. Etiam ut risus dignissim, ornare odio nec, consequat risus. Pellentesque porttitor eros eget gravida efficitur. Nulla porta eros a egestas interdum. Ut in tortor at sapien pretium sodales in vel erat. Duis dui leo, finibus sed fringilla et, elementum in augue. Integer odio augue, elementum vehicula iaculis vitae, maximus id dolor. Aenean eleifend tortor ut tortor semper, at vehicula erat convallis. In malesuada interdum ex vitae pretium. Aenean laoreet semper leo, eu pharetra ligula maximus sed.

* Etiam molestie tortor non nisi bibendum, in ornare libero pulvinar
* Fusce posuere elit at sapien pellentesque dapibus
* Ut finibus purus vel mauris aliquam varius
* Phasellus id enim cursus, suscipit tortor ac, luctus risus
* Morbi tincidunt mauris nec mattis pulvinar.

Sed vulputate semper tellus, a sollicitudin dolor convallis ac. Nulla blandit, augue nec pellentesque dapibus, velit mauris suscipit neque, eget tempus mi odio eu enim. Proin diam massa, aliquam id euismod ac, fermentum quis est. Sed blandit tellus eget est hendrerit euismod. Nullam quis quam pulvinar, congue velit id, dapibus tellus. Nunc orci nulla, gravida blandit pharetra elementum, blandit at ligula. Etiam maximus ornare iaculis.
Maecenas fringilla quam lectus, in ultrices elit scelerisque sit amet. Nullam in blandit ligula. Phasellus vulputate sem id cursus tempor. Maecenas sit amet ipsum et augue ultricies suscipit. Aenean a urna eu justo hendrerit tempus nec a augue. Etiam urna nulla, vehicula ac bibendum at, pulvinar maximus lacus. Suspendisse vitae dapibus diam. Fusce in gravida ligula. Sed sed auctor ipsum. In eu leo sed ex molestie egestas. Curabitur porttitor et ex sit amet efficitur.


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/tracing/trace.proto

package com.google.tracing.v1;

public interface StackTraceOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.tracing.v1.StackTrace)
    com.google.protobuf.MessageOrBuilder {

  /**
   *

   * Stack frames of this stack trace.
   *

   *
   * repeated .google.tracing.v1.StackTrace.StackFrame stack_frame = 1;
   */
  java.util.List<com.google.tracing.v1.StackTrace.StackFrame>
      getStackFrameList();
  /**
   *

   * Stack frames of this stack trace.
   *

   *
   * repeated .google.tracing.v1.StackTrace.StackFrame stack_frame = 1;
   */
  com.google.tracing.v1.StackTrace.StackFrame getStackFrame(int index);
  /**
   *

   * Stack frames of this stack trace.
   *

   *
   * repeated .google.tracing.v1.StackTrace.StackFrame stack_frame = 1;
   */
  int getStackFrameCount();
  /**
   *

   * Stack frames of this stack trace.
   *

   *
   * repeated .google.tracing.v1.StackTrace.StackFrame stack_frame = 1;
   */
  java.util.List<? extends com.google.tracing.v1.StackTrace.StackFrameOrBuilder>
      getStackFrameOrBuilderList();
  /**
   *

   * Stack frames of this stack trace.
   *

   *
   * repeated .google.tracing.v1.StackTrace.StackFrame stack_frame = 1;
   */
  com.google.tracing.v1.StackTrace.StackFrameOrBuilder getStackFrameOrBuilder(
      int index);

  /**
   *

   * User can choose to use his own hash function to hash large labels to save
   * network bandwidth and storage.
   * Typical usage is to pass both initially to inform the storage of the
   * mapping. And in subsequent calls, pass in stack_trace_hash_id only.
   * User shall verify the hash value is successfully stored.
   *

   *
   * optional uint64 stack_trace_hash_id = 2;
   */
  long getStackTraceHashId();
}


text:
///<reference path="APIRequest.ts"/>
///<reference path="APIResponse.ts"/>
///<reference path="BaseNotificationBridge.ts"/>
///<reference path="CommonUtil.ts"/>
///<reference path="IAdaptiveRPGroup.ts"/>
///<reference path="IBaseNotification.ts"/>
///<reference path="INotificationLocal.ts"/>
module Adaptive {

     /**
        @class Adaptive.NotificationLocalBridge
        @extends Adaptive.BaseNotificationBridge
        Interface for Managing the Local Notifications operations

        @author Carlos Lozano Diez
        @since v2.0
     */
     export class NotificationLocalBridge extends BaseNotificationBridge implements INotificationLocal {

          /**
             @method constructor
             Default constructor.
          */
          constructor() {
               super();
          }
     }
}
/**
------------------------------------| Engineered with ♥ in Barcelona, Catalonia |--------------------------------------
*/


text:
import { Component, OnInit, OnDestroy, Input } from '@angular/core';
import { Router } from '@angular/router';

import { IUser, User } from '../../../model';
import { UserService } from '../../../services'

import { Observable } from 'rxjs/Observable'
import { Subscription } from 'rxjs/Subscription';

/**
 * The form for logging in a user. This form requires a valid email/password
 * combination before it can be submitted. #user represents the user
 * credentials that user is inputting. #login() is called when the form is
 * valid and the uesr presses "Submit"
 */
@Component({
  selector: 'butter-login',
  templateUrl: './login.component.html',
  styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit, OnDestroy {
  private loginSub : Subscription;
  invalidCredentials: boolean;
  errorMessage : string;

	user: IUser = {
    email: "",
    password: ""
  };

  constructor(private router : Router, private userService: UserService) { }

  ngOnInit() : void {
  }

  ngOnDestroy() : void {
    // prevent memory leaks in case this call is still active.
    this.loginSub.unsubscribe();
  }

  /**
   * The user has inputted a valid email/password combo. Check the credentials.
   */
  login() : void {
  	this.loginSub = this.userService.login(this.user)
      .subscribe((session) => {
        this.router.navigateByUrl(`/user/${session.userId}/pantry`);
      }, (error) => {
        this.errorMessage = error;
        this.invalidCredentials = true;
      });

   }

}


text:
extern NSString * const kTwitterStorageOfMainBundlePath;

typedef NS_ENUM(NSUInteger, UtilityStoreType) {
    UtilityStoreTypeSQLite,
    UtilityStoreTypeBinary,
    UtilityStoreTypeInMemory,
    UtilityStoreType_MAX,
};

@interface Utility : NSObject

+ (void)commonSettins;
+ (void)cleanUpAllDatabase;

+ (YSCoreData*)coreDataWithStoreType:(UtilityStoreType)storeType;
+ (TwitterStorage*)twitterStorageWithStoreType:(UtilityStoreType)storeType;
+ (TwitterStorage*)twitterStorageOfMainBundle;

+ (NSArray*)allStoreType;
+ (void)enumerateAllCoreDataUsingBlock:(void(^)(YSCoreData *coreData))block;
+ (void)enumerateAllTwitterStorageUsingBlock:(void(^)(TwitterStorage *twitterStorage))block;

+ (NSString*)coreDataFileNameWithStoreType:(UtilityStoreType)storeType;
+ (NSString*)twitterStorageFileNameWithStoreType:(UtilityStoreType)storeType;

+ (NSString*)coreDataDocumentPathWithStoreType:(UtilityStoreType)storeType;
+ (NSString*)twitterStorageDocumentPathWithStoreType:(UtilityStoreType)storeType;
+ (NSString*)twitterStorageMainBundlePath;

+ (NSArray*)tweetsWithCount:(int64_t)count;
+ (void)addTweetsWithTwitterStorage:(TwitterStorage*)storage
                              count:(int64_t)count;
+ (void)addTweetWithTwitterStorage:(TwitterStorage*)storage
                  tweetJsonObjects:(NSArray*)tweetJsonObjects;
+ (NSArray*)fetchAllTweetsWithTwitterStorage:(TwitterStorage*)twitterStorage;

@end


text:
using ReactiveUI;
using SN.ExceptionBrowser.Applications.MVVM.ViewModels.Issues;

namespace SN.ExceptionBrowser.Applications.MVVM.Views.Issues
{
    public interface IIssueDetailView : IViewFor<IIssueDetailViewModel>
    {
    }
}


text:
// Copyright (c) Lex Li. All rights reserved.
//
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using Microsoft.Web.Management.Server;

namespace Microsoft.Web.Management.Client
{
    public interface IConnectionBuilder
    {
        ConnectionInfo BuildConnection(
            IServiceProvider serviceProvider,
            ManagementScope scope
            );

        ConnectionInfo BuildConnection(
            IServiceProvider serviceProvider,
            ConnectionInfo existingConnectionInfo,
            Exception connectionException
            );

        ConnectionInfo BuildFavorite(
            IServiceProvider serviceProvider,
            ManagementScope scope
            );
    }
}


text:
#pragma once
#include <aws/honeycode/Honeycode_EXPORTS.h>
#include <aws/honeycode/HoneycodeRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/honeycode/model/CreateRowData.h>
#include <utility>

namespace Aws
{
namespace Honeycode
{
namespace Model
{

  /**
   */
  class AWS_HONEYCODE_API BatchCreateTableRowsRequest : public HoneycodeRequest
  {
  public:
    BatchCreateTableRowsRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "BatchCreateTableRows"; }

    Aws::String SerializePayload() const override;

    /**
     *
The ID of the workbook where the new rows are being added.

 If a
     * workbook with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline const Aws::String& GetWorkbookId() const{ return m_workbookId; }

    /**
     *
The ID of the workbook where the new rows are being added.

 If a
     * workbook with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline bool WorkbookIdHasBeenSet() const { return m_workbookIdHasBeenSet; }

    /**
     *
The ID of the workbook where the new rows are being added.

 If a
     * workbook with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline void SetWorkbookId(const Aws::String& value) { m_workbookIdHasBeenSet = true; m_workbookId = value; }

    /**
     *
The ID of the workbook where the new rows are being added.

 If a
     * workbook with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline void SetWorkbookId(Aws::String&& value) { m_workbookIdHasBeenSet = true; m_workbookId = std::move(value); }

    /**
     *
The ID of the workbook where the new rows are being added.

 If a
     * workbook with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline void SetWorkbookId(const char* value) { m_workbookIdHasBeenSet = true; m_workbookId.assign(value); }

    /**
     *
The ID of the workbook where the new rows are being added.

 If a
     * workbook with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline BatchCreateTableRowsRequest& WithWorkbookId(const Aws::String& value) { SetWorkbookId(value); return *this;}

    /**
     *
The ID of the workbook where the new rows are being added.

 If a
     * workbook with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline BatchCreateTableRowsRequest& WithWorkbookId(Aws::String&& value) { SetWorkbookId(std::move(value)); return *this;}

    /**
     *
The ID of the workbook where the new rows are being added.

 If a
     * workbook with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline BatchCreateTableRowsRequest& WithWorkbookId(const char* value) { SetWorkbookId(value); return *this;}

    /**
     *
The ID of the table where the new rows are being added.

 If a table
     * with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline const Aws::String& GetTableId() const{ return m_tableId; }

    /**
     *
The ID of the table where the new rows are being added.

 If a table
     * with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline bool TableIdHasBeenSet() const { return m_tableIdHasBeenSet; }

    /**
     *
The ID of the table where the new rows are being added.

 If a table
     * with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline void SetTableId(const Aws::String& value) { m_tableIdHasBeenSet = true; m_tableId = value; }

    /**
     *
The ID of the table where the new rows are being added.

 If a table
     * with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline void SetTableId(Aws::String&& value) { m_tableIdHasBeenSet = true; m_tableId = std::move(value); }

    /**
     *
The ID of the table where the new rows are being added.

 If a table
     * with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline void SetTableId(const char* value) { m_tableIdHasBeenSet = true; m_tableId.assign(value); }

    /**
     *
The ID of the table where the new rows are being added.

 If a table
     * with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline BatchCreateTableRowsRequest& WithTableId(const Aws::String& value) { SetTableId(value); return *this;}

    /**
     *
The ID of the table where the new rows are being added.

 If a table
     * with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline BatchCreateTableRowsRequest& WithTableId(Aws::String&& value) { SetTableId(std::move(value)); return *this;}

    /**
     *
The ID of the table where the new rows are being added.

 If a table
     * with the specified ID could not be found, this API throws
     * ResourceNotFoundException.

     */
    inline BatchCreateTableRowsRequest& WithTableId(const char* value) { SetTableId(value); return *this;}

    /**
     *
 The list of rows to create at the end of the table. Each item in this list
     * needs to have a batch item id to uniquely identify the element in the request
     * and the cells to create for that row. You need to specify at least one item in
     * this list.

 Note that if one of the column ids in any of the rows in the
     * request does not exist in the table, then the request fails and no updates are
     * made to the table.

     */
    inline const Aws::Vector<CreateRowData>& GetRowsToCreate() const{ return m_rowsToCreate; }

    /**
     *
 The list of rows to create at the end of the table. Each item in this list
     * needs to have a batch item id to uniquely identify the element in the request
     * and the cells to create for that row. You need to specify at least one item in
     * this list.

 Note that if one of the column ids in any of the rows in the
     * request does not exist in the table, then the request fails and no updates are
     * made to the table.

     */
    inline bool RowsToCreateHasBeenSet() const { return m_rowsToCreateHasBeenSet; }

    /**
     *
 The list of rows to create at the end of the table. Each item in this list
     * needs to have a batch item id to uniquely identify the element in the request
     * and the cells to create for that row. You need to specify at least one item in
     * this list.

 Note that if one of the column ids in any of the rows in the
     * request does not exist in the table, then the request fails and no updates are
     * made to the table.

     */
    inline void SetRowsToCreate(const Aws::Vector<CreateRowData>& value) { m_rowsToCreateHasBeenSet = true; m_rowsToCreate = value; }

    /**
     *
 The list of rows to create at the end of the table. Each item in this list
     * needs to have a batch item id to uniquely identify the element in the request
     * and the cells to create for that row. You need to specify at least one item in
     * this list.

 Note that if one of the column ids in any of the rows in the
     * request does not exist in the table, then the request fails and no updates are
     * made to the table.

     */
    inline void SetRowsToCreate(Aws::Vector<CreateRowData>&& value) { m_rowsToCreateHasBeenSet = true; m_rowsToCreate = std::move(value); }

    /**
     *
 The list of rows to create at the end of the table. Each item in this list
     * needs to have a batch item id to uniquely identify the element in the request
     * and the cells to create for that row. You need to specify at least one item in
     * this list.

 Note that if one of the column ids in any of the rows in the
     * request does not exist in the table, then the request fails and no updates are
     * made to the table.

     */
    inline BatchCreateTableRowsRequest& WithRowsToCreate(const Aws::Vector<CreateRowData>& value) { SetRowsToCreate(value); return *this;}

    /**
     *
 The list of rows to create at the end of the table. Each item in this list
     * needs to have a batch item id to uniquely identify the element in the request
     * and the cells to create for that row. You need to specify at least one item in
     * this list.

 Note that if one of the column ids in any of the rows in the
     * request does not exist in the table, then the request fails and no updates are
     * made to the table.

     */
    inline BatchCreateTableRowsRequest& WithRowsToCreate(Aws::Vector<CreateRowData>&& value) { SetRowsToCreate(std::move(value)); return *this;}

    /**
     *
 The list of rows to create at the end of the table. Each item in this list
     * needs to have a batch item id to uniquely identify the element in the request
     * and the cells to create for that row. You need to specify at least one item in
     * this list.

 Note that if one of the column ids in any of the rows in the
     * request does not exist in the table, then the request fails and no updates are
     * made to the table.

     */
    inline BatchCreateTableRowsRequest& AddRowsToCreate(const CreateRowData& value) { m_rowsToCreateHasBeenSet = true; m_rowsToCreate.push_back(value); return *this; }

    /**
     *
 The list of rows to create at the end of the table. Each item in this list
     * needs to have a batch item id to uniquely identify the element in the request
     * and the cells to create for that row. You need to specify at least one item in
     * this list.

 Note that if one of the column ids in any of the rows in the
     * request does not exist in the table, then the request fails and no updates are
     * made to the table.

     */
    inline BatchCreateTableRowsRequest& AddRowsToCreate(CreateRowData&& value) { m_rowsToCreateHasBeenSet = true; m_rowsToCreate.push_back(std::move(value)); return *this; }

    /**
     *
 The request token for performing the batch create operation. Request tokens
     * help to identify duplicate requests. If a call times out or fails due to a
     * transient error like a failed network connection, you can retry the call with
     * the same request token. The service ensures that if the first call using that
     * request token is successfully performed, the second call will not perform the
     * operation again.

 Note that request tokens are valid only for a few
     * minutes. You cannot use request tokens to dedupe requests spanning hours or
     * days.

     */
    inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; }

    /**
     *
 The request token for performing the batch create operation. Request tokens
     * help to identify duplicate requests. If a call times out or fails due to a
     * transient error like a failed network connection, you can retry the call with
     * the same request token. The service ensures that if the first call using that
     * request token is successfully performed, the second call will not perform the
     * operation again.

 Note that request tokens are valid only for a few
     * minutes. You cannot use request tokens to dedupe requests spanning hours or
     * days.

     */
    inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }

    /**
     *
 The request token for performing the batch create operation. Request tokens
     * help to identify duplicate requests. If a call times out or fails due to a
     * transient error like a failed network connection, you can retry the call with
     * the same request token. The service ensures that if the first call using that
     * request token is successfully performed, the second call will not perform the
     * operation again.

 Note that request tokens are valid only for a few
     * minutes. You cannot use request tokens to dedupe requests spanning hours or
     * days.

     */
    inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; }

    /**
     *
 The request token for performing the batch create operation. Request tokens
     * help to identify duplicate requests. If a call times out or fails due to a
     * transient error like a failed network connection, you can retry the call with
     * the same request token. The service ensures that if the first call using that
     * request token is successfully performed, the second call will not perform the
     * operation again.

 Note that request tokens are valid only for a few
     * minutes. You cannot use request tokens to dedupe requests spanning hours or
     * days.

     */
    inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); }

    /**
     *
 The request token for performing the batch create operation. Request tokens
     * help to identify duplicate requests. If a call times out or fails due to a
     * transient error like a failed network connection, you can retry the call with
     * the same request token. The service ensures that if the first call using that
     * request token is successfully performed, the second call will not perform the
     * operation again.

 Note that request tokens are valid only for a few
     * minutes. You cannot use request tokens to dedupe requests spanning hours or
     * days.

     */
    inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); }

    /**
     *
 The request token for performing the batch create operation. Request tokens
     * help to identify duplicate requests. If a call times out or fails due to a
     * transient error like a failed network connection, you can retry the call with
     * the same request token. The service ensures that if the first call using that
     * request token is successfully performed, the second call will not perform the
     * operation again.

 Note that request tokens are valid only for a few
     * minutes. You cannot use request tokens to dedupe requests spanning hours or
     * days.

     */
    inline BatchCreateTableRowsRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;}

    /**
     *
 The request token for performing the batch create operation. Request tokens
     * help to identify duplicate requests. If a call times out or fails due to a
     * transient error like a failed network connection, you can retry the call with
     * the same request token. The service ensures that if the first call using that
     * request token is successfully performed, the second call will not perform the
     * operation again.

 Note that request tokens are valid only for a few
     * minutes. You cannot use request tokens to dedupe requests spanning hours or
     * days.

     */
    inline BatchCreateTableRowsRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;}

    /**
     *
 The request token for performing the batch create operation. Request tokens
     * help to identify duplicate requests. If a call times out or fails due to a
     * transient error like a failed network connection, you can retry the call with
     * the same request token. The service ensures that if the first call using that
     * request token is successfully performed, the second call will not perform the
     * operation again.

 Note that request tokens are valid only for a few
     * minutes. You cannot use request tokens to dedupe requests spanning hours or
     * days.

     */
    inline BatchCreateTableRowsRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;}

  private:

    Aws::String m_workbookId;
    bool m_workbookIdHasBeenSet;

    Aws::String m_tableId;
    bool m_tableIdHasBeenSet;

    Aws::Vector<CreateRowData> m_rowsToCreate;
    bool m_rowsToCreateHasBeenSet;

    Aws::String m_clientRequestToken;
    bool m_clientRequestTokenHasBeenSet;
  };

} // namespace Model
} // namespace Honeycode
} // namespace Aws


text:
AGImagePickerController is a image picker, support photos multiple choice, to support large map slipping preview, support zoom preview, support for horizontal and vertical screen, supports all iOS devices

AGImagePickerController是一个图片选择器,支持图片多选,支持大图横滑预览,支持放大预览,支持横竖屏,支持所有的iOS设备。

![Screenshot](https://dl.dropboxusercontent.com/u/59801943/Screenshots/AGImagePickerController-1.png)
![Screenshot](https://dl.dropboxusercontent.com/u/59801943/Screenshots/AGImagePickerController-2.png)
![Screenshot](https://dl.dropboxusercontent.com/u/59801943/Screenshots/AGImagePickerController-3.png)
![Screenshot](https://dl.dropboxusercontent.com/u/59801943/Screenshots/AGImagePickerController-4.png)
![Screenshot](https://dl.dropboxusercontent.com/u/59801943/Screenshots/AGImagePickerController-5.png)

### Usage(用法)

``` objective-c
    self.selectedPhotos = [NSMutableArray array];

    __block AGViewController *blockSelf = self;

    ipc = [AGImagePickerController sharedInstance:self];
    ipc.didFailBlock = ^(NSError *error) {
        NSLog(@"Fail. Error: %@", error);

        if (error == nil) {
            [blockSelf.selectedPhotos removeAllObjects];
            NSLog(@"User has cancelled.");

            [blockSelf dismissModalViewControllerAnimated:YES];
        } else {

            // We need to wait for the view controller to appear first.
            double delayInSeconds = 0.5;
            dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
            dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
                [blockSelf dismissModalViewControllerAnimated:YES];
            });
        }

        [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];

    };
    ipc.didFinishBlock = ^(NSArray *info) {
        [blockSelf.selectedPhotos setArray:info];

        NSLog(@"Info: %@", info);
        [blockSelf dismissModalViewControllerAnimated:YES];

        [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
    };
```

## Contact(联系)

- [https://github.com/SpringOx](https://github.com/SpringOx)(GitHub)
- [jiachunke@gmail.com](jiachunke@gmail.com)(Email)


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package MotifSearch_H;

import java.util.ArrayList;
import java.util.HashMap;

/**
 *
 * @author ZHAO Qi
 * @date 2014-11-7 13:03:09
 * @version 1.6.0
 */
public class getKmer {

    public static ArrayList<Kmer> getkmerlist(String seqname, String str, int length) {
        ArrayList<Kmer> klist = new ArrayList<Kmer>();
        String tempstr = null;
        for (int i = 0; i < str.length() - length + 1; i++) {
            tempstr = str.substring(i, i + length);
            Kmer kmer = new Kmer(seqname, i, i + length, tempstr);
            klist.add(kmer);
        }
        return klist;
    }

    public HashMap<String, kmerFre> getkmerFrelist(String seqname, String str, int length) {
        HashMap<String, kmerFre> kmap = new HashMap<String, kmerFre>();
        String tempstr = null;

        int totalcount = str.length() - length + 1;
        for (int i = 0; i < str.length() - length + 1; i++) {
//            totalcount++;
            tempstr = str.substring(i, i + length);
            if (kmap.keySet().contains(tempstr)) {
                kmap.get(tempstr).setCount();
//               if(tempstr.equals("GCCGGC")){
//                   System.out.println(i+"\t"+(i+ length));
//               }
            } else {
//                if(tempstr.equals("GCCGGC")){
//                   System.out.println(i+"\t"+(i+ length));
//               }
                kmerFre kmerfre = new kmerFre(seqname, i, i + length, tempstr, totalcount);
                kmerfre.setCount();
                kmap.put(tempstr, kmerfre);
            }

        }
        return kmap;
    }
}


text:
package com.appleframework.jms.rocketmq;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:config/spring-consumer.xml" })
public class RocketMessageConsumerTest2 {

	@Test
	public void testAddOpinion1() {
		try {
			System.in.read();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}


text:
project_path: /web/_project.yaml
book_path: /web/fundamentals/_book.yaml
description: Layar sentuh tersedia pada semakin banyak perangkat, dari ponsel hingga layar desktop. Aplikasi Anda harus merespons setiap sentuhan secara intuitif dan indah.

{# wf_updated_on: 2014-01-06 #}
{# wf_published_on: 2014-01-01 #}

# Menambahkan Sentuhan Ke Situs Anda {: .page-title }

{% include "web/_shared/contributors/mattgaunt.html" %}

Layar sentuh tersedia pada semakin banyak perangkat, mulai dari ponsel hingga
layar desktop. Ketika pengguna memilih untuk berinteraksi dengan UI Anda, aplikasi
harus merespons setiap sentuhan secara intuitif.

## Merespons status elemen

Apakah Anda pernah menyentuh atau mengeklik elemen pada laman web dan bertanya-tanya
apakah situs itu benar-benar mendeteksi tindakan tersebut?

Cukup ubah warna elemen saat pengguna menyentuh atau berinteraksi dengan bagian
UI untuk memberikan jaminan kembali bahwa situs Anda bekerja. Hal ini tidak hanya
mengurangi frustrasi, tapi juga bisa memberikan kesan cepat dan responsif.

Elemen DOM bisa mewarisi salah satu status berikut: default, focus, hover
dan active. Untuk mengubah UI masing-masing status, kita perlu menerapkan gaya
ke kelas pseudo berikut `:hover`, `:focus` dan `:active` seperti yang ditampilkan di bawah ini:

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/states-example.html" region_tag="btnstates" adjust_indentation="auto" %}

[Cobalah](https://googlesamples.github.io/web-fundamentals/fundamentals/design-and-ui/input/touch/states-example.html){: target="_blank" .external }

![Gambar yang mengilustrasikan perbedaan warna untuk status
tombol](images/button-states.png)

Pada kebanyakan browser seluler, status *hover* dan/atau *focus* akan diterapkan ke elemen
setelah diketuk.

Pertimbangkan dengan hati-hati gaya yang Anda setel dan bagaimana mereka akan terlihat oleh pengguna setelah
menyelesaikan sentuhan mereka.

Catatan: Tag anchor dan tombol mungkin memiliki perilaku berbeda
di browser yang berbeda, jadi asumsikan dalam beberapa kasus **hover**
akan aktif dan di kejadian lainnya **focus** yang akan aktif.

### Meredam gaya browser default

Setelah Anda menambahkan gaya untuk status yang berbeda, Anda akan melihat bahwa kebanyakan browser
mengimplementasikan gaya mereka sendiri dalam merespons sentuhan pengguna. Hal ini terutama
karena saat pertama kali perangkat seluler diluncurkan, sejumlah situs tidak
memiliki penataan gaya untuk status `:active`. Akibatnya, banyak browser menambahkan
warna sorot atau gaya tambahan untuk memberikan masukan bagi pengguna.

Kebanyakan browser menggunakan properti CSS `outline` untuk menampilkan sebuah lingkaran di sekeliling
elemen saat elemen difokuskan. Anda bisa meredamnya dengan:

    .btn:focus {
      outline: 0;

      // Add replacement focus styling here (i.e. border)
    }

Safari dan Chrome menambahkan warna sorot ketuk yang bisa dicegah dengan properti CSS
`-webkit-tap-highlight-color`:

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/states-example.html" region_tag="webkit-specific" adjust_indentation="auto" %}

[Cobalah](https://googlesamples.github.io/web-fundamentals/fundamentals/design-and-ui/input/touch/states-example.html){: target="_blank" .external }

Internet Explorer pada Windows Phone memiliki perilaku yang serupa, namun diredam
melalui tag meta:

    <meta name="msapplication-tap-highlight" content="no">

Firefox memiliki dua efek samping yang harus diatasi.

Kelas pseudo `-moz-focus-inner`, yang menambahkan outline pada
elemen bisa disentuh, dapat Anda buang dengan menyetel `border: 0`.

Jika Anda menggunakan elemen `<button>` pada Firefox, Anda mendapat penerapan
sebuah gradien, yang bisa Anda buang dengan menyetel `background-image: none`.

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/states-example.html" region_tag="ff-specific" adjust_indentation="auto" %}

[Cobalah](https://googlesamples.github.io/web-fundamentals/fundamentals/design-and-ui/input/touch/states-example.html){: target="_blank" .external }

Perhatian: Hanya redam gaya default yang disebutkan di atas jika Anda memiliki kelas-kelas
pseudo untuk `:hover`, `:active` dan `:focus`!

### Menonaktifkan user-select

Ketika membuat UI, mungkin ada skenario di mana Anda menginginkan pengguna
agar berinteraksi dengan elemen namun ingin Anda redam perilaku defaultnya yaitu
memilih teks dengan tekan lama atau menyeret mouse di atas UI.

Anda bisa melakukannya dengan properti CSS `user-select`, tapi waspadalah bahwa
melakukan ini pada materi bisa **sangat** menyebalkan
pengguna jika mereka *ingin* memilih teks dalam elemen.
Jadi, pastikan Anda menggunakannya dengan hati-hati dan secukupnya.

    user-select: none;

## Mengimplementasikan isyarat khusus

Jika Anda memiliki gagasan untuk interaksi dan isyarat khusus untuk situs Anda, ada
dua hal yang harus diingat:

1. Cara mendukung semua browser.
1. Cara menjaga laju bingkai Anda tetap tinggi.

Pada artikel ini, kita akan melihat secara seksama topik mencakup API yang harus
kita dukung untuk masuk ke semua browser dan kemudian membahas bagaimana menggunakan kejadian ini
dengan efisien.

Bergantung pada isyarat yang ingin dilakukan, Anda mungkin berharap
pengguna berinteraksi dengan satu elemen pada satu waktu *atau* Anda berharap mereka
bisa berinteraksi dengan beberapa elemen secara bersamaan.

Perhatian: Jangan lupa bahwa beberapa pengguna menginginkan masukan keyboard dan pengguna
yang menjalankan teknologi bantu pada perangkat layar sentuh mungkin tidak mampu
melakukan isyarat karena mereka dicegat/dikonsumsi oleh teknologi
bantu.

Kita akan melihat dua contoh dalam artikel ini, keduanya menunjukkan
dukungan untuk semua browser dan cara menjaga agar laju bingkai tetap tinggi.

![Contoh GIF sentuh pada dokumen](images/touch-document-level.gif){: .attempt-right }

Contoh pertama memungkinkan pengguna untuk berinteraksi dengan satu elemen. Untuk kasus
ini Anda mungkin menginginkan semua kejadian sentuh diberikan kepada satu elemen, selama
isyarat itu awalnya dimulai pada elemen itu sendiri. Misalnya, memindahkan
jari dari elemen yang bisa-digesek, masih tetap bisa mengontrol elemen.

Hal ini berguna karena menyediakan banyak fleksibilitas bagi pengguna, tetapi
memberlakukan pembatasan tentang bagaimana pengguna bisa berinteraksi dengan UI Anda.

![Contoh GIF sentuh pada elemen](images/touch-element-level.gif){: .attempt-right }

Namun, jika Anda berharap pengguna berinteraksi dengan beberapa elemen pada saat yang
bersamaan (menggunakan multi-touch), Anda harus membatasi sentuhan ke elemen
tertentu.

Ini lebih fleksibel bagi pengguna, namun mempersulit logika untuk memanipulasi
UI dan kurang tahan terhadap kesalahan pengguna.

### Menambahkan event listener

Di Chrome (versi 55 dan yang lebih baru), Internet Explorer & Edge,
`PointerEvents` adalah pendekatan yang direkomendasikan untuk mengimplementasikan isyarat khusus.

Di browser lainnya `TouchEvents` dan `MouseEvents` adalah pendekatan yang tepat.

Fitur menarik dari `PointerEvents` adalah bahwa itu menggabungkan beberapa tipe masukan,
termasuk kejadian mouse, sentuh dan pena, menjadi satu rangkaian
callback. Kejadian yang didengarkan adalah `pointerdown`, `pointermove`,
`pointerup` dan `pointercancel`.

Persamaan dengan browser lainnya adalah `touchstart`, `touchmove`,
`touchend` dan `touchcancel` untuk kejadian sentuh dan bila Anda ingin mengimplementasikan
isyarat yang sama untuk masukan mouse, Anda harus mengimplementasikan `mousedown`,
`mousemove`, dan `mouseup`.

Jika Anda memiliki pertanyaan tentang kejadian apa yang sebaiknya digunakan, silakan lihat tabel ini
[Kejadian sentuh, mouse dan pointer](#touch-mouse-and-pointer-events)).

Menggunakan kejadian ini membutuhkan pemanggilan metode `addEventListener()` pada elemen
DOM, bersama dengan nama kejadian, fungsi callback dan boolean.
Boolean menentukan apakah Anda harus menangkap kejadian sebelum atau sesudah
elemen lain memiliki kesempatan untuk menangkap dan menginterpretasikan
kejadian. (`true` berarti Anda menginginkan kejadian sebelum elemen lainnya.)

Berikut adalah contoh dari mendengarkan untuk memulai interaksi.

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html" region_tag="addlisteners" adjust_indentation="auto" %}

[Cobalah](https://googlesamples.github.io/web-fundamentals/fundamentals/design-and-ui/input/touch/touch-demo-1.html){: target="_blank" .external }

Catatan: Karena desain dari API, PointerEvents hanya memerlukan kejadian
`pointerdown` tunggal untuk menangani kejadian mouse dan sentuh.

#### Menangani interaksi elemen-tunggal

Dalam cuplikan kode pendek di atas kita hanya menambahkan awal event listener
untuk kejadian mouse. Alasan untuk hal ini adalah karena kejadian mouse hanya akan dipicu
ketika kursor di arahkan *ke atas* elemen yang ditambahkan event listener.

TouchEvents akan melacak isyarat setelah dimulai tanpa menghiraukan dari mana
kejadian sentuh terjadi dan PointerEvents akan melacak kejadian tanpa menghiraukan dari mana kejadian sentuh
terjadi saat kita memanggil `setPointerCapture` pada elemen DOM.

Untuk gerakan mouse dan kejadian akhir, kita menambahkan event listener *di* metode
awal isyarat dan menambahkan listener ke dokumen, sehingga
bisa melacak kursor sampai isyarat selesai.

Langkah-langkah yang harus diimplementasikan adalah:

1. Tambahkan semua listener TouchEvent dan PointerEvent. Untuk MouseEvents tambahkan **hanya**
   kejadian awal.
1. Di dalam callback isyarat awal, ikat gerakan mouse dan kejadian akhir ke
   dokumen. Dengan cara ini semua kejadian mouse akan diterima terlepas dari apakah
   kejadian itu terjadi pada elemen asli atau tidak. Untuk PointerEvents kita
   perlu memanggil `setPointerCapture()` pada elemen asli untuk menerima
   semua kejadian lebih lanjut. Kemudian tangani awal isyarat tersebut.
1. Tangani kejadian gerak.
1. Pada kejadian akhir, buang gerakan mouse dan listener akhir dari dokumen
   dan mengakhiri isyarat itu.

Berikut adalah cuplikan metode `handleGestureStart()` kami yang menambahkan kejadian gerak
dan kejadian akhir ke dokumen:

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html" region_tag="handle-start-gesture" adjust_indentation="auto" %}

[Cobalah](https://googlesamples.github.io/web-fundamentals/fundamentals/design-and-ui/input/touch/touch-demo-1.html){: target="_blank" .external }

Callback akhir yang kita tambahkan adalah `handleGestureEnd()`, yang membuang event listener gerak
dan event listener akhir dari dokumen dan melepaskan tangkapan penunjuk
ketika isyarat telah selesai seperti:

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html" region_tag="handle-end-gesture" adjust_indentation="auto" %}

[Cobalah](https://googlesamples.github.io/web-fundamentals/fundamentals/design-and-ui/input/touch/touch-demo-1.html){: target="_blank" .external }

Dengan mengikuti pola menambahkan kejadian gerak ke dokumen ini, jika
  pengguna mulai berinteraksi dengan elemen dan menggerakkan isyarat mereka di luar dari
  elemen, kita akan terus mendapatkan gerakan mouse terlepas dari posisi mereka
  di laman, karena kejadian sedang diterima dari dokumen.

Diagram ini menunjukkan apa yang dilakukan kejadian sentuh saat kita menambahkan kejadian
  gerak dan kejadian akhir ke dokumen setelah isyarat dimulai.

![Mengilustrasikan kejadian sentuh mengikat ke dokumen pada
`touchstart`](images/scroll-bottleneck.gif)

### Merespons sentuhan dengan efisien

Sekarang setelah kita membereskan kejadian awal dan akhir, kita bisa dengan benar
merespons kejadian sentuh.

Untuk setiap kejadian awal dan gerak, Anda bisa dengan mudah mengekstrak `x` dan `y`
dari sebuah kejadian.

Contoh berikut memeriksa apakah sebuah kejadian berasal dari `TouchEvent` dengan
memeriksa jika terdapat `targetTouches`. Jika memang begitu, maka itu mengekstrak
`clientX` dan `clientY` dari sentuhan pertama.
Jika kejadiannya adalah `PointerEvent` atau `MouseEvent`, itu mengekstrak `clientX` dan
`clientY` langsung dari kejadian itu sendiri.

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-2.html" region_tag="extract-xy" adjust_indentation="auto" %}

[Cobalah](https://googlesamples.github.io/web-fundamentals/fundamentals/design-and-ui/input/touch/touch-demo-2.html){: target="_blank" .external }

Sebuah `TouchEvent` memiliki tiga daftar yang berisi data sentuh:

* `touches`: daftar semua sentuhan saat ini di layar, terlepas dari
elemen DOM tempat mereka berada.
* `targetTouches`: daftar sentuhan kejadian
terikat pada elemen DOM saat ini.
* `changedTouches`: daftar sentuhan yang berubah sehingga menyebabkan kejadian
diaktifkan.

Umumnya, `targetTouches` memberikan semua yang Anda butuhkan dan inginkan. (Untuk
informasi selengkapnya tentang daftar ini, silakan lihat [Daftar sentuhan](#touch-lists)).

#### Menggunakan requestAnimationFrame

Karena callback kejadian diaktifkan pada thread utama, kita ingin menjalankan sesedikit
mungkin kode dalam callback untuk kejadian kita, menjaga laju
bingkai tetap tinggi dan mencegah sampah.

Dengan menggunakan `requestAnimationFrame()` kita memiliki kesempatan untuk memperbarui UI sesaat
sebelum browser bermaksud menggambar bingkai dan akan memudahkan kita memindahkan beberapa
pekerjaan dari callback kejadian.

Jika Anda belum familier dengan `requestAnimationFrame()`, Anda
bisa [mempelajari selengkapnya di sini](/web/fundamentals/performance/rendering/optimize-javascript-execution#use-requestanimationframe-for-visual-changes).

Implementasi khusus adalah dengan menyimpan koordinat `x` dan `y` dari kejadian
awal dan kejadian gerak serta meminta bingkai animasi di dalam callback
kejadian gerak.

Dalam demo, kami menyimpan posisi sentuh awal di `handleGestureStart()` (carilah `initialTouchPos`):

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html" region_tag="handle-start-gesture" adjust_indentation="auto" %}

Metode `handleGestureMove()` menyimpan posisi kejadiannya
sebelum meminta bingkai animasi bila kita membutuhkannya, meneruskan fungsi
`onAnimFrame()` sebagai callback:

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html" region_tag="handle-move" adjust_indentation="auto" %}

Nilai `onAnimFrame` adalah sebuah fungsi yang bila dipanggil, akan mengubah UI
untuk bergerak. Dengan meneruskan fungsi ini ke `requestAnimationFrame()`, kita
memberitahu browser untuk memanggilnya sesaat sebelum itu memperbarui laman
(yaitu, menggambarkan setiap perubahan ke laman).

Di callback `handleGestureMove()` kami awalnya memeriksa apakah `rafPending` bernilai false,
yang menunjukkan jika `onAnimFrame()` telah dipanggil oleh `requestAnimationFrame()`
sejak kejadian gerak terakhir. Ini berarti kita hanya memiliki satu `requestAnimationFrame()`
yang menunggu dijalankan pada satu waktu.

Ketika callback `onAnimFrame()` dijalankan, kita menyetel transformasi pada setiap
elemen yang ingin dipindah sebelum memperbarui `rafPending` ke `false`, memungkinkan
kejadian sentuh berikutnya untuk meminta bingkai animasi baru.

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html" region_tag="on-anim-frame" adjust_indentation="auto" %}

### Mengontrol isyarat menggunakan tindakan sentuh

Properti CSS `touch-action` memungkinkan Anda untuk mengontrol perilaku
sentuh default dari elemen. Dalam contoh, kami menggunakan `touch-action: none` untuk
mencegah browser melakukan sesuatu dengan sentuhan pengguna, yang memungkinkan kita
untuk mencegat semua kejadian sentuh.

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html" region_tag="touch-action-example" adjust_indentation="auto" %}

Menggunakan `touch-action: none` bisa dikatakan opsi ekstrem karena mencegah semua
perilaku browser default. Umumnya, salah satu opsi
di bawah ini merupakan solusi yang lebih baik.

`touch-action` memungkinkan Anda untuk menonaktifkan isyarat yang diimplementasikan oleh browser.
Misalnya, IE10+ mendukung isyarat ketuk dua kali untuk zoom. Dengan menyetel
touch-action `manipulation` Anda mencegah perilaku
ketuk dua kali default.

Hal ini memungkinkan Anda untuk mengimplementasikan isyarat ketuk dua kali Anda sendiri.

Di bawah ini adalah daftar nilai touch-action yang biasa digunakan:

      Parameter Aksi Sentuh

      touch-action: none
      Tidak ada interaksi sentuh yang akan ditangani oleh
      browser.

      touch-action: pinch-zoom
      Menonaktifkan semua interaksi browser seperti
      `touch-action: none` selain dari `pinch-zoom`, yang masih ditangani oleh
      browser.

      touch-action: pan-y pinch-zoom
      Menangani gulir horizontal dalam JavaScript tanpa
      menonaktifkan gulir vertikal atau cubit-untuk-zoom (mis. korsel gambar).

      touch-action: manipulation
      Menonaktifkan isyarat ketuk dua kali untuk menghindari
      penundaan klik oleh browser. Membiarkan gulir dan cubit-untuk-zoom ditentukan
      browser.

## Mendukung IE versi lama

Jika Anda ingin mendukung IE10, Anda harus menangani versi awalan vendor dari
`PointerEvents`.

Untuk memeriksa dukungan `PointerEvents` biasanya Anda mencari
`window.PointerEvent`, namun dalam IE10, Anda akan mencari
`window.navigator.msPointerEnabled`.

Nama kejadian dengan awalan vendor adalah: 'MSPointerDown', 'MSPointerUp' and
'MSPointerMove'.

Contoh di bawah ini menunjukkan kepada Anda cara memeriksa dukungan dan mengganti
nama kejadian.

{% includecode content_path="web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html" region_tag="pointereventsupport" adjust_indentation="auto" %}

Untuk informasi selengkapnya, periksa [pembaruan artikel dari
Microsoft](https://msdn.microsoft.com/en-us/library/dn304886(v=vs.85).aspx).

## Referensi

### Kelas pseudo untuk status sentuh

      Kelas
      Contoh
      Keterangan

      :hover

        Dimasukkan ketika kursor ditempatkan ke atas sebuah elemen.
        Perubahan UI pada saat kursor di arahkan ke atas elemen mendorong pengguna untuk berinteraksi dengan
        elemen.

      :focus

        Dimasukkan saat pengguna mengaktifkan tab melalui elemen pada laman. Status focus
        memungkinkan pengguna untuk mengetahui elemen yang sedang berinteraksi
        dengan mereka; juga memungkinkan pengguna untuk menavigasi UI dengan mudah menggunakan keyboard.

      :active

        Dimasukkan saat elemen sedang dipilih,
        misalnya, ketika pengguna mengeklik atau menyentuh elemen.

Referensi kejadian sentuh definitif bisa dilihat disini:
[Kejadian Sentuh w3](http://www.w3.org/TR/touch-events/).

### Kejadian sentuh, mouse, dan pointer

Kejadian ini adalah blok pembangun untuk menambahkan isyarat baru ke dalam aplikasi
Anda:

      Kejadian Sentuh, Mouse, dan Pointer

        touchstart,
        mousedown,
        pointerdown

        Ini dipanggil ketika jari pertama menyentuh elemen atau ketika
        pengguna mengeklik mouse.

        touchmove,
        mousemove,
        pointermove

        Ini dipanggil ketika pengguna menggerakkan jari mereka di layar atau
        menyeret dengan mouse.

        touchend,
        mouseup,
        pointerup

        Ini dipanggil ketika pengguna mengangkat jari mereka dari layar
        atau melepaskan mouse.

        touchcancel
        pointercancel

        Ini dipanggil ketika browser membatalkan isyarat sentuh. Misalnya,
        pengguna menyentuh aplikasi web dan kemudian berpindah tab.

### Daftar sentuh

Setiap kejadian sentuh berisi tiga atribut daftar:

      Atribut Kejadian Sentuh

      touches

        Daftar semua sentuhan saat ini di layar, terlepas dari elemen
        yang disentuh.

      targetTouches

        Daftar sentuhan yang dimulai pada elemen yang merupakan target dari
        kejadian saat ini. Misalnya, jika Anda terikat ke <button>,
        Anda hanya akan mendapatkan sentuhan saat ini di tombol tersebut. Jika terikat ke
        dokumen, Anda akan mendapatkan semua sentuhan saat ini pada dokumen.

      changedTouches

        Daftar sentuhan yang berubah sehingga menyebabkan kejadian diaktifkan.

            Untuk

            kejadian touchstart
            -- daftar titik sentuh yang menjadi aktif dengan
            kejadian saat ini.

            Untuk

            kejadian touchmove
            -- daftar titik sentuh yang telah berpindah sejak kejadian
            terakhir.

            Untuk

            kejadian touchend
            dan

            touchcancel
            -- daftar titik sentuh yang baru saja dibuang
            dari permukaan.

### Mengaktifkan dukungan status aktif pada iOS

Sayangnya, Safari di iOS tidak menerapkan status *active* secara default, untuk
membuatnya bekerja Anda perlu menambahkan event listener `touchstart` ke *body
dokumen* atau ke setiap elemen.

Anda harus melakukannya di belakang pengujian agen-pengguna sehingga itu hanya berjalan pada perangkat iOS.

Menambahkan touch start ke body memiliki keuntungan karena mengaplikasikan ke semua elemen
dalam DOM, namun ini mungkin menyebabkan masalah kinerja ketika menggulir laman.

    window.onload = function() {
      if(/iP(hone|ad)/.test(window.navigator.userAgent)) {
        document.body.addEventListener('touchstart', function() {}, false);
      }
    };

Alternatif-nya adalah dengan menambahkan listener touch start ke semua elemen
bisa-berinteraksi di laman, mengurangi beberapa masalah kinerja.

    window.onload = function() {
      if(/iP(hone|ad)/.test(window.navigator.userAgent)) {
        var elements = document.querySelectorAll('button');
        var emptyFunction = function() {};
        for(var i = 0; i < elements.length; i++) {
          elements[i].addEventListener('touchstart', emptyFunction, false);
        }
      }
    };

{# wf_devsite_translation #}


text:
function uniqWords(arr) {
    let unique = new Set();
    let text = arr.join('\n');
    let words = text.split(/\W+/)
        .filter(x => x !== '')
        .map(x => x.toLowerCase())
        .forEach(x => unique.add(x));

    console.log([...unique].join(', '));
}

uniqWords([
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque quis hendrerit dui.',
    'Quisque fringilla est urna, vitae efficitur urna vestibulum fringilla.',
    'Vestibulum dolor diam, dignissim quis varius non, fermentum non felis.',
    'Vestibulum ultrices ex massa, sit amet faucibus nunc aliquam ut.',
    'Morbi in ipsum varius, pharetra diam vel, mattis arcu.',
    'Integer ac turpis commodo, varius nulla sed, elementum lectus.',
    'Vivamus turpis dui, malesuada ac turpis dapibus, congue egestas metus.'
]);


text:
tests['csstransforms3d'] = function() {

    var ret = !!testPropsAll('perspective');

    // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
    //   It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
    //   some conditions. As a result, Webkit typically recognizes the syntax but
    //   will sometimes throw a false positive, thus we must do a more thorough check:
    if ( ret && 'webkitPerspective' in docElement.style ) {

      // Webkit allows this media query to succeed only if the feature is enabled.
      // `@media (transform-3d),(-webkit-transform-3d){ ... }`
      injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
        ret = node.offsetLeft === 9 && node.offsetHeight === 3;
      });
    }
    return ret;
};


text:
"""
Implementation of the `xsl:text` element.
"""

from amara.xslt.tree import xslt_element, content_model, attribute_types

class text_element(xslt_element):

    content_model = content_model.text
    attribute_types = {
        'disable-output-escaping': attribute_types.yesno(default='no'),
        }

    _value = None

    def setup(self):
        if self.children:
            self._value = self.children[0].data
        return

    def instantiate(self, context):
        value = self._value
        if value:
            if self._disable_output_escaping:
                context.text(value, True)
            else:
                context.text(value)
        return


text:
module Feather
  class Search < Application
    include_plugin_views __FILE__

    def articles(query)
      @results = []
      @empty_query = (query.nil? || query.strip.empty?)
      @results = Feather::Article.all(:conditions => ["content like '%#{query}%' OR title like '%#{query}%'"], :order => [:created_at.desc]) unless @empty_query
      render :layout => :empty
    end
  end
end


text:
using System;

class LargerThanNeighbours
{
    static void Main()
    {
        int len = int.Parse(Console.ReadLine());
        string[] inputNums = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

        int[] numbers = new int[len];
        for (int i = 0; i < len; i++)
        {
            numbers[i] = int.Parse(inputNums[i]);
        }

        int count = CountLargerThanNeighbours(numbers);
        Console.WriteLine(count);
    }

    static int CountLargerThanNeighbours(int[] numbers)
    {
        int count = 0;
        for (int i = 1; i < numbers.Length - 1; i++)
        {
            int currNum = numbers[i];
            if (currNum > numbers[i - 1] && currNum > numbers[i + 1])
            {
                count++;
            }
        }
        return count;

    }
}

/*
Larger than neighbours
Description

Write a method that checks if the element at given position in given array of integers is larger than its two neighbours (when such exist). Write program that reads an array of numbers and prints how many of them are larger than their neighbours.

Input

On the first line you will receive the number N - the size of the array
On the second line you will receive N numbers separated by spaces - the array
Output

Print how many numbers in the array are larger than their neighbours
Constraints

1 <= N <= 1024
Time limit: 0.1s
Memory limit: 16MB
Sample tests

Input	                Output
6
-26 -25 -28 31 2 27	    2
*/


text:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zSprite
{
    public class Camera : Script
    {
        public Color clear = Color.CornflowerBlue;

        protected Transform _transform = null;

        protected RenderTarget2D target;

        private static List<Camera> _allCameras = new List<Camera>();

        private static SpriteBatch batch;

        private Vector2 _normalizedViewPosition = Vector2.Zero;

        private Vector2 _normalizedViewSize = Vector2.One;

        //public Vector2 clipPlane = new Vector2(0.3f, 1000f);
        //public Rectangle AABB = new Rectangle(0, 0, 1, 1);
        private Viewport _viewport = new Viewport();

        public Camera()
        {
            if (mainCamera == null)
                mainCamera = this;
            //_allCameras.Add(this);
        }

        public static IEnumerable<Camera> allActiveCameras
        {
            get
            {
                foreach (var c in allCameras)
                    if (c.enabled)
                        yield return c;
            }
        }

        public static IEnumerable<Camera> allCameras { get { return _allCameras; } }

        public static Camera current { get; internal set; }

        public static Camera mainCamera { get; private set; }

        public Vector2 normalizedViewPosition
        {
            get { return _normalizedViewPosition; }
            set
            {
                _normalizedViewPosition = value;
                viewMatrixDirty = true;
            }
        }

        public Vector2 normalizedViewSize
        {
            get { return _normalizedViewSize; }
            set
            {
                _normalizedViewSize = value;
                viewMatrixDirty = true;
            }
        }

        public Viewport viewport
        {
            get
            {
                if (viewMatrixDirty)
                    ReCreateViewMatrix();
                return _viewport;
            }
        }

        public AxisAlignedBox worldBounds
        {
            get
            {
                var aabb = AxisAlignedBox.FromRect(Vector2.Zero, new Vector2(_viewport.Width, _viewport.Height));
                var inv = Matrix.Invert(ViewMatrix);
                var p0 = Vector2.Transform(aabb.minVector, inv);
                var p1 = Vector2.Transform(aabb.maxVector, inv);

                aabb.SetExtents(p0, p1);

                return aabb;
                //return new Rectangle(
                //    -halfWidth + (int)_transform.DerivedPosition.X,
                //    -halfHeight + (int)_transform.DerivedPosition.Y,
                //    _viewport.Width,
                //    _viewport.Height);
            }
        }

        //protected internal override void removeFromEvents()
        //{
        //    base.removeFromEvents();
        //    Event.UnRegister(gameObject.id, "init", init);
        //}

        //protected internal override void addToEvents()
        //{
        //    base.addToEvents();
        //    _allCameras.Add(this);
        //    Event.Register(gameObject.id, "init", init);
        //}

        public Vector2 screenToWorld(Vector2 p)
        {
            return Vector2.Transform(p, Matrix.Invert(ViewMatrix));
        }

        protected GraphicsDevice graphicsDevice { get { return Root.instance.graphics.graphicsDevice; } }

        internal static void drawAll()
        {
            foreach (var camera in allActiveCameras)
                camera.draw();

            Root.instance.graphics.graphicsDevice.SetRenderTarget(null);
            Root.instance.graphics.graphicsDevice.Viewport = new Viewport(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds);
            //Root.instance.graphics.graphicsDevice.Clear(Color.Black);
            if (batch == null)
                batch = new SpriteBatch(Root.instance.graphics.graphicsDevice);
            batch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise);
            foreach (var camera in allActiveCameras)
            {
                var dstx = (int)(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds.Width * camera._normalizedViewPosition.X);
                var dsty = (int)(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds.Height * camera._normalizedViewPosition.Y);
                var dstw = (int)(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds.Width * camera._normalizedViewSize.X);
                var dsth = (int)(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds.Height * camera._normalizedViewSize.Y);
                var dstr = new Rectangle(dstx, dsty, dstw, dsth);
                batch.Draw(camera.target, dstr, new Rectangle(0, 0, camera._viewport.Width, camera._viewport.Height), Color.White);
            }
            //batch.DrawString(
            batch.End();

        }

        private void destroy()
        {
            _allCameras.Remove(this);
        }

        //public static Matrix TransoformMatrix
        //{
        //    get { return Matrix.CreateTranslation(new Vector3(-Position, 0)); }
        //}
        private void draw()
        {
            current = this;
            //Event.Invoke("beforerender");
            Event.Invoke("render");

            ondraw();
            postprocess();
        }

        protected virtual void ondraw()
        {
            Root.instance.graphics.graphicsDevice.SetRenderTarget(target);
            Root.instance.graphics.graphicsDevice.Viewport = viewport;
            Root.instance.graphics.graphicsDevice.Clear(clear);
            //var vp = new Viewport(
            Root.instance.graphics.render(ViewMatrix, target, viewport);
        }

        protected virtual void postprocess()
        {

        }

        private void init()
        {
            _allCameras.Add(this);
            _transform = gameObject.transform2();
        }

        /// <summary>
        /// Recreates our view matrix, then signals that the view matrix
        /// is clean.
        /// </summary>
        private void ReCreateViewMatrix()
        {
            updateViewport();

            var position = _transform.DerivedPosition;
            var scale = _transform.DerivedScale;
            var orientation = _transform.DerivedOrientation;

            viewMatrix =
               Matrix.CreateTranslation(new Vector3(-(int)position.X, -(int)position.Y, 0)) *
               Matrix.CreateRotationZ(orientation) *
               Matrix.CreateScale(scale.X, scale.Y, 1) *
               Matrix.CreateTranslation(new Vector3(_viewport.Width * 0.5f, _viewport.Height * 0.5f, 0));

            //viewMatrix = Matrix.CreateOrthographic
            ////Calculate the relative position of the camera
            //var position = Vector3.Transform(Vector3.Backward, Matrix.CreateFromYawPitchRoll(0,0, roll));
            ////Convert the relative position to the absolute position
            ////position *= zoom;
            //position += lookAt;

            ////Calculate a new viewmatrix
            //viewMatrix = Matrix.CreateLookAt(position, lookAt, Vector3.Up);
            viewMatrixDirty = false;
        }

        private void transformdirty()
        {
            viewMatrixDirty = true;
        }

        private void updateViewport()
        {
            //var target = new RenderTarget2D(Root.instance.graphics.graphicsDevice, 1024, 1024);
            //target.Width
            //_viewport.X = (int)(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds.Width * normalizedViewPosition.X);
            //_viewport.Y = (int)(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds.Height * normalizedViewPosition.Y);
            _viewport.Width = (int)(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds.Width * _normalizedViewSize.X);
            _viewport.Height = (int)(Root.instance.graphics.graphicsDevice.PresentationParameters.Bounds.Height * _normalizedViewSize.Y);

            if (target == null || target.Width < _viewport.Width || target.Height < _viewport.Height)
            {
                if (target != null)
                    target.Dispose();

                var w = Helpers.NextPow(_viewport.Width);
                var h = Helpers.NextPow(_viewport.Height);

                target = new RenderTarget2D(Root.instance.graphics.graphicsDevice, w, h, false, SurfaceFormat.Color, DepthFormat.None, 0, RenderTargetUsage.DiscardContents);
            }

            // Calculate the position of the four corners in world space by applying
            //// The world matrix to the four corners in object space (0, 0, width, height)
            //var matrix = ViewMatrix;
            //Vector2 tl = Vector2.Transform(Vector2.Zero, matrix);
            //Vector2 tr = Vector2.Transform(new Vector2(_viewport.Width, 0), matrix);
            //Vector2 bl = Vector2.Transform(new Vector2(0, _viewport.Height), matrix);
            //Vector2 br = Vector2.Transform(new Vector2(_viewport.Width, _viewport.Height), matrix);

            //// Find the minimum and maximum "corners" based on the ones above
            //float minX = MathHelper.Min(tl.X, MathHelper.Min(tr.X, MathHelper.Min(bl.X, br.X)));
            //float maxX = MathHelper.Max(tl.X, MathHelper.Max(tr.X, MathHelper.Max(bl.X, br.X)));
            //float minY = MathHelper.Min(tl.Y, MathHelper.Min(tr.Y, MathHelper.Min(bl.Y, br.Y)));
            //float maxY = MathHelper.Max(tl.Y, MathHelper.Max(tr.Y, MathHelper.Max(bl.Y, br.Y)));
            //Vector2 min = new Vector2(minX, minY);
            //Vector2 max = new Vector2(maxX, maxY);

            //// And create the AABB
            //AABB = new Rectangle((int)min.X, (int)min.Y, (int)(max.X - min.X), (int)(max.Y - min.Y));
        }

        //private void update()
        //{
        //    ReCreateViewMatrix();
        //}

        //private void transformupdate()
        //{
        //    viewMatrixDirty = true;
        //}
        //public bool intersects(Rectangle r)
        //{
        //    return AABB.Intersects(r);
        //}
        ///// <summary>
        ///// Recreates our projection matrix, then signals that the projection
        ///// matrix is clean.
        ///// </summary>
        //private void ReCreateProjectionMatrix()
        //{
        //    projectionMatrix = Matrix.CreateOrthographic(_viewport.Width, _viewport.Height, nearPlane, farPlane);
        //    //projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, AspectRatio, nearPlane, farPlane);
        //    projectionMatrixDirty = false;
        //}

        #region HelperMethods

        ///// <summary>
        ///// Moves the camera and lookAt at to the right,
        ///// as seen from the camera, while keeping the same height
        ///// </summary>
        //public void MoveCameraRight(float amount)
        //{
        //    Vector3 right = Vector3.Normalize(LookAt - Position); //calculate forward
        //    right = Vector3.Cross(right, Vector3.Up); //calculate the real right
        //    right.Y = 0;
        //    right.Normalize();
        //    LookAt += right * amount;
        //}

        ///// <summary>
        ///// Moves the camera and lookAt forward,
        ///// as seen from the camera, while keeping the same height
        ///// </summary>
        //public void MoveCameraForward(float amount)
        //{
        //    Vector3 forward = Vector3.Normalize(LookAt - Position);
        //    forward.Y = 0;
        //    forward.Normalize();
        //    LookAt += forward * amount;
        //}

        #endregion HelperMethods

        #region FieldsAndProperties

        //We don't need an update method because the camera only needs updating
        //when we change one of it's parameters.
        //We keep track if one of our matrices is dirty
        //and reacalculate that matrix when it is accesed.
        private bool viewMatrixDirty = true;

        //private bool projectionMatrixDirty = true;

        //private float fieldOfView = 60f;
        //public float FieldOfView
        //{
        //    get { return fieldOfView; }
        //    set
        //    {
        //        projectionMatrixDirty = true;
        //        fieldOfView = value;
        //    }
        //}

        //private float aspectRatio;
        //public float AspectRatio
        //{
        //    get { return aspectRatio; }
        //    set
        //    {
        //        projectionMatrixDirty = true;
        //        aspectRatio = value;
        //    }
        //}

        //private float nearPlane = 0.3f;
        //public float NearPlane
        //{
        //    get { return nearPlane; }
        //    set
        //    {
        //        projectionMatrixDirty = true;
        //        nearPlane = value;
        //    }
        //}

        //private float farPlane = 100f;
        //public float FarPlane
        //{
        //    get { return farPlane; }
        //    set
        //    {
        //        projectionMatrixDirty = true;
        //        farPlane = value;
        //    }
        //}

        //public float MinZoom = 1;
        //public float MaxZoom = float.MaxValue;
        //private float zoom = 1;
        //public float Zoom
        //{
        //    get { return zoom; }
        //    set
        //    {
        //        viewMatrixDirty = true;
        //        zoom = MathHelper.Clamp(value, MinZoom, MaxZoom);
        //    }
        //}

        //private Vector3 position;
        //public Vector3 Position
        //{
        //    get
        //    {
        //        if (viewMatrixDirty)
        //        {
        //            ReCreateViewMatrix();
        //        }
        //        return position;
        //    }
        //}

        //private Vector3 lookAt;
        //public Vector3 LookAt
        //{
        //    get { return lookAt; }
        //    set
        //    {
        //        viewMatrixDirty = true;
        //        lookAt = value;
        //    }
        //}

        #endregion FieldsAndProperties

        #region ICamera Members

        //public Matrix ViewProjectionMatrix
        //{
        //    get { return ViewMatrix * ProjectionMatrix; }
        //}

        private Matrix viewMatrix;

        public Matrix ViewMatrix
        {
            get
            {
                if (viewMatrixDirty)
                {
                    ReCreateViewMatrix();
                }
                return viewMatrix;
            }
        }

        //private Matrix projectionMatrix;
        //public Matrix ProjectionMatrix
        //{
        //    get
        //    {
        //        if (projectionMatrixDirty)
        //        {
        //            ReCreateProjectionMatrix();
        //        }
        //        return projectionMatrix;
        //    }
        //}

        #endregion ICamera Members
    }
}


text:
<?xml version="1.0" ?>

<container xmlns="http://www.symfony-project.org/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd">

  <parameters>
    <parameter key="doctrine.entity_manager.class">Doctrine\ORM\EntityManager</parameter>
  </parameters>

  <services>
    <service id="doctrine.orm.manager" class="%doctrine.entity_manager.class%" constructor="create">
      <argument type="service" id="doctrine.dbal.connection" />
      <argument type="service" id="doctrine.orm.configuration" />
    </service>

    <service id="doctrine.orm.configuration" class="Doctrine\ORM\Configuration">
      <!--
      <call method="setMetadataCacheImpl"><argument type="service" id="doctrine.orm.cache" /></call>
      <call method="setQueryCacheImpl"><argument type="service" id="doctrine.orm.cache" /></call>
      //-->
      <call method="setProxyDir"><argument>%kernel.cache_dir%/doctrine/Proxies</argument></call>
      <call method="setProxyNamespace"><argument>Proxies</argument></call>
      <call method="setAutoGenerateProxyClasses"><argument>true</argument></call>
    </service>

    <service id="doctrine.orm.cache" class="Doctrine\Common\Cache\ApcCache" />
  </services>
</container>


text:
package info.ephyra.search.searchers;

import info.ephyra.querygeneration.Query;
import info.ephyra.search.Result;
import info.ephyra.search.Search;

/**
 *
A Searcher queries an unstructured or (semi)structured
 * knowledge source and passes the results to the static class
 * Search.

 *
 *
It runs as a separate thread, so several queries can be performed in
 * parallel.

 *
 *
This class extends the class Thread and is abstract.

 *
 * @author Nico Schlaefer
 * @version 2005-11-01
 */
public abstract class Searcher extends Thread {
	/** Query that is performed. */
	protected Query query;
	/** The results found in the knowledge source. */
	protected Result[] results;

	/**
	 * Searches an unstructured or (semi)structured knowledge source and returns
	 * an array of search results.
	 *
	 * @return search results or an empty array, if the search failed
	 */
	protected abstract Result[] doSearch();

	/**
	 * Performs the search and passes the results to the static class
	 * Search.
	 */
	public void run() {
		if (query != null) {
			// perform search
			Result[] results = doSearch();

			// pass results to class Search
			Search.addResults(results);
		}
	}
}