text:
/***************************************************************************\
    Render3D.cpp
    Scott Randolph
    December 29, 1995

    //JAM 08Jan04 - Begin Major Rewrite
\***************************************************************************/
#include <cISO646>
#include <math.h>
#include "falclib/include/debuggr.h"
#include "StateStack.h"
#include "ObjectInstance.h"
#include "Matrix.h"
#include "Render3D.h"

extern float g_fDefaultFOV; //Wombat778 10-31-2003
#include "Graphics/DXEngine/DXEngine.h"
#include "Graphics/DXEngine/DXTools.h"
extern bool g_bUse_DX_Engine;

Render3D::Render3D()
{
}

Render3D::~Render3D()
{
}

void Render3D::Cleanup()
{
    Render2D::Cleanup();
}

void Render3D::SetFar(float distance)
{
    far_clip = distance;
}

float Render3D::GetObjectDetail()
{
    return detailScaler;
}

float Render3D::GetFOV()
{
    return horizontal_half_angle * 2.0F;
}

float Render3D::GetVFOV()
{
    return vertical_half_angle * 2.0F;
}

float Render3D::GetDFOV()
{
    return diagonal_half_angle * 2.0F;
}

float Render3D::GetFar()
{
    return far_clip;
}

BOOL Render3D::GetObjectTextureState()
{
    return objTextureState;
}

float Render3D::X()
{
    return cameraPos.x;
}

float Render3D::Y()
{
    return cameraPos.y;
}

float Render3D::Z()
{
    return cameraPos.z;
}

float Render3D::Yaw()
{
    return yaw;
}

float Render3D::Pitch()
{
    return pitch;
}

float Render3D::Roll()
{
    return roll;
}

// Maybe better access methods for a class variable?
void Render3D::GetAt(Tpoint *v)
{
    v->x = cameraRot.M11;
    v->y = cameraRot.M12;
    v->z = cameraRot.M13;
}

void Render3D::GetLeft(Tpoint *v)
{
    v->x = cameraRot.M21;
    v->y = cameraRot.M22;
    v->z = cameraRot.M23;
}

void Render3D::GetUp(Tpoint *v)
{
    v->x = cameraRot.M31;
    v->y = cameraRot.M32;
    v->z = cameraRot.M33;
}

/***************************************************************************\
 Setup the rendering context for thiw view
\***************************************************************************/
void Render3D::Setup(ImageBuffer *imageBuffer)
{
    Tpoint pos;

    horizontal_half_angle = PI / 180.0f; // this is used in the 2d setup call
    detailScaler = 1.0f;
    SetFar(10000.0f);

    // Call our parents Setup code (win is available only after this call)
    Render2D::Setup(imageBuffer);
    SetFOV(60.0f * PI / 180.0f);

    // Initialize our camera parameters to something reasonable

    pos.x = pos.y = pos.z = 0.0f;
    SetCamera(&pos, &IMatrix);

    // Put a default light source into the 3D object drawing context

    //JAM 08Jan04
    lightAmbient = 0.4f;
    lightDiffuse = 0.6f;
    lightSpecular = 0.6f;
    //JAM

    Tpoint dir = { 0.0f, 0.0f, -1.0f };
    SetLightDirection(&dir);

    objTextureState = TRUE;
}

/***************************************************************************\
 Do start of frame housekeeping
\***************************************************************************/
void Render3D::StartDraw(void)
{
    // DX - YELLOW BUG FIX - RED
    Render2D::StartDraw();

    TheStateStack.SetContext(&context);
    TheStateStack.SetCameraProperties(oneOVERtanHFOV, oneOVERtanVFOV, scaleX, scaleY, shiftX, shiftY);
    TheStateStack.SetLight(lightAmbient, lightDiffuse, lightSpecular, &lightVector); //JAM 08Jan04
    TheStateStack.SetLODBias(resRelativeScaler);
    TheStateStack.SetTextureState(TRUE);  //objTextureState );
    TheColorBank.SetColorMode(ColorBankClass::NormalMode);
}

/***************************************************************************\
 Set the dimensions and location of the viewport.
\***************************************************************************/
void Render3D::SetViewport(float l, float t, float r, float b)
{
    // First call the base class's version of this function
    Render2D::SetViewport(l, t, r, b);

    // Redo our FOV dependent setup
    SetFOV(GetFOV());
}

/***************************************************************************\
    Set the field of view of this camera.
\***************************************************************************/
void Render3D::SetFOV(float horizontal_fov, float NearZ)
{
    const float maxHalfFOV =  70 * PI / 180.0f;
    // JB 010120 Allow narrower field of views for Mavs and GBUs
    //const float minHalfFOV =   2 * PI/180.0f;
    //const float minHalfFOV = PI/180.0f;
    //MI need to be able to go higher for the TGP
    const float minHalfFOV = (PI / 180.0f) / 4;
    // JB 010120

    // Set the field of view
    horizontal_half_angle = horizontal_fov / 2.0f;

    // Keep the field of view values within a reasonable range
    if (horizontal_half_angle > maxHalfFOV)
    {
        horizontal_half_angle = maxHalfFOV;
    }
    else if (horizontal_half_angle < minHalfFOV)
    {
        horizontal_half_angle = minHalfFOV;
    }

    // Recompute the vertical and diangonal field of views to retain consistency
    // NOTE:  (Computation of vertical and diagonal ASSUMES SQUARE PIXELS)
    if (scaleX)
    {
        vertical_half_angle = (float)atan2(scaleY * tan(horizontal_half_angle), scaleX);
        diagonal_half_angle = (float)atan2(sqrt(scaleX * scaleX + scaleY * scaleY) * tan(horizontal_half_angle), scaleX);
    }
    else
    {
        vertical_half_angle = (float)atan2(3.0f * tan(horizontal_half_angle), 4.0f);
        diagonal_half_angle = (float)atan2(5.0f * tan(horizontal_half_angle), 4.0f);
    }

    oneOVERtanHFOV = 1.0f / (float)tan(horizontal_half_angle);
    oneOVERtanVFOV = 1.0f / (float)tan(vertical_half_angle);

    SetObjectDetail(detailScaler);

    // Send relevant stuff to the BSP object library
    TheStateStack.SetCameraProperties(oneOVERtanHFOV, oneOVERtanVFOV, scaleX, scaleY, shiftX, shiftY);

    // COBRA - DX - Setu up Projection here
    if (g_bUse_DX_Engine)
    {

        // Default FOV
        D3DXMATRIX matProj;
        D3DXMatrixPerspectiveFov(&matProj, PI / 2, (float)(xRes / yRes), NearZ, context.ZFAR);

        // Original FreeFalcon FOV transformation
        matProj.m10 *= oneOVERtanVFOV;
        matProj.m11 *= oneOVERtanVFOV;
        matProj.m12 *= oneOVERtanVFOV;

        matProj.m00 *= oneOVERtanHFOV;
        matProj.m01 *= oneOVERtanHFOV;
        matProj.m02 *= oneOVERtanHFOV;

        D3DXMATRIX Flip;
        ZeroMemory(&Flip, sizeof(Flip));
        Flip.m02 = -1.0f;
        Flip.m21 = -1.0f;
        Flip.m10 = 1.0f;
        Flip.m33 = 1.0f;
        D3DXMatrixMultiply(&matProj, &Flip, &matProj);

        TheDXEngine.SetProjection(&matProj);
    }
}

/***************************************************************************\
    Set the position and orientation of the camera in world space.
 (Note:  we're storing the inverse of the camera rotation)
\***************************************************************************/
void Render3D::SetCamera(const Tpoint* pos, const Trotation* rot)
{
    float sinRoll,  cosRoll;
    float sinPitch, cosPitch;

    // Store the provided position and orientation
    if (rot)
    {
        memcpy(&cameraPos, pos, sizeof(cameraPos));
        MatrixTranspose(rot, &cameraRot);
    }

    // Back compute the roll, pitch, and yaw of the viewer
    pitch = (float) - asin(cameraRot.M13);
    roll = (float)atan2(cameraRot.M23, cameraRot.M33);
    yaw = (float)atan2(cameraRot.M12, cameraRot.M11);

    if (yaw < 0.0f)
    {
        yaw += 2.0f * PI; // Convert from +/-180 to 0-360 degrees
    }

    // The result of multiplying a point by this matrix will be permuted into
    // screen space by renaming the components of the output vector
    // (after this, plus X will be to the right and plus Y will be down the screen)
    // Output x axis corresponds to row 2
    // Output y axis corresponds to row 3
    // Output z axis corresponds to row 1
    // In this matrix, we also scale output x and y to account for the field of view.
    // Now |X| > Z or |Y| > Z are out
    T.M11 = cameraRot.M11;
    T.M12 = cameraRot.M12;
    T.M13 = cameraRot.M13;

    T.M21 = cameraRot.M21 * oneOVERtanHFOV;
    T.M22 = cameraRot.M22 * oneOVERtanHFOV;
    T.M23 = cameraRot.M23 * oneOVERtanHFOV;

    T.M31 = cameraRot.M31 * oneOVERtanVFOV;
    T.M32 = cameraRot.M32 * oneOVERtanVFOV;
    T.M33 = cameraRot.M33 * oneOVERtanVFOV;

    // Compute the vector from the camera to the origin rotated into camera space
    move.x = - cameraPos.x * T.M11 - cameraPos.y * T.M12 - cameraPos.z * T.M13;
    move.y = - cameraPos.x * T.M21 - cameraPos.y * T.M22 - cameraPos.z * T.M23;
    move.z = - cameraPos.x * T.M31 - cameraPos.y * T.M32 - cameraPos.z * T.M33;

    // Build the billboard matrix (appropriate for Erick's row vector object library)
    sinRoll = (float)sin(roll);
    cosRoll = (float)cos(roll);
    Tbb.M11 = 1.0f;
    Tbb.M21 = 0.0f;
    Tbb.M31 =  0.0f;
    Tbb.M12 = 0.0f;
    Tbb.M22 = cosRoll * oneOVERtanHFOV;
    Tbb.M32 = -sinRoll * oneOVERtanVFOV;
    Tbb.M13 = 0.0f;
    Tbb.M23 = sinRoll * oneOVERtanHFOV;
    Tbb.M33 =  cosRoll * oneOVERtanVFOV;

    // Build the tree matrix
    sinPitch = (float)sin(pitch);
    cosPitch = (float)cos(pitch);
    Tt.M11 =  cosPitch;
    Tt.M21 = sinPitch * Tbb.M23;
    Tt.M31 = sinPitch * Tbb.M33;
    Tt.M12 =  0.0f;
    Tt.M22 = Tbb.M22;
    Tt.M32 = Tbb.M32;
    Tt.M13 = -sinPitch;
    Tt.M23 = cosPitch * Tbb.M23;
    Tt.M33 = cosPitch * Tbb.M33;

    // Send relevant stuff to the BSP object library
    if (g_bUse_DX_Engine)
    {
        D3DXMATRIX a, c;
        Pmatrix b;
        D3DXMatrixRotationY(&a, pitch);
        D3DXMatrixRotationZ(&c, yaw);
        D3DXMatrixMultiply(&a, &a, &c);
        AssignD3DXMATRIXToPmatrix(&b, &a);
        TheStateStack.SetCamera(pos, (Pmatrix*)&cameraRot, (Pmatrix*)&b, &Tt);
    }
    else
    {
        TheStateStack.SetCamera(pos, &T, &Tbb, &Tt);
    }

    //JAM 02Jan04
    TheStateStack.SetView(pos, &cameraRot);
    TheStateStack.SetProjection(horizontal_half_angle * 2.f, (float)(xRes / yRes));
}

