window

jQuery - Detect if element height is bigger than window height and do something about it

烈酒焚心 提交于 2019-12-23 09:58:12
问题 The tittle really says it all. Basically i want to detect if this div 's height is bigger than window height and do something about it.. I have done this but i cant get it to work http://jsfiddle.net/dhkCa/3 Why wont it work? Edit: Fixed a little error in the css code. Jsfiddle link updated. 回答1: The document 's contains all the elements within itself, and its height is a sum of the heights of all those elements (all the display:block elements anyway, plus margin and padding); therefore no

Why does style TargetType=“Window” not work when set from App.xaml?

北战南征 提交于 2019-12-23 09:49:59
问题 I'm creating a simple WPF project in VS2013 and I want to apply properties to my main Window. I set them in my App.xaml file like this: <Application.Resources> <Style TargetType="Window"> <Setter Property="Background" Value="#FF2D2D30" /> </Style> </Application.Resources> The problem is that nothing happens. When I change the TargetType to Grid however, the setter property works just fine. Why does this happen? 回答1: It is necessary to add construction in Window : Style="{StaticResource {x

What is the “shell” window type in chrome extensions? Can it be used to hide a window?

守給你的承諾、 提交于 2019-12-23 09:19:38
问题 I just noticed this in the trunk/dev channel: type ( enumerated string ["normal", "popup", "panel", "app", "shell"] ) The type of browser window this is. I tried it with with Canary: no window is shown, but we have console output, so something has been created. The thing is I just don't get it. How is this different from a background page? I was hoping to toggle windows completely out of the user's view, without having to reload the window's content when toggling up. Anyway, I'm not hoping

Need to increase window service timeout

我与影子孤独终老i 提交于 2019-12-23 09:17:43
问题 i am facing problem during starting my window service... as there is a big load on OnStart() event of my service, it scrap data, saved it to database and send email. So my service need to increase start time because the defualt timeout is 30second... i have released that my service will need additional time to start when i face the following exception.. "Could not start the MyName service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely

How can you check if a window is minimized via the terminal in linux

妖精的绣舞 提交于 2019-12-23 09:04:43
问题 How can you check if a window is minimized via the terminal in linux? 回答1: xwininfo -name 'Window Title' | grep 'Map State:' Look for IsViewable versus IsUnMapped ; these come from the map_state field returned by XGetWindowAttributes. (At least, that works with traditional window managers; I don't know if Compiz does screwy stuff to allow for thumbnailing minimized windows.) 回答2: if xwininfo -all -id $windowIdGoHere |grep "Hidden"; then echo "is hidden" fi 回答3: [ $(xwininfo -id 0x60001d -all

Qt4: adjust which widget get focused on start

自闭症网瘾萝莉.ら 提交于 2019-12-23 07:58:13
问题 If I don't re-implement QMainWindow::showEvent() (which will contains a setFocus() method for that widget), is there any way to let some widget get focused first, when the window is loaded ? I use form editor of Qt4, but failed to find somewhere to configure that. 回答1: You can set the Tab Order in Qt Designer or the Designer component in Qt Creator. The first widget in the tab order should get focus on load. Many users expect to be able to navigate between widgets and controls using only the

How to keep matplotlib (python) window in background?

纵饮孤独 提交于 2019-12-23 07:39:04
问题 I have a python / matplotlib application that frequently updates a plot with new data coming in from a measurement instrument. The plot window should not change from background to foreground (or vice versa) with respect to other windows on my desktop when the plot is updated with new data. This worked as desired with Python 3 on a machine running Ubuntu 16.10 with matplotlib 1.5.2rc. However, on a different machine with Ubuntu 17.04 and matplotlib 2.0.0, the figure window pops to the front

C# WPF Maximized Window's position

和自甴很熟 提交于 2019-12-23 06:13:55
问题 I have a window in an application created with WPF and C#. I have set MaxHeight=200, MaxWidth=500 and StartupLocation=CenterScreen.However maximizing this window makes it positioned on the left upper region of the screen i.e: not in the center any more! The maximized window is always on the left upper part even though I set Left=200 and Top=200 in the Window_StateChanged event on the condition of maximizing. private void Window_StateChanged(object sender, EventArgs e) { if (this.WindowState =

Window Hud Behavior (Pass through clicks, can't be minimized)

拥有回忆 提交于 2019-12-23 04:39:09
问题 I'd like to write a simple HUD style application using WPF (if I'm using the wrong technology, I'll take suggestions). As a simple example, I'd to place text along the top of the screen like "Library Computer" that ignores all clicks (ie doesn't effect the rest of Windows) but is always on top and can't be minimized. 回答1: Relevant properties to set on the window: AllowsTranparency -> true WindowStyle -> None ResizeMode -> NoResize WindowState -> Maximized Topmost -> true IsHitTestVisible ->

Find start and end positions of all occurrences within a string in Python

旧时模样 提交于 2019-12-23 02:20:23
问题 If you have a sequence: example='abcdefabcdefabcdefg' and your searching for: searching_for='abc' what function would give you a list with all the positions? positions=[(0,2),(6-8),(12-14)] i created a window list that splits 'example' by 3 so it goes from 'abc','bcd','cde' windows=['abc', 'bcd', 'cde', 'def', 'efa', 'fab', 'abc', 'bcd', 'cde', 'def', 'efa', 'fab', 'abc', 'bcd', 'cde', 'def'] and used a for loop for i in windows: if i == 'abc': thats where i get stuck . . . 回答1: You can use