beginner – C# Console, Connect 4 Game

this is my second post here, and the second project I made. I wanted to know, how to improve my code of connect-4 made in c# for console.

using System;

namespace Connect_4
{
    class Program
    {
        // computer's board, that computer checks if someone wins
        static string() BoardColumn1 = { "a", "b", "c", "d", "e", "f" };
        static string() BoardColumn2 = { "g", "h", "i", "j", "k", "l" };
        static string() BoardColumn3 = { "m", "n", "p", "p", "q", "r" };
        static string() BoardColumn4 = { "t", "u", "v", "w", "i", "y" };
        static string() BoardColumn5 = { "z", "1", "2", "3", "4", "5" };
        static string() BoardColumn6 = { "6", "7", "8", "9", "0", "(" };
        static string() BoardColumn7 = { ")", "-", "_ ", "+", "=", "}" };

        // what the user sees
        static string() UserBoardColumn1 = { " ", " ", " ", " ", " ", " " };
        static string() UserBoardColumn2 = { " ", " ", " ", " ", " ", " " };
        static string() UserBoardColumn3 = { " ", " ", " ", " ", " ", " " };
        static string() UserBoardColumn4 = { " ", " ", " ", " ", " ", " " };
        static string() UserBoardColumn5 = { " ", " ", " ", " ", " ", " " };
        static string() UserBoardColumn6 = { " ", " ", " ", " ", " ", " " };
        static string() UserBoardColumn7 = { " ", " ", " ", " ", " ", " " };

        static int turn = 0;
        static bool playing = true;

