在macOS Sierra上,我使用Homebrew安装了Apache:
$ brew install httpd24
这引起了一些奇怪的Apache问题.似乎在macOS Sierra上Apache的默认安装仍然在某种程度上是活跃的.我现在想要完全卸载httpd24,但我仍然在我的进程中看到它.这是我做的:
$ brew unlink httpd24
$ brew uninstall httpd24
$ rm -rf /usr/local/etc/apache2/
跑步$ ps aux|grep httpd揭示:
blt 51473 0.0 0.0 2613988 844 ?? S 10:48PM 0:00.00 /usr/local/Cellar/httpd24/2.4.23_2/bin/httpd -k start
blt 51447 0.0 0.0 2613988 892 ?? S 10:47PM 0:00.00 /usr/local/Cellar/httpd24/2.4.23_2/bin/httpd -k start
blt 51396 0.0 0.0 2613988 856 ?? S 10:47PM 0:00.00 /usr/local/Cellar/httpd24/2.4.23_2/bin/httpd -k start
blt 51345 0.0 0.0 2613988 844 ?? S 10:47PM 0:00.00 /usr/local/Cellar/httpd24/2.4.23_2/bin/httpd -k start
blt 51285 …Run Code Online (Sandbox Code Playgroud) 这个setTimeout在Firefox中完美运行,但在Chrome中,函数timeoutTrigger中没有任何内容发生,包括警报.有任何想法吗?
var $this = $('.active-more');
function timeoutTrigger() {
$this.closest(".container").nextAll(".container:first").find(".description:first").removeClass('hide');
$this.closest(".container").nextAll(".container:first").find(".back:first").find("img.portfolio").remove();
alert("is this thing on?");
}
setTimeout(function(){timeoutTrigger()},400)
Run Code Online (Sandbox Code Playgroud) 我在这里弄错了什么?我正在尝试将字符串转换为整数以便另外使用.
我有一个类portfolio和一个src的图像images/portfolio-images/gbn1.jpg
第一个警报说的价值imageInt就是1,但第二警报说的价值newImg是gbn11.jpg,当我试图让gbn2.jpg.
我在下面发布我的代码:
var mainImg = $('.active-more').closest(".container").find("img.portfolio:first").attr("src");
var nofilename = mainImg.replace("images/portfolio-images/","");
nofilename = nofilename.replace(".jpg","");
var imageString = nofilename.replace(/[A-Za-z$-]/g, "");
var imageInt = parseInt(imageString, 10);
var imageProject = nofilename.replace(/\d+/g, '');
alert(imageInt);
var newImg= imageProject + imageInt + 1 + ".jpg";
alert(newImg);
Run Code Online (Sandbox Code Playgroud) javascript ×2
addition ×1
apache ×1
homebrew ×1
httpd.conf ×1
integer ×1
macos-sierra ×1
parseint ×1
settimeout ×1
string ×1
uninstall ×1