/***************************************************************************\
    Set the detail adjustment scaler for objects
\***************************************************************************/
void Render3D::SetObjectDetail(float scaler)
{
    // This constant is set based on the design resolution for the visual objects
    // art work.  Specificly, 60 degree field of view
    // on a display 640 pixels across.  This is our reference display
    // precision, or LOD scale 1.0.
    static const float RadiansPerPixel = (60.0f * PI / 180.0f) / 640;

    // Ignor invalid parameters
    if (scaler <= 0.0f)
    {
        return;
    }

    detailScaler = scaler;
    resRelativeScaler = detailScaler * RadiansPerPixel * scaleX * oneOVERtanHFOV;

    TheStateStack.SetLODBias(resRelativeScaler);
}

/***************************************************************************\
    Set the lighting direction
 (based on a FreeFalcon X north, Y east, Z down coordinate system)
\***************************************************************************/
void Render3D::SetLightDirection(const Tpoint* dir)
{
    lightVector = *dir;
    TheStateStack.SetLight(lightAmbient, lightDiffuse, lightSpecular, &lightVector); //JAM 08Jan04
}

/***************************************************************************\
    Get the lighting direction
 (based on a FreeFalcon X north, Y east, Z down coordinate system)
\***************************************************************************/
void Render3D::GetLightDirection(Tpoint* dir)
{
    *dir = lightVector;
}

/***************************************************************************\
 Select the amount of textureing employed
\***************************************************************************/
void Render3D::SetObjectTextureState(BOOL state)
{
    if (state not_eq objTextureState)
    {
        // Record the choice
        objTextureState = state;

        // Update the object library
        // NOTE:  If any other renderer is inside a StartFrame, this will clobber their settings
        TheStateStack.SetTextureState(objTextureState);
    }
}

/***************************************************************************\
    Transform the given point (from World space to Screen space)
\***************************************************************************/
void Render3D::TransformPoint(Tpoint* p, ThreeDVertex* result)
{
    register float scratch_x;
    register float scratch_y;
    register float scratch_z;
    register DWORD clipFlag;

    // This part does rotation, translation, and scaling
    // Note, we're swapping the x and z axes here to get from z up/down to z far/near
    // then we're swapping the x and y axes to get into conventional screen pixel coordinates
    scratch_z = T.M11 * p->x + T.M12 * p->y + T.M13 * p->z + move.x;
    scratch_x = T.M21 * p->x + T.M22 * p->y + T.M23 * p->z + move.y;
    scratch_y = T.M31 * p->x + T.M32 * p->y + T.M33 * p->z + move.z;

    // Now determine if the point is out behind us or to the sides
    clipFlag  = GetRangeClipFlags(scratch_z, far_clip);
    clipFlag or_eq GetHorizontalClipFlags(scratch_x, scratch_z);
    clipFlag or_eq GetVerticalClipFlags(scratch_y, scratch_z);

    // Finally, do the perspective divide and scale and shift into screen space
    register float OneOverZ = 1.0f / scratch_z;
    result->csX = scratch_x;
    result->csY = scratch_y;
    result->csZ = scratch_z;
    result->x = viewportXtoPixel(scratch_x * OneOverZ);
    result->y = viewportYtoPixel(scratch_y * OneOverZ);
    result->clipFlag = clipFlag;
}

/***************************************************************************\
    Transform the given point (from World space to Screen space)
 The point should be camera-centric: ie has the camera XYZ subtracted
 out of its world space XYZ.  Why have this function?  Because of
 floating point roundoff error.  We may want a high-precision transform
 of a world space point that would otherwise get rounded off if the
 world space point had high-range XYZ values.
\***************************************************************************/
void Render3D::TransformCameraCentricPoint(Tpoint* p, ThreeDVertex* result)
{
    register float scratch_x;
    register float scratch_y;
    register float scratch_z;
    register DWORD clipFlag;

    // This part does rotation, translation, and scaling
    // Note, we're swapping the x and z axes here to get from z up/down to z far/near
    // then we're swapping the x and y axes to get into conventional screen pixel coordinates
    scratch_z = T.M11 * p->x + T.M12 * p->y + T.M13 * p->z;
    scratch_x = T.M21 * p->x + T.M22 * p->y + T.M23 * p->z;
    scratch_y = T.M31 * p->x + T.M32 * p->y + T.M33 * p->z;

    // Now determine if the point is out behind us or to the sides
    clipFlag  = GetRangeClipFlags(scratch_z, far_clip);
    clipFlag or_eq GetHorizontalClipFlags(scratch_x, scratch_z);
    clipFlag or_eq GetVerticalClipFlags(scratch_y, scratch_z);

    // Finally, do the perspective divide and scale and shift into screen space
    register float OneOverZ = 1.0f / scratch_z;
    result->csX = scratch_x;
    result->csY = scratch_y;
    result->csZ = scratch_z;
    result->x = viewportXtoPixel(scratch_x * OneOverZ);
    result->y = viewportYtoPixel(scratch_y * OneOverZ);
    result->clipFlag = clipFlag;
}

/***************************************************************************\
    Transform the given point (from World space to View space)
\***************************************************************************/
void Render3D::TransformPointToView(Tpoint * p, Tpoint * result)
{
    // This part does rotation, translation, and scaling
    // no swapping...
    result->x = T.M11 * p->x + T.M12 * p->y + T.M13 * p->z + move.x;
    result->y = T.M21 * p->x + T.M22 * p->y + T.M23 * p->z + move.y;
    result->z = T.M31 * p->x + T.M32 * p->y + T.M33 * p->z + move.z;
}

//JAM 03Dec03
void Render3D::TransformPointToViewSwapped(Tpoint *p, Tpoint *result)
{
    result->z = T.M11 * p->x + T.M12 * p->y + T.M13 * p->z + move.x;
    result->x = T.M21 * p->x + T.M22 * p->y + T.M23 * p->z + move.y;
    result->y = T.M31 * p->x + T.M32 * p->y + T.M33 * p->z + move.z;
}

/***************************************************************************\
    Transform the given point (from World space to Screen space)
 Uses billboard matrix.  Most of this is just duplicatcion of
 TransformPoint and perhaps should be condensed into 1 function
\***************************************************************************/
void Render3D::TransformBillboardPoint(Tpoint* p, Tpoint *viewOffset, ThreeDVertex* result)
{
    register float scratch_x;
    register float scratch_y;
    register float scratch_z;
    register DWORD clipFlag;

    // This part does rotation, translation, and scaling
    // Note, we're swapping the x and z axes here to get from z up/down to z far/near
    // then we're swapping the x and y axes to get into conventional screen pixel coordinates
    // Note: since this is a billboard we don't have to do the full:
    //  scratch_z = T.M11 * p->x + T.M12 * p->y + T.M13 * p->z + move.x;
    //  scratch_x = T.M21 * p->x + T.M22 * p->y + T.M23 * p->z + move.y;
    //  scratch_y = T.M31 * p->x + T.M32 * p->y + T.M33 * p->z + move.z;
    // since we know where some 1's and 0's are

    scratch_z =  p->x + viewOffset->x;
    scratch_x =  Tbb.M22 * p->y + Tbb.M23 * p->z + viewOffset->y;
    scratch_y =  Tbb.M32 * p->y + Tbb.M33 * p->z + viewOffset->z;

    // Now determine if the point is out behind us or to the sides
    clipFlag  = GetRangeClipFlags(scratch_z, far_clip);
    clipFlag or_eq GetHorizontalClipFlags(scratch_x, scratch_z);
    clipFlag or_eq GetVerticalClipFlags(scratch_y, scratch_z);

    // Finally, do the perspective divide and scale and shift into screen space
    register float OneOverZ = 1.0f / scratch_z;
    result->csX = scratch_x;
    result->csY = scratch_y;
    result->csZ = scratch_z;
    result->x = viewportXtoPixel(scratch_x * OneOverZ);
    result->y = viewportYtoPixel(scratch_y * OneOverZ);
    result->clipFlag = clipFlag;
}

/***************************************************************************\
    Transform the given point (from World space to Screen space)
 Uses tree matrix.  Most of this is just duplicatcion of
 TransformPoint and perhaps should be condensed into 1 function
\***************************************************************************/
void Render3D::TransformTreePoint(Tpoint* p, Tpoint *viewOffset, ThreeDVertex* result)
{
    register float scratch_x;
    register float scratch_y;
    register float scratch_z;
    register DWORD clipFlag;

    // This part does rotation, translation, and scaling
    // Note, we're swapping the x and z axes here to get from z up/down to z far/near
    // then we're swapping the x and y axes to get into conventional screen pixel coordinates
    scratch_z = Tt.M11 * p->x + Tt.M12 * p->y + Tt.M13 * p->z + viewOffset->x;
    scratch_x = Tt.M21 * p->x + Tt.M22 * p->y + Tt.M23 * p->z + viewOffset->y;
    scratch_y = Tt.M31 * p->x + Tt.M32 * p->y + Tt.M33 * p->z + viewOffset->z;

    // Now determine if the point is out behind us or to the sides
    clipFlag  = GetRangeClipFlags(scratch_z, far_clip);
    clipFlag or_eq GetHorizontalClipFlags(scratch_x, scratch_z);
    clipFlag or_eq GetVerticalClipFlags(scratch_y, scratch_z);

    // Finally, do the perspective divide and scale and shift into screen space
    register float OneOverZ = 1.0f / scratch_z;
    result->csX = scratch_x;
    result->csY = scratch_y;
    result->csZ = scratch_z;
    result->x = viewportXtoPixel(scratch_x * OneOverZ);
    result->y = viewportYtoPixel(scratch_y * OneOverZ);
    result->clipFlag = clipFlag;
}

/***************************************************************************\
    Reverse transform the given point (from screen space to world space vector)
\***************************************************************************/
void Render3D::UnTransformPoint(Tpoint* p, Tpoint* result)
{
    float scratch_x, scratch_y, scratch_z;
    float x, y, z;
    float mag;

    // Undo the viewport computations to get normalized screen coordinates
    scratch_x = (p->x - shiftX) / scaleX;
    scratch_y = (p->y - shiftY) / scaleY;
    scratch_z = 1.0f;

    // Assume the distance from the viewer is 1.0 -- we'll normalize later
    // This means we don't have to undo the perspective divide

    // Now undo the field of view scale applied in the transformation
    scratch_x /= oneOVERtanHFOV;
    scratch_y /= oneOVERtanVFOV;

    // Undo the camera rotation (apply the inverse rotation)
    x = cameraRot.M11 * scratch_z + cameraRot.M21 * scratch_x + cameraRot.M31 * scratch_y;
    y = cameraRot.M12 * scratch_z + cameraRot.M22 * scratch_x + cameraRot.M32 * scratch_y;
    z = cameraRot.M13 * scratch_z + cameraRot.M23 * scratch_x + cameraRot.M33 * scratch_y;

    // Don't need to undo the camera translation, because we want a vector
    // Lets normalize just to be kind
    mag = x * x + y * y + z * z;
    mag = 1.0f / (float)sqrt(mag);
    result->x = x * mag;
    result->y = y * mag;
    result->z = z * mag;
}

/***************************************************************************\
    Return the distance of the world space point from the camera plane.
 A negative result indicates the point is behind the camera.
\***************************************************************************/
float Render3D::ZDistanceFromCamera(Tpoint* p)
{
    // This part does rotation, translation, and scaling
    // Note, we're swapping the x and z axes here to get from z up/down to z far/near
    // then we're swapping the x and y axes to get into conventional screen pixel coordinates.
    // Here we only care about the Z axis since that is the distance from the viewer.
    return ((T.M11 * p->x) + (T.M12 * p->y) + (T.M13 * p->z) + move.x);
}