        static void Main(string() args)
        {
            Intro();

            while (playing) //stops the game once someone wins
            {
                Board(); 

                if (turn % 2 == 0) // tells whose turn it is
                {
                    Console.WriteLine("Player 1's turn");
                }
                else 
                {
                    Console.WriteLine("Player 2's turn");
                }

                int UserChoice;
                Console.WriteLine("Type the number you want your token to go in or type restart to restart"); //takes user input
                bool IsChoiceInt = int.TryParse(Console.ReadLine(), out UserChoice);

                if (IsChoiceInt) //checks if is correct input
                {
                    if (UserChoice == 1) // checks if someone wants to put the token in 1 and puts it there
                    {
                        int EmptyLocation = Array.IndexOf(UserBoardColumn1, " ");
                        if (EmptyLocation == -1)
                        {
                            Console.WriteLine("Stop trying to steal other people's places");
                            System.Threading.Thread.Sleep(2000);
                        }
                        else if (turn % 2 == 0)
                        {
                            turn++;
                            BoardColumn1(EmptyLocation) = "o";
                            UserBoardColumn1(EmptyLocation) = "o";
                        }
                        else
                        {
                            turn++;
                            BoardColumn1(EmptyLocation) = "x";
                            UserBoardColumn1(EmptyLocation) = "x";
                        }
                        Board();
                        VerticalWinCondition();
                        HorizontalWinCondition();
                        DiagonalWin();
                        IsTieGame();
                    }
                    else if (UserChoice == 2) // checks if someone wants to put the token in 2 and puts it there
                    {
                        int EmptyLocation = Array.IndexOf(UserBoardColumn2, " ");
                        if (EmptyLocation == -1)
                        {
                            Console.WriteLine("Stop trying to steal other people's places");
                            System.Threading.Thread.Sleep(2000);
                        }
                        else if (turn % 2 == 0)
                        {
                            turn++;
                            BoardColumn2(EmptyLocation) = "o";
                            UserBoardColumn2(EmptyLocation) = "o";
                        }
                        else
                        {
                            turn++;
                            BoardColumn2(EmptyLocation) = "x";
                            UserBoardColumn2(EmptyLocation) = "x";
                        }
                        Board();
                        VerticalWinCondition();
                        HorizontalWinCondition();
                        DiagonalWin();
                        IsTieGame();
                    }
                    else if (UserChoice == 3) // checks if someone wants to put the token in 3 and puts it there
                    {
                        int EmptyLocation = Array.IndexOf(UserBoardColumn3, " ");
                        if (EmptyLocation == -1)
                        {
                            Console.WriteLine("Stop trying to steal other people's places");
                            System.Threading.Thread.Sleep(2000);
                        }
                        else if (turn % 2 == 0)
                        {
                            turn++;
                            BoardColumn3(EmptyLocation) = "o";
                            UserBoardColumn3(EmptyLocation) = "o";
                        }
                        else
                        {
                            turn++;
                            BoardColumn3(EmptyLocation) = "x";
                            UserBoardColumn3(EmptyLocation) = "x";
                        }
                        Board();
                        VerticalWinCondition();
                        HorizontalWinCondition();
                        DiagonalWin();
                        IsTieGame();
                    }
                    else if (UserChoice == 4) // checks if someone wants to put the token in 4 and puts it there
                    {
                        int EmptyLocation = Array.IndexOf(UserBoardColumn4, " ");
                        if (EmptyLocation == -1)
                        {
                            Console.WriteLine("Stop trying to steal other people's places");
                            System.Threading.Thread.Sleep(2000);
                        }
                        else if (turn % 2 == 0)
                        {
                            turn++;
                            BoardColumn4(EmptyLocation) = "o";
                            UserBoardColumn4(EmptyLocation) = "o";
                        }
                        else
                        {
                            turn++;
                            BoardColumn4(EmptyLocation) = "x";
                            UserBoardColumn4(EmptyLocation) = "x";
                        }
                        Board();
                        VerticalWinCondition();
                        HorizontalWinCondition();
                        DiagonalWin();
                        IsTieGame();
                    }
                    else if (UserChoice == 5) // checks if someone wants to put the token in 5 and puts it there
                    {
                        int EmptyLocation = Array.IndexOf(UserBoardColumn5, " ");
                        if (EmptyLocation == -1)
                        {
                            Console.WriteLine("Stop trying to steal other people's places");
                            System.Threading.Thread.Sleep(2000);
                        }
                        else if (turn % 2 == 0)
                        {
                            turn++;
                            BoardColumn5(EmptyLocation) = "o";
                            UserBoardColumn5(EmptyLocation) = "o";
                        }
                        else
                        {
                            turn++;
                            BoardColumn5(EmptyLocation) = "x";
                            UserBoardColumn5(EmptyLocation) = "x";
                        }
                        Board();
                        VerticalWinCondition();
                        HorizontalWinCondition();
                        DiagonalWin();
                        IsTieGame();
                    }
                    else if (UserChoice == 6) // checks if someone wants to put the token in 6 and puts it there
                    {
                        int EmptyLocation = Array.IndexOf(UserBoardColumn6, " ");
                        if (EmptyLocation == -1)
                        {
                            Console.WriteLine("Stop trying to steal other people's places");
                            System.Threading.Thread.Sleep(2000);
                        }
                        else if (turn % 2 == 0)
                        {
                            turn++;
                            BoardColumn6(EmptyLocation) = "o";
                            UserBoardColumn6(EmptyLocation) = "o";
                        }
                        else
                        {
                            turn++;
                            BoardColumn6(EmptyLocation) = "x";
                            UserBoardColumn6(EmptyLocation) = "x";
                        }
                        Board();
                        VerticalWinCondition();
                        HorizontalWinCondition();
                        DiagonalWin();
                        IsTieGame();
                    }
                    else if (UserChoice == 7)// checks if someone wants to put the token in 7 and put it there
                    {
                        int EmptyLocation = Array.IndexOf(UserBoardColumn7, " ");
                        if (EmptyLocation == -1)
                        {
                            Console.WriteLine("Stop trying to steal other people's places");
                            System.Threading.Thread.Sleep(2000);
                        }
                        else if (turn % 2 == 0)
                        {
                            turn++;
                            BoardColumn7(EmptyLocation) = "o";
                            UserBoardColumn7(EmptyLocation) = "o";
                        }
                        else
                        {
                            turn++;
                            BoardColumn7(EmptyLocation) = "x";
                            UserBoardColumn7(EmptyLocation) = "x";
                        }
                        Board();
                        VerticalWinCondition();
                        HorizontalWinCondition();
                        DiagonalWin();
                        IsTieGame();
                    }
                    else if (UserChoice > 7 || UserChoice < 0) //error check
                    {
                        Console.WriteLine("Please input a valid number, the valid numbers are 1, 2, 3, 4, 5, 6, 7");
                        System.Threading.Thread.Sleep(2000);
                    }
                }
                else //error check
                {
                    Console.WriteLine("Please input a valid number, the valid numbers are 1, 2, 3, 4, 5, 6, 7");
                    System.Threading.Thread.Sleep(2000);
                }

            }
        }

