range

ArgumentOutOfRangeException at MySql execution. (MySqlConnector .NET)

I am getting this exception from a MySqlCommand.ExecuteNonQuery(): Index and length must refer to a location within the string. Parameter name: length The command text is as follows: INSERT INTO accounts (username, password, salt, pin, banned, staff, logged_in, points_a, points_b, points_c, birthday) VALUES ('admi...

Range Selection and Mozilla

I would like to specify that firefox select a range. I can do this easily with IE, using range.select();. It appears that FFX expects a dom element instead. Am I mistaken, or is there a better way to go about this? I start by getting the text selection, converting it to a range (I think?) and saving the text selection. This is where I'm...

IPhone Range Slider

I know there is a UISlider but does anyone already made RangeSlider ( with two thumbs ?) or knows how to extend the uislider? ...

How do I find a node in a range, and then remove it?

I'm copying a range from the page and pasting it back elsewhere, but this becomes problematic when it includes a piece of the page that I don't want to copy. Is there a good way to remove nodes from a range by id? Or if not, in the event that there are two nodes on the page with the same id, is there any way to identify one over the othe...

How to convert a number to a range of prices

I want to calculate the amount to charge my customers, when they buy licenses of my product. I sell it in ranges of licenses: 1-10 : $50/user 11-20 : $40/user 21-30 : $30/user 31-50 : $20/user So when someone purchases 136 licenses, I will charge him: 50 x 2 x $20 = $2000 30 x 1 x $30 = $900 6 x $50 = $300 I'm looking for an...

Range with leading zero in ruby

Hi, i have a form where my users can register to my site. They fill in theirs birthdate in the form: birthyear, birthmonth and birthday. So i am using Range to create the select in the form like this: = f.select(:birthmonth, options_for_select((1..12))) But that doesnt start the single digit numbers with a zero like i want: 01, 02, 03...

Remove All id Attributes from nodes in a Range of Fragment

Is there a way to remove the id attribute of every node in a range or fragment? Update: I finally found out that the bug I'm struggling with is based on a <[script]> being included in a range, and therefore unexpectedly cloned, when a chrome user does a ctrl+a. My goal would be to remove any instance of <[script]> from the range (or doc...

how do i set a value to a range using a function from module in excel vba?

hello all, i want to do a simple function in a module in excel vba, so i can use it as a custom function in excel. (i use excel 2003, or 2007 , it's doesnt matter) i create a function(!) in a new workbook and it's looks like this: Function a() Sheets(1).Range("A1").Value = 4 end function but when i try to use it on the sheet1 it...

Range of int and long datatypes

I learned the range of int and long on 32 bit windows is: signed int: -32767 to 32767 signed long: -2147483647 to 2147483647 why does the int has same range as long type as mentioned on msdn? http://msdn.microsoft.com/en-us/library/s3f49ktz%28VS.80%29.aspx ...

MySQL: Finding rows with conflicting date ranges

Hi there, I'm writing an ad booking system for our site. Ads are booked in with a StartDate and EndDate field to indicate how long they're online for. When adding a new advert, I have a quick validation check to make sure the new ad doesn't clash with an existing ad that's booked into the same position. I thought I had it with this qu...

Rails - Trying to query from a date range...everything from today

I'm trying to figure the best way to query a date range from rails...I looked around on Google but am unsure about how to use this syntax. I have a Model that has various events and I like to add to my find condition a caveat that should only show events where the field :st_date is today or later, in effect only show me data that is cur...

Multiple range product in Python

Is there a better way to do this: perms = product(range(1,7),range(1,7),range(1,7)) so that I can choose how many ranges I use? I want it to be equivalent to this, but scalable. def dice(num) if num == 1: perms = ((i,) for i in range(1,7)) elif num == 2: perms = product(range(1,7),range(1,7)) elif num == 3...

jQuery, how do I check a time range?

Hi all, I want to display 3 different background images according to the time of the day: one for morning from 4am to 12am one for afternoon from 12am to 6pm and one for the night from 6pm to 4pm. Im using the json server to get the time zone etc... I tried this but doesn't work properly: $(document).ready(function(){ var timezon...

Ruby get nth item from massive range

Suppose I have this range: ("aaaaa".."zzzzz") How would I get the Nth item from the range without generating the entire thing before hand/each time? ...

Can I load the max value of the range attribute in CFINPUT using and AJAX call?

I have a CFINPUT tag in a CFFORM. I want to set the range dynamically without posting the page. I have several AJAX calls throughout the page to dynamically load form fields on the fly: <cfselect id="this" name="this" bind="cfc:Data.getThis()" bindonload="true" /> <cfselect id="that" name="that" bind="cfc:Data.getThat({p1})" /> <cfsel...

Word Automation search in range

This is how I define the find object: Range rngDoc = m_oDocument.GetContent(); nEnd = rngDoc.GetEnd(); rngDoc.SetRange(nStart,nEnd);//do not search entire document -> faster Find fn = rngDoc.GetFind(); However, when I execute the Find, it finds objects that lay before the given start. Any idea how do I define where the...

PHP: detecting IP's entry to a specific IP range

I have the PHP function that determines whether one IP goes to a specific IP range, but I don't know how to find out the IP's network and mask. Can anyone help with this? <? // Example of calling and checking IP-address 192.168.0.4 // belonging to a network 192.168.0.0 with mask 255.255.255.248 if(ip_vs_net("192.168.0.4","192.168.0.0",...

Signed Hexidecimal value range

Say I had a 6 digit hexadecimal signed in two's complement. What would be its range? -(16 ^ 5) < x < (16 ^ 5) Correct? ...

php and XML range into array

The code below helps be to get the WHOLE XML and put it into an array. What I'm wondering is, what would be a good way to get the XML only from item 3 - 6 or any arbitrary range instead of the whole document. $d = new DOMDocument(); $d->load('http://news.google.com/?output=rss'); foreach ($d->getElementsByTagName('item') as $t) { $...

Need help to create a PHP echo script from a range of numbers.

I need a simple script that reads a number from POST (we'll call the value 'number'). It will be a three digit number that must range from the following: 301-340 401-440 501-540 601-640 701-740 801-840 If it doesn't fall in these ranges, I need to echo a message. How would one do this? ...