/*******************************************************************************************\
 Immediatly draw the specified object.
 Warning:  Going this route causes the specfied object to be loaded/unloaded each
 time it is drawn.  Besides being wasteful, this may result in too simple an LOD, no
 textures, or nothing being drawn because the data will not have arrived from disk
 by the time the Draw call happens.  A prior LockAndLoad() call could avoid
 these problems.
\*******************************************************************************************/
void Render3D::Render3DObject(int id, Tpoint* pos, const Trotation* orientation)
{
    ShiAssert(IsReady());

    ObjectInstance instance(id);

    TheStateStack.DrawObject(&instance, orientation, pos);
}

/***************************************************************************\
 Draw a colored pixel in worldspace using the current camera.
 For now, we don't try to draw primitives with any verticies off screen.
\***************************************************************************/
void Render3D::Render3DPoint(Tpoint* p1)
{
    ThreeDVertex ps1;

    // Transform the point from world space to window space
    TransformPoint(p1, &ps1);

    if (ps1.clipFlag not_eq ON_SCREEN)  return;

    // Draw the point
    Render2DPoint((UInt16)ps1.x, (UInt16)ps1.y);
}

/***************************************************************************\
 Draw a colored one pixel line in worldspace using the current camera.
\***************************************************************************/
void Render3D::Render3DLine(Tpoint* p1, Tpoint* p2)
{
    ThreeDVertex ps1, ps2;

    // Transform the points from world space to window space
    TransformPoint(p1, &ps1);
    TransformPoint(p2, &ps2);

    // Quit now if both ends are clipped by the same edge
    if (ps1.clipFlag bitand ps2.clipFlag)  return;

    // Clip the line as necessary
    if (ps1.clipFlag bitand CLIP_NEAR)
    {
        IntersectNear(&ps1, &ps2, &ps1);
    }
    else if (ps2.clipFlag bitand CLIP_NEAR)
    {
        IntersectNear(&ps1, &ps2, &ps2);
    }

    if (ps1.clipFlag bitand ps2.clipFlag)  return;

    if (ps1.clipFlag bitand CLIP_BOTTOM)
    {
        IntersectBottom(&ps1, &ps2, &ps1);
    }
    else if (ps2.clipFlag bitand CLIP_BOTTOM)
    {
        IntersectBottom(&ps1, &ps2, &ps2);
    }

    if (ps1.clipFlag bitand CLIP_TOP)
    {
        IntersectTop(&ps1, &ps2, &ps1);
    }
    else if (ps2.clipFlag bitand CLIP_TOP)
    {
        IntersectTop(&ps1, &ps2, &ps2);
    }

    if (ps1.clipFlag bitand ps2.clipFlag)  return;

    if (ps1.clipFlag bitand CLIP_RIGHT)
    {
        IntersectRight(&ps1, &ps2, &ps1);
    }
    else if (ps2.clipFlag bitand CLIP_RIGHT)
    {
        IntersectRight(&ps1, &ps2, &ps2);
    }

    if (ps1.clipFlag bitand CLIP_LEFT)
    {
        IntersectLeft(&ps1, &ps2, &ps1);
    }
    else if (ps2.clipFlag bitand CLIP_LEFT)
    {
        IntersectLeft(&ps1, &ps2, &ps2);
    }

    // Draw the line
    Render2DLine((UInt16)ps1.x, (UInt16)ps1.y, (UInt16)ps2.x, (UInt16)ps2.y);
}

/***************************************************************************\
 Draw a flat shaded triangle in worldspace using the current camera.
 For now, we don't try to draw primitives with any verticies inside the
 near plane.
\***************************************************************************/
void Render3D::Render3DFlatTri(Tpoint* p1, Tpoint* p2, Tpoint* p3)
{
    ThreeDVertex ps1, ps2, ps3;

    // Transform the points from world space to window space
    TransformPoint(p1, &ps1);
    TransformPoint(p2, &ps2);
    TransformPoint(p3, &ps3);

    // Skip the tri if clipped anywhere
    // I'm not sure this function is called anywhere anyway.  With the current
    // state of things, just checking near clip could cause bad problems since
    // MPR no longer does other edge clipping.  We'd have to do that here.
    if (ps1.clipFlag or ps2.clipFlag or ps3.clipFlag)  return;

    // Don't draw the triangle if it is backfacing (counter-clockwise in screen space)
    // edg: always draw irregardless of backfacing
    /*
    if ( (ps2.y - ps1.y)*(ps3.x - ps1.x) >
      (ps2.x - ps1.x)*(ps3.y - ps1.y)   ) {
     return;
    }
    */

    // Draw the triangle
    Render2DTri((UInt16)ps1.x, (UInt16)ps1.y, (UInt16)ps2.x, (UInt16)ps2.y, (UInt16)ps3.x, (UInt16)ps3.y);
}

/***************************************************************************\
    Draw a quad as a fan.  Uses current state.  Not required to be planar.
\***************************************************************************/
void Render3D::DrawSquare(ThreeDVertex* v0, ThreeDVertex* v1, ThreeDVertex* v2, ThreeDVertex* v3, int CullFlag, bool gifPicture, bool terrain) //JAM 14Sep03
{
    unsigned short count;
    BOOL useFirst = TRUE;
    BOOL useLast = TRUE;

    // Check the clipping flags on the verteces which bound this region
    if (v0->clipFlag bitor v1->clipFlag bitor v2->clipFlag bitor v3->clipFlag)
    {
        // If all verticies are clipped by the same edge, skip this square
        if (v0->clipFlag bitand v1->clipFlag bitand v2->clipFlag bitand v3->clipFlag)
            return;

        ThreeDVertex *vertPointers[4];
        vertPointers[2] = v2;

        // If any verteces are clipped, do separate triangles since the quad isn't necessarily planar
        if (v0->clipFlag bitor v1->clipFlag bitor v2->clipFlag)
        {
            vertPointers[0] = v0;
            vertPointers[1] = v1;
            ClipAndDraw3DFan(&vertPointers[0], 3, CullFlag, gifPicture, terrain); //JAM 14Sep03
            useFirst = FALSE;
        }

        if (v0->clipFlag bitor v2->clipFlag bitor v3->clipFlag)
        {
            vertPointers[1] = v0;
            vertPointers[3] = v3;
            ClipAndDraw3DFan(&vertPointers[1], 3, CullFlag, gifPicture, terrain); //JAM 14Sep03

            if (useFirst)
                useLast = FALSE;
            else
                return;
        }
    }

    if (CullFlag)
    {
        if (CullFlag == CULL_ALLOW_CW)
        {
            // Decide if either of the two triangles are back facing
            if (useFirst)
            {
                if (((v2->y - v1->y)) * ((v0->x - v1->x)) > ((v2->x - v1->x)) * ((v0->y - v1->y)))
                    useFirst = FALSE;
            }

            if (useLast)
            {
                if (((v0->y - v3->y)) * ((v2->x - v3->x)) > ((v0->x - v3->x)) * ((v2->y - v3->y)))
                    useLast = FALSE;
            }
        }

        else
        {
            // Decide if either of the two triangles are back facing
            if (useFirst)
            {
                if (((v2->y - v1->y)) * ((v0->x - v1->x)) < ((v2->x - v1->x)) * ((v0->y - v1->y)))
                    useFirst = FALSE;
            }

            if (useLast)
            {
                if (((v0->y - v3->y)) * ((v2->x - v3->x)) < ((v0->x - v3->x)) * ((v2->y - v3->y)))
                    useLast = FALSE;
            }
        }
    }

    // If culling or clipping took care of both triangles, quit now
    if (useFirst and useLast)
        count = 4;
    else
    {
        if (useFirst or useLast)
            count = 3;
        else
            return;
    }

    if (useFirst)
    {
        MPRVtxTexClr_t *arr[] = { v0, v1, v2, v3 };
        context.DrawPrimitive(MPR_PRM_TRIFAN, MPR_VI_COLOR bitor MPR_VI_TEXTURE, count, arr, terrain); //JAM 14Sep03
    }
    else
    {
        MPRVtxTexClr_t *arr[] = { v0, v2, v3 };
        context.DrawPrimitive(MPR_PRM_TRIFAN, MPR_VI_COLOR bitor MPR_VI_TEXTURE, count, arr, terrain); //JAM 14Sep03
    }

}

/***************************************************************************\
    Draw a triangle using current state
\***************************************************************************/
void Render3D::DrawTriangle(ThreeDVertex* v0, ThreeDVertex* v1, ThreeDVertex* v2, int CullFlag, bool gifPicture, bool terrain)  //JAM 14Sep03
{
    // Check the clipping flags on the verteces which bound this region
    if (v0->clipFlag bitor v1->clipFlag bitor v2->clipFlag)
    {
        // If all verticies are clipped by the same edge, skip this triangle
        if (v0->clipFlag bitand v1->clipFlag bitand v2->clipFlag)
            return;

        // If any verteces are clipped, do them as a special case
        ThreeDVertex *vertPointers[3];
        vertPointers[0] = v0;
        vertPointers[1] = v1;
        vertPointers[2] = v2;
        ClipAndDraw3DFan(vertPointers, 3, CullFlag, gifPicture, terrain); //JAM 14Sep03
        return;
    }

    if (CullFlag)
    {
        if (CullFlag == CULL_ALLOW_CW)
        {
            // Decide if back facing CW
            if (((v2->y - v1->y)) * ((v0->x - v1->x)) > ((v2->x - v1->x)) * ((v0->y - v1->y)))
                return;
        }

        else
        {
            // Decide if back facing CCW
            if (((v2->y - v1->y)) * ((v0->x - v1->x)) < ((v2->x - v1->x)) * ((v0->y - v1->y)))
                return;
        }
    }

    // Draw the tri
    MPRVtxTexClr_t *arr[] = { v0, v1, v2 };
    context.DrawPrimitive(MPR_PRM_TRIFAN, MPR_VI_COLOR bitor MPR_VI_TEXTURE, 3, arr, terrain); //JAM 14Sep03
}


text:
"use strict";
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./caption"));
__export(require("./chart/axis/numberAxis"));
__export(require("./chart/axis/categoryAxis"));
__export(require("./chart/axis/groupedCategoryAxis"));
__export(require("./chart/axis/timeAxis"));
__export(require("./chart/cartesianChart"));
__export(require("./chart/chart"));
__export(require("./chart/chartAxis"));
__export(require("./chart/groupedCategoryChart"));
__export(require("./chart/polarChart"));
__export(require("./chart/marker/marker"));
__export(require("./chart/legend"));
__export(require("./chart/series/cartesian/areaSeries"));
__export(require("./chart/series/cartesian/barSeries"));
__export(require("./chart/series/cartesian/lineSeries"));
__export(require("./chart/series/cartesian/scatterSeries"));
__export(require("./chart/series/cartesian/histogramSeries"));
__export(require("./chart/series/polar/pieSeries"));
__export(require("./scale/bandScale"));
__export(require("./scale/linearScale"));
__export(require("./scene/clipRect"));
__export(require("./scene/dropShadow"));
__export(require("./scene/group"));
__export(require("./scene/scene"));
__export(require("./scene/shape/arc"));
__export(require("./scene/shape/line"));
__export(require("./scene/shape/path"));
__export(require("./scene/shape/rect"));
__export(require("./scene/shape/sector"));
__export(require("./scene/shape/shape"));
__export(require("./util/angle"));
__export(require("./util/array"));
__export(require("./util/padding"));
var millisecond_1 = require("./util/time/millisecond");
var second_1 = require("./util/time/second");
var minute_1 = require("./util/time/minute");
var hour_1 = require("./util/time/hour");
var day_1 = require("./util/time/day");
var week_1 = require("./util/time/week");
var month_1 = require("./util/time/month");
var year_1 = require("./util/time/year");
var utcMinute_1 = require("./util/time/utcMinute");
var utcHour_1 = require("./util/time/utcHour");
var utcDay_1 = require("./util/time/utcDay");
var utcMonth_1 = require("./util/time/utcMonth");
var utcYear_1 = require("./util/time/utcYear");
exports.time = {
    millisecond: millisecond_1.millisecond,
    second: second_1.second,
    minute: minute_1.minute,
    hour: hour_1.hour,
    day: day_1.day,
    sunday: week_1.sunday, monday: week_1.monday, tuesday: week_1.tuesday, wednesday: week_1.wednesday, thursday: week_1.thursday, friday: week_1.friday, saturday: week_1.saturday,
    month: month_1.month,
    year: year_1.year,
    utcMinute: utcMinute_1.utcMinute,
    utcHour: utcHour_1.utcHour,
    utcDay: utcDay_1.utcDay,
    utcMonth: utcMonth_1.utcMonth,
    utcYear: utcYear_1.utcYear
};
__export(require("./chart/agChart"));
__export(require("./chart/themes/chartTheme"));
//# sourceMappingURL=main.js.map

