zero

scala new Range with step equals zero

Is(and why) this really should be prohibited with exception? scala> val r2 = 15 until (10, 0) java.lang.IllegalArgumentException: requirement failed scala> new Range(10,15,0) java.lang.IllegalArgumentException: requirement failed at scala.Predef$.require(Predef.scala:133) ...

Assign zero to float in C

I've got in the habit of using float f = 0.; //with a trailing period when assigning a zero value to a float in C. Should I be using float f = 0.f; //with an explicit float size or just stop messing about and use float f = 0; //with no trailing anything? Where did I pick up that habit and why? Is any version more right or wrong than a...

SQL LEFT JOIN with COUNT(*) problem

I have the following query: SELECT products_categories.categoryID, name, COUNT(*) AS itemCount FROM products_categories LEFT JOIN products_to_categories ON products_to_categories.categoryID = products_categories.categoryID GROUP BY products_categories.categoryID But still there's a problem: categories with no products in them return i...

Windows font that clearly disambiguates the number ZERO from letter O

Our intranet web pages need to clearly disambiguate between the letter O and the number ZERO. Is there a screen+printer font that is installed on WindowsXP and Vista that does this either putting a dot inside zero or a slash through it? If there isn't such a font on the machines themselves, is there a way to embed the font in the page,...

PHP remove first zeros

Want to remove all 0 placed at the beginning of some variable. Some options: if $var = 0002, we should strip first 000 ($var = 2) if var = 0203410 we should remove first 0 ($var = 203410) if var = 20000 - do nothing ($var = 20000) What is the solution? ...

C#: How to detect which textbox value is equal to, or the closest to zero of a group of textboxes/values?

I have a great excel formula I have been using but I want to distribute something a little more substantial and durable and also user friendly to my group of designers at work. I am also dealing with negative numbers unfortunately so going by the minimum value would not work. So if textbox1 said 13, textbox2 said 4, and textbox3 said -...

R: Adding zeroes after old zeroes in a vector ??

Hello Imagine I have a vector with ones and zeroes I write it compactly: 1111111100001111111111110000000001111111111100101 I need to get a new vector replacing the "N" ones following the zeroes to new zeroes. For example for N = 3. 1111111100001111111111110000000001111111111100101 becomes 111111110000000111111111000000000000111111...

using mysql min() find next lowest value

Hello, I have a script to find the lowest value from a column but some entries dont have a value or its set to 0 if this is the case I'd like ti to find the next lowest value. Here is my sql command. $result = mysql_query("SELECT DISTINCT product_name, format, image_url, MIN(online_price), EAN FROM products where $searchstring and form...

string.Format() Blank Zero

In my application, there are possibilities to format a string using the string.Format() function. I want to add the possibility to return blank when the result is zero. As far as I can see, it is possible to do this using the code: 0.toString("0;; ");, but as i already mentioned, I need to use the string.Format() function (since it must...

Crystal reports zero values

Hey guys, So I have this report that I am grouping into different age buckets. I want the count of an age bucket to be zero if there are no rows associated with this age bucket. So I did an outer join in my database select and that works fine. However, I need to add a group based on another column in my database. When I add this group, ...

can i check in C(++) if an array is all 0 (or false)?

can i check in C(++) if an array is all 0 (or false) without iterating/looping over every single value and without allocating a new array of the same size (to use memcmp)? i'm abusing an array of bools to have arbitrary large bitsets at runtime and do some bitflipping on it ...

ActionScript - Tween With Zero Duration?

i have a tween function which fades in a display object over time. when i set my tween duration to 0 nothing happens. isn't the tween suppose to animate in 0 seconds (or frames) to emulate no animation at all? new Tween(this, "alpha", None.easeOut, 0.0, 1.0, 0, true); ...