Questions tagged [offset]

The relational position of an entity, when compared to another entity with fixed position. Typically used, for example, to define location within a file or byte buffer from which information should be read.

3019 questions
16
votes
4 answers

Python: strftime() UTC Offset Not working as Expected in Windows

Every time I use: time.strftime("%z") I get: Eastern Daylight Time However, I would like the UTC offset in the form +HHMM or -HHMM. I have even tried: time.strftime("%Z") Which still yields: Eastern Daylight Time I have read several other posts…
Raeven
  • 613
  • 2
  • 8
  • 18
16
votes
1 answer

Using Sticky Kit jQuery plugin, but can't figure out how to use the 'offset_top' option?

Has anyone had any experience using the excellent Sticky Kit jQuery plugin? http://leafo.net/sticky-kit/ I can't figure out how to use the 'offset_top' option? The documentation for the options is a bit vague, the example shown is…
StephenMeehan
  • 1,083
  • 2
  • 15
  • 26
16
votes
2 answers

Get offset of current buffer in vim (in particular, via python scripting)

i want to get the offset of the current cursor position the current selection range in vim, beginning from the start of the file. I do this in python, so hints how to do it with vim's python scripting would be very helpful. I have used…
Jörg Haubrichs
  • 2,215
  • 3
  • 24
  • 26
15
votes
2 answers

How to specify limit and offset in array in rails?

I have 3 tables PostText, PostImage and PostVideo. Now I am combining data from all the above three table into a single array called userposts. Now from userposts I want to access only 10 records starting with offset 15. How can I do that? I tried…
sank
  • 964
  • 3
  • 12
  • 24
15
votes
5 answers

In Kafka how to get the exact offset according producing time

I need to get the message produced in Kafka hour by hour in a day. Every one hour I will launch a job to consume the message produced 1 hour ago. e.g., if current time is 20:12, I will consume the message between 19:00:00 and 19:59:59. That means I…
Po Zhou
  • 595
  • 1
  • 5
  • 17
15
votes
1 answer

Possible to add offset to the right of an element in a Zurb Foundation 4 grid?

According to Foundation's docs on the grid component, I can essentially make 1 or more grid columns a space using their offset classes:
1st column
2…
at.
  • 50,922
  • 104
  • 292
  • 461
15
votes
2 answers

jQuery scrollTo fixed header offset

I am using the jQuery scrollTo plugin as you can see on the page which I'm building http://portfolio.tomvervoort.net/ Because of the 300px fixed header the content moves under the header. You can see this clearly when you click the about button in…
Tom
  • 193
  • 2
  • 2
  • 9
14
votes
5 answers

Accounting for a fixed header with animate.scrolltop and (target).offset().top;

This should be a pretty basic question, but i've thrown most of my morning at it, and at this point I'm close to throwing in the towel. I have not even a little bit of js foo -- but I found a nicely commented chunk of code that I'm hoping to use to…
Martin
  • 233
  • 1
  • 3
  • 14
14
votes
1 answer

Getting content offset of List in SwiftUI

I'm trying to create a parallax header effect in SwiftUI like this one https://twitter.com/KhaosT/status/1140814602017464320 , but don't really know how to get content offset of the list while scrolling. Does anyone have know how to calculate the…
Peacemoon
  • 3,198
  • 4
  • 32
  • 56
14
votes
5 answers

How to populate Image inside ImageView by custom left and top coordinate | Android

I need to show some Images inside the Frame (Multiple Image Frames), I have left and top coordinates correspondence to each Image. For example, I have Image coordinates 100 from left and 100 from top, So what i need to do is just to show the image…
Shoeb Siddique
  • 2,805
  • 1
  • 22
  • 42
14
votes
5 answers

Getting absolute position of an element relative to browser

I have a div set to the css class float with float being: .float { display:block; position:fixed; top: 20px; left: 0px; z-index: 1999999999; } * html .float {position:absolute;} This class causes the element to stay in a fixed position on the…
user396404
  • 2,759
  • 7
  • 31
  • 42
14
votes
7 answers

What is the correct way to offset a pointer?

I want to pass a pointer to a function. I want this pointer to point to some place in the middle of an array. Say I have an array like such unsigned char BufferData[5000];, would the following statement be correct syntactically? writeSECTOR(…
PICyourBrain
  • 9,976
  • 26
  • 91
  • 136
14
votes
2 answers

SVG stroke-dasharray offset not consistent

I have a series of circles with borders comprised of smaller circles which I will call 'dots'. I am then animating the circles by rotating them with CSS3's transform, each by either 5 or 15 degrees (alternating) more than the last starting with the…
Zach Saucier
  • 24,871
  • 12
  • 85
  • 147
14
votes
3 answers

Determining struct member byte-offsets at compile-time?

I want to find the byte offset of a struct member at compile-time. For example: struct vertex_t { vec3_t position; vec3_t normal; vec2_t texcoord; } I would want to know that the byte offset to normal is (in this case it should be…
Colin Basnett
  • 4,052
  • 2
  • 30
  • 49
14
votes
4 answers

Determining page numbers and offsets for given addresses

Consider a computer system with a 32-bit logical address and 4KB page size. The system supports up to 512MB of physical memory. How many entries are there in a conventional single-level page table? Conventional single-level page table: 2^32 /…