雨后彩虹

文章 评论 浏览 30

雨后彩虹 2025-02-19 13:02:16

错误消息显示,设计师缺少Extlibx库(而不是标准的Extlib库)。因此,我建议您安装

The error message says that Designer is missing the extlibx library (and not the standard extlib library). So I suggest that you install the ExtLibX library.

无法将Xpages扩展库安装到多米诺设计师

雨后彩虹 2025-02-19 08:25:12

如果使用date_trunc函数,则无需担心源列的格式,因此您不需要左功能 - 假设它是日期或时间戳列

If you use the DATE_TRUNC function then you don’t need to worry about the format of the source column, and therefore you don’t need the LEFT function - assuming it is a date or timestamp column

将时间戳转换为雪花

雨后彩虹 2025-02-19 07:21:47

我不知道这是哪个版本的git可以正常工作,但这就是您要搜索的内容:

git submodule update --recursive

我将其与git luct一起使用来更新根存储库:

git pull && git submodule update --recursive

I don't know since which version of git this is working, but that's what you're searching for:

git submodule update --recursive

I use it with git pull to update the root repository, too:

git pull && git submodule update --recursive

为所有git subsodules提取最新更改

雨后彩虹 2025-02-19 05:47:51

Postgres 10中介绍了省略Drop功能的功能签名的可能性。在您过时且不受支持的Postgres版本中,您需要包括参数列表(触发功能是空的):

DROP function IF EXISTS update_rarity();
                                     ^-- this

The possibility to omit the function signature for a DROP FUNCTION was introduced in Postgres 10. In your outdated and unsupported Postgres version, you need to include the parameter list (which is empty for a trigger function):

DROP function IF EXISTS update_rarity();
                                     ^-- this

无法删除Postgres触发功能

雨后彩虹 2025-02-19 00:55:19

可以按以下方式完成:

::ng-deep .mat-form-field.mat-focused {
    .mat-form-field-required-marker {
        color: blue;
    }
}

::ng-deep .mat-form-field.mat-form-field-invalid {
    .mat-form-field-required-marker {
        color: red;
    }
}

It can be done as follow:

::ng-deep .mat-form-field.mat-focused {
    .mat-form-field-required-marker {
        color: blue;
    }
}

::ng-deep .mat-form-field.mat-form-field-invalid {
    .mat-form-field-required-marker {
        color: red;
    }
}

即使Angular中没有错误

雨后彩虹 2025-02-18 13:33:59

我有这个问题。
我尝试的事情:

  1. 重新启动日食
  2. 重新启动Eclipse&如下所述杀死ADB。
  3. 重新启动机&开放日食

这是对我有用的电源

  1. (拉插头)我的Android设备,重新启动机,电源
    在Android设备上。

希望这对某人有帮助!

I was having this problem.
Things I tried:

  1. Restart Eclipse
  2. Restart Eclipse & Kill adb as mentioned here.
  3. Restart Machine & Open Eclipse

This is what worked for me

  1. Powered off (pulled plug) my android device, Restart Machine, Power
    on android device.

Hope this helps someone!

主机机器中的软件中止了建立的连接

雨后彩虹 2025-02-18 12:42:58

由于您使用的是路由器,因此您可以在App.的主要元素上或您想要的任何元素上都有类似的内容(强制性的“未经测试的代码”,因为我现在在飞机上)

// App.vue    

<v-app :style="`background-color: ${$route.meta.color || #ffffff};`">
    ...
</v-app>

:路线文件是您可以在元密钥下设置该文件的地方:

// router/routes.js
{
    path: '/',
    name: 'dashboard',
    meta: {
        color: #f1f1f1;
    }
}

Since you're using the router, you could have something like this in your App.vue on the main element, or whichever element you want (obligatory "code untested", since I'm on an airplane right now):

// App.vue    

<v-app :style="`background-color: ${$route.meta.color || #ffffff};`">
    ...
</v-app>

And in your routes file is where you can set that, under the meta key:

// router/routes.js
{
    path: '/',
    name: 'dashboard',
    meta: {
        color: #f1f1f1;
    }
}

Vue更改某些页面的身体背景颜色

雨后彩虹 2025-02-18 06:53:49

newSequinentialGuid(按照保证其顺序生成的每个指南)包括通过时间戳计算的指南的一部分。因此,如果您在不同的时间运行插入物,您会看到一些差距。

但是重要的是,该GUID被以不引起页面拆分的方式“订购”(如果在索引中使用了GUID),这就是使用新的顺序GUID时会发生什么。

NEWSEQUENTIALGUID (as every guid generated in a way that warrant their sequence) includes a part of the Guid calculated via a time stamp. So if you run the inserts at different time you'll see some gaps.

But the important part is that the Guid are "ordered" in a way that do not cause page splits (if the Guid is used in a index) and this is what happens when using the new sequential guid.

SQL Server 2008 newSequentionId()问题

雨后彩虹 2025-02-18 05:38:21

您可以尝试列表理解:

[res["id"] for res in my_dict["result"] if res["address"] == "0xd2"]

如果您想使用一个循环:

l = []
for res in my_dict["result"]:
    if res["address"] == "0xd2":
        l.append(res["id"])

You can try list comprehension:

[res["id"] for res in my_dict["result"] if res["address"] == "0xd2"]

If you'd like to use a for loop:

l = []
for res in my_dict["result"]:
    if res["address"] == "0xd2":
        l.append(res["id"])

如果我匹配单独的键,则在此数据集上迭代该数据集的所有匹配值是什么?

雨后彩虹 2025-02-18 01:43:42

您需要group_by避免此问题。

# Read in data
inflation  <- read.table(text = "CPI    Date    City
112 2005-01-01  Stockholm
113.5   2005-02-01  Stockholm
115 2005-03-01  Stockholm
115.6   2005-04-01  Stockholm
115.8   2005-05-01  Stockholm
106 2005-01-01  Malmo
107.5   2005--02-01 Malmo
110 2005-03-01  Malmo
113 2005-04-01  Malmo
117 2005-05-01  Malmo", h = T)

# Perform calculation
library(dplyr)

inflation  |>
    group_by(City)  |>
    mutate(
        cpi_change = lead(CPI) - CPI,
        cpi_change_percent = cpi_change / CPI * 100
    )

输出:

# A tibble: 10 x 5
# # Groups:   City [2]
#      CPI Date        City      cpi_change cpi_change_percent
#    <dbl> <chr>       <chr>          <dbl>              <dbl>
#  1  112  2005-01-01  Stockholm      1.5                1.34
#  2  114. 2005-02-01  Stockholm      1.5                1.32
#  3  115  2005-03-01  Stockholm      0.600              0.522
#  4  116. 2005-04-01  Stockholm      0.200              0.173
#  5  116. 2005-05-01  Stockholm     NA                 NA
#  6  106  2005-01-01  Malmo          1.5                1.42
#  7  108. 2005--02-01 Malmo          2.5                2.33
#  8  110  2005-03-01  Malmo          3                  2.73
#  9  113  2005-04-01  Malmo          4                  3.54
# 10  117  2005-05-01  Malmo         NA                 NA

您将在上个月获得NAS,因为我们不知道次年的价格。另外,您可以使用lag而不是Lead进行此操作,如果您想从上一个开始进行更改,但是您将在第一个月获得NAS。

You need to group_by to avoid this issue.

# Read in data
inflation  <- read.table(text = "CPI    Date    City
112 2005-01-01  Stockholm
113.5   2005-02-01  Stockholm
115 2005-03-01  Stockholm
115.6   2005-04-01  Stockholm
115.8   2005-05-01  Stockholm
106 2005-01-01  Malmo
107.5   2005--02-01 Malmo
110 2005-03-01  Malmo
113 2005-04-01  Malmo
117 2005-05-01  Malmo", h = T)

# Perform calculation
library(dplyr)

inflation  |>
    group_by(City)  |>
    mutate(
        cpi_change = lead(CPI) - CPI,
        cpi_change_percent = cpi_change / CPI * 100
    )

Output:

# A tibble: 10 x 5
# # Groups:   City [2]
#      CPI Date        City      cpi_change cpi_change_percent
#    <dbl> <chr>       <chr>          <dbl>              <dbl>
#  1  112  2005-01-01  Stockholm      1.5                1.34
#  2  114. 2005-02-01  Stockholm      1.5                1.32
#  3  115  2005-03-01  Stockholm      0.600              0.522
#  4  116. 2005-04-01  Stockholm      0.200              0.173
#  5  116. 2005-05-01  Stockholm     NA                 NA
#  6  106  2005-01-01  Malmo          1.5                1.42
#  7  108. 2005--02-01 Malmo          2.5                2.33
#  8  110  2005-03-01  Malmo          3                  2.73
#  9  113  2005-04-01  Malmo          4                  3.54
# 10  117  2005-05-01  Malmo         NA                 NA

You will get NAs for the last month as we do not know the rate in the following year. Alternatively you can do it with lag instead of lead if you want to work out change from previous, but then you'll get NAs for the first month.

如何创建一个新列,其中行由上一行确定(计算)?

雨后彩虹 2025-02-18 01:25:11
 awk '/,/ && ++count==1{gsub(/,$/,"")}1' <(tac file)|tac
 awk '/,/ && ++count==1{gsub(/,$/,"")}1' <(tac file)|tac

删除最后一次出现&#x27;,&#x27;在文件中 - 但不是整行

雨后彩虹 2025-02-17 15:12:43

您的代码有几个错误:

  • &lt; div ID =“ myDropdown” class =“下拉 - content” onclick =“ show()”&gt; ar show(),但没有定义(),因此我删除了OnClick Handler;
  • for(i = 0; i&lt; = a.length; i ++)应该是i&lt; a.length

加上我更好地重构构建锚元素的部分,以便使用document.createelement()。这样一来,就有机会对对象进行引用,并在每个选项中添加一个点击事件处理程序,以便在单击一个国家 /地区时,其名称将在控制台上显示。

国家选项点击处理程序定义为contryonclick()函数,到目前为止,它在控制台上仅显示单击选项数据。无论如何,您都可以自由地更改它,您喜欢执行您更喜欢的动作。

每个选项都将具有类下拉访问的类别,并且当选择选项时,将具有类OptionsElectected。要查询文档并知道选择了哪个选项,这是CSS选择器:

document.queryselector('#myDropdown&gt; .dropdown-option.selectedoption')

function myFunction() {
  
  var country = [
      {
        "ID": "001",
        "Country_Name": "India"
      },
      {
        "ID": "002",
        "Country_Name": "Australia"
      },
      {
        "ID": "003",
        "Country_Name": "Austria"
      },
      {
        "ID": "004",
        "Country_Name": "China"
      },
      {
        "ID": "005",
        "Country_Name": "Bangladesh"
      }
  ];
  
  document.getElementById("myDropdown").classList.toggle("show");
  var ele = document.getElementById("myDropdown");
  
  //for each country in the country array
  for (var i = 0; i < country.length; i++) {  
    //creates an anchor element 
    const countryOption = document.createElement("a");
    //holding the country ID in its value attribute
    countryOption.setAttribute('value', country[i]['ID']);
    //and the country Name as its innerText
    countryOption.innerText = country[i]['Country_Name'];  
    //adds the class dropdown-option to the option element
    countryOption.classList.add('dropdown-option');
    
    //binds the countryOnClick function defined below as its click event handler
    countryOption.addEventListener('click', countryOnClick);
    
    //appends the new anchor to the dropdown element
    ele.appendChild(countryOption);      
  }
}

//click event handler for the dropdown options
function countryOnClick(event){  

  //fetch country properties from the element triggering the event
  const clickedOption = event.target;
  const countryID = clickedOption.getAttribute('value');
  const countryName = clickedOption.innerText;
  
  //removes the selectedOption class to every option in the dropdown
  clickedOption.closest('div').querySelectorAll('.dropdown-option').forEach((o,i)=>{
    o.classList.remove('selectedOption');
  });
  //adds the selectedOption class to the selected option element
  clickedOption.classList.add('selectedOption');
  
  //show those data on console
  console.log(`${countryID} - ${countryName}`);
  
  console.log( getSelectedOption() );
}

function getSelectedOption(){
  return document.querySelector('#myDropdown > .dropdown-option.selectedOption');
}

//gets called when the filter input changes, and it filters the dropdown options list
function filterFunction() {   
  var input, filter, ul, li, a, i;
  input = document.getElementById("myInput");
  filter = input.value.toUpperCase();
  div = document.getElementById("myDropdown");
  a = div.getElementsByTagName("a");
  for (i = 0; i < a.length; i++) {
    txtValue = a[i].textContent || a[i].innerText;
    if (txtValue.toUpperCase().indexOf(filter) > -1) {
      a[i].style.display = "";
    } else {
      a[i].style.display = "none";
    }
  }
}
#myInput {
  box-sizing: border-box;
  background-image: url('searchicon.png');
  background-position: 14px 12px;
  background-repeat: no-repeat;
  font-size: 16px;
  padding: 14px 20px 12px 45px;
  border: none;
  border-bottom: 1px solid #ddd;
}

#myInput:focus {
  outline: 3px solid #ddd;
}

position: relative;
display: inline-block;

}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f6f6f6;
  min-width: 230px;
  border: 1px solid #ddd;
  z-index: 1;
}
.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}
.dropdown-content a:hover {
  background-color: #f1f1f1
}
.show {
  display: block;
}

.dropdown-content > .dropdown-option{
  cursor: pointer;
}

.dropdown-content > .selectedOption{
  background-color: darkgray !important;
}
<div class="dropdown">
  <button onclick="myFunction()" class "dropbtn"> Dropdown </button>
  <div id="myDropdown" class="dropdown-content">
    <input type="text" placeholder="Search..." id="myInput" onkeyup="filterFunction()">
    <a value=""></a>
  </div>
</div>

Your code had a couple of errors:

  • <div id="myDropdown" class="dropdown-content" onclick="show()"> but show() is not defined so I removed the onclick handler;
  • for (i = 0; i <= a.length; i++) should be instead i < a.length

Plus I better refactored the part where you built the anchor elements so that instead of using the innerHTML strategy, those elements get created with document.createElement(). That way there's the chance to have a reference to the object and add a click event handler to each option, so that when you click a Country, its name gets displayed on console.

The country option click handler was defined as the countryOnClick() function and so far it justs displays the clicked option data on console. You are free to change it anyway you like to perform the action you better prefer.

Each option will have the class dropdown-option and when an option is selected will have the class optionSelected. To query the document and know which option got selected, this is the css selector:

document.querySelector('#myDropdown > .dropdown-option.selectedOption')

function myFunction() {
  
  var country = [
      {
        "ID": "001",
        "Country_Name": "India"
      },
      {
        "ID": "002",
        "Country_Name": "Australia"
      },
      {
        "ID": "003",
        "Country_Name": "Austria"
      },
      {
        "ID": "004",
        "Country_Name": "China"
      },
      {
        "ID": "005",
        "Country_Name": "Bangladesh"
      }
  ];
  
  document.getElementById("myDropdown").classList.toggle("show");
  var ele = document.getElementById("myDropdown");
  
  //for each country in the country array
  for (var i = 0; i < country.length; i++) {  
    //creates an anchor element 
    const countryOption = document.createElement("a");
    //holding the country ID in its value attribute
    countryOption.setAttribute('value', country[i]['ID']);
    //and the country Name as its innerText
    countryOption.innerText = country[i]['Country_Name'];  
    //adds the class dropdown-option to the option element
    countryOption.classList.add('dropdown-option');
    
    //binds the countryOnClick function defined below as its click event handler
    countryOption.addEventListener('click', countryOnClick);
    
    //appends the new anchor to the dropdown element
    ele.appendChild(countryOption);      
  }
}

//click event handler for the dropdown options
function countryOnClick(event){  

  //fetch country properties from the element triggering the event
  const clickedOption = event.target;
  const countryID = clickedOption.getAttribute('value');
  const countryName = clickedOption.innerText;
  
  //removes the selectedOption class to every option in the dropdown
  clickedOption.closest('div').querySelectorAll('.dropdown-option').forEach((o,i)=>{
    o.classList.remove('selectedOption');
  });
  //adds the selectedOption class to the selected option element
  clickedOption.classList.add('selectedOption');
  
  //show those data on console
  console.log(`${countryID} - ${countryName}`);
  
  console.log( getSelectedOption() );
}

function getSelectedOption(){
  return document.querySelector('#myDropdown > .dropdown-option.selectedOption');
}

//gets called when the filter input changes, and it filters the dropdown options list
function filterFunction() {   
  var input, filter, ul, li, a, i;
  input = document.getElementById("myInput");
  filter = input.value.toUpperCase();
  div = document.getElementById("myDropdown");
  a = div.getElementsByTagName("a");
  for (i = 0; i < a.length; i++) {
    txtValue = a[i].textContent || a[i].innerText;
    if (txtValue.toUpperCase().indexOf(filter) > -1) {
      a[i].style.display = "";
    } else {
      a[i].style.display = "none";
    }
  }
}
#myInput {
  box-sizing: border-box;
  background-image: url('searchicon.png');
  background-position: 14px 12px;
  background-repeat: no-repeat;
  font-size: 16px;
  padding: 14px 20px 12px 45px;
  border: none;
  border-bottom: 1px solid #ddd;
}

#myInput:focus {
  outline: 3px solid #ddd;
}

position: relative;
display: inline-block;

}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f6f6f6;
  min-width: 230px;
  border: 1px solid #ddd;
  z-index: 1;
}
.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}
.dropdown-content a:hover {
  background-color: #f1f1f1
}
.show {
  display: block;
}

.dropdown-content > .dropdown-option{
  cursor: pointer;
}

.dropdown-content > .selectedOption{
  background-color: darkgray !important;
}
<div class="dropdown">
  <button onclick="myFunction()" class "dropbtn"> Dropdown </button>
  <div id="myDropdown" class="dropdown-content">
    <input type="text" placeholder="Search..." id="myInput" onkeyup="filterFunction()">
    <a value=""></a>
  </div>
</div>

如何使用HTML,CSS和JavaScript从下拉列表显示选定的项目

雨后彩虹 2025-02-16 14:39:58

而不是

<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />

你需要放

<meta http-equiv="last-modified" content="Thu, 14 Apr 2011 12:17:27 GMT" />

Instead of

<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />

you need to put

<meta http-equiv="last-modified" content="Thu, 14 Apr 2011 12:17:27 GMT" />

HTML5元验证

雨后彩虹 2025-02-16 04:00:38

如果您在每次迭代中使用date()构造函数,则不必担心特定月份的不同日子。

详细信息在示例中评论

/**
 * @desc - return a range of dates starting today (or a given
 *         date) and a given number of days (including start)
 * @param {number} range - The number of days
 * @param {string<date>} start - The date to start the range
 *        if not defined @default is today
 * @return {array<date>} An array of dates
 */
function dayRange(range, start) {
  // If undefined default is today
  let now = start ? new Date(start) : new Date();
  // Create an array of empty slots - .length === range
  let rng = [...new Array(range)];

  /*
  .map() through array rng
  If it's the first iteration add today's date...
  ... otherwise get tommorow's date...
  and return it in local format
  */
  return rng.map((_, i) => {
    if (i === 0) {
      return now.toLocaleDateString();
    }
    let day = now.getDate() + 1;
    now.setDate(day);
    return now.toLocaleDateString();
  });
}

console.log("Pass the first parameter if the start day is today");
console.log(JSON.stringify(dayRange(14)));

console.log("Pass a properly formatted date string as the second parameter if you want to start on a date other than today");
console.log(JSON.stringify(dayRange(10, '05/12/2020')));

If you use the Date() constructor on each iteration, you don't have to worry about the varying days of a particular month.

Details are commented in example

/**
 * @desc - return a range of dates starting today (or a given
 *         date) and a given number of days (including start)
 * @param {number} range - The number of days
 * @param {string<date>} start - The date to start the range
 *        if not defined @default is today
 * @return {array<date>} An array of dates
 */
function dayRange(range, start) {
  // If undefined default is today
  let now = start ? new Date(start) : new Date();
  // Create an array of empty slots - .length === range
  let rng = [...new Array(range)];

  /*
  .map() through array rng
  If it's the first iteration add today's date...
  ... otherwise get tommorow's date...
  and return it in local format
  */
  return rng.map((_, i) => {
    if (i === 0) {
      return now.toLocaleDateString();
    }
    let day = now.getDate() + 1;
    now.setDate(day);
    return now.toLocaleDateString();
  });
}

console.log("Pass the first parameter if the start day is today");
console.log(JSON.stringify(dayRange(14)));

console.log("Pass a properly formatted date string as the second parameter if you want to start on a date other than today");
console.log(JSON.stringify(dayRange(10, '05/12/2020')));

为什么JavaScript的date.getDate().setDate()行为如此不可预测?

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

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