Snippets Collections
//if the last time player moved was left
if (!AEInputCheckCurr("A") && lastPlayerDir == 1 && isWalking == 0)
{
  //flip the sprite
  AEGfxTextureSet(playerIdleTexture, 0.0f, 0.0f);
  AEGfxSetFullTransform(curr->pos.x, curr->pos.y, 0.0f, -(curr->width * tile_dim), curr->height * tile_dim);
  isWalking = 0;
}
/*get the mouse x and y position*/
AEInputGetCursorPosition(&mouseX, &mouseY);
AEGfxConvertScreenCoordinatesToWorld(mouseX, mouseY, &mouseInWorldX, &mouseInWorldY);

/*only draw line if it's the wall and left click/hold on mouse occurs*/
if ((mouseInWorldX > (wallX - xHalfSize) && mouseInWorldX < (wallX + xHalfSize)) &&
    (mouseInWorldY > (wallY - yHalfSize) && mouseInWorldY < (wallY + yHalfSize)) &&
    (AEInputCheckCurr(RI_MOUSE_LEFT_BUTTON_DOWN)))
{
  /*mesh for line, needs to be updated with loop*/
  AEGfxMeshStart();

  AEGfxVertexAdd(playerX + xHalfSize, playerY, 0xFFFF0000, 0.0f, 0.0f);
  AEGfxVertexAdd(mouseInWorldX, mouseInWorldY, 0xFFFF0000, 0.0f, 0.0f);

  meshLine = AEGfxMeshEnd();
  AE_ASSERT_MESG(meshLine, "Failed to create line!");

  /*draw line*/
  AEGfxSetRenderMode(AE_GFX_RM_COLOR);
  AEGfxSetPosition(0.0f, 0.0f);
  AEGfxMeshDraw(meshLine, AE_GFX_MDM_LINES_STRIP);
}
// ---------------------------------------------------------------------------
// Project Name		:	Nook
// File Name		:	Menu.c
// Author			:	Rey Rosario, Mary Khuu
// Creation Date	:	25 Jan 2021
// Purpose			:	Main Menu
//
// All content © 2021 DigiPen (USA) Corporation, all rights reserved.
// ---------------------------------------------------------------------------

#include "framework.h"
#include "AEEngine.h"
#include "Audio.h"
#include "GameStateManager.h"
#include "object_data.h"
#include "Sprite.h"

#include "Menu.h"

//------------------------------------------------------------------------------
// Private Constants:
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Private Structures:
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Public Variables:
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Private Variables:
//------------------------------------------------------------------------------

static vec2 backgroundSize = { 1670.0f, 564.0f };
static vec2 buttonSize = { 100.0f, 30.0f };
static vec2 titleSize = { 150.0f, 50.0f };
static vec2 iconSize = { 30.0f, 30.0f };
static vec2 levelPos = { 0.0f, 0.0f };
static vec2 creditsPos = { 0.0f, -100.0f };
static vec2 exitPos = { 0.0f, -200.0f };
static vec2 titlePos = { 0.0f, 150.0f };

static signed long mouseX, mouseY;
static float mouseInWorldX, mouseInWorldY;

static AEGfxVertexList* buttonMesh;
static AEGfxVertexList* titleMesh;
static AEGfxVertexList* bgMesh;
static AEGfxVertexList* fontMesh;
static AEGfxVertexList* iconMesh;

static AEGfxTexture* bgTexture;
static AEGfxTexture* buttonTexture;
static AEGfxTexture* titleTexture;
static AEGfxTexture* fontTexture;
static AEGfxTexture* iconTexture;

TextureOffset titleOffsets[6];
int* currentTitleOffset = 0;
int currTitleFrame = 0;
float* titleTime;

static TextureOffset fontOffsets[30];
static int* currentfontOffset = 0;
static int currfontFrame = 0;
static float* fontTime;

static float bgMusicTimer;

//------------------------------------------------------------------------------
// Private Function Declarations:
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Public Functions:
//------------------------------------------------------------------------------

void MenuLoad()
{
    /*mesh for bg*/
    AEGfxMeshStart();

    AEGfxTriAdd(
        -backgroundSize.x, -backgroundSize.y, 0xFF00FF00, 0.0f, 1.0f,
        backgroundSize.x, -backgroundSize.y, 0xFF00FF00, 1.0f, 1.0f,
        -backgroundSize.x, backgroundSize.y, 0xFF00FF00, 0.0f, 0.0f);

    AEGfxTriAdd(
        backgroundSize.x, -backgroundSize.y, 0xFF00FF00, 1.0f, 1.0f,
        backgroundSize.x, backgroundSize.y, 0xFF00FF00, 1.0f, 0.0f,
        -backgroundSize.x, backgroundSize.y, 0xFF00FF00, 0.0f, 0.0f);

    bgMesh = AEGfxMeshEnd();
    AE_ASSERT_MESG(bgMesh, "Failed to create button!");

    bgTexture = AEGfxTextureLoad("Assets/CityscapeGrey.png");
    AE_ASSERT_MESG(bgTexture, "Failed to create pTex!!");

    /*mesh for buttons: green*/
    AEGfxMeshStart();

    AEGfxTriAdd(
        -buttonSize.x, -buttonSize.y, 0xFF00FF00, 0.0f, 1.0f,
        buttonSize.x, -buttonSize.y, 0xFF00FF00, 1.0f, 1.0f,
        -buttonSize.x, buttonSize.y, 0xFF00FF00, 0.0f, 0.0f);

    AEGfxTriAdd(
        buttonSize.x, -buttonSize.y, 0xFF00FF00, 1.0f, 1.0f,
        buttonSize.x, buttonSize.y, 0xFF00FF00, 1.0f, 0.0f,
        -buttonSize.x, buttonSize.y, 0xFF00FF00, 0.0f, 0.0f);

    buttonMesh = AEGfxMeshEnd();
    AE_ASSERT_MESG(buttonMesh, "Failed to create button!");

    buttonTexture = AEGfxTextureLoad("Assets/NookButtonBright.png");
    AE_ASSERT_MESG(buttonTexture, "Failed to create texture!");

    /*mesh for text*/
    AEGfxMeshStart();

    AEGfxTriAdd(
        -titleSize.x, -titleSize.y, 0xFF00FF00, 0.0f, 1.0f / 6,
        titleSize.x, -titleSize.y, 0xFF00FF00, 1.0f, 1.0f / 6,
        -titleSize.x, titleSize.y, 0xFF00FF00, 0.0f, 0.0f);

    AEGfxTriAdd(
        titleSize.x, -titleSize.y, 0xFF00FF00, 1.0f, 1.0f / 6,
        titleSize.x, titleSize.y, 0xFF00FF00, 1.0f, 0.0f,
        -titleSize.x, titleSize.y, 0xFF00FF00, 0.0f, 0.0f);

    titleMesh = AEGfxMeshEnd();
    AE_ASSERT_MESG(titleMesh, "Failed to create button!");

    titleTexture = AEGfxTextureLoad("Assets/NookLogo.png");
    AE_ASSERT_MESG(titleTexture, "Failed to create texture!");

    titleOffsets[0].mX = 0.0f;			titleOffsets[0].mY = 0.0f;
    titleOffsets[1].mX = 0.0f;			titleOffsets[1].mY = 1.0f / 6;
    titleOffsets[2].mX = 0.0f;			titleOffsets[2].mY = 2.0f / 6;
    titleOffsets[3].mX = 0.0f;			titleOffsets[3].mY = 3.0f / 6;
    titleOffsets[4].mX = 0.0f;			titleOffsets[4].mY = 4.0f / 6;
    titleOffsets[5].mX = 0.0f;			titleOffsets[5].mY = 5.0f / 6;

    /*mesh for hover icon*/
    iconMesh = createQuadMesh(iconSize.x, iconSize.y, 1.0f, 1.0f, "yarn");
    
    iconTexture = AEGfxTextureLoad("Assets/TempHover.png");
    AE_ASSERT_MESG(iconTexture, "Failed to create texture!");

    /*mesh for text*/
    fontMesh = createQuadMesh(15.0f, 15.0f, 1.0 / 5, 1.0f / 6, "alphabets");

    fontTexture = AEGfxTextureLoad("Assets/NookFontSheet_alphabet.png");
    AE_ASSERT_MESG(fontTexture, "Failed to create texture!");
        
    fontOffsets[0].mX = 0.0f;			    fontOffsets[0].mY = 0.0f / 6;  //A
    fontOffsets[1].mX = 1.0f / 5;		    fontOffsets[1].mY = 0.0f / 6;  //B
    fontOffsets[2].mX = 2.0f / 5;			fontOffsets[2].mY = 0.0f / 6;  //C
    fontOffsets[3].mX = 3.0f / 5;			fontOffsets[3].mY = 0.0f / 6;  //D
    fontOffsets[4].mX = 4.0f / 5;			fontOffsets[4].mY = 0.0f / 6;  //E

    fontOffsets[5].mX = 0.0f;			    fontOffsets[5].mY = 1.0f / 6;  //F
    fontOffsets[6].mX = 1.0f / 5;		    fontOffsets[6].mY = 1.0f / 6;  //G
    fontOffsets[7].mX = 2.0f / 5;			fontOffsets[7].mY = 1.0f / 6;  //H
    fontOffsets[8].mX = 3.0f / 5;			fontOffsets[8].mY = 1.0f / 6;  //I
    fontOffsets[9].mX = 4.0f / 5;			fontOffsets[9].mY = 1.0f / 6;  //J

    fontOffsets[10].mX = 0.0f;			    fontOffsets[10].mY = 2.0f / 6;  //K
    fontOffsets[11].mX = 1.0f / 5;		    fontOffsets[11].mY = 2.0f / 6;  //L
    fontOffsets[12].mX = 2.0f / 5;			fontOffsets[12].mY = 2.0f / 6;  //M
    fontOffsets[13].mX = 3.0f / 5;			fontOffsets[13].mY = 2.0f / 6;  //N
    fontOffsets[14].mX = 4.0f / 5;			fontOffsets[14].mY = 2.0f / 6;  //O

    fontOffsets[15].mX = 0.0f;			    fontOffsets[15].mY = 3.0f / 6;  //P
    fontOffsets[16].mX = 1.0f / 5;		    fontOffsets[16].mY = 3.0f / 6;  //Q
    fontOffsets[17].mX = 2.0f / 5;			fontOffsets[17].mY = 3.0f / 6;  //R
    fontOffsets[18].mX = 3.0f / 5;			fontOffsets[18].mY = 3.0f / 6;  //S
    fontOffsets[19].mX = 4.0f / 5;			fontOffsets[19].mY = 3.0f / 6;  //T

    fontOffsets[20].mX = 0.0f;			    fontOffsets[20].mY = 4.0f / 6;  //U
    fontOffsets[21].mX = 1.0f / 5;		    fontOffsets[21].mY = 4.0f / 6;  //V
    fontOffsets[22].mX = 2.0f / 5;			fontOffsets[22].mY = 4.0f / 6;  //W
    fontOffsets[23].mX = 3.0f / 5;			fontOffsets[23].mY = 4.0f / 6;  //X
    fontOffsets[24].mX = 4.0f / 5;			fontOffsets[24].mY = 4.0f / 6;  //Y


    fontOffsets[25].mX = 0.0f;			    fontOffsets[25].mY = 5.0f / 6;   //Z  
    fontOffsets[26].mX = 1.0f / 5;		    fontOffsets[26].mY = 5.0f / 6;  //blank
    fontOffsets[27].mX = 2.0f / 5;			fontOffsets[27].mY = 5.0f / 6;  //blank
    fontOffsets[28].mX = 3.0f / 5;			fontOffsets[28].mY = 5.0f / 6;  //blank
    fontOffsets[29].mX = 4.0f / 5;			fontOffsets[29].mY = 5.0f / 6;  //blank
}

void MenuInit()
{
	AEGfxSetBackgroundColor(0.0f, 0.0f, 0.0f);
    AEGfxSetBlendMode(AE_GFX_BM_BLEND);

    AudioInit();
    bgMusicTimer = 1638.0f; // Roughly 27 seconds
}

