我对此非常好奇.如果使用值为0和1的AtomicIntegerArray,则可以完成AtomicBoolean数组的相同操作.例:
final AtomicIntegerArray array1 = new AtomicIntegerArray(10);
array1.compareAndSet(3, 0, 1); // 0 = false and 1 = true
// exactly the same thing of:
final AtomicBoolean[] array2 = new AtomicBoolean[10];
for(int i = 0; i < array2.length; i++)
array2[i] = new AtomicBoolean(false);
array2[3].compareAndSet(false, true);
Run Code Online (Sandbox Code Playgroud)
您认为哪一个更快更好?
我在Windows 7,64位.我安装了WampServer 3.0.6 x64(最新版本).我已经安装了Visual C++ 2012 Update 4 x64(也是最新版本).一切顺利!
但是当我尝试运行WampServer时,我仍然有同样的错误:
php-win.exe - 应用程序错误
应用程序无法正确启动(0xc00007b).单击"确定"关闭应用程序.
我尝试了一切,仍然得到同样的错误.
我使用下面的代码来切换td颜色
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
$(function(){
$("td").click(function(){
$(this).addClass("on").parent().siblings("tr").find("td").removeClass("on");
});
});
</script>
<style>
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
.on { background-color:red; color:#ffffff; }
</style>
</head>
<body>
<table class="mytable" border=1>
<tbody>
<tr>
<td>Hello World</td>
<td>Hello World1</td>
<td>Hello World2</td>
</tr>
<tr>
<td>Hello World</td>
<td>Hello World1</td>
<td>Hello World2</td>
</tr>
<tr>
<td>Hello World</td>
<td>Hello World1</td>
<td>Hello World2</td>
</tr>
</tbody>
</table>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
但现在我需要做三件事,
我想修改 bootstrap 4 复选框勾选 SVG 路径编号,但我不知道如何修改这些数字来实现此目的。
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path d="M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z" fill="red"/></svg>
Run Code Online (Sandbox Code Playgroud)
我希望刻度线是一条更细的线。CSS边框的粗细大约为:2px;
有 SVG 专家吗?
谢谢
这是我要修改的文本文件:
Sometext 2016 Sometext Sometext 6 Sometext
我要修改的两个值是第2行和第5行(索引1和4),它们是当前年份和当前月份.
所以我做了这个PowerShell脚本:
$file = "$PSScriptRoot\myFile.txt"
$date = Get-Date
$year = $date.Year
$month = $date.Month
$oldYear = Get-Content $file | Select -Index 1
$oldMonth = Get-Content $file | Select -Index 4
(Get-Content $file).Replace($oldYear, $year) | Set-Content $file
(Get-Content $file).Replace($oldMonth, $month) | Set-Content $file
Run Code Online (Sandbox Code Playgroud)
但显然,这条线
(Get-Content $file).Replace($oldMonth, $month) | Set-Content $file
Run Code Online (Sandbox Code Playgroud)
将替换我文件中的所有"6"与当前月份(当我写这些行时为7),但我只想要替换第5行,而不是第2行.
concurrency ×1
css ×1
html ×1
java ×1
javascript ×1
jquery ×1
powershell ×1
real-time ×1
svg ×1
wamp ×1
wampserver ×1