小编Pre*_*4_7的帖子

没有这样的模块“AppTrackingTransparency”错误

我正在尝试更新我的 Google AdMob 帐户,因为 Apple 宣布了一个新的透明度框架,该框架要求随着 iOS 14 的发布对 iOS 应用程序进行更改。我将我的 Google AdMob pod 更新到最新版本 (7.64.0)。但是,当我尝试在 App Delegate 中使用以下代码时:-

import AppTrackingTransparency
import AdSupport
...
func requestIDFA() {
    ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
    // Tracking authorization completed. Start loading ads here.
    // loadAd()
    })
}
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:-

No such module 'AppTrackingTransparency'
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激!

xcode ios

13
推荐指数
2
解决办法
9022
查看次数

ARKit:在 Xcode 中跟踪头部上下运动

我已经实现了以下代码,它允许我跟踪一个人的不同面部表情。但是,使用此代码,我无法使用 Xcode 中的 ARKit 跟踪人的头部上下运动。如果有人能让我知道如何使用 Xcode 通过 ARKit 跟踪人的头部上下运动,我将不胜感激!

import UIKit
import SceneKit
import ARKit

class ViewController: UIViewController, ARSCNViewDelegate {

@IBOutlet var sceneView: ARSCNView!
@IBOutlet weak var faceLabel: UILabel!
@IBOutlet weak var labelView: UIView!
var analysis = ""

override func viewDidLoad() {
    super.viewDidLoad()
    
    labelView.layer.cornerRadius = 10
    
    sceneView.delegate = self
    sceneView.showsStatistics = true
    guard ARFaceTrackingConfiguration.isSupported else {
        fatalError("Face tracking is not supported on this device")
    }
}

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    
    // Create a session configuration
    let configuration …
Run Code Online (Sandbox Code Playgroud)

augmented-reality ios scenekit arkit

6
推荐指数
1
解决办法
611
查看次数

无法从 Google Ads 中的 Firebase 项目导入事件

我已将我的 Firebase 项目与我的 Google Ads 帐户相关联,但是,在 Google Ads 帐户中设置应用转化时,我不会导入任何事件。已经超过24小时了。如果有人能让我知道如何解决这个问题,我将不胜感激。我附上了相同的屏幕截图供您参考。谢谢您的帮助!

在此输入图像描述

在此输入图像描述

firebase

5
推荐指数
0
解决办法
267
查看次数

使用贪心法(回溯)寻找熄灯游戏的解决方案

我正在尝试使用回溯方法找到熄灯游戏的解决方案。我无法理解这个过程的算法。我的方法是枚举从 0 到 2 n 2 - 1 的所有整数,并将每个整数转换为具有 n*n 位的二进制数。然后,将其分成 n 2 个二进制数字(0 表示灯灭,1 表示灯亮)并将它们分配到 × n 的网格中,例如:我编写了以下代码:-

    void find_solution(int dest[][MAX_SIZE], int size) {

    int y = pow(size,size);
    int remainder;

    for (int x = 0; x<pow(2,y); x++){
        int i = 1;
        int binary_number = 0;
        int n = x;
        while (n!=0) {
            remainder = n%2;
            n/=2;
            binary_number += remainder*i;
            i *= 10;
        }
        int binary_number_digits[size][size];
        for (int k = 0; k<size; k++) {
            for (int l = 0; …
Run Code Online (Sandbox Code Playgroud)

c++ algorithm

4
推荐指数
1
解决办法
813
查看次数

VS Code 中 MediaPipe 库的自动完成

我正在编写一个程序,在 Visual Studio Code (VS Code) 上使用 Python 中的 MediaPipe 库实时检测手势。但是,我在编写代码时没有得到自动完成建议。有什么建议哪些扩展将有助于为我提供相同的功能?感谢你的帮助:)

import cv2 as cv
import mediapipe as mp

mp_hands = mp.solutions.hands
hands = mp_hands.Hands()
mp_draw = mp.solutions.drawing_utils
Run Code Online (Sandbox Code Playgroud)

python

3
推荐指数
1
解决办法
1833
查看次数

无法解析“中心”。索引为 0 的序列项类型错误

我在 Mac 上的 VS Code 中用 OpenCV 编写了以下代码。我已经分配了图像(img)中某些点的(pts1)像素值。但是,当我尝试圈出这些点时,我收到此错误:-

Traceback (most recent call last):
cv.circle(img, (pts1[0][0], pts1[0][1]), 5, (0,0,255), cv.FILLED)
cv2.error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'circle'
> Overload resolution failed:
>  - Can't parse 'center'. Sequence item with index 0 has a wrong type
>  - Can't parse 'center'. Sequence item with index 0 has a wrong type
Run Code Online (Sandbox Code Playgroud)

有关如何解决此问题的任何建议?如果您对代码有任何疑问,请告诉我。谢谢您的帮助!

import cv2 as cv
import numpy as np

# Cards Image

img = cv.imread('Images/cards.jpg')

cv.imshow('Cards Image', img)

# Step …
Run Code Online (Sandbox Code Playgroud)

python opencv

1
推荐指数
1
解决办法
5452
查看次数

标签 统计

ios ×2

python ×2

algorithm ×1

arkit ×1

augmented-reality ×1

c++ ×1

firebase ×1

opencv ×1

scenekit ×1

xcode ×1