锦上情书

文章 评论 浏览 28

锦上情书 2025-02-20 16:44:16

您不想通过语句中的小组中有日期,但是获得每种语言的最新值,对吗?
因此,您应该获得最大(日期),而不是将其放在小组中。

#standardSQL
SELECT
  User_ID,
  ARRAY_AGG(Language ORDER BY cnt DESC, max_date desc LIMIT 1)[OFFSET(0)] most_frequent_language
FROM (
  SELECT 
    User_ID,
    Language,
    max(date) as max_date,
    COUNT(*) AS cnt
  FROM `project.dataset.language`
  WHERE Language IS NOT NULL
  GROUP BY 1,2
)
GROUP BY User_ID

You don't want to have date in the group by statement, but the get the latest value for each language, right?
So you should get max(date) instead of having it in the group by.

#standardSQL
SELECT
  User_ID,
  ARRAY_AGG(Language ORDER BY cnt DESC, max_date desc LIMIT 1)[OFFSET(0)] most_frequent_language
FROM (
  SELECT 
    User_ID,
    Language,
    max(date) as max_date,
    COUNT(*) AS cnt
  FROM `project.dataset.language`
  WHERE Language IS NOT NULL
  GROUP BY 1,2
)
GROUP BY User_ID

找到最常见的价值并避免重复BigQuery

锦上情书 2025-02-20 16:22:01

Microsoft网站上的文档应有所帮助。
Here's the link for the .FireInfoMessageEventOnUserErrors:

The documentation on the Microsoft website should help.
Here's the link for the .FireInfoMessageEventOnUserErrors:

https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.fireinfomessageeventonusererrors?view=dotnet-plat-ext-6.0

您能向我解释这个PowerShell SQL命令吗?

锦上情书 2025-02-20 15:09:50

将可视化的属性设置为false,它将起作用。
或者您可以使用其他插件。一个是 searchfield 我使用过的。

set the isVisible property to false it will work.
or you can use other plugin. one is searchfield which i have used.

从扑朔迷离的下拉搜索中删除后缀图标

