text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.network.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.network.fluent.models.BackendAddressPoolInner;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in LoadBalancerBackendAddressPoolsClient. */
public interface LoadBalancerBackendAddressPoolsClient {
    /**
     * Gets all the load balancer backed address pools.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return all the load balancer backed address pools as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedFlux<BackendAddressPoolInner> listAsync(String resourceGroupName, String loadBalancerName);

    /**
     * Gets all the load balancer backed address pools.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return all the load balancer backed address pools as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<BackendAddressPoolInner> list(String resourceGroupName, String loadBalancerName);

    /**
     * Gets all the load balancer backed address pools.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return all the load balancer backed address pools as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<BackendAddressPoolInner> list(String resourceGroupName, String loadBalancerName, Context context);

    /**
     * Gets load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return load balancer backend address pool along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<BackendAddressPoolInner>> getWithResponseAsync(
        String resourceGroupName, String loadBalancerName, String backendAddressPoolName);

    /**
     * Gets load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return load balancer backend address pool on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<BackendAddressPoolInner> getAsync(
        String resourceGroupName, String loadBalancerName, String backendAddressPoolName);

    /**
     * Gets load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return load balancer backend address pool along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<BackendAddressPoolInner> getWithResponse(
        String resourceGroupName, String loadBalancerName, String backendAddressPoolName, Context context);

    /**
     * Gets load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return load balancer backend address pool.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    BackendAddressPoolInner get(String resourceGroupName, String loadBalancerName, String backendAddressPoolName);

    /**
     * Creates or updates a load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param parameters Parameters supplied to the create or update load balancer backend address pool operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return pool of backend IP addresses along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(
        String resourceGroupName,
        String loadBalancerName,
        String backendAddressPoolName,
        BackendAddressPoolInner parameters);

    /**
     * Creates or updates a load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param parameters Parameters supplied to the create or update load balancer backend address pool operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of pool of backend IP addresses.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    PollerFlux<PollResult<BackendAddressPoolInner>, BackendAddressPoolInner> beginCreateOrUpdateAsync(
        String resourceGroupName,
        String loadBalancerName,
        String backendAddressPoolName,
        BackendAddressPoolInner parameters);

    /**
     * Creates or updates a load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param parameters Parameters supplied to the create or update load balancer backend address pool operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of pool of backend IP addresses.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<BackendAddressPoolInner>, BackendAddressPoolInner> beginCreateOrUpdate(
        String resourceGroupName,
        String loadBalancerName,
        String backendAddressPoolName,
        BackendAddressPoolInner parameters);

    /**
     * Creates or updates a load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param parameters Parameters supplied to the create or update load balancer backend address pool operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of pool of backend IP addresses.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<BackendAddressPoolInner>, BackendAddressPoolInner> beginCreateOrUpdate(
        String resourceGroupName,
        String loadBalancerName,
        String backendAddressPoolName,
        BackendAddressPoolInner parameters,
        Context context);

    /**
     * Creates or updates a load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param parameters Parameters supplied to the create or update load balancer backend address pool operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return pool of backend IP addresses on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<BackendAddressPoolInner> createOrUpdateAsync(
        String resourceGroupName,
        String loadBalancerName,
        String backendAddressPoolName,
        BackendAddressPoolInner parameters);

    /**
     * Creates or updates a load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param parameters Parameters supplied to the create or update load balancer backend address pool operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return pool of backend IP addresses.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    BackendAddressPoolInner createOrUpdate(
        String resourceGroupName,
        String loadBalancerName,
        String backendAddressPoolName,
        BackendAddressPoolInner parameters);

    /**
     * Creates or updates a load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param parameters Parameters supplied to the create or update load balancer backend address pool operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return pool of backend IP addresses.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    BackendAddressPoolInner createOrUpdate(
        String resourceGroupName,
        String loadBalancerName,
        String backendAddressPoolName,
        BackendAddressPoolInner parameters,
        Context context);

    /**
     * Deletes the specified load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
        String resourceGroupName, String loadBalancerName, String backendAddressPoolName);

    /**
     * Deletes the specified load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link PollerFlux} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
        String resourceGroupName, String loadBalancerName, String backendAddressPoolName);

    /**
     * Deletes the specified load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String loadBalancerName, String backendAddressPoolName);

    /**
     * Deletes the specified load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String loadBalancerName, String backendAddressPoolName, Context context);

    /**
     * Deletes the specified load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Mono<Void> deleteAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName);

    /**
     * Deletes the specified load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String loadBalancerName, String backendAddressPoolName);

    /**
     * Deletes the specified load balancer backend address pool.
     *
     * @param resourceGroupName The name of the resource group.
     * @param loadBalancerName The name of the load balancer.
     * @param backendAddressPoolName The name of the backend address pool.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String loadBalancerName, String backendAddressPoolName, Context context);
}


text:
This project maps all current students of St. Augustine Prep School
with markers on a Google Map. Filter through map markers using search input. Infowindows open on click and list the student's closest "high school," provided by Foursquare.

To start the app, open index.html in your browser.

## Resources practiced and used:

* HTML, CSS, JS
* knockout.js
* Bootstrap
* JQuery
* Google Maps API
* Foursquare API

redpajama_set_name: RedPajamaGithub


text:
module BayesTree

  using
    Distributions,
    StatsBase

  export
   #type
   Decision,
   DecisionTree,
   DecisionNode,
   DecisionBranch,
   RegressionLeaf,
   ClassificationLeaf,
   BartProbability,
   BartOptions,
   BartStateParameters,
   BartTree,
   BartState,
   BartAdditiveTree,
   Bart,
   BartLeaf,
   Tree,
   Node,
   Branch,
   Leaf,

   #methods
   leaves,
   valid_node,
   bart_options,
   depth,
   branches,
   grand_branches,
   not_grand_branches,
   length,
   parent,
   node_nonterminal,
   log_tree_prior,
   node_loglikelihood,
   fit,
   predict,
   node_grow!,
   node_prune!,
   node_grow_prune!,
   change_decision_rule!,
   swap_decision_rule!,
   normalize,
   denormalize,
   initialize_bart_state,
   model_selection

   include("tree.jl")
   include("decision_tree.jl")
   include("bart_new.jl")

end # module


text:
namespace onnxruntime {
namespace test {

}  // namespace test
}  // namespace onnxruntime


text:
const addGetInitialStateMethod = (target) => {
    if (target.getInitialState) {
        return;
    }
    target.getInitialState = (actionType) => {
        if (!target.initialState) {
            return undefined;
        }
        if (target.initialState.hasOwnProperty(actionType)) {
            return target.initialState[actionType];
        }
        if (target.initialState.hasOwnProperty('default')) {
            return target.initialState.default;
        }
        return undefined;
    }
};

const addInitialStateProperty = (target) => {
    if (target.hasOwnProperty('initialState')) {
        return;
    }
    target.initialState = {};
};

export function setSliceState(initialState: any, target: any, methodName?: string): void {
    const isInstance = !target.prototype;
    var targetRef = isInstance ? target : target.prototype;
    addInitialStateProperty(targetRef);
    addGetInitialStateMethod(targetRef);
    methodName = methodName ? methodName : 'default';
    targetRef.initialState[methodName] = initialState;
}


text:
package org.apache.fineract.infrastructure.survey.data;

/**
 * Created by Cieyou on 3/12/14.
 */
public class LikelihoodStatus {

    public final static long  ENABLED = 200;
    public final static long DISABLED =100;
}


text:
package org.semanticweb.elk.matching.subsumers;

public class SubsumerMatchPrinter extends SubsumerMatchDummyVisitor<String> {

	private static SubsumerMatchPrinter INSTANCE_ = new SubsumerMatchPrinter();

	private SubsumerMatchPrinter() {

	}

	public static String toString(SubsumerMatch match) {
		return match.accept(INSTANCE_);
	}

	@Override
	protected String defaultVisit(final SubsumerElkObjectMatch match) {
		return match.getValue().toString();
	}

	@Override
	public String visit(final IndexedObjectIntersectionOfMatch match) {
		return match.getFullValue() + "[-" + match.getPrefixLength() + "]";
	}

}


text:
package com.datacraftcoords.event;

//Imports
import org.lwjgl.opengl.GL11;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.InventoryEffectRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

import com.datacraftcoords.Do;
import com.datacraftcoords.event.PotionTimers;
import com.datacraftcoords.event.SafeOverlay;

public class HUDRenderer {
	public static HUDRenderer instance = new HUDRenderer();
private static Minecraft mc = Minecraft.getMinecraft();

	/**
	 * Event fired at various points during the GUI rendering process.
	 * We render anything that need to be rendered onto the HUD in this method.
	 * @param event
	 */
    @SubscribeEvent
    public void RenderGameOverlayEvent(RenderGameOverlayEvent.Post event)
    {
    	//render everything onto the screen
    	if(event.type == RenderGameOverlayEvent.ElementType.ALL)
    	{

            PotionTimers.RenderOntoHUD();

    	}
    	else if(event.type == RenderGameOverlayEvent.ElementType.DEBUG)
    	{
           //
    	}

    	//change how the inventories are rendered (this has to be done on every game tick)
    	if (mc.currentScreen instanceof InventoryEffectRenderer)
    	{
    		PotionTimers.DisableInventoryPotionEffects((InventoryEffectRenderer)mc.currentScreen);
    	}
    }

    /**
     * Event fired when the world gets rendered.
     * We render anything that need to be rendered into the game world in this method.
     * @param event
     */
    @SubscribeEvent
    public void RenderWorldLastEvent(RenderWorldLastEvent event)
    {
    	//render unsafe positions (cache calculations are done from this render method)
        SafeOverlay.instance.RenderAllUnsafePositionsMultithreaded(event.partialTicks);
    }