redpajama_set_name: RedPajamaGithub


text:
django有一套工具用来生成每个app的基本目录,这样就可以专心撸代码,而不是创建文件夹。一个工程里面可以包含多个app.

# 2. url映射
在django中,路由表映射有两个主要的函数:include和url,include, url,
## 2.1 在普通app中urls.py
````
from django.conf.urls import url
urlpatterns = [
    url(r'^$', views.index, name='index'),
]
````
url(regex, view, kwargs=None, name=None):
*     regex: 匹配uri
*     view: 匹配之后进行处理
*     kwargs: 参数
*     name: url标识

## 2.2 在工程app中urls.py
```
from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^polls/', include('polls.urls')),
    url(r'^admin/', admin.site.urls),
]

```
在这里, url中的,url需要以`/`结尾。
include方法:
```
include(module, namespace=None, app_name=None)
include(pattern_list)
include((pattern_list, app_namespace), namespace=None)
include((pattern_list, app_namespace, instance_namespace))
```
各个参数如下:
	•	module – URLconf module (or module name)
	•	namespace (string) – Instance namespace for the URL entries being included
	•	app_name (string) – Application namespace for the URL entries being included
	•	pattern_list – Iterable of django.conf.urls.url() instances
	•	app_namespace (string) – Application namespace for the URL entries being included
	•	instance_namespace (string) – Instance namespace for the URL entries being included


text:
require File.dirname(__FILE__) + '/../../adva_cms/spec/spec_helper'

require File.expand_path(File.dirname(__FILE__) + '/spec_roles_helper')


text:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
    <subclass name="org.gmod.gbol.simpleObject.StudyFactorValue" extends="org.gmod.gbol.simpleObject.generated.AbstractStudyFactorValue" discriminator-value="not null">
    </subclass>
</hibernate-mapping>


text:
package org.apache.spark.sql.catalyst.optimizer

import org.apache.spark.sql.catalyst.dsl.expressions._
import org.apache.spark.sql.catalyst.dsl.plans._
import org.apache.spark.sql.catalyst.expressions._
import org.apache.spark.sql.catalyst.plans._
import org.apache.spark.sql.catalyst.plans.logical._
import org.apache.spark.sql.catalyst.rules._

class FoldablePropagationSuite extends PlanTest {
  object Optimize extends RuleExecutor[LogicalPlan] {
    val batches =
      Batch("Foldable Propagation", FixedPoint(20),
        FoldablePropagation) :: Nil
  }

  val testRelation = LocalRelation('a.int, 'b.int)