        static void Board() //makes the board
        {
            Console.Clear();
            Console.WriteLine("  1   2   3   4   5   6   7");
            Console.WriteLine($"| {UserBoardColumn1(5)} | {UserBoardColumn2(5)} | {UserBoardColumn3(5)} | {UserBoardColumn4(5)} | {UserBoardColumn5(5)} | {UserBoardColumn6(5)} | {UserBoardColumn7(5)} |");
            Console.WriteLine($"| {UserBoardColumn1(4)} | {UserBoardColumn2(4)} | {UserBoardColumn3(4)} | {UserBoardColumn4(4)} | {UserBoardColumn5(4)} | {UserBoardColumn6(4)} | {UserBoardColumn7(4)} |");
            Console.WriteLine($"| {UserBoardColumn1(3)} | {UserBoardColumn2(3)} | {UserBoardColumn3(3)} | {UserBoardColumn4(3)} | {UserBoardColumn5(3)} | {UserBoardColumn6(3)} | {UserBoardColumn7(3)} |");
            Console.WriteLine($"| {UserBoardColumn1(2)} | {UserBoardColumn2(2)} | {UserBoardColumn3(2)} | {UserBoardColumn4(2)} | {UserBoardColumn5(2)} | {UserBoardColumn6(2)} | {UserBoardColumn7(2)} |");
            Console.WriteLine($"| {UserBoardColumn1(1)} | {UserBoardColumn2(1)} | {UserBoardColumn3(1)} | {UserBoardColumn4(1)} | {UserBoardColumn5(1)} | {UserBoardColumn6(1)} | {UserBoardColumn7(1)} |");
            Console.WriteLine($"| {UserBoardColumn1(0)} | {UserBoardColumn2(0)} | {UserBoardColumn3(0)} | {UserBoardColumn4(0)} | {UserBoardColumn5(0)} | {UserBoardColumn6(0)} | {UserBoardColumn7(0)} |");
            Console.WriteLine("-----------------------------");
        }
        static void VerticalWinCondition() //checks if someone won vertially
        {
            if (BoardColumn1(0) == BoardColumn1(1) && BoardColumn1(0) == BoardColumn1(2) && BoardColumn1(0) == BoardColumn1(3) || BoardColumn1(1) == BoardColumn1(2) && BoardColumn1(1) == BoardColumn1(3) && BoardColumn1(1) == BoardColumn1(4) || BoardColumn1(2) == BoardColumn1(3) && BoardColumn1(2) == BoardColumn1(4) && BoardColumn1(2) == BoardColumn1(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn2(0) == BoardColumn2(1) && BoardColumn2(0) == BoardColumn2(2) && BoardColumn2(0) == BoardColumn2(3) || BoardColumn2(1) == BoardColumn2(2) && BoardColumn2(1) == BoardColumn2(3) && BoardColumn2(1) == BoardColumn2(4) || BoardColumn2(2) == BoardColumn2(3) && BoardColumn2(2) == BoardColumn2(4) && BoardColumn2(2) == BoardColumn2(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn3(0) == BoardColumn3(1) && BoardColumn3(1) == BoardColumn3(2) && BoardColumn3(2) == BoardColumn3(3) || BoardColumn3(1) == BoardColumn3(2) && BoardColumn3(1) == BoardColumn3(3) && BoardColumn3(1) == BoardColumn3(4) || BoardColumn3(2) == BoardColumn3(3) && BoardColumn3(2) == BoardColumn3(4) && BoardColumn3(2) == BoardColumn3(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn4(0) == BoardColumn4(1) && BoardColumn4(1) == BoardColumn4(2) && BoardColumn4(0) == BoardColumn4(3) || BoardColumn4(1) == BoardColumn4(2) && BoardColumn4(1) == BoardColumn4(3) && BoardColumn4(1) == BoardColumn4(4) || BoardColumn4(2) == BoardColumn4(3) && BoardColumn4(2) == BoardColumn4(4) && BoardColumn4(2) == BoardColumn4(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn5(0) == BoardColumn5(1) && BoardColumn5(1) == BoardColumn5(2) && BoardColumn5(2) == BoardColumn5(3) || BoardColumn5(1) == BoardColumn5(2) && BoardColumn5(1) == BoardColumn5(3) && BoardColumn5(1) == BoardColumn5(4) || BoardColumn5(2) == BoardColumn5(3) && BoardColumn5(2) == BoardColumn5(4) && BoardColumn5(2) == BoardColumn5(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn6(0) == BoardColumn6(1) && BoardColumn6(1) == BoardColumn6(2) && BoardColumn6(2) == BoardColumn6(3) || BoardColumn6(1) == BoardColumn6(2) && BoardColumn6(1) == BoardColumn6(3) && BoardColumn6(1) == BoardColumn6(4) || BoardColumn6(2) == BoardColumn6(3) && BoardColumn6(2) == BoardColumn6(4) && BoardColumn6(2) == BoardColumn6(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn7(0) == BoardColumn7(1) && BoardColumn7(1) == BoardColumn7(2) && BoardColumn7(2) == BoardColumn7(3) || BoardColumn7(1) == BoardColumn7(2) && BoardColumn7(1) == BoardColumn7(3) && BoardColumn7(1) == BoardColumn7(4) || BoardColumn7(2) == BoardColumn7(3) && BoardColumn7(2) == BoardColumn7(4) && BoardColumn7(2) == BoardColumn7(5))
            {
                playing = false;
                Winner();
            }
        }
        static void HorizontalWinCondition() // checks if soemone won horizontally
        {
            if (BoardColumn1(0) == BoardColumn2(0) && BoardColumn1(0) == BoardColumn3(0) && BoardColumn1(0) == BoardColumn4(0))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn1(1) == BoardColumn2(1) && BoardColumn1(1) == BoardColumn3(1) && BoardColumn1(1) == BoardColumn4(1))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn1(2) == BoardColumn2(2) && BoardColumn1(2) == BoardColumn3(2) && BoardColumn1(2) == BoardColumn4(2))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn1(3) == BoardColumn2(3) && BoardColumn1(3) == BoardColumn3(3) && BoardColumn1(3) == BoardColumn4(3))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn1(4) == BoardColumn2(4) && BoardColumn1(4) == BoardColumn3(4) && BoardColumn1(4) == BoardColumn4(4))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn1(5) == BoardColumn2(5) && BoardColumn1(5) == BoardColumn3(5) && BoardColumn1(5) == BoardColumn4(5))
            {
                playing = false;
                Winner();
            }
        }
        static void DiagonalWin() //checks if a player won diagonally
        {
            if (BoardColumn1(0) == BoardColumn2(1) && BoardColumn1(0) == BoardColumn3(2) && BoardColumn1(0) == BoardColumn4(3) || BoardColumn1(1) == BoardColumn2(2) && BoardColumn1(1) == BoardColumn3(3) && BoardColumn1(1) == BoardColumn4(4) || BoardColumn1(2) == BoardColumn2(3) && BoardColumn1(2) == BoardColumn3(4) && BoardColumn1(2) == BoardColumn4(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn1(5) == BoardColumn2(4) && BoardColumn1(5) == BoardColumn3(3) && BoardColumn1(5) == BoardColumn4(2) || BoardColumn1(4) == BoardColumn2(3) && BoardColumn1(4) == BoardColumn3(2) && BoardColumn1(4) == BoardColumn4(1) || BoardColumn1(3) == BoardColumn2(2) && BoardColumn1(3) == BoardColumn3(1) && BoardColumn1(3) == BoardColumn4(0))
            {
                playing = false;
                Winner();
            }

            else if (BoardColumn2(0) == BoardColumn3(1) && BoardColumn2(0) == BoardColumn4(2) && BoardColumn2(0) == BoardColumn5(3) || BoardColumn2(1) == BoardColumn3(2) && BoardColumn2(1) == BoardColumn4(3) && BoardColumn2(1) == BoardColumn5(4) || BoardColumn2(2) == BoardColumn3(3) && BoardColumn4(2) == BoardColumn2(4) && BoardColumn2(2) == BoardColumn5(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn2(5) == BoardColumn3(4) && BoardColumn2(5) == BoardColumn4(3) && BoardColumn2(5) == BoardColumn5(2) || BoardColumn2(4) == BoardColumn3(3) && BoardColumn2(4) == BoardColumn4(2) && BoardColumn2(4) == BoardColumn5(1) || BoardColumn2(3) == BoardColumn3(2) && BoardColumn4(3) == BoardColumn2(1) && BoardColumn2(3) == BoardColumn5(0))
            {
                playing = false;
                Winner();
            }

            else if (BoardColumn3(0) == BoardColumn4(1) && BoardColumn3(0) == BoardColumn5(2) && BoardColumn3(0) == BoardColumn6(3) || BoardColumn3(1) == BoardColumn4(2) && BoardColumn3(1) == BoardColumn5(3) && BoardColumn3(1) == BoardColumn6(4) || BoardColumn3(2) == BoardColumn4(3) && BoardColumn3(2) == BoardColumn5(4) && BoardColumn3(2) == BoardColumn6(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn3(5) == BoardColumn4(4) && BoardColumn3(5) == BoardColumn5(3) && BoardColumn3(5) == BoardColumn6(2) || BoardColumn3(4) == BoardColumn4(3) && BoardColumn3(4) == BoardColumn5(2) && BoardColumn3(4) == BoardColumn6(1) || BoardColumn3(3) == BoardColumn4(2) && BoardColumn3(3) == BoardColumn5(1) && BoardColumn3(3) == BoardColumn6(0))
            {
                playing = false;
                Winner();
            }

            else if (BoardColumn4(0) == BoardColumn5(1) && BoardColumn4(0) == BoardColumn6(2) && BoardColumn4(0) == BoardColumn7(3) || BoardColumn4(1) == BoardColumn5(2) && BoardColumn4(1) == BoardColumn6(3) && BoardColumn4(1) == BoardColumn7(4) || BoardColumn4(2) == BoardColumn5(3) && BoardColumn4(2) == BoardColumn6(4) && BoardColumn4(2) == BoardColumn7(5))
            {
                playing = false;
                Winner();
            }
            else if (BoardColumn4(5) == BoardColumn5(4) && BoardColumn4(5) == BoardColumn6(3) && BoardColumn4(5) == BoardColumn7(2) || BoardColumn4(4) == BoardColumn5(3) && BoardColumn4(4) == BoardColumn6(2) && BoardColumn4(4) == BoardColumn7(1) || BoardColumn4(3) == BoardColumn5(2) && BoardColumn4(3) == BoardColumn6(1) && BoardColumn4(3) == BoardColumn7(0))
            {
                playing = false;
                Winner();
            }
        }

        static void IsTieGame() //checks if game is tie
        {
            int TieCheker1 = Array.IndexOf(UserBoardColumn1, " ");
            int TieCheker2 = Array.IndexOf(UserBoardColumn2, " ");
            int TieCheker3 = Array.IndexOf(UserBoardColumn3, " ");
            int TieCheker4 = Array.IndexOf(UserBoardColumn4, " ");
            int TieCheker5 = Array.IndexOf(UserBoardColumn5, " ");
            int TieCheker6 = Array.IndexOf(UserBoardColumn6, " ");
            int TieCheker7 = Array.IndexOf(UserBoardColumn7, " ");

            if (TieCheker1 == -1 && TieCheker2 == -1 && TieCheker3 == -1 && TieCheker4 == -1 && TieCheker5 == -1 && TieCheker6 == -1 && TieCheker7 == -1)
            {
                playing = false;
                Tie();
            }
        }

        static void Intro() //Intro
        {
            Console.WriteLine("Welcome to");
            Console.WriteLine(@"  ______   ______   .__   __. .__   __.  _______   ______ .___________.    _  _    ");
            Console.WriteLine(@" /      | /  __    |   |  | |   |  | |   ____| /      ||           |   | || |   ");
            Console.WriteLine(@"|  ,----'|  |  |  | |   |  | |   |  | |  |__   |  ,----'`---|  |----`   | || |_  ");
            Console.WriteLine(@"|  |     |  |  |  | |  . `  | |  . `  | |   __|  |  |         |  |        |__   _| ");
            Console.WriteLine(@"|  `----.|  `--'  | |  |   | |  |   | |  |____ |  `----.    |  |           | |   ");
            Console.WriteLine(@" ______| ______/  |__| __| |__| __| |_______| ______|    |__|           |_|   ");
            Console.WriteLine("nPress a Key to begin");
            Console.ReadKey();
            Console.Clear();
            Rules();
        }
        static void Rules() //Rules
        {
            Console.WriteLine("How to Play:");
            Console.WriteLine("1. Choose who plays first. Player 1 will be 'o' and Player 2 will be 'x'");
            Console.WriteLine("2. Player's will alternate taking turns on putting their token in the board. You will put your token in the board by typing in the number at the top of the column you wish to put it in.  ");
            Console.WriteLine("3. The first player to get 4 tokens in a row wins. The four in a row can be horizontal, vertical or diagonal");
            Console.WriteLine("nPress a Key to begin");
            Console.ReadKey();
        }
        static void Winner() //message when player wins game
        {
            if (turn % 2 == 0)
            {
                Console.WriteLine("Congrats on winning player 2");
            }
            else
            {
                Console.WriteLine("Congrats on winning player 1");
            }
        }
        static void Tie() //message when tie game
        {
            Console.WriteLine("The game is a tie");
        }
    }
}

console application – Como fazer fetch no react native com api de um site php no infinityfree

Saudaçoes pessoal, tenho um problema com o meu app, estava usando fetch no localhost com php e tudo dava certo, quando fiz a build do apk e passei todos os arquivos pra o servidor online, troquei o link que usava no fetch pra o link do meu site, agora me retorna um erro algo como: unexpected json parse token ‘<‘, alguem sabe o que se passa?

fetch();

javascript – Utilizar document.cookie fora do console

Olá queria acessar o site da nike.com.br para pegar os cookies do mesmo, tentei com o request do node porém ele não me retornou todos os cookies que eu necessitava, foram retornado apenas:

[
    "ak_bmsc=40234615460979E34DF9EA5B2A45AC770210BCE58B200000662840608D91AF74~plbodrC6dMHSrOWvLyaDM7ajlNsSF8/iFhzlk7YLuUL5M1DpU04UUyJcSCNPKnWuqxAzh+Chl0/ovmc2gwSrI1k+iuQbWEtgAs94Hs029Du0WtYWdPgO/D9SDFsl+OziDHZzPmB67VYSorvxVjw0ndRErwd7FdifXKE+KOyaxuc82UjunwisLjICpNFRO649XfN3p0nR7sDWAky8CoMdgYHZIC59mXsGrivrsBiVED04g=; expires=Thu, 04 Mar 2021 02:23:02 GMT; max-age=7200; path=/; domain=.nike.com.br; HttpOnly",
    "bm_sz=7486F5720D66B3542ED5D0E5A8C22CD0~YAAQ5bwQAqK4OLZ3AQAAZ9Cd+gtCH6YB67J8ICd5ga/27rEMfj1Gu/D9J/LWk9jRQkEMiyU6Z9fcaWiCuH4nCmz91t+R2x3Mr/d0ejpWfgBkXvx+ROkfLe3XNmJbmUADGY9xGhZzoyTFtNffh2IvpSnNKHnaKUwsXD6kARO+ScQjv613ssu6id6juzmuMyi0tdgyqa95eS48xYwj3x+51ly1tUfXLWT4A0T2FZ9MvOwAbayPgY8WUWwWFyud61qP0eODn8vv9qk1a0Y+nWisee4=; Domain=.nike.com.br; Path=/; Expires=Thu, 04 Mar 2021 04:23:02 GMT; Max-Age=14400; HttpOnly",
    "_abck=640CAB3E7D50A1377B3E5C2FE8DB95A9~-1~YAAQ5bwQAqO4OLZ3AQAAZ9Cd+gWZWnTrQno2UMA9fkq+C7SaJr6KZCwDr8G2CO4xvWVlEZS4xm7PPvUqPy8TuugEkyqQ5k+3Xqo1M4aQKH95xW6GwF7m6W0GBjJdykpeJ9hmkLVTFmRfLCxoEGmximZbY+btoBlLmYMPEwIZoVzq+eacD80ChSln1wX6q8wQBIdIZ2DXmal45LIN+KaA7IP2hshrgwHvyoBsqfLSMjNopSmoswq+FDgExGqJzMYf4ht7ANIek4gO2EyNwHIu/qRzUTtDh2xFQMvvfW0CDQsOwfvltSlekbZkVD3IHfKn0GaQVVnHnCPxOPFmWehyLQMPl74H~-1~-1~-1; Domain=.nike.com.br; Path=/; Expires=Fri, 05 Mar 2021 00:23:02 GMT; Max-Age=86400; Secure",
]

O cookie que eu realmente precisava seria o visitData, reparei que quando entro no site e digito no console document.cookie é me retornado muito mais cookies, porém não sei nenhuma maneira de utilizar esse comando para receber esse resultado que tive no console e poder trabalhar com ele.

Podem me ajudar?

rich snippets – SoftwareApplication and WebApplication structured data not shown in search console enhancements

I have a pricing page with SoftwareApplication structured data that has a sub-type of WebApplication set. The structured data rendered properly and saved to indexed page content.

But I see only these enhancements at Search Console:

  • Core Web Vitals
  • Mobile Usability
  • Breadcrumbs
  • FAQ

Is there way to include SoftwareApplication/WebApplication into enhancements section of Google Search Console?

rich snippets – SoftwareApplication/WebApplication not shown in search console enhancements

I have a pricing page with SoftwareApplication that have sub-type of WebApplication set. Structured data rendered properly and saved to indexed page content.
But I see only these enhancements at Search Console:

  • Core Web Vitals
  • Mobile Usability
  • Breadcrumbs
  • FAQ

Is there way to include SoftwareApplication/WebApplication into enhancements section of Google Search Console?

How to link new Google Analytics (version 4) property with Search Console?

I just created the other day a Google Analytics property for a new website, and it was created using the new Analytics version (v4). Now I’m trying to link it to my existing Search Console account for that website, but cannot find a way to do so. I go to “Admin” / “Property” / “Product linking”, and I don’t see Search Console there:

Google Analytics setup

How can I link them both? Or… is it necessary at all with the new Google Analytics? Does it have other features that make up for it?

c# – .net core console app suggestions

I have a .net core console app that gets some data from an external API and inserts it into a SQL database table. It is working as expected but I wonder if you guys have any suggestions to make it more maintainable, testable, robust, and dynamic. By the way, I will add logging when getting data from API, inserting it into the database and when gets exceptions.

Here is the code:

class Program
    {
        static async Task Main(string() args)
        {
                           
            var builder = new HostBuilder()
                .ConfigureServices((hostContext, services) =>
                {
                    //Setting up API Client
                    services.AddHttpClient("OrdersClient", client =>
                    {
                        client.BaseAddress =
                            new Uri("https://test/282675/orders?status=Created");

                        client.DefaultRequestHeaders.Add("Accept", "application/json");
                    });

                    services.AddSingleton<IHostedService, BusinessService>();

                    //Setting up app settings configuration
                    var config = LoadConfiguration();    
                    services.AddSingleton(config);
                });

            await builder.RunConsoleAsync();
       
        public static IConfiguration LoadConfiguration()
        {
            var builder = new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);

            return builder.Build();
        }
    }

public class BusinessService : IHostedService
    {
        private IHttpClientFactory _httpClientFactory;
        private readonly IHostApplicationLifetime _applicationLifetime;
        private IConfiguration _configuration;
        public BusinessService(IHttpClientFactory httpClientFactory, IHostApplicationLifetime applicationLifetime, IConfiguration configuration)
        {
            _httpClientFactory = httpClientFactory;
            _applicationLifetime = applicationLifetime;
            _configuration = configuration;
        }

        public async Task StartAsync(CancellationToken cancellationToken)
        {
            await MakeRequestsToRemoteService();
            //Stop Application
            _applicationLifetime.StopApplication();
        }

        public async Task MakeRequestsToRemoteService()
        {
            HttpClient httpClient = _httpClientFactory.CreateClient("OrdersClient");

            var authenticationBytes = Encoding.ASCII.GetBytes("test:1234");

            httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
                Convert.ToBase64String(authenticationBytes));
            httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

            var response = await httpClient.GetAsync("https://test/282675/orders?startDate=1612126800000");
            Console.WriteLine(DateTime.Now);

            if (response.IsSuccessStatusCode)
            {
                Root orders = await response.Content.ReadAsAsync<Root>();

                if (orders.Content.Count > 0)
                {
                    foreach (var content in orders.Content)
                    {
                        Console.Write(content.CustomerId + " " + content.CustomerFirstName + " " + content.CustomerLastName + " " + content.CustomerEmail +" " + content.TotalPrice + " "+ content.InvoiceAddress.Phone + " " + content.Lines(0).ProductCode + " " +content.Lines(0).ProductName );
                        InsertData(content);
                    }
                }

            }
            
            
        }

        public void InsertData(Content content)
        {
           
            
            string connString = _configuration("ConnectionStrings:Development");
            using (SqlConnection sqlConnection = new SqlConnection(connString))
            {
                sqlConnection.Open();

                using (SqlCommand command = new SqlCommand())
                {
                    command.Connection = sqlConnection;
                    string sql = @"insert into Orders (id, customerId, firstName, lastName, phone, productCode, productName, price, orderDate, status) values (@id, @customerId, @firstName, @lastName, @phone, @productCode, @productName, @price, @orderDate, @status)";
                    command.CommandText = sql;
                    command.Parameters.Clear();
                    
                    try
                    {
                        command.Parameters.Add("id", SqlDbType.BigInt).Value = content.Id;
                        command.Parameters.Add("customerId", SqlDbType.Int).Value = content.CustomerId;
                        command.Parameters.Add("firstName", SqlDbType.VarChar).Value = content.CustomerFirstName;
                        command.Parameters.Add("lastName", SqlDbType.VarChar).Value = content.CustomerLastName;
                        command.Parameters.Add("phone", SqlDbType.VarChar).Value = content.InvoiceAddress.Phone;
                        command.Parameters.Add("productCode", SqlDbType.Int).Value = content.Lines(0).ProductCode;
                        command.Parameters.Add("productName", SqlDbType.VarChar).Value = content.Lines(0).ProductName;
                        command.Parameters.Add("price", SqlDbType.Float).Value = content.TotalPrice;
                        command.Parameters.Add("orderDate", SqlDbType.BigInt).Value = content.OrderDate;
                        command.Parameters.Add("status", SqlDbType.TinyInt).Value = 1; //Retrieved

                        command.ExecuteNonQuery();
                    }
                    catch (SqlException exception)
                    {
                        if (exception.Number == 2627) // Cannot insert duplicate key row in object error
                        {
                            Console.WriteLine("Duplicates...");
                        }
                        else
                            throw; // Throw exception if this exception is unexpected
                    }
                }
            }
        }

        public Task StopAsync(CancellationToken cancellationToken)
        {
            return Task.CompletedTask;
        }
    }

My .htaccess causes ‘redirect error’ in Search Console, or a bug?

I’m having an issue with Search Console. It seems it can’t redirect my pages properly, so in Coverage it returns some ‘redirect errors‘ when it shouldn’t.

Let’s say the link: https://example.com/name

Browsers redirect to: https://example.com/name/

Search Console cannot do that, because it shows a persistent ‘redirect errors‘.

If we assume that it’s a bug in Search Console, we would try to deindex pages that are not cannonical. What result we get? Now Search Console redirects to the canonincal one, so it deindexes the good one!!! My site is Domain property, where there are more ‘redirect errors‘.

This is my .htaccess:

# Redirect HTTP to HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} (R=301,L)
</IfModule>

# Remove www subdomain
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.(.*)$ (NC)
RewriteRule ^(.*)$ https://%1/$1 (R=301,L)
</IfModule>

# Remove index.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.html$ / (R=301,L)
RewriteRule ^(.*)/index.html$ /$1 (R=301,L)
</ifModule>

# Remove multiple slashes from URL
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} s(^?)*//
RewriteRule ^.*$ /$0 (R=301,L,NE)
</ifModule>

<IfModule mod_mime.c>
    AddType font/otf otf
    AddType font/ttf ttf
    AddType font/woff woff
    AddType font/woff2 woff2
    AddType application/vnd.ms-fontobject eot
    AddType image/svg+xml svg svgz
</ifModule>

<ifModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jp2                     "access plus 1 year"
    ExpiresByType image/gif                     "access plus 1 year"
    ExpiresByType image/png                     "access plus 1 year"
    ExpiresByType text/css                      "access plus 1 year"
    ExpiresByType application/pdf               "access plus 1 year"
    ExpiresByType text/javascript               "access plus 1 year"
    ExpiresByType application/javascript        "access plus 1 year"
    ExpiresByType font/otf                      "access plus 1 year"
    ExpiresByType font/ttf                      "access plus 1 year"
    ExpiresByType font/woff                     "access plus 1 year"
    ExpiresByType font/woff2                    "access plus 1 year"
    ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
    ExpiresByType image/svg+xml                 "access plus 1 year"
    ExpiresDefault                              "access plus 1 month"
    <IfModule mod_headers.c>
        Header append Cache-Control "public"
    </IfModule>
</ifModule>

# Allow access from all domains for web fonts
<IfModule mod_headers.c>
    <FilesMatch ".(eot|font.css|otf|ttf|woff|woff2)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

Header set Strict-Transport-Security: max-age=31536000

# Reduce MIME type security risks
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
</IfModule>

# Server-side technology information
<IfModule mod_headers.c>
    Header unset X-Powered-By
</IfModule>

# Server software information
ServerSignature Off

# Disallow usage in an embed code. Items must be hyperlinked
<IfModule mod_headers.c>
    Header set X-Frame-Options: DENY
</IfModule>

# XSS protection
<IfModule mod_headers.c>
    Header set X-XSS-Protection "1; mode=block"
</IfModule>

# Set the referrer policy
<IfModule mod_headers.c>
    Header always set Referrer-Policy "no-referrer-when-downgrade "
</IfModule>

# This is for gzip, which compresses files
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/shtml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

Is there something wrong? Do I have too many redirects? Is it a Search Console bug? Please check my config.

The same happens with http URLs, returning an “error redirection” when it should find the https version.

My site is build with Jekyll.

How to solve error of referring page in google search console?

I am getting the same issue in my Website-there are 3 pages link showing in referring pages under the Coverage section. Kindly guide me if it’s helpful for SEO. If not plz suggest to me how can I remove this. This type of error is showing on every page of my website Padmashali

c++ – SImple pet caring game – console

I’m a beginner programmer and i’m looking for interesting projects to improve my low skills. I tried one day to improve my skills by trying to create a small game in which a user owns a cat, and has to feed it and clean it. My main aim of the game(which yet has many illogical things like the never decreasing happiness and cleanness level) was to try and keep my code as clean and presentable as possible. The game is made in 4 different files, and I will paste them all below. I will be happy if anyone could give me help on understanding where should I improve.

Lets go into the code:

main.cpp

#include "Cat.h"
#include "pet game.h"
#include <iostream>
using namespace std;

int main() {
    //Create the user's profile
    //User();

    //Welcome messages
    cout
            << "Welcome to Unga bonga! Here you buy pets and raise them as your kids, and try to level up, in order to finish the game!"
            << endl;
    showHelp();

    //Command execution
    do {
        commandIdentify();
    } while (true);
}
Cat cat;
//User user;

void showHelp() {
    cout << "The commands in this game are:" << endl
            << "1. to feed your cat, type f" << endl
            << "2. to clean your cat, type c" << endl
            << "3. to check your cat's happiness, type h" << endl
            << "4. to check your cash balance, type m" << endl
            << "5. to check your level status, type l" << endl
            << "6. to display this help message, type ?" << endl
            << "7. to exit, type e" << endl
            << "8. Finally, to play this game, enjoy!" << endl;
}
    
void commandIdentify() {
    //take input
    cin >> command;
    //identify and execute
    switch (command) {
    case 'f':
        feedCat();
        break;
    case 'c':
        cleanCat();
        break;
        case 'h':
         checkHappiness();
         break;
    case '?':
        showHelp();
        break;
    case 'e':
        exit();
    default:
        cout << "That's not a command -yet (probably)" << endl;
    }
}

void feedCat() {
    cout << "Time for food!!!" << endl;
    cat.feed();
}

void cleanCat() {
    cout << "Let's take a bath!!!" << endl;
    cat.clean();
}

void checkHappiness(){
 cat.checkHappiness();
 }

int exit() {
    exit(0);
    return 0;
}

pet game.h:

