wpfcombobox数据展示丢失下划线

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了wpfcombobox数据展示丢失下划线相关的知识,希望对你有一定的参考价值。

参考技术A 突然发现label设置content的值为字符串时,如果字符串中包含_的话,在展示出来时下划线就不见了,百度了一下,发现了问题根源,说的label的ContentPresenter默认将下划线处理成快捷键了。

解决的办法也很简单,只需要重写label的样式,设置不需要处理成快捷键即可(RecognizesAccessKey="False"):

将旧版 BigQuery 转换为标准并收到错误“无法解析表名称“s3”:数据集名称丢失。”

【中文标题】将旧版 BigQuery 转换为标准并收到错误“无法解析表名称“s3”:数据集名称丢失。”【英文标题】:Translating Legacy BigQuery to Standard and getting error "Table name "s3" cannot be resolved: dataset name is missing." 【发布时间】:2018-10-02 15:01:42 【问题描述】:

错误在第 4 行,s3.fullVisitorId 带有下划线。我想它会在该组中的每个选定项目上引发错误。

我尝试在 DISTINCT 之后添加一个 SELECT 语句,并且内联错误消失了,但是当我尝试运行查询时出现错误:“无法解析表名称“s3”:数据集名称丢失。”

任何帮助将不胜感激。我发现将查询从遗留 sql 转换为标准有点让人头疼。

这是完整的查询:

#standardSQL
SELECT
  CAST(CONCAT(SUBSTR(date,1,4),'-',SUBSTR(date,5,2),'-',SUBSTR(date,7,2)) AS DATE) AS Date,
  COUNT(DISTINCT s3.fullVisitorId) AS users,
  COUNT(s0.firstHit) AS carts,
  COUNT(s1.firstHit) AS order_details,
  COUNT(s2.firstHit) AS order_confirmation
FROM (
  SELECT
    IFNULL(s3.date,
      IFNULL(s0.date,
        IFNULL(s1.date,
          s2.date))) AS date,
    s3.fullVisitorId,
    s0.fullVisitorId,
    s0.visitId,
    s0.firstHit,
    s1.firstHit,
    s2.firstHit
  FROM (
      # user subquery
    SELECT
      date,
      fullVisitorId,
      visitId
    FROM
      `big-query-project-34643.162968675.ga_sessions_*`
    WHERE
      _TABLE_SUFFIX BETWEEN FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 365 DAY))
      AND FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 0 DAY))
      AND totals.visits = 1
    GROUP BY
      date,
      fullVisitorId,
      visitId) s3
  FULL OUTER JOIN
    ((
      # first subquery
    SELECT
      date,
      fullVisitorId,
      visitId,
      MIN(h.hitNumber) AS firstHit
    FROM
      `big-query-project-34643.162968675.ga_sessions_*`, unnest(hits) as h
    WHERE
      _TABLE_SUFFIX BETWEEN FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 365 DAY))
      AND FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 0 DAY))
      AND REGEXP_CONTAINS(h.page.pagePath,
        '/cart')
      AND totals.visits = 1
    GROUP BY
      date,
      fullVisitorId,
      visitId)) s0
  ON
    s3.fullVisitorId = s0.fullVisitorId
    AND s3.visitId = s0.visitId
  FULL OUTER JOIN
     ((
      # Second Subquery
    SELECT
      date,
      fullVisitorId,
      visitId,
      MIN(h.hitNumber) AS firstHit
    FROM
      `big-query-project-34643.162968675.ga_sessions_*`, unnest(hits) as h
    WHERE
      _TABLE_SUFFIX BETWEEN FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 365 DAY))
      AND FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 0 DAY))
      AND REGEXP_CONTAINS(h.page.pagePath,
        '/order-details')
      AND totals.visits = 1
    GROUP BY
      date,
      fullVisitorId,
      visitId)) s1
  ON
    s0.fullVisitorId = s1.fullVisitorId
    AND s0.visitId = s1.visitId
  FULL OUTER JOIN
     ((
      # Third Subquery
    SELECT
      date,
      fullVisitorId,
      visitId,
      MIN(h.hitNumber) AS firstHit
    FROM
      `big-query-project-34643.162968675.ga_sessions_*`, unnest(hits) as h
    WHERE
      _TABLE_SUFFIX BETWEEN FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 365 DAY))
      AND FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 0 DAY))
      AND REGEXP_CONTAINS(h.page.pagePath,
        '/orderconfirmation')
      AND totals.visits = 1
    GROUP BY
      date,
      fullVisitorId,
      visitId)) s2
  ON
    s1.fullVisitorId = s2.fullVisitorId
    AND s1.visitId = s2.visitId)
GROUP BY
  date
ORDER BY
  date

【问题讨论】:

【参考方案1】:

这里有多个问题 - 特别是:在第 14-19 行中

s3.fullVisitorId,
s0.fullVisitorId,
s0.visitId,
s0.firstHit,
s1.firstHit,
s2.firstHit

我建议至少在下面提供 [例如] 之类的别名

s3.fullVisitorId s3_fullVisitorId,
s0.fullVisitorId s0_fullVisitorId,
s0.visitId,
s0.firstHit s0_firstHit,
s1.firstHit s1_firstHit,
s2.firstHit s2_firstHit    

然后在第 4-7 行 - 引用别名

COUNT(DISTINCT s3_fullVisitorId) AS users,
COUNT(s0_firstHit) AS carts,
COUNT(s1_firstHit) AS order_details,
COUNT(s2_firstHit) AS order_confirmation

【讨论】:

以上是关于wpfcombobox数据展示丢失下划线的主要内容,如果未能解决你的问题,请参考以下文章

nginx proxy_pass转发header丢失

nginx proxy_pass转发header丢失

spring整合mybatis多数据源下部分配置(下划线转驼峰)失效问题

Shell编程基础)

nginx解决带_的head内容丢失

Vim高亮当前行(显示为下划线)的解决方案