问题列表 - 第306415页

错误:无法解析操作“mygh/my-action@main”,未找到存储库

我在 GitHub 上有两个私有存储库。

mygh/my-action
mygh/my-code
Run Code Online (Sandbox Code Playgroud)

我正在尝试运行mygh/my-code使用自定义操作的工作流程mygh/my-action,但 GitHub Actions 失败并出现以下错误:

Failed to resolve action download info. Error: Unable to resolve action `mygh/my-action@main`, repository not found
Retrying in 12.717 seconds
Failed to resolve action download info. Error: Unable to resolve action `mygh/my-action@main`, repository not found
Retrying in 11.214 seconds
Error: Unable to resolve action `mygh/my-action@main`, repository not found
Run Code Online (Sandbox Code Playgroud)

github-actions

10
推荐指数
2
解决办法
2万
查看次数

Iterate through characters in a string and remove consecutive duplicates

I am trying to iterate through a string and remove consecutive duplicates letter.

ABBACBAABCB-->AACBAABCB-->CBAABCB-->CBBCB-->CCB-->B
Run Code Online (Sandbox Code Playgroud)

My Idea was to iterate through the string and remove duplicates inside a do-while loop.

My code:

ABBACBAABCB-->AACBAABCB-->CBAABCB-->CBBCB-->CCB-->B
Run Code Online (Sandbox Code Playgroud)

Obviously this doesn't work, it simply loop forever.

From what I have gathered you can't do list = results on java as string are immutable.

How can this be done with Java?

java string algorithm replace duplicates

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

Does timescaledb support window functions?

I am trying to use the TimescaleDB extension to compute some continuous aggregates. I have this query which works fine:

SELECT distinct time_bucket('1 hour', entry_ts) as date_hour,
                type_id,
                entry_id,
                exit_id,
                count(*) OVER (partition by time_bucket('1 hour', entry_ts), entry_id, exit_id, type_id) AS total,
                ((count(*) over (partition by time_bucket('1 hour', entry_ts), entry_id, exit_id, type_id)) * 100)::numeric /
                (count(*) over (partition by time_bucket('1 hour', entry_ts), entry_id)) percentage_of_entry
FROM transits
Run Code Online (Sandbox Code Playgroud)

When I try to put this inside a continuous aggregate materialized view, I get …

postgresql materialized-views window-functions timescaledb continuous-aggregates

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

Why does Stream provide convenience methods on an extension trait instead of the trait itself?

Consider the Iterator trait from the standard library:

pub trait Iterator {
    type Item;

    // required
    pub fn next(&mut self) -> Option<Self::Item>;

    // potentially advantageous to override
    pub fn size_hint(&self) -> (usize, Option<usize>) { ... }
    pub fn count(self) -> usize { ... }
    pub fn last(self) -> Option<Self::Item> { ... }
    pub fn advance_by(&mut self, n: usize) -> Result<(), usize> { ... }
    pub fn nth(&mut self, n: usize) -> Option<Self::Item> { ... }

    // convenience
    pub fn step_by(self, …
Run Code Online (Sandbox Code Playgroud)

traits rust

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

如何渲染 HTML 风格的传单标签?

我需要向地图上的每个现有标记添加标签(不是弹出窗口)。我创建了labelText存储标签 HTML 的变量。现在,当我使用它时,奇怪的事情发生了 - 每个标签显示来自整个数据集的数据,而不是分配给单个点的数据:

library(shiny)
library(leaflet)
library(dplyr)
library(sf)

ui <- fluidPage(
    leafletOutput("map")

)

server <- function(input, output, session) {
    
    coords <- quakes %>%
        sf::st_as_sf(coords = c("long","lat"), crs = 4326)
    
    labelText <- paste0("<b>Depth: </b>",coords$depth,"<br/>",
                                         "<b>Mag: </b>",coords$mag,"<br/>",
                                         "<b>Stations: </b>",coords$stations)    

    output$map <- leaflet::renderLeaflet({
    leaflet::leaflet() %>% 
      leaflet::addTiles() %>% 
      leaflet::setView(172.972965,-35.377261, zoom = 4) %>%
      
      leaflet::addCircleMarkers(
        data = coords,
        stroke = FALSE,
        radius = 6,
        label = ~htmltools::HTML(labelText)
        #label = ~htmltools::htmlEscape(labelText)
        #label = ~labelText
      )      
  })
}

shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)

我尝试了HTML和的不同组合htmlEscape …

r leaflet shiny r-leaflet

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

如何使用自定义资源的分数格式(即 X/Y)显示 kubectl 列

在 Kubernetes 中,是否可以使用 CRD 的“additionalPrinterColumns”字段以分数格式(即 X/Y)显示列?

更准确地说,我想kubectl使用与下面的 READY 字段相同的格式显示 CR 字段的描述:

kubectl get statefulsets.apps <my-statefulset>
NAME              READY   AGE
<my-statefulset>  2/2     18m
Run Code Online (Sandbox Code Playgroud)

您能否提供“additionalPrinterColumns”部分的内容?

kubernetes kubernetes-custom-resources kubebuilder operator-sdk

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

keycloak - keycloak 是否有任何端点来获取分页的用户列表

我正在尝试获取分页的用户列表我尝试使用此端点

获取 /admin/realms/{realm}/users

但响应包含所有用户。

keycloak

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

Snowflake SQL 上带有空值的字符串连接

我有 3 列(名字、中间名、姓氏),我想连接 3 个字符串(以构造全名)。

但是,如果其中任何一个值为 null,则结果也为 null。

当其中一些字符串可能为空时,连接字符串的优雅且安全的方法是什么?

sql snowflake-cloud-data-platform

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

What does *(int *) variable = value mean?

I am reading the online book Object-Oriented Programming with ANSCI-C

Page 6 shows an implementation of a set. There is an add() function that takes two parameters: a set and an element. The element is added to the set. The implementation uses an array of pointers:

static int heap [MANY];
Run Code Online (Sandbox Code Playgroud)

Here is the beginning of the add() function:

void * add (void * _set, const void * _element)
{ 
    int * set = _set;
    const int * …
Run Code Online (Sandbox Code Playgroud)

c

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

Awesome_Notifications - 错误状态:流已被收听

我正在使用这个flutter 库来处理通知。在initState()我的HomeView初始化这个监听器中:

_notificationsActionStreamSubscription = AwesomeNotifications().actionStream.listen((receivedNotification) {
  print("user tapped on notification " + receivedNotification.id.toString());
});
Run Code Online (Sandbox Code Playgroud)

稍后,当有人登录或退出我的应用程序时,我会调用以下行:

Navigator.of(context).popUntil((route) => route.isFirst);
Navigator.pushReplacement(context, MaterialPageRoute(builder: (_) => HomeView()));
Run Code Online (Sandbox Code Playgroud)

这让initState()HomeView再次被调用,这会导致错误:

Bad state: Stream has already been listened to.
Run Code Online (Sandbox Code Playgroud)

这就是为什么我在从上面调用两条导航器行之前执行此操作,但没有成功:

AwesomeNotifications().createdSink.close();
_notificationsActionStreamSubscription.cancel();
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?我取消了流订阅,为什么我仍然收到此错误消息?

谢谢你的建议!

flutter

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