您可以使用子集,如下:
rn = ind
rn[] <- rownames(m)[ind]
[,1] [,2]
[1,] "A" "A"
[2,] "B" "B"
[3,] "C" "F"
[4,] "D" "G"
[5,] "E" "H"
awk '{printf("print(\"Hi\");\nprint(\"Hello\");\nprint(\"%s\"); # here\n\n",$0)}' input_file.txt
更新:据我了解您的评论,您需要一个模板
template-file:
bla
bla bla
bla %NAME% bla
bla
script:
IFS=
\n'
for i in `cat names`; do
sed "s/%NAME%/$i/" template-file
done
我给你一个示例供您参考。
$('tbody tr.parent-tr').on('change', ':checkbox', function () {
let tbody=$(this).parents("tbody");
tbody.children("tr.child-tr").find(":checkbox").attr('checked', $(this).is(':checked'));
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<table>
<tbody>
<!-- parent -->
<tr class="parent-tr">
<td>Parent 1<input type="checkbox" name="subject" id="subject"></td>
<td colspan="3"></td>
</tr>
<!-- child -->
<tr class="child-tr">
<td>Child of Parent 1<input type="checkbox" name="ticker" id="ticker"></td>
</tr>
<tr class="child-tr">
<td>Child of Parent 1<input type="checkbox" name="ticker" id="ticker"></td>
</tr>
<tr class="child-tr">
<td>Child of Parent 1<input type="checkbox" name="ticker" id="ticker"></td>
</tr>
</tbody>
<tbody>
<!-- parent -->
<tr class="parent-tr">
<td>Parent 2<input type="checkbox" name="subject" id="subject"></td>
<td colspan="3"></td>
</tr>
<!-- child -->
<tr class="child-tr">
<td>Child of Parent 2<input type="checkbox" name="ticker" id="ticker"></td>
</tr>
<tr class="child-tr">
<td>Child of Parent 2<input type="checkbox" name="ticker" id="ticker"></td>
</tr>
<tr class="child-tr">
<td>Child of Parent 2<input type="checkbox" name="ticker" id="ticker"></td>
</tr>
</tbody>
</table>
回调OnDisableStoredPaymentMethod(...)也需要包含在Dropin中。根据文档:OnDisableStoredPaymentMethod(StordPaymentMethodID,Resolve,recult)删除了存储的付款方法(需要在homecontroller.cs中工作以支持 /disable端点)。当购物者删除存储的付款方式时,这就是称为。要删除所选的付款方式,请使用StorePaymentMethodID进行A /禁用请求。然后根据 /禁用响应来调用Resolve()或recond()。
有关更多信息( https://docs.adyen。 com/inline-payments/dokenization/toking-tokens#disable存储details )和/或高级用例,您可以在此处找到更多信息: https://docs.adyen.com/online-payments/web-drop-in/web-drop-in/optional-configuration
希望有帮助!
编辑/添加示例:
const dropin = checkout
.create('dropin', {
showRemovePaymentMethodButton: true,
onDisableStoredPaymentMethod(storedPaymentMethodId, resolve, reject) {
console.log('hey there');
}
})
.mount('#dropin-container');
对我来说,我添加了一个状态变量作为数据元元素的键,并包括一个事件侦听器(resetFilters())以修改变量(键),从而每次都会触发反应以更新和呈现数据杂志元素。
const [muiTableKey, setMuiTableKey] = React.useState<any>(1);
..................................
const resetFilters = async () => {
setMuiTableKey(muiTableKey+1)
}
..................
<DataGrid
rows={items}
columns={columns}
... blah blah
key={muiTableKey}
/>
根据您的评论,如果您希望用户收到的响应不包含 _id
您可以:
- 获取文档
- 删除
_id
属性,并在没有_id (或创建一个新对象以避免问题)。
一个简短的例子可能是:
let responseDoc = await Admin.findOne({ _id: id });
delete responseDoc["_id"]
// responseDoc is now ready for use. Note that if I am not mistaken it is still a document.
在这里,您可以 - https://allthings.how how of /sourved-this-this-extension-violates-the-chrome-web-web-store-policy/
我面临类似的问题,我通常会重新安装扩展名以使其正常工作。尝试上面的链接。
当然可以在文本组件中显示面板大小。您可以使用 setText(String t)
方法来设置 jtextfield 或
jtextarea
。尝试以下操作:
String width = myPanel.getWidth();
myTextField.setText(width);
它将在JTEXTFIELD中向用户显示面板的宽度。 (或者您可以将文本字段替换为您喜欢的任何文本组件)
您可以重复1或2次匹配1或更多大写字符[AZ],然后进行下划线。
在替换中使用一个空字符串。
(?:[A-Z]+_){1,2}
1)是的,但也许不在Windows和/或.bat文件上。例如,当您运行等同于以下窗口的窗口时会发生什么:
import subprocess
test_string = 'Bill said "Hi!"'
cmd = ["./myprog.py",
test_string
]
p = subprocess.Popen(cmd)
p.wait()
myprog.py:
#!/usr/bin/env python
import sys
print '"{}"'.format(sys.argv[1])
2)好吧,以下内容似乎有些模棱两可:
"Bill said "Hi!""
引用的字符串是:
"Bill said "
接着是未引用的字符串:
Hi!
随后是引用的空白字符串:
""
?
在这里,您还有另一种选择使用指针:
a = [ 0, 1, 2 ]
i = 0
l = len(a)
while True:
out = []
for j in range(i, i+l):
out.append(a[j%l])
print(out)
i=(i+1)%l
输出:
[0, 1, 2]
[1, 2, 0]
[2, 0, 1]
[0, 1, 2]
[1, 2, 0]
[2, 0, 1]
似乎可以在C ++ 14:
https://en.wikipedia .org/wiki/c%2B%2B14#Runtime-sized_one_dimensional_arrays
更新:它没有将其纳入C ++14。
调用 destroy(gameObject)
应该起作用。对我而言,危险的线路是,
hit.transform.gameObject.GetComponent<BasicAI>().damage((int)Random.Range(damageAmount[0], damageAmount[1]), sender.transform);
如果GameObject没有 basicai
组件,您将遇到NullReferenceException。当时这不会使您的游戏崩溃。但是,它将不再执行 update()
的其余部分,并在控制台中向您显示错误。
对于具有特定组件的对象做出假设很诱人,然后您可以将其调用其中一种方法。更好的防御能力可能会更好。例如,将其更改为
foreach(var hit in hitted) {
var basicAI = hit.transform.gameObject.GetComponent<BasicAI>();
if(basicAI != null)
{
basicAI.damage((int)Random.Range(damageAmount[0], damageAmount[1]), sender.transform);
}
else
{
Debug.LogError("Expected GameObject to have a BasicAI component, but it didn't!");
}
}
,但是即使您决定不这样做,也要在遇到这样的奇怪行为时密切注意您的控制台。
通常,从模板调用方法总是一个坏主意(因为Angular无法预测该方法的返回值是否已更改),并且在函数不是纯的情况下,我们无法用
解决问题。更改teeteTectionsTrategy.onpush
和管道
,因此我可以建议两个解决方案:计算
maxheight
cardComponent
。预定所有值
domaindetailscomponent
,例如:Calling a method from a template is always a bad idea in general (because Angular cannot predict whether the return value of the method has changed), and in the case where the function is not pure, we can not resolve the problem with
ChangeDetectionStrategy.OnPush
andPipe
, so I can suggest two solutions:Calculate
maxHeight
insideCardComponent
.Pre-define all values inside
DomainDetailsComponent
, for example, like this:随机功能使组件更改时单击