void MenuUpdate(float dt)
{
	/* Tell the compiler that the 'dt' variable is unused. */
	UNREFERENCED_PARAMETER(dt);

    /*play bg music*/
    if (bgMusicTimer == 1638.0f)
    {
        playSoundAdvanced("Assets/Sounds/Level2Track.mp3", 0.1f);
    }
        
    /*reset time for bg music loop*/
    if (bgMusicTimer == 0.0f)
    {
        bgMusicTimer = 1638.0f;
    }
    else
    {
        bgMusicTimer--;
    }

    /*draw background*/
    AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
    AEGfxTextureSet(bgTexture, 0, 0);
    AEGfxSetTransparency(1.0f);
    AEGfxSetPosition(-250.0f, 0.0f);
    AEGfxMeshDraw(bgMesh, AE_GFX_MDM_TRIANGLES);
    
    //draw menu button
    AEGfxSetPosition(levelPos.x, levelPos.y);
    AEGfxTextureSet(buttonTexture, 0, 0); // no texture
    AEGfxSetTransparency(1.0f);
    AEGfxSetBlendColor(0.0f, 0.0f, 0.0, 0.0f);
    AEGfxMeshDraw(buttonMesh, AE_GFX_MDM_TRIANGLES);

    //draw replay button
    AEGfxSetPosition(creditsPos.x, creditsPos.y);
    AEGfxTextureSet(buttonTexture, 0, 0); // no texture
    AEGfxMeshDraw(buttonMesh, AE_GFX_MDM_TRIANGLES);

    //draw exit button
    AEGfxSetPosition(exitPos.x, exitPos.y);
    AEGfxTextureSet(buttonTexture, 0, 0); // no texture
    AEGfxMeshDraw(buttonMesh, AE_GFX_MDM_TRIANGLES);

    /*PLAY*/

    AEGfxSetPosition(levelPos.x - 40.0f, levelPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[15].mX, fontOffsets[15].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(levelPos.x - 15.0f, levelPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[11].mX, fontOffsets[11].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(levelPos.x + 10.0f, levelPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[0].mX, fontOffsets[0].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(levelPos.x + 35.0f, levelPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[24].mX, fontOffsets[24].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    /*PLAY - end*/

    /*CREDITS*/
    AEGfxSetPosition(creditsPos.x - 75.0f, creditsPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[2].mX, fontOffsets[2].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(creditsPos.x - 45.0f, creditsPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[17].mX, fontOffsets[17].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(creditsPos.x - 20.0f, creditsPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[4].mX, fontOffsets[4].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(creditsPos.x + 5.0f, creditsPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[3].mX, fontOffsets[3].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(creditsPos.x + 25.0f, creditsPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[8].mX, fontOffsets[8].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(creditsPos.x + 47.0f, creditsPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[19].mX, fontOffsets[19].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(creditsPos.x + 75.0f, creditsPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[18].mX, fontOffsets[18].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    /*CREDITS - end*/

    /*QUIT*/
    AEGfxSetPosition(exitPos.x - 40.0f, exitPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[16].mX, fontOffsets[16].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(exitPos.x - 7.5f, exitPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[20].mX, fontOffsets[20].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(exitPos.x + 17.5f, exitPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[8].mX, fontOffsets[8].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    AEGfxSetPosition(exitPos.x + 40.0f, exitPos.y);
    AEGfxTextureSet(fontTexture, fontOffsets[19].mX, fontOffsets[19].mY, 0.0f);
    AEGfxMeshDraw(fontMesh, AE_GFX_MDM_TRIANGLES);

    /*QUIT - end*/

    animateFrames(&currentTitleOffset, &titleTime, 0.25f, dt);
    checkEndFrames(&currentTitleOffset, 6);
    currTitleFrame = currentTitleOffset;

    /*draw player*/
    AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
    AEGfxSetPosition(titlePos.x, titlePos.y);
    AEGfxTextureSet(titleTexture, titleOffsets[currTitleFrame].mX, titleOffsets[currTitleFrame].mY);
    AEGfxSetTransparency(1.0f);
    AEGfxMeshDraw(titleMesh, AE_GFX_MDM_TRIANGLES);

    /*get the mouse position*/
    AEInputGetCursorPosition(&mouseX, &mouseY);
    AEGfxConvertScreenCoordinatesToWorld(mouseX, mouseY, &mouseInWorldX, &mouseInWorldY);

    /*if demo level is hovered*/
    if ((mouseInWorldX > (levelPos.x - buttonSize.x) && mouseInWorldX < (levelPos.x + buttonSize.x)) &&
        (mouseInWorldY > (levelPos.y - buttonSize.y) && mouseInWorldY < (levelPos.y + buttonSize.y)))
    {
        // Hover texture
        AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
        AEGfxSetPosition(levelPos.x - 140.0f, levelPos.y);
        AEGfxTextureSet(iconTexture, 0.0f, 0.0f);
        AEGfxMeshDraw(iconMesh, AE_GFX_MDM_TRIANGLES);

        if (AEInputCheckTriggered(RI_MOUSE_LEFT_BUTTON_DOWN))
        {
            GameStateManagerSetNextState(LevelSelect);
        }
    }
    /*if credits is hovered*/
    if ((mouseInWorldX > (creditsPos.x - buttonSize.x) && mouseInWorldX < (creditsPos.x + buttonSize.x)) &&
        (mouseInWorldY > (creditsPos.y - buttonSize.y) && mouseInWorldY < (creditsPos.y + buttonSize.y)))
    {
        // Hover texture
        AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
        AEGfxSetPosition(creditsPos.x - 140.0f, creditsPos.y);
        AEGfxTextureSet(iconTexture, 0.0f, 0.0f);
        AEGfxMeshDraw(iconMesh, AE_GFX_MDM_TRIANGLES);

        if (AEInputCheckTriggered(RI_MOUSE_LEFT_BUTTON_DOWN))
        {
            GameStateManagerSetNextState(Credits);
        }
    }

    /*if exit is hovered*/
    if ((mouseInWorldX > (exitPos.x - buttonSize.x) && mouseInWorldX < (exitPos.x + buttonSize.x)) &&
        (mouseInWorldY > (exitPos.y - buttonSize.y) && mouseInWorldY < (exitPos.y + buttonSize.y)))
    {
        // Hover texture
        AEGfxSetRenderMode(AE_GFX_RM_TEXTURE);
        AEGfxSetPosition(exitPos.x - 140.0f, exitPos.y);
        AEGfxTextureSet(iconTexture, 0.0f, 0.0f);
        AEGfxMeshDraw(iconMesh, AE_GFX_MDM_TRIANGLES);

        if (AEInputCheckTriggered(RI_MOUSE_LEFT_BUTTON_DOWN))
        {
            GameStateManagerSetNextState(GsQuit);
        }
    }
}

void MenuShutdown()
{
    // Do not cleanup audio so music continues into credits and level select
}

void MenuUnload()
{
	// Unload all textures.
    AEGfxTextureUnload(buttonTexture);
    AEGfxTextureUnload(titleTexture);
    AEGfxTextureUnload(bgTexture);
    AEGfxTextureUnload(fontTexture);
    AEGfxTextureUnload(iconTexture);

    // Free all meshes.
    AEGfxMeshFree(buttonMesh);
    AEGfxMeshFree(titleMesh);
    AEGfxMeshFree(bgMesh);
    AEGfxMeshFree(fontMesh);
    AEGfxMeshFree(iconMesh);
}
$appname = read-host "Enter your program name"
$32bit = get-itemproperty 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' | Select-Object DisplayName, DisplayVersion, UninstallString, PSChildName | Where-Object { $_.DisplayName -match "^*$appname*"}
$64bit = get-itemproperty 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' | Select-Object DisplayName, DisplayVersion, UninstallString, PSChildName | Where-Object { $_.DisplayName -match "^*$appname*"}


if ($64bit -eq "" -or $64bit.count -eq 0) {

    switch ($32bit.DisplayName.count) {
        0 {Write-Host "Cannot find the uninstall string" -ForegroundColor Red}
        1 {
            if ($32bit -match "msiexec.exe") {
            $32bit.UninstallString -replace 'msiexec.exe /i','msiexec.exe /x'
            }
            else
            {
                $32bit.UninstallString 
            }
            }
        default { Write-Host "Please Narrow Down Your Search" -ForegroundColor Red }
    }
}
else {
 
    switch ($64bit.DisplayName.count) {
        0 {Write-Host "Cannot find the uninstall string" -ForegroundColor Red}
        1 {
            if ($64bit -match "msiexec.exe") {
                $64bit.UninstallString -replace 'msiexec.exe /i','msiexec.exe /x'
            }
            else
            {
                $64bit.UninstallString 
            }
            }
        default { Write-Host "Please Narrow Down Your Search" -ForegroundColor Red }
    }
}
// ---------------------------------------------------------------------------
// Project Name		:	Nook
// File Name		:	Mesh.c
// Author			:	Mary Khuu
// Creation Date	:	19 Feb 2021
// Purpose			:	Deals with all things needed for sprites
// All content © 2021 DigiPen (USA) Corporation, all rights reserved.
// ---------------------------------------------------------------------------

#include "Sprite.h"


//function to create a quadratic mesh
AEGfxVertexList* createQuadMesh(float halfSizeX, float halfSizeY, float u, float v, const char* meshName)
{
	AEGfxVertexList* mesh;

	AEGfxMeshStart();

	AEGfxTriAdd(
		-halfSizeX, -halfSizeY, 0x00FFFFFF, 0.0f, v,
		 halfSizeX, -halfSizeY, 0x00FFFFFF, u, v,
		-halfSizeX, halfSizeY, 0x00FFFFFF, 0.0f, 0.0f);
	AEGfxTriAdd(
		 halfSizeX, -halfSizeY, 0x00FFFFFF, u, v,
		 halfSizeX, halfSizeY, 0x00FFFFFF, u, 0.0f,
		-halfSizeX, halfSizeY, 0x00FFFFFF, 0.0f, 0.0f);

	mesh = AEGfxMeshEnd();
	AE_WARNING_MESG(mesh, "Failed to create %s!", meshName);

	if (mesh != 0)
	{
		return mesh;
	}
	else
	{
		return 0;
	}
}

//same as above but less parameters, assume halfsize is the same in x and y and u = v
AEGfxVertexList* createEqualQuadMesh(float halfSize, float uv, const char* meshName)
{
	AEGfxVertexList* mesh;

	AEGfxMeshStart();

	AEGfxTriAdd(
		-halfSize, -halfSize, 0x00FFFFFF, 0.0f, uv,
		halfSize, -halfSize, 0x00FFFFFF, uv, uv,
		-halfSize, halfSize, 0x00FFFFFF, 0.0f, 0.0f);
	AEGfxTriAdd(
		halfSize, -halfSize, 0x00FFFFFF, uv, uv,
		halfSize, halfSize, 0x00FFFFFF, uv, 0.0f,
		-halfSize, halfSize, 0x00FFFFFF, 0.0f, 0.0f);

	mesh = AEGfxMeshEnd();
	AE_WARNING_MESG(mesh, "Failed to create %s!", meshName);

	if (mesh != 0)
	{
		return mesh;
	}
	else
	{
		return 0;
	}
}

int getMaxFrames(int rows, int columns)
{
	return rows * columns;
}

void animateFrames(int* currentFrame, float* time, float frameDelay, float dt)
{
	(*time) += dt;

	if (*time >= frameDelay)
	{
		(*currentFrame)++;
		*time = 0;
	}
}

void checkEndFrames(int* currentFrame, int maxFrame)
{
	if (*currentFrame >= maxFrame)
	{
		*currentFrame = 0;
	}
}
// ---------------------------------------------------------------------------
// Project Name		:	Nook
// File Name		:	Audio.c
// Author			:	Mary Khuu
// Creation Date	:	15 Mar 2021
// Purpose			:	add audio to the game
// All content © 2021 DigiPen (USA) Corporation, all rights reserved.
// ---------------------------------------------------------------------------

#include "fmod.h"
#include <stdio.h>		// printf()
#include <stdbool.h>	// FALSE
#include "AEEngine.h"

#include "Audio.h"

FMOD_SYSTEM* soundSystem;
FMOD_SOUND* sound;
FMOD_CHANNEL* channel;
FMOD_RESULT result;


// Initialize the Audio System
void AudioInit()
{
	channel = 0;

	// Create and Initialize the FMOD System
	result = FMOD_System_Create(&soundSystem);

	void* extradriverdata = 0;
	result = FMOD_System_Init(soundSystem, 32, FMOD_INIT_NORMAL, extradriverdata);
}

void playSound(bool trigger, const char* file)
{
	// Create and Play the sound
	// Note: this should be generalized for multiple sounds and
	//       be placed in a function to be used outside of init.
	result = FMOD_System_CreateStream(soundSystem, file, FMOD_LOOP_OFF | FMOD_2D, 0, &sound);

	result = FMOD_System_PlaySound(soundSystem, sound, 0, trigger, &channel);
	
}

void playSoundAdvanced(const char* file, float volume)
{
	FMOD_CHANNEL* channel;

	result = FMOD_System_CreateStream(soundSystem, file, FMOD_LOOP_OFF | FMOD_2D, 0, &sound);

	result = FMOD_System_PlaySound(soundSystem, sound, 0, true, &channel);

	result = FMOD_Channel_SetVolume(channel, volume);

	result = FMOD_Channel_SetPaused(channel, false);
}

// Update the Audio System
// Note: this should be called frequently such as every game loop or
//       every time a user enters a command depending on the engine
void AudioUpdate()
{
	result = FMOD_System_Update(soundSystem);
}

// Cleanup the Audio System
void AudioCleanup()
{
	// Release all sounds that have been created
	result = FMOD_Sound_Release(sound);

	// Close and Release the FMOD system
	result = FMOD_System_Close(soundSystem);
	result = FMOD_System_Release(soundSystem);
}

function Search-Registry { 
<# 
.SYNOPSIS 
Searches registry key names, value names, and value data (limited). 

.DESCRIPTION 
This function can search registry key names, value names, and value data (in a limited fashion). It outputs custom objects that contain the key and the first match type (KeyName, ValueName, or ValueData). 

.EXAMPLE 
Search-Registry -Path HKLM:\SYSTEM\CurrentControlSet\Services\* -SearchRegex "svchost" -ValueData 

.EXAMPLE 
Search-Registry -Path HKLM:\SOFTWARE\Microsoft -Recurse -ValueNameRegex "ValueName1|ValueName2" -ValueDataRegex "ValueData" -KeyNameRegex "KeyNameToFind1|KeyNameToFind2" 

#> 
    [CmdletBinding()] 
    param( 
        [Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] 
        [Alias("PsPath")] 
        # Registry path to search 
        [string[]] $Path, 
        # Specifies whether or not all subkeys should also be searched 
        [switch] $Recurse, 
        [Parameter(ParameterSetName="SingleSearchString", Mandatory)] 
        # A regular expression that will be checked against key names, value names, and value data (depending on the specified switches) 
        [string] $SearchRegex, 
        [Parameter(ParameterSetName="SingleSearchString")] 
        # When the -SearchRegex parameter is used, this switch means that key names will be tested (if none of the three switches are used, keys will be tested) 
        [switch] $KeyName, 
        [Parameter(ParameterSetName="SingleSearchString")] 
        # When the -SearchRegex parameter is used, this switch means that the value names will be tested (if none of the three switches are used, value names will be tested) 
        [switch] $ValueName, 
        [Parameter(ParameterSetName="SingleSearchString")] 
        # When the -SearchRegex parameter is used, this switch means that the value data will be tested (if none of the three switches are used, value data will be tested) 
        [switch] $ValueData, 
        [Parameter(ParameterSetName="MultipleSearchStrings")] 
        # Specifies a regex that will be checked against key names only 
        [string] $KeyNameRegex, 
        [Parameter(ParameterSetName="MultipleSearchStrings")] 
        # Specifies a regex that will be checked against value names only 
        [string] $ValueNameRegex, 
        [Parameter(ParameterSetName="MultipleSearchStrings")] 
        # Specifies a regex that will be checked against value data only 
        [string] $ValueDataRegex 
    ) 

    begin { 
        switch ($PSCmdlet.ParameterSetName) { 
            SingleSearchString { 
                $NoSwitchesSpecified = -not ($PSBoundParameters.ContainsKey("KeyName") -or $PSBoundParameters.ContainsKey("ValueName") -or $PSBoundParameters.ContainsKey("ValueData")) 
                if ($KeyName -or $NoSwitchesSpecified) { $KeyNameRegex = $SearchRegex } 
                if ($ValueName -or $NoSwitchesSpecified) { $ValueNameRegex = $SearchRegex } 
                if ($ValueData -or $NoSwitchesSpecified) { $ValueDataRegex = $SearchRegex } 
            } 
            MultipleSearchStrings { 
                # No extra work needed 
            } 
        } 
    } 

    process { 
        foreach ($CurrentPath in $Path) { 
            Get-ChildItem $CurrentPath -Recurse:$Recurse |  
                ForEach-Object { 
                    $Key = $_ 

                    if ($KeyNameRegex) {  
                        Write-Verbose ("{0}: Checking KeyNamesRegex" -f $Key.Name)  

                        if ($Key.PSChildName -match $KeyNameRegex) {  
                            Write-Verbose "  -> Match found!" 
                            return [PSCustomObject] @{ 
                                Key = $Key 
                                Reason = "KeyName" 
                            } 
                        }  
                    } 

                    if ($ValueNameRegex) {  
                        Write-Verbose ("{0}: Checking ValueNamesRegex" -f $Key.Name) 

                        if ($Key.GetValueNames() -match $ValueNameRegex) {  
                            Write-Verbose "  -> Match found!" 
                            return [PSCustomObject] @{ 
                                Key = $Key 
                                Reason = "ValueName" 
                            } 
                        }  
                    } 

                    if ($ValueDataRegex) {  
                        Write-Verbose ("{0}: Checking ValueDataRegex" -f $Key.Name) 

                        if (($Key.GetValueNames() | % { $Key.GetValue($_) }) -match $ValueDataRegex) {  
                            Write-Verbose "  -> Match!" 
                            return [PSCustomObject] @{ 
                                Key = $Key 
                                Reason = "ValueData" 
                            } 
                        } 
                    } 
                } 
        } 
    } 
} 
[
    {
        "$match": {
            "$expr": {
                "$ne": ["$foodStatus", "APPROVED"]
            }
        }
    },
    {
        "$lookup": {
            "from": "mastermealplan",
            "localField": "dishVariation",
            "foreignField": "mealPlan.dishVariation",
            "as": "mealData"
        }
    },
    {
        "$match": {
            "$expr": {
                "$gt": [{ "$size": "$mealData" }, 0]
            }
        }
    },
    {
        "$project": {
            "mealData": "$mealData.planName",
            "dishVariation": 1
        }
    }
]
// converting binary to decimal
        int[] n = new int[]{1, 0, 0, 0, 0};
        int num = 0;
        for (int i = 0; i < n.length; i++)
        {
            num = (num<<1) | n[i];
        }
        System.out.println(num);
    
 <link rel="stylesheet" type="text/css" href="https://malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.min.css"></link>

<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="https://malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>

<script type="text/javascript">
    (function($){
        $(window).on("load",function(){
            $(".content").mCustomScrollbar();
        });
    })(jQuery);
</script>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Minecraft Block Path Finder</title>
  <style>
      .minecraft-block-path-finder-main {
    background: none;
    display: block;
    padding: 0px 0px 0px 0px;
    font: bold 17px/30px Arial, Helvetica, sans-serif;
    min-width: 260px;
    margin: 50px auto 0px auto;
    border: none;
  }

  .minecraft-block-path-finder-main:after {
    content: "";
    clear: both;
  }

  .noselect {
    cursor: default;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  .minecraft-block-path-finder-card {
    padding: 1rem 2rem 1rem 2rem;
    height: 70px;
  }

  .minecraft-block-path-finder-cards {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-gap: 0 1rem;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  }

  .minecraft-block-path-finder-card00 {
    padding: 1rem 2rem 1rem 2rem;
    height: 70px;
  }

  
  
  .minecraft-block-path-finder-cards00 {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-gap: 0 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .minecraft-block-path-finder-blocks {
    background: #24aded;
    background: -webkit-linear-gradient(to right, #24aded, #108dc7);
    background: linear-gradient(to right, #24aded, #108dc7);
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    display: block;
    padding: 10px 10px 10px 10px;
    margin: 10px 0px;
    border: none;
    text-align: center;
    min-height: 50px;
  }

  .minecraft-block-path-finder-click-blocks {
    background: none;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    display: block;
    padding: 10px 10px 10px 10px;
    margin: 10px 0px;
    border-width: 2px;
    border-style: solid;
    border-color: #108dc7;
    text-align: center;
    overflow-y: scroll;
    overflow-x: hidden;
    height: 250px;
    color: #108dc7;
    position: relative !important;
    -webkit-transition: all 0.6s ease;
    -moz-transition: all 0.6s ease;
    -ms-transition: all 0.6s ease;
    -o-transition: all 0.6s ease;
    transition: all 0.6s ease;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .minecraft-block-path-finder-click-blocks::-webkit-scrollbar {
    display: none;
  }

  .minecraft-block-path-finder-click-blocks:hover {
    background: #24aded;
    color: white;
    text-shadow: 0px 0px 8px rgb(255, 230, 186), 0px 0px 22px rgb(255, 255, 255),
      0px -1px 0px rgba(0, 0, 0, 0.5);
    -webkit-transition: all 0.6s ease;
    -moz-transition: all 0.6s ease;
    -ms-transition: all 0.6s ease;
    -o-transition: all 0.6s ease;
    transition: all 0.6s ease;
  }

  .minecraft-block-path-finder-cmnd-button {
    transition: color 0.15s ease-in;
    font-size: 35px;
    text-align: center;
    text-decoration: none;
    line-height: 50px;
    color: white;
    cursor: pointer;
  }

  .minecraft-block-path-finder-reset-button:hover {
    color: #8d8c85;
    transition: color 0.3s ease-in;
    transition: color 0.3s ease-out;
  }

  .stepper_select {
    display: none;
  }
  
  .tool-input input[type="number"] {
    width: calc(100% - 2px); 
    height: 25px;
    border: none;
    border-radius: 0;
    box-shadow: 0px 0px 20px 5px rgba(0, 0, 0, 0.05);
    background: #24aded;
    background: -webkit-linear-gradient(to right, #24aded, #108dc7);
    background: linear-gradient(to right, #24aded, #108dc7);
    text-align: center;
    color: #ffffff;
    font-size: 18px;
    line-height: 25px;
    outline: none;
}
  
.tool-input input[type="number"]::placeholder {
    color: #E6E6E6;
}


.tool-input input[type="number"]:focus {
    outline: none;
}

  .stepper-input {
    width: 100%;
    height: 25px;
    border: 0px;
    border-radius: 2px;
    box-shadow: 0px 0px 20px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin: 0px 0px 5px 0px;
  }

  .stepper-input input {
    display: none;
  }

  .stepper-input .input {
    width: 100%;
    height: 100%;
    display: flex;
  }

  .stepper-input .input :active {
    background: #24aded;
  }

  .stepper-input .input .range {
    overflow: hidden;
    text-align: center;
    flex: 1;
  }

  .stepper-input .input .range .list span {
    display: block;
    width: 100%;
    height: 25px;
    color: #ffffff;
    font-size: 18px;
    line-height: 25px;
  }

  .stepper_btn {
    background: #24aded;
    background: -webkit-linear-gradient(to right, #24aded, #108dc7);
    background: linear-gradient(to right, #24aded, #108dc7);
    height: 100%;
    border-radius: 2px;
    color: #ffffff;
    font-size: 12px;
    line-height: 25px;
    cursor: pointer;
    border: none;
    transition: all 300ms ease-in-out;
    flex: 0.2;
    text-align: center;
  }

  .stepper_btn:active {
    transform: translateY(1px);
  }

  .disabledivclick {
    pointer-events: none;
  }

  .table-fixed {
    width: 100%;
    caption-side: bottom;
  }

  .table-fixed tbody {
    display: block;
    height: 100%;
    overflow: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .table-fixed tbody::-webkit-scrollbar {
    display: none;
  }

  .table-fixed thead,
  .table-fixed tbody tr {
    display: table;
    width: 100%;
  }

  .table-fixed td,
  th {
    text-align: center;
    vertical-align: middle;
    width: 33%;
  }

  .table-fixed caption {
    margin-top: 20px;
  }

  .divparenttable {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #startlocations::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px; 
    background-color: #108dc7; 
    z-index: 1;
    margin: -20px 0;
}
  #startlocations::after {
    content: "Start Location";
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #24aded;
    padding: 0 10px; 
    z-index: 2;
    margin: -20px 0;
}
  #endlocations::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px; 
    background-color: #108dc7; 
    z-index: 1;
    margin: -20px 0;
}
  #endlocations::after {
    content: "End Location";
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #24aded;
    padding: 0 10px; 
    z-index: 2;
    margin: -20px 0;
}
	#startlocations,
#endlocations {
  position: relative;
}
  </style>
</head>
<body>
  <div class="minecraft-block-path-finder-main noselect">
    <div style="margin-top:30px; margin-bottom:10px;">
     
      <div id="startlocations" class="minecraft-block-path-finder-cards00">
        <div class="minecraft-block-path-finder-card00 minecraft-block-path-finder-blocks">
          <div style="font-size:22px; color : white;">
            <div class="tool-input">
              <input id="startX" type="number" oninput="CalcUpdateOutput()" placeholder="enter value">
            </div>
          </div>
          <div style="margin-top:-5px; color : white;">X-Coordinate</div>
        </div>
  
        <div class="minecraft-block-path-finder-card00 minecraft-block-path-finder-blocks">
          <div style="font-size:22px; color : white;">
  
            <div class="tool-input">
              <input id="startY" type="number" oninput="CalcUpdateOutput()" placeholder="enter value">
            </div>
  
          </div>
          <div style="margin-top:-5px; color : white;">Y-Coordinate</div>
        </div>
        <div class="minecraft-block-path-finder-card00 minecraft-block-path-finder-blocks">
          <div style="font-size:22px; color : white;">
  
            <div class="tool-input">
              <input id="startZ" type="number" oninput="CalcUpdateOutput()" placeholder="enter value">
            </div>
  
          </div>
          <div style="margin-top:-5px; color : white;">Z-Coordinate</div>
        </div>
      </div>
      <div id="endlocations" class="minecraft-block-path-finder-cards00" style="margin: 50px 0px 0px 0px;">
        <div class="minecraft-block-path-finder-card00 minecraft-block-path-finder-blocks">
          <div style="font-size:22px; color : white;">
            <div class="tool-input">
              <input id="endX" type="number" oninput="CalcUpdateOutput()" placeholder="enter value">
            </div>
          </div>
          <div style="margin-top:-5px; color : white;">X-Coordinate</div>
        </div>
  
        <div class="minecraft-block-path-finder-card00 minecraft-block-path-finder-blocks">
          <div style="font-size:22px; color : white;">
  
            <div class="tool-input">
              <input id="endY" type="number" oninput="CalcUpdateOutput()" placeholder="enter value">
            </div>
  
          </div>
          <div style="margin-top:-5px; color : white;">Y-Coordinate</div>
        </div>
        <div class="minecraft-block-path-finder-card00 minecraft-block-path-finder-blocks">
          <div style="font-size:22px; color : white;">
  
            <div class="tool-input">
              <input id="endZ" type="number" oninput="CalcUpdateOutput()" placeholder="enter value">
            </div>
  
          </div>
          <div style="margin-top:-5px; color : white;">Z-Coordinate</div>
        </div>
      </div>
      <div class="minecraft-block-path-finder-cards00">
        <div class="minecraft-block-path-finder-card00 minecraft-block-path-finder-blocks">
          <div style="font-size:22px; color : white;">
  
            <div class="tool-input">
              <input id="spacing" type="number" oninput="CalcUpdateOutput()" placeholder="enter value (set to 1 for solid walls/ramps)">
            </div>
  
          </div>
          <div style="margin-top:-5px; color : white;">Block Spacing</div>
        </div>
      </div>
    </div>
    <div id="calc-console" oncontextmenu="return false;" class="divparenttable minecraft-block-path-finder-click-blocks ">
    </div>
  </div>
  <script src="script.js">
  	    let startX = parseInt(document.getElementById("startX").value);
        let startY = parseInt(document.getElementById("startY").value);
        let startZ = parseInt(document.getElementById("startZ").value);
        let endX = parseInt(document.getElementById("endX").value);
        let endY = parseInt(document.getElementById("endY").value);
        let endZ = parseInt(document.getElementById("endZ").value);
        let spacing = parseInt(document.getElementById("spacing").value);

  let debounceTimer;

function debounce(func, delay) {
    clearTimeout(debounceTimer);
    debounceTimer = setTimeout(func, delay);
}

function CalcUpdateOutput() {
    debounce(() => {
        let startX = parseInt(document.getElementById("startX").value);
        let startY = parseInt(document.getElementById("startY").value);
        let startZ = parseInt(document.getElementById("startZ").value);
        let endX = parseInt(document.getElementById("endX").value);
        let endY = parseInt(document.getElementById("endY").value);
        let endZ = parseInt(document.getElementById("endZ").value);
        let spacing = parseInt(document.getElementById("spacing").value);

        let calcConsole = document.getElementById("calc-console");
        let blockPositions = '';
        let hasMessage = false;

        if (isNaN(startX) || isNaN(startY) || isNaN(startZ) || isNaN(endX) || isNaN(endY) || isNaN(endZ) || isNaN(spacing)) {
            blockPositions = "Please enter all coordinates and spacing.";
            hasMessage = true;
        } else if (spacing < 1) {
            blockPositions = "Block spacing must be at least 1.";
            hasMessage = true;
        } else {
            let dx = Math.abs(endX - startX);
            let dy = Math.abs(endY - startY);
            let dz = Math.abs(endZ - startZ);
            let maxLength = Math.max(dx, dy, dz);
            let currentStep = 0;

            function calculateNextBlock() {
                if (currentStep <= maxLength) {
                    let x = Math.round(startX + currentStep * (endX - startX) / maxLength);
                    let y = Math.round(startY + currentStep * (endY - startY) / maxLength);
                    let z = Math.round(startZ + currentStep * (endZ - startZ) / maxLength);
                    blockPositions += `#${currentStep / spacing + 1}: ${x}, ${y}, ${z}<br>`;
                    calcConsole.innerHTML = blockPositions;
                    currentStep += spacing;
                    setTimeout(calculateNextBlock, 0);
                }
            }

            calculateNextBlock();
        }

        if (hasMessage) {
            calcConsole.innerHTML = blockPositions;
            calcConsole.classList.add("divparenttable");
        } else {
            calcConsole.classList.remove("divparenttable");
        }
    }, 300);
}

document.addEventListener("DOMContentLoaded", function(event) { CalcUpdateOutput(); });        
  </script>
</body>
</html>
<style>
.image-container { 
  background-size: 100%!important;
  position: fixed;
  left: 10px;
  bottom: 0px;
  width: 220px; 
  height: 290px; 
  background-image: url(https://i.postimg.cc/NFGFzFpH/viccchase.png); 
  background-size: cover; 
} 
 
.image-container:hover { 
  background-image: url(https://i.postimg.cc/brXcZB2N/K-perny-k-p-2024-04-03-152416-removebg-preview-2.png); 
} 
</style>
<div class="image-container"></div>

<style>
#InklingGirl{ 100%!important;
  position: fixed;
  right: 1px;
  bottom: -1px;
  width: 105px;
  }
</style>
<img id="InklingGirl" src="https://media.tenor.com/wOPRf_7EsxQAAAAi/splatoon-nintendo.gif"/>

<style>
nav .top .left .logo {
    width: 165px;
    height: 42px;
    content: url(https://i.ibb.co/6r67R1y/IMG-8112-removebg-preview.png);
</style>

<img src="data:image/gif;base64,R0lGODlhlgAUAPMAAFgdodnOOJpw1ldQEv/rMwAAADUWXv///6ibJQAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAgLAAAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAh/wtORVRTQ0FQRTIuMAMBAAAALAAAAACWABQAAAT/EMhJq7046827/+AXBJIgSGN5AilgoqS7ti8b1/R86yrc27+cTzbE7Yo8IlCZml0G0JB0Sq1apysJYbsdcL3ccKEQFpPL3PFYbN6qz+h2+Q1/z+tnOjxuuFLCYF9oBQcHe26Fh4iFhoh5iYSMimKJlIyNkZWLZJFjl5ptYxMGpH0gJ4JogZuDoGmfhp2bsJMEmXWwhrS2kry6u5adpFymEqQYNwBdccuvrr6Ht5K30rqyc5+ckr+d3JmxkNyNwc/FBlvFFDFaq3Grt5bjvonimOGxntG7nW/e+d+eMHXTx62MqXPENqyCQoBhKmjYQPEjxO9ewG0EKVqc9s1ax2v8/yJe2nMMAEJ0GUgEGlCI5YGVzjIG41XxF7iRiiZuHJntIrBr8XolNBkm3YQZK1sqhQlxZr9xAaNWqpgzFz1r28BpsykUaMxyw4YaOzoh6UuWUGDCi1cN3z2bF+0EzTYtKz6pAOdVjcrMYJ+SFhy6HNwFzNq5N3vCTTySrUbGdnm67XWYTeW+BABTQNWwcEMw757No0yXEzWajZ16K82Vr8ZHop3Jw4zSVLJm7rDtfY1aDdRYZrS20kaRJsXjx+3lKd4bM3PafTKXXKdsAAIu17dkDz1pOVRbaV7tBR8Hj3LyjziFF++oFhva6E5qZqcdDAL77dy/h19Lf/n1/9G2hzp/8MGXTgzWdbHddn406OCDELqAggxpBZCWABUGccQSRmjoIRMbCsFhEh2C+GGJKJKoYoQstuhihBEAACH5BAgKAAAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAsAAAAAJYAFACCWB2hmnDW/+szV1ASAAAANRZd////qJslA/8Iutz+MMpJq734hqCEUFv3ASHggZw5lieZtuz6yiJau3dsqzs89zQeThhaPQbIjHLJbDqXI5FHMJhWp1gCAZvdcqdabbbrCXu/ZK75bFazveszuvBkYK/WL8FgkJf5fn98fX9wgHuDgVmAi4OEiIyCW4hajpFkWgsFm3QYH3lfeJJ6l2CWfZSSp4oCkGynfautibOxso2Um1OdCpsQLyqiXKKuaqW1tqiJroC2gZCMzJTNlNCVytN+04RYvAUevAwpHcKhjdyC6NbO0YeHldqy1WHO9Nfuj9nGzlyd37sTRCGhItAUunSvUO2phu8etX0LGy6DFsshv1piztHa5a//WwQOeAbwEWkgpMF4B1NFVJbMYkZc12JaokgPFrdU+xzJ6QjQwYqQI4OaxAixVU04DPkxfGaTHTNsGG/hxHWMk0dNC6IALSkSicli554qxNfSVZicq5YlmijTGjKmMdF88eXryBWSeD0MfEtqJkV30v6mVJt0Jqx5OvnqUSy3W7iswfRW2UvsGDJaNPMtm+UWF2ey1JKxnFQRYWOwjT12Aqa3sbCFpOA9qgivkBx4sI2Rhr2w99jauWt/ZlUoNUABnEDYGXBgSnMPzysrQnqzFRhTcK2jeTN7UpnibBYZennaOEeOPq8cUM9ejXnt5lkRlxuefvwx7/PPEaeAud7oMNHVIeCABBZognKSDRCAVwQpmMMPQ/jw4IREQKhDhEFIWCGFGnaY4YcGhijiiAYmAAA7"/>

<img src="https://64.media.tumblr.com/9d1426dbd50b414e9a82351b02a75dac/1ea53c84519fac02-b9/s250x400/23c8a3329654eeb787cb5e137b19e4a7b7186ea5.gifv"/>

<img src="https://64.media.tumblr.com/4bc41637642b51d6955b4adf494469a9/1ea53c84519fac02-b6/s250x400/004a7a7346d8654d15e784b1f9a60e3f89c25ac8.gifv"/>

<img src="https://64.media.tumblr.com/bdc52a0ef27d3ac4f94d459a14c4ce84/1ea53c84519fac02-f7/s250x400/b7fa1d4d40292b541173d6cc37cf0e2b145ca827.gifv"/>

<img src="https://64.media.tumblr.com/063385bd40bc7f525ceaa950bf7f7566/1ea53c84519fac02-e5/s250x400/5788bb04a58fe692a73a6f0c080c290939fc2e5a.gifv"/>

<img src="https://64.media.tumblr.com/14333f8f12564c95c459891e8db46605/1ea53c84519fac02-1e/s250x400/0232034e444dd74a3e469eccea5d30dfdd78f542.gifv"/>

<img src="https://64.media.tumblr.com/f68f8656137c9cbcba81c6b400435750/1ea53c84519fac02-bb/s250x400/2e78dc5a60c59761df29ffce8eba9ebb8bae3f8e.gifv"/>

<img src="https://64.media.tumblr.com/8dcc675bfbf1f8d83146294b42d29d89/1ea53c84519fac02-ae/s250x400/8387e0cf517a377fd061f29c2dde829d5f745e85.gifv"/>

<img src="https://64.media.tumblr.com/ab3e8fca0d02bd77416be882c8ea119d/7c7332a39a8b3bd2-c2/s250x400/e807b16e058c04270fe65c1e628c2b871c0955ac.gifv"/>

<img src="https://64.media.tumblr.com/7a2b8c2e0613d110e858f935735aefc7/7c7332a39a8b3bd2-07/s250x400/d624a9847d568608f74b43b93ed004bf364aa45c.gifv"/>

<img src="https://64.media.tumblr.com/fa9835f356e23afb7d8255709dd81261/7c7332a39a8b3bd2-c8/s250x400/95ccd549cb584d6cbabe3c313d8d3c4f939ebf46.gifv"/>

<img src="https://64.media.tumblr.com/7f26f7950f0e56041c2b0799542a083b/7c7332a39a8b3bd2-ea/s250x400/63a91af8ca13c7a8f927963b3d542fa583b7d3b3.gifv"/>
import React, { useEffect, useState } from "react";

function SessionStorage(){
    const [value,setValue] =useState('')

    useEffect(()=>{

        setValue(sessionStorage.getItem('data'))

    })

    const handleClick =()=>{
        sessionStorage.setItem('data','demo value')
    }
    const handleRemove =()=>{
        sessionStorage.removeItem('data')
    }

    
    return(
        <div className="App">
            <h1>{value}</h1>
            <button onClick={handleClick}>set value</button>
            <button onClick={handleRemove}>Remove value</button>
        </div>
    )
}
export default SessionStorage;
const [values, setValues] = useState({
  firstName: '',
  lastName: '',
  email: ''
})

function handleChange(){
  setValues((prevState) => 
	const {name, value} = e.target;
		
      return  {
        ...prevState,
       [name]: value;
		id: Date.now().toString(36) + Math.random()
			.toString(36).substring(2, 12).padStart(12, 0)
      		}
            
	)
}
const data = ['car', 'car', 'truck', 'truck', 'bike', 'walk', 'car', 'van', 'bike', 'walk', 'car', 'van', 'car', 'truck', 'pogostick'];

    const transportation = data.reduce((total, item) => {

      if(!total[item]){
        total[item] = 0
      }

      total[item]++
      
      return total

    },{})

    console.log(transportation)
 const people = [
      'Bernhard, Sandra', 'Bethea, Erin', 'Becker, Carl', 'Bentsen, Lloyd', 'Beckett, Samuel', 'Blake, William', 'Berger, Ric', 'Beddoes, Mick', 'Beethoven, Ludwig',
      'Belloc, Hilaire', 'Begin, Menachem', 'Bellow, Saul', 'Benchley, Robert', 'Blair, Robert', 'Benenson, Peter', 'Benjamin, Walter', 'Berlin, Irving',
      'Benn, Tony', 'Benson, Leana', 'Bent, Silas', 'Berle, Milton', 'Berry, Halle', 'Biko, Steve', 'Beck, Glenn', 'Bergman, Ingmar', 'Black, Elk', 'Berio, Luciano',
      'Berne, Eric', 'Berra, Yogi', 'Berry, Wendell', 'Bevan, Aneurin', 'Ben-Gurion, David', 'Bevel, Ken', 'Biden, Joseph', 'Bennington, Chester', 'Bierce, Ambrose',
      'Billings, Josh', 'Birrell, Augustine', 'Blair, Tony', 'Beecher, Henry', 'Biondo, Frank'
    ];




 let sortedPeople = [];

   for(person of people){
   const name = person.split(',').reverse().join(' ').trim();
   sortedPeople.push(name)
   }

   console.log(sortedPeople)
#include <pch.h>
#include "Projects/ProjectTwo.h"
#include "P2_Pathfinding.h"

#pragma region Extra Credit

std::list<AStarPather::Node*> list;
AStarPather::Node map[61][61];

bool ProjectTwo::implemented_floyd_warshall()
{
    return false;
}

bool ProjectTwo::implemented_goal_bounding()
{
    return false;
}

bool ProjectTwo::implemented_jps_plus()
{
    return false;
}
#pragma endregion

bool AStarPather::initialize()
{
    // handle any one-time setup requirements you have

    /*
        If you want to do any map-preprocessing, you'll need to listen
        for the map change message.  It'll look something like this:

        Callback cb = std::bind(&AStarPather::your_function_name, this);
        Messenger::listen_for_message(Messages::MAP_CHANGE, cb);

        There are other alternatives to using std::bind, so feel free to mix it up.
        Callback is just a typedef for std::function<void(void)>, so any std::invoke'able
        object that std::function can wrap will suffice.
    */

    return true; // return false if any errors actually occur, to stop engine initialization
}

void AStarPather::shutdown()
{
    /*
        Free any dynamically allocated memory or any other general house-
        keeping you need to do during shutdown.
    */
}
/*
    This is where you handle pathing requests, each request has several fields:

    start/goal - start and goal world positions
    path - where you will build the path upon completion, path should be
        start to goal, not goal to start
    heuristic - which heuristic calculation to use
    weight - the heuristic weight to be applied
    newRequest - whether this is the first request for this path, should generally
        be true, unless single step is on

    smoothing - whether to apply smoothing to the path
    rubberBanding - whether to apply rubber banding
    singleStep - whether to perform only a single A* step
    debugColoring - whether to color the grid based on the A* state:
        closed list nodes - yellow
        open list nodes - blue

        use terrain->set_color(row, col, Colors::YourColor);
        also it can be helpful to temporarily use other colors for specific states
        when you are testing your algorithms

    method - which algorithm to use: A*, Floyd-Warshall, JPS+, or goal bounding,
        will be A* generally, unless you implement extra credit features

    The return values are:
        PROCESSING - a path hasn't been found yet, should only be returned in
            single step mode until a path is found
        COMPLETE - a path to the goal was found and has been built in request.path
        IMPOSSIBLE - a path from start to goal does not exist, do not add start position to path
*/
PathResult AStarPather::compute_path(PathRequest &request)
{

    //start/goal - start and goal world positions
    GridPos start = terrain->get_grid_position(request.start);
    GridPos goal = terrain->get_grid_position(request.goal);

    terrain->set_color(start, Colors::Red);
    //set color to orange
    terrain->set_color(goal, Colors::Red);

    //request.path.push_back(request.start);


/***********************************A* SEARCH ALGORITHM*********************************/
    //Push Start Node onto the Open List.

    if (request.newRequest)
    {
        for (int i = 0; i <= 40; i++)
        {
            for (int j = 0; j <= 40; j++)
            {
                map[i][j].parent = NULL;
                map[i][j].pos = GridPos{j, i};
                map[i][j].onList_ = onList::NONE;
                map[i][j].cost = 0.0f;
                map[i][j].given = 0.0f;
            }
        }
        list.clear();
        list.push_back(&map[start.col][start.row]);
    }

    //While (Open List is not empty) {
    while (!list.empty())
    {
        //Pop cheapest node off Open List (parent node).
        Node* parentNode = findCheapest(list);
        
        std::list<Node*>::iterator it;
        it = list.begin();
        std::advance(it, findNodeIndex(list, parentNode));
        it = list.erase(it);

        //request.path.push_back(terrain->get_world_position(parentNode->pos));
        //If node is the Goal Node, then path found (RETURN �found�).
        if (parentNode->pos == goal)
        {
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
            Node* cur = parentNode;
            while (cur) {
                //push request
                request.path.push_front(terrain->get_world_position(cur->pos));
                //go to next parent
                cur = cur->parent;
            }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

            terrain->set_color(start, Colors::Orange);
            terrain->set_color(goal, Colors::Orange);
            return PathResult::COMPLETE;
        }

        
        bool NW = true;
        bool NE = true;
        bool SE = true;
        bool SW = true;

        //For (all neighboring child nodes)
        for (int i = 1; i <= 8; i++)
        {
            //set parent to parent
            GridPos childPos = getChild(parentNode->pos, i); //get child
            //deleted line
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
            //Node* oldParent = map[childPos.col][childPos.row].parent;

            if (childPos != parentNode->pos)
            {
                //set map's parent to new parent after getting position
                //map[childNode->pos.col][childNode->pos.row].parent = &map[parentNode->pos.col][parentNode->pos.row];
                
                //grid is on the map and isn't a wall
                if (terrain->is_valid_grid_position(childPos) && !terrain->is_wall(childPos))
                {
                    //i is non diagonals or is a valid diagonal
                    if (i <= 4 || (i == 5 && NE) || (i == 6 && SE) || (i == 7 && SW) || (i == 8 && NW))
                    {
                        //Compute its cost, f(x) = g(x) + h(x)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        float given = parentNode->given;
                        if (i >= 4)
                        {
                            //tile is a diagonal
                            given += (float)std::sqrt(2);
                            //map[childPos.col][childPos.row].given = map[parentNode->pos.col][parentNode->pos.row].given + (float)std::sqrt(2);
                        }
                        else
                        {
                            //tile is N, S, W, E
                            given += 1;
                            //map[childPos.col][childPos.row].given = map[parentNode->pos.col][parentNode->pos.row].given + 1;
                        }

                        float h = getHeuristic(request.settings.heuristic, childPos, goal);
                        //map[childPos.col][childPos.row].cost = map[parentNode->pos.col][parentNode->pos.row].given + h * request.settings.weight;
                        float newCost = given + h * request.settings.weight;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        //find if child exists on curr list, and assign it
                        map[parentNode->pos.col][parentNode->pos.row].onList_ = assignList(list, map[parentNode->pos.col][parentNode->pos.row].pos);

                        //If child node isn't on Open or Closed list, put it on Open List.
                        if (map[childPos.col][childPos.row].onList_ == onList::NONE)
                        {
////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            map[childPos.col][childPos.row].parent = parentNode;
                            map[childPos.col][childPos.row].given = given;
                            map[childPos.col][childPos.row].cost = newCost;
////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            map[childPos.col][childPos.row].onList_ = onList::OPEN;
                            terrain->set_color(childPos, Colors::Blue);
                            list.push_back(&map[childPos.col][childPos.row]);
                        }
                        //Else if child node is on Open or Closed List,
                        else if (map[childPos.col][childPos.row].onList_ == onList::OPEN || map[childPos.col][childPos.row].onList_ == onList::CLOSE)
                        {
                            //AND this new one is cheaper,
                            //then take the old expensive one off both lists
                            //if oldCost == 0 then it's our first time setting it
                            if (map[childPos.col][childPos.row].cost > newCost)
                            {
                                //and put this new cheaper one on the Open List.
////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                map[childPos.col][childPos.row].parent = parentNode;
                                map[childPos.col][childPos.row].given = given;
                                map[childPos.col][childPos.row].cost = newCost;
////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                map[childPos.col][childPos.row].onList_ = onList::OPEN;
                                terrain->set_color(childPos, Colors::Blue);
                                list.push_back(&map[childPos.col][childPos.row]);
                            }
                            /*
                            else
                            {
                                map[childPos.col][childPos.row].cost = oldCost;
                                map[childPos.col][childPos.row].parent = oldParent;
                            }*/
                        }
                    }
                }
                //grid is valid but the non-diagonals is a wall, skip the diagonals
                else if (terrain->is_valid_grid_position(childPos) && terrain->is_wall(childPos) && i <= 4)
                {
                    if (i == 1) //NORTH
                    {
                        NE = false;
                        NW = false;
                    }

                    if (i == 2) //EAST
                    {
                        NE = false;
                        SE = false;
                    }

                    if (i == 3) //SOUTH
                    {
                        SE = false;
                        SW = false;
                    }

                    if (i == 4) //WEST
                    {
                        SW = false;
                        NW = false;
                    }
                }
            }
        }

/***************************************************************************************************************/
        //Place parent node on the Closed List (we're done with it).
        parentNode->onList_ = onList::CLOSE;
        map[parentNode->pos.col][parentNode->pos.row].onList_ = onList::CLOSE;
        terrain->set_color(parentNode->pos, Colors::Yellow);
        map[parentNode->pos.col][parentNode->pos.row] = *parentNode;
        //If taken too much time this frame (or in single step mode), 
        if (request.settings.singleStep == true)
        {
            //abort search for now and resume next frame (RETURN �working�).
            return PathResult::PROCESSING;
        }
    }
    //Open List empty, thus no path possible (RETURN �fail�).
    return PathResult::IMPOSSIBLE;

}

float AStarPather::getHeuristic(Heuristic method, GridPos position, GridPos goal)
{
    float dx = (float)std::fabs(position.row - goal.row);
    float dy = (float)std::fabs(position.col - goal.col);

    if (method == Heuristic::OCTILE)
    {
        return 1 * (dx + dy) + (float)(sqrt(2) - 2 * 1) * std::min(dx, dy);
    }

    if (method == Heuristic::CHEBYSHEV)
    {
        return 1 * (dx + dy) + (1 - 2 * 1) * std::min(dx, dy);
    }  

    if (method == Heuristic::MANHATTAN)
    {
        return dx + dy;
    }

    if (method == Heuristic::EUCLIDEAN)
    {
        return (float)sqrt(dx * dx + dy * dy);
    }

    return 0.0f;
}

AStarPather::onList AStarPather::assignList(std::list<Node*> list, GridPos position)
{
    //go through list
    for (const Node* node : list)
    {
        //if node exists in list
        //and is labeled as open
        if (node->pos == position && node->onList_ == onList::OPEN)
        {
            //return open
            return onList::OPEN;
        }
        //and is labeled as closed
        if (node->pos == position && node->onList_ == onList::CLOSE)
        {
            //return closed
            return onList::CLOSE;
        }
        //and is labeled as none
        if (node->pos == position && node->onList_ == onList::NONE)
        {
            return onList::NONE;
        }
    }

    //else it's not on either list
    return onList::NONE;
}

GridPos AStarPather::getChild(GridPos node, int i)
{
    GridPos pos;
    if (i == 1) //NORTH
    {
        pos = { node.row + 1, node.col};
    }
    else if (i == 5) //NE
    {
        pos = { node.row + 1, node.col + 1 };
    }
    else if (i == 2) //EAST
    {
        pos = { node.row, node.col + 1};
    }
    else if (i == 6) //SE
    {
        pos = { node.row - 1, node.col + 1 };
    }
    else if (i == 3) //SOUTH
    {
        pos = { node.row - 1, node.col };
    }
    else if (i == 7) //SW
    {
        pos = { node.row - 1, node.col - 1 };
    }
    else if (i == 4) //WEST
    {
        pos = { node.row, node.col - 1};
    }
    else if (i == 8) //NW
    {
        pos = { node.row + 1, node.col - 1};
    }

    return pos;
}

AStarPather::Node* AStarPather::findCheapest(std::list<Node*> list)
{
    Node* cheapestNode;
    float minCost = -1.0f;
    for (Node* node : list)
    {
        if ((node->cost < minCost || minCost == -1.0f) && node->onList_ != onList::CLOSE)
        {
            //is a valid node
            if (terrain->is_valid_grid_position(node->pos) && node->cost >= 0.0f)
            {
                cheapestNode = node;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
                minCost = cheapestNode->cost;
            }
        }
    }

    return cheapestNode;
}

int AStarPather::findNodeIndex(std::list<Node*> list, Node* node)
{
    int i = 0;
    int index = 0;
    for (Node* node_ : list)
    {
        if (node_->pos == node->pos)
        {
                index = i;
        }
        i++;
    }

    return index;
}
function removeTransition(e){
  const keys = [...document.querySelectorAll('.key')];
  keys.forEach((key) => key.addEventListener('transitionend', function(e){
    // console.log(e.propertyName)
    e.propertyName === 'transform' ? key.classList.remove('playing') : null;
  }))
}

// use the load listener
window.addEventListener('load', removeTransition)
// if something is true then execute the code on the left, otherwise return null
e.propertyName === 'transform' ? key.classList.remove('playing') : null;
extends CharacterBody2D


@export var speed :float = 100.0
@export var jump_velocity = -200.0
@onready var aps = $AnimatedSprite2D
# Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
var animation_locked : bool = false
var direction : Vector2 = Vector2.ZERO

func _physics_process(delta):
	# Add the gravity.
	if not is_on_floor():
		velocity.y += gravity * delta

	# Handle jump.
	if Input.is_action_just_pressed("ui_accept") and is_on_floor():
		velocity.y = jump_velocity

	# Get the input direction and handle the movement/deceleration.
	# As good practice, you should replace UI actions with custom gameplay actions.
	direction = Input.get_vector("left", "right","up", "down" )
	if direction:
		velocity.x = direction.x * speed
	else:
		velocity.x = move_toward(velocity.x, 0, speed)

	move_and_slide()
	update_animation()
	update_facing_direction()

func update_animation():
	if not animation_locked:
		if direction.x != 0:
			aps.play("run")
		else:
			aps.play("idle")

func update_facing_direction():
	if direction.x > 0:
		aps.flip_h = false
	elif direction.x < 0:
		aps.flip_h = true

func jump():
	velocity.y = jump_velocity
	aps.play("jump")
	animation_locked = true
@script
<script>
    $wire.on('post-created', () => {
        //
    });
</script>
@endscript
dism /online /enable-feature /featurename:netfx3 /all /source:c:\sxs /limitaccess
%------------------------------------
%-Codigos para lab TPO

%-captura

function [senyal] = Captura(Fs)

s = audiorecorder(Fs, 16, 1);
record (s);
pause (5);
r=getaudiodata(s, 'int16');
% Converteixo a Double
senyal = double(r);

end

%--------------------------------
%Radar doppler

close all
% Frequencia de mostreig
Fs=22050;
% Funció que captura el senyal del radar

% NOMÉS APARTATS 2a i 3
% x=Captura(Fs);

% APARTAT 2 (Comentar apartat 3)
%     % Transformada de Fourier
%     N=length(x); 
% 
%     % % Nombre de punts, per zero padding augmentar N
%     % % AFEGUIU ELS ZEROS OPORTUNS DEPENEN DE LA RESOLUCIÓ FREQÜENCIAL
%     % % COMENTEU FUNCIÓ CAPTURA
%     % N=
% 
%     % % Representació de l'espectre
%     f=Fs*(-N/2:N/2-1)/N;
% 
%     w1 = window(@rectwin,length(x));
%     x1=x.*w1;
%     X1=1/length(x)*fftshift(fft(x1,N));
%     figure;
%     plot(f,abs(X1));
%     grid on
%     xlabel('f[Hz]'); ylabel('abs(X)');

    % % NOMES APARTAT 2c
    % % Enfinestrat triangular
    % w2 = window(@triang,length(x));
    % x1=x.*w2;
    % X1=1/length(x)*fftshift(fft(x1,N));
    % hold on
    % plot(f,abs(X1),'r');
    % legend('Rectangular','Triangular')

    % % NOMES APARTAT 2d
    % % COMENTAR APARTATs 2a, 2b, 2c i 3
    % % Enfinestrat Hamming
    % w3 = window(@hamming,length(x));
    % x1=x.*w3;
    % X1=1/length(x)*fftshift(fft(x1,N));
    % plot(f,abs(X1),'g');
    % legend('Rectangular','Triangular','Hamming')


% % APARTAT 3 (Comentar apartat 2)
% % DESCOMENTAR FUNCIÓ CAPTURA
    % Transformada chirp
    fs = Fs; f1 = 100; f2 = 600;  % en hertz
    m = 1024;
    w = exp(-j*2*pi*(f2-f1)/(m*fs));
    a = exp(j*2*pi*f1/fs);
 
    figure;
    Z = czt(x,m,w,a);
    fz = ((0:length(Z)-1)'*(f2-f1)/length(Z)) + f1;
    plot(fz,1/length(x)*abs(Z)); 
    xlabel('f(Hz)'); ylabel('Z')
    title('CZT')


%-------------------------------
      %_---------------------------
      %-Practica 

%Frequencia de mostreig
Fs=22050*2;

%Nombre de mostres
N=44100;

%Captura senyal audio
s  = wavrecord(N, Fs, 'int16');

%Converteixo a Double
x=double(s);

%Transformada de Fourier
N=length(x); %Nombre de punts, per zero padding augmentar N
X=fftshift(fft(x,N));
f=Fs*(-N/2:N/2-1)/N;
figure;
plot(f,abs(X));
xlabel('f(Hz)'); ylabel('X');

%Enfinestrat
w1 = window(@rectwin,length(x));
w2 = window(@hamming,length(x));
x1=x.*w1;
x2=x.*w2;
X1=fftshift(fft(x1,N));
X2=fftshift(fft(x2,N));
figure;
plot(f,abs(X1),f,abs(X2));
xlabel('f(Hz)'); ylabel('X');legend('Rectangular','Hamming');

%Transformada chirp
fs = Fs; f1 = 100; f2 = 600;  % en hertz
m = 1024;
w = exp(-j*2*pi*(f2-f1)/(m*fs));
a = exp(j*2*pi*f1/fs);

figure;
Z = czt(x,m,w,a);
fz = ((0:length(Z)-1)'*(f2-f1)/length(Z)) + f1;
plot(fz,abs(Z)); 
xlabel('f(Hz)'); ylabel('Z')
title('CZT')

%-----------------------------------------
  %-Prueba

Fs=22050*2;
x=double(DATA);
X=fftshift(abs(fft(x)));
figure(1)
       N=length(X); f=Fs*(-N/2:N/2-1)/N;h=plot(f,X)
       
       fs = Fs; f1 = 400; f2 = 600;  % in hertz
m = 1024;
w = exp(-j*2*pi*(f2-f1)/(m*fs));
a = exp(j*2*pi*f1/fs);

figure(2)
z = czt(x,m,w,a);
fz = ((0:length(z)-1)'*(f2-f1)/length(z)) + f1;
plot(fz,abs(z)); %axis([f1 f2 0 1.2])
title('CZT')

%--------------------------------------------------------------------------

%-Radar doppler

function varargout = radardoppler(varargin)
% RADARDOPPLER M-file for radardoppler.fig
%      RADARDOPPLER, by itself, creates a new RADARDOPPLER or raises the existing
%      singleton*.
%
%      H = RADARDOPPLER returns the handle to a new RADARDOPPLER or the handle to
%      the existing singleton*.
%
%      RADARDOPPLER('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in RADARDOPPLER.M with the given input arguments.
%
%      RADARDOPPLER('Property','Value',...) creates a new RADARDOPPLER or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before radardoppler_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to radardoppler_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Copyright 2002-2003 The MathWorks, Inc.

% Edit the above text to modify the response to help radardoppler

% Last Modified by GUIDE v2.5 06-Oct-2008 21:14:40

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @radardoppler_OpeningFcn, ...
                   'gui_OutputFcn',  @radardoppler_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before radardoppler is made visible.
function radardoppler_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to radardoppler (see VARARGIN)

% Choose default command line output for radardoppler
handles.output = hObject;

%
%Poso fons blanc i amago boto
%
set(hObject,'color','w');
set(handles.hboto,'visible','off');

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes radardoppler wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = radardoppler_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --------------------------------------------------------------------
function LoadCaptura_Callback(hObject, eventdata, handles)
% hObject    handle to Load (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global CaptureData

[filename, pathname] = uigetfile('*.vel', 'Pick an vel-file');
    if isequal(filename,0) | isequal(pathname,0)
       disp('User pressed cancel')
    else
      
           file=fullfile(pathname, filename);
           load(file,'-mat');
           
    end
% --------------------------------------------------------------------
function Exit_Callback(hObject, eventdata, handles)
% hObject    handle to Exit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
ButtonName=questdlg('Que vol fer?', ...
                       'Sortir del programa', ...
                       'Sortir','Cancelar','Cancelar');
                   
 switch ButtonName,
     case 'Sortir',
         close(gcf);
 end

% --------------------------------------------------------------------
function Parametres_Callback(hObject, eventdata, handles)
% hObject    handle to Parametres (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global SamplingParameters

S.Sampling_Rate = {'8000|11025|22050|{44100}', 'Sampling Rate(Hz)'};
S.Samples_Number={[10240] 'Number of Samples' [1 100000]};
S.Oscillator_Frequency={[24] 'Oscillator Frequency (GHz)' };
S.FFT_Points={[1024] 'Number of FFT points' [1 100000]};
S.Window_Type={ {'{rectwin}','bartlett' 'blackman' 'hamming'} };
S.Frequency_Unit={ {'{Hz}','m/s' 'km/h' 'mph'} };
SamplingParameters=StructDlg(S,'Sampling Parameters')
    if ~isempty(SamplingParameters),
       set(handles.hboto,'visible','on','string','Sample'); 
        
    end;

% --------------------------------------------------------------------
function TransformadaChirp_Callback(hObject, eventdata, handles)
% hObject    handle to TransformadaChirp (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global SamplingData


S.Oscillator_Frequency={[24] 'Oscillator Frequency (GHz)' };
S.Chirp_Points={[1024] 'Number of Chirp points' [1 100000]};
S.Window_Type={ {'{rectwin}','bartlett' 'blackman' 'hamming'} };
S.Start_Frequency={ [100] '' [0 44100]};
S.Stop_Frequency={ [700] '' [0 44100]};
S.Frequency_Unit={ {'{Hz}','m/s' 'km/h' 'mph'} };
SamplingParameters=StructDlg(S,'Sampling Parameters');
if ~isempty(SamplingParameters),
Fs=SamplingData.Sampling_Rate;
SamplingParameters.Samples_Number=length(SamplingData.Data);

switch SamplingParameters.Window_Type,
        case 'rectwin',
        win=window(@rectwin,SamplingParameters.Samples_Number);
        case 'bartlett',
        win=window(@bartlett,SamplingParameters.Samples_Number);
        case 'blackman',
        win=window(@blackman,SamplingParameters.Samples_Number);
        case 'hamming',
        win=window(@hamming,SamplingParameters.Samples_Number);
end

m = SamplingParameters.Chirp_Points;
f1=SamplingParameters.Start_Frequency;
f2=SamplingParameters.Stop_Frequency;
w = exp(-j*2*pi*(f2-f1)/(m*Fs));
a = exp(j*2*pi*f1/Fs);


Z = czt(SamplingData.Data.*win,m,w,a);
fz = ((0:length(Z)-1)'*(f2-f1)/length(Z)) + f1;
    



figure;
subplot(211);
t=linspace(0,(SamplingParameters.Samples_Number-1)/Fs,SamplingParameters.Samples_Number)*1e3; %temps en ms
plot(t,SamplingData.Data);
xlabel('t(ms)'); ylabel('x(t)');

subplot(212);




switch SamplingParameters.Frequency_Unit,
    case 'Hz',
        escala=1;
        TextUnit='Hz';
    case 'm/s',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8/f0)/2;
        TextUnit='m/s';
    case 'km/h',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/f0)/2;
        TextUnit='km/s';
    case 'mph',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/1.6/f0)/2;
        TextUnit='mph';
end

       plot(fz*escala,abs(Z));
       xlabel(TextUnit);
       ylabel('mag');
       
       [m,I]=max(abs(Z));
       title(['Maxim ',num2str(fz(I)*escala),' ',TextUnit]);
end

% --------------------------------------------------------------------
function PlotVelocitat_Callback(hObject, eventdata, handles)
% hObject    handle to ParametresVelocimetre (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global CaptureData 

S.Oscillator_Frequency={[24] 'Oscillator Frequency (GHz)' };
S.Frequency_Unit={ {'{Hz}','m/s' 'km/h' 'mph'} };
SamplingParameters=StructDlg(S,'Sampling Parameters');

if ~isempty(SamplingParameters),
    switch SamplingParameters.Frequency_Unit,
    case 'Hz',
        escala=1;
        TextUnit='Hz';
    case 'm/s',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8/f0)/2;
        TextUnit='m/s';
    case 'km/h',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/f0)/2;
        TextUnit='km/h';
    case 'mph',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/1.609344/f0)/2;
        TextUnit='mph';
    end
    figure; 
    plot(1:length(CaptureData.FrequencyDoppler),CaptureData.FrequencyDoppler*escala);
    xlabel('Sample');ylabel(TextUnit);
end;


% --------------------------------------------------------------------
function CapturaVelocimetre_Callback(hObject, eventdata, handles)
% hObject    handle to CapturaVelocimetre (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
 
global CaptureData SamplingData


S.Sampling_Rate = {'8000|11025|22050|{44100}', 'Sampling Rate(Hz)'};
S.Samples_Number={[10240] 'Number of Samples' [1 100000]};
S.Oscillator_Frequency={[24] 'Oscillator Frequency (GHz)' };
S.Chirp_Points={[1024] 'Number of Chirp points' [1 100000]};
S.Window_Type={ {'{rectwin}','bartlett' 'blackman' 'hamming'} };
S.Start_Frequency={ [100] '' [0 44100]};
S.Stop_Frequency={ [700] '' [0 44100]};
S.Frequency_Unit={ {'{Hz}','m/s' 'km/h' 'mph'} };
SamplingParameters=StructDlg(S,'Sampling Parameters');

if ~isempty(SamplingParameters),
    set(handles.hboto,'string','Stop','visible','on');
    
    clear CaptureData
    
    %Capura de la tarja de so
    Fs=SamplingParameters.Sampling_Rate;
    
    SamplingData.Sampling_Rate=Fs;
    
    switch SamplingParameters.Frequency_Unit,
    case 'Hz',
        escala=1;
        TextUnit='Hz';
    case 'm/s',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8/f0)/2;
        TextUnit='m/s';
    case 'km/h',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/f0)/2;
        TextUnit='km/h';
    case 'mph',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/1.609344/f0)/2;
        TextUnit='mph';
    end
    
    switch SamplingParameters.Window_Type,
        case 'rectwin',
        win=window(@rectwin,SamplingParameters.Samples_Number);
        case 'bartlett',
        win=window(@bartlett,SamplingParameters.Samples_Number);
        case 'blackman',
        win=window(@blackman,SamplingParameters.Samples_Number);
        case 'hamming',
        win=window(@hamming,SamplingParameters.Samples_Number);
    end
    
    
    m = SamplingParameters.Chirp_Points;
    f1=SamplingParameters.Start_Frequency;
    f2=SamplingParameters.Stop_Frequency;
    w = exp(-j*2*pi*(f2-f1)/(m*Fs));
    a = exp(j*2*pi*f1/Fs);
count=0;
    while ~strcmp(get(handles.hboto,'string'),'End')
    SamplingData.Data=wavrecord(SamplingParameters.Samples_Number,Fs,'double');
    Z = czt(SamplingData.Data.*win,m,w,a);
    fz = ((0:length(Z)-1)'*(f2-f1)/length(Z)) + f1;
   [M,I]=max(abs(Z));
   count=count+1;
   CaptureData.FrequencyDoppler(count)=fz(I);
   if count==1,
       figure; h=plot(1:count,CaptureData.FrequencyDoppler*escala);
       xlabel('Sample');ylabel(TextUnit);
   else
       set(h,'XData',1:length(CaptureData.FrequencyDoppler),'YData',CaptureData.FrequencyDoppler*escala);
       drawnow;
   end;
    end;
       
   
   



end;

% --------------------------------------------------------------------
function About_Callback(hObject, eventdata, handles)
% hObject    handle to About (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
msgbox('(C) 2008 A.L\E1zaro/D.Girbau');

% --------------------------------------------------------------------
function File_Callback(hObject, eventdata, handles)
% hObject    handle to File (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function Mesura_Callback(hObject, eventdata, handles)
% hObject    handle to Mesura (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function Velocimetre_Callback(hObject, eventdata, handles)
% hObject    handle to Velocimetre (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function Help_Callback(hObject, eventdata, handles)
% hObject    handle to Help (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function SaveSample_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global SamplingData

[filename, pathname] = uiputfile('*.mat', 'Pick an MAT-file');
    if isequal(filename,0) | isequal(pathname,0)
       disp('User pressed cancel')
    else
      
           file=fullfile(pathname, filename);
           eval(['save ',file,' SamplingData -mat']);
       
    end

% --------------------------------------------------------------------
function LoadSample_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global SamplingData

[filename, pathname] = uigetfile('*.mat', 'Pick an MAT-file');
    if isequal(filename,0) | isequal(pathname,0)
       disp('User pressed cancel')
    else
      
           file=fullfile(pathname, filename);
           load(file,'-mat');
       
    end

% --------------------------------------------------------------------
function SaveCaptura_Callback(hObject, eventdata, handles)
% hObject    handle to SaveCaptura (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global CaptureData

[filename, pathname] = uiputfile('*.vel', 'Pick an vel-file');
    if isequal(filename,0) | isequal(pathname,0)
       disp('User pressed cancel')
    else
      
           file=fullfile(pathname, filename);
           eval(['save ',file,' CaptureData -mat']);
       
    end

% --- Executes on button press in hboto.
function hboto_Callback(hObject, eventdata, handles)
% hObject    handle to hboto (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)



global SamplingParameters SamplingData


%Si esta en mode sample
mode=get(handles.hboto,'string');

if strcmp(mode,'Sample'),

%Capura de la tarja de so
Fs=SamplingParameters.Sampling_Rate;
SamplingData.Data=wavrecord(SamplingParameters.Samples_Number,Fs,'double');
SamplingData.Sampling_Rate=Fs;

switch SamplingParameters.Window_Type,
        case 'rectwin',
        w=window(@rectwin,SamplingParameters.Samples_Number);
        case 'bartlett',
        w=window(@bartlett,SamplingParameters.Samples_Number);
        case 'blackman',
        w=window(@blackman,SamplingParameters.Samples_Number);
        case 'hamming',
        w=window(@hamming,SamplingParameters.Samples_Number);
end
   

figure;
subplot(211);
t=linspace(0,(SamplingParameters.Samples_Number-1)/Fs,SamplingParameters.Samples_Number)*1e3; %temps en ms
plot(t,SamplingData.Data);
xlabel('t(ms)'); ylabel('x(t)');

subplot(212);
%Positius i negatius
%X=fftshift(fft(SamplingData.Data,SamplingParameters.FFT_Points));
%N=length(X); f=Fs*(-N/2:N/2-1)/N;

%Frequencies positives nomes
X=fft(SamplingData.Data.*w,SamplingParameters.FFT_Points);
N=length(X);
X=X(1:(N/2));
f=Fs*(0:(N/2-1))/N;

switch SamplingParameters.Frequency_Unit,
    case 'Hz',
        escala=1;
        TextUnit='Hz';
    case 'm/s',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8/f0)/2;
        TextUnit='m/s';
    case 'km/h',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/f0)/2;
        TextUnit='km/h';
    case 'mph',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/1.609344/f0)/2;
        TextUnit='mph';
end

       plot(f*escala,abs(X));
       xlabel(TextUnit);
       ylabel('mag');
       
       [m,I]=max(abs(X));
       title(['Maxim ',num2str(f(I)*escala),' ',TextUnit]);


else
   %Mode capture, esperant stop
   set(handles.hboto,'string','End','visible','off');
    
end


% --------------------------------------------------------------------
function Plot_Callback(hObject, eventdata, handles)
% hObject    handle to Plot (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global SamplingData 



S.Oscillator_Frequency={[24] 'Oscillator Frequency (GHz)' };
S.FFT_Points={[1024] 'Number of FFT points' [1 100000]};
S.Window_Type={ {'{rectwin}','bartlett' 'blackman' 'hamming'} };
S.Frequency_Unit={ {'{Hz}','m/s' 'km/h' 'mph'} };
SamplingParameters=StructDlg(S,'Sampling Parameters');

Fs=SamplingData.Sampling_Rate;
SamplingParameters.Samples_Number=length(SamplingData.Data);

switch SamplingParameters.Window_Type,
        case 'rectwin',
        w=window(@rectwin,SamplingParameters.Samples_Number);
        case 'bartlett',
        w=window(@bartlett,SamplingParameters.Samples_Number);
        case 'blackman',
        w=window(@blackman,SamplingParameters.Samples_Number);
        case 'hamming',
        w=window(@hamming,SamplingParameters.Samples_Number);
end
    



figure;
subplot(211);
t=linspace(0,(SamplingParameters.Samples_Number-1)/Fs,SamplingParameters.Samples_Number)*1e3; %temps en ms
plot(t,SamplingData.Data);
xlabel('t(ms)'); ylabel('x(t)');

subplot(212);
%Positius i negatius
%X=fftshift(fft(SamplingData.Data,SamplingParameters.FFT_Points));
%N=length(X); f=Fs*(-N/2:N/2-1)/N;

%Frequencies positives nomes
X=fft(SamplingData.Data.*w,SamplingParameters.FFT_Points);
N=length(X);
X=X(1:(N/2));
f=Fs*(0:(N/2-1))/N;

switch SamplingParameters.Frequency_Unit,
    case 'Hz',
        escala=1;
        TextUnit='Hz';
    case 'm/s',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8/f0)/2;
        TextUnit='m/s';
    case 'km/h',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/f0)/2;
        TextUnit='km/h';
    case 'mph',
        f0=SamplingParameters.Oscillator_Frequency*1e9;
        escala=(3e8*3.6/1.609344/f0)/2;
        TextUnit='mph';
end

       plot(f*escala,abs(X));
       xlabel(TextUnit);
       ylabel('mag');
       
       [m,I]=max(abs(X));
       title(['Maxim ',num2str(f(I)*escala),' ',TextUnit]);
    
            %------------------------------
            %_-------------------------------
              
              
Fs=22050*2;
 r = audiorecorder(22050*2, 16, 1);
 
       record(r);     % speak into microphone...
       pause(r);
       p = play(r);   % listen
       resume(r);     % speak again
       stop(r);
       p = play(r);   % listen to complete recording
       DATA = getaudiodata(r, 'int16'); % get data as int16 array
       
       plot(DATA)
       
       
       Fs = 44100;
        y  = wavrecord(Fs, Fs, 'int16');
        %wavplay(y, Fs);
        DATA=y;
       
       X=fftshift(abs(fft(double(DATA))));
       N=length(X); f=Fs*(-N/2:N/2-1)/N;plot(f,X)

            %----------------------------------------------
       %-----------------------------------------------
         %-Struct 
            
            function [str,cur_line] = struct2str(s,units,max_width,max_struct_elem, ident_str,total_ident_len,str,cur_line)
%

% AF 11/6/01

if (exist('units','var') ~= 1)
   units = struct([]);
end
if (exist('max_width','var') ~= 1)
   max_width  = Inf;
end
if (exist('max_struct_elem','var') ~= 1)
   max_struct_elem = 3;
end
if (exist('ident_str','var') ~= 1)
   ident_str  = '|';
end
if (exist('total_ident_len','var') ~= 1)
   total_ident_len  = 2;
end
if (exist('str','var') ~= 1)
   str = repmat({''},400,1);
   first_call = 1;
else
   first_call = 0;
end
if (exist('cur_line','var') ~= 1)
   cur_line = 0;
end
spacing = 2;

fnames = fieldnames(s);
fnames_lbl = build_labels(fnames,units);
max_lbl_width = size(char(fnames_lbl),2);
for i = 1:length(fnames)
   for j = 1:spacing-1
      cur_line = cur_line+1;
      str{cur_line} = ident_str;
   end
   cur_line = cur_line+1;
   str{cur_line} = ident_str;
   leading_spaces = repmat('-', 1, total_ident_len -length(ident_str)+max_lbl_width -length(fnames_lbl{i}));
   str{cur_line} = sprintf('%s%s%s: ', str{cur_line} ,leading_spaces, fnames_lbl{i});
   x = getfield(s,fnames{i});
   %% recursive call for sub-structures
   if (isstruct(x))
      new_ident_len = total_ident_len + max_lbl_width+2;
      new_ident_str = [ident_str repmat(' ',1,new_ident_len-2 - length(ident_str) - ceil(length(fnames_lbl{i})/2)) '|'];
      for xi = 1:min(length(x),max_struct_elem)
         if (isfield(units,fnames{i}))
            sub_units = getfield(units,fnames{i});
         else
            sub_units = struct([]);
         end
         [str,cur_line] = struct2str(x(xi),sub_units,max_width,max_struct_elem, new_ident_str,new_ident_len,str,cur_line);
         cur_line = cur_line+1;
         str{cur_line} = ident_str;
      end
      if (length(x) > max_struct_elem)
         dotted_str = [ident_str repmat(' ',1,new_ident_len-2 - length(ident_str) - ceil(length(fnames_lbl{i})/2)) ':'];
         for dot_i = 1:2
            cur_line = cur_line+1;
            str{cur_line} = dotted_str;
         end
      end
   else
      xstr = element2str(x,max_width-max_lbl_width-2);
      str{cur_line} = sprintf('%s%s', str{cur_line}, xstr);
   end
end
if (first_call)
   str = str(1:cur_line);
end
return;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      
%%                        SUB FUNCTIONS                        %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      
function fnames_lbl = build_labels(fnames,units);
%
fnames_lbl = strrep(fnames,'_',' ');
f_units = fieldnames(units);
v_units = struct2cell(units);
for i = 1:length(f_units)
   if (ischar(v_units{i}) & ~isempty(v_units{i}))
      index = strmatch(f_units{i},fnames,'exact');
      if (~isempty(index))
         fnames_lbl{index} = strrep(v_units{i},'*',fnames_lbl{index});
         % fnames_lbl{index} = [fnames_lbl{index} ' (' v_units{i} ')'];
      end
   end
end
return;

% function fnames_lbl = build_labels(fnames,f_units);
% %
% fnames_lbl = strrep(fnames,'_',' ');
% for i = 1:min(length(fnames_lbl),length(f_units))
%    if (ischar(f_units{i}) & ~isempty(f_units{i}))
%       fnames_lbl{i} = [fnames_lbl{i} ' (' f_units{i} ')'];
%    end
% end
% return;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function xstr = element2str(x,max_width)
if (exist('max_width','var') ~= 1)
   max_width = Inf;
end
switch (class(x))
case 'char'
   if (length(x) < max_width-2)
      xstr = ['''' x ''''];
   else
      xstr = ['''' x(1:max_width-4) '...'''];
   end
   
case {'double' 'sparse'}
   if (isempty(x))
      xstr = '[]';
   elseif (ndims(x) > 2 | min(size(x)) >1 | length(x) >150)
      dims = size(x);
      xstr = ['[' sprintf('%dx',dims(1:end-1)) sprintf('%d',dims(end)) ' ' class(x) ']'];
   else 
      % x is a vector
      if (size(x,2) == 1)
         sep = ' ; ';
      else
         sep = ' ';
      end
      if (length(x) == 1)
         xstr = num2str(x);
      else
         xstr = ['[' num2str(x(1))];
         for ix = 2:length(x)
            xstr = [xstr sep num2str(x(ix))];
         end
         xstr = [xstr ']'];
      end
      if (length(xstr) > max_width)
         xstr = [xstr(1:max_width-4) '...]'];
      end
   end
   
case 'cell'
   xstr = '{';
   if (isempty(x))
      xstr = '{}';
   elseif (ndims(x) > 2 | min(size(x)) >1)
      dims = size(x);
      xstr = ['{' sprintf('%dx',dims(1:end-1)) sprintf('%d',dims(end)) ' cell}'];
   else 
      % x is a cell vector
      if (size(x,2) == 1)
         sep = ' ; ';
      else
         sep = ' ';
      end
      xstr = ['{' element2str(x{1},max_width/3)];
      for ix = 2:length(x)
         xstr = [xstr sep element2str(x{ix},max_width/3)];
      end
      xstr = [xstr '}'];
      if (length(xstr) > max_width)
         xstr = [xstr(1:max_width-4) '...}'];
      end
   end
   
case 'function_handle'
   xstr = element2str(['@' func2str(x)],max_width);
   
end
<a id="#fromacademy">The Mindset to succed</a>
$(document).ready(function () {
	$('[data-property-slider]')
		.on('initialized.owl.carousel changed.owl.carousel', function (e) {
			$('#counter').text(
				e.relatedTarget.relative(e.item.index) + 1 + '/' + e.item.count,
			);
		})
		.owlCarousel({
			loop: false,
			nav: true,
			dots: false,
			animateIn: true,
			responsiveClass: true,
			items: 1,
			margin: 30,
			navText: [
				'<a class="arrow-left" aria-hidden="true"></a>',
				'<a class="arrow-right" aria-hidden="true"></a>',
			],
			responsive: {
				576: {
					items: 1,
				},
				789: {
					items: 2,
				},
			},
		});
});

// Add leading zero
//.on('changed.owl.carousel', function (e) {
// 	var currentSlideIndex = e.item.index + 1;
// 	var formattedSlideIndex = ('0' + currentSlideIndex).slice(-2); // Add leading zero
// 	$('#counter').text(formattedSlideIndex);
// })

// for append div
//$(document).ready(function () {
	// Append div#counter after ul
	//$('.example').after('<div id="counter">1</div>');
//});
Sorry, Google Voice isn't supported in your country yet
Token Creation in Practice
In order to create tokens, we'll make use of the jsonwebtoken package. We'll need to import it inside of our project:

// controllers/users.js

const jwt = require('jsonwebtoken'); // importing the jsonwebtoken module
Afterwards, we can call the jwt.sign() method to create a token:

// controllers/users.js

const jwt = require('jsonwebtoken'); 

module.exports.login = (req, res) => {
  const { email, password } = req.body;

  return User.findUserByCredentials(email, password)
    .then((user) => {
      // we're creating a token
      const token = jwt.sign({ _id: user._id }, 'some-secret-key');

      // we return the token
      res.send({ token });
    })
    .catch((err) => {
      res
        .status(401)
        .send({ message: err.message });
    });
};
We pass two arguments to the sign() method: the token's payload and the secret key for the signature:

const token = jwt.sign({ _id: user._id }, 'some-secret-key');
The token's payload is an encrypted user object. We can send as much information as we'd like to be encrypted; however, we recommend that you avoid creating excess traffic and only encrypt the most pertinent information. In this case, it's enough to encrypt the user's unique ID.

The sign() method also has an optional third parameter, an options object. You can check out the full list of options available with this object inside the official jsonwebtoken documentation. We're really only interested in one of these options, expiresIn. This is a length of time that specifies how long a token will be valid. We can pass a number here, which the sign() method will recognize as a number of seconds:

const token = jwt.sign(
  { _id: user._id },
  'some-secret-key',
  { expiresIn: 3600 } // this token will expire an hour after creation
);
We can pass a string argument containing numbers and letters. The letters will indicate the unit of measurement, milliseconds, minutes, hours, or days:

expiresIn: '120ms' // 120 miliseconds
expiresIn: '15m' // 15 minutes
expiresIn: '2h' // 2 hours
expiresIn: '7d' // 7 days
Should we choose to pass nothing to expiresIn, the token will never expire.
The promise chain works like this:

We check if a user with the submitted email exists in the database.
If the user is found, the hash of the user's password is checked.
In this lesson, we'll improve our code. We'll actually make the code for checking emails and passwords part of the User schema itself. For this, we'll write a method called findUserByCredentials(), which has two parameters, email and password, and returns either a user object or an error.

Mongoose allows us to do this, and in order to add a custom method, we'll need to set it on the statics property on the desired schema:

// models/user.js

const mongoose = require('mongoose');

const userSchema = new mongoose.Schema({
  email: {
    type: String,
    required: true,
    unique: true
  },
  password: {
    type: String,
    required: true,
    minlength: 8
  }
});
// we're adding the findUserByCredentials methods to the User schema 
// it will have two parameters, email and password
userSchema.statics.findUserByCredentials = function findUserByCredentials (email, password) {

};

module.exports = mongoose.model('user', userSchema);
 Save
All that's left is to write this method's code. In the future, we'll use the method like so:

User.findUserByCredentials('elisebouer@tripleten.com', 'EliseBouer1989')
  .then(user => {
        // we get the user object if the email and password match
  })
  .catch(err => {
        // otherwise, we get an error
  });
 Save
The findUserByCredentials() Method
In order to find a user by email, we'll need the findOne() method, which takes email as an argument. The findOne() method belongs to the User model, so we'll call this method using the this keyword:

// models/user.js

userSchema.statics.findUserByCredentials = function findUserByCredentials (email, password) {
  // trying to find the user by email
  return this.findOne({ email }) // this — the User model
    .then((user) => {
      // not found - rejecting the promise
      if (!user) {
        return Promise.reject(new Error('Incorrect email or password'));
      }

      // found - comparing hashes
      return bcrypt.compare(password, user.password);
    });
};

module.exports = mongoose.model('user', userSchema);
 Save
The findUserByCredentials() method should not be an arrow function. This is so that we can use this. Otherwise, the value of this would be statically set, as arrow functions remember the value of this from their initial declaration.

Now we need to add an error handler for whenever the hashes don't match. We'll write the code for this in a further then() function.

But first, let's take a quick look at how we should NOT do this:

// models/user.js

userSchema.statics.findUserByCredentials = function findUserByCredentials (email, password) {
  // trying to find the user by email
  return this.findOne({ email })
    .then((user) => {
      // not found - rejecting the promsie
      if (!user) {
        return Promise.reject(new Error('Incorrect email or password'));
      }

      // found - comparing hashes
      return bcrypt.compare(password, user.password);
    })
    .then((matched) => {
      if (!matched) // rejecting the promise
      
      return user; // oh - the user variable is not in this scope
    });
};

module.exports = mongoose.model('user', userSchema);
 Save
In the second then(), we're returning a user object which doesn't exist in that scope as it was left back in the previous then().

In order to solve this problem, we should organize our promise chain differently. Let's add a then() handler to bcrypt.compare():

// models/user.js

const mongoose = require('mongoose');
const bcrypt = require('bcryptjs');

const { Schema } = mongoose;

const userSchema = new mongoose.Schema({
  email: {
    type: String,
    required: true,
    unique: true
  },
  password: {
    type: String,
    required: true,
    minlength: 8
  }
});

userSchema.statics.findUserByCredentials = function findUserByCredentials (email, password) {
  return this.findOne({ email })
    .then((user) => {
      if (!user) {
        return Promise.reject(new Error('Incorrect email or password'));
      }

      return bcrypt.compare(password, user.password)
        .then((matched) => {
          if (!matched) {
            return Promise.reject(new Error('Incorrect email or password'));
          }

          return user; // now user is available
        });
    });
};

module.exports = mongoose.model('user', userSchema);
 Save
The method is ready. Now we can apply it to the authentication handler:

// controllers/users.js

module.exports.login = (req, res) => {
  const { email, password } = req.body;

  return User.findUserByCredentials(email, password)
    .then((user) => {
            // authentication successful! user is in the user variable
    })
    .catch((err) => {
            // authentication error
      res
        .status(401)
        .send({ message: err.message });
    });
};
Checking Passwords
If the user is found, we'll check the user's password next. We'll hash the password, then compare the resultant hash with the hash in the database. We can use the brcrypt.compare() method in order to do this. It accepts the password and the corresponding hash as arguments. This method performs the hash and compares it with the hash we pass as the second argument:

// controllers/users.js

module.exports.login = (req, res) => {
  const { email, password } = req.body;

  User.findOne({ email })
    .then((user) => {
      if (!user) {
        return Promise.reject(new Error('Incorrect password or email'));
      }
      // comparing the submitted password and hash from the database
      return bcrypt.compare(password, user.password);
    })
    .catch((err) => {
      res
        .status(401)
        .send({ message: err.message });
    });
};
The bcrypt.compare() method works asynchronously so its result will be returned in a chained then() function. If the hashes match, then() with return true, otherwise, it will return false:

// controllers/users.js

module.exports.login = (req, res) => {
  const { email, password } = req.body;

  User.findOne({ email })
    .then((user) => {
      if (!user) {
        return Promise.reject(new Error('Incorrect password or email'));
      }
      return bcrypt.compare(password, user.password);
    })
    .then((matched) => {
      if (!matched) {
        // the hashes didn't match, rejecting the promise
        return Promise.reject(new Error('Incorrect password or email'));
      }
      // successful authentication
      res.send({ message: 'Everything good!' });
    })
    .catch((err) => {
      res
        .status(401)
        .send({ message: err.message });
    });
};
Hashing Passwords
We'll save encrypted versions of passwords inside the database. Otherwise, our user's information might be vulnerable. For example, if a malicious individual were to gain access to the database, they could gain access to a user's account.

The password will be hashed. The purpose of a hash is to make it so that reverse-engineering passwords is impossible. As a result, attackers won't be able to access a user's account, even if the database is compromised. 

In order to hash a password, we'll need to use a module called bcryptjs. As with other modules, we'll need to install it, then import it inside the project:

// controllers/users.js

const bcrypt = require('bcryptjs'); // importing bcrypt
const User = require('../models/user');
We're adding the code to hash the passwords to the user creation controller. The hash() method is responsible for this process:

// controllers/users.js

const bcrypt = require('bcryptjs'); // importing bcrypt
const User = require('../models/user');

exports.createUser = (req, res) => {
  // hashing the password
  bcrypt.hash(req.body.password, 10)
    .then(hash => User.create({
      email: req.body.email,
      password: hash, // adding the hash to the database
    }))
    .then((user) => res.send(user))
    .catch((err) => res.status(400).send(err));
};
Adding a User to the Database
First, let’s create and record a user to our database. 

Creating a User Model
We've created a user model, which is an object, with a few fields:

// models/user.js

const mongoose = require('mongoose');

const userSchema = new mongoose.Schema({
  email: {
    type: String,
    required: true,
    unique: true
  },
  password: {
    type: String,
    required: true,
    minlength: 8
  }
});

module.exports = mongoose.model('user', userSchema);
c=int(input("enter no.of columns:"))
r=int(input("enter no.of rows:"))
print("enter 1st matrix elements")
m1=[]
for i in range (r):
    print("enter elemnts of row",i+1)
    n=[]
    for j in range (c):
        x=int(input())
        n.append(x)
    m1.append(n)
print("enter 2nd matrix elements")
m2=[]
for i in range (r):
    print("enter elemnts of row",i+1)
    n=[]
    for j in range (c):
        x=int(input())
        n.append(x)
    m2.append(n)
for i in range (r):
    for j in range (r):
        x=0
        for k in range (r):
            a=m1[i][k]
            b=m2[k][j]
            x=x+a*b
        print(x,end=" ")
    print(" ")
c=int(input("enter no.of columns:"))
r=int(input("enter no.of rows:"))
print("enter 1st matrix elements")
m1=[]
for i in range (r):
    print("enter elemnts of row",i+1)
    n=[]
    for j in range (c):
        x=int(input())
        n.append(x)
    m1.append(n)
print("enter 2nd matrix elements")
m2=[]
for i in range (r):
    print("enter elemnts of row",i+1)
    n=[]
    for j in range (c):
        x=int(input())
        n.append(x)
    m2.append(n)
for i in range (r):
    for j in range (c):
        a=m1[i][j]
        b=m2[i][j]
        x=a+b
        print(x,end=" ")
    print(" ")
// prevent actions by user in setup
// for all actions 
[ExtensionOf(classStr(WorkflowWorkItemActionManager))]
final class WorkflowWorkItemActionManager_Proc_Extension
{
    public static void dispatchWorkItemAction(  WorkflowWorkItemTable _workItem,
                                                WorkflowComment _comment,
                                                WorkflowUser _toUser,
                                                WorkflowWorkItemActionType _workItemActionType,
                                                menuItemName _menuItemName,
                                                Name _queueName )
    {
        NW_UserWorkflowAction   NW_UserWorkflowAction;
        WorkflowTable           WorkflowTable;
        NW_WFAction             action;
        switch(_workItemActionType)
        {
            case WorkflowWorkItemActionType::Complete :
                action = NW_WFAction::Approve;
                break;
            case WorkflowWorkItemActionType::Delegate :
                action = NW_WFAction::Delegate;
                break;
            case WorkflowWorkItemActionType::Deny :
                action = NW_WFAction::Cancel;
                break;
            case WorkflowWorkItemActionType::RequestChange :
                action = NW_WFAction::RequestChange;
                break;
            case WorkflowWorkItemActionType::Return :
                action = NW_WFAction::Reject;
                break;
        }
        SysWorkflowTable sysworkflowTable = SysWorkflowTable::find(_workItem.CorrelationId);

        while select NW_UserWorkflowAction 
            join WorkflowTable 
            where NW_UserWorkflowAction.SequenceNumber == WorkflowTable.SequenceNumber
            && WorkflowTable.TemplateName == sysworkflowTable.TemplateName
            && NW_UserWorkflowAction.NW_WFAction == action
        {
            if(NW_UserWorkflowAction.NW_UserGroup == NW_UserGroup::User
                && NW_UserWorkflowAction.UserId == curUserId())
                throw error(strFmt('This user %1 not able to %2 this workflow',curUserId(), action));
            
            if(NW_UserWorkflowAction.NW_UserGroup == NW_UserGroup::Group)
            {
                UserGroupList UserGroupList;
                select UserGroupList
                where UserGroupList.userId == curUserId()
                && UserGroupList.groupId == NW_UserWorkflowAction.UserGroup;
                if(UserGroupList)
                {
                    throw error(strFmt('This user %1 not able to %2 this workflow',curUserId(), action));
                }
            }
        }

        next dispatchWorkItemAction( _workItem,
                                     _comment,
                                    _toUser,
                                    _workItemActionType,
                                    _menuItemName,
                                    _queueName );
        
    }

}


// for submit only
[ExtensionOf(classStr(Workflow))]
final class NW_Workflow_Proc_Extension
{
    public static server WorkflowCorrelationId activateFromWorkflowType(workflowTypeName _workflowTemplateName,
                                                                    recId _recId,
                                                                    WorkflowComment _initialNote,
                                                                    NoYes _activatingFromWeb,
                                                                    WorkflowUser _submittingUser)
    {
        NW_UserWorkflowAction NW_UserWorkflowAction;
        WorkflowTable  WorkflowTable;

        select NW_UserWorkflowAction join WorkflowTable where NW_UserWorkflowAction.SequenceNumber==WorkflowTable.SequenceNumber
            && WorkflowTable.TemplateName==_workflowTemplateName  && NW_UserWorkflowAction.NW_WFAction==NW_WFAction::Submit;
        if(NW_UserWorkflowAction)
        {
            if(NW_UserWorkflowAction.NW_UserGroup == NW_UserGroup::User)
                throw error(strFmt('This user %1 not able to submit this workflow',_submittingUser));
            else
            {
                UserGroupList UserGroupList;
                select UserGroupList where UserGroupList.userId==_submittingUser && UserGroupList.groupId==NW_UserWorkflowAction.UserGroup;
                if(UserGroupList)
                {
                    throw error(strFmt('This user %1 not able to submit this workflow',_submittingUser));
                }
            }
        
        }
 
      
        WorkflowCorrelationId ret = next activateFromWorkflowType(  _workflowTemplateName,
                                                                    _recId,
                                                                    _initialNote,
                                                                    _activatingFromWeb,
                                                                    _submittingUser);
        return ret; 
    }

}
<script type="text/javascript">
  document.addEventListener('DOMContentLoaded', function () {
    var link = document.getElementById('exit-intent-popup-trigger');


    function handleClick(e) {
      e.preventDefault();
    }


    link.addEventListener('click', handleClick);


    function triggerClick() {
      link.click();
      sessionStorage.setItem('eventTriggered', 'true');
    }

    // בדיקה האם המכשיר הוא נייד
    var isMobile = /Mobi|Android/i.test(navigator.userAgent);

    if (isMobile) {

      if (sessionStorage.getItem('eventTriggered') !== 'true') {
        setTimeout(triggerClick, 8000); 
      }
    } else {

      document.addEventListener('mousemove', function(e) {
        if (sessionStorage.getItem('eventTriggered') !== 'true') {
 
          if (e.clientY < 45) {
            triggerClick();
            document.removeEventListener('mousemove', arguments.callee);
            sessionStorage.setItem('eventTriggered', 'true');  
          }
        }
      });
    }
  });
</script>
var email = new GlideEmailOutbound();
email.setSubject('Who's gonna win?');
email.setBody('ChatGPT vs BARD');
email.addRecipient('vikram@example.com');
email.save();
<img alt="" src="images/2024/02/160224_Infinite_Elite_E_AppHeroImage_W750xH489px.jpg?$staticlink$" />
<img alt="" src="2024/03/0703_Infinite_Elite_E_AppHeroImage_W750xH489px.jpg?$staticlink$" />
<img alt="" src="images/2024/02/020224_New_Arrivals_E_AppHeroImage_W750xH489px.jpg?$staticlink$" />
position: -webkit-sticky; //Safari
position: sticky;
top: 162px;
wp.domReady(function () {
	wp.blocks.registerBlockStyle('core/button', {
		name: 'with-arrow',
		label: 'With Arrow',
	});
	wp.blocks.registerBlockStyle('core/button', {
		name: 'link-btn',
		label: 'Link Btn',
	});
  	wp.blocks.registerBlockStyle('core/list', {
		name: 'check',
		label: 'check mark',
	});
});
constructor(element) {
		this.$element = $(element);
		this.$slider = this.$element.find('.team-carousel__slider');

		this.init();
	}

	init() {
		const itemCount = this.$slider.find('.team-carousel__slider-item').length;
		if (itemCount > 4) {
			this.$slider.addClass('owl-carousel');
			this.$slider.owlCarousel({
				margin: 30,
				center: false,
				autoplay: true,
				autoplaySpeed: 2000,
				autoplayHoverPause: true,
				responsiveClass: true,
				items: 1,
				navText: [
					'<a class="arrow-left" aria-hidden="true"></a>',
					'<a class="arrow-right" aria-hidden="true"></a>',
				],
				responsive: {
					576: {
						items: 1,
					},
					789: {
						items: 2,
					},
					992: {
						items: 3,
					},
					1199: {
						items: 4,
					},
				},
			});
		} else if (itemCount <= 4) {
			this.$slider.removeClass('owl-carousel');
		} else {
			this.$slider.removeClass('owl-carousel');
		}
	}

//$(document).ready(function () {
// 	var $landingMasthead = $('[data-landing-masthead]');
// 	if ($landingMasthead.children().length > 1) {
// 		$landingMasthead.owlCarousel({
// 			loop: false,
// 			nav: true,
// 			dots: true,
// 			animateIn: true,
// 			responsiveClass: true,
// 			items: 1,
// 			navText: [
// 				'<a class="arrow-left" aria-hidden="true"></a>',
// 				'<a class="arrow-right" aria-hidden="true"></a>',
// 			],
// 		});
// 	} else {
// 		$landingMasthead.removeClass('owl-carousel');
// 	}
// });
star

Thu Apr 04 2024 19:01:17 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c #nook #sprite

star

Thu Apr 04 2024 18:55:58 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c #nook #gameplay

star

Thu Apr 04 2024 18:50:23 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c #nook #ui #menu

star

Thu Apr 04 2024 18:46:25 GMT+0000 (Coordinated Universal Time) https://www.joseespitia.com/2015/12/29/search-for-uninstall-strings/#more-203

@D_GEIGER

star

Thu Apr 04 2024 18:44:13 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c #mesh #sprite #nook

star

Thu Apr 04 2024 18:39:31 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c #audio

star

Thu Apr 04 2024 18:15:40 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/42963661/use-powershell-to-search-for-string-in-registry-keys-and-values

@D_GEIGER

star

Thu Apr 04 2024 17:09:21 GMT+0000 (Coordinated Universal Time) http://34.74.16.180:3000/question#eyJkYXRhc2V0X3F1ZXJ5Ijp7InR5cGUiOiJuYXRpdmUiLCJuYXRpdmUiOnsiY29sbGVjdGlvbiI6ImRpZXRMaWJyYXJ5IiwicXVlcnkiOiJbXHJcbiAgICB7XHJcbiAgICAgICAgXCIkbWF0Y2hcIjoge1xyXG4gICAgICAgICAgICBcIiRleHByXCI6IHtcclxuICAgICAgICAgICAgICAgIFwiJG5lXCI6IFtcIiRmb29kU3RhdHVzXCIsIFwiQVBQUk9WRURcIl1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0sXHJcbiAgICB7XHJcbiAgICAgICAgXCIkbG9va3VwXCI6IHtcclxuICAgICAgICAgICAgXCJmcm9tXCI6IFwibWFzdGVybWVhbHBsYW5cIixcclxuICAgICAgICAgICAgXCJsb2NhbEZpZWxkXCI6IFwiZGlzaFZhcmlhdGlvblwiLFxyXG4gICAgICAgICAgICBcImZvcmVpZ25GaWVsZFwiOiBcIm1lYWxQbGFuLmRpc2hWYXJpYXRpb25cIixcclxuICAgICAgICAgICAgXCJhc1wiOiBcIm1lYWxEYXRhXCJcclxuICAgICAgICB9XHJcbiAgICB9LFxyXG4gICAge1xyXG4gICAgICAgIFwiJG1hdGNoXCI6IHtcclxuICAgICAgICAgICAgXCIkZXhwclwiOiB7XHJcbiAgICAgICAgICAgICAgICBcIiRndFwiOiBbeyBcIiRzaXplXCI6IFwiJG1lYWxEYXRhXCIgfSwgMF1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0sXHJcbiAgICB7XHJcbiAgICAgICAgXCIkcHJvamVjdFwiOiB7XHJcbiAgICAgICAgICAgIFwibWVhbERhdGFcIjogXCIkbWVhbERhdGEucGxhbk5hbWVcIixcclxuICAgICAgICAgICAgXCJkaXNoVmFyaWF0aW9uXCI6IDFcclxuICAgICAgICB9XHJcbiAgICB9XHJcbl1cclxuIiwidGVtcGxhdGUtdGFncyI6e319LCJkYXRhYmFzZSI6Mn0sImRpc3BsYXkiOiJ0YWJsZSIsInZpc3VhbGl6YXRpb25fc2V0dGluZ3MiOnt9fQ==

@CodeWithSachin #aggregation #mongodb #$push #exp

star

Thu Apr 04 2024 17:06:42 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/repair-a-windows-image?view

@dw

star

Thu Apr 04 2024 16:21:11 GMT+0000 (Coordinated Universal Time) https://www.a7la-home.com/sv/how-to-clean-windows-registry/

@dw

star

Thu Apr 04 2024 12:41:58 GMT+0000 (Coordinated Universal Time)

@hiimsa #java

star

Thu Apr 04 2024 12:36:25 GMT+0000 (Coordinated Universal Time)

@imran1701

star

Thu Apr 04 2024 12:25:29 GMT+0000 (Coordinated Universal Time) https://github.com/iamnicolecurry/Minecraft-Block-Path-Finder

@allanbennatt #html #css #javascript

star

Thu Apr 04 2024 11:59:28 GMT+0000 (Coordinated Universal Time) https://darkwebmarketbuyer.com/product/saypha-volume-lidocaine-1ml/

@darkwebmarket

star

Thu Apr 04 2024 11:13:42 GMT+0000 (Coordinated Universal Time)

@sunnywhateverr

star

Thu Apr 04 2024 10:50:01 GMT+0000 (Coordinated Universal Time)

@HiTsH987

star

Thu Apr 04 2024 06:47:48 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v=cR076bIizcc&ab_channel=CodingComics

@codeing

star

Thu Apr 04 2024 01:37:52 GMT+0000 (Coordinated Universal Time)

@davidmchale #react #form #state

star

Thu Apr 04 2024 01:28:36 GMT+0000 (Coordinated Universal Time)

@davidmchale #javascript #reduce #counting

star

Thu Apr 04 2024 01:24:13 GMT+0000 (Coordinated Universal Time)

@davidmchale #javascript #sorting

star

Thu Apr 04 2024 01:13:32 GMT+0000 (Coordinated Universal Time)

@mry2khuu #c++ #c

star

Wed Apr 03 2024 23:48:09 GMT+0000 (Coordinated Universal Time)

@davidmchale #javascript #transitionend

star

Wed Apr 03 2024 23:46:07 GMT+0000 (Coordinated Universal Time)

@davidmchale #javascript #ternary

star

Wed Apr 03 2024 21:42:26 GMT+0000 (Coordinated Universal Time)

@azariel #glsl

star

Wed Apr 03 2024 21:21:00 GMT+0000 (Coordinated Universal Time) https://codepen.io/pen/tour/welcome/start

@viv #undefined

star

Wed Apr 03 2024 20:05:18 GMT+0000 (Coordinated Universal Time) https://livewire.laravel.com/docs/events#listening-for-dynamic-event-names

@xsirlalo

star

Wed Apr 03 2024 18:09:28 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/sv-SE/troubleshoot/windows-client/application-management/dotnet-framework-35-installation-error

@dw

star

Wed Apr 03 2024 18:09:03 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/sv-SE/troubleshoot/windows-client/application-management/dotnet-framework-35-installation-error

@dw

star

Wed Apr 03 2024 17:09:31 GMT+0000 (Coordinated Universal Time)

@Dasaju

star

Wed Apr 03 2024 15:28:55 GMT+0000 (Coordinated Universal Time)

@therix

star

Wed Apr 03 2024 13:05:43 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #jquery

star

Wed Apr 03 2024 10:40:47 GMT+0000 (Coordinated Universal Time) https://www.tutorialspoint.com/execute_lua_online.php

@Picksterpicky

star

Wed Apr 03 2024 10:29:59 GMT+0000 (Coordinated Universal Time) https://make.powerapps.com/

@Jotab

star

Wed Apr 03 2024 05:59:17 GMT+0000 (Coordinated Universal Time) https://voice.google.com/u/0/blocked

@gurjar

star

Wed Apr 03 2024 04:43:31 GMT+0000 (Coordinated Universal Time) https://tripleten.com/trainer/web/lesson/16d932f2-afa2-402e-baec-5a1c4cde611e/

@Marcelluki

star

Wed Apr 03 2024 03:35:59 GMT+0000 (Coordinated Universal Time) https://tripleten.com/trainer/web/lesson/16d932f2-afa2-402e-baec-5a1c4cde611e/

@Marcelluki

star

Wed Apr 03 2024 03:21:23 GMT+0000 (Coordinated Universal Time) https://tripleten.com/trainer/web/lesson/f5b3fe78-9d47-4f7f-99aa-8bfe4e5b6d08/task/582bae1b-d674-4a7b-b8ad-6e0183291e38/

@Marcelluki

star

Wed Apr 03 2024 02:59:12 GMT+0000 (Coordinated Universal Time) https://tripleten.com/trainer/web/lesson/5a7ece90-3515-44f8-b301-408293a691f8/

@Marcelluki

star

Wed Apr 03 2024 02:53:49 GMT+0000 (Coordinated Universal Time) https://tripleten.com/trainer/web/lesson/5a7ece90-3515-44f8-b301-408293a691f8/

@Marcelluki

star

Wed Apr 03 2024 00:41:23 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Wed Apr 03 2024 00:18:46 GMT+0000 (Coordinated Universal Time)

@lbrand #chordpro #songbookapp

star

Tue Apr 02 2024 15:06:46 GMT+0000 (Coordinated Universal Time)

@pvignesh

star

Tue Apr 02 2024 14:53:34 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/69797806/code-style-issues-found-in-the-above-files-forgot-to-run-prettier

@yassshhh410

star

Tue Apr 02 2024 13:11:16 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Tue Apr 02 2024 12:16:59 GMT+0000 (Coordinated Universal Time)

@eliranbaron102 #javascript

star

Tue Apr 02 2024 10:12:32 GMT+0000 (Coordinated Universal Time) https://github.com/zhmur/servicenow-guides/blob/master/Dirty hacks.md

@felipems

star

Tue Apr 02 2024 10:11:58 GMT+0000 (Coordinated Universal Time)

@ayhamsss

star

Tue Apr 02 2024 07:14:34 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #css

star

Tue Apr 02 2024 07:09:59 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #jquery #js

star

Tue Apr 02 2024 06:59:20 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #jquery #js

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension