run-length-encoding 相关问题


删除列表中奇数长度的元素

我有一个列表,我想删除具有奇数长度的元素: 我的列表<- list() my_list$a <- c(1,2,3,4) #length 4 my_list$b <- c(1,2,3) # length 3 my_list$c <- c(5,6,7,8,6,7) #


flutter pub run build_runner 构建已弃用

当我运行 flutter pub run build_runner build --delete-conflicting-outputs 时,出现以下错误: 已弃用。请改用“dart run”。 [INFO] 生成构建脚本已完成,耗时 169 毫秒 [警告] ../....


运行 npm run dev || 时出现总线错误npm 启动

我似乎无法在我的 macOS 计算机上运行 npm run dev 或 npm start 。 每次尝试这样做时,我都会收到总线错误消息,输出通常如下所示: klvn git:(主) ✗ npm run dev ...


如何解决错误“as.data.frame.default(data) 中的错误:无法强制类‘“lm”’到 data.frame”

abc4 <- lm(Sales~., data=abc4) summary(abc4) abc5 <- lm(Sales~ T+June+July+August+September+October+November+December, data=abc4) summary(abc5) I'm trying to run regression. If I run the fi...


带有 Cloud Run CORS 的 Google Api 网关

有没有办法在 Cloud Run 服务的 Google Api 网关配置中启用 Cors? 我在服务中启用了 Cors,但我总是得到 从源“http://


SqlParameter 输出返回 null

我有一个存储过程,列出从 @index 开始的项目并返回下一个 @length 项目。此外,@available Output 参数返回集合中项目的计数。 创建进程...


输入非假,又名“真”

在TypeScript中,有truthy的类型吗? 我有这个方法: Object.keys(lck.lockholders).length; 入队(k:任何,obj?:任何):无效 我认为使用 TS 有一种方法可以检查空字符串'...


错误 | prefect.flow_runs.runner - 流程运行进程退出,状态代码:-7

我在运行脚本时收到此完美错误。错误如下: 0%| | 0/2070 [00:00 我在运行脚本时收到此完美错误。错误如下: 0%| | 0/2070 [00:00<?, ?it/s]09:36:01.917 | ERROR | prefect.flow_runs.runner - Process for flow run 'auspicious-butterfly' exited with status code: -7 09:36:02.057 | INFO | prefect.flow_runs.runner - Reported flow run '1f314ccd-1472-4373-bb1b-4b3b6265b29a' as crashed: Flow run process exited with non-zero status code -7. 不知道为什么。任何帮助将不胜感激。 我和 Prefect 也有同样的错误。您有什么版本的 Prefect? Reported flow run 'bbaa6e16-bf5f-44ff-a31b-d68645f74bb1' as crashed: Flow run process exited with non-zero status code -7. Process for flow run 'xi5-zeon' exited with status code: -7


为什么这段代码没有显示我想要的结果? [已关闭]

让 numArr2 = [1, 2, 3, 4, 5, 6, 7]; numArr2.splice(1, 1); console.log(`numArr2 的长度为 ${numArr2.length()}`); 为什么这段代码没有显示 numArr2 的长度?


获取列位置

使用 iris 数据框,我想要列名称中带有“Length”的所有列的位置。 我可以使用下面的代码手动找到它们,但我想要一种方法可以让我......


docker 如何识别 run -v 选项是指主机目录还是 docker 卷?

当使用选项 -v a:b 执行 docker run 时,a 可以指主机上的目录,也可以指 docker 卷名称。 docker如何识别是哪一个?


XSL/XSLT - 动态获取父节点及其值

有人可以帮助我吗?我有一个 xml,可以在其中获取节点中节点的名称,例如值、宽度、高度、重量…… 例子: 有人可以帮助我吗?我有一个 xml,可以在其中获取节点中节点的名称,例如值、宽度、高度、重量…… 示例: <?xml version="1.0" encoding="utf-8"?> <Data totalExecutionTime="00:00:00.0076034" totalCount="1">   <Features>     <ProductID id="100" language="NLB" caption="Product ID" captionAlternative="Product ID" unit="" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="" viewGroup="" viewGroupOrder="0" topViewGroupId="b65b432a-1bf1-4fd4-ae92-03418d3204be" topViewGroup="Algemeen" topViewGroupOrder="1" viewOrder="0" form="Complex" dataType="String" readOnly="False" />     <Length id="245" language="NLB" caption="Lengte" captionAlternative="Lengte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="1" form="Simple" dataType="Number" readOnly="False" />     <Width id="242" language="NLB" caption="Breedte" captionAlternative="Breedte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="2" form="Simple" dataType="Number" readOnly="False" />     <Height id="244" language="NLB" caption="Hoogte" captionAlternative="Hoogte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="3" form="Simple" dataType="Number" readOnly="False" />     <Depth id="771" language="NLB" caption="Diepte" captionAlternative="Diepte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="4" form="Simple" dataType="Number" readOnly="False" />     <Weight id="243" language="NLB" caption="Gewicht" captionAlternative="Gewicht" unit="kg" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="5" form="Simple" dataType="Number" readOnly="False" />     <LoadCapacity id="457" language="NLB" caption="Draagvermogen" captionAlternative="Draagvermogen" unit="kg" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="6" form="Simple" dataType="Number" readOnly="False" />     <Volume id="435" language="NLB" caption="Inhoud" captionAlternative="Inhoud" unit="l" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="bfaf678b-8b9d-4cea-aa99-08edd8316dc7" viewGroup="Algemene specificaties" viewGroupOrder="13" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="7" form="Simple" dataType="Number" readOnly="False" />     <TireSize id="705" language="NLB" caption="Banden maat" captionAlternative="Banden maat" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="8" form="Simple" dataType="String" readOnly="False" />     <LoadingScoop id="706" language="NLB" caption="Laadschep" captionAlternative="Laadschep" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="9" form="Simple" dataType="String" readOnly="False" />   </Features>   <ProductID id="25137" parentId="0" brand="Normal" order="0" createdDate="2020-03-24T15:30:07.21" modifiedDate="2023-11-20T20:01:33.87">     <Value seq="0" modifiedDate="2020-03-24T15:30:10.493">111TA5851</Value>     <Width seq="0" modifiedDate="2020-03-24T15:30:10.493">515</Width>     <Height seq="0" modifiedDate="2020-03-24T15:30:10.493">1100</Height>     <Weight seq="0" modifiedDate="2020-04-02T13:18:09.44">7.7</Weight>     <LoadCapacity seq="0" modifiedDate="2020-03-24T15:30:10.493">150</LoadCapacity>     <LoadingScoop seq="0" modifiedDate="2020-03-24T15:30:10.493">350x170</LoadingScoop>   </ProductID> </Data> 我想要的是动态获取对应父节点的值。我可以获得如下节点名称: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <table> <xsl:for-each select="/Data/ProductID/*"> <xsl:variable name="myVariable" select="name(.)"/> <xsl:variable name="HasValue" select="count(/Data/ProductID/*)" /> <tr> <td><xsl:value-of select="name(.)" /></td> <td><xsl:value-of select="local-name()" /></td> <td><xsl:value-of select="name()" /></td> <td><xsl:value-of select="/Data/node($myVariable)/@unit" /></td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet> 但我不知道如何获取响应的父节点及其值,例如单位元素。 提前致谢并致以诚挚的问候 我已经尝试过但没用。我会不断收到错误:解析 '' 期间出现意外的标记 '$myVariable'。 我想你想声明一把钥匙 <xsl:key name="element-key" match="Data/Features" use="name()"/> 然后你想使用例如key('element-name', name())/@unit。


无法从 tmux 中的 `run-shell` 创建新会话

我有这个+x脚本 〜/ bin / tmux-test.sh: #!/usr/bin/bash tmux 新w 在我的 .tmux.conf 中: bind -n M-g run-shell `~/bin/tmux-test.sh` 有用... ...但是如果我将 tmux neww 更改为 tmux new (对于 cre...


在循环体中赋值?

我正在尝试构建一个数组,其中每个元素都是前一个元素的 2 倍。我尝试使用下面的循环但出现错误 循环条件中使用的变量“x”和“length”未在...中修改


突然 docker run 找不到 libz.so.1 [已关闭]

我使用 docker build 和 docker run 已经好几个星期了。我想放入容器中的可执行文件也运行良好。 突然我得到了这个我不明白的错误: root@DESKTOP-EVLULFV:/home/sim...


Google Cloud - 将用户信息从 IAP 传递到 Cloud Run

我有一个受身份感知代理 (IAP) 保护的内部 Cloud Run 服务。是否可以从应用程序内的 IAP 访问用户信息(例如正在使用该服务的电子邮件)? ...


动态获取父节点及其值

我有一个xml,我可以在其中获取节点中节点的名称,例如值、宽度、高度、重量... 例子: 我有一个 xml,可以在其中获取节点中节点的名称,例如值、宽度、高度、重量…… 示例: <?xml version="1.0" encoding="utf-8"?> <Data totalExecutionTime="00:00:00.0076034" totalCount="1">   <Features>     <ProductID id="100" language="NLB" caption="Product ID" captionAlternative="Product ID" unit="" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="" viewGroup="" viewGroupOrder="0" topViewGroupId="b65b432a-1bf1-4fd4-ae92-03418d3204be" topViewGroup="Algemeen" topViewGroupOrder="1" viewOrder="0" form="Complex" dataType="String" readOnly="False" />     <Length id="245" language="NLB" caption="Lengte" captionAlternative="Lengte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="1" form="Simple" dataType="Number" readOnly="False" />     <Width id="242" language="NLB" caption="Breedte" captionAlternative="Breedte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="2" form="Simple" dataType="Number" readOnly="False" />     <Height id="244" language="NLB" caption="Hoogte" captionAlternative="Hoogte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="3" form="Simple" dataType="Number" readOnly="False" />     <Depth id="771" language="NLB" caption="Diepte" captionAlternative="Diepte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="4" form="Simple" dataType="Number" readOnly="False" />     <Weight id="243" language="NLB" caption="Gewicht" captionAlternative="Gewicht" unit="kg" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="5" form="Simple" dataType="Number" readOnly="False" />     <LoadCapacity id="457" language="NLB" caption="Draagvermogen" captionAlternative="Draagvermogen" unit="kg" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="6" form="Simple" dataType="Number" readOnly="False" />     <Volume id="435" language="NLB" caption="Inhoud" captionAlternative="Inhoud" unit="l" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="bfaf678b-8b9d-4cea-aa99-08edd8316dc7" viewGroup="Algemene specificaties" viewGroupOrder="13" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="7" form="Simple" dataType="Number" readOnly="False" />     <TireSize id="705" language="NLB" caption="Banden maat" captionAlternative="Banden maat" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="8" form="Simple" dataType="String" readOnly="False" />     <LoadingScoop id="706" language="NLB" caption="Laadschep" captionAlternative="Laadschep" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="9" form="Simple" dataType="String" readOnly="False" />   </Features>   <ProductID id="25137" parentId="0" brand="Normal" order="0" createdDate="2020-03-24T15:30:07.21" modifiedDate="2023-11-20T20:01:33.87">     <Value seq="0" modifiedDate="2020-03-24T15:30:10.493">111TA5851</Value>     <Width seq="0" modifiedDate="2020-03-24T15:30:10.493">515</Width>     <Height seq="0" modifiedDate="2020-03-24T15:30:10.493">1100</Height>     <Weight seq="0" modifiedDate="2020-04-02T13:18:09.44">7.7</Weight>     <LoadCapacity seq="0" modifiedDate="2020-03-24T15:30:10.493">150</LoadCapacity>     <LoadingScoop seq="0" modifiedDate="2020-03-24T15:30:10.493">350x170</LoadingScoop>   </ProductID> </Data> 我想要的是动态获取对应父节点的hte值。我可以获得如下节点名称: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <table> <xsl:for-each select="/Data/ProductID/*"> <xsl:variable name="myVariable" select="name(.)"/> <xsl:variable name="HasValue" select="count(/Data/ProductID/*)" /> <tr> <td><xsl:value-of select="name(.)" /></td> <td><xsl:value-of select="local-name()" /></td> <td><xsl:value-of select="name()" /></td> <td><xsl:value-of select="/Data/node($myVariable)/@unit" /></td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet> 但是我不知道如何获取相应的父节点及其值,例如单位元素。 我已经尝试过<xsl:value-of select="/Data/$myVariable/@unit" /></td>,但不起作用。我会不断收到错误:Unexpected token '$myVariable' during parsing of '<AnyKindTest>'。 我想你想声明一把钥匙 <xsl:key name="element-key" match="Data/Features" use="name()"/> 然后你想使用例如key('element-key', name())/@unit。 你写道: <xsl:value-of select="/Data/$myVariable/@unit" /> 我认为你的问题可能是重复的 使用 2 个参数进行 xslt 测试 您正在尝试使用 $myVariable,就好像它所保存的字符串可以以文本方式替换到您的 XPath 表达式中一样。您可能想要的是 /Data/*[name()=$myVariable]/@unit 很多人都犯过这个错误,但我不知道为什么。我不认为人们会将变量 $op 设置为“+”或“-”,然后期望 @x $op @y 执行适当的加法或减法。除非他们以前的编程经验完全是用宏语言。


Docker 镜像 NGINX 未公开:无法访问站点

1。我正在使用本指南来获取要运行的 nginx 网络服务器映像并使用命令 docker run -p 8888:80 nginx docker run -p 80:80 nginx 我猜有两个或更多容器启动并运行......


如何仅使用转义字符和length()在java中反转字符串的第一个和最后一个字母?

我必须反转用户输入的字符串的第一个和最后一个字母,然后打印该单词,并反转字符串的第一个和最后一个字母,但不使用循环、charAt 和


Docker 的 RUN 文档示例不起作用

我尝试实现Docker本身提供的示例(https://www.docker.com/blog/introduction-to-heredocs-in-dockerfiles/) # 语法=docker/dockerfile:1.3-labs 来自 ubuntu:20.04 奔跑<<...


SecurityException:不允许启动服务Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (有额外功能)}

我尝试从 Google 获取我的 GCM 注册 ID。 我的代码: 字符串SENDER_ID =“722*****53”; /** * 向 GCM 服务器异步注册应用程序。 * * 存储注册信息... 我尝试从 Google 获取我的 GCM 注册 ID。 我的代码: String SENDER_ID = "722******53"; /** * Registers the application with GCM servers asynchronously. * <p> * Stores the registration ID and the app versionCode in the application's * shared preferences. */ private void registerInBackground() { new AsyncTask<Void, Void, String>() { @Override protected String doInBackground(Void... params) { String msg = ""; try { if (gcm == null) { gcm = GoogleCloudMessaging.getInstance(context); } regid = gcm.register(SENDER_ID); msg = "Device registered, registration ID=" + regid; // You should send the registration ID to your server over // HTTP, so it // can use GCM/HTTP or CCS to send messages to your app. sendRegistrationIdToBackend(); // For this demo: we don't need to send it because the // device will send // upstream messages to a server that echo back the message // using the // 'from' address in the message. // Persist the regID - no need to register again. storeRegistrationId(context, regid); } catch (IOException ex) { msg = "Error :" + ex.getMessage(); // If there is an error, don't just keep trying to register. // Require the user to click a button again, or perform // exponential back-off. } return msg; } @Override protected void onPostExecute(String msg) { mDisplay.append(msg + "\n"); } }.execute(null, null, null); } 我收到错误: 03-01 19:15:36.261: E/AndroidRuntime(3467): FATAL EXCEPTION: AsyncTask #1 03-01 19:15:36.261: E/AndroidRuntime(3467): java.lang.RuntimeException: An error occured while executing doInBackground() 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.os.AsyncTask$3.done(AsyncTask.java:299) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.FutureTask.setException(FutureTask.java:219) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.FutureTask.run(FutureTask.java:239) 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.lang.Thread.run(Thread.java:841) 03-01 19:15:36.261: E/AndroidRuntime(3467): Caused by: java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (has extras) } without permission com.google.android.c2dm.permission.RECEIVE 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.app.ContextImpl.startServiceAsUser(ContextImpl.java:1800) 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.app.ContextImpl.startService(ContextImpl.java:1772) 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.content.ContextWrapper.startService(ContextWrapper.java:480) 03-01 19:15:36.261: E/AndroidRuntime(3467): at com.google.android.gms.gcm.GoogleCloudMessaging.b(Unknown Source) 03-01 19:15:36.261: E/AndroidRuntime(3467): at com.google.android.gms.gcm.GoogleCloudMessaging.register(Unknown Source) 03-01 19:15:36.261: E/AndroidRuntime(3467): at com.example.gcm.DemoActivity$1.doInBackground(DemoActivity.java:177) 03-01 19:15:36.261: E/AndroidRuntime(3467): at com.example.gcm.DemoActivity$1.doInBackground(DemoActivity.java:1) 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.os.AsyncTask$2.call(AsyncTask.java:287) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 03-01 19:15:36.261: E/AndroidRuntime(3467): ... 4 more 这是我的清单: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.manyexampleapp" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="18" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="com.example.manyexampleapp.c2dm.permission.RECEIVE" /> <uses-permission android:name="com.example.manyexampleapp.gcm.permission.C2D_MESSAGE" /> <permission android:name="com.example.manyexampleapp.gcm.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <application android:name="com.zoomer.ifs.BaseApplication" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <activity android:name="com.zoomer.ifs.MainActivity" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|screenSize" android:launchMode="singleTop"> <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <!-- PUSH --> <!-- WakefulBroadcastReceiver that will receive intents from GCM services and hand them to the custom IntentService. The com.google.android.c2dm.permission.SEND permission is necessary so only GCM services can send data messages for the app. --> <receiver android:name="com.example.gcm.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" > <intent-filter> <!-- Receives the actual messages. --> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="com.example.manyexampleapp" /> </intent-filter> </receiver> <service android:name="com.example.gcm.GcmIntentService" /> <activity android:name="com.example.gcm.DemoActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <!-- DB --> <activity android:name="com.example.db.DbActivity" android:label="@string/app_name" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.http.RestGetActivity" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" > </activity> <activity android:name="com.example.fb.FacebookLoginActivity" android:label="@string/app_name" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <activity android:name="com.example.http.SendFeedbackActivity" android:label="@string/app_name" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <activity android:name="com.zoomer.general.SearchNearbyOffersActivity" android:label="@string/app_name" > <intent-filter> </intent-filter> </activity> <activity android:name="com.facebook.LoginActivity" android:label="@string/app_name" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.manyexampleapp.StoresListActivity" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.fb.ShareActivity" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.notifications.NotificationsActivity" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.fb2.no_use.MainActivity" > <intent-filter> </intent-filter> </activity> <activity android:name="com.zoomer.offers.OffersListActivity" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <activity android:name="com.example.http.SearchNearbyOffersActivity" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <service android:name="com.example.geo.LocationService" android:enabled="true" /> <receiver android:name="com.example.manyexampleapp.BootReceiver" > <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="com.example.manyexampleapp.LocationService.LOCATION_BROAD_MSG" /> </intent-filter> </receiver> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id" /> </application> </manifest> 改变 <uses-permission android:name="com.example.manyexampleapp.c2dm.permission.RECEIVE" /> 到 <!-- This app has permission to register and receive data message. --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> 您收到异常是因为您尚未定义所需的权限 如果应用程序开发后安装了播放服务, 可能会发生 com.google.android.c2dm.permission.RECEIVE 权限已被授予但 android 仍在抱怨同样的错误。 在这种情况下,您必须完全重新安装开发的应用程序才能使此权限发挥作用。 我认为你必须检查 Kotlin 版本兼容性。


嵌套数组打字稿类型

类型固定数组 = 数组 & { 长度:D } 类型 NestedArrays = 数组> 类型固定数组 type FixedArray<T, D extends number> = Array<T> & { length: D } type NestedArrays<T> = Array<T | NestedArrays<T>> type FixedArray<T, D extends number> = Array<T> & { length: D } const a: FixedArray<FixedArray<FixedArray<number, 2>, 2>, 3> = [ [ [1, 2], [1, 2], ], [ [1, 2], [1, 2], ], [ [1, 2], [1, 2], ], ] 我一直无法从子元素中自动推断出数组长度 据我所知,如果不使用函数,就无法进行所需的推理。该函数不必“做”任何事情,它只是在那里让您可以进行推理。在这种情况下,你可以这样做: function fixed<ArrayType extends readonly unknown[]>( ...elements: ArrayType ): FixedArray<ArrayType[number], ArrayType["length"]> { return elements; } 然后将其用于您的示例是: const a = fixed( fixed( fixed(1, 2), fixed(1, 2) ), fixed( fixed(1, 2), fixed(1, 2) ), fixed( fixed(1, 2), fixed(1, 2) ), ); console.log(a); // ^? - const a: FixedArray<FixedArray<FixedArray<number, 2>, 2>, 3> 游乐场链接 FWIW,如果您不需要,您不需要自己的 FixedArray 类型,您可以只使用只读元组:function fixed<ArrayType extends readonly unknown[]>( ...elements: ArrayType ): Readonly<ArrayType> { return elements; } 用法相同;结果类型是 readonly [ readonly [ readonly [number, number], readonly [number, number] ], readonly [ readonly [number, number], readonly [number, number] ], readonly [ readonly [number, number], readonly [number, number] ] ] 游乐场链接


在 onCompleted 执行之前加载状态更新会导致内容闪烁

我目前的 React 组件中有这个突变: 从 '@remix-run/react' 导入 { useNavigate } ... const MyComponent = () => { const { 重定向到 } = useNavigate(); ... 常量 [


Jaeger 服务未显示在 Jaeger UI 中

我在 Docker 中安装了 jaeger: docker run --rm --name jaeger -p 5775:5775/udp -p 6831:6831/udp -p 6832:6832/udp -p 5778:5778 -p 16686:16686 -p 14267:14267 -p 14268:14268 -p 941...


Kedro 即失败

我在 PyCharm 上使用 kedro 0.19.1。我已经安装了 kedro 和 kedro viz。当我运行“kedro viz run”时,它失败了。 我还需要执行任何其他步骤吗? 错误:kedro.framework.cli.u...


使用 Whisper AI 转录时出现打字错误

我想使用 Whisper AI 转录音频文件。 我从一篇文章中学到了https://www.assembleai.com/blog/how-to-run-openais-whisper-speech-recognition-model/ 使用 python 版本 3.8....


docker run 上的用户未绑定变量

运行 docker 镜像时,我收到以下错误: /entrypoint.sh:第 7 行:USER:未绑定变量 入口点.sh的代码。 #!/bin/bash 设置-euo管道故障 导出 SPARK_DIST_CLASSP...


使用 docker 选项运行 Docker 容器

当通过Jelastic运行Docker容器时,docker run命令由什么组成? 我在该平台上测试过 Docker 容器,它们始终显示 404 错误,支持有


Helm 解析传递到模板文件中的 .Release.Namespace

我试图在我的values.yaml 中设置一个var,默认设置为{{ .Release.Namespace }}。但是当我使用 --dry-run 检查最终结果时,该值是“{{ .Release.Namespace }}”,并且...


如何禁用nextjs中某些文件夹的eslint?

我想在 NextJs 中执行 npm run build 时禁用某些文件夹的 eslint 我不想这样配置: 模块. 导出 = { eslint: { dirs: ['pages', 'utils'], // 仅在 ... 上运行 ESLint


安装pact-lang-api后Webpack/polyfill出错

在尝试连接刚刚使用 create-react-app 创建的 React 前端时,在将 pact-lang-api 导入应用程序后运行 npm run start 时收到此错误消息: ./


在 Hyperledger Firefly Fabric 中部署链码时出错

当您运行以下命令来发起智能合约时: ff 部署结构开发测试 asset_transfer.zip firefly asset_transfer 1.0 我收到以下错误: 错误:docker run --platform linux/...


运行 Vite-React:“npm run dev”出现问题

当我尝试运行代码时,我收到以下消息。 节点:内部/模块/cjs/loader:1147 抛出错误; ^ 错误:在ite.js 中找不到模块“D:\Web-Development ite” 在...


在策略中重新混合会话更新,无需重定向

我已将 auth0 集成到 remix.run 应用程序中,现在尝试保存登录时发出的访问令牌: 从“@remix-run/node”导入{createCookieSessionStorage}; 导入 { getOrThrow ...


Jetty9如何正确关闭WebSocketClient@线程问题?

码头版本 码头 9.4.53 码头环境 操作系统 jetty运行命令:./bin/jetty.sh run Java版本 1.8.0_371x64 问题 我使用此代码创建了 Websocket 客户端连接 WebSocketCont...


使用 Notepad++ RUN 启动任何浏览器

shortcuts.xml 文件看起来正确。可能是文件位置?我将一个项目复制并粘贴到程序中。我应该导入它吗? 文件位置为 file:///C:/Users/user/Desktop/


Laravel 10 Vite“npm run build”创建空文件

由于某种原因,运行该命令时,某些脚本会编译,而某些脚本的内容会被“删除”。这是我的 vite.config.js 文件: 从“laravel-vite-plugin”导入 laravel; 导入vu...


Nginx无限文件上传

当我尝试将文件上传到我的服务器时,我得到无限上传。不过,上传文件效果很好。 我的/etc/nginx/nginx.conf: 用户www-数据; 自动worker_processes; pid /run/nginx.pid; 包括/etc/


android 高度隐藏布局的所有视图

我的布局如下面的屏幕截图所示。 我的代码如下。 我的布局如下面的屏幕截图所示。 我的代码如下。 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" > <LinearLayout android:id="@+id/ll_main" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/margin_smallxx" android:layout_marginTop="@dimen/margin_normalxx" android:layout_marginEnd="@dimen/margin_smallxx" android:orientation="vertical"> ....... 现在我想为盒子添加阴影,如下所示。 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" > <TextView style="@style/shadowStyle" android:elevation="20dp" android:layout_alignTop="@id/ll_main" android:layout_alignBottom="@id/ll_main" android:layout_alignStart="@id/ll_main" android:layout_alignEnd="@id/ll_main" /> <LinearLayout android:id="@+id/ll_main" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/margin_smallxx" android:layout_marginTop="@dimen/margin_normalxx" android:layout_marginEnd="@dimen/margin_smallxx" android:orientation="vertical"> shadowStyle如下。 <style name="shadowStyle" parent="@android:style/TextAppearance"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">match_parent</item> <item name="android:text"></item> <item name="android:background">@drawable/myrect</item> <item name="android:outlineSpotShadowColor">@color/shadow_color</item> </style> 和myrect.xml形状如下。 <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#FFFFFF" /> <corners android:radius="20dp" /> </shape> 当我添加此内容时,下面的所有视图都会被隐藏,这很奇怪。 应用程序截图如下。 我将 shadow_color 表示为 #FF00FF 仅用于测试目的。 知道如何使其正确吗?我是不是错过了什么... 以下是我根据mãĴď评论所做的事情 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:background="@color/white"> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/margin_smallxx" android:layout_marginTop="@dimen/margin_normalxx" android:layout_marginEnd="@dimen/margin_smallxx" app:cardCornerRadius="10dp" app:cardElevation="20dp" android:outlineSpotShadowColor="@color/shadow_color" > <LinearLayout android:id="@+id/ll_main" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> ........ </LinearLayout> </CardView> </RelativeLayout> 这意味着我们将拥有卡片视图并将整个布局放入其中......


debconf:延迟软件包配置,因为未安装 apt-utils

我正在设置 Docker 来运行我的 CakePHP 应用程序,我的 Dockerfile 就像 来自 php:7.2-apache # 启用 Apache Rewrite + Expires 模块 RUN a2enmod 重写过期 # 安装依赖项 跑...


使用cypress-cucumber-preprocessor时,如何使用标签来过滤规格和功能?

我有 Cypress 项目设置,这样我就可以一次性编写和运行 Spec 和 Cucumber 测试。 cypress run --spec“cypress/tests/gsac/specs/*.cy.js,cypress/tests/gsac/*.feature” 有效


有没有办法在有条件的情况下隐藏v-data-table中的展开按钮?

借助 v-data-table 中的“show-expand”属性,展开按钮会显示在数据表的所有行中。 借助 v-data-table 中的“show-expand”属性,展开按钮会显示在数据表的所有行中。 <v-data-table :expanded.sync="expanded1" :headers="headers1" :items="items" show-expand class="elevation-1" > 有没有办法根据 Vuetify 3 中的条件进行渲染? 在 Vuetify 2 中,使用 item.data-table-expand 插槽来实现此目的。 <template #item.data-table-expand="{ item, expand, isExpanded }"> <td v-if="item?.versions?.length > 0" class="text-start"> <v-btn variant="text" density="comfortable" @click="expand(!isExpanded)" class="v-data-table__expand-icon" :class="{ 'v-data-table__expand-icon--active': isExpanded }" > <v-icon>mdi-chevron-down</v-icon> </v-btn> </td> </template> 但是,在 Vuetify 3 中使用相同的代码块会返回类型错误: Uncaught TypeError: expand is not a function expand 现在是 toggleExpand 并期望 internalItem 插槽道具 <template #item.data-table-expand="{ item, internalItem, toggleExpand, isExpanded }"> <td v-if="item?.versions?.length > 0" class="text-start"> <v-btn variant="text" density="comfortable" @click="toggleExpand(internalItem)" class="v-data-table__expand-icon" :class="{ 'v-data-table__expand-icon--active': isExpanded }" > <v-icon>mdi-chevron-down</v-icon> </v-btn> </td> </template>


AndroidStudio:在 main.dart 中找不到入口点文件

我正在尝试 flutter 并已安装所有需要的依赖项,并尝试将 flutter 模板作为 Windows 应用程序运行。但我就是无法让 flutter run 配置正常工作,si...


在 Windows 11 上使用 Go 和 gocv for OpenCV 无法找到标头 opencv.hpp,即使设置了 CGO_CXXFLAGS

运行go run时,没有发现。 但是当列出目录时,标题就在那里...... PS C:\Users\phili\SourceCode\goopencv> 设置 CGO_CPPFLAGS="-IC:/Users/phili/SourceCode/opencv/build/include&...


在 Dartlang 中旋转/移动列表?

Dart 中是否有更好/更快的方法来旋转列表? 列表旋转(列表l,int i){ i = i % l.长度; 列表 x = l.sublist(i); x.addAll(l.sublist(0, ... Dart 中是否有更好/更快的方法来旋转列表? List<Object> rotate(List<Object> l, int i) { i = i % l.length; List<Object> x = l.sublist(i); x.addAll(l.sublist(0, i)); return x; } 可以简化一点 List<Object> rotate(List<Object> list, int v) { if(list == null || list.isEmpty) return list; var i = v % list.length; return list.sublist(i)..addAll(list.sublist(0, i)); } 如果您想要 shift 而不是 rotate,您可以简单地使用 removeAt 功能: List<int> list = [ 1, 2, 3 ]; int firstElement = list.removeAt(0); print(list); // [ 2, 3 ] print(firstElement); // 1 来自文档: 从此列表中删除位置 [index] 处的对象。 此方法将 this 的长度减少 1,并将后面的所有对象向下移动一个位置。 返回删除的值。 [索引]必须在 0 ≤ 索引范围内 < length. The list must be growable. 这里有一些更有用的 JS shim。 您还可以创建一个扩展以在任何地方使用它,并且具有空安全性。 extension RotateList<T> on List<T>{ List<T> rotate(int rotate){ if(isEmpty) return this; var index = rotate % length; return sublist(index)..addAll(sublist(0, index)); } }


Rootless docker run -u $CURRENT_USER 但是安装仍然以 root 身份安装

我正在尝试设置 Jenkins 实例以无根运行 docker 容器。 当 jenkins 启动容器时,-u is 标志会与 jenkins 运行程序的 id 一起传递。 跑步者的名字是“


使用 -u 1000:1000 选项进行 docker run 时,Jenkins docker sudo 错误

我有一个 docker 映像,可以在使用以下 DockerFile 创建的 Jenkins 管道中使用: # 根据 来自 ros:noetic # 用户 工作目录/home/用户 运行 useradd --create-home --shell /bin/bash 用户 \ &a...


flutter运行返回错误无法创建jar文件

我正在尝试运行“flutter run”,但它返回以下错误。知道是什么导致这种情况发生吗? 使用设备 sdk gphone x86 的硬件渲染。如果您发现图形伪影,


如何运行现有的已停止容器并进入 bash?

我是 Docker 的新手,我知道为了运行容器,我可以使用以下命令: docker run -it --name 自定义容器名称 --hostname 自定义主机名称 镜像名称 bash 该项目...


Windows docker:权限被拒绝 /var/run/docker.sock

当我尝试使用自动发现运行 filebeat 时,出现以下错误: 退出:自动发现提供程序设置中出现错误:已获得权限 尝试连接到 Docker 守护进程 soc 时被拒绝...


© www.soinside.com 2019 - 2024. All rights reserved.