	/**
	 * Renders an Item icon in the 3D world at the specified coordinates
	 * @param item
	 * @param x
	 * @param y
	 * @param z
	 * @param partialTickTime
	 */
	public static void RenderFloatingItemIcon(float x, float y, float z, Item item, float partialTickTime)
    {
    	RenderManager renderManager = mc.getRenderManager();

        float playerX = (float) (mc.thePlayer.lastTickPosX + (mc.thePlayer.posX - mc.thePlayer.lastTickPosX) * partialTickTime);
        float playerY = (float) (mc.thePlayer.lastTickPosY + (mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * partialTickTime);
        float playerZ = (float) (mc.thePlayer.lastTickPosZ + (mc.thePlayer.posZ - mc.thePlayer.lastTickPosZ) * partialTickTime);

        float dx = x-playerX;
        float dy = y-playerY;
        float dz = z-playerZ;
        float scale = 0.025f;

        GL11.glColor4f(1f, 1f, 1f, 0.75f);
        GL11.glPushMatrix();
        GL11.glTranslatef(dx, dy, dz);
        GL11.glRotatef(-renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
        GL11.glScalef(-scale, -scale, scale);
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

        RenderItemTexture(-8, -8, item, 16, 16);

        GL11.glColor4f(1f, 1f, 1f, 1f);
        GL11.glDepthMask(true);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glPopMatrix();
    }

	/**
	 * Renders a texture at the specified location
	 * Copy/pasted static version of Gui.func_175175_a()
	 * @param x
	 * @param y
	 * @param item
	 * @param width
	 * @param height
	 */
    public static void RenderItemTexture(int x, int y, Item item, int width, int height)
    {
        IBakedModel iBakedModel = mc.getRenderItem().getItemModelMesher().getItemModel(new ItemStack(item));
        TextureAtlasSprite textureAtlasSprite = mc.getTextureMapBlocks().getAtlasSprite(iBakedModel.getTexture().getIconName());
        mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);

        RenderTexture(x, y, textureAtlasSprite, width, height, 0);
    }

    /**
     *
     * @param x
     * @param y
     * @param block
     * @param width
     * @param height
     */
    //
    /**public static void RenderBlockTexture(int x, int y, Block block, int width, int height)
    {
        TextureAtlasSprite textureAtlasSprite = mc.getBlockRendererDispatcher().func_175023_a().func_178122_a(block.getDefaultState());
        mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);

        RenderTexture(x, y, textureAtlasSprite, width, height, 0);
    }*/

    /**
     * Draws a texture at the specified 2D coordinates
     * @param x X coordinate
     * @param y Y coordinate
     * @param u X coordinate of the texture inside of the .png
     * @param v Y coordinate of the texture inside of the .png
     * @param width width of the texture
     * @param height height of the texture
     * @param resourceLocation A reference to the texture's ResourceLocation. If null, it'll use the last used resource.
     * @param scale How much to scale the texture by when rendering it
     */
    public static void RenderCustomTexture(int x, int y, int u, int v, int width, int height, ResourceLocation resourceLocation, float scale)
    {
        x /= scale;
        y /= scale;

        GL11.glPushMatrix();
        //GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glScalef(scale, scale, scale);

        if(resourceLocation != null)
        	mc.getTextureManager().bindTexture(resourceLocation);

        mc.ingameGUI.drawTexturedModalRect(x, y, u, v, width, height);

        GL11.glPopMatrix();
    }

    /**
     * Renders a previously bound texture (with mc.getTextureManager().bindTexture())
     * @param x
     * @param y
     * @param textureAtlasSprite
     * @param width
     * @param height
     * @param zLevel
     */
	private static void RenderTexture(int x, int y, TextureAtlasSprite textureAtlasSprite, int width, int height, double zLevel)
	{
        Tessellator tessellator = Tessellator.getInstance();
        WorldRenderer worldrenderer = tessellator.getWorldRenderer();
        worldrenderer.startDrawingQuads();
        worldrenderer.addVertexWithUV((double)(x), 			(double)(y + height), 	(double)zLevel, (double)textureAtlasSprite.getMinU(), (double)textureAtlasSprite.getMaxV());
        worldrenderer.addVertexWithUV((double)(x + width), 	(double)(y + height), 	(double)zLevel, (double)textureAtlasSprite.getMaxU(), (double)textureAtlasSprite.getMaxV());
        worldrenderer.addVertexWithUV((double)(x + width), 	(double)(y), 			(double)zLevel, (double)textureAtlasSprite.getMaxU(), (double)textureAtlasSprite.getMinV());
        worldrenderer.addVertexWithUV((double)(x), 			(double)(y), 			(double)zLevel, (double)textureAtlasSprite.getMinU(), (double)textureAtlasSprite.getMinV());
        tessellator.draw();
	}

	/**
	 * Renders floating text in the 3D world at a specific position.
	 * @param text The text to render
	 * @param x X coordinate in the game world
	 * @param y Y coordinate in the game world
	 * @param z Z coordinate in the game world
	 * @param color 0xRRGGBB text color
	 * @param renderBlackBackground render a pretty black border behind the text?
	 * @param partialTickTime Usually taken from RenderWorldLastEvent.partialTicks variable
	 */
    public static void RenderFloatingText(String text, float x, float y, float z, int color, boolean renderBlackBackground, float partialTickTime)
    {
    	String textArray[] = {text};
    	RenderFloatingText(textArray, x, y, z, color, renderBlackBackground, partialTickTime);
    }

    /**
	 * Renders floating lines of text in the 3D world at a specific position.
	 * @param text The string array of text to render
	 * @param x X coordinate in the game world
	 * @param y Y coordinate in the game world
	 * @param z Z coordinate in the game world
	 * @param color 0xRRGGBB text color
	 * @param renderBlackBackground render a pretty black border behind the text?
	 * @param partialTickTime Usually taken from RenderWorldLastEvent.partialTicks variable
	 */
    public static void RenderFloatingText(String[] text, float x, float y, float z, int color, boolean renderBlackBackground, float partialTickTime)
    {
    	//Thanks to Electric-Expansion mod for the majority of this code
    	//https://github.com/Alex-hawks/Electric-Expansion/blob/master/src/electricexpansion/client/render/RenderFloatingText.java

    	RenderManager renderManager = mc.getRenderManager();

        float playerX = (float) (mc.thePlayer.lastTickPosX + (mc.thePlayer.posX - mc.thePlayer.lastTickPosX) * partialTickTime);
        float playerY = (float) (mc.thePlayer.lastTickPosY + (mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * partialTickTime);
        float playerZ = (float) (mc.thePlayer.lastTickPosZ + (mc.thePlayer.posZ - mc.thePlayer.lastTickPosZ) * partialTickTime);

        float dx = x-playerX;
        float dy = y-playerY;
        float dz = z-playerZ;
        float distance = (float) Math.sqrt(dx*dx + dy*dy + dz*dz);
        float scale = 0.03f;

        GL11.glColor4f(1f, 1f, 1f, 0.5f);
        GL11.glPushMatrix();
        GL11.glTranslatef(dx, dy, dz);
        GL11.glRotatef(-renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
        GL11.glScalef(-scale, -scale, scale);
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glDepthMask(false);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

        int textWidth = 0;
        for (String thisMessage : text)
        {
            int thisMessageWidth = mc.fontRendererObj.getStringWidth(thisMessage);

            if (thisMessageWidth > textWidth)
            	textWidth = thisMessageWidth;
        }

        int lineHeight = 10;

        if(renderBlackBackground)
        {
            Tessellator tessellator = Tessellator.getInstance();
            WorldRenderer worldrenderer = tessellator.getWorldRenderer();

            GL11.glDisable(GL11.GL_TEXTURE_2D);
            worldrenderer.startDrawingQuads();
            int stringMiddle = textWidth / 2;
            GlStateManager.color(0.0F, 0.0F, 0.0F, 0.5F);
            worldrenderer.addVertex(-stringMiddle - 1, -1 + 0, 0.0D);
            worldrenderer.addVertex(-stringMiddle - 1, 8 + lineHeight*text.length-lineHeight, 0.0D);
            worldrenderer.addVertex(stringMiddle + 1, 8 + lineHeight*text.length-lineHeight, 0.0D);
            worldrenderer.addVertex(stringMiddle + 1, -1 + 0, 0.0D);
            tessellator.draw();
            GL11.glEnable(GL11.GL_TEXTURE_2D);
        }

        int i = 0;
        for(String message : text)
        {
        	mc.fontRendererObj.drawString(message, -textWidth / 2, i*lineHeight, color);
        	i++;
        }

        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glDepthMask(true);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glPopMatrix();
    }

    /**
     * Displays a short notification to the user. Uses the Minecraft code to display messages.
     * @param message the message to be displayed
     */
    public static void DisplayNotification(String message)
    {
        mc.ingameGUI.setRecordPlaying(message, false);
    }

}


text:
"use strict";

var _ = require('lodash');
var models = require('../models');
var logger = require('../logger');

var Feedback = module.exports;

Feedback.findById = function (uuid, callback) {

    models.Feedback.findById(uuid).then(function (data) {

        return callback(null, data);

    }, function (err) {
        logger.error(err);

        return callback(err);
    });
};

Feedback.create = function (feedback, callback) {

    models.Feedback.create(feedback).then(function (data) {

        return callback(null, models.getPlainObject(data));

    }, function (err) {
        logger.error(err);

        return callback(err);
    });
};

Feedback.update = function (feedback, condition, callback) {

    models.Feedback.update(feedback, {where: condition}).then(function (data) {

        return callback(null, data);

    }, function (err) {
        logger.error(err);

        return callback(err);
    });
};

Feedback.delete = function (condition, callback) {

    models.Feedback.destroy({where: condition}).then(function (data) {

        return callback(null, data);

    }, function (err) {
        logger.error(err);

        return callback(err);
    });
};

Feedback.listAndCount = function (condition, order, callback) {

    order = order || [['createdAt', 'DESC']];

    var filter = {
        where: condition,
        order: order
    };

    models.Feedback.findAndCountAll(filter).then(function (data) {

        return callback(null, data);

    }, function (err) {
        logger.error(err);

        return callback(err);
    });
};

Feedback.listAll = function (attributes, condition, callback) {

    attributes = attributes || ['class', 'email', 'feedback'];

    models.Feedback.findAll({
        attributes: attributes,
        where: condition
    }).then(function (data) {

        return callback(null, models.getPlainArray(data));

    }, function (err) {
        logger.error(err);

        return callback(err);
    });
};

Feedback.findAll = function (condition, order, callback) {
    order = order || [['createdAt', 'DESC']];

    var filter = {
        where: condition,
        order: order
    };

    models.Feedback.findAll(filter).then(function (data) {

        return callback(null, models.getPlainArray(data));

    }, function (err) {
        logger.error(err);

        return callback(err);
    });
};


text:
/*
 * Providers provided by Angular
 */
import {provide, enableProdMode} from 'angular2/core';
import {bootstrap, ELEMENT_PROBE_PROVIDERS} from 'angular2/platform/browser';
import {ROUTER_PROVIDERS, LocationStrategy, PathLocationStrategy} from 'angular2/router';
import { RouteParams} from 'angular2/router';
import * as rout from 'angular2/router';
import {HTTP_PROVIDERS} from 'angular2/http';

import {CrudService}   from './app/services/crud.service';

const ENV_PROVIDERS = [];

if ('production' === process.env.ENV) {
  enableProdMode();
} else {
  ENV_PROVIDERS.push(ELEMENT_PROBE_PROVIDERS);
}

/*
 * App Component
 * our top level component that holds all of our components
 */
import {App} from './app/app';

/*
 * Bootstrap our Angular app with a top level component `App` and inject
 * our Services and Providers into Angular's dependency injection
 */
document.addEventListener('DOMContentLoaded', function main() {
  bootstrap(App, [
    ROUTER_PROVIDERS,
    CrudService,
    ...ENV_PROVIDERS,
    ...HTTP_PROVIDERS,
    provide(LocationStrategy, { useClass: PathLocationStrategy })
  ])
   .catch(err => console.error(err));

 });

// For vendors for example jQuery, Lodash, angular2-jwt just import them anywhere in your app
// Also see custom_typings.d.ts as you also need to do `typings install x` where `x` is your module


text:
namespace CasaEngine
{
	class CA_EXPORT LoggerFile : public ILogger
	{
	public:
		LoggerFile(const char* filename = "Output.log");
		~LoggerFile() override;

	private:
		void Write(TLogVerbosity verbose, const std::string& message) override;
		void Write(const std::string& message);

		std::ofstream _file;
		char _tempBuffer[32];
	};
}


text:
#pragma once

#include "il2cpp-config.h"

#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif

#include <stdint.h>
#include <assert.h>
#include <exception>

// System.IO.FileStream/ReadDelegate
struct ReadDelegate_t1428404869;
// System.Object
struct Il2CppObject;
// System.Byte[]
struct ByteU5BU5D_t4260760469;
// System.IAsyncResult
struct IAsyncResult_t2754620036;
// System.AsyncCallback
struct AsyncCallback_t1369114871;

#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_Object4170816371.h"
#include "mscorlib_System_IntPtr4010401971.h"
#include "mscorlib_System_AsyncCallback1369114871.h"

// System.Void System.IO.FileStream/ReadDelegate::.ctor(System.Object,System.IntPtr)
extern "C"  void ReadDelegate__ctor_m383609331 (ReadDelegate_t1428404869 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Int32 System.IO.FileStream/ReadDelegate::Invoke(System.Byte[],System.Int32,System.Int32)
extern "C"  int32_t ReadDelegate_Invoke_m3715810392 (ReadDelegate_t1428404869 * __this, ByteU5BU5D_t4260760469* ___buffer0, int32_t ___offset1, int32_t ___count2, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.IAsyncResult System.IO.FileStream/ReadDelegate::BeginInvoke(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)
extern "C"  Il2CppObject * ReadDelegate_BeginInvoke_m3231845723 (ReadDelegate_t1428404869 * __this, ByteU5BU5D_t4260760469* ___buffer0, int32_t ___offset1, int32_t ___count2, AsyncCallback_t1369114871 * ___callback3, Il2CppObject * ___object4, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Int32 System.IO.FileStream/ReadDelegate::EndInvoke(System.IAsyncResult)
extern "C"  int32_t ReadDelegate_EndInvoke_m1231787239 (ReadDelegate_t1428404869 * __this, Il2CppObject * ___result0, const MethodInfo* method) IL2CPP_METHOD_ATTR;


text:
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Validation Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines contain the default error messages used by
    | the validator class. Some of these rules have multiple versions such
    | such as the size rules. Feel free to tweak each of these messages.
    |
    */

    "accepted"         => "Полето :attribute мора да биде прифатено.",
    "active_url"       => "Полето :attribute не е валиден URL.",
    "after"            => "Полето :attribute мора да биде датум после :date.",
    "alpha"            => "Полето :attribute може да содржи само букви.",
    "alpha_dash"       => "Полето :attribute може да содржи само букви, цифри, долна црта и тире.",
    "alpha_num"        => "Полето :attribute може да содржи само букви и цифри.",
    "array"            => "Полето :attribute мора да биде низа.",
    "before"           => "Полето :attribute мора да биде датум пред :date.",
    "between"          => array(
        "numeric" => "Полето :attribute мора да биде помеѓу :min и :max.",
        "file"    => "Полето :attribute мора да биде помеѓу :min и :max килобајти.",
        "string"  => "Полето :attribute мора да биде помеѓу :min и :max карактери.",
        "array"   => "Полето :attribute мора да има помеѓу :min - :max карактери."
    ),
    "boolean"          => "The :attribute field must be true or false",
    "confirmed"        => "Полето :attribute не е потврдено.",
    "date"             => "Полето :attribute не е валиден датум.",
    "date_format"      => "Полето :attribute не е во формат :format.",
    "different"        => "Полињата :attribute и :other треба да се различни.",
    "digits"           => "Полето :attribute треба да има :digits цифри.",
    "digits_between"   => "Полето :attribute треба да има помеѓу :min и :max цифри.",
    "email"            => "Полето :attribute не е во валиден формат.",
    "exists"           => "Избранато поле :attribute веќе постои.",
    "image"            => "Полето :attribute мора да биде слика.",
    "in"               => "Избраното поле :attribute е невалидно.",
    "integer"          => "Полето :attribute мора да биде цел број.",
    "ip"               => "Полето :attribute мора да биде IP адреса.",
    "max"              => array(
        "numeric" => "Полето :attribute мора да биде помало од :max.",
        "file"    => "Полето :attribute мора да биде помало од :max килобајти.",
        "string"  => "Полето :attribute мора да има помалку од :max карактери.",
        "array"   => "Полето :attribute не може да има повеќе од :max карактери."
    ),
    "mimes"            => "Полето :attribute мора да биде фајл од типот: :values.",
    "min"              => array(
        "numeric" => "Полето :attribute мора да биде минимум :min.",
        "file"    => "Полето :attribute мора да биде минимум :min килобајти.",
        "string"  => "Полето :attribute мора да има минимум :min карактери.",
        "array"   => "Полето :attribute мора да има минимум :min карактери."
    ),
    "not_in"           => "Избраното поле :attribute е невалидно.",
    "numeric"          => "Полето :attribute мора да биде број.",
    "regex"            => "Полето :attribute е во невалиден формат.",
    "required"         => "Полето :attribute е задолжително.",
    "required_if"      => "Полето :attribute е задолжително, кога :other е :value.",
    "required_with"    => "Полето :attribute е задолжително, кога е внесено :values.",
    "required_with_all" => "The :attribute field is required when :values is present.",
    "required_without" => "Полето :attribute е задолжително, кога не е внесено :values.",
    "required_without_all" => "The :attribute field is required when none of :values are present.",
    "same"             => "Полињата :attribute и :other треба да совпаѓаат.",
    "size"             => array(
        "numeric" => "Полето :attribute мора да биде :size.",
        "file"    => "Полето :attribute мора да биде :size килобајти.",
        "string"  => "Полето :attribute мора да има :size карактери.",
        "array"   => "Полето :attribute мора да има :size карактери."
    ),
    "timezone"         => "The :attribute must be a valid zone.",
    "unique"           => "Полето :attribute веќе постои.",
    "url"              => "Полето :attribute не е во валиден формат.",

    /*
    |--------------------------------------------------------------------------
    | Custom Validation Language Lines
    |--------------------------------------------------------------------------
    |
    | Here you may specify custom validation messages for attributes using the
    | convention "attribute.rule" to name the lines. This makes it quick to
    | specify a specific custom language line for a given attribute rule.
    |
    */

    'custom' => array(
        'attribute-name' => array(
            'rule-name' => 'custom-message',
        ),
    ),

    /*
    |--------------------------------------------------------------------------
    | Custom Validation Attributes
    |--------------------------------------------------------------------------
    |
    | The following language lines are used to swap attribute place-holders
    | with something more reader friendly such as E-Mail Address instead
    | of "email". This simply helps us make messages a little cleaner.
    |
    */

    'attributes' => array(),

);


text:
Yii 2.0 için Açıklayıcı Rehber
==============================

Bu döküman, [Yii Dökümantasyon Koşulları](https://www.yiiframework.com/doc/terms/) altında yayınlandı.

Tüm hakları saklıdır.

2014 (c) Yii Software LLC.

Giriş
------------

* [Yii hakkında](intro-yii.md)
* [Sürüm 1.1'den yükseltme](intro-upgrade-from-v1.md)

Başlarken
---------------

* [Ne bilmeye ihtiyacın var](start-prerequisites.md)
* [Yii Kurulumu](start-installation.md)
* [Uygulamaları Çalıştırmak](start-workflow.md)
* [Merhaba deyin](start-hello.md)
* [Formlarla Çalışırken](start-forms.md)
* [Veritabanıyla Çalışırken](start-databases.md)
* [Gii ile Kod Oluşturmak](start-gii.md)
* [İleriye Bakmak](start-looking-ahead.md)

Uygulama Yapısı
---------------------

* [Uygulama Yapısına Genel Bakış](structure-overview.md)
* [Giriş Komutları](structure-entry-scripts.md)
* [Uygulamalar](structure-applications.md)
* [Uygulama Bileşenleri](structure-application-components.md)
* [Kontrolcüler](structure-controllers.md)
* [Modeller](structure-models.md)
* [Görünümler](structure-views.md)
* [Modüller](structure-modules.md)
* [Filtreler](structure-filters.md)
* [Araçlar](structure-widgets.md)
* [Varlıklar](structure-assets.md)
* [Uzantılar](structure-extensions.md)

İstekleri İşlemek
-----------------

* [İstekleri İşlemeye Genel Bakış](runtime-overview.md)
* [Bootstrapping](runtime-bootstrapping.md)
* [Yönlendirme ve URL Oluşturma](runtime-routing.md)
* [İstekler](runtime-requests.md)
* [Yanıtlar](runtime-responses.md)
* [Oturumlar ve Çerezler](runtime-sessions-cookies.md)
* [Hataları İşleme](runtime-handling-errors.md)
* [Logging](runtime-logging.md)

Anahtar Kavramlar
------------

* [Bileşenler](concept-components.md)
* [Özellikler](concept-properties.md)
* [Olaylar](concept-events.md)
* [Davranışlar](concept-behaviors.md)
* [Yapılandırmalar](concept-configurations.md)
* [Takma Adlar](concept-aliases.md)
* [Sınıf Otomatik Yüklemesi](concept-autoloading.md)
* [Servis Bulucu](concept-service-locator.md)
* [Dependency Injection Container](concept-di-container.md)

Veritabanıyla Çalışırken
----------------------

* [Veritabanı Erişim Nesneleri](db-dao.md): Bir veritabanına bağlanmak, basit sorgular, işlemler ve şema manipilasyonu
* [Sorgu Oluşturucu](db-query-builder.md): Basit bir ayırma katmanı kullanarak veritabanı sorgulama
* [Active Record](db-active-record.md): Active Record ORM, kayıtları almak, değiştirmek ve ilişkileri tanımlama
* [Taşıma İşlemleri](db-migrations.md): Bir takım geliştirme ortamında sürüm kontrolünü veritabanlarına uygula
* [Sphinx](https://www.yiiframework.com/extension/yiisoft/yii2-sphinx/doc/guide)
* [Redis](https://www.yiiframework.com/extension/yiisoft/yii2-redis/doc/guide)
* [MongoDB](https://www.yiiframework.com/extension/yiisoft/yii2-mongodb/doc/guide)
* [ElasticSearch](https://www.yiiframework.com/extension/yiisoft/yii2-elasticsearch/doc/guide)

Kullanıcılardan Veri Alırken
-----------------------

* [Form Oluşturma](input-forms.md)
* [Veri Kontrolü](input-validation.md)
* [Dosya Yükleme](input-file-upload.md)
* [Collecting Tabular Input](input-tabular-input.md)
* [Birden fazla Model için Veri Alma](input-multiple-models.md)
* [Extending ActiveForm on the Client Side](input-form-javascript.md)

Veriyi Gösterirken
---------------

* [Veri Tipini Değiştirme](output-formatting.md)
* [Sayfalama](output-pagination.md)
* [Sıralama](output-sorting.md)
* [Veri Sağlayıcıları](output-data-providers.md)
* [Veri Araçları](output-data-widgets.md)
* [Scriptlerle Çalışmak](output-client-scripts.md)
* [Tema Kullanımı](output-theming.md)

Güvenlik
--------

* [Güvenliğe Genel Bakış](security-overview.md)
* [Kimlik Denetleme](security-authentication.md)
* [Yetkilendirme](security-authorization.md)
* [Şifrelerle Çalışma](security-passwords.md)
* [Kriptografi](security-cryptography.md)
* [Auth Clients](https://www.yiiframework.com/extension/yiisoft/yii2-authclient/doc/guide)
* [Egzersizler](security-best-practices.md)

Cache Almak
-------

* [Cache Genel Bakış](caching-overview.md)
* [Veriyi Cache Alma](caching-data.md)
* [Sayfanın Sadece Bir Kısmını Cache Alma](caching-fragment.md)
* [Sayfanın Tamamını Cache Alma](caching-page.md)
* [HTTP Cache Alma](caching-http.md)

RESTful Web Servisleri
--------------------

* [Hızlı Başlangıç](rest-quick-start.md)
* [Kaynaklar](rest-resources.md)
* [Kontrolcüler](rest-controllers.md)
* [Rota Yöntemleri](rest-routing.md)
* [Yanıt Formatlama](rest-response-formatting.md)
* [Kimlik Denetleme](rest-authentication.md)
* [İstek Sınırlama](rest-rate-limiting.md)
* [Sürümlere Ayırma](rest-versioning.md)
* [Hataları Kullanma](rest-error-handling.md)

Geliştirici Araçları
-----------------

* [Geliştirici Aracı ve Debugger](https://www.yiiframework.com/extension/yiisoft/yii2-debug/doc/guide)
* [Gii'yi Kullanarak Kod Oluşturmak](https://www.yiiframework.com/extension/yiisoft/yii2-gii/doc/guide)
* [API Dökümanı Oluşturma](https://www.yiiframework.com/extension/yiisoft/yii2-apidoc)

Test
-------

* [Testlere Genel Bakış](test-overview.md)
* [Testler için Ortam Kurulumu](test-environment-setup.md)
* [Unit Testleri](test-unit.md)
* [Fonksiyonel Testler](test-functional.md)
* [Kabul Testleri](test-acceptance.md)
* [Fixtures](test-fixtures.md)

Özel Başlıklar
--------------

* [Gelişmiş Proje Şablonu](https://www.yiiframework.com/extension/yiisoft/yii2-app-advanced/doc/guide)
* [Building Application from Scratch](tutorial-start-from-scratch.md)
* [Konsol Komutları](tutorial-console.md)
* [Core Validators](tutorial-core-validators.md)
* [Docker](tutorial-docker.md)
* [Uluslararası Hale Getirme](tutorial-i18n.md)
* [Mail Gönderme](tutorial-mailing.md)
* [Performans Ayarları](tutorial-performance-tuning.md)
* [Paylaşımlı Sunucu Ortamı](tutorial-shared-hosting.md)
* [Şablon Motoru](tutorial-template-engines.md)
* [3. Parti Kodlarla Çalışma](tutorial-yii-integration.md)
* [Yii'yi Mikro Kütüphane Gibi Kullanma](tutorial-yii-as-micro-framework.md)

Araçlar
-------

* [GridView](https://www.yiiframework.com/doc-2.0/yii-grid-gridview.html)
* [ListView](https://www.yiiframework.com/doc-2.0/yii-widgets-listview.html)
* [DetailView](https://www.yiiframework.com/doc-2.0/yii-widgets-detailview.html)
* [ActiveForm](https://www.yiiframework.com/doc-2.0/guide-input-forms.html#activerecord-based-forms-activeform)
* [Pjax](https://www.yiiframework.com/doc-2.0/yii-widgets-pjax.html)
* [Menu](https://www.yiiframework.com/doc-2.0/yii-widgets-menu.html)
* [LinkPager](https://www.yiiframework.com/doc-2.0/yii-widgets-linkpager.html)
* [LinkSorter](https://www.yiiframework.com/doc-2.0/yii-widgets-linksorter.html)
* [Bootstrap Widgets](https://www.yiiframework.com/extension/yiisoft/yii2-bootstrap/doc/guide)
* [jQuery UI Widgets](https://www.yiiframework.com/extension/yiisoft/yii2-jui/doc/guide)

Yardımcılar
-------

* [Helpers Overview](helper-overview.md)
* [ArrayHelper](helper-array.md)
* [Html](helper-html.md)
* [Url](helper-url.md)


text:
require 'common/format'

=begin

= RecordsController

  - version:  6.002
  - author:   Steve A.

=end
class RecordsController < ApplicationController

  # Collects individual records grouped by SeasonType (classified as 'generic').
  #
  # Dual-phase action:
  # - Phase 1: GET => renders search form
  # - Phase 2: XHR GET => renders AJAX grid with result, expects parameter:
  #            - params[:season_type][:id] => the season_types.id for the filtering
  #
  def for_season_type
# DEBUG
#    logger.debug "\r\n\r\n!! ------ #{self.class.name} -----"
#    logger.debug "> #{params.inspect}"
#    logger.debug "> #{request.inspect}\r\n\r\n=====================================================\r\n\r\n"
    # AJAX call? Parse parameter and retrieve records range:
    if request.xhr?
      # Check if we have also a possibile swimmer parameter to highlight his/her results:
      # (This is used by the swimmers_controller#radio tab, to show an highlighted swimmer
      #  among the Team records)
      @highlight_swimmer = Swimmer.find_by_id( params[:highlight_swimmer_id] ) if params[:highlight_swimmer_id]
      season_type = SeasonType.find_by_id( params[:season_type][:id] ) if params[:season_type] && params[:season_type][:id]
      @title = I18n.t('records.season_type_title') + (season_type ? " (#{season_type.short_name})" : '')
      collector = if season_type
        records = IndividualRecord.for_season_type( season_type.id )
        # [Steve, 20140723] 'Must always specify the filtering type for the RecordCollector,
        # especially when we pre-load the list of records:
        RecordCollector.new( list: records, record_type_code: 'FOR', season_type: season_type, swimmer: @highlight_swimmer )
      else
        RecordCollector.new( record_type_code: 'FOR' )
      end
      @grid_builder = RecordGridBuilder.new( collector, 'FOR' )
    else
      @title = I18n.t('records.season_type_search_title')
    end
    # Respond according to requested format (GET request => .html, AJAX request => .js)
    respond_to do |format|
      format.html
      format.js
    end
  end
  #-- -------------------------------------------------------------------------
  #++

  # Collects individual records/best results for a specified Team (classified as 'for teams').
  #
  # Dual-phase action:
  # - Phase 1: GET => renders search form
  # - Phase 2: XHR GET => renders AJAX grid with result, expects parameter:
  #            - params[:team][:id] => the teams.id for the filtering
  #
  def for_team
# DEBUG
#    logger.debug "\r\n\r\n!! ------ #{self.class.name} -----"
#    logger.debug "> #{params.inspect}\r\n\r\n=====================================================\r\n\r\n"
    # AJAX call? Parse parameter and retrieve records range:
    if request.xhr? && params['team'] && params['team']['id']
      # Check if we have also a possibile swimmer parameter to highlight his/her results:
      # (This is used by the swimmers_controller#radio tab, to show an highlighted swimmer
      #  among the Team records)
      @highlight_swimmer = Swimmer.find_by_id( params['highlight_swimmer_id'] ) if params['highlight_swimmer_id']
      team = Team.find_by_id( params['team']['id'] )
      logger.debug "> @highlight_swimmer: #{@highlight_swimmer.inspect}"
      logger.debug "> team: #{team.inspect}"
      @title = team ? "#{ I18n.t('records.team_title') } (#{team.decorate.get_linked_name})".html_safe : I18n.t('records.team_title')
      collector = if team
        records = IndividualRecord.for_team( team.id )
# DEBUG
#        logger.debug "> Tot. records found: #{records.size}\r\n\r\n"
        # [Steve, 20140723] 'Must always specify the filtering type for the RecordCollector,
        # especially when we pre-load the list of records:
        RecordCollector.new( list: records, record_type_code: 'TTB', team: team, swimmer: @highlight_swimmer )
      else
# DEBUG
#        logger.debug "> NO TEAM!\r\n\r\n"
        RecordCollector.new( record_type_code: 'TTB' )
      end
      @grid_builder = RecordGridBuilder.new( collector, 'TTB' )
    else
      @title = I18n.t('records.team_search_title')
    end
    # Respond according to requested format (GET request => .html, AJAX request => .js)
    respond_to do |format|
      format.html
      format.js
    end
  end
  #-- -------------------------------------------------------------------------
  #++

  # Collects individual records/best results for a specified Swimmer (but classified as 'generic').
  #
  # Dual-phase action:
  # - Phase 1: GET => renders search form
  # - Phase 2: XHR GET => renders AJAX grid with result, expects parameter:
  #            - params[:swimmer][:id] => the swimmers.id for the filtering
  #
  def for_swimmer
# DEBUG
#    logger.debug "\r\n\r\n!! ------ #{self.class.name} -----"
#    logger.debug "> #{params.inspect}"
#    logger.debug "> #{request.inspect}\r\n\r\n=====================================================\r\n\r\n"
    # AJAX call? Parse parameter and retrieve records range:
    if request.xhr? && params['swimmer'] && params['swimmer']['id']
      swimmer = Swimmer.find_by_id( params['swimmer']['id'] )
      collector = RecordCollector.new( swimmer: swimmer, record_type_code: 'FOR' )
      collector.full_scan do |this, pool_code, event_code, category_code, gender_code|
        this.collect_from_results_having( pool_code, event_code, category_code, gender_code, 'FOR' )
      end if swimmer
      @title = swimmer ? "#{ I18n.t('records.swimmer_title') } (#{swimmer.get_full_name})" : I18n.t('records.swimmer_title')
      @grid_builder = RecordGridBuilder.new( collector, 'FOR' )
    else
      @title = I18n.t('records.swimmer_search_title')
    end
    # Respond according to requested format (GET request => .html, AJAX request => .js)
    respond_to do |format|
      format.html
      format.js
    end
  end
  #-- -------------------------------------------------------------------------
  #++

# FIXME this has not been used yet: (view removed or missing) -- check it out and then remove it, if everything is ok

  # Collects individual personal bests for a specified Swimmer.
  #
  # Dual-phase action:
  # - Phase 1: GET => renders search form
  # - Phase 2: XHR GET => renders AJAX grid with result, expects parameter:
  #            - params[:swimmer][:id] => the swimmers.id for the filtering
  #
  # def for_personal_best
    # # AJAX call? Parse parameter and retrieve records range:
    # if request.xhr? && params['swimmer'] && params['swimmer']['id']
      # swimmer = Swimmer.find_by_id( params['swimmer']['id'] )
      # collector = PersonalBestCollector.new( swimmer: swimmer )
#
      # if swimmer
        # # Collect personal bests
        # collector.full_scan do |this, events_by_pool_type|
          # this.collect_from_all_category_results_having( events_by_pool_type, 'SPB' )
        # end
        # # Collect last result
        # collector.full_scan do |this, events_by_pool_type|
          # this.collect_last_results_having( events_by_pool_type, 'SLP' )
        # end
        # # Collect seasonal bests
        # current_season = Season.get_last_season_by_type( 'MASFIN' )
        # collector.set_start_date( current_season.begin_date )
        # collector.set_end_date( current_season.end_date )
        # collector.full_scan do |this, events_by_pool_type|
          # this.collect_from_all_category_results_having( events_by_pool_type, 'SSB' )
        # end
      # end
#
      # @title = I18n.t('records.swimmer_title') + (swimmer ? " (#{swimmer.get_full_name})" : '')
      # @grid_builder = PersonalBestGridBuilder.new( collector )
    # else
      # @title = I18n.t('records.swimmer_search_title')
    # end
    # # Respond according to requested format (GET request => .html, AJAX request => .js)
    # respond_to do |format|
      # format.html
      # format.js
    # end
  # end
  #-- -------------------------------------------------------------------------
  #++
end


text:
export type WorkspaceCommand =
    "ui.swapSlots" |
    "ui.transparentColor";

export type WorkspaceAction =
    { type: "Workspace_Command", command: WorkspaceCommand };


text:
// Karma configuration
// http://karma-runner.github.io/0.12/config/configuration-file.html

module.exports = function(config) {
  'use strict';

  config.set({
    // enable / disable watching file and executing tests whenever any file changes
    autoWatch: false,

    // base path, that will be used to resolve files and exclude
    basePath: '',

    // testing framework to use (jasmine/mocha/qunit/...)
    // as well as any additional frameworks (requirejs/chai/sinon/...)
    frameworks: [
        'mocha',
        'chai',
        'sinon',
        'browserify'
    ],

    // list of files / patterns to load in the browser
      files: [
          '../../src/**/*.js',
          '../spec/unit/**/*.js'
      ],

    // list of files / patterns to exclude
    exclude: [
    ],

    // web server port
    port: 8080,

    browserify: {
      browserifyOptions: {
            debug: true
      },
      exclude: ['jquery', 'underscore'],
      transform: [
          [
              'babelify',
              {
                  'loose': 'all',
                  'sourceMaps': true,
                  'modules': 'common',
                  'optional': ['es7.decorators']
              }
          ],[
              'aliasify',
              {
                  aliases: {
                      'backbone': 'exoskeleton'
                  },
                  global: true, // By default Aliasify only runs against your code (not node_modules). This flag tells it to remap third-party code too.
                  verbose: true
              }
          ]
      ]
    },

    preprocessors: {
      '../../src/**/*.js': 'browserify',
      '../spec/unit/**/*.js': 'browserify'
    },

    reporters: ['mocha'],

    // Start these browsers, currently available:
    // - Chrome
    // - ChromeCanary
    // - Firefox
    // - Opera
    // - Safari (only Mac)
    // - PhantomJS
    // - IE (only Windows)
    browsers: [
        "PhantomJS"
    ],

    // Which plugins to enable
    plugins: [
        "karma-phantomjs-launcher",
        "karma-mocha",
        "karma-chai",
        "karma-sinon",
        "karma-browserify",
        "karma-mocha-reporter"
    ],

    // Continuous Integration mode
    // if true, it capture browsers, run tests and exit
    singleRun: true,

    colors: false,

    // level of logging
    // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
    logLevel: config.LOG_ERROR,

    // Uncomment the following lines if you are using grunt's server to run the tests
    // proxies: {
    //   '/': 'http://localhost:9000/'
    // },
    // URL root prevent conflicts with the site root
    // urlRoot: '_karma_'
  });
};


text:
<?php

if (!defined("WPINC")) {
	die();
}

require_once(plugin_dir_path(__FILE__) . "class-wqs.php");

// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
register_activation_hook(__FILE__, array("WQS", "activate"));
register_deactivation_hook(__FILE__, array("WQS", "deactivate"));

WQS::get_instance();


text:
package com.sawyer.advadapters.widget;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

/**
 *
For use with an {@link android.widget.ExpandableListView ExpandableListView}, The rolodex
 * adapters are specifically designed to tackle the problem of organizing existing data on the fly
 * without the need to pre-compute the groupings nor actually store the grouping data itself.
 * Instead of having to organize your data ahead of time, you can simply pass in a list of arbitrary
 * data and provide one simple method which determines the groupings it belongs to. Though not
 * required, ideally this relationship would be derived from the data itself. For example,
 * populating the adapter with a list of Person objects could derive it's groupings based on the
 * last name. Just like an old-school rolodex.

 *
 *
The NFRolodexArrayAdapter uses a {@link Map} to organize the data under each group. The
 * children within each grouping are backed by an {@link ArrayList}. The data can be easily modified
 * in various ways and allows numerous display and sorting options.  Additionally full support for
 * {@link ChoiceMode ChoiceMode} is available. By default this class delegates view generation logic
 * to subclasses.

 *
 *
If filtering is required, it's strongly recommended to use the {@link RolodexArrayAdapter}
 * instead.

 */
public abstract class NFRolodexArrayAdapter<G, C> extends PatchedExpandableListAdapter {
	/** Contains the map of objects that represent the visible data of the adapter. */
	private Map<G, ArrayList<C>> mObjects;
	private ArrayList<G> mGroupObjects;
	/**
	 * Indicates whether or not {@link #notifyDataSetChanged()} must be called whenever {@link
	 * #mObjects} is modified.
	 */
	private boolean mNotifyOnChange = true;

	/**
	 * Constructor
	 *
	 * @param activity Context used for inflating views
	 */
	public NFRolodexArrayAdapter(@NonNull Context activity) {
		super(activity);
		init(new ArrayList<C>());
	}

	/**
	 * Constructor
	 *
	 * @param activity Context used for inflating views
	 * @param items    The items to represent within the adapter.
	 */
	public NFRolodexArrayAdapter(@NonNull Context activity, @NonNull C[] items) {
		super(activity);
		List<C> list = Arrays.asList(items);
		init(list);
	}

	/**
	 * Constructor
	 *
	 * @param activity Context used for inflating views
	 * @param items    The items to represent within the adapter.
	 */
	public NFRolodexArrayAdapter(@NonNull Context activity, @NonNull Collection<C> items) {
		super(activity);
		init(items);
	}

	@NonNull
	private static <G, C> Map<G, ArrayList<C>> createNewMap(boolean areGroupsSorted,
															@Nullable Map<G, ArrayList<C>> dataToCopy) {
		if (dataToCopy == null) {
			return areGroupsSorted ? new TreeMap<G, ArrayList<C>>() : new LinkedHashMap<G, ArrayList<C>>();
		} else {
			return areGroupsSorted ? new TreeMap<>(dataToCopy) : new LinkedHashMap<>(dataToCopy);
		}
	}

	/**
	 * Convenience method which joins all {@link ArrayList} values of a {@link Map} into one giant
	 * ArrayList. Order of the newly generated list will match the iteration order of the Map.
	 *
	 * @param map {@link Map} which stores an {@link ArrayList} of values to be joined.
	 * @param <G> Key class used with Map
	 * @param <C> Value class used with ArrayList
	 *
	 * @return All values of the given Map joined together. Will never return null.
	 */
	@NonNull
	static <G, C> ArrayList<C> toArrayList(@NonNull Map<G, ArrayList<C>> map) {
		ArrayList<C> joinedList = new ArrayList<>();
		for (Map.Entry<G, ArrayList<C>> entry : map.entrySet()) {
			joinedList.addAll(entry.getValue());
		}
		return joinedList;
	}

	/**
	 * Adds the specified items at the end of the adapter.
	 *
	 * @param childItem The child item to add at the end of the adapter.
	 */
	public void add(@Nullable C childItem) {
		G group = getGroupFor(childItem);
		ArrayList<C> children = mObjects.get(group);
		if (children == null) {
			children = new ArrayList<>();
			mObjects.put(group, children);
			if (areGroupsSorted()) {
				mGroupObjects = new ArrayList<>(mObjects.keySet());
			} else {
				mGroupObjects.add(group);
			}
		}
		children.add(childItem);
		if (mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	/**
	 * Adds the specified Collection at the end of the adapter.
	 *
	 * @param childItems The Collection of children items to add at the end of the adapter.
	 */
	public void addAll(@NonNull Collection<? extends C> childItems) {
		addAllToObjects(childItems);
		if (mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	/**
	 * Adds the specified child items at the end of the adapter.
	 *
	 * @param childItems The child items to add at the end of the adapter.
	 */
	@SafeVarargs
	public final void addAll(@NonNull C... childItems) {
		addAllToObjects(Arrays.asList(childItems));
		if (mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	private void addAllToObjects(@NonNull Collection<? extends C> childItems) {
		if (areGroupsSorted()) {
			for (C item : childItems) {
				G group = getGroupFor(item);
				ArrayList<C> children = mObjects.get(group);
				if (children == null) {
					children = new ArrayList<>();
					mObjects.put(group, children);
				}
				children.add(item);
			}
			mGroupObjects = new ArrayList<>(mObjects.keySet());
		} else {
			for (C item : childItems) {
				G group = getGroupFor(item);
				ArrayList<C> children = mObjects.get(group);
				if (children == null) {
					children = new ArrayList<>();
					mObjects.put(group, children);
					mGroupObjects.add(group);
				}
				children.add(item);
			}
		}
	}

	/**
	 * @return Whether groups are automatically sorted. Default is true.
	 */
	public boolean areGroupsSorted() {
		return true;
	}

	/**
	 * Remove all elements from the adapter.
	 */
	public void clear() {
		mObjects.clear();
		mGroupObjects.clear();
		if (mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	/**
	 * Tests whether this adapter contains the specified child item.
	 *
	 * @param childItem The child item to search for
	 *
	 * @return {@code true} if the child item is an element of this adapter. {@code false} otherwise
	 */
	public boolean contains(@Nullable C childItem) {
		G group = getGroupFor(childItem);
		return mObjects.get(group) != null && mObjects.get(group).contains(childItem);
	}

	/**
	 *
Creates a new group object which represents the parent of the given child item. This is
	 * used to determine what group the child item will fall under. Do not attempt to return a
	 * cached group object here. See {@link #getGroupFromCacheFor(Object)} for that behavior.

	 *
	 *
It's recommended that the group object returned is immutable, or whose hashcode is based
	 * on an immutable field(s). A mutable object is fine so long as it's not modified during the
	 * lifespan of this adapter.

	 *
	 * @param childItem The child item for which a group instance will be created for.
	 *
	 * @return An immutable group class object which represents the given child item. Do not return
	 * null.
	 */
	@NonNull
	public abstract G createGroupFor(C childItem);

	@Override
	public C getChild(int groupPosition, int childPosition) {
		return mObjects.get(mGroupObjects.get(groupPosition)).get(childPosition);
	}

	@Override
	public long getChildId(int groupPosition, int childPosition) {
		return childPosition;
	}

	@Override
	public int getChildrenCount(int groupPosition) {
		return mObjects.get(mGroupObjects.get(groupPosition)).size();
	}

	@Override
	public G getGroup(int groupPosition) {
		return mGroupObjects.get(groupPosition);
	}

	/**
	 * Gets all the children associated with the given group.
	 *
	 * @param groupPosition The position of the group.
	 *
	 * @return the ArrayList of children found within the specified group.
	 */
	@NonNull
	public ArrayList<C> getGroupChildren(int groupPosition) {
		return new ArrayList<>(mObjects.get(mGroupObjects.get(groupPosition)));
	}

	@Override
	public int getGroupCount() {
		return mGroupObjects.size();
	}

	/**
	 * Retrieves a group object for the given child. Attempts to look in cache before requesting to
	 * construct one. By default nothing is cached. Override {@link #getGroupFromCacheFor(Object)}
	 * if you wish to provide your own cache implementation.
	 *
	 * @param childItem Child item to look for
	 *
	 * @return Group associated with child. Will never return null.
	 */
	@NonNull
	public final G getGroupFor(C childItem) {
		G group = getGroupFromCacheFor(childItem);
		if (group == null) {
			group = createGroupFor(childItem);
			//Subclasses may choose to ignore @NonNull, so we suppress inspection and verify for null
			//noinspection ConstantConditions
			if (group == null) {
				throw new NullPointerException(
						"createGroupFor(child) must return a non-null value");
			}
		}
		return group;
	}

	/**
	 *
Override to provide a caching mechanism for retrieving a group item. Caching can help
	 * reduce the number of {@link #createGroupFor(Object)} invocations. By default, no caching is
	 * provided by the adapter. This method normally returns null.

	 *
	 * It's only recommended to implement this method if one of the following are true:

	 *
You can pre-populate the cache with all the child to group relations.

The cache
	 * will be lazy-loaded and saved for later re-use.

Instantiating your group object is a
	 * pretty hefty call.

You are constantly mutating the adapter.

	 *
	 *
Pulling from cache is primarily used when mutating the adapter. It is never used nor
	 * needed by any of the getters.

	 *
	 *
Additionally, the group object returned should be immutable, or whose hashcode is based on
	 * an immutable field(s). A mutable object is fine so long as it's not modified during the
	 * lifespan of this adapter.

	 *
	 * @param childItem The child item for which a group object will be returned for.
	 *
	 * @return The group object from cache which represents the given child item. Null if the group
	 * is not found in cache.
	 */
	@SuppressWarnings("UnusedParameters")
	@Nullable
	public G getGroupFromCacheFor(C childItem) {
		return null;
	}

	@Override
	public long getGroupId(int groupPosition) {
		return groupPosition;
	}

	/**
	 * @return The original list of items stored within the Adapter
	 */
	@NonNull
	public ArrayList<C> getList() {
		return toArrayList(mObjects);
	}

	/**
	 * Resets the adapter to store a new list of children items. Convenient way of calling {@link
	 * #clear()}, then {@link #addAll(Collection)} without having to worry about an extra {@link
	 * #notifyDataSetChanged()} invoked in between.
	 *
	 * @param childItems New list of children items to store within the adapter.
	 */
	public void setList(@NonNull Collection<? extends C> childItems) {
		mObjects.clear();
		mGroupObjects.clear();
		addAllToObjects(childItems);
		if (mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	private void init(@NonNull Collection<C> objects) {
		mObjects = createNewMap(areGroupsSorted(), null);
		mGroupObjects = new ArrayList<>();
		addAllToObjects(objects);
	}

	@Override
	public void notifyDataSetChanged() {
		super.notifyDataSetChanged();
		mNotifyOnChange = true;
	}

	/**
	 * Removes the first occurrence of the specified child item from the adapter.
	 *
	 * @param childItem The child item to remove.
	 */
	public void remove(@Nullable C childItem) {
		G group = getGroupFor(childItem);
		ArrayList<C> children = mObjects.get(group);
		if (children == null) {
			return; //Can't find group, item already removed or doesn't exist
		}
		boolean isModified = children.remove(childItem);
		if (children.isEmpty()) {
			mObjects.remove(group);
			mGroupObjects.remove(group);
		}
		if (isModified && mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	/**
	 * Convenience method which removes all occurrences in the adapter of each item in the specified
	 * collection.
	 *
	 * @param childItems The collection of child items to remove
	 */
	public void removeAll(@NonNull Collection<? extends C> childItems) {
		boolean isModified = false;
		for (C item : childItems) {
			G group = getGroupFor(item);
			ArrayList<C> children = mObjects.get(group);
			if (children == null) {
				return; //Can't find group, already removed or doesn't exist
			}
			isModified |= children.remove(item);
			if (children.isEmpty()) {
				mObjects.remove(group);
			}
		}
		mGroupObjects = new ArrayList<>(mObjects.keySet());
		if (isModified && mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	/**
	 * Removes all children items from this adapter that are not contained in the specified
	 * collection.
	 *
	 * @param childItems The collection of children items to retain
	 */
	public void retainAll(@NonNull Collection<?> childItems) {
		boolean isModified = false;
		Iterator<Map.Entry<G, ArrayList<C>>> it = mObjects.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<G, ArrayList<C>> entry = it.next();
			isModified |= entry.getValue().retainAll(childItems);
			if (entry.getValue().isEmpty()) {
				it.remove();
			}
		}
		if (isModified) {
			mGroupObjects = new ArrayList<>(mObjects.keySet());
			if (mNotifyOnChange) {
				notifyDataSetChanged();
			}
		}
	}

	/**
	 *
Controls whether methods that change the list ({@link #add}, {@link #remove}, {@link
	 * #clear}) automatically call {@link #notifyDataSetChanged}.  If set to false, caller must
	 * manually call notifyDataSetChanged() to have the changes reflected in the attached view.

	 *
	 *
The default is true, and calling notifyDataSetChanged() resets the flag to true.

	 *
	 * @param notifyOnChange if true, modifications to the list will automatically call {@link
	 *                       #notifyDataSetChanged}
	 */
	public void setNotifyOnChange(boolean notifyOnChange) {
		mNotifyOnChange = notifyOnChange;
	}

	/**
	 * Sorts the children of each grouping using the natural order of the items themselves. This
	 * requires the items to have implemented {@link Comparable} and is equivalent of passing null
	 * to {@link #sortAllChildren(Comparator)}. This will not sort groups themselves.
	 *
	 * @throws ClassCastException If the comparator is null and the stored items do not implement
	 *                            {@code Comparable}, or if {@code compareTo} throws for any pair of
	 *                            items.
	 */
	public void sortAllChildren() {
		sortAllChildren(null);
	}

	/**
	 * Sorts the children of each grouping using the specified comparator. This will not sort groups
	 * themselves.
	 *
	 * @param comparator Used to sort the child items contained in this adapter. Null to use an
	 *                   item's {@code Comparable} interface.
	 *
	 * @throws ClassCastException If the comparator is null and the stored items do not implement
	 *                            {@code Comparable}, or if {@code compareTo} throws for any pair of
	 *                            items.
	 */
	public void sortAllChildren(@Nullable Comparator<? super C> comparator) {
		for (Map.Entry<G, ArrayList<C>> entry : mObjects.entrySet()) {
			Collections.sort(entry.getValue(), comparator);
		}
		if (mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	/**
	 * Sorts the children of the specified group using the natural order of the children themselves.
	 * This requires the child items to have implemented {@link Comparable} and is equivalent of
	 * passing null to {@link #sortGroup(int, Comparator)}. This will not sort groups themselves.
	 *
	 * @throws ClassCastException If the comparator is null and the stored children do not implement
	 *                            {@code Comparable}, or if {@code compareTo} throws for any pair of
	 *                            items.
	 */
	public void sortGroup(int groupPosition) {
		sortGroup(groupPosition, null);
	}

	/**
	 * Sorts the children of the specified group using the specified comparator. This will not sort
	 * groups themselves.
	 *
	 * @param comparator Used to sort the child items contained within a group. Null to use an
	 *                   item's {@code Comparable} interface.
	 *
	 * @throws ClassCastException If the comparator is null and the stored children do not implement
	 *                            {@code Comparable}, or if {@code compareTo} throws for any pair of
	 *                            items.
	 */
	public void sortGroup(int groupPosition, @Nullable Comparator<? super C> comparator) {
		G group = mGroupObjects.get(groupPosition);
		Collections.sort(mObjects.get(group), comparator);
		if (mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}

	/**
	 * Updates the item at the specified position in the adapter with the specified item. This
	 * operation does not change the overall size of the adapter but will relocate the item to a new
	 * group if needed.
	 *
	 * @param groupPosition The group location at which to put the specified child
	 * @param childPosition The child location at which to put the specified item
	 * @param childItem     The new item to replace with the old
	 */
	public void update(int groupPosition, int childPosition, @Nullable C childItem) {
		G oldGroup = mGroupObjects.get(groupPosition);
		G newGroup = createGroupFor(childItem);    //Can't rely on cache.

		//Easy case, group hasn't changed
		if (oldGroup.equals(newGroup)) {
			mObjects.get(oldGroup).set(childPosition, childItem);

			//Hard case, group has changed. Must remove and re-add appropriately
		} else {
			//Remove old item
			ArrayList<C> children = mObjects.get(oldGroup);
			children.remove(childItem);
			if (children.isEmpty()) {
				mObjects.remove(oldGroup);
				mGroupObjects.remove(groupPosition);
			}

			//Add new item
			children = mObjects.get(newGroup);
			if (children == null) {
				children = new ArrayList<>();
				mObjects.put(newGroup, children);
				if (areGroupsSorted()) {
					mGroupObjects = new ArrayList<>(mObjects.keySet());
				} else {
					mGroupObjects.add(newGroup);
				}
			}
			children.add(childItem);
		}
		if (mNotifyOnChange) {
			notifyDataSetChanged();
		}
	}
}


text:
package debop4k.data.orm.hibernate.usertypes.compress;

import debop4k.core.collections.Arrayx;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.BinaryType;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * 정보를 압축하여 바이트 배열로 저장합니다.
 *
 * @author sunghyouk.bae@gmail.com
 * @since 2015. 8. 26.
 */
public abstract class CompressedByteArrayUserType extends CompressedUserType {

  public byte[] compress(byte[] plainBytes) {
    if (Arrayx.isNullOrEmpty(plainBytes))
      return null;
    return compressor().compress(plainBytes);
  }

  public byte[] decompress(byte[] compressedByte) {
    if (Arrayx.isNullOrEmpty(compressedByte))
      return null;
    return compressor().decompress(compressedByte);
  }

  @Override
  public Class returnedClass() {
    return byte[].class;
  }

  @Override
  public Object nullSafeGet(ResultSet rs,
                            String[] names,
                            SharedSessionContractImplementor session,
                            Object owner) throws HibernateException, SQLException {
    byte[] compressedBytes = BinaryType.INSTANCE.nullSafeGet(rs, names[0], session);
    return decompress(compressedBytes);
  }

  @Override
  public void nullSafeSet(PreparedStatement st,
                          Object value,
                          int index,
                          SharedSessionContractImplementor session) throws HibernateException, SQLException {
    if (value == null) {
      BinaryType.INSTANCE.nullSafeSet(st, null, index, session);
    } else {
      byte[] compressedBytes = compress((byte[]) value);
      BinaryType.INSTANCE.nullSafeSet(st, compressedBytes, index, session);
    }
  }

}


text:
using System.Collections;

/// <summary>
/// 环境数据
/// </summary>
public class Environment
{

}


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

namespace XRefService.Common.Models
{
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;

    [Table("UidTable", Schema = "dbo")]
    public class XRefSpecObject
    {
        [Key]
        public string HashedUid { get; set; }

        public string Uid { get; set; }

        [Required]
        public string XRefSpecJson { get; set; }
    }
}


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_33.cpp
Label Definition File: CWE680_Integer_Overflow_to_Buffer_Overflow__malloc.label.xml
Template File: sources-sink-33.tmpl.cpp
*/
/*
 * @description
 * CWE: 680 Integer Overflow to Buffer Overflow
 * BadSource: fixed Fixed value that will cause an integer overflow in the sink
 * GoodSource: Small number greater than zero that will not cause an integer overflow in the sink
 * Sinks:
 *    BadSink : Attempt to allocate array using length value from source
 * Flow Variant: 33 Data flow: use of a C++ reference to data within the same function
 *
 * */

#include "std_testcase.h"

namespace CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_33
{

#ifndef OMITBAD

void bad()
{
    int data;
    int &dataRef = data;
    /* Initialize data */
    data = -1;
    /* FLAW: Set data to a value that will cause an integer overflow in the call to malloc() in the sink */
    data = INT_MAX / 2 + 2; /* 1073741825 */
    /* NOTE: This value will cause the sink to only allocate 4 bytes of memory, however
     * the for loop will attempt to access indices 0-1073741824 */
    {
        int data = dataRef;
        {
            size_t i;
            int *intPointer;
            /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
             * so that the for loop doing the initialization causes a buffer overflow */
            intPointer = (int*)malloc(data * sizeof(int));
            for (i = 0; i < (size_t)data; i++)
            {
                intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
            }
            printIntLine(intPointer[0]);
            free(intPointer);
        }
    }
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodG2B() uses the GoodSource with the BadSink */
static void goodG2B()
{
    int data;
    int &dataRef = data;
    /* Initialize data */
    data = -1;
    /* FIX: Set data to a relatively small number greater than zero */
    data = 20;
    {
        int data = dataRef;
        {
            size_t i;
            int *intPointer;
            /* POTENTIAL FLAW: if data * sizeof(int) > SIZE_MAX, overflows to a small value
             * so that the for loop doing the initialization causes a buffer overflow */
            intPointer = (int*)malloc(data * sizeof(int));
            for (i = 0; i < (size_t)data; i++)
            {
                intPointer[i] = 0; /* Potentially writes beyond the boundary of intPointer */
            }
            printIntLine(intPointer[0]);
            free(intPointer);
        }
    }
}

void good()
{
    goodG2B();
}

#endif /* OMITGOOD */

} /* close namespace */

/* Below is the main(). It is only used when building this testcase on
 * its own for testing or for building a binary to use in testing binary
 * analysis tools. It is not used when compiling all the testcases as one
 * application, which is how source code analysis tools are tested.
 */
#ifdef INCLUDEMAIN

using namespace CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_33; /* so that we can use good and bad easily */

int main(int argc, char * argv[])
{
    /* seed randomness */
    srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
    printLine("Calling good()...");
    good();
    printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
    printLine("Calling bad()...");
    bad();
    printLine("Finished bad()");
#endif /* OMITBAD */
    return 0;
}

#endif


text:
(function () {
	'use strict';

	angular
		.module('deepanse')
		.filter('expenseFilter', expenseFilter);

	function expenseFilter() {
		return function (items, search) {
			var filtered = [];

			angular.forEach(items, function (item) {
				if (
					String(item.date).indexOf(search) > - 1 ||
					String(item.amount).indexOf(search) > - 1 ||
					item.getCategory() && item.getCategory().name.indexOf(search) > - 1 ||
					item.description && item.description.indexOf(search) > - 1
				) filtered.push(item);
			});

			return filtered;
		}
	}
})();


text:
export * from './add-project';
export * from './all-projects';
export * from './project-detail';
export * from './project-detail-overview';
export * from './project-detail-schema';
export * from './projects.actions';
export * from './projects.effects';
export * from './projects.module';
export * from './projects.reducer';
export * from './projects.routes';
export * from './projects.service';
export * from './projects.state';


text:
var _ = require('underscore');
var kt = require('knights-templar');
var BaseView = DT.lib.WidgetView;
var StramEventCollection = DT.lib.StramEventCollection;

var EventList = require('./EventList');
var EventViewer = require('./EventViewer');

/**
 * StramEventsWidget
 *
 * Displays StrAM decision events.
 *
*/
var StramEventsWidget = BaseView.extend({

    initialize: function(options) {

        BaseView.prototype.initialize.call(this, options);
        this.collection = new StramEventCollection([],{
            dataSource: options.dataSource,
            appId: options.appId
        });
        this.collection.subscribe();

        this.subview('list', new EventList({
            collection: this.collection,
            parent: this
        }));
        this.subview('viewer', new EventViewer({
            collection: this.collection
        }));

        // TODO: load from state
        this.viewMode = 'tail';

        this.collection.fetch({
            data: {
                from: Date.now() - 600000,
                to: Date.now()
            }
        });

    },

    html: function() {
        var json = {
            viewMode: this.viewMode
        };
        var html = this.template(json);
        return html;
    },

    assignments: {
        '.event-list': 'list',
        '.event-viewer': 'viewer'
    },

    events: {
        'change [name="viewMode"]': 'onViewModeChange'
    },

    onViewModeChange: function(evt) {
        var newMode = this.$('form [name="viewMode"]:checked').val();
        if (newMode !== this.viewMode) {
            this.viewMode = newMode;
            this.renderContent();
        }
    },

    template: kt.make(__dirname+'/StramEventsWidget.html','_')

});

exports = module.exports = StramEventsWidget;


text:
title: I Got Older
author: Justin Ball
layout: post
permalink: "/2009/01/02/i-got-older/"
tags:
  - "Alyssa"
  - "Aubrey"
  - "Devin"
  - "Family"
  - "Jenna"
  - "birthday."
  - "Family"
date: '2009-01-02T07:00:00Z'
templateKey: blog-post
path: "/i-got-older"
description: ''
---

I turned 34 yesterday. I assume you'll ask why I didn't write this yesterday and my response is it was my birthday why the hell should I have to do anymore work than just get out of bed?

I've come to enjoy my birthday less. It is a marker that indicates my body no longer heals or performs as quickly as it used to. Age forces us to confront mortality and I don't really like that much.

Callie is great about making my birthday great. She takes care of everything, let's me sleep in and tries to find things to do on New Years day. You ever try to find something to do on New Years besides overcome a hangover and watch football?

Callie took me to lunch at a local Japanese place. I think we've only ever taken the kids to a Japanese place once before.

There is a reason for that.

Jenna was really good about the food and even tried a california roll and liked it in spite of the sea weed. Aubrey loved gyoza. Alyssa at a bit of miso soup. Mostly the all just ate rice. Devin loves salsa and will literally drink it if given the chance. I gave him some wasabi. He made a lot of faces and didn't really care much for it. I think I'll wait until he's older and can eat it on sushi. He didn't care much for pickled ginger either.

Now that I think about it Japanese food isn't really like anything we associate with food here in the US.

After spending several years in Japan associating with people I gained a new respect for what makes us all the same and what makes us each unique. I miss the country and the people. I still want to say 'Ganbatte!' to people but there really isn't an English equivalent and people look at me funny when I say it.

I don't eat Japanese food often but it brings back several years of my life, a different culture and a different mindset. Thanks to my wife for taking me out. To most people it is just food but to me it is a revival of an entire period of my life.

Happy New Year - we're all another time period closer to death.


text:
import csv
import getpass
import os

cnt = 0
count = 3
flag = 0
while cnt < count:
	cnt += 1
	_username = raw_input("Your Name:")
	_password = getpass.getpass("Password:")

	with open('list.csv','rb') as csvfile:
		reader = csv.reader(csvfile)
		flag = 0
		for i,rows in enumerate(reader):
			row = rows
			if row[0] == _username:
				flag = 1
				if int(row[2]) >= 3:
					print "This user[%s] is Lock. Please check with system administrator." %(_username)
					break
				if row[1] == _password:
					flag = 2
					print "Welcome to XXXX system."
					break
				else:
					print "The user[%s]'s password is wrong." % (_username)

	if flag == 0:
		print "There is NOT %s person." %(_username)
	if flag == 2:
		break

	#input = raw_input()

else:
	print "You had tried %s times!" % (cnt)

csvfile.close()


text:
extern "C" {
#endif

typedef struct _AL_LIST _AL_LIST;
typedef struct _AL_LIST_ITEM _AL_LIST_ITEM;

typedef void (*_AL_LIST_DTOR)(void* userdata);
typedef void (*_AL_LIST_ITEM_DTOR)(void* value, void* userdata);

AL_FUNC(_AL_LIST*, _al_list_create, (void));
AL_FUNC(_AL_LIST*, _al_list_create_static, (size_t capacity));
AL_FUNC(void, _al_list_destroy, (_AL_LIST* list));

AL_FUNC(void, _al_list_set_dtor, (_AL_LIST* list, _AL_LIST_DTOR dtor));
AL_FUNC(_AL_LIST_DTOR, _al_list_get_dtor, (_AL_LIST* list));

AL_FUNC(_AL_LIST_ITEM*, _al_list_push_front, (_AL_LIST* list, void* data));
AL_FUNC(_AL_LIST_ITEM*, _al_list_push_front_ex, (_AL_LIST* list, void* data, _AL_LIST_ITEM_DTOR dtor));
AL_FUNC(_AL_LIST_ITEM*, _al_list_push_back, (_AL_LIST* list, void* data));
AL_FUNC(_AL_LIST_ITEM*, _al_list_push_back_ex, (_AL_LIST* list, void* data, _AL_LIST_ITEM_DTOR dtor));

AL_FUNC(void, _al_list_pop_front, (_AL_LIST* list));
AL_FUNC(void, _al_list_pop_back, (_AL_LIST* list));

AL_FUNC(_AL_LIST_ITEM*, _al_list_insert_after, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data));
AL_FUNC(_AL_LIST_ITEM*, _al_list_insert_after_ex, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data, _AL_LIST_ITEM_DTOR dtor));
AL_FUNC(_AL_LIST_ITEM*, _al_list_insert_before, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data));
AL_FUNC(_AL_LIST_ITEM*, _al_list_insert_before_ex, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data, _AL_LIST_ITEM_DTOR dtor));

AL_FUNC(void, _al_list_erase, (_AL_LIST* list, _AL_LIST_ITEM* item));

AL_FUNC(void, _al_list_clear, (_AL_LIST* list));

AL_FUNC(void, _al_list_remove, (_AL_LIST* list, void* data));

AL_FUNC(bool, _al_list_is_empty, (_AL_LIST* list));

AL_FUNC(bool, _al_list_contains, (_AL_LIST* list, void* data));

AL_FUNC(_AL_LIST_ITEM*, _al_list_find_first, (_AL_LIST* list, void* data));
AL_FUNC(_AL_LIST_ITEM*, _al_list_find_last, (_AL_LIST* list, void* data));
AL_FUNC(_AL_LIST_ITEM*, _al_list_find_after, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data));
AL_FUNC(_AL_LIST_ITEM*, _al_list_find_before, (_AL_LIST* list, _AL_LIST_ITEM* where, void* data));

AL_FUNC(size_t, _al_list_size, (_AL_LIST* list));

AL_FUNC(_AL_LIST_ITEM*, _al_list_at, (_AL_LIST* list, size_t index));

AL_FUNC(_AL_LIST_ITEM*, _al_list_front, (_AL_LIST* list));
AL_FUNC(_AL_LIST_ITEM*, _al_list_back, (_AL_LIST* list));

AL_FUNC(_AL_LIST_ITEM*, _al_list_next, (_AL_LIST* list, _AL_LIST_ITEM* item));
AL_FUNC(_AL_LIST_ITEM*, _al_list_previous, (_AL_LIST* list, _AL_LIST_ITEM* item));

AL_FUNC(_AL_LIST_ITEM*, _al_list_next_circular, (_AL_LIST* list, _AL_LIST_ITEM* item));
AL_FUNC(_AL_LIST_ITEM*, _al_list_previous_circular, (_AL_LIST* list, _AL_LIST_ITEM* item));

AL_FUNC(void*, _al_list_item_data, (_AL_LIST_ITEM* item));

AL_FUNC(void, _al_list_item_set_dtor, (_AL_LIST_ITEM* item, _AL_LIST_ITEM_DTOR dtor));
AL_FUNC(_AL_LIST_ITEM_DTOR, _al_list_item_get_dtor, (_AL_LIST_ITEM* item));

AL_FUNC(void, _al_list_set_user_data, (_AL_LIST* list, void* user_data));
AL_FUNC(void*, _al_list_get_user_data, (_AL_LIST* list));

#ifdef __cplusplus
}
#endif

#endif


text:
package io.skysail.server.db.versions.impl;

import java.util.Collections;

import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

import io.skysail.domain.core.repos.DbRepository;
import io.skysail.server.db.DbClassName;
import io.skysail.server.db.DbService;
import io.skysail.server.db.GraphDbRepository;
import lombok.extern.slf4j.Slf4j;

@Component(immediate = true, property = "name=VersionsRepository")
@Slf4j
public class VersionsRepository extends GraphDbRepository<ComponentDbVersion> implements DbRepository {

    @Activate
    public void activate() {
        log.debug("activating VersionsRepository");
        dbService.createWithSuperClass("V", DbClassName.of(ComponentDbVersion.class));
        dbService.register(ComponentDbVersion.class);
    }

    @Reference
    public void setDbService(DbService dbService) {
        this.dbService = dbService;
    }

    public void unsetDbService(DbService dbService) {
        this.dbService = null;
    }

    public Object execute(String statement) {
        return dbService.executeUpdateVertex(statement, Collections.emptyMap());
    }

}