三人与歌

文章 评论 浏览 30

三人与歌 2025-02-20 06:23:08

这为我修复了:

<body class="bg-light">
        <div class="row container-fluid justify-content-center position-absolute top-50 start-50 translate-middle">
            <div class="col-6">
                <input class="form-control" list='datalistOptions' placeholder="Where would you like to travel?">
            </div>
            <div class="col-1">
                <button class="btn btn-primary" id="btn">Search</button>
            </div>
        </div> 
</body>

This fixed it for me:

<body class="bg-light">
        <div class="row container-fluid justify-content-center position-absolute top-50 start-50 translate-middle">
            <div class="col-6">
                <input class="form-control" list='datalistOptions' placeholder="Where would you like to travel?">
            </div>
            <div class="col-1">
                <button class="btn btn-primary" id="btn">Search</button>
            </div>
        </div> 
</body>

使用Bootstrap垂直将DIV或输入元素集中

三人与歌 2025-02-19 06:54:18

经过大量挖掘,我能够找到解决方案。
我知道这没有太多工作...但是我对VBA的新手很陌生……这对我来说是一个小的胜利:D

Private Sub Form_beforeUpdate(Cancel As Integer)
Dim ststatus As String
Dim ststatus1 As String

ststatus = Me.Case_Status.OldValue
ststatus1 = Me.Case_Status
    If ststatus <> ststatus1 Then
        DoCmd.RunSQL "Insert Into case_history select * from cases " & _
        "Where case_id=" & Case_ID
    End If
End Sub

After lot of digging, i was able to find the solution.
I know its not much work...But I am fairly new to the VBA like very basic...This is a small win for me :D

Private Sub Form_beforeUpdate(Cancel As Integer)
Dim ststatus As String
Dim ststatus1 As String

ststatus = Me.Case_Status.OldValue
ststatus1 = Me.Case_Status
    If ststatus <> ststatus1 Then
        DoCmd.RunSQL "Insert Into case_history select * from cases " & _
        "Where case_id=" & Case_ID
    End If
End Sub

根据状态更改创建历史记录 /日志表

三人与歌 2025-02-19 01:46:05

装饰者无法在您的线之间提出命令。您的变量仅在功能的运行时存在,因此无法在其他任何地方读取它们。您必须将它们定义为类变量或 globals

您可以做的一件事是将它们全部作为参数传递并阅读。

Decorators can't put commands between your lines. Your variables only exist for the runtime of the function, so they cannot be read anywhere else. You'd have to define them as class variables or globals.

The one thing you could do is to pass them all as parameters and read those.

如何通过装饰器将函数中活着的变量名称打印出来? - Python 3

三人与歌 2025-02-18 21:19:09

您要寻找的图标是 icons.check_check_box_box icons.close.close.close 。要查看图标,没有周围的填充框,请使用 图标。检查


如果很难在扑波文档中搜索图标,则可以使用材料符号和图标来自Google字体的页面。

找到图标后,您可以单击它,侧边栏将出现在右侧。转到“ Android”选项卡,图标代码将与 Icons 类中的图标相同。例如,如果您单击“复选框”图标:

此图标的代码为“ check_box”

Icon(Icons.check_box)

“ https://i.sstatic.net/xrjhl.png” alt = “ 该页面中有一些图标,但在 belity_symbols_icons_icons package。现在,您可以使用图标 符号

// Import the package
import 'package:material_symbols_icons/symbols.dart';

// In your widget, use it as the IconData the same way as Icons
Icon(Symbols.add_task)

The icons you're looking for are Icons.check_box and Icons.close. For check icon without the filled box around it, use Icons.check.

Icons screenshot


If it's hard to search for icons in the Flutter docs, you can use the Material Symbols and Icons page from Google Fonts.

After finding the icon, you can click on it and a sidebar will appear on the right side. Go to the "Android" tab, the icon code will be the same as the one from the Icons class. For example, here's what you'll get if you click on the "Check Box" icon:

Material Symbols icon example

The code for this icon is "check_box", so you can use it in Flutter like this:

Icon(Icons.check_box)