    #ifndef PET_GAME_H_
#define PET_GAME_H_

#include <iostream>
#include "Cat.h"
//#include "User.h"

using namespace std;

//Global variables
char command;
int exit();

//functions
void commandIdentify();
void buyNextCat();
void showHelp();
void tutorial();
void feedCat();
void cleanCat();
void checkHappiness();

//functions defined for a future use but they cause problems right now
void checkMoney();
void checkLevel();


#endif /* PET_GAME_H_ */

Cat.cpp:

#include <iostream>
#include <string>
#include "Cat.h"

using namespace std;

Cat::Cat(){
    happiness = 1;
    cleanness = 1;
}

void Cat::feed(){
    cout << "Yummy!!" << endl;
    Cat::happiness = Cat::happiness + 0.2;
}

void Cat::clean(){
    cout << "So soupy!!" << endl;
    Cat::cleanness = Cat::cleanness + 0.2;
}

Cat.h:

#ifndef CAT_H_
#define CAT_H_

#include <iostream>

using namespace std;

class Cat {
private:
    int happiness;
    bool happy = happiness >= 0.6;

    int cleanness;
    bool isClean = cleanness >= 0.6;
public:
    Cat();
    void feed();
    void clean();
    void checkHappiness() {
        cout << "Your cat's happiness is " << happiness*100 << "%" << endl;
    }

};

#endif /* CAT_H_ */

it will be great if you could tell me how to improve code