蛮可爱

文章 评论 浏览 29

蛮可爱 2025-02-20 22:30:09

可以使用X和Y坐标来回答这个问题,而没有jQuery:

       var isPointerEventInsideElement = function (event, element) {
            var pos = {
                x: event.targetTouches ? event.targetTouches[0].clientX : event.clientX,
                y: event.targetTouches ? event.targetTouches[0].clientY : event.clientY
            };
            var rect = element.getBoundingClientRect();
            return  pos.x < rect.right && pos.x > rect.left && pos.y < rect.bottom && pos.y > rect.top;
        };

        document.querySelector('#my-element').addEventListener('click', function (event) {
           console.log(isPointerEventInsideElement(event, document.querySelector('#my-any-child-element')))
        });

This question can be answered with X and Y coordinates and without JQuery:

       var isPointerEventInsideElement = function (event, element) {
            var pos = {
                x: event.targetTouches ? event.targetTouches[0].clientX : event.clientX,
                y: event.targetTouches ? event.targetTouches[0].clientY : event.clientY
            };
            var rect = element.getBoundingClientRect();
            return  pos.x < rect.right && pos.x > rect.left && pos.y < rect.bottom && pos.y > rect.top;
        };

        document.querySelector('#my-element').addEventListener('click', function (event) {
           console.log(isPointerEventInsideElement(event, document.querySelector('#my-any-child-element')))
        });

通过单个事件处理程序检测到元素内部/元素内部/外部

蛮可爱 2025-02-20 22:11:30

您需要在Azure事件网格中注册Azure Kubernetes服务(AKS)。这可以通过 cli powershell 来完成。

您需要执行一组命令来完成任务:

  1. 启用事件网格资源提供商

  2. 使用ak aks create命令

    创建AKS群集

  3. 创建一个AKS群集,使用az eventHubs namespace创建命名空间和事件中心,createaz eventHubs eventhubs eventhub create

中心/azure/aks/quickstart-event-rid?tabs = azure-cli“ rel =“ nofollow noreferrer”>官方文档通过使用给定示例实现

You need to register the Azure Kubernetes Service (AKS) in Azure Event Grid. This can be done either through CLI or Powershell.

There is a set of commands you need to perform to complete the task:

  1. Enable the Event Grid resource provider

  2. Create an AKS cluster using the az aks create command

  3. Create a namespace and event hub using az eventhubs namespace create and az eventhubs eventhub create

Refer the official document to implement by using the given examples

建立Azureeventhub&amp; Azurekubernetes

蛮可爱 2025-02-20 21:32:49

如果我正确理解问题,这可能会有所帮助:

lines = []
try:
    while line := input():
        lines.append(line)
except EOFError:
    pass
print(lines)

这将处理交互式和重定向输入(STDIN)

If I understand the problem correctly, this may help:

lines = []
try:
    while line := input():
        lines.append(line)
except EOFError:
    pass
print(lines)

This will handle both interactive and redirected input (stdin)

循环通过无限的多行输入

蛮可爱 2025-02-20 20:30:43

解决方案1:在HTML

<si-icon [icon]="
    item.isSelected 
    ? 'element-face-' + item.faceColor + '-filled' 
    : 'element-face-' + item.faceColor">
</si-icon>

解决方案2:从组件中获取样式名称。

getIconStyle(isSelected: boolean, faceColor: string): string {
  return isSelected
    ? `element-face-${faceColor}-filled`
    : `element-face-${faceColor}`;
}
<si-icon [icon]="getIconStyle(item.isSelected, item.faceColor)">
</si-icon>

示例stackblitz示例

Solution 1: In HTML

<si-icon [icon]="
    item.isSelected 
    ? 'element-face-' + item.faceColor + '-filled' 
    : 'element-face-' + item.faceColor">
</si-icon>

Solution 2: Get style name from component.

getIconStyle(isSelected: boolean, faceColor: string): string {
  return isSelected
    ? `element-face-${faceColor}-filled`
    : `element-face-${faceColor}`;
}
<si-icon [icon]="getIconStyle(item.isSelected, item.faceColor)">
</si-icon>

Sample Stackblitz Example

Angular-在输入属性绑定中使用三元算子插值

蛮可爱 2025-02-20 17:28:06

列表 [python.docs] 。

有多种方法(我发现2)。迭代:

  • itermonthdates ,只关心 day 属性

  • itermonthdays3 ,只关心最后一个元素(每个元素)元组)

code00.py

#!/usr/bin/env python

import calendar as cal
import sys


def main(*argv):
    c = cal.Calendar()
    year = 2022
    months = (
        6,
        7,
        8,
        9,
    )

    for month in months:
        print("\n{:04d}/{:02d}:".format(year, month))
        print("{:s}: {:}".format(c.itermonthdays.__name__, list(c.itermonthdays(year, month))))
        print("{:s}: {:}".format(c.itermonthdates.__name__, [e.day for e in c.itermonthdates(year, month)]))
        print("{:s}: {:}".format(c.itermonthdays3.__name__, [e[-1] for e in c.itermonthdays3(year, month)]))


if __name__ == "__main__":
    print("Python {:s} {:03d}bit on {:s}\n".format(" ".join(elem.strip() for elem in sys.version.split("\n")),
                                                   64 if sys.maxsize > 0x100000000 else 32, sys.platform))
    rc = main(*sys.argv[1:])
    print("\nDone.")
    sys.exit(rc)

输出

  [cfati@cfati-5510-0:e:\ work \ dev \ stackoverflow \ q072898034]&gt; ”
Python 3.9.9(标签/v3.9.9:CCB0E6A,2021,18:08:50)[MSC V.1929 64 BIT(AMD64)] 064BIT


2022/06:
itermonthdays:[0,0,1,2,3,4,4,6,7,7,8,9,10,11,11,12,13,14,14,16,17,17,19,19,20,20,21,22 ,23、24、25、26、27、28、29、30、0、0、0]
itermonthdates:[30、31、2、3、4、5、6、7、8、9、10、11、11、12、13、13、14、15、16、17、19、19、20、20、21、22 ,23、24、25、26、27、28、29、30、1、2、3]
itermonthdays3:[30,31,2,2,3,4,5,6,7,7,8,9,10,11,11,12,13,14,14,16,17,17,19,19,20,20,21,21,22 ,23、24、25、26、27、28、29、30、1、2、3]

2022/07:
itermonthy:[0,0,0,0,1,2,2,3,4,5,6,7,7,8,9,11,11,11,12,13,14,15,15,16,17,18,18,18,19,20 ,21、22、23、24、25、26、27、28、29、30、31]
itermonthdates:[27,28,29,30,2,2,2,3,4,5,6,7,7,8,9,10,11,11,12,14,14,15,15,17,17,18,18,18,19,20 ,21、22、23、24、25、26、27、28、29、30、31]
itermonthdays3:[27、28、29、30、2、3、4、5、6、7、8、9、10、11、11、12、13、14、15、16、16、17、18、19、19、20 ,21、22、23、24、25、26、27、28、29、30、31]

2022/08:
itermonthdays:[1,2,3,4,5,6,7,7,8,9,10,11,11,12,13,14,15,16,17,18,19,20,21,21,22,23,23,24 ,25、26、27、28、29、30、31、0、0、0、0]
itermonthdates:[1,2,3,4,5,6,7,7,8,9,10,11,11,12,13,14,15,16,17,18,19,20,21,21,22,23,23,24 ,25、26、27、28、29、30、31、1、2、3、4]
itermonthdays3:[1,2,3,4,5,6,7,8,8,9,10,11,11,12,13,14,14,16,17,18,19,20,21,21,22,22,23,24 ,25、26、27、28、29、30、31、1、2、3、4]

