window interview questions
Top window frequently asked interview questions
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)..?
Source: (StackOverflow)
I am executing the following Javascript on my browser (Firefox).
console.debug("Screen height = "+ screen.availHeight); //outputs 770
console.debug("Window Height ="+ $(window).height()); //outputs 210 (I am using jQuery as well)
What is the difference between the two? Is 770 in pixels and 210 in mm?
Similarly, when I write $(document).height()
and $(window).height()
, there is a difference. What is the reason?
Source: (StackOverflow)
: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 31 or 29?
With horizontal windows Ctrl-W + increases the number of lines by one. What is the equivalent command to increase the columns by one?
Source: (StackOverflow)
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 online,
IntPtr windowHandle = new WindowInteropHelper(Application.Current.MainWindow).Handle;
but I don't think that will help me because my application has multiple windows.
Thanks!!
Source: (StackOverflow)
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 in one of them?
Source: (StackOverflow)
This question already has an answer here:
I've created an application using node.js, and I'm interested to know if it's possible to pack the client side (js, html ,css) and the server side into a standalone application (that doesn't required browser).
Source: (StackOverflow)
Which one of these is the most effective vs checking if the user agent is accessing via the correct domain.
We would like to show a small js based 'top bar' style warning if they are accessing the domain using some sort of web proxy (as it tends to break the js).
We were thinking about using the following:
var r = /.*domain\.com$/;
if (r.test(location.hostname)) {
// showMessage ...
}
That would take care of any subdomains we ever use.
Which should we use host or hostname?
In Firefox 5 and Chrome 12:
console.log(location.host);
console.log(location.hostname);
.. shows the same for both.
Is that because the port isn't actually in the address bar?
http://www.w3schools.com/jsref/obj_location.asp says host contains the port.
Should location.host/hostname be validated or can we be pretty certain in IE6+ and all the others it will exist?
Source: (StackOverflow)
I recall reading somewhere that in HTML5 it was no longer okay to use target="_blank"
in HTML5, but I can't find it now.
Is it alright to continue to use target="_blank"
?
I know it's generally considered a bad idea, but it's by the easiest way to open a new window for something like a PDF, and it also doesn't require you to rely on JavaScript.
Source: (StackOverflow)
Is there a difference between these two lines?
var url = "http://www.google.com/";
window.location = url;
window.location.replace (url);
Source: (StackOverflow)
I have split my windows horizontally. Now how can I return to normal mode, i.e. no split window just one window without cancelling all of my open windows. I have 5 and do not want to "quit", just want to get out of split window.
Source: (StackOverflow)
This is a line for a hyperlink in HTML:
<a rel='nofollow' href="http://www.starfall.com/">Starfall</a>
Thus, if I click on "Starfall" my browser - I am using FireFox - will take me to that new page and the contents of my window will change. I wonder, how can I do this in HTML so that the new page is opened in a new window instead of changing the previous one? Is there such a way in HTML?
And if yes, is there a way to open the requested page in another tab (not another window) of my browser?
Source: (StackOverflow)
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 application to open in a new window, it opens internet explorer. Is there any way to make these links open in the default browser instead? Or is there something wrong on my computer?
My problem is that I have a webbrowser in the application, so say you go to google and type in "stack overflow" and right click the first link and click "Open in new window" it opens in IE instead of Chrome. Is this something I have coded improperly, or is there a setting not correct on my computer
===EDIT===
This is really annoying. I am already aware that the browser is IE, but I had it working fine before. When I clicked a link it opened in chrome. I was using sharp develop to make the application at that time because I could not get c# express to start up. I did a fresh windows install and since I wasn't too far along in my application, I decided to start over, and now I am having this problem. That is why I am not sure if it is my computer or not. Why would IE start up the whole browser when a link is clicked rather than simply opening the new link in the default browser?
Source: (StackOverflow)