  test("Propagate from subquery") {
    val query = OneRowRelation
      .select(Literal(1).as('a), Literal(2).as('b))
      .subquery('T)
      .select('a, 'b)
    val optimized = Optimize.execute(query.analyze)
    val correctAnswer = OneRowRelation
      .select(Literal(1).as('a), Literal(2).as('b))
      .subquery('T)
      .select(Literal(1).as('a), Literal(2).as('b)).analyze

    comparePlans(optimized, correctAnswer)
  }

  test("Propagate to select clause") {
    val query = testRelation
      .select('a.as('x), "str".as('y), 'b.as('z))
      .select('x, 'y, 'z)
    val optimized = Optimize.execute(query.analyze)
    val correctAnswer = testRelation
      .select('a.as('x), "str".as('y), 'b.as('z))
      .select('x, "str".as('y), 'z).analyze

    comparePlans(optimized, correctAnswer)
  }

  test("Propagate to where clause") {
    val query = testRelation
      .select("str".as('y))
      .where('y === "str" && "str" === 'y)
    val optimized = Optimize.execute(query.analyze)
    val correctAnswer = testRelation
      .select("str".as('y))
      .where("str".as('y) === "str" && "str" === "str".as('y)).analyze

    comparePlans(optimized, correctAnswer)
  }

  test("Propagate to orderBy clause") {
    val query = testRelation
      .select('a.as('x), Year(CurrentDate()).as('y), 'b)
      .orderBy('x.asc, 'y.asc, 'b.desc)
    val optimized = Optimize.execute(query.analyze)
    val correctAnswer = testRelation
      .select('a.as('x), Year(CurrentDate()).as('y), 'b)
      .orderBy('x.asc, SortOrder(Year(CurrentDate()), Ascending), 'b.desc).analyze

    comparePlans(optimized, correctAnswer)
  }

  test("Propagate to groupBy clause") {
    val query = testRelation
      .select('a.as('x), Year(CurrentDate()).as('y), 'b)
      .groupBy('x, 'y, 'b)(sum('x), avg('y).as('AVG), count('b))
    val optimized = Optimize.execute(query.analyze)
    val correctAnswer = testRelation
      .select('a.as('x), Year(CurrentDate()).as('y), 'b)
      .groupBy('x, Year(CurrentDate()).as('y), 'b)(sum('x), avg(Year(CurrentDate())).as('AVG),
        count('b)).analyze

    comparePlans(optimized, correctAnswer)
  }

  test("Propagate in a complex query") {
    val query = testRelation
      .select('a.as('x), Year(CurrentDate()).as('y), 'b)
      .where('x > 1 && 'y === 2016 && 'b > 1)
      .groupBy('x, 'y, 'b)(sum('x), avg('y).as('AVG), count('b))
      .orderBy('x.asc, 'AVG.asc)
    val optimized = Optimize.execute(query.analyze)
    val correctAnswer = testRelation
      .select('a.as('x), Year(CurrentDate()).as('y), 'b)
      .where('x > 1 && Year(CurrentDate()).as('y) === 2016 && 'b > 1)
      .groupBy('x, Year(CurrentDate()).as("y"), 'b)(sum('x), avg(Year(CurrentDate())).as('AVG),
        count('b))
      .orderBy('x.asc, 'AVG.asc).analyze

    comparePlans(optimized, correctAnswer)
  }

  test("Propagate in subqueries of Union queries") {
    val query = Union(
      Seq(
        testRelation.select(Literal(1).as('x), 'a).select('x, 'x + 'a),
        testRelation.select(Literal(2).as('x), 'a).select('x, 'x + 'a)))
      .select('x)
    val optimized = Optimize.execute(query.analyze)
    val correctAnswer = Union(
      Seq(
        testRelation.select(Literal(1).as('x), 'a)
          .select(Literal(1).as('x), (Literal(1).as('x) + 'a).as("(x + a)")),
        testRelation.select(Literal(2).as('x), 'a)
          .select(Literal(2).as('x), (Literal(2).as('x) + 'a).as("(x + a)"))))
      .select('x).analyze
    comparePlans(optimized, correctAnswer)
  }

  test("Propagate in inner join") {
    val ta = testRelation.select('a, Literal(1).as('tag))
      .union(testRelation.select('a, Literal(2).as('tag)))
      .subquery('ta)
    val tb = testRelation.select('a, Literal(1).as('tag))
      .union(testRelation.select('a, Literal(2).as('tag)))
      .subquery('tb)
    val query = ta.join(tb, Inner,
      Some("ta.a".attr === "tb.a".attr && "ta.tag".attr === "tb.tag".attr))
    val optimized = Optimize.execute(query.analyze)
    val correctAnswer = query.analyze
    comparePlans(optimized, correctAnswer)
  }

  test("Propagate in expand") {
    val c1 = Literal(1).as('a)
    val c2 = Literal(2).as('b)
    val a1 = c1.toAttribute.withNullability(true)
    val a2 = c2.toAttribute.withNullability(true)
    val expand = Expand(
      Seq(Seq(Literal(null), 'b), Seq('a, Literal(null))),
      Seq(a1, a2),
      OneRowRelation.select(c1, c2))
    val query = expand.where(a1.isNotNull).select(a1, a2).analyze
    val optimized = Optimize.execute(query)
    val correctExpand = expand.copy(projections = Seq(
      Seq(Literal(null), c2),
      Seq(c1, Literal(null))))
    val correctAnswer = correctExpand.where(a1.isNotNull).select(a1, a2).analyze
    comparePlans(optimized, correctAnswer)
  }
}


text:
using System;
using System.Linq;
using System.Text;
using System.CodeDom.Compiler;
using Microsoft.CSharp;
using System.Reflection;
using System.Collections.Generic;

namespace HTMLRenderer
{
	public interface IElement
	{
		string Name { get; }
		string TextContent { get; set; }
		IEnumerable<IElement> ChildElements { get; }
		void AddElement(IElement element);
		void Render(StringBuilder output);
		string ToString();
	}

	public interface ITable : IElement
	{
		int Rows { get; }
		int Cols { get; }
		IElement this[int row, int col] { get; set; }
	}

    public interface IElementFactory
    {
		IElement CreateElement(string name);
		IElement CreateElement(string name, string content);
		ITable CreateTable(int rows, int cols);
    }

    public class HTMLElementFactory : IElementFactory
    {
		public IElement CreateElement(string name)
		{
			throw new NotImplementedException();
		}

		public IElement CreateElement(string name, string content)
		{
			throw new NotImplementedException();
		}

		public ITable CreateTable(int rows, int cols)
		{
			throw new NotImplementedException();
		}
	}

    public class HTMLRendererCommandExecutor
    {
        static void Main()
        {
			string csharpCode = ReadInputCSharpCode();
			CompileAndRun(csharpCode);
        }

        private static string ReadInputCSharpCode()
        {
            StringBuilder result = new StringBuilder();
            string line;
            while ((line = Console.ReadLine()) != "")
            {
                result.AppendLine(line);
            }
            return result.ToString();
        }

        static void CompileAndRun(string csharpCode)
        {
            // Prepare a C# program for compilation
            string[] csharpClass =
            {
                @"using System;
                  using HTMLRenderer;

                  public class RuntimeCompiledClass
                  {
                     public static void Main()
                     {"
                        + csharpCode + @"
                     }
                  }"
            };

            // Compile the C# program
            CompilerParameters compilerParams = new CompilerParameters();
            compilerParams.GenerateInMemory = true;
            compilerParams.TempFiles = new TempFileCollection(".");
            compilerParams.ReferencedAssemblies.Add("System.dll");
            compilerParams.ReferencedAssemblies.Add(Assembly.GetExecutingAssembly().Location);
            CSharpCodeProvider csharpProvider = new CSharpCodeProvider();
            CompilerResults compile = csharpProvider.CompileAssemblyFromSource(
                compilerParams, csharpClass);

            // Check for compilation errors
            if (compile.Errors.HasErrors)
            {
                string errorMsg = "Compilation error: ";
                foreach (CompilerError ce in compile.Errors)
                {
                    errorMsg += "\r\n" + ce.ToString();
                }
                throw new Exception(errorMsg);
            }

            // Invoke the Main() method of the compiled class
            Assembly assembly = compile.CompiledAssembly;
            Module module = assembly.GetModules()[0];
            Type type = module.GetType("RuntimeCompiledClass");
            MethodInfo methInfo = type.GetMethod("Main");
            methInfo.Invoke(null, null);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Text.RegularExpressions;

namespace SqlSugar
{
    public class SubAnd:ISubOperation
    {
        public string Name
        {
            get { return "And"; }
        }

        public Expression Expression
        {
            get; set;
        }

        public int Sort
        {
            get
            {
                return 401;
            }
        }

        public ExpressionContext Context
        {
            get;set;
        }

        public bool HasWhere
        {
            get; set;
        }

        public string GetValue(Expression expression)
        {
            var exp = expression as MethodCallExpression;
            var argExp = exp.Arguments[0];
            var result = "AND " + SubTools.GetMethodValue(this.Context, argExp, ResolveExpressType.WhereMultiple);

            var regex = @"^AND  (\@Const\d+) $";
            if (this.Context is OracleExpressionContext)
            {
                regex = @"^AND  (\:Const\d+) $";
            }
            if (this.Context is DmExpressionContext)
            {
                regex = @"^AND  (\:Const\d+) $";
            }
            if (Regex.IsMatch(result, regex))
            {
                result = "AND " + this.Context.Parameters.First(it => it.ParameterName == Regex.Match(result, regex).Groups[1].Value).Value;
                return result;
            }

            var selfParameterName = this.Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters.First().Name) + UtilConstants.Dot;
            if (this.Context.JoinIndex == 0)
                result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
            return result;
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>KaMi團</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href="css/business-casual.css" rel="stylesheet">

    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700,100italic,300italic,400italic,600italic,700italic" rel="stylesheet" type="text/css">

Assign Mission

Something else

Assign Missison

                        <form>

                                Mission Title
                                <input type="text" class="form-control" id="missionTitle" placeholder="[ver] + [week#]">

                                Start Date
                                <input type="date" class="form-control" id="missionStartDate">

                                End Date
                                <input type="date" class="form-control" id="missionEndDate">

                                Number of tracks
                                <input type="number" class="form-control" id="trackNo">

                            <button type="button" class="btn btn-default center-block" id="click_to_assign" onclick="assignMission()">Assign</button>
                        </form>


text:
class Repower(object):
    def __init__(self):
        self.request_id = ''
        self.transaction_reference = ''
        self.transaction_history = ''
        self.account_balance = ''


text:
using System;
using System.Collections.Generic;
using System.Windows.Input;
using Windows.ApplicationModel.Resources;
using Windows.System;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Views;
using GitHub.ViewModel.Abstract;

namespace GitHub.ViewModel.Concrete
{
    public class FeedbackViewModel : ViewModelBase, IFeedbackViewModel
    {
        private readonly ResourceLoader _resourceLoader = ResourceLoader.GetForCurrentView("Resources");
        private readonly INavigationService _navigationService;

        public IEnumerable<string> FeedbackTypes
        {
            get
            {
                return new List<string>
                {
                    _resourceLoader.GetString("suggestion"),
                    _resourceLoader.GetString("bug"),
                    _resourceLoader.GetString("other")
                };
            }
        }

        private string _selectedFeedbackType;
        public string SelectedFeedbackType
        {
            get { return _selectedFeedbackType; }
            set
            {
                _selectedFeedbackType = value;
                RaisePropertyChanged();
            }
        }

        private string _content;
        public string Content
        {
            get { return _content; }
            set
            {
                _content = value;
                RaisePropertyChanged();
                ((RelayCommand)SendFeedbackCommand).RaiseCanExecuteChanged();
            }
        }

        public ICommand SendFeedbackCommand { get; private set; }

        public FeedbackViewModel(INavigationService navigationService)
        {
            _navigationService = navigationService;

            SelectedFeedbackType = _resourceLoader.GetString("suggestion");

            SendFeedbackCommand = new RelayCommand(SendFeedback, CanSendFeedback);

            if (IsInDesignMode)
            {
                // Code runs in Blend --> create design time data.
                Content = "I write a text for the feedback feature of the Modern GitHub app.";
            }
            else
            {
                // Code runs "for real"
            }
        }

        private bool CanSendFeedback()
        {
            return !string.IsNullOrWhiteSpace(Content);
        }
        private async void SendFeedback()
        {
            var stringUri = string.Format("mailto:?to={0}&subject={1}&body={2}",
                "david.bottiau@epsi.fr",
                string.Format("[Modern GitHub] {0}", SelectedFeedbackType),
                Content);

            await Launcher.LaunchUriAsync(new Uri(stringUri));

            App.TelemetryClient.TrackEvent(string.Format("SendFeedback.{0}", SelectedFeedbackType));

            _navigationService.GoBack();
            Content = string.Empty;
        }
    }
}


text:
package net.strongdesign.desij.decomposition.partitioning;

import java.util.Collection;

/**
 * @author Dominic Wist
 *
 */
public interface IDisjunctiveCoverFinder {

	public Collection<Collection<Integer>> getOptimalPartition();

}


text:
import wrapper from './wrapper';

describe('wrapper', () => {
  const actionTypes = [
    'LOCAL_ACTION'
  ];
  const asyncActionTypes = [
    'SERVER_ACTION'
  ];
  const result = wrapper(actionTypes, asyncActionTypes);

  it('Setups up local actions', () => {
    // Local actions shouldn't get a 'DONE'
    expect(result.LOCAL_ACTION).toEqual('LOCAL_ACTION');
    expect(result.LOCAL_ACTION_DONE).toEqual(undefined);
  });

  it('Adds a "DONE" for async actions', () => {
    // Server actions or async actions get a 'DONE'
    expect(result.SERVER_ACTION).toEqual('SERVER_ACTION');
    expect(result.SERVER_ACTION_DONE).toEqual('SERVER_ACTION_DONE');
  });

});


text:
<!-- This is to open discussions on various project-related topics -->

## Discussion Topic
<!-- What is the topic you are opening for discussion? -->

## Actionable Goals
<!-- What sort of actionable decisions can result from the discussion? -->

## Food for Discussion
<!-- Add ideas, questions, info to feed the discussion -->

## Links, Resources
<!-- Add relevant links, images, references -->

--------------------------------------------------------------------------------
<!-- Please don't delete!  -->
/label ~"Discussion"


text:
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
    switch (arguments.length) {
        case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
        case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
        case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
    }
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var angular2_1 = require('angular2/angular2');
var guest_service_1 = require('./guest-service');
var GuestCard = (function () {
    function GuestCard(guestService) {
        this.guestService = guestService;
    }
    GuestCard.prototype.removeCard = function (guest) {
        this.guestService.remove(guest.key);
    };
    GuestCard = __decorate([
        angular2_1.Component({
            selector: 'guest-card',
            properties: ['guest']
        }),
        angular2_1.View({
            templateUrl: 'app/guest-card.html',
        }),
        __metadata('design:paramtypes', [guest_service_1.GuestService])
    ], GuestCard);
    return GuestCard;
})();
exports.GuestCard = GuestCard;
//# sourceMappingURL=guest-card.js.map


text:
import pygame
import ConfigParser
#from Plano import *
#from LibPolares import *
#from Images import *
#from Algebralineal import *
import random

ANCHO=700
ALTO=700
BLANCO=(255,255,255)
NEGRO=(0,0,0)
ROJO=(255,0,0)
AZUL=(0,0,255)
VERDE=(0,255,0)

class Pantalla:
    def __init__(self,p, recortes,inte):

        self.p = pantalla
        self.recortes = recortes
        self.interprete = inte
        #obtengo el mapa y lo divido en listas por filas desde el interprete
        self.mapa = self.interprete.get('nivel1','mapa').split('\n')
        #self.dict( interprete.items('.'))

    def dibujarMapa(self):
        anal = 32 #ancho y alto de cada sprite que hay en recortes
        i = 0
        j = 0

        for lista in self.mapa:
            for e in lista:

                x = int(self.interprete.get(e,'x')) #a cada tipo de elemento que existe en el mapa busco su pos en x
                y = int(self.interprete.get(e,'y'))#a cada tipo de elemento que existe en el mapa busco su pos en y
                self.p.blit(recortes[x][y],[i * anal,j * anal])#lo dibujo sobre la pantalla
                i+= 1
            j += 1
            i = 0
        pygame.display.flip()#redibujo la pantalla

def recortar(archivo, an , al):
    fondo = pygame.image.load(archivo).convert()
    info = fondo.get_size()
    img_ancho = info[0]  #alto y ancho de cada sprite
    img_alto = info[1]
    corte_x = img_ancho /an
    corte_y = img_alto/al

    m = []
    for i in range(an):
        fila = []
        for j in range(al):
            cuadro = [i*corte_x,j*corte_y,corte_x,corte_y]
            recorte = fondo.subsurface(cuadro)
            fila.append(recorte)
        m.append(fila)

    return m

if __name__ =='__main__':
    pygame.init()
    pantalla=pygame.display.set_mode([ANCHO, ALTO])
    #fondo = pygame.image.load('terrenogen.png').convert()

    #info = fondo.get_size() #puedo optener ancho y alto de la imagen
    #img_ancho = info[0]
    #img_alto = info[1]

    #cuadro= [20*32,0,32,32]
    #recorte = fondo.subsurface(cuadro) #recorte de la superficie

    recortes  = recortar('terrenogen.png',32,12)
    '''for i in range(32):
        for j in range(12):
            pantalla.blit(recortes[i][j],[0,0])'''

    #cargo el mapa
    archivo = 'map.map'
    interprete = ConfigParser.ConfigParser()
    interprete.read(archivo)

    #pantalla.blit(recortes[10][0],[0,0])
    #pygame.display.flip()

    pan = Pantalla(pantalla,recortes,interprete)
    pan.dibujarMapa()

    fin  = False
    puntos = 0
    while not fin:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                fin=True


text:
<#PSScriptInfo

.VERSION 1.0

.GUID

.AUTHOR AzureAutomationTeam

.COMPANYNAME Microsoft

.COPYRIGHT

.TAGS AzureAutomation Utility

.LICENSEURI

.PROJECTURI https://github.com/azureautomation/runbooks/blob/master/Utility/Remove-ResourceGroups.ps1

.ICONURI

.EXTERNALMODULEDEPENDENCIES

.REQUIREDSCRIPTS

.EXTERNALSCRIPTDEPENDENCIES

.RELEASENOTES

#>

#Requires -Module Azure
#Requires -Module AzureRM.Profile
#Requires -Module AzureRM.Resources

<#
.SYNOPSIS
  Connects to Azure and removes all resource groups which match the name filter

.DESCRIPTION
  This runbook connects to Azure and removes all resource groups which match the name filter.
  You can run across multiple subscriptions, delete all resource groups, or run in preview mode.
  Warning: This will delete all resources, including child resources in a group when preview mode is set to $false.

  REQUIRED AUTOMATION ASSETS
    Authorization to targeted Azure subscriptions using one of the following options:
        Option 1: An Automation credential asset that contains the Azure AD user credential.
        Option 2: An Automation connection asset that contains the Azure AD service principal.

.PARAMETER AuthenticationType
  Mandatory.
  The type of authentication to use for connection to Azure subscriptions.
  Valid values are AADCREDENTIAL and SERVICEPRINCIPAL.
    - AADCREDENTIAL = Automation credential asset using an Azure AD user credential.
    - SERVICEPRINCIPAL = Automation connection asset using an Azure AD service principal. More info at https://azure.microsoft.com/documentation/articles/automation-sec-configure-azure-runas-account/

.PARAMETER AuthenticationAssetName
  Mandatory.
  The name of an authentication asset with authorization for this subscription. Uses credential asset name "AzureRunAsConnection" if none specified which is linked to the default name created when you follow the article for ServicePrincipal authentication above.

.PARAMETER ActionType
  Mandatory.
  The specific action to take for either keeping assets that match the name filter and deleting everything else or deleting just those assets that match the name filter.
  Valid values are KEEP, DELETE, and DELETEALL.
    - KEEP = Delete everything except resource groups that match the name filter
    - DELETE = Delete only resource groups that match the name filter
    - DELETEALL = Delete all resource groups

.PARAMETER SubscriptionIds
  Mandatory
  Allows you to specify the targeted subscription id(s) for removal of resource groups.
  Pass multiple subscripription ids through a comma separated list.

.PARAMETER NameFilter
  Optional
  Allows you to specify a name filter to limit the resource groups that you will KEEP or DELETE.
  Pass multiple name filters through a comma separated list.
  The filter is not case sensitive and will match any resource group that contains the string.

.PARAMETER PreviewMode
  Optional with default of $true.
  Execute the runbook to see which resource groups would be deleted but take no action.

.EXAMPLE
    Remove-ResourceGroups `
        -AuthenticationType ServicePrincipal `
        -AuthenticationAssetName AzureRunAsConnection `
        -ActionType DELETE `
        -SubscriptionIds abcd1234-567e-8f9a-1a2b-3c4de5fa6b78,bbcd1234-567e-8f9a-1a2b-3c4de5fa6b78 `
        -NameFilter removeme,removemetoo

.NOTES
    AUTHOR: System Center Automation Team
    LASTEDIT: August 8, 2016
#>

workflow Remove-ResourceGroups
{
	param(
		[parameter(Mandatory = $true)]
		[string]$AuthenticationType,

		[Parameter(Mandatory=$true)]
		[string] $AuthenticationAssetName = "AzureRunAsConnection",

		[parameter(Mandatory = $true)]
		[string]$ActionType,

		[parameter(Mandatory=$true)]
		[string]$SubscriptionIds,

		[parameter(Mandatory = $false)]
		[string]$NameFilter,

		[parameter(Mandatory = $false)]
		[bool]$PreviewMode = $true
	)

	# Returns strings with status messages
	[OutputType([String])]

	$VerbosePreference = 'Continue'

	[regex]$authenticationTypeRegex = 'AADCREDENTIAL|SERVICEPRINCIPAL'
	if ($AuthenticationType.ToUpper() -notmatch $authenticationTypeRegex) {
		throw "AuthenticationType not valid, valid types are AADCREDENTIAL and SERVICEPRINCIPAL"
	}

	[regex]$actionTypeRegex = 'KEEP|DELETE|DELETEALL'
	if ($ActionType.ToUpper() -notmatch $actionTypeRegex) {
		throw "ActionType not valid, valid actions are KEEP, DELETE, and DELETEALL"
	}

 	# Connect to Azure and select the subscription to work against
 	if ($AuthenticationType.ToUpper() -eq "AADCREDENTIAL") {
		$creds = Get-AutomationPSCredential -Name $AuthenticationAssetName

		$null = Add-AzureRmAccount -Credential $creds -ErrorAction Stop -ErrorVariable err
		if($err) {
			throw "Failed to log in to Azure RM. $err"
		}
	 }
	 elseif ($AuthenticationType.ToUpper() -eq "SERVICEPRINCIPAL") {
		$ServicePrincipalConnection = Get-AutomationConnection -Name $AuthenticationAssetName

		Add-AzureRmAccount -ServicePrincipal `
         -TenantId $servicePrincipalConnection.TenantId `
         -ApplicationId $servicePrincipalConnection.ApplicationId `
         -CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint
	 }
	 else {
		throw "AuthenticationType not valid, valid types are AADCREDENTIAL and SERVICEPRINCIPAL"
	 }

	# Parse subscription id list and name filter list
	$subscriptionIdList = $SubscriptionIds.Split(',')
	if ($NameFilter) {
		$nameFilterList = $NameFilter.Split(',')
		[regex]$nameFilterRegex = '(' + (($nameFilterList | foreach {[regex]::escape($_.ToLower())}) –join "|") + ')'
	}

	# Begin loop through each subscription
	foreach ($subscriptionId in $subscriptionIdList) {
		try {
			# Select the subscription, if not found, skip resource group removal
			Write-Verbose "Attempting connection to subscription: $subscriptionId"
			Set-AzureRMContext -SubscriptionId $subscriptionId -ErrorAction Stop -ErrorVariable err
			if($err) {
				Write-Error "Subscription not found: $subscriptionId."
				throw $err
			}
			else {
				Write-Verbose "Successful connection to subscription: $subscriptionId"
				# Find resource groups to remove based on passed in name filter and KEEP, DELETE, or DELEETALL action
				if ($ActionType.ToUpper() -eq 'KEEP') {
					$groupsToRemove = Get-AzureRmResourceGroup | `
										? { $nameFilterList.Count -eq 0 -or $_.ResourceGroupName.ToLower() -notmatch $nameFilterRegex }
				}
				elseif ($ActionType.ToUpper() -eq 'DELETE') {
					$groupsToRemove = Get-AzureRmResourceGroup | `
										? { $nameFilterList.Count -eq 0 -or $_.ResourceGroupName.ToLower() -match $nameFilterRegex }
				}
				elseif ($ActionType.ToUpper() -eq 'DELETEALL') {
					$groupsToRemove = Get-AzureRmResourceGroup
				}

				# No matching groups were found to remove
				if ($groupsToRemove.Count -eq 0) {
					Write-Output "No matching resource groups found for subscription: $($subscriptionId)"
				}
				# Matching groups were found to remove
				else
				{
					# In preview mode, output what would take place but take no action
					if ($PreviewMode -eq $true) {
						Write-Output "Preview Mode: The following resource groups would be removed for subscription: $($subscriptionId)"
						foreach ($group in $groupsToRemove){
						Write-Output $($group.ResourceGroupName)
						}
						Write-Output "Preview Mode: The following resources would be removed:"
						$resources = (Get-AzureRmResource | foreach {$_} | Where-Object {$groupsToRemove.ResourceGroupName.Contains($_.ResourceGroupName)})
						foreach ($resource in $resources) {
							Write-Output $resource
						}
					}
					# Remove the resource groups in parallel
					else {
						Write-Output "Preparing to remove resource groups in parallel for subscription: $($subscriptionId)"
						Write-Output "The following resources will be removed:"
						$resources = (Get-AzureRmResource | foreach {$_} | Where-Object {$groupsToRemove.ResourceGroupName.Contains($_.ResourceGroupName)})
						foreach ($resource in $resources) {
							Write-Output $resource
						}
						foreach -parallel ($resourceGroup in $groupsToRemove) {
							Write-Output "Starting to remove resource group: $($resourceGroup.ResourceGroupName)"
							Remove-AzureRmResourceGroup -Name $($resourceGroup.ResourceGroupName) -Force
							if ((Get-AzureRmResourceGroup -Name $($resourceGroup.ResourceGroupName) -ErrorAction SilentlyContinue) -eq $null) {
								Write-Output "...successfully removed resource group: $($resourceGroup.ResourceGroupName)"
							}
						}
					}
					Write-Output "Completed."
				}
			}
		}
		catch {
			$errorMessage = $_
		}
		if ($errorMessage) {
			Write-Error $errorMessage
		}
	}
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!--

    Copyright 2005-2015 The Kuali Foundation

    Licensed under the Educational Community License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.opensource.org/licenses/ecl2.php

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<!--
     This persistence.xml file exists for the sole purpose of being used during the static bytecode weaving process.
-->
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
             version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
  <persistence-unit name="krms-impl">
    <description>
      This is a persistence unit used for the purposes of static bytecode weaving in Eclipselink (see pom.xml of
      this module). It is not used or loaded by the runtime at all.
    </description>
    <class>org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter</class>
    <class>org.kuali.rice.krms.impl.repository.jpa.RelationshipTypeConverter</class>
    <class>org.kuali.rice.krms.impl.repository.FunctionBo</class>
    <class>org.kuali.rice.krms.impl.repository.FunctionParameterBo</class>
    <class>org.kuali.rice.krms.impl.repository.CategoryBo</class>
    <class>org.kuali.rice.krms.impl.repository.TermSpecificationBo</class>
    <class>org.kuali.rice.krms.impl.repository.TermBo</class>
    <class>org.kuali.rice.krms.impl.repository.TermParameterBo</class>
    <class>org.kuali.rice.krms.impl.repository.TermResolverBo</class>
    <class>org.kuali.rice.krms.impl.repository.TermResolverAttributeBo</class>
    <class>org.kuali.rice.krms.impl.repository.TermResolverParameterSpecificationBo</class>
    <class>org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo</class>
    <class>org.kuali.rice.krms.impl.repository.ContextBo</class>
    <class>org.kuali.rice.krms.impl.repository.ContextAttributeBo</class>
    <class>org.kuali.rice.krms.impl.repository.AgendaBo</class>
    <class>org.kuali.rice.krms.impl.repository.AgendaAttributeBo</class>
    <class>org.kuali.rice.krms.impl.repository.AgendaItemBo</class>
    <class>org.kuali.rice.krms.impl.repository.RuleBo</class>
    <class>org.kuali.rice.krms.impl.repository.RuleAttributeBo</class>
    <class>org.kuali.rice.krms.impl.repository.PropositionBo</class>
    <class>org.kuali.rice.krms.impl.repository.PropositionParameterBo</class>
    <class>org.kuali.rice.krms.impl.repository.ActionBo</class>
    <class>org.kuali.rice.krms.impl.repository.ActionAttributeBo</class>
    <class>org.kuali.rice.krms.impl.repository.ContextValidAgendaBo</class>
    <class>org.kuali.rice.krms.impl.repository.ContextValidActionBo</class>
    <class>org.kuali.rice.krms.impl.repository.ContextValidRuleBo</class>
    <class>org.kuali.rice.krms.impl.repository.ContextValidTermBo</class>
    <class>org.kuali.rice.krms.impl.repository.KrmsTypeBo</class>
    <class>org.kuali.rice.krms.impl.repository.KrmsTypeAttributeBo</class>
    <class>org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo</class>
    <class>org.kuali.rice.krms.impl.repository.TypeTypeRelationBo</class>
    <class>org.kuali.rice.krms.impl.repository.NaturalLanguageTemplateBo</class>
    <class>org.kuali.rice.krms.impl.repository.NaturalLanguageTemplateAttributeBo</class>
    <class>org.kuali.rice.krms.impl.repository.NaturalLanguageUsageBo</class>
    <class>org.kuali.rice.krms.impl.repository.ReferenceObjectBindingBo</class>
  </persistence-unit>
</persistence>


text:
package net

// If the ifindex is zero, interfaceTable returns mappings of all
// network interfaces.  Otherwise it returns a mapping of a specific
// interface.
func interfaceTable(ifindex int) ([]Interface, error) {
	return nil, nil
}

// If the ifi is nil, interfaceAddrTable returns addresses for all
// network interfaces.  Otherwise it returns addresses for a specific
// interface.
func interfaceAddrTable(ifi *Interface) ([]Addr, error) {
	return nil, nil
}

// interfaceMulticastAddrTable returns addresses for a specific
// interface.
func interfaceMulticastAddrTable(ifi *Interface) ([]Addr, error) {
	return nil, nil
}


text:
<?php

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

namespace Acd\core\tests;

/**
 * Http Class Test
 * @author Acidvertigo
 */

class HttpTest extends \PHPUnit_Framework_TestCase
{
    public function setUp() {
        $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
        $_SERVER['HTTPS'] = 'ON';
        $_SERVER['PORT'] = '80';
    }

    public function tearDown() {
        unset($_SERVER['SERVER_PROTOCOL']);
        unset($_SERVER['HTTPS']);
        unset($_SERVER['PORT']);
        parent::tearDown();
    }

    public function testProtocol()
    {
        $http = new \Acd\Http;

        $this->assertInternalType('string', $http->protocol());
        $this->assertContains('HTTP/1.1', $http->protocol());
    }

    public function testIsSsl()
    {
        $http = new \Acd\Http;

        $this->assertTrue($http->isSsl());
    }

    public function testIsSafeMethod()
    {
        $http = new \Acd\Http;
        $safeMethods = ['HEAD', 'GET', 'OPTIONS', 'TRACE'];

        foreach ($safeMethods as $value) {
            $this->assertTrue($http->isSafeMethod($value));
        }

    }

    public function testIsIdempotentMethod()
    {
        $http = new \Acd\Http;
        $idempotentMethods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'PUT', 'TRACE'];

        foreach ($idempotentMethods as $value) {
            $this->assertTrue($http->isIdempotentMethod($value));
        }
    }

}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.isima.reflexbench.core;

import java.util.Collection;

/**
 *
 * @author Gaetan
 */
public abstract class ExportStrategy {

    public abstract Boolean exportBenchmarksResult(Collection<BenchTry> benchTries,String fileOrDirectoryPath);
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PowerTray
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using (PowerIcon daemon = new PowerIcon())
            {
                daemon.Display();
                Application.Run();
            }
        }
    }
}


text:
var line = require("../Shared/line.js");

module.exports = function (context, myQueueItem) {
    context.log('Node.js queue trigger function processed work item', myQueueItem);
    return line.push(myQueueItem);
};


text:
package me.beresnev.algorithms.graphs;

import me.beresnev.datastructures.WeightedGraph;
import me.beresnev.datastructures.WeightedGraph.Edge;
import me.beresnev.datastructures.WeightedGraph.Vertex;

import java.util.PriorityQueue;
import java.util.Queue;

/**
 * @author Ignat Beresnev
 * @version 1.1
 * @since 09.03.17.
 */
public class Dijkstra {

    /**
     * !!! DISCLAIMER !!!
     * As of right now, this algorithm isn't functioning properly. Unfortunately,
     * PriorityQueue in Java doesn't restructure itself when you update values.
     * In order for it to work, change PriorityQueue to FibonacciHeap or MinHeap.
     * <p>
     * Greedy algorithm. We start with source, then update the distance
     * between source and all of its edges. Then select the closest edge
     * (being greedy), and do the same for all of its edges. Repeat.
     */
    private Dijkstra() {
    }

    /**
     * DOES NOT FUNCTION PROPERLY. CHANGE PRIORITY QUEUE TO MINHEAP
     * OR FIBONACCIHEAP. TODO: Correct this algorithm
     */
    public static void dijkstra(WeightedGraph graph, Vertex source) {
        Queue<Vertex> queue = new PriorityQueue<>();

        source.dist = 0;
        queue.addAll(graph.getVertices());

        while (!queue.isEmpty()) {
            Vertex v = queue.poll();
            if (v.dist == Integer.MAX_VALUE) continue;
            for (Edge edge : v.edges) {
                relax(v, edge.vertex, edge.weight);
            }
        }
    }

    private static void relax(Vertex v, Vertex e, int weight) {
        if (e.dist > (v.dist + weight)) {
            e.dist = v.dist + weight;
            e.parent = v;
        }
    }
}


text:
package com.jd.framework.orm.common.conv;

import java.io.File;
import java.lang.reflect.Array;
import java.net.URL;
import java.util.Date;
import org.apache.commons.lang3.ArrayUtils;

import com.jd.framework.orm.common.ClassConvertUtils;

/**
 * 将单个Object对象转换成不同的数据类型返回
 */
public abstract class DataConverter {
    public static final Date[] EMPTY_DATE_ARRAY = new Date[0];
    public static final java.sql.Date[] EMPTY_SQL_DATE_ARRAY = new java.sql.Date[0];
    public static final java.sql.Time[] EMPTY_SQL_TIME_ARRAY = new java.sql.Time[0];
    public static final java.sql.Timestamp[] EMPTY_SQL_TIMESTAMP_ARRAY = new java.sql.Timestamp[0];
    public static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
    public static final File[] EMPTY_FILE_ARRAY = new File[0];
    public static final URL[] EMPTY_URL_ARRAY = new URL[0];

    protected abstract Object value();

    protected abstract String[] values();

    public abstract boolean exist();

    public String asString() {
        return asString(null);
    }

    public String asString(String defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, String.class);
    }

    public int asIntValue() {
        return asInt(0);
    }

    public Integer asInt() {
        return asInt(null);
    }
    public Integer asInt(Integer defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, Integer.class);
    }

    public long asLongValue() {
        return asLong(0L);
    }

    public Long asLong() {
        return asLong(null);
    }

    public Long asLong(Long defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, Long.class);
    }

    public double asDoubleValue() {
        return asDouble(0D);
    }

    public Double asDouble() {
        return asDouble(null);
    }

    public Double asDouble(Double defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, Double.class);
    }

    public boolean asBooleanValue() {
        return asBoolean(false).booleanValue();
    }

    public Boolean asBoolean() {
        return asBoolean(null);
    }

    public Boolean asBoolean(Boolean defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, Boolean.class);
    }

    public Date asDate() {
        return asDate(null);
    }

    public Date asDate(Date defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, Date.class);
    }

    public java.sql.Date asSqlDate() {
        return asSqlDate(null);
    }

    public java.sql.Date asSqlDate(java.sql.Date defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, java.sql.Date.class);
    }

    public java.sql.Time asSqlTime() {
        return asSqlTime(null);
    }

    public java.sql.Time asSqlTime(java.sql.Time defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, java.sql.Time.class);
    }

    public java.sql.Timestamp asTimestamp() {
        return asTimestamp(null);
    }

    public java.sql.Timestamp asTimestamp(java.sql.Timestamp defaultValue) {
        Object value = value();
        return (value == null) ? defaultValue : ClassConvertUtils.convert(value, java.sql.Timestamp.class);
    }

    public Class<?> asClass() {
        Object value = value();
        return (value == null) ? null : ClassConvertUtils.convert(value, Class.class);
    }

    public File asFile() {
        Object value = value();
        return (value == null) ? null : ClassConvertUtils.convert(value, File.class);
    }

    public URL asURL() {
        Object value = value();
        return (value == null) ? null : ClassConvertUtils.convert(value, URL.class);
    }

    public <T> T asObject(Class<T> targetClass) {
        Object value = value();
        return (value == null) ? null : ClassConvertUtils.convert(value, targetClass);
    }

    public String[] asStrings() {
        String[] values = values();
        return (values == null) ? ArrayUtils.EMPTY_STRING_ARRAY : values;
    }

    public Integer[] asInts() {
        String[] values = values();
        return (values == null) ? ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY : ClassConvertUtils.convertArrays(values, Integer.class);
    }

    public Long[] asLongs() {
        String[] values = values();
        return (values == null) ? ArrayUtils.EMPTY_LONG_OBJECT_ARRAY : ClassConvertUtils.convertArrays(values, Long.class);
    }

    public Double[] asDoubles() {
        String[] values = values();
        return (values == null) ? ArrayUtils.EMPTY_DOUBLE_OBJECT_ARRAY : ClassConvertUtils.convertArrays(values, Double.class);
    }

    public Boolean[] asBooleans() {
        String[] values = values();
        return (values == null) ? ArrayUtils.EMPTY_BOOLEAN_OBJECT_ARRAY : ClassConvertUtils.convertArrays(values, Boolean.class);
    }

    public Date[] asDates() {
        String[] values = values();
        return (values == null) ? EMPTY_DATE_ARRAY : ClassConvertUtils.convertArrays(values, Date.class);
    }

    public java.sql.Date[] asSqlDates() {
        String[] values = values();
        return (values == null) ? EMPTY_SQL_DATE_ARRAY : ClassConvertUtils.convertArrays(values, java.sql.Date.class);
    }

    public java.sql.Time[] asSqlTimes() {
        String[] values = values();
        return (values == null) ? EMPTY_SQL_TIME_ARRAY : ClassConvertUtils.convertArrays(values, java.sql.Time.class);
    }

    public java.sql.Timestamp[] asTimestamps() {
        String[] values = values();
        return (values == null) ? EMPTY_SQL_TIMESTAMP_ARRAY : ClassConvertUtils.convertArrays(values, java.sql.Timestamp.class);
    }

    public Class<?>[] asClasses() {
        String[] values = values();
        return (values == null) ? EMPTY_CLASS_ARRAY : ClassConvertUtils.convertArrays(values, Class.class);
    }

    public File[] asFiles() {
        String[] values = values();
        return (values == null) ? EMPTY_FILE_ARRAY : ClassConvertUtils.convertArrays(values, File.class);
    }

    public URL[] asURLs() {
        String[] values = values();
        return (values == null) ? EMPTY_URL_ARRAY : ClassConvertUtils.convertArrays(values, URL.class);
    }

    @SuppressWarnings("unchecked")
    public <T> T[] asObjects(Class<T> componentType) {
        String[] values = values();
        return (T[]) ((values == null) ? Array.newInstance(componentType, 0) : ClassConvertUtils.convertArrays(values, componentType));
    }
}


text:
namespace Microsoft.Azure.Management.DataFactory.Models
{
    using Microsoft.Rest;
    using Microsoft.Rest.Serialization;
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// Factory resource type.
    /// </summary>
    [Rest.Serialization.JsonTransformation]
    public partial class Factory : Resource
    {
        /// <summary>
        /// Initializes a new instance of the Factory class.
        /// </summary>
        public Factory()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the Factory class.
        /// </summary>
        /// <param name="id">The resource identifier.</param>
        /// <param name="name">The resource name.</param>
        /// <param name="type">The resource type.</param>
        /// <param name="location">The resource location.</param>
        /// <param name="tags">The resource tags.</param>
        /// <param name="eTag">Etag identifies change in the resource.</param>
        /// <param name="additionalProperties">Unmatched properties from the
        /// message are deserialized this collection</param>
        /// <param name="identity">Managed service identity of the
        /// factory.</param>
        /// <param name="provisioningState">Factory provisioning state, example
        /// Succeeded.</param>
        /// <param name="createTime">Time the factory was created in ISO8601
        /// format.</param>
        /// <param name="version">Version of the factory.</param>
        /// <param name="repoConfiguration">Git repo information of the
        /// factory.</param>
        public Factory(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), string eTag = default(string), IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), FactoryIdentity identity = default(FactoryIdentity), string provisioningState = default(string), System.DateTime? createTime = default(System.DateTime?), string version = default(string), FactoryRepoConfiguration repoConfiguration = default(FactoryRepoConfiguration))
            : base(id, name, type, location, tags, eTag)
        {
            AdditionalProperties = additionalProperties;
            Identity = identity;
            ProvisioningState = provisioningState;
            CreateTime = createTime;
            Version = version;
            RepoConfiguration = repoConfiguration;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets unmatched properties from the message are deserialized
        /// this collection
        /// </summary>
        [JsonExtensionData]
        public IDictionary<string, object> AdditionalProperties { get; set; }

        /// <summary>
        /// Gets or sets managed service identity of the factory.
        /// </summary>
        [JsonProperty(PropertyName = "identity")]
        public FactoryIdentity Identity { get; set; }

        /// <summary>
        /// Gets factory provisioning state, example Succeeded.
        /// </summary>
        [JsonProperty(PropertyName = "properties.provisioningState")]
        public string ProvisioningState { get; private set; }

        /// <summary>
        /// Gets time the factory was created in ISO8601 format.
        /// </summary>
        [JsonProperty(PropertyName = "properties.createTime")]
        public System.DateTime? CreateTime { get; private set; }

        /// <summary>
        /// Gets version of the factory.
        /// </summary>
        [JsonProperty(PropertyName = "properties.version")]
        public string Version { get; private set; }

        /// <summary>
        /// Gets or sets git repo information of the factory.
        /// </summary>
        [JsonProperty(PropertyName = "properties.repoConfiguration")]
        public FactoryRepoConfiguration RepoConfiguration { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            if (RepoConfiguration != null)
            {
                RepoConfiguration.Validate();
            }
        }
    }
}


text:
ActionController::Base.session = {
  :key         => '_mystore_session',
  :secret      => '23fbfedeba2f2871dc59ff2ccf774bca3a8db34988fc50e206b9da6ca959dc1c1c913870066e14f1609077f7704a144ee2b7b643fde2499184d3bab1fd2c624f'
}

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create")
# ActionController::Base.session_store = :active_record_store


text:
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Admin | Waterwork</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="../bower_components/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="../bower_components/Ionicons/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
     folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="../dist/css/skins/_all-skins.min.css">
<!-- Morris chart -->
<link rel="stylesheet" href="../bower_components/morris.js/morris.css">
<!-- jvectormap -->
<link rel="stylesheet" href="../bower_components/jvectormap/jquery-jvectormap.css">
<!-- Date Picker -->
<link rel="stylesheet" href="../bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="../bower_components/bootstrap-daterangepicker/daterangepicker.css">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">


text:
#pragma once
#include <aws/waf-regional/WAFRegional_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/waf-regional/model/ActivatedRule.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace WAFRegional
{
namespace Model
{
  class AWS_WAFREGIONAL_API ListActivatedRulesInRuleGroupResult
  {
  public:
    ListActivatedRulesInRuleGroupResult();
    ListActivatedRulesInRuleGroupResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    ListActivatedRulesInRuleGroupResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    /**
     *
If you have more ActivatedRules than the number that you
     * specified for Limit in the request, the response includes a
     * NextMarker value. To list more ActivatedRules, submit
     * another ListActivatedRulesInRuleGroup request, and specify the
     * NextMarker value from the response in the NextMarker
     * value in the next request.

     */
    inline const Aws::String& GetNextMarker() const{ return m_nextMarker; }

    /**
     *
If you have more ActivatedRules than the number that you
     * specified for Limit in the request, the response includes a
     * NextMarker value. To list more ActivatedRules, submit
     * another ListActivatedRulesInRuleGroup request, and specify the
     * NextMarker value from the response in the NextMarker
     * value in the next request.

     */
    inline void SetNextMarker(const Aws::String& value) { m_nextMarker = value; }

    /**
     *
If you have more ActivatedRules than the number that you
     * specified for Limit in the request, the response includes a
     * NextMarker value. To list more ActivatedRules, submit
     * another ListActivatedRulesInRuleGroup request, and specify the
     * NextMarker value from the response in the NextMarker
     * value in the next request.

     */
    inline void SetNextMarker(Aws::String&& value) { m_nextMarker = std::move(value); }

    /**
     *
If you have more ActivatedRules than the number that you
     * specified for Limit in the request, the response includes a
     * NextMarker value. To list more ActivatedRules, submit
     * another ListActivatedRulesInRuleGroup request, and specify the
     * NextMarker value from the response in the NextMarker
     * value in the next request.

     */
    inline void SetNextMarker(const char* value) { m_nextMarker.assign(value); }

    /**
     *
If you have more ActivatedRules than the number that you
     * specified for Limit in the request, the response includes a
     * NextMarker value. To list more ActivatedRules, submit
     * another ListActivatedRulesInRuleGroup request, and specify the
     * NextMarker value from the response in the NextMarker
     * value in the next request.

     */
    inline ListActivatedRulesInRuleGroupResult& WithNextMarker(const Aws::String& value) { SetNextMarker(value); return *this;}

    /**
     *
If you have more ActivatedRules than the number that you
     * specified for Limit in the request, the response includes a
     * NextMarker value. To list more ActivatedRules, submit
     * another ListActivatedRulesInRuleGroup request, and specify the
     * NextMarker value from the response in the NextMarker
     * value in the next request.

     */
    inline ListActivatedRulesInRuleGroupResult& WithNextMarker(Aws::String&& value) { SetNextMarker(std::move(value)); return *this;}

    /**
     *
If you have more ActivatedRules than the number that you
     * specified for Limit in the request, the response includes a
     * NextMarker value. To list more ActivatedRules, submit
     * another ListActivatedRulesInRuleGroup request, and specify the
     * NextMarker value from the response in the NextMarker
     * value in the next request.

     */
    inline ListActivatedRulesInRuleGroupResult& WithNextMarker(const char* value) { SetNextMarker(value); return *this;}

    /**
     *
An array of ActivatedRules objects.

     */
    inline const Aws::Vector<ActivatedRule>& GetActivatedRules() const{ return m_activatedRules; }

    /**
     *
An array of ActivatedRules objects.

     */
    inline void SetActivatedRules(const Aws::Vector<ActivatedRule>& value) { m_activatedRules = value; }

    /**
     *
An array of ActivatedRules objects.

     */
    inline void SetActivatedRules(Aws::Vector<ActivatedRule>&& value) { m_activatedRules = std::move(value); }

    /**
     *
An array of ActivatedRules objects.

     */
    inline ListActivatedRulesInRuleGroupResult& WithActivatedRules(const Aws::Vector<ActivatedRule>& value) { SetActivatedRules(value); return *this;}

    /**
     *
An array of ActivatedRules objects.

     */
    inline ListActivatedRulesInRuleGroupResult& WithActivatedRules(Aws::Vector<ActivatedRule>&& value) { SetActivatedRules(std::move(value)); return *this;}

    /**
     *
An array of ActivatedRules objects.

     */
    inline ListActivatedRulesInRuleGroupResult& AddActivatedRules(const ActivatedRule& value) { m_activatedRules.push_back(value); return *this; }

    /**
     *
An array of ActivatedRules objects.

     */
    inline ListActivatedRulesInRuleGroupResult& AddActivatedRules(ActivatedRule&& value) { m_activatedRules.push_back(std::move(value)); return *this; }

  private:

    Aws::String m_nextMarker;

    Aws::Vector<ActivatedRule> m_activatedRules;
  };

} // namespace Model
} // namespace WAFRegional
} // namespace Aws


text:
module EmploymentTypesHelper
end


text:
namespace Pipelines
{
	using namespace GX_STL;
	using namespace GX_STL::GXTypes;
	using namespace GX_STL::GXMath;

	using namespace Engine::Platforms;
}

#include "shared_types.h"

namespace Pipelines
{
// From file 'texture2dnearestfilter.cpp'
void Create_texture2dnearestfilter (PipelineTemplateDescription& descr);

// From file 'texture2dbilinearfilter.cpp'
void Create_texture2dbilinearfilter (PipelineTemplateDescription& descr);

}	// Pipelines


text:
#ifndef WIN32
#include <unistd.h>
#include <sys/utsname.h>
#endif
#include "los.h"
#include "luv_misc.h"

static int los_hostname(lua_State* L) {
  char s[255];
  if (gethostname(s, 255) < 0) {
    luaL_error(L, "Problem getting hostname");
  }
  lua_pushstring(L, s);
  return 1;
}

static int los_type(lua_State* L) {
#ifdef WIN32
  lua_pushstring(L, "win32");
#else
  struct utsname info;
  uname(&info);
  lua_pushstring(L, info.sysname);
#endif
  return 1;
}

static int los_release(lua_State* L) {
#ifdef WIN32
  lua_pushstring(L, "Windows");
#else
  struct utsname info;
  uname(&info);
  lua_pushstring(L, info.release);
#endif
  return 1;
}

/******************************************************************************/

static const luaL_reg los_f[] = {
  {"hostname", los_hostname},
  {"loadavg", luv_loadavg},
  {"uptime", luv_uptime},
  {"totalmem", luv_get_total_memory},
  {"freemem", luv_get_free_memory},
  {"cpus", luv_cpu_info},
  {"type", los_type},
  {"release", los_release},
  {"networkInterfaces", luv_interface_addresses},
  {NULL, NULL}
};

LUALIB_API int luaopen_os_binding(lua_State *L) {

  lua_newtable (L);
  luaL_register(L, NULL, los_f);

  /* Return the new module */
  return 1;
}


text:
package io.swagger.client.model;

import io.swagger.annotations.*;
import com.google.gson.annotations.SerializedName;

@ApiModel(description = "")
public class RegSysAuthenticationRequest  {

  @SerializedName("RegNo")
  private Integer regNo = null;
  @SerializedName("Username")
  private String username = null;
  @SerializedName("Password")
  private String password = null;
  @SerializedName("AccessToken")
  private String accessToken = null;

  /**
   **/
  @ApiModelProperty(value = "")
  public Integer getRegNo() {
    return regNo;
  }
  public void setRegNo(Integer regNo) {
    this.regNo = regNo;
  }

  /**
   **/
  @ApiModelProperty(value = "")
  public String getUsername() {
    return username;
  }
  public void setUsername(String username) {
    this.username = username;
  }

  /**
   **/
  @ApiModelProperty(value = "")
  public String getPassword() {
    return password;
  }
  public void setPassword(String password) {
    this.password = password;
  }

  /**
   **/
  @ApiModelProperty(value = "")
  public String getAccessToken() {
    return accessToken;
  }
  public void setAccessToken(String accessToken) {
    this.accessToken = accessToken;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RegSysAuthenticationRequest regSysAuthenticationRequest = (RegSysAuthenticationRequest) o;
    return (regNo == null ? regSysAuthenticationRequest.regNo == null : regNo.equals(regSysAuthenticationRequest.regNo)) &&
        (username == null ? regSysAuthenticationRequest.username == null : username.equals(regSysAuthenticationRequest.username)) &&
        (password == null ? regSysAuthenticationRequest.password == null : password.equals(regSysAuthenticationRequest.password)) &&
        (accessToken == null ? regSysAuthenticationRequest.accessToken == null : accessToken.equals(regSysAuthenticationRequest.accessToken));
  }

  @Override
  public int hashCode() {
    int result = 17;
    result = 31 * result + (regNo == null ? 0: regNo.hashCode());
    result = 31 * result + (username == null ? 0: username.hashCode());
    result = 31 * result + (password == null ? 0: password.hashCode());
    result = 31 * result + (accessToken == null ? 0: accessToken.hashCode());
    return result;
  }

  @Override
  public String toString()  {
    StringBuilder sb = new StringBuilder();
    sb.append("class RegSysAuthenticationRequest {\n");

    sb.append("  regNo: ").append(regNo).append("\n");
    sb.append("  username: ").append(username).append("\n");
    sb.append("  password: ").append(password).append("\n");
    sb.append("  accessToken: ").append(accessToken).append("\n");
    sb.append("}\n");
    return sb.toString();
  }
}


text:
ImageCropBundle Documentation
=============================

  * [Installation](installation.md)
  * [Usage](usage.md)
  * [Removing orphaned crops](orphans.md)
  * [FAQs](faqs.md)

----
Go to [home](https://github.com/anacona16/ImageCropBundle)