2022/09:
itermonthy:[0,0,0,1,2,2,3,4,5,6,7,7,8,9,10,11,11,12,13,14,15,16,17,17,18,19,19,20,21 ,22、23、24、25、26、27、28、29、30、0、0]
itermonthdates:[29,30,31,1,2,2,3,4,5,6,7,7,8,9,10,11,11,12,13,14,15,16,17,18,18,19,19,20,21 ,22、23、24、25、26、27、28、29、30、1、2]
itermonthdays3:[29、30、31、1、2、3、4、5、6、7、8、9、10、11、11、12、13、14、15、16、17、17、18、19、19、20、21 ,22、23、24、25、26、27、28、29、30、1、2]

完毕。
 

如果也关心一周中的一天(如评论中的要求),则可以将(通过 zip )合并在一起:

 &gt;&gt;&gt;导入日历为cal
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; c = cal.calendar()
&gt;&gt;&gt;年= 2022
&gt;&gt;&gt;月= 9
&gt;&gt;&gt;
&gt;&gt;&gt; [(e3 [-1],e2 [-1])对于e3,zip中的e2(c.itermonthdays3(年,月份),c.itermonthdays2(年,月份))]
[(29,0),(30,1),(31,2),(1,3),(2,4),(3,5),(4,6),(5,5,0) 6,1),(7,2),(8,3),(9,4),(10,5),(11,6),(12,0),(13,1) 2),(15,3),(16,4), (17,5),(18,6),(19,0),(20,1),(21,2),(22,3),(23,4),(24,5),(25 ,6),(26,0),(27,1),(28,2),(29,3),(30,4),(1,5),(2,6)]
 

Listing [Python.Docs]: calendar - General calendar-related functions.

There is more than one way (I found 2). Iterate over:

  • itermonthdates, only caring about the day attribute

  • itermonthdays3, only caring about the last element (of each tuple)

code00.py:

#!/usr/bin/env python

import calendar as cal
import sys


def main(*argv):
    c = cal.Calendar()
    year = 2022
    months = (
        6,
        7,
        8,
        9,
    )

    for month in months:
        print("\n{:04d}/{:02d}:".format(year, month))
        print("{:s}: {:}".format(c.itermonthdays.__name__, list(c.itermonthdays(year, month))))
        print("{:s}: {:}".format(c.itermonthdates.__name__, [e.day for e in c.itermonthdates(year, month)]))
        print("{:s}: {:}".format(c.itermonthdays3.__name__, [e[-1] for e in c.itermonthdays3(year, month)]))


if __name__ == "__main__":
    print("Python {:s} {:03d}bit on {:s}\n".format(" ".join(elem.strip() for elem in sys.version.split("\n")),
                                                   64 if sys.maxsize > 0x100000000 else 32, sys.platform))
    rc = main(*sys.argv[1:])
    print("\nDone.")
    sys.exit(rc)

Output:

[cfati@CFATI-5510-0:e:\Work\Dev\StackOverflow\q072898034]> "e:\Work\Dev\VEnvs\py_pc064_03.09_test0\Scripts\python.exe" ./code00.py
Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] 064bit on win32


2022/06:
itermonthdays: [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 0, 0]
itermonthdates: [30, 31, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3]
itermonthdays3: [30, 31, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3]

2022/07:
itermonthdays: [0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]
itermonthdates: [27, 28, 29, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]
itermonthdays3: [27, 28, 29, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]

2022/08:
itermonthdays: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 0, 0, 0]
itermonthdates: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1, 2, 3, 4]
itermonthdays3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1, 2, 3, 4]

2022/09:
itermonthdays: [0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 0]
itermonthdates: [29, 30, 31, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2]
itermonthdays3: [29, 30, 31, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2]

Done.

If caring about day of week as well (as required in a comment), itermonthdays3 and itermonthdays2 could be combined (via zip) together:

>>> import calendar as cal
>>>
>>>
>>> c = cal.Calendar()
>>> year = 2022
>>> month = 9
>>>
>>> [(e3[-1], e2[-1]) for e3, e2 in zip(c.itermonthdays3(year, month), c.itermonthdays2(year, month))]
[(29, 0), (30, 1), (31, 2), (1, 3), (2, 4), (3, 5), (4, 6), (5, 0), (6, 1), (7, 2), (8, 3), (9, 4), (10, 5), (11, 6), (12, 0), (13, 1), (14, 2), (15, 3), (16, 4), (17, 5), (18, 6), (19, 0), (20, 1), (21, 2), (22, 3), (23, 4), (24, 5), (25, 6), (26, 0), (27, 1), (28, 2), (29, 3), (30, 4), (1, 5), (2, 6)]