锦上情书 2025-02-20 03:48:46
  1. const reloadbutton = document.queryselector(“#reload”);
    由于没有ID重新加载的元素,因此ReloadButton值是null
  2. reloAdbutton.addeventListener(“单击”,Reload,false);

    如您现在所知道的,重新加载是零的,不能附加事件,

而不是仅创建错误主体,添加重新加载按钮,然后在此新的重新加载按钮上添加事件,请参阅下面给出的代码:

$('#audio2').on('error', function (e) {
    document.getElementById('B').outerHTML = '<div id="dwnB" class="down" align="center" onclick="location.reload();"><h2><b>The Audio File Could not be found.</h2> Please try again later.<br> Tap anywhere on this message to reload and try again.</b><br><button class="reload">Reload</button> </div>';
    
    //once element with id 'dwnB' is created find the Reload Button
    let newReloadButton = document.querySelector("#dwnB .reload");
    newReloadButton.addEventListener('click', reload, false);
});

$(document).ready(function () {
    $('#station').on('change', function () {
        let value = $(this).val();
        $('.st').addClass('hidden');
        $('.st#st' + value).removeClass('hidden');

        //store your latest value in localStorage
        localStorage.setItem('station', value);
    });
    
    //fetch the old value from localStorage
    let oldStation = localStorage.getItem('station');
    
    //set station value as per stored value
    if (oldStation) {
        $('#station').val(oldStation).trigger('change');
    }
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

当您创建新的重新加载按钮时,无需此行

  1. const reloadButton = document.queryselector(“#reload”);
  2. reloadbutton.addeventListener(“ click click”,“ click”,“ click”,reload,reload,false); <<<<<<<<<<<<<<<<<<<<<<<<<<<<< /代码>

注意:无需添加&lt;脚本src =“ https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js” src =“ https://code.jquery.com/jquery-3.2.1.min.js”&gt;&lt;/script&gt;

  1. const reloadButton = document.querySelector("#reload");
    As there is no element with id reload, reloadButton value is null
  2. reloadButton.addEventListener("click", reload, false);
    As you now know that reloadButton is null, event cannot be attached

Instead of only creating the error body, add the reload button and then add an event, on this new reload button, refer code given below:

$('#audio2').on('error', function (e) {
    document.getElementById('B').outerHTML = '<div id="dwnB" class="down" align="center" onclick="location.reload();"><h2><b>The Audio File Could not be found.</h2> Please try again later.<br> Tap anywhere on this message to reload and try again.</b><br><button class="reload">Reload</button> </div>';
    
    //once element with id 'dwnB' is created find the Reload Button
    let newReloadButton = document.querySelector("#dwnB .reload");
    newReloadButton.addEventListener('click', reload, false);
});

$(document).ready(function () {
    $('#station').on('change', function () {
        let value = $(this).val();
        $('.st').addClass('hidden');
        $('.st#st' + value).removeClass('hidden');

        //store your latest value in localStorage
        localStorage.setItem('station', value);
    });
    
    //fetch the old value from localStorage
    let oldStation = localStorage.getItem('station');
    
    //set station value as per stored value
    if (oldStation) {
        $('#station').val(oldStation).trigger('change');
    }
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

As you created the New Reload Button, no need of this lines

  1. const reloadButton = document.querySelector("#reload");
  2. reloadButton.addEventListener("click", reload, false);

Note: No need to add <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> as you are using <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>

将选定的下拉菜单选项可见后可见

锦上情书 2025-02-20 03:44:19

https://www.jetbrains.com/help/rider/attaching_to_to_local_process.html#reattach-to-process

您可以再次附加到您已附加的最后一个过程
即使没有打开对话框。为此,按下⌘+⌥+⇧+f5或
选择运行|从主菜单中进行处理。

为了使此功能更容易,您可以将此命令添加到主菜单中,并使用它而不是默认运行或调试命令。

您需要手动连接到该过程。

https://www.jetbrains.com/help/rider/Attaching_to_Local_Process.html#reattach-to-process

You can attach again to the very last process that you have attached
to, even without opening the dialog. To do so, press ⌘+⌥+⇧+F5 or
choose Run | Reattach to Process from the main menu.

To make this easier you can add this command to your main menu and use it instead of the default Run or Debug commands.

enter image description here

You will need to attach to the process once manually though.

如何无需每次在骑手中搜索它即可自动附加进程?

锦上情书 2025-02-20 02:33:14

以下解决方案对我有用,
检查Laravel日志,可能有问题您没有导入vite.cofing.js中的所有文件,
例如,在我的app.blade im

 @vite(['resources/css/app.css', 'resources/js/app.js'])
    @vite('resources/css/app.css')
    @vite('resources/css/extra.css')
    @vite('resources/css/partical.css')
    @vite('resources/css/scroll.css')
    @vite('resources/css/faqs.css')
    @vite('resources/css/animate.css')

在我的vite.config.js中使用,我必须添加它们在两个

导出默认的decteconfig中({

 plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'resources/css/partical.css',
                'resources/css/scroll.css',
                'resources/css/faqs.css',
                'resources/css/animate.css',
                "resources/css/extra.css",
                'resources/js/app.js',
            ],
            refresh: true,
        }),
    ],
});

在我的软件包中

"scripts": {
        "delhot": "npx rimraf public/hot",
        "dev": "vite",
        "build": "npm run delhot && vite build"
    },

The below solkution worked for me,
Check laravel Logs, there might be issue you are not importing all files in your vite.cofing.js,
Just for example in my app.blade im am using

 @vite(['resources/css/app.css', 'resources/js/app.js'])
    @vite('resources/css/app.css')
    @vite('resources/css/extra.css')
    @vite('resources/css/partical.css')
    @vite('resources/css/scroll.css')
    @vite('resources/css/faqs.css')
    @vite('resources/css/animate.css')

so in my vite.config.js, i have to add these, suppose in case you have 2 vite.config.js and vite.config.js.timestamp , you have to add in both

export default defineConfig({

 plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'resources/css/partical.css',
                'resources/css/scroll.css',
                'resources/css/faqs.css',
                'resources/css/animate.css',
                "resources/css/extra.css",
                'resources/js/app.js',
            ],
            refresh: true,
        }),
    ],
});

in my package.json

"scripts": {
        "delhot": "npx rimraf public/hot",
        "dev": "vite",
        "build": "npm run delhot && vite build"
    },

This solution worked for me, my app.css was not showing in frontend source code

npm运行dev卡在app_url

锦上情书 2025-02-19 23:43:39