In case there are icons you find in that page but not available in the Icons class, you can use the material_symbols_icons package. Now instead of using Icons, you can use Symbols:

// Import the package
import 'package:material_symbols_icons/symbols.dart';

// In your widget, use it as the IconData the same way as Icons
Icon(Symbols.add_task)

在扑朔迷离中,什么是什么选中(&#x2705;)和cross/x(&#x274c;)图标?

三人与歌 2025-02-18 06:03:55

您需要将两个脚本组合在一起,并为每个玩家提出请求。尝试以下方法。这将搜索具有 data-td = player 属性:

import requests
from bs4 import BeautifulSoup

def get_links(url):
    data = []
    req_url = requests.get(url)
    soup = BeautifulSoup(req_url.content, "html.parser")

    for td in soup.find_all('td', {'data-th' : 'Player'}):
        a_tag = td.a
        name = a_tag.text
        player_url = a_tag['href']
        print(f"Getting {name}")

        req_player_url = requests.get(f"https://basketball.realgm.com{player_url}")
        soup_player = BeautifulSoup(req_player_url.content, "html.parser")
        div_profile_box = soup_player.find("div", class_="profile-box")
        row = {"Name" : name, "URL" : player_url}
        
        for p in div_profile_box.find_all("p"):
            try:
                key, value = p.get_text(strip=True).split(':', 1)
                row[key.strip()] = value.strip()
            except:     # not all entries have values
                pass

        data.append(row)

    return data

urls = [
    'https://basketball.realgm.com/dleague/players/2022',
    'https://basketball.realgm.com/dleague/players/2021',
    'https://basketball.realgm.com/dleague/players/2020',
]


for url in urls:
    print(f"Getting: {url}")
    data = get_links(url)
    
    for entry in data:
        print(entry)

You need to combine your two scripts together and make requests for each player. Try the following approach. This searches for <td> tags that have the data-td=Player attribute:

import requests
from bs4 import BeautifulSoup

def get_links(url):
    data = []
    req_url = requests.get(url)
    soup = BeautifulSoup(req_url.content, "html.parser")

    for td in soup.find_all('td', {'data-th' : 'Player'}):
        a_tag = td.a
        name = a_tag.text
        player_url = a_tag['href']
        print(f"Getting {name}")

        req_player_url = requests.get(f"https://basketball.realgm.com{player_url}")
        soup_player = BeautifulSoup(req_player_url.content, "html.parser")
        div_profile_box = soup_player.find("div", class_="profile-box")
        row = {"Name" : name, "URL" : player_url}
        
        for p in div_profile_box.find_all("p"):
            try:
                key, value = p.get_text(strip=True).split(':', 1)
                row[key.strip()] = value.strip()
            except:     # not all entries have values
                pass

        data.append(row)

    return data

urls = [
    'https://basketball.realgm.com/dleague/players/2022',
    'https://basketball.realgm.com/dleague/players/2021',
    'https://basketball.realgm.com/dleague/players/2020',
]


for url in urls:
    print(f"Getting: {url}")
    data = get_links(url)
    
    for entry in data:
        print(entry)

从多个URL中提取P标签

三人与歌 2025-02-18 04:27:56

如果您在绘制下一个矩形之前将矩形声明在drawRectangle函数外面,则可以从地图上删除它:

var rectangle;
function drawRectangle()
{
  if(rectangle)
    rectangle.remove(map)

  var north = document.getElementById("north").value;
  var west = document.getElementById("west").value;
  var east = document.getElementById("east").value;
  var south = document.getElementById("south").value;
  var lat_lon = [[north,east],[south,west]];

  rectangle = L.rectangle(lat_lon, { draggable: true ,redraw:true});
  rectangle.addTo(map);
  map.fitBounds(rectangle.getBounds());
}

或者如果您希望在单击矩形按钮中将该逻辑放入事件处理程序中:

map.on('editable:drawing:move', function (e) { 
  if(rectangle)
    rectangle.remove(map)
});

If you declare rectangle outside of the drawRectangle function you can remove it from the map before you draw the next rectangle:

var rectangle;
function drawRectangle()
{
  if(rectangle)
    rectangle.remove(map)

  var north = document.getElementById("north").value;
  var west = document.getElementById("west").value;
  var east = document.getElementById("east").value;
  var south = document.getElementById("south").value;
  var lat_lon = [[north,east],[south,west]];

  rectangle = L.rectangle(lat_lon, { draggable: true ,redraw:true});
  rectangle.addTo(map);
  map.fitBounds(rectangle.getBounds());
}

Or if you want it to be removed when you click the rectangle button put that logic in the event handler:

map.on('editable:drawing:move', function (e) { 
  if(rectangle)
    rectangle.remove(map)
});

在地图上绘制边界矩形后,绘制另一个矩形不会删除上一个矩形

三人与歌 2025-02-18 04:27:08

您必须确保完成一些步骤。首先,确保您的API密钥不受设备的限制。您可以设置限制无限制的键,也可以将您的真实键添加到API密钥中。并获得访问权限。

也是基本的东西。确保为您的项目激活所有所需的SDK。如果您可以提供更多数据,那就更好了。那有点有帮助。另外,不要忘记将API键添加到Android项目中的XML文件中。如果您为Android做。

(顺便说一句,问题是您的凭据。首先解决。然后您可以找到获得坐标的方法。这很容易。您已经在那里了。)

There are a few steps you have to make sure you complete. First, make sure your API key is not restricted for your device. You can either set the key to restrict none or just add your authentic key to the API key. And get the access.

Also basic stuff. Make sure all the needed SDK's are activated for your project. And It would be better if you can provide some more data. That would be kinda helpful. Also don't forget to add your api key to the xml file inside your android project. if you're doing it for android.

(BTW the issue is with your credentials. First solve that. Then you can find the way to get the coordinates. It's pretty easy. You're already there.)

如何使用Google Map从地址获取坐标

三人与歌 2025-02-18 02:32:16

您可以尝试取决于方法以按顺序执行测试用例。但是,如果任何一个测试用例失败了,则将其所有下一个测试用例。

You can try depends on method to execute test case in sequence. But if any one test case gets failed then it will.skip all next test cases.

如何使用Selenium中的TestNG从多个类中执行多个类的测试用例

三人与歌 2025-02-18 02:03:16

似乎这不是有效的API URL,为了检测问题是什么,我想在获取函数中添加尝试/捕获块:

const fetchWeatherData = async () => {
    try {
      const response = await axios.get('http://mock-api-call/weather/get-weather');
     // Just put some log to ensure you have the response.
     const {data} = response;
     if (data?.result?.weather) {
        setWeather(data?.result?.weather);
      }
    } catch(error) {
      console.log("An Error is occured : ", error);
    }
  };

It seems like it's not a valid api url, in order to detect what the issue is , i would like to add try/catch block to the fetch function :

const fetchWeatherData = async () => {
    try {
      const response = await axios.get('http://mock-api-call/weather/get-weather');
     // Just put some log to ensure you have the response.
     const {data} = response;
     if (data?.result?.weather) {
        setWeather(data?.result?.weather);
      }
    } catch(error) {
      console.log("An Error is occured : ", error);
    }
  };

TypeError:无法读取未定义的属性(读取&#x27; data&#x27;)这是由于我的使用情况而引起的吗?

三人与歌 2025-02-18 02:02:24

您是您要求代码等到每个 fetch 通过使用等待 on fetch 的返回值(然后再次在返回值上, JSON )在您的循环中。因此,它将做到这一点:等到该请求完成,然后再进行下一个循环迭代。

如果您不想这样做,则需要一个接一个地启动每个 Fetch ,然后等待所有人完成。我可能只将其中一个用于一个功能,然后将其称为五次,建立返回的承诺的数组,然后等待Promise.all(/*....*/)< /code>那些承诺,沿着这些行:(

document.getElementById("img").style.display = "block";
// Fetch one item
const fetchOne = async (i) => {
    const response = await fetch(`https://jsonplaceholder.typicode.com/photos/?albumId=${i}`);
    if (!response.ok) {
        throw new Error(`HTTP error ${response.status}`);
    }
    const data = await response.json();
    document.getElementById("img").style.display = "none";

    const display = document.querySelector(".display-images");
    const albumNo = document.querySelector(".album-no");
    //   document.getElementById('img').style.display = "block";
    // document.getElementById('img').style.display = "none";]
    display.innerHTML += `<div class="album-${i}>`;
    for (let z = 1; z <= 5; z++) {
        display.innerHTML += `<img id="img" alt="pic-from-album${data[i].albumId}" src="${data[z].url}"/>`;
    }
    display.innerHTML += `<div>`;
};
// ...
await Promise.all(Array.from({length: 5}, (_, i) => fetchOne(i + 1)));
// All done

我以。 ],它包含解析 JSON的结果。

You're asking for the code to wait until each fetch finishes by using await on fetch's return value (then again on the return value of json) in your loop. So it will do just that: wait until that request is complete before moving on to the next loop iteration.

If you don't want to do that, you need to start each fetch one after another and then wait for them all to complete. I'd probably break out the work for just one of them into a function, then call it five times, building an array of the promises it returns, then await Promise.all(/*...*/) those promises, something along these lines:

document.getElementById("img").style.display = "block";
// Fetch one item
const fetchOne = async (i) => {
    const response = await fetch(`https://jsonplaceholder.typicode.com/photos/?albumId=${i}`);
    if (!response.ok) {
        throw new Error(`HTTP error ${response.status}`);
    }
    const data = await response.json();
    document.getElementById("img").style.display = "none";

    const display = document.querySelector(".display-images");
    const albumNo = document.querySelector(".album-no");
    //   document.getElementById('img').style.display = "block";
    // document.getElementById('img').style.display = "none";]
    display.innerHTML += `<div class="album-${i}>`;
    for (let z = 1; z <= 5; z++) {
        display.innerHTML += `<img id="img" alt="pic-from-album${data[i].albumId}" src="${data[z].url}"/>`;
    }
    display.innerHTML += `<div>`;
};
// ...
await Promise.all(Array.from({length: 5}, (_, i) => fetchOne(i + 1)));
// All done

(I took the version with .then as my starting point for the above, since the two versions in your question were so different and you said the one with .then worked... Also note that I renamed the variable json to data, since it doesn't contain JSON [it's not a string], it contains the result of parsing JSON.)

异步等待提取

三人与歌 2025-02-18 00:08:54

您可以下载远程文件并将它们与您的项目一起包装。

因此,您始终需要访问LIB模块,您会在本地找到它们。

You can download the remote files and package them along with your project.

So always you need to access the lib modules, you will find them locally.

将JS函数分为使用公共模块的不同文件

三人与歌 2025-02-17 12:26:40

只是为了澄清:仅在固定元素上设置z索引就无法解决问题。设置绝对位置不会使您产生效果。也许将父母设置为固定位置,然后将孩子设置为绝对位置和适当的z索引?

一个例子:

.fixed { position: fixed; z-index: 4000000; width: 200px; right: 0; top: 0; cursor: pointer; }
.fixed .show-menu { display:block; background-color: #ffffff; width:100%; padding: 10px; font-size: 18px; right: 0; position: absolute; z-index: 60000000; }

Just to clarify: Just setting the z-index on a fixed element won't do the trick. Setting the absolute position won't give you the effect your after. Perhaps setting a parent to fixed position and the child to absolute position and the appropriate z-index?

An example:

.fixed { position: fixed; z-index: 4000000; width: 200px; right: 0; top: 0; cursor: pointer; }
.fixed .show-menu { display:block; background-color: #ffffff; width:100%; padding: 10px; font-size: 18px; right: 0; position: absolute; z-index: 60000000; }

固定位置div总是出现在顶部吗?

三人与歌 2025-02-17 10:15:03

首先,这看起来像是一个错字

channel;client.get.channel(804884691328303115)

,就像是

channel = client.get.channel(804884691328303115)

下一个, channel.activity 不是一回事。我假设您正在寻找 Member.Activity 之类的东西。您将不得不循环浏览所有成员&amp;检查他们的每个活动。

最后,如果您想访问人们的准则/活动,则需要意图。为了使会员在获得成员时正确的准确性,您还需要成员意图。

文档: /a>

确保在代码中启用它&amp;在您在Discord开发人员仪表板上的应用程序中。

First off, this looks like a typo

channel;client.get.channel(804884691328303115)

Looks like it should be

channel = client.get.channel(804884691328303115)

Next, Channel.activity is not a thing. I assume you're looking for something like Member.activity. You'll have to loop through all members & check each of their activities.

Lastly, if you want to have access to people's precenses/activities, you need the Presence Intent. For proper accuracy when getting the members you'll also need the Members Intent.

Docs: https://discordpy.readthedocs.io/en/stable/intents.html

Make sure to enable it both in code & in your application on the Discord Developers dashboard.

discord.py不能检测到丰富的存在

三人与歌 2025-02-17 04:32:26

只需循环浏览字符,然后检查返回索引,

PS C:\> $message = "ab/cde/f/ghijklm/no/p"
PS C:\> $slash_array = for ($i = 0; $i -lt $message.Length; $i++)
                           { if ($message[$i] -eq '/') { $i + 1 } }
PS C:\> $slash_array
3
7
9
17
20
PS C:\> $slash_array -join ', '
3, 7, 9, 17, 20
PS C:\>

但是如果您只想在任何非斜切字符之后插入斜杠,为什么不只是进行正则匹配,然后替换呢?

PS C:\> $message -replace '([^/])(?!/)', '$1/'
a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/

([^/])(?!/)匹配一个不斜切的角色,该字符不随后是斜线,然后在匹配的

其他一些替代方案之后添加斜杠:

PS C:\> ($message.ToCharArray() | Where-Object { $_ -ne '/' }) -join '/'
a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p
PS C:\> $message.Replace("/", "").ToCharArray() -join '/'
a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p

Just loop through the characters and check then return the index

PS C:\> $message = "ab/cde/f/ghijklm/no/p"
PS C:\> $slash_array = for ($i = 0; $i -lt $message.Length; $i++)
                           { if ($message[$i] -eq '/') { $i + 1 } }
PS C:\> $slash_array
3
7
9
17
20
PS C:\> $slash_array -join ', '
3, 7, 9, 17, 20
PS C:\>

But if you just want to insert a slash after any non-slash character why don't just do a regex match then replace?

PS C:\> $message -replace '([^/])(?!/)', '$1/'
a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/

([^/])(?!/) matches a non-slash character that's not followed by a slash, then add a slash after the matched character

Some other alternatives:

PS C:\> ($message.ToCharArray() | Where-Object { $_ -ne '/' }) -join '/'
a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p
PS C:\> $message.Replace("/", "").ToCharArray() -join '/'
a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p

如何在字符串中保存某些字符的所有位置?

三人与歌 2025-02-17 00:02:30

您可以关注 and
这些说明将帮助您设置 google-services.plist 文件。

另外,如果按照说明设置应用程序后,如果您仍然面临错误,请将您的呼叫围绕在函数上:

try {
  HttpsCallable callable = FirebaseFunctions.instance.httpsCallable("loadNews");
  final result =
      await callable.call();
  print(data);
} on FirebaseFunctionsException catch (error) {
  print(error.code);
  print(error.details);
  print(error.message);
}

并在日志中分享您获得的内容(错误代码,详细信息,详细信息和消息将在日志)。

Can you follow this and this ?
These instructions will help you setup the Google-Services.plist file.

Also, if after setting up your app as per the instructions, if you still face errors, please surround your call to the function like this:

try {
  HttpsCallable callable = FirebaseFunctions.instance.httpsCallable("loadNews");
  final result =
      await callable.call();
  print(data);
} on FirebaseFunctionsException catch (error) {
  print(error.code);
  print(error.details);
  print(error.message);
}

And share what you get in the logs (The error code, details and message will be printed in the logs).

我如何正确设置我的颤抖项目以调用云功能?

更多

推荐作者

佚名

文章 0 评论 0

今天

文章 0 评论 0

゛时过境迁

文章 0 评论 0

达拉崩吧

文章 0 评论 0

呆萌少年

文章 0 评论 0

孤者何惧

文章 0 评论 0

更多

友情链接

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