获取上个月的日期出现,而不是在日历python库中出现

蛮可爱 2025-02-20 15:33:11

您必须base64编码电子邮件的原始内容,以便它允许发送电子邮件。您可以使用此在线编码器以生成电子邮件,然后将其进行编码,然后提交给原始参数,示例中的参数应该是:

From: [email protected],
To: [email protected],
Subject:Gmail API test
Content-type: text/html;charset=iso-8859-1,

This is a test.

一旦编码,您只需要在原始参数中添加结果,例如:

curl --request POST \
  'https://gmail.googleapis.com/gmail/v1/users/me/messages/send?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"raw":"RnJvbTogdGVzdEBnbWFpbC5jb20sCiAgICBUbzogdGVzdDJAZ21haWwuY29tLAogICAgU3ViamVjdDpHbWFpbCBBUEkgdGVzdAogICAgQ29udGVudC10eXBlOiB0ZXh0L2h0bWw7Y2hhcnNldD1pc28tODg1OS0xLAoKICAgIFRoaXMgaXMgYSB0ZXN0IHBsZWFzZSB3b3JrLg=="}' \
  --compressed

然后将导致发送电子邮件。

You had to base64 encode the raw content of the email so it allows to send the email. You can use this online encoder to generate the email and then encode it and submit it to the raw parameter, the parameters in your example should be like:

From: [email protected],
To: [email protected],
Subject:Gmail API test
Content-type: text/html;charset=iso-8859-1,

This is a test.

Once encoded you just need to add the result in the raw parameter like:

curl --request POST \
  'https://gmail.googleapis.com/gmail/v1/users/me/messages/send?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"raw":"RnJvbTogdGVzdEBnbWFpbC5jb20sCiAgICBUbzogdGVzdDJAZ21haWwuY29tLAogICAgU3ViamVjdDpHbWFpbCBBUEkgdGVzdAogICAgQ29udGVudC10eXBlOiB0ZXh0L2h0bWw7Y2hhcnNldD1pc28tODg1OS0xLAoKICAgIFRoaXMgaXMgYSB0ZXN0IHBsZWFzZSB3b3JrLg=="}' \
  --compressed

Then it will result in the email being sent.

当我用卷发打电话给API Gmail时,需要400个收件人地址

蛮可爱 2025-02-20 10:52:12

仅将组保持4个或多个连续true

df.groupby('id').filter(lambda x: x['is_bool'].rolling(4).sum().max() >= 4)

输出:

   id  is_bool
0   1    False
1   1     True
2   1     True
3   1     True
4   1     True

相对:

df.groupby('id').filter(lambda x: x['is_bool'].rolling(4).sum().max() < 4)

输出:

   id  is_bool
5   2    False
6   2     True
7   2     True
8   2     True

Only keeping groups with 4 or more consecutive True

df.groupby('id').filter(lambda x: x['is_bool'].rolling(4).sum().max() >= 4)

Output:

   id  is_bool
0   1    False
1   1     True
2   1     True
3   1     True
4   1     True

Opposite:

df.groupby('id').filter(lambda x: x['is_bool'].rolling(4).sum().max() < 4)

Output:

   id  is_bool
5   2    False
6   2     True
7   2     True
8   2     True

查找n或更多的价值符合价值

蛮可爱 2025-02-20 09:39:47