根视图也会影响布局。夸大的视图可以相对于其父级的大小和定位(例如, match_parent size param),并且root视图参数即使视图没有(尚未)作为布局目的的父行动(尚未)()添加到它。

The root view can also affect the layout. The inflated view can be sized and positioned relative to its parent (for example, match_parent size param), and the root view parameter works as the parent for layout purposes even if the view doesn't (yet) get added to it.

lootinflater中根的目的

锦上情书 2025-02-19 22:11:53

(1)为什么作者说这不是双向关系。

从Hibernate文档中,它还提到类似的映射是一个双向都可以互相导航。

在此示例中,给定一个 Person ,我们可以通过其 iDdocument 通过其 iDdocuments 字段获得其 iDdocument 。并给定一个 iddocument ,我们可以通过其 Person 字段获得其 Person 。因此,这是双向的。

(2)我也不确定。对我来说,每当关系中的两个实体都可以彼此导航时,这都是双向关系。如果只有一个实体可以导航到另一个实体,但反之亦然,那就是单向关系。

您可以找到示例的同等单向案例,上面在用于比较它们的差异。

(1) No ideas why the author said it is not a bi-directional relationship.

From the hibernate documentation , it also mentions that a similar mapping is a bidirectional which both involved entities can navigate to each other.

In this example, given a Person , we can get its IdDocument by its idDocuments field. And given an IdDocument , we can get its Person by its person field. So it is a bi-directional.

(2) I am not sure too. To me, whenever both entities in a relationship can navigate to each other , it is a bi-directional relationship. If only one entity can navigate to another but not vice versa , it is a unidirectional relationship.

And you can find the equivalent unidirectional case of the example the I mentioned above in this for comparing their differences.

Hibernate:如何区分两个单向关系和一个双向关系?

锦上情书 2025-02-19 21:33:54

”现在,父对象的高度应适应孩子。”

这就是您从正常流中的标签所期望的,但是父母和子女 position:everaly and code> 绝对因此,行为完全不同
在该示例中是带有轮廓的OP代码和OP的另一份副本,但它们具有位置:静态,默认值为。

.parent {
  position: relative;
  outline: green 5px dotted;
}

.child {
  height: auto;
  width: auto;
  position: absolute;
}

.child:first-of-type {
  outline: dashed 3px red;
  color: red;
}

.child:last-of-type {
  outline: dashed 3px blue;
  color: blue;
}

.x {
  position: static
}
<div class="parent">
  <div class="child">1</div>
  <div class="child">2</div>
</div>
<p>under the other</p>

<hr>

<div class="parent x">
  <div class="child x">1</div>
  <div class="child x">2</div>
</div>
<p>under the other</p>

"And now the height of the parent object should adapt to the children."

That's what you'd expect from tags in normal flow, but the parent and children are position: relative and absolute so behavior is totally different
In the example is the OP code with outlines and another copy of OP but they have position: static, which is default.

.parent {
  position: relative;
  outline: green 5px dotted;
}

.child {
  height: auto;
  width: auto;
  position: absolute;
}

.child:first-of-type {
  outline: dashed 3px red;
  color: red;
}

.child:last-of-type {
  outline: dashed 3px blue;
  color: blue;
}

.x {
  position: static
}
<div class="parent">
  <div class="child">1</div>
  <div class="child">2</div>
</div>
<p>under the other</p>

<hr>

<div class="parent x">
  <div class="child x">1</div>
  <div class="child x">2</div>
</div>
<p>under the other</p>

html父元素的高度为零,但孩子的身高不为

锦上情书 2025-02-19 05:53:52

使用 仅用于 unique_identifier 和添加 country_code 带有空间分隔符的值:

m = df.UNIQUE_IDENTIFIER.isna()
s = df[m].groupby('COUNTRY_CODE').cumcount().add(1).astype(str)
df.loc[m, 'UNIQUE_IDENTIFIER'] = df.loc[m, 'COUNTRY_CODE'] + ' ' + s
print (df)
  UNIQUE_IDENTIFIER COUNTRY_CODE
0               1.0           CZ
1              CZ 1           CZ
2               2.0           SK
3               4.0           AE
4              DK 1           DK
5              CZ 2           CZ
6              DK 2           DK
7              ES 1           ES

或使用 series.fillna 替换缺失值:

s = df[df.UNIQUE_IDENTIFIER.isna()].groupby('COUNTRY_CODE').cumcount().add(1).astype(str)
df['UNIQUE_IDENTIFIER'] = df['UNIQUE_IDENTIFIER'].fillna(df['COUNTRY_CODE'] + ' ' + s)
print (df)
  UNIQUE_IDENTIFIER COUNTRY_CODE
0               1.0           CZ
1              CZ 1           CZ
2               2.0           SK
3               4.0           AE
4              DK 1           DK
5              CZ 2           CZ
6              DK 2           DK
7              ES 1           ES

细节

print (df[m].groupby('COUNTRY_CODE').cumcount().add(1).astype(str))
1    1
4    1
5    2
6    2
7    1
dtype: object

Use GroupBy.cumcount only for missing rows by UNIQUE_IDENTIFIER and add COUNTRY_CODE values with space separator:

m = df.UNIQUE_IDENTIFIER.isna()
s = df[m].groupby('COUNTRY_CODE').cumcount().add(1).astype(str)
df.loc[m, 'UNIQUE_IDENTIFIER'] = df.loc[m, 'COUNTRY_CODE'] + ' ' + s
print (df)
  UNIQUE_IDENTIFIER COUNTRY_CODE
0               1.0           CZ
1              CZ 1           CZ
2               2.0           SK
3               4.0           AE
4              DK 1           DK
5              CZ 2           CZ
6              DK 2           DK
7              ES 1           ES

Or use Series.fillna for replace missing values:

s = df[df.UNIQUE_IDENTIFIER.isna()].groupby('COUNTRY_CODE').cumcount().add(1).astype(str)
df['UNIQUE_IDENTIFIER'] = df['UNIQUE_IDENTIFIER'].fillna(df['COUNTRY_CODE'] + ' ' + s)
print (df)
  UNIQUE_IDENTIFIER COUNTRY_CODE
0               1.0           CZ
1              CZ 1           CZ
2               2.0           SK
3               4.0           AE
4              DK 1           DK
5              CZ 2           CZ
6              DK 2           DK
7              ES 1           ES

Details:

print (df[m].groupby('COUNTRY_CODE').cumcount().add(1).astype(str))
1    1
4    1
5    2
6    2
7    1
dtype: object

用增量数和列值组合填充NAS值

锦上情书 2025-02-18 13:46:58

&lt; form action =“我应该在这里写什么...&gt;


在那写入路由/路径,旨在接收您的http post 请求。 IE:

<form action="/survey" method="post">

状态一个路由定义,旨在接收 app \ config \ doutes.php 中的路由。 IE:

// ...
$routes->post("/survey", "SurveyController::create");

<form action="What should i write here" ...>


Write there the route/path meant to receive your HTTP POST request. I.e:

<form action="/survey" method="post">

The state a route definition meant to receive the route in app\Config\Routes.php. I.e:

// ...
$routes->post("/survey", "SurveyController::create");

将多个单选按钮值发送到控制器Codeigniter

锦上情书 2025-02-18 03:13:29
  • 使用CSS Flex框,易于将任何数据或Div中心。

HTML代码

<div class="main">
//Other code
</div>

CSS代码

.main{
   Width: 100%;
   Height:100%;
   Display:flex;
   justify-content: center;
   align-item: center;
}
  • use css flex box that easy to centre any data or div.

Html code

<div class="main">
//Other code
</div>

css code

.main{
   Width: 100%;
   Height:100%;
   Display:flex;
   justify-content: center;
   align-item: center;
}

不能将容器从顶部移动

锦上情书 2025-02-18 02:57:53

您可以使用 qsqlquery :: lastror lastror 插入更新查询执行时,检查错误的方法。它返回QSQLERROR,其中具有 >方法。我不确定,如果它仅包含数字值或完整的错误描述。

通常,根据文档,sqlite应返回 2067 错误错误错误但是,SQL Server具有不同的错误代码 2601 2627 ,这些是表密钥约束。

因此,您应该检查 QSQLERROR :: NATISERERRODE 包含数据库引擎特定错误代码的字符串值。

You can use a QSqlQuery::lastError method to check an error occured while INSERT or UPDATE query execution. It returns QSqlError, which has a nativeErrorCode method. I'm not sure, if it contains only a numeric value or a full error description.

In common, according to documentation SQLite should return 2067 error, however SQL Server has a different error codes 2601 and 2627, those are table key constraint specific.

So, you should check, if the string value of QSqlError::nativeErrorCode contains a database engine specific error code.

如何通过QSQLDATABase捕获独特的约束违规行为?

锦上情书 2025-02-18 01:02:52

示例:消息和消息 - 单词仅在一个字母中有所不同,一个是大写,另一个是大写。

您需要:Messagestyle和信息 - 更多不同

example: message and Message - the words have a difference in only one letter, one is uppercase, the other is not.

you need : messageStyle and Message - more differents

TS1261:已经包括文件名&#xxx&#xxx&#x27;与文件名不同&#xxx&#xxx&#x27;仅在套管中

锦上情书 2025-02-18 00:58:32

您可以使用

re.sub(r'(BB(?:\|\d){4,6}\|[^\s|]{3}\|[^\s|]{4}\|)9{2,9}\|9{2,9}(?!\d)', r'\g<1>12|21', text)

regex demo

详细信息

  • (bb(?:\ | \ d){4,6} \ | [^\ s |] {3} \ | [^\ s |] {4} \ |) - 捕获第1组:
    • bb - a bb 字符串
    • (?:\ | \ d){4,6} - | 的四个,五或六个重复和任何数字序列
    • \ | - a | char
    • [^\ s |] {3} - 空格和管道以外的三个字符
    • \ | [^\ s |] {4} \ | - a | ,Whitespace和一个管道以外的四个字符,然后是管道char
  • <代码> 9 {2,9} \ | 9 {2,9} - 两到九 9 chars, | | ,然后二到二至九 9 chars ...
  • (?!\ d) - 不跟随另一个数字( Note ,如果您不需要检查数字边界在这里。 )。

\ g&lt; 1&gt; 12 | 21 替换包括 Unambiguul Backreference 代码> \ g&lt; 1&gt; )和 12 | 21 附加在其上。

请参阅 python demo

import re
texts=['XX=BB|3|3|1|1|PLP|KLWE|9999|9999', 'XX=BB|3|3|1|1|2|PLP|KPOK|99999|99999', '999|999|999|9999|999']
pattern = r'(BB(?:\|\d){4,6}\|[^\s|]{3}\|[^\s|]{4}\|)9{2,9}\|9{2,9}(?!\d)'
repl = r'\g<1>12|21'
for text in texts:
    print( re.sub(pattern, repl, text) )

输出:

XX=BB|3|3|1|1|PLP|KLWE|12|21
XX=BB|3|3|1|1|2|PLP|KPOK|12|21
999|999|999|9999|999

You can use

re.sub(r'(BB(?:\|\d){4,6}\|[^\s|]{3}\|[^\s|]{4}\|)9{2,9}\|9{2,9}(?!\d)', r'\g<1>12|21', text)

See the regex demo.

Details:

  • (BB(?:\|\d){4,6}\|[^\s|]{3}\|[^\s|]{4}\|) - Capturing group 1:
    • BB - a BB string
    • (?:\|\d){4,6} - four, five or six repetitions of | and any digit sequence
    • \| - a | char
    • [^\s|]{3} - three chars other than whitespace and a pipe
    • \|[^\s|]{4}\| - a |, four chars other than whitespace and a pipe, and then a pipe char
  • 9{2,9}\|9{2,9} - two to nine 9 chars, | and again two to nine 9 chars...
  • (?!\d) - not followed with another digit (note you may remove this if you do not need to check for the digit boundary here. You may also use (?![^|]) instead if you need to check if there is a | char or end of string immediately on the right).

The \g<1>12|21 replacement includes an unambiguous backreference to Group 1 (\g<1>) and a 12|21 substring appended to it.

See the Python demo:

import re
texts=['XX=BB|3|3|1|1|PLP|KLWE|9999|9999', 'XX=BB|3|3|1|1|2|PLP|KPOK|99999|99999', '999|999|999|9999|999']
pattern = r'(BB(?:\|\d){4,6}\|[^\s|]{3}\|[^\s|]{4}\|)9{2,9}\|9{2,9}(?!\d)'
repl = r'\g<1>12|21'
for text in texts:
    print( re.sub(pattern, repl, text) )

Output:

XX=BB|3|3|1|1|PLP|KLWE|12|21
XX=BB|3|3|1|1|2|PLP|KPOK|12|21
999|999|999|9999|999

Python Regex匹配多次模式

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

更多

友情链接

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