Redis-cli命令重启redis服务器(Redis-cli command to restart the redis server)
我使用redis-cli中的SHUTDOWN终止了redis服务器。 现在提示显示'未连接>'。
我发现重启服务器的唯一方法是退出redis-cli提示符,然后重新启动redis服务。
我的问题是,有没有办法从redis-cli提示符重启服务器使用任何redis命令没有退出redis-cli提示符?
I terminated the redis server using SHUTDOWN from redis-cli. Now the prompt shows 'not connected>'.
The only way I found to restart the server was to exit the redis-cli prompt and then do a restart of the redis service.
My question is, is there any way to restart the server from the redis-cli prompt using any redis commands WITHOUT EXITING the redis-cli prompt?
原文:https://stackoverflow.com/questions/36348783
最满意答案
mouseover
元素时可以设置标记。 像这样的东西:var disableScroll = true; $(document).on('mouseenter mouseleave', '.scroll', function(e) { disableScroll = (e.type == 'mouseleave'); });
然后检查滚动事件中的标志:
$('.page').on('mousewheel', function(event) { if (disableScroll) { event.preventDefault(); } });
这是一个更新的小提琴:
http://jsfiddle.net/o0krp0yf/1/
您可能想要添加一个检查以查看内部滚动元素是否已完成滚动(否则,滚动事件将继续到父级,这是不希望的...)
You can set a flag when you
mouseover
the element. Something like this:var disableScroll = true; $(document).on('mouseenter mouseleave', '.scroll', function(e) { disableScroll = (e.type == 'mouseleave'); });
And then check against the flag in your scroll event:
$('.page').on('mousewheel', function(event) { if (disableScroll) { event.preventDefault(); } });
Here's an updated fiddle:
http://jsfiddle.net/o0krp0yf/1/
You might want to add a check to see if the inner scrolling element has completed scrolling (otherwise, the scroll event will continue to the parent, which isn't desired...)
相关问答
更多-
在GWT ScrollPanel中使用MouseWheel进行水平滚动?(Horizontal Scroll with MouseWheel in GWT ScrollPanel?)[2023-05-06]
请参阅此示例,了解如何收听鼠标滚轮事件: http : //examples.roughian.com/index.htm#Listeners~MouseWheelListener 而不是标签扩展ScrollPanel 而不是setText调用setHorizontalScrollPosition(int position) public void onMouseWheel(Widget sender, MouseWheelVelocity velocity) { DOM.eventPreventD ... -
平滑滚动是浏览器特定的功能。 如果你想要一些适用于所有人的东西,那么你需要在你身边做。 jQuery的平滑滚动有多种实现。 实际上,你甚至可能需要所谓的动态滚动。 如果是这样,请尝试jquery.kinetic I'm just going to leave this here. http://jsfiddle.net/Dw4Aj/19/ jQuery(document).ready(function($) { $("html, body").mousewheel(function(e, delta) { ...
-
你需要存储函数,你可以参考它,像这样: function myHandler(event, delta) { $("#wavetextcontainer").unbind("mousewheel", myHandler); var speed = 10; var mySlider = $("#slider"); var sliderVal = mySlider.slider("option", "value"); sliderVa ...
-
mouseover元素时可以设置标记。 像这样的东西: var disableScroll = true; $(document).on('mouseenter mouseleave', '.scroll', function(e) { disableScroll = (e.type == 'mouseleave'); }); 然后检查滚动事件中的标志: $('.page').on('mousewheel', function(event) { if (disableScroll) { ...
-
这可能有效: var x = 0, y = 0; $(document).bind('mousemove', function(event) {x = event.clientX; y = event.clientY;}); $(document).bind('mousewheel', function(e1) { var rand = Math.floor(Math.random*2) ? 1 : -1; X = x+rand; Y = y; setTimeout(fu ...
-
对于鼠标滚轮的每次移动,您可以设置超时,以延迟任何进一步的用户交互。 这可能需要进一步的时序调整才能完全完善,但试试这个js: if (document.getElementById('hello')) { document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript'; } $(document).ready(function(){ $('#cycle').cycl ...
-
是的,小组可以有重点。 你只需要把它放在焦点上,我更喜欢在鼠标上使用。 我做到了,解决了问题。 I've been researching this all day, I may have figured this out. The mousewheel event is only sent to the control with focus. A panel can't have focus. Since the panel is covering the usercontrol it can't get ...
-
这意味着delta是未定义的,这可能意味着你没有包含正确的插件,或者将它包含在错误的地方。 不知道你下载了什么,我已经尝试过,并且工作正常 。 如果您删除外部资源,它不会像您的情况那样工作。 It means that delta is undefined which probably means you didn't include the proper plugin, or included it in the wrong place. Don't know what you download, I'v ...
-
假设scrollDown()函数改变了页面值,解决方案非常明确: if(document.getElementById('pgcount').innerHTML == 'Page 1') scrollDown(2); if(document.getElementById('pgcount').innerHTML == 'Page 2') scrollDown(3); if(document.getElementById('pgcount').innerHTML == 'Page 3') scrollDown ...
-
检测页面底部的死循环(鼠标滚轮,滚动事件)(Detect dead scrolling at the bottom of the page (mousewheel, scroll events))[2022-05-30]
下面是我使用的一个脚本,用于在达到底部时停止动画滚动页面: var gate = $(window), edge; setLength(); gate.resize(function() { setLength(); }); function setLength() { edge = $(document).height()-gate.height(); } gate.mousewheel(function(event, delta) { outset = gate.scrollTo ...