您可以使用查找(或过滤器

const jungle = [
  { name: "frog", threat: 0 },
  { name: "monkey", threat: 5 },
  { name: "gorilla", threat: 8 },
  { name: "lion", threat: 10 }
];

const names = (partial) => jungle.find(el => el.name.includes(partial)).name;

//You can also use "filter" method ==> 

//const names = (partial) => jungle.filter(el => el.name.includes(partial)).map(el => el.name) 



console.log(names("gor"))
console.log(names("illa"))
console.log(names("orill"))

You can use find (or filter)

const jungle = [
  { name: "frog", threat: 0 },
  { name: "monkey", threat: 5 },
  { name: "gorilla", threat: 8 },
  { name: "lion", threat: 10 }
];

const names = (partial) => jungle.find(el => el.name.includes(partial)).name;

//You can also use "filter" method ==> 

//const names = (partial) => jungle.filter(el => el.name.includes(partial)).map(el => el.name) 



console.log(names("gor"))
console.log(names("illa"))
console.log(names("orill"))

在数组对象中查找部分字符串文本

蛮可爱 2025-02-20 04:39:03

我相信,如果您使用的是lat和长行是直线的地图,例如“

import cv2
Directory = "directory of the image" 
img = cv2.imread(Directory)
#just displaying the initial image, not needed
cv2.imshow('image',img)
cv2.waitKey(5000)
cv2.destroyAllWindows()

#resize the image to 360,180 for lat and long locations
img = cv2.resize(img, (360, 180))
#draw a dot on the image in location: 
lat = 0 #your lat here
lat += 90
long = 0 #your longitude here 
long += 180 
img = cv2.circle(img, (x,y), 3, (0,0,255), -1) #format = (image, position, size of circle, colour)
#display the image in a window for 5 seconds (also not needed
cv2.imshow('image',img)
cv2.waitKey(5000)
cv2.destroyAllWindows()

I believe this code works if you are using a map where lat and long lines are straight lines such as image

import cv2
Directory = "directory of the image" 
img = cv2.imread(Directory)
#just displaying the initial image, not needed
cv2.imshow('image',img)
cv2.waitKey(5000)
cv2.destroyAllWindows()

#resize the image to 360,180 for lat and long locations
img = cv2.resize(img, (360, 180))
#draw a dot on the image in location: 
lat = 0 #your lat here
lat += 90
long = 0 #your longitude here 
long += 180 
img = cv2.circle(img, (x,y), 3, (0,0,255), -1) #format = (image, position, size of circle, colour)
#display the image in a window for 5 seconds (also not needed
cv2.imshow('image',img)
cv2.waitKey(5000)
cv2.destroyAllWindows()

将坐标转换为Python中图像上的一个点

蛮可爱 2025-02-20 03:01:32

因为您正在处理接口,所以您将无法将功能直接挂在内存中,因为它取决于指向接口的指针。在这种情况下,您必须利用一种称为VMT(虚拟方法表)挂钩的技术。为了实现这一目标,您需要能够检索内存中接口的指针,然后找到函数指针的虚拟方法表索引(偏移)。然后,您必须使用自己的功能地址覆盖。您的挂钩功能必须遵守原始功能的呼叫约定。

Because you're dealing with an interface, you won't be able to hook the function directly in memory since it's dependent on the pointer to the interface. In which case you have to utilize a technique called VMT(Virtual Method Table) hooking. In order to achieve this, you'll need to be able to retrieve the pointer to the interface in memory, then locate the virtual method table index(offset) of the function pointer. Which then you'll have to overwrite with your own function address. Your hooked function will have to comply with the calling convention of the original.

如何用Minhook钩上杂纹

蛮可爱 2025-02-19 16:30:59

检查 sagemaker定价页面在单击on demand ondemand notebook instances 选项卡。

AWS在Jupyter笔记本实例中如何收取存储费用?

您选择将EBS音量(GB/月)的大小收取,您选择附加到笔记本实例。

AWS如何为“数据进出您的端点(BYTES IN/OUT)”

收费

这是一种成本类型与托管模型的实时端点相关联,并且与笔记本电脑实例无关。

借助笔记本实例,您的网络成本类似于EC2实例(在同一可用性区域和VPC中免费以及区域S3。

Check SageMaker pricing page here after clicking the On-Demand Notebook Instances tab.

How does AWS charge for storage within the Jupyter Notebook instance?

You're charged by the size of the EBS volume (GB/Month) you choose to attach to the notebook instance.

How does AWS charge for "data in and out of your Endpoint (Bytes in/out)"

This is a cost type is associated with realtime endpoints that host a model, and is not related to notebook instances.
With notebook instances you're networking cost is similar to an EC2 instance (free within the same availability zone and VPC and to regional S3. And incur cost for inter-AZ, inter-region, and outgoing Internet traffic).

AWS是否可以在一个SageMaker笔记本实例上运行多个Jupyter笔记本电脑收费?

蛮可爱 2025-02-19 08:50:12

没有办法自动执行此操作,但我建议您:

  1. 拉新图像。
  2. 运行Docker Image Prune -filter =&lt; your_filter&gt;按日期和/或标签过滤。

这是 filter aurg aurg groung offorment文档

There is no way to do it automatically, but I suggest you:

  1. Pull new image.
  2. Run docker image prune --filter=<YOUR_FILTER> filtering by a date and/or label.

Here is Filter aurgment official documentation.

如何删除新的Docker图像

蛮可爱 2025-02-19 02:35:22

点不是 其中 使用它。问题是 它使用的 。如果其定义不使用任何非静态成员,我将根据我不会将冗余参数传递给任何函数的相同原则(除非将它们用于过载重新负载),否

The point isn't where it is used. The question is what it uses. If its definition doesn't use any nonstatic members, I would make the function static, according to the same principle that I wouldn't pass a redundant parameter to any function (unless they were to be used in overload resulion)

私人静态成员功能的用途是什么?

蛮可爱 2025-02-19 00:06:00

您的支架无法正确平衡。尝试:

Analysis/{PhenV1/{Genes/{CNV,SNV},Variants/{CNV,SNV}},PhenV2/{Genes/{CNV,SNV},Variants/{CNV,SNV}},HypV1/{Genes/{CNV,SN},Variants/{CMC,VT}},HypV2/{Genes/{CNV,SNV},Variants/{CNV,SNV}}}

可以简化一点:

Analysis/{{PhenV1,PhenV2,HypV2}/{Genes,Variants}/{CNV,SNV},HypV1/{Genes/{CNV,SN},Variants/{CMC,VT}}}

Your brackets are not properly balanced. Try:

Analysis/{PhenV1/{Genes/{CNV,SNV},Variants/{CNV,SNV}},PhenV2/{Genes/{CNV,SNV},Variants/{CNV,SNV}},HypV1/{Genes/{CNV,SN},Variants/{CMC,VT}},HypV2/{Genes/{CNV,SNV},Variants/{CNV,SNV}}}

Which can be simplified a bit:

Analysis/{{PhenV1,PhenV2,HypV2}/{Genes,Variants}/{CNV,SNV},HypV1/{Genes/{CNV,SN},Variants/{CMC,VT}}}

如何使用多个子目录创建父目录,这些子目录在相应的子目录中嵌套了子目录

蛮可爱 2025-02-18 17:18:58

您的JavaScript将在客户端上执行,而不是在服务器上执行。这意味着foo未在服务器端进行评估,因此其值不能写入服务器上的文件。

思考此过程的最佳方法是,您正在动态生成文本文件。您要生成的文本仅一旦浏览器将其解释就变为可执行代码。只有您在服务器上评估&lt;?php标签之间的位置。

顺便说一句,养成将随机的PHP逻辑嵌入HTML或JavaScript中的习惯可能导致严重的代码。我从痛苦的经历中说话。

Your Javascript will execute on the client, not on the server. This means that foo is not evaluated on the server side and therefore its value can't be written to a file on the server.

The best way to think about this process is as if you're generating a text file dynamically. The text you're generating only becomes executable code once the browser interprets it. Only what you place between <?php tags is evaluated on the server.

By the way, making a habit of embedding random pieces of PHP logic in HTML or Javascript can lead to seriously convoluted code. I speak from painful experience.

客户端和服务器端编程之间有什么区别?

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

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