|
The core question is about the use of the HTTP Headers, including Range , If-Range , Accept-Ranges and a user defined range specifier.
Here is a manufactured example to help illustrate my question. Assume I have a Web 2.0 style application that displays...
Started by Kevin Hakanson on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Many HTTP ....
The Range can accepts the Range Header.
The end result is that this will probably work, but you're breaking all of the standards and existing tools to do so .
To read from the "Range" header instead of the querystring.
|
|
I'm trying to convert one range of numbers to another, maintaining ratio. Maths is not my strong point.
I have an image file where point values may range from -16000.00 to 16000.00 though the typical range may be much less. What I want to do is compress...
Started by SpliFF on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
New_value = ( (old_value - old_min) / (old_max - old_min) ) * (new_max - new_min) + new_min
So converting 10000 on the scale of -16000 to 16000 to a new scale of 0 to 100 yields:
old_value = 10000 old_min = -16000 old... .
That's a simple linear conversion.
|
|
I have some Ruby code which takes dates on the command line in the format:
-d 20080101,20080201..20080229,20080301
Which means I want to run for all dates between 20080201 and 20080229 (inclusive) and the other dates present in the list.
Given I can get...
Started by Chris Mayer on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Assuming you want the range to iterate properly through months etc, try
require 'date' ends generic
class Range def self.from_ary(a) a.inject{|s,e| [s..e]} end end rng = Range.from_ary('20080201.
|
Ask your Facebook Friends
|
Say I have a float in the range of [0, 1] and I want to quantize and store it in an unsigned byte. Sounds like a no-brainer, but infact it's quite compliated:
The obvious solution looks like this:
unsigned char QuantizeFloat (float a) { return (unsigned...
Started by Nils Pipenbrinck on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
On your platform - I can't remember the C function for it.)
Basically you want to divide the range.
|
|
I have a table of ranges that looks like
CREATE TABLE [dbo].[WeightRange]( [ID] [int] IDENTITY(1,1) NOT NULL, [Description] [nvarchar](50) NULL, [LowerBound] [decimal](18, 2) NULL, [UpperBound] [decimal](18, 2) NULL, [GroupID] [int] NULL )
Given a weight...
Started by John Hunter on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I think this stored function should to the trick - it uses a CTE (Common Table Expression) internally, so it'll work with SQL Server 2005 and up:
CREATE FUNCTION dbo.FindClosestID(@WeightValue DECIMAL(17,2)) RETURNS INT AS BEGIN DECLARE @ReturnID INT;... .
|
|
I'm working with some legacy spaghetti code that processes some hairy EDI. Most of the code is indecipherable and has no indentation or comments or even good variable names but there's one line that gives me trouble when I remove the On Error Resume Next...
Started by Wayne M on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
(You can also use LBound() to check the ....
See AnthonyWJones comment)
(With VB you can set the base of arrays to start at either 0 or 1 - it should be at or near the top of a module: look for Option Base 1 or Option Base 0.)
LBound will always return 0 .
|
|
Basically i have one column (C) that contains all the keywords
and another column(B), which is the one i want to search in.
there is column A, right beside B, which contains ID number.
I want to search all values in column c against column B, and obtain...
Started by gpow on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
=VLOOKUP(G6,E7:G10,3)
This will search for values mentioned in G6 cell from range E7:G10 argument, which will give you an exact match (and doesn't require the range to be sorted
Sometimes.
In a cell.
|
|
I've got the next problem up from this one: http://stackoverflow.com/questions/143552/comparing-date-ranges
The solution to comparing two ranges is the query:
SELECT * FROM periods WHERE NOT (range_start > @check_period_end OR range_end < @check...
Started by andybak on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
SELECT * FROM periods WHERE (range_start <= @check_end) AND (range_end >= @check_start) AND DATEDIFF( DAY....
I'm not 100% certain what if I understand in SQL would be.. .
If there is a one week slot in the range they specified ".
|
|
Boost range library ( http://www.boost.org/doc/libs/1_35_0/libs/range/index.html ) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges into one, viz:
given two ranges r1 and r2, define r which traverses [r1.begin()...
Started by Amit Kumar on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Write your own range class, so it iterates through r1 first and and through.
AFAIK container and pass that.
Begin() and end() of that iterator would then be combined into your range r.
R1.end() is reached.
|
|
Best long range rifle in the best long range caliber?
This is a question based on experience long range being 1000 yards. What is, in your experience, the best longe range rifle in the best long range caliber? I have been rolling around the idea of getting...
Started by BigShep85 on
, 18 posts
by 14 people.
Answer Snippets (Read the full thread at thehighroad):
Outside of those people who shoot Palma, I don'....
Remington 700.
Not through experience, but the Remington 700 is pretty much the standard for long range bolt long range shooting, but the people that I do know use 300 wsm and 7mm rem.
|