我花了数小时来浏览各种教程和文章,并最终屈服于询问。
我想对Angular 7应用程序的所有用户强制使用Google登录身份验证。但是,一旦Google身份验证完成,我想首先检查该用户是否存在于我的后端数据库(PostgreSQL)中。如果他们这样做,那么我想为两个目的发布JWT:
到目前为止,我已经能够从gapi auth2 auth响应中检索id_token并将其转发到我的Spring Boot POST映射,但是我一直在努力精确确定我要针对的OAuth 2.0 / OpenId流/赠款在采购适当的Spring Boot文档/教程时,工作变得很困难。
有谁能够澄清我应该瞄准的流程/拨款以及我目前的方向是否有效?
jwt single-page-application spring-boot google-signin angular
我目前正在开发一个Sudoku解决方案项目,通过从初学者到更高级的各种C++技能(一步一步)
我目前需要某种公式/解决方案来计算在数独9x9网格中找到的3x3网格中第一个"单元"的X和Y坐标.
如果数独网格的3x3部分编号如下:
|  0  |  1  |  2  |
|  3  |  4  |  5  |
|  6  |  7  |  8  | 
Run Code Online (Sandbox Code Playgroud)
目前,我能想到的最好的是一个开关/案例声明:
    switch(cubeNum) {
        case 0:
        case 1:
        case 2:
            startY = 0;
            break;
        case 3:
        case 4:
        case 5:
            startY = 3;
            break;
        case 6:
        case 7:
        case 8:
            startY = 6;
            break;
    }
    switch(cubeNum) {
        case 0:
        case 3:
        case 6:
            startX = 0;
            break;
        case 1:
        case 4:
        case 7:
            startX = 3;
            break; …Run Code Online (Sandbox Code Playgroud) 我试图在C++中使用2D数组映射数独网格.我一直在通过比较输入到2d数组的"转储"来测试代码.阵列是9x9.我的问题是,前8列都是完美的.但最后一栏似乎在9个案例中有8个是错误的.为什么会这样?
码:
#include <iostream>
#include <fstream>
#include <string>
int i = 0;
int j = 0;
const char test[12] = {'e', '1', '2', '3', '4', '5', '6', '7', '8', '9', '*'};
std::string abc = "";
// Class to map out a sudoku grid
class grid {
    public:
    char board[8][8];
    void mapChars(std::string fileName) {
            int x = 0;
            int y = 0;  
            std::string line;
            std::ifstream myfile (fileName.c_str());
            if (myfile.is_open()) {
                while (getline(myfile,line)) {
                    for(std::string::size_type i = 0; i < line.size(); ++i) …Run Code Online (Sandbox Code Playgroud)