C ++ – Windows 10 IoT embedded, tries to debug / deploy a console app with Visual Stuido 2019

I tried to get a "console application" to deploy and debug on my embedded Win10 device, but I just can't figure it out.

I can provide an application for which a "SquareLogo" screen needs to be displayed, and I can't imagine how this "window" should be hidden or a headless app.

I can set "Properties Pages – Configuration Properties – Linker – System – Subsystem" to "Console" (SUBSYSTEM: CONSOLE) on the property pages of my app and the console window is displayed on the embedded device, but the app screen is displayed and the console window does not accept keyboard input.

In summary, I would like to debug with a console application on my embedded Win10 device (remote machine).

I write my app in C ++.

I don't think it would be that hard, but I just can't get the application's main window not to appear on startup.

Any help would be appreciated.
Thanks a lot

Tic Tac Toe Console application in C ++

I tried to write a simple one 3 x 3 Tic Tac Toe program. Please I need a code check for this program, whether it is readable, maintainable or not. Assess it as often as you can.

Here is the source code:

#include 
#include 
#include 


void draw_board(std::vector &board) {

  /**
  -----------------------
 |       |       |       |
 |   1   |   2   |   3   |
 |       |       |       |
 | --------------------  |
 |       |       |       |
 |   4   |   5   |   6   |
 |       |       |       |
 | --------------------  |
 |       |       |       |
 |   7   |   8   |   9   |
 |       |       |       |
  -----------------------
  **/
  for (auto row : board) {
    for (auto col : row) {
      std::cout << col;
    }
    std::cout << 'n';
  }

}

void toggle_player(char &current) {
  if (current == 'X') current = 'O';
  else current = 'X';
}

void update_board(char &current, std::vector &board, int &choice,
                  std::vector> &choice_position, std::vector &plays) {
  int row = choice_position(choice).first;
  int col = choice_position(choice).second;
  board(row)(col) = current;
  switch (choice) {
  case 1:
    plays(0)(0) = current;
    break;
  case 2:
    plays(0)(1) = current;
    break;
  case 3:
    plays(0)(2) = current;
    break;
  case 4:
    plays(1)(0) = current;
    break;
  case 5:
    plays(1)(1) = current;
    break;
  case 6:
    plays(1)(2) = current;
    break;
  case 7:
    plays(2)(0) = current;
    break;
  case 8:
    plays(2)(1) = current;
    break;
  case 9:
    plays(2)(2) = current;
    break;
  }

}

bool valid_move(int &choice, std::vector &taken) {
  return 1 <= choice && choice <= 9 && !taken(choice);
}

void handle_input(char &current, std::vector &taken, std::vector &plays
                  ,std::vector> &choice_position
                  ,std::vector &board) {
  std::cout << "Enter a number between (1, 9) (inclusive).n";
  std::cout << "It's " << current << " turnn";
  int choice;
  std::cin >> choice;
  while(!valid_move(choice, taken)) {
    std::cout << "Invalid choicen";
    std::cin >> choice;
  }
  taken(choice) = true;
  update_board(current, board, choice, choice_position, plays);
  toggle_player(current);
}



std::string winner(std::vector &plays) {
  // check rows
  std::string winner;
  for (int i = 0; i < 3; i++) {
    int cnt = 0;
    for (int j = 0; j < 3; j++) {
      if (plays(i)(j) == plays(i)(0))
          cnt++;
    }
    if (cnt == 3 && plays(i)(0) != '.') {
      winner += plays(i)(0);
      winner += " wins the game.";
      return winner;
    }
  }
  // check columns
  for (int i = 0; i < 3; i++) {
    int cnt = 0;
    for (int j = 0; j < 3; j++) {
      if (plays(j)(i) == plays(0)(i))
          cnt++;
    }
    if (cnt == 3 && plays(0)(i) != '.') {
      winner += plays(0)(i);
      winner += " wins the game.";
      return winner;
    }
  }
  // check diagonals
  if (plays(0)(0) == plays(1)(1) && plays(1)(1) == plays(2)(2) && plays(1)(1) != '.') {
    winner += plays(1)(1);
    winner += " wins the game";
    return winner;
  }
  if (plays(0)(2) == plays(1)(1) && plays(1)(1) == plays(2)(0) && plays(1)(1) != '.') {
    winner += plays(1)(1);
    winner += " wins the game";
    return winner;
  }
  return "-1"; // no winner
}
void handle_winner(std::vector &plays, std::vector &board,
                   std::vector> &choice_position);

void start_game(std::vector &board, std::vector> &choice_position) {
  // initial state of the game
  char current = 'X';
  std::vector plays(3);
  plays(0) = plays(1) = plays(2) = "...";
  std::vector taken(10);
  board = {" ------------------------", "|       |       |        |", "|   1   |   2   |   3    |",
  "|       |       |        |", " ------------------------", "|       |       |        |", "|   4   |   5   |   6    |",
  "|       |       |        |", " ------------------------", "|       |       |        |", "|   7   |   8   |   9    |",
  "|       |       |        |", " ------------------------"
  };
  while (true) {
    draw_board(board);
    handle_input(current, taken, plays, choice_position, board);
    handle_winner(plays, board, choice_position);

  }
}
void handle_winner(std::vector &plays, std::vector &board,
                   std::vector> &choice_position) {
  if (winner(plays) != "-1") {
    std::cout << winner(plays);
    std::cout << "Do you want to play another game?n";
    std::cout << "Enter 0 to exit, 1 to continuen";
    int choice;
    std::cin >> choice;
    if (choice == 0)
      exit(0);
    start_game(board, choice_position);
  }
}



int main() {
  std::vector board{" ------------------------", "|       |       |        |", "|   1   |   2   |   3    |",
  "|       |       |        |", " ------------------------", "|       |       |        |", "|   4   |   5   |   6    |",
  "|       |       |        |", " ------------------------", "|       |       |        |", "|   7   |   8   |   9    |",
  "|       |       |        |", " ------------------------"
  };
  std::vector> choice_position(10);
  // locations of numbers on the board
  choice_position(1) = {2, 4}; 
  choice_position(2) =  {2, 12};
  choice_position(3) = {2, 20};
  choice_position(4) = {6, 4};
  choice_position(5) = {6, 12};
  choice_position(6) = {6, 20};
  choice_position(7) = {10, 4};
  choice_position(8) = {10, 12};
  choice_position(9) = {10, 20};
  start_game(board, choice_position);
  return 0;
}

Game – Tic Tac Toe in C ++ (console version)

I made a 2 player Tic Tac Toe game in C ++
I also did some bug checks (e.g. when players enter an invalid position).

#include 
using namespace std;

#define Player1 1
#define Player2 2

int whoseTurn;

string moves(3) = {"empty", "cross", "zero"};
string board(9) = {"empty", "empty", "empty", "empty", "empty", "empty", "empty", "empty", "empty"};
//An array to avoid duplicate input
int playedPos(9) = {0};

void printBoard()
{
    cout << endl;
    for (int i = 0; i < 9; i++)
    {
        if (i == 3 || i == 6)
        {
            cout << endl;
            cout << endl;
        }
        if (board(i) == "empty")
        {
            cout << "t"
                 << " | ";
        }
        else
        {
            cout << "t" << board(i) << " ";
        }
    }
    cout << endl;
}

//Checking if any paper has won
bool check_for_victory(string board())
{
    if ((board(0) != "empty") && (board(0) == board(1)) && (board(1) == board(2)))
        return true;
    if ((board(3) != "empty") && (board(3) == board(4)) && (board(4) == board(5)))
        return true;
    if ((board(6) != "empty") && (board(6) == board(7)) && (board(7) == board(8)))
        return true;
    if ((board(0) != "empty") && (board(0) == board(3)) && (board(3) == board(6)))
        return true;
    if ((board(1) != "empty") && (board(1) == board(4)) && (board(4) == board(7)))
        return true;
    if ((board(2) != "empty") && (board(2) == board(5)) && (board(5) == board(8)))
        return true;
    if ((board(0) != "empty") && (board(0) == board(4)) && (board(4) == board(8)))
        return true;
    if ((board(6) != "empty") && (board(6) == board(4)) && (board(4) == board(2)))
        return true;
    return false;
}

void makeMove(int whoseTurn)
{
    //Variable for counting how many times the game is played
    int gameCount = 0;
    int pos, move;
    while ((check_for_victory(board) == false) && (gameCount != 9))
    {
        cout << "Where you want to make move: ";
        cin >> pos;
        if (pos < 10 && pos > 0) //Checking if the user entered a valid move
        {
            pos--;
            //incrementing the position at the pos index to 1
            playedPos(pos)++;
            if (playedPos(pos) <= 1)
            {
                if (whoseTurn == Player1)
                {
                    move = Player1;
                    board(pos) = moves(move);
                    printBoard();
                    whoseTurn = Player2;
                    gameCount++;
                }
                else if (whoseTurn == Player2)
                {
                    move = Player2;
                    board(pos) = moves(move);
                    printBoard();
                    whoseTurn = Player1;
                    gameCount++;
                }
            }
            else
            {
                cout << "You have played this move" << endl;
            }
        }
        else
        {
            cout << "Enter a valid position" << endl;
        }
    }

    if ((check_for_victory(board) == false) && gameCount != 9)
    {
        cout << "Math is draw" << endl;
    }
    else
    {
        if (whoseTurn == Player1)
        {
            cout << "Player 2 is WINNER!" << endl;
        }
        else
        {
            cout << "Player 1 is WINNNER!" << endl;
        }
    }
}

int main()
{
    whoseTurn = Player1;
    printBoard();
    makeMove(Player1);
}

Shell – Linux console text editor with Windows / Mac style, select, cut, exit and save text

I have a terminal novice user base that has to do extremely easy text editing from a console (authoring git commits etc.). I want to adjust EDITOR to something that feels as good as possible in terms of keyboard binding like a standard "web browser text area" with Ctrl-s and Ctrl-q to save / exit.

I've tried everyone, ne, joe, nano, and micro, but none of them have all the functions I want:

  1. Block selection: Shift arrow should extend the cursor in the appropriate direction to select a block, just like under Windows / Mac / Gnome / etc.
  2. Copy / Cut / Paste: Should be Ctrl-C, Ctrl-X, Ctrl-V
  3. Save: Should be Ctrl-S
  4. Exit: Should be Ctrl-Q

  5. Nice to have: an ncurses menu bar (ala ne) that appears when you press Esc

  6. Nice to have: Find Ctrl-F, Find Ctrl-G next

Any suggestions?

unit – Upload APK build to Google Play Console Error "You uploaded a debugable APK or Android app bundle"

I tried uploading my andoid app apk build to my Play Console account and I keep getting the following error:

You uploaded a debuggable APK or Android App Bundle. For security reasons you need to disable debugging before it can be published in Google Play.

In accordance with the information below

https://developer.android.com/studio/publish/preparing.html#publishing-configure

and

https://answers.unity.com/questions/1653647/you-uploaded-a-debuggable-apk-or-android-app-bundl.html

So far I've done the following:

1) I looked in the root folder of my Unity project AndroidManifest.xmland I found several manifest files and changed the value of "android: debuggable" too false for each of these manifest files generated by Unity (and I have not edited the manifest files generated by Google).

2) I scanned every C # file in my project that contains the keyword "Debug" and I either deleted it or commented it out Test protocol Lines except on the files generated by Google (due to the integration of Google Play services in my game).

And yet I still have the same problem when I try to upload my apk to play the console. What am I missing? Should I remove that too? Test protocol Lines from C # script files generated by Google?

Gmail and Google products in general: the next button doesn't work to sign in? (+ Console log data)

Description: As the title suggests, the Google Next button does not work. It doesn't respond when I click on it !! The only temporary fix I've come across that actually works is using a Chrome user agent switch extension, but it's slow and very annoying. When I open Gmail, the buttons above disappear, so this fix / force login isn't even worth trying. This error occurred for the first time this Monday and has been so for some time. I thought it would probably be Google or something and they would fix it, but after using this user agent, is it my computer? I would appreciate it if someone could tell me if there is a way to fix this.
Can someone explain to me why that happens

(See picture for console log)
l

Java – How should I activate my AdMob IDs in the Google Play Console?

Ok here is the situation. This is my first app developed in Android Studio, and everything went well in the internal, alpha and beta phases. Now I want to go into production. But … as far as I know, using real ads in test scenarios is against the rules.

When should I replace the test IDs with the real ones? If I replace it and upload the signed APK for the production version, it will not be tested by the Google "bots" for testing purposes. Will my account not be blocked in this case?

What would be the best way to go live with real ads?

Greetings.

java – Record / Where can I find the error history in the console with Eclipse?

I hope to find out where the errors like "exception in thread & # 39; main & # 39; java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0" are recorded. Or can I create a file to record such information?

I found the answer "Find the error log" (I can't understand the errors or can't find what I want) and "Get console history in Eclipse" (only the output was recorded, not the errors). These are not the right ones I'm looking for.

Many thanks! -Jiduan