Hello,
I am not able to get the selection object's start and end offsets in Opera (v9.50) when the selection is collapsed (i.e. just point and click instead of highlighting text). This is my simple test code, which works in FF and Safari but does not work in Opera.
<html>
<head>
<script type="text/javascript">
function showSelect...
Imagine this function:
void SoundManager::playSource(ALuint sourceID, float offset)
{
alSourceStop(sourceID);
ALint iTotal = 0;
ALint iCurrent = 0;
ALint uiBuffer = 0;
alGetSourcei(sourceID, AL_BUFFER, &uiBuffer);
alGetBufferi(uiBuffer, AL_SIZE, &iTotal);
iCurrent = iTotal * offset;
alSourcei(sourceID, ...
Is there an easy way, preferably with a scripting language or a small tool that could be called through a batch file, to operate on a text file, mark an offset, and put everything after the offset into a new file?
I have a text file added to nightly, and I would like to make it so that the end of the file is marked, then after new data ...
I am trying to find the value of a cell 1 column over and 2 rows up using something like excels offset
...
I am having this issue where I am not getting the true offset in IE6. I am using the offset to position a pop-in.
The CSS is something like this:
.container50-50-right-border { }
.container50-50-right-border .title {padding: 0px; margin: 0px;
clear: both;}
.container50-50-ri...
I'm trying get the offset of a regex capture in .NET just like .IndexOf() would return. Is there anyway to do that?
...
Distilling this project down to the simplest of terms;
Users click a button, a record is made with a timestamp of NOW().
NOW() of course equals the time on the server of record creation.
I need to show them stats based on their timezone, not mine.
What is the best method for dealign with time zone offsets in MySql? Is there a spe...
Is there a way in mysql to calculate the offset for any timezone.
For example to get the local time in the time zone 'Asia/calcutta' what i want to do is calculate the offset for this time zone and add that offset to GMT to get the local time.
...
Greetings everyone!
I am trying to write a calendar in PHP. In week view, I want my events to be listed like iCal, where simultaneous events reduces their width to half size.
I have an extremely hard time figuring this one out though, so I hope you can help me. What I want is that if one event is overlapping another, it should set "[sp...
New Question
I am looking for a way in Javascript to get the parent element of a given position in an HTML string (e.g. document.innerHTML or document.body.innerHTML).
Simple example:
<p>I really <em>like <a href="...">stackoverflow</a></em> a lot.</p>
^...........^
Off...
I have the following piece of HTML:
<div><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit ...
I'm attempting to plot a particular line over an original image (an array) that i have. Basically, I have an angle and offset (measured from the center of the image) that I want to plot the line over. The problem is, I'm not exactly sure how to do this. I can write a really complicated piece of code to do this, but I'm wondering if there...
Is there a way to estimate the offset from GMT (or time zone) from a latitude/longitude? I've seen geonames, but this would need to work long term and we don't really want to rely on a web service. It'd just be used for determining whether to display "today" or "tonight" when giving information to various users so it wouldn't need to b...
Lets say I have this struct:
typedef struct nKey {
int num;
widget* widget;
} NUMBER_KEY;
and a function:
void dialKey(widget* widget) {
// Need to print 'num' of the struct that this widget resides in
}
How do I go about accomplishing this? I tried something like:
printf("%d", * (int *) widget - sizeof(int)); // F...
I have an application which collects data into a mysql table. The table has no unique id column, so I can't reference a specific row by id.
I want to write a dump application which every day dumps the new rows added to the table to upload them elsewhere. I could do it by adding a unique id field and storing the last id dumped, but I don...
Hello, I have a form that users fill out, on the form there are multiple identical fields, like "project name", "project date", "catagory", etc. Based on how many forms a user is submitting:
My goal is to:
loop over the number of forms
create individual SQL insert statements
However, PHP throws me a NOTICE that I don't seem to under...
i need to scroll specific text(say Tooltip1 ) on some event,it has name=tooltip_1.
i dont want to scroll it all the way to top but 50 px from top(for better view).
the code below work very fine for safari but is not working for Mozilla and IE.
$("body").animate({scrollTop: $("a[name=tooltip_"+posid_num+"]").offset().top-50},1000);
ple...
I've been given a table based layout to work on and I need to display some tool tips above some input boxes contained in the table.
I can't use any of the offset properties to do this since they all return 1 when the element is contained in a table. Does jQuery or some other library have a way of calculating this?
...
I was wondering... I have a WinForms System.Windows.Forms.ListView with a bunch of ListViewItems that I'm drawing using the View.List style. Each ListViewItem has a "SmallIcon" that I fetch from the ListView's SmallImageList.
My problem is that the icons are showing too close to the border on the left. I've tried to change the bounds an...
I want to get an object's absolute x,y position on the page in Javascript. How can I do this?
I tried obj.offsetTop and obj.offsetLeft, but those only give the position relative to the parent element. I guess I could loop through and add the parent's offset, and its parent's offset, and so on until I get to the object with no parent, ...