position

How do I find the lat/long that is x km east/west of a given lat/long?

Hi I have two given lat and lon points. For example, lets assume I have two positions (point_1 and point_2) at coordinates (lat1, lon1) and (lat2, lon2). I would like to calculate a third point, that is on the same latitude as that of point_2, but x km to the east or west of point_2. So the third point will have the same latitude a...

Element offset and client positions in BHO

Hi all, How to find the position of the HTMLElement in BHO(C#)? I need both offset position of the element in the page and the client position of the element i.e. position of the element from the Left-Top of the client window. Any help would be greatly appreciated. Once again thanks a million. -Datte ...

Converting 3D positions to 2D?

Say I have a 3D object's position, and the camera's location and rotation matrix. How, would I go about converting this to a 2 Dimensional position on the screen? So that I could draw over the 3D object? You see, I'm using an engine that only allows 3D Env + 2D Gui, so I can't do my normal approach of drawing in 3D, but scaled up. I n...

Page Scroll under position: fixed content

I have a top navigation area with position: fixed I'd like the page content to scroll normally, but not disappear under the navigation. The main issue is when I do a search, (this is a full CMS with hundreds of results in different modules) what I'm searching for sometimes gets scrolled under the navigation. I'm ok with it because I kno...

Position Fixed in CSS within a bounding box?

I have a comment box like so... <div id="comments"> ... </div> Now, inside this comments div I have another div called box... <div id="comments"> <div id="box"> ... </div> </div> The box div is position: fixed and it works mostly fine, but... What I would like is, instead of the box div "floating" above all the con...

Why "display: table-cell" is broken when "position: absolute"

Hi All, I ran into a strange problem. I use DIV as a container, and put an image into this DIV. I want this image to be aligned vertically to bottom. The following code works. #banner { width: 700px; height: 90px; top: 60px; left: 178px; overflow: hidden; text-align: center; display: table-cell; vertical-align: ...

css left help jquery

ok so basically I have a setup like this: <div id="tabs"> <div id="tab_one"> Something here </div> <div id="tab_two"> Something else here </div> <div id="tab_three"> Another thing here </div> </div> Now my css looks like this: #tab_one { position:relative; left:0px; top:0px; } #tab...

How to get the screen position of an active workbook?

I would center a form in an ActiveWorkbook, how to get the screen/window position of the workbook? ...

How to get X/Y position of touch in iPhone Safari?

I'm having a bit of a problem figuring out how to get the X/Y coordinates of where the finger is touching in a webapp on iPhone Safari. I've got a function subscribed to the 'touchstart', 'touchmove', and 'touchend' events, and I have tried pageX/pageY on the event but can't seem to get anything other than 'undefined' or 0. I'm also th...

CSS absolutely position element extends background

I have a absolutely position div that is overlapping a containers background due to it having a larger height. This div is sharing the container with a body div that's sitting happily to the left of it. Is there a way to extend the container to be the height of the absolutely positioned div, rather than the body content? Or should I ju...

C++ Object, Member's Memory Position Offset

Is there a better method to establish the positional offset of an object's data member than the following? class object { int a; char b; int c; }; object * o = new object(); int offset = (unsigned char *)&(object->c) - (unsigned char *)o; delete o; ...

itext multiline text in bounding box

Hi. Does anyone know, how to, in iText, add multiline text in bounding box (with coordinates specified). I tried cb.showTextAligned(PdfContentByte.ALIGN_LEFT, text, bounds.getLeft(), TOTAL_HEIGHT-bounds.getTop(), 0); But it does not support newlines. I also tried PdfContentByte cb = writer.getDirectContent(); cb.moveText(300,40...

Algorithm for positioning rectangular and randomly sized objects inside a non-rectangular canvas.

. . Hi there, everybody. . . I have a canvas defined by many points (x,y)--it's not rectangular, but at least it will follow some almost-hexagonal shape (like a distorted hexagon, with angles that are always < 180 degrees). I also have a big collection of different rectangles (more or less 140 of them, with different widths and heights)...

How to get cardinal mouse direction from mouse coordinates

Hello, is it possible to get the mouse direction (Left, Right, Up, Down) based on mouse last position and current position? I have written the code to calculate the angle between two vectors but I am not sure if it is right. Can someone please point me to the right direction? public enum Direction { Left = 0, Ri...

How do I programmatically position a canvas in Silverlight?

I'm using Silverlight 3/C#, and I'm trying to create some XAML objects programatically in response to a user clicking on a button. However, I can't seem to position a Canvas object that I have created - when I call SetValue() on the new Canvas with the Canvas.LeftProperty value, the browser window clears to an empty screen. I have a si...

CSS need div to extend it's containers width

This is my current HTML structure. The footer div is sitting alone in the BODY. <div id="footer"> <div class="container"> <div id="footer-bg"> <div class="footer1"> <p class="p1">asd</p> <p class="p2">asd</p> </div> <div class="footer2"> <p class=...

'accept_position' signal not getting called in Ruby/Gtk2

I'm creating a application with panes in Ruby/Gtk. When the panes are resized, I need to do some stuff. But I cannot figure out which signal to use. I think it is 'accept_position' - but it don't seem to work. This is a sample app that illustrates my problem... #!/usr/bin/env ruby require 'gtk2' window = Gtk::Window.new(Gtk::Window::T...

Get current cursor lower left position so that tooltip could be displayed properly

Hi all, I'm trying to display the tooltip by calling "ToolTip.Show(String, IWin32Window, Point)", but I wanted to do it like what Windows explorer does - displays the tooltip at the lower left corner of the cursor. I could get the mouse position by "MousePosition", but how could I get its lower left corner position? Thanks, ...

Position:relative for anchors in webkit broken. Work-arounds?

In our project we used the following method to link users to some anchorred area on the page: <span style="position: relative; top: -100px; z-index: -1; visibility: hidden;" id="anchor">&nbsp;</span> This was used to leave a little space before the exact anchorred element like a form. http://gyazo.com/9f714647b5162...

How to check visible resolution of system

I am not entirely sure how to word this questions so I am just going to explain my problem. My VB 6 program saves the location of the screen in the registry so that when it loads up again it can have a default location. This works as expected, but I encountered a problem. I had a computer setup with 2 monitors. I dragged the window to t...