掩耳倾听

文章 评论 浏览 27

掩耳倾听 2025-02-21 01:05:29
"provide" : {
    "ext-mongo": "*"
},

我能够通过将其添加到我的作曲家。

"provide" : {
    "ext-mongo": "*"
},

i was able to fix it by adding this to my composer.json .. somehow i never needed it until today.

Google Cloud App引擎引擎标准部署具有PHP 7.4 / 8.1 MongoDB扩展

掩耳倾听 2025-02-20 23:59:07

可以使用标准外壳工具。在这种情况下> ripgrep )。

建议的命令是:

git status | grep <state> | awk -F ':' '{print $2}' | xargs git add

# or
git status | grep <state> | awk -F ':' '{print $2}' | xargs git commit -m "<msg>"

# for deleted files only:
git status | grep deleted | awk -F ':' '{print $2}' | git commit -m "<msg>"

如果您知道每个工具,则命令大多是自我解释的。如果您不这样做,请学习它们,它们很有用。简而言之:GREP找到具有指定状态的行。 “删除”。尴尬过滤第二列。 Xargs将其转换为参数格式。

为此/这些管道制造一个别名使它成为一项琐碎的任务。

It is possible to utilize standard shell tools. In this case grep, xargs and awk (or their newer/faster/different alternatives like nawk or ripgrep).

The suggested command is:

git status | grep <state> | awk -F ':' '{print $2}' | xargs git add

# or
git status | grep <state> | awk -F ':' '{print $2}' | xargs git commit -m "<msg>"

# for deleted files only:
git status | grep deleted | awk -F ':' '{print $2}' | git commit -m "<msg>"

The command is mostly self-explonatory if you know each tool. If you dont, learn them, they are usefull. In short: grep finds lines with specified status eg. "deleted". awk filters second column. xargs transforms it to argument format.

Making an alias for this/these pipeline makes it a trivial task.

将所有删除的文件添加到带有git的提交

掩耳倾听 2025-02-20 20:27:40

作为远程查看 matplolib 窗口的替代方案,您始终可以将图作为图像文件保存并将其复制到本地计算机。这很简单,就像使用

plt.save(f'label:{label}.png')

As an alternative to viewing your matplolib window remotely, you can always save your plot as an image file and copy it to your local machine. This is as simple as using plt.savefig

plt.save(f'label:{label}.png')

plt.show()未显示图像

掩耳倾听 2025-02-20 08:08:19

您错过了代码中的某些内容,需要检查输入值,并增加 streakcount ,未经测试的示例代码:

while (it.hasNext()) {
    String val = it.next();
    if (val.equals("true")) {
        streakcount++;
        if (streakcount >= 10) {
            streak = true;
            System.out.println ("Streak is found! ");
            break;
        }
    }
    else if (val.equals("false")) {
        streak = false;
        System.out.println ("Streak is broken! ");
        break;
    }
}

还有更多的操作,检查不同的输入值,或者您需要查找条纹,如果这不是从开始数组...

You miss something in your code, you need to check the input value, and increase streakcount, untested example code:

while (it.hasNext()) {
    String val = it.next();
    if (val.equals("true")) {
        streakcount++;
        if (streakcount >= 10) {
            streak = true;
            System.out.println ("Streak is found! ");
            break;
        }
    }
    else if (val.equals("false")) {
        streak = false;
        System.out.println ("Streak is broken! ");
        break;
    }
}

There are more action to do, check different input value, or do you need to find streak if it is not from starting array...

Java:链接列表 - (布尔人[head = true,tail false])

掩耳倾听 2025-02-19 23:45:48

您可以在第一个词典上使用嵌套循环执行遍历,并将所有值附加到结果 out 变量,内部“ filtered_data”

d = {'2020-04-20': [('EUR', 34.02), ('USD', 30.18), ('AWG', 24.44), ('GPB', 20.68)], 
 '2020-04-25': [('EUR', 16.88), ('USD', 15.06), ('AWG', 12.17), ('GPB', 10.4)]}

out = {"filtered_data": []}
for i in d:
  for j in d[i]:
    out["filtered_data"].append({"data": i, "currency": j[0], "value": j[1]})
print(out)

output: >

{'filtered_data': [{'data': '2020-04-20', 'currency': 'EUR', 'value': 34.02}, {'data': '2020-04-20', 'currency': 'USD', 'value': 30.18}, {'data': '2020-04-20', 'currency': 'AWG', 'value': 24.44}, {'data': '2020-04-20', 'currency': 'GPB', 'value': 20.68}, {'data': '2020-04-25', 'currency': 'EUR', 'value': 16.88}, {'data': '2020-04-25', 'currency': 'USD', 'value': 15.06}, {'data': '2020-04-25', 'currency': 'AWG', 'value': 12.17}, {'data': '2020-04-25', 'currency': 'GPB', 'value': 10.4}]}

You can perform a traversal on the first dictionary with a nested loop, appending all values to the resulting out variable, inside "filtered_data":

d = {'2020-04-20': [('EUR', 34.02), ('USD', 30.18), ('AWG', 24.44), ('GPB', 20.68)], 
 '2020-04-25': [('EUR', 16.88), ('USD', 15.06), ('AWG', 12.17), ('GPB', 10.4)]}

out = {"filtered_data": []}
for i in d:
  for j in d[i]:
    out["filtered_data"].append({"data": i, "currency": j[0], "value": j[1]})
print(out)

Output:

{'filtered_data': [{'data': '2020-04-20', 'currency': 'EUR', 'value': 34.02}, {'data': '2020-04-20', 'currency': 'USD', 'value': 30.18}, {'data': '2020-04-20', 'currency': 'AWG', 'value': 24.44}, {'data': '2020-04-20', 'currency': 'GPB', 'value': 20.68}, {'data': '2020-04-25', 'currency': 'EUR', 'value': 16.88}, {'data': '2020-04-25', 'currency': 'USD', 'value': 15.06}, {'data': '2020-04-25', 'currency': 'AWG', 'value': 12.17}, {'data': '2020-04-25', 'currency': 'GPB', 'value': 10.4}]}

Python:将数据转换为适当的字典格式

掩耳倾听 2025-02-19 22:25:10

多亏了 @phil npm i历史需要运行以安装历史>历史>的V5版本才能与 React-Router v6。 在这里注释

Thanks to @Phil, npm i history needed to be ran to install a v5 version of history needed to be present to be used with react-router v6. Comment here.

无法读取未定义的属性(Reading&#x27; PathName&#x27;)

掩耳倾听 2025-02-19 02:12:20

从历史上看,Unix系统认为时间是时间单元(秒,毫里,纳米等),因为绝对起源即将被称为“时代”:1970年1月1日00:00:00:00 UTC。这是

因此,“ Unix时间”是该系统中的计算系统和“ Epoch Timestamps”是该系统的时间点。

现在,在我看来,您似乎正在使用时空时间戳。

对于您的“短”时间戳,12600000 ,由于时期的时间点与自时代以来的时间点不同于12600000 milliseconds 。这就是为什么您会看到它们解决一天中不同的时间,因为您的转换器正在以不同的方式解释它们。如果您在输出中加入了日期,那么您将看到两个时间点相隔六个月。

Historically, UNIX systems reckon time as temporal units (seconds, millis, nanos, etc.) elapsed since an absolute origin instant termed "the Epoch": January 1st, 1970 00:00:00 UTC. This is formally recognized in POSIX.

So "UNIX time" is that system of reckoning, and "Epoch timestamps" are points in time in that system.

Now, you appear to me to be conflating temporal units in your use of Epoch timestamps.

In the case of your "short" timestamp, 12600000 seconds since the Epoch is a different point in time than 12600000 milliseconds since the Epoch. That's why you see them resolve to different times of day, as your converters are interpreting them differently. If you'd included the date in your output, you'd have seen the two points in time are almost six months apart.

Epoch Timestamp和Unix时间之间的区别是什么?

掩耳倾听 2025-02-18 23:30:49

尝试以下操作:

Private Sub ComboBox1_Change()
    Dim txt
    txt = ComboBox1.Text
    With Me 'assuming this is in the worksheet code module
        .Shapes("group_1").Visible = txt = "2021-2022"
        .Shapes("group_2").Visible = txt = "2022-2023"
        .Shapes("group_3").Visible = Len(txt) > 0 'any option selected
    End With
End Sub

Try this:

Private Sub ComboBox1_Change()
    Dim txt
    txt = ComboBox1.Text
    With Me 'assuming this is in the worksheet code module
        .Shapes("group_1").Visible = txt = "2021-2022"
        .Shapes("group_2").Visible = txt = "2022-2023"
        .Shapes("group_3").Visible = Len(txt) > 0 'any option selected
    End With
End Sub

Excel Show/Hide Group基于Combobox选择

掩耳倾听 2025-02-18 21:25:59

在循环的第一个中,您将对象传递给构造函数。像这样:

listOfTranslationContent.append(ContentTranslation(contentTranslation))

而是将第一个循环的主体更改为:

for j in range(1,noOfSessions):
    aContentList.append("a")

    # create object
    contentTranslation = ContentTranslation(language)
    contentTranslation.addContentTranslation(aContentList)

    # append to list
    listOfTranslationContent.append(contentTranslation)

In the first for loop, you are passing an object to the constructor. Like so:

listOfTranslationContent.append(ContentTranslation(contentTranslation))

Instead change the body of first loop to this:

for j in range(1,noOfSessions):
    aContentList.append("a")

    # create object
    contentTranslation = ContentTranslation(language)
    contentTranslation.addContentTranslation(aContentList)

    # append to list
    listOfTranslationContent.append(contentTranslation)

如何从python中的字符串和列表中获取列表文本

掩耳倾听 2025-02-18 16:07:21

我不知道只有最后一次打开的确切答案,但我宁愿用道具做到这一点。在父模板中:

<a @click="expandAll">View All</a>     
<CollapsiblePanel :open="openAll">
    ...
</CollapsiblePanel>
<CollapsiblePanel :open="openAll">
    ...
</CollapsiblePanel>

父母中的按钮的函数:

const openAll = ref(false);

function expandAll() {
    openAll.value = !openAll.value;
}

而不是在Coldapsible Panel脚本设置中:

const props = defineProps({openAll: Boolean});
const currentOpen = ref(false);

/// Call with click on child:
const toggleIndividual = () => {
    currentOpen.value = !currentOpen.value;
}
/// If prop changes (expand all button is clicked) open child
watch(props.openAll) {
   currentOpen.value = true;
}

以及在Coldapsible Panel模板中。您可以将要单击的元素放在要扩展的元素上。

现在,如果您切换所有内容,所有孩子将扩展。如果您单击一个孩子,它将崩溃。

希望这会有所帮助。

I do not know the exact answer to why only the last opens, but I would rather do this with a prop. In the parent template:

<a @click="expandAll">View All</a>     
<CollapsiblePanel :open="openAll">
    ...
</CollapsiblePanel>
<CollapsiblePanel :open="openAll">
    ...
</CollapsiblePanel>

Function for the button in the parent:

const openAll = ref(false);

function expandAll() {
    openAll.value = !openAll.value;
}

And than in the CollapsiblePanel script setup:

const props = defineProps({openAll: Boolean});
const currentOpen = ref(false);

/// Call with click on child:
const toggleIndividual = () => {
    currentOpen.value = !currentOpen.value;
}
/// If prop changes (expand all button is clicked) open child
watch(props.openAll) {
   currentOpen.value = true;
}

And in the CollapsiblePanel template a v-if="currentOpen" on the div that needs to open and close. You can put @click="toggleIndividual" on the element that you want to click to expand it.

Now if you toggle expand all, all childs will expand. If you click an individual child it will collaps.

Hope this helps.

vue js 3父母打电话多个孩子方法

掩耳倾听 2025-02-18 10:04:40

尝试将其更改为

geraete:  List<RDevice>.from((json["geraete"] as List<Map<String, dynamic>>).map((x) => RDevice.fromJson(x))),

Try to change it to

geraete:  List<RDevice>.from((json["geraete"] as List<Map<String, dynamic>>).map((x) => RDevice.fromJson(x))),

如何解决:参数类型&#x27; dynamic&#x27;可以将分配给参数类型&#x27; iToble。

掩耳倾听 2025-02-18 08:30:10

第1部分:发出 ./ slap 作为命令时的函数调用的参数

,在此部分中有两个问题:

    con = input("Would you like to continue y/n - ")
    def con_p(cmds, con):
        if con == "y":
            return slap()
        elif con == "n":
            return cmds
    con_p()

在此块的最后一行中,新创建的函数 con_p 被调用,但没有任何参数( cmds con )。由于它们也没有默认值,因此脚本崩溃了。

为了解决这个问题,我们只需要提供所需的论点即可;将最后一行更改为:

    con_p(cmds, con)

您可能认为这有点不必要,因为您已经在行中使用了这些名称 def con_p(cmds,con):,但这就是提供的参数将被称为内部函数 con_p(),而不是从何处撤离。

con_p()使用 con =“ y” :然后 con_p()调用 slap()<时,就会发生第二个问题。 /代码>再次没有参数。我们需要用返回slap() 返回slap(cmds)

旁注:我不知道代码块我在上​​面复制/粘贴是否有进一步的意图,但是可以删除con_p()函数。整个块可以替换为:

    con = input("Would you like to continue y/n - ")
    
    if con == "y":
        return slap(cmds)

cmds slap()中也没有使用,因此我们也可以将其定义为 def slap():< /code>而不是 def slap(cmds):

第2部分:无限循环,

由于代码是从第一行到最后一行执行的,因此,除非 cmds 等于 br ,否则代码的以下块将始终保持循环。

while True:
    if cmds == "br":
        break

由于我们无法在循环期间调整 cmds ,而且只要求一次,我们根据 cmds 的值有三种情况

  1. 。 > ./ slap ,以便我们可以拍打人,然后退出拍打后( con ==“ n” ),我们将进入无限循环
  2. br so so so我们不会陷入循环中,没有执行其他命令,并且程序退出而无需
  3. cmds 进行任何其他值,而该值未得到评估,因为我们最终会永远进入循环。

我不确定此循环的预期目的,但是我认为您想在整个代码周围放一个循环,要求命令输入并执行它们,因此:

def slap(cmds):
    [...]
    

def about_rb():
    [...]
    

while True:
    
    cmds = input("Say any command you would like :) - ")

    if cmds == "./slap":
        slap(cmds)
        
    if cmds == "./about_rb":
        about_rb()

    if cmds == "br":
        break
    

在这里,我们首先定义了所有功能。然后,在一个无尽的循环中,我们一直向用户询问新命令,然后运行该命令。只有当命令为“ BR”时,我们会破坏循环,并且计算机在循环后使用代码继续(如果有)。

将所有这些放在一起

# imports
import time

# define functions
def slap(cmds):
slap_p = input("Who do you want to slap: ")
caption_for_slap = input("Caption for slapping: ")
print("Loading...")
time.sleep(3)
print(caption_for_slap, "

Part 1: arguments for function calls

When issuing ./slap as a command, there are two problems in this part:

    con = input("Would you like to continue y/n - ")
    def con_p(cmds, con):
        if con == "y":
            return slap()
        elif con == "n":
            return cmds
    con_p()

In the final line of this block, the newly created function con_p is called, but without any of the arguments (cmds, con). Since there is no default value for them either, the script crashes.

To resolve this, we just need to provide the required arguments; change the last line to:

    con_p(cmds, con)

You might think that this is a bit unnecessary, as you've already used those names in the line def con_p(cmds, con):, but that's just what the provided arguments will be known as inside the function con_p(), not where they're pulled from.

The second problem occurs when con_p() is called with con = "y": then con_p() calls slap() again without arguments. We need to replace return slap() with return slap(cmds).

Side note: I don't know if there is any further intent with the code block I copy/pasted above, but as is, the con_p() function can be removed. The entire block can be replaced with:

    con = input("Would you like to continue y/n - ")
    
    if con == "y":
        return slap(cmds)

cmds also isn't used inside slap(), so we can also just define it as def slap(): instead of def slap(cmds):.

Part 2: infinite loop

As the code is executed from the first line to the last, the following block of code will always keep looping unless cmds equals br.

while True:
    if cmds == "br":
        break

Since we cannot adjust cmds during the loop, and it is asked only once, we have three scenarios based on the value of cmds:

  1. ./slap so we can slap people, and after we quit slapping (con == "n") we will get in the infinite loop
  2. br so we don't get caught in the loop, no other commands are executed, and the program exits without doing anything
  3. any other value for cmds which doesn't get evaluated since we just end up in the loop forever.

I don't know for sure the intended purpose of this loop, but I think you want to put a loop around the entire code that asks for a command input and executes them, as such:

def slap(cmds):
    [...]
    

def about_rb():
    [...]
    

while True:
    
    cmds = input("Say any command you would like :) - ")

    if cmds == "./slap":
        slap(cmds)
        
    if cmds == "./about_rb":
        about_rb()

    if cmds == "br":
        break
    

Here, we first define all our functions. Then in an endless loop we keep asking the user for a new command, and run that command. Only when the command is "br", we break the loop and the computer continues with the code after the loop (if there is any).

Putting it all together

# imports
import time


# define functions
def slap(cmds):          
        slap_p = input("Who do you want to slap: ")
        caption_for_slap = input("Caption for slapping: ")
        print("Loading...")
        time.sleep(3)
        print(caption_for_slap, "????????????????????????", ". You deserved it", slap_p)
        con = input("Would you like to continue y/n - ")
        
        if con == "y":
            return slap(cmds)
        
        
def about_rb():
        if cmds == "./about_rb":
            print("I am a robot named", name + ".", "Thanks to", user_name, "for picking that name for me!")
            time.sleep(1)
            print("My age is 35 :)")
        

# name the bot
print("Hi User! Pick a name for me!")
time.sleep(1)
name = input("Name for Bot: ")
g = print("Ooh", name + "!", "thats a cool name!")


# name the user
print("What should I call you?")
time.sleep(1)
user_name = input("Your name: ")
g1 = print(user_name + "...", "cool name!")
time.sleep(1)


# start main loop
while True:
    
    # get command
    cmds = input("Say any command you would like :) - ")

    if cmds == "br":
        break
    
    if cmds == "./slap":
        slap(cmds)
        
    if cmds == "./about_rb":
        about_rb()
        
    if cmds == "do you like Siri or Cortana":
        print("I love all robots! I dont really have a preference for both ♥")

为什么我可以返回我的“ cmds”我的代码中的变量?

掩耳倾听 2025-02-18 06:31:14

直接答案如已经指出的附加,但是您可以通过使用stdlib String and andar.sample 来简化代码。

unordered_letters = random.sample(string.ascii_letters, nr_letters)

The direct answer is as already stated to use append but you could simplify your code a lot by using the stdlib string and random.sample

unordered_letters = random.sample(string.ascii_letters, nr_letters)

我试图制作一个安全的密码生成程序。好吧,我正在调试我运行此不完整程序时遇到的索引错误

掩耳倾听 2025-02-18 05:11:04

您会遇到该错误,因为您使用的是 doc(),该错误应用于在返回集合redReference实例的路径上获取DocumentReference实例。

const colRef = doc(db, 'user_data', user, "run");

上面的代码尝试将“ db/user_data/user/run run collectionReference实例分配给colref,使用 doc()方法。子策略文档等。这意味着 db 应该是您的数据库根参考, user_data 应该是根集合, user user_data user 代码>集合。

将代码更改为与该模式相对应的,例如:

const docReference = doc(db, "aRootCollection", "documentId"); // Get the document reference.
const docSnapshot = await getDoc(docReference); // Get a snapshot of the document.
const documentData = docSnapshot.data(); // Get the data of the snapshot. In your case, this would return the "run" array.

无需使用查询来实现目标。
确保您熟悉 Promises 和/或等待并正确处理所有可能的异常。

确保您阅读官方的firestore文档。它写得很好,有例子。

PS尝试与您的报价保持一致,以提高可读性。

看看这种数据结构。 “数据结构”

const aDocmentId = "hH8FfavuIKCwaSQPKmFY"; // The document Id you wish to reference.
const docReference = doc(firestore, `users/${aDocmentId}`); // Getting the Document Reference.
const docReference2 = doc(firestore, "users", "hH8FfavuIKCwaSQPKmFY"); // Same thing but static, with different syntax.
const docSnapShot = await getDoc(docReference); // Get the Document Snapshot.
const docData = docSnapShot.data(); // This will be { name: 'myName', age: 25, rentedMovies: [ 'Burn After Reading', 'Interstellar' ] }
for(const field in docData) { // Loop through all key-value pairs in docData.
   console.log(`${field}: ${docData[field]}`); // Log "Field: value", for every key-value pair.
}

上面的代码将记录以下内容:

name: 'myName'
age: 25
rentedMovies: Burn After Reading,Interstellar

You are getting that error because you are using doc(), which should be used to get a DocumentReference instance, on a path that returns a CollectionReference instance.

const colRef = doc(db, 'user_data', user, "run");

The code above attempts to assign the "db/user_data/user/run" CollectionReference instance to colRef, incorrectly using the doc() method.
Remember that firestore saves data in a collection-document-subcolletion-document etc. manner. That means db should be your database root reference, user_data should be a root collection, and user a document in the user_data collection.

Change your code to correspond to that pattern, like so:

const docReference = doc(db, "aRootCollection", "documentId"); // Get the document reference.
const docSnapshot = await getDoc(docReference); // Get a snapshot of the document.
const documentData = docSnapshot.data(); // Get the data of the snapshot. In your case, this would return the "run" array.

There is no need to use Query for what you're trying to accomplish.
Make sure you are familiar with Promises and/or async await and handle all possible exceptions correctly.

Make sure you read the official Firestore documentation. It is pretty well-written, with examples.

P.S. Try to be consistent with your quotes for better readability.

Take a look at this data structure. data structure

const aDocmentId = "hH8FfavuIKCwaSQPKmFY"; // The document Id you wish to reference.
const docReference = doc(firestore, `users/${aDocmentId}`); // Getting the Document Reference.
const docReference2 = doc(firestore, "users", "hH8FfavuIKCwaSQPKmFY"); // Same thing but static, with different syntax.
const docSnapShot = await getDoc(docReference); // Get the Document Snapshot.
const docData = docSnapShot.data(); // This will be { name: 'myName', age: 25, rentedMovies: [ 'Burn After Reading', 'Interstellar' ] }
for(const field in docData) { // Loop through all key-value pairs in docData.
   console.log(`${field}: ${docData[field]}`); // Log "Field: value", for every key-value pair.
}

The code above will log the following:

name: 'myName'
age: 25
rentedMovies: Burn After Reading,Interstellar

如何从Firestore检索数据

掩耳倾听 2025-02-18 00:48:12

我还遇到了这个问题,并将“@abacritt/angularx-Social-login”用于社交媒体登录。此问题发生在所有新创建的Google客户端ID中。如果您使用的是Angular应用程序,则可以通过在提供商中添加“ plugin_name”来解决这。

在app.module.ts中,创建一个保存“ plugin_name”的对象。

const googleLoginOptions = {
  scope: 'profile email',
  plugin_name:'login' //you can use any name here
}; 

在提供商中,将“ GoogleLoginOptions”对象与Google客户端ID一起传递。

@NgModule({
 declarations: [
    AppComponent
    ],
  imports: [
    BrowserModule,
    NgbModule,
    AppRoutingModule,
    CommonModule,
    HttpClientModule,
    SocialLoginModule
  ],
  schemas: [ CUSTOM_ELEMENTS_SCHEMA ],
  providers: [
        {
          provide: 'SocialAuthServiceConfig',
          useValue: {
            autoLogin: false,
            providers: [
              {
                id: GoogleLoginProvider.PROVIDER_ID,
                provider: new GoogleLoginProvider(
                  'YOUR GOOGLE CLIENT_ID', 
                   googleLoginOptions
                )
              }
            ],
            onError: (err) => {
              console.error(err);
            }
          } as SocialAuthServiceConfig,
        }
  ],
  bootstrap: [AppComponent]
})

现在,清除浏览器缓存,应该可以正常工作。
有关app.component.ts的更改,您可以参考

此解决方案对我有用。希望这会有所帮助。

I also have encountered this issue and was using '@abacritt/angularx-social-login' for social media login. This issue happens for all the newly created Google Client IDs. This can be resolved by adding 'plugin_name' in the provider if you are using Angular application.

In app.module.ts, create an object which holds the 'plugin_name'.

const googleLoginOptions = {
  scope: 'profile email',
  plugin_name:'login' //you can use any name here
}; 

And in providers, pass the 'googleLoginOptions' object along with the google client ID.

@NgModule({
 declarations: [
    AppComponent
    ],
  imports: [
    BrowserModule,
    NgbModule,
    AppRoutingModule,
    CommonModule,
    HttpClientModule,
    SocialLoginModule
  ],
  schemas: [ CUSTOM_ELEMENTS_SCHEMA ],
  providers: [
        {
          provide: 'SocialAuthServiceConfig',
          useValue: {
            autoLogin: false,
            providers: [
              {
                id: GoogleLoginProvider.PROVIDER_ID,
                provider: new GoogleLoginProvider(
                  'YOUR GOOGLE CLIENT_ID', 
                   googleLoginOptions
                )
              }
            ],
            onError: (err) => {
              console.error(err);
            }
          } as SocialAuthServiceConfig,
        }
  ],
  bootstrap: [AppComponent]
})

Now, clear the browser cache and it should be working.
For the changes in app.component.ts you may refer to @abacritt/angularx-social-login- documentation

This solution worked for me. Hope this helps.

错误:未被发现(在承诺中):对象:{; error&quot; popup_closed_by_user;}

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

更多

友情链接

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文