In computer science a window is a graphical interface to let a user interact with a program. Questions regarding Microsoft Windows should use the "Windows" tag.

learn more… | top users | synonyms

113
votes
9answers
36k views

Is there a way to detect if a browser window is not currently active?

I have JavaScript that is doing activity periodically. When the user is not looking at the site (i.e., the window or tab does not have focus), it'd be nice to not run. Is there a way to do this using ...
71
votes
6answers
19k views

How to increase the vertical split window size in Vim

:vsplit (short form: :vs) split the Vim viewport vertically. :30vs splits the viewport, making the new window 30 characters wide. Once this 30 char window is created, how would one change it's size to ...
49
votes
2answers
29k views

What's the difference between window.location= and window.location.replace()?

Is there a difference between these two lines? var url = "http://www.google.com/"; window.location = url; window.location.replace (url);
41
votes
4answers
14k views

How can I open a Shell inside a Vim Window?

I can open a shell by using the :shell command in Vim, however I can't edit a file and at the same time use the shell. Is there any way to split Vim in many Windows (or tabs), and have a shell opened ...
32
votes
3answers
4k views

deleting a window property in IE

I can't find any information on this issue; why doesn't the following code work in IE? window.x = 45; delete window.x; // or delete window['x']; IE reports an "object doesn't support this action" ...
31
votes
3answers
26k views

window.location.host vs window.location.hostname and cross-browser compatibility?

which one of these is the most effective vs checking if the useragent is accessing via the correct domain. we would like to show a small js based 'top bar' style warning if they are accessing the ...
31
votes
3answers
34k views

$(window).scrollTop() vs. $(document).scrollTop()

What's the difference between: $(window).scrollTop() and $(document).scrollTop() Thanks.
30
votes
6answers
188k views

Javascript: open new page in same window

Is there an easy way to modify this code so that the target URL opens in the SAME window? <a ...
26
votes
2answers
12k views

WPF Icon for all app windows

It is possible to set one Icon so, that it would be used on every window in current app. So that i set it once (not on every window by hand)..?
24
votes
4answers
26k views

How to open in default browser in C#

I am designing a small C# application and there is a web browser in it. I currently have all of my defaults on my computer say google chrome is my default browser, yet when I click a link in my ...
24
votes
1answer
1k views

Can somebody explain this Javascript method?

Original source: http://twitter.com/tobeytailor/status/8998006366 (x=[].reverse)() === window // true I've noticed that this behavior affects all the native types. What exactly is happening ...
24
votes
6answers
12k views

Fastest way(s) to move the cursor on a terminal command line?

What is the best way to move around on a given very long command line in the terminal? Say I used the arrow key or Ctrl-R to get this long command line: ./cmd --option1 --option2 --option3 --option4 ...
23
votes
5answers
7k views

Is it possible to get gVim to remember window size?

I know how to set the initial window size in gVim, but how do I get it to automatically restore the window dimensions from last session? Is this even possible?
22
votes
4answers
22k views

Finding the handle to a WPF window

Windows forms had a property win1.Handle which, if I recall, returns the handle of the main window handle? Is there an equivalent way to get the handle of a WPF Window? I found the following code ...
22
votes
3answers
12k views

Git revert local commit

I have a git repo hooked up in phpstorm on windows. I committed a few change sets then pushed them to our "central repo". After this I have then made a few more commits. I no longer want these commits ...

1 2 3 4 5 223
15 30 50 per page