Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for ToFloat (0.11 sec)

  1. src/main/java/org/codelibs/core/convert/FloatConversionUtil.java

         * @return 変換された{@link Float}
         */
        public static Float toFloat(final Object o) {
            return toFloat(o, null);
        }
    
        /**
         * {@link Float}に変換します。
         *
         * @param o
         *            変換元のオブジェクト
         * @param pattern
         *            パターン文字列
         * @return 変換された{@link Float}
         */
        public static Float toFloat(final Object o, final String pattern) {
            if (o == null) {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. internal/s3select/sql/value.go

    	return &Value{value: b}
    }
    
    // FromArray creates a Value from an array of values.
    func FromArray(a []Value) *Value {
    	return &Value{value: a}
    }
    
    // ToFloat works for int and float values
    func (v Value) ToFloat() (val float64, ok bool) {
    	switch x := v.value.(type) {
    	case float64:
    		return x, true
    	case int64:
    		return float64(x), true
    	}
    	return 0, false
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Feb 25 20:31:19 UTC 2022
    - 20.2K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/core/convert/FloatConversionUtilTest.java

     */
    public class FloatConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToFloat() throws Exception {
            assertEquals(new Float("1000.5"), FloatConversionUtil.toFloat("1,000.5"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveFloat() throws Exception {
            assertEquals(1000.5, FloatConversionUtil.toPrimitiveFloat("1,000.5"), 0);
        }
    
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/convert/NumberConversionUtil.java

                return DoubleConversionUtil.toDouble(o);
            } else if (type == Long.class) {
                return LongConversionUtil.toLong(o);
            } else if (type == Float.class) {
                return FloatConversionUtil.toFloat(o);
            } else if (type == Short.class) {
                return ShortConversionUtil.toShort(o);
            } else if (type == BigInteger.class) {
                return BigIntegerConversionUtil.toBigInteger(o);
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/rank/fusion/RankFusionProcessor.java

                        }
                    }
                }
            }
    
            final var docs = scoreDocMap.values().stream()
                    .sorted((e1, e2) -> Float.compare(toFloat(e2.get(scoreField)), toFloat(e1.get(scoreField)))).toList();
            int offset = 0;
            for (int i = 0; i < windowSize / 2 && i < docs.size(); i++) {
                if (!mainIdSet.contains(docs.get(i).get(idField))) {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Fri Oct 11 21:20:39 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  6. internal/s3select/json/record.go

    }
    
    // Set - sets the value for a column name.
    func (r *Record) Set(name string, value *sql.Value) (sql.Record, error) {
    	var v interface{}
    	if b, ok := value.ToBool(); ok {
    		v = b
    	} else if f, ok := value.ToFloat(); ok {
    		v = f
    	} else if i, ok := value.ToInt(); ok {
    		v = i
    	} else if t, ok := value.ToTimestamp(); ok {
    		v = sql.FormatSQLTimestamp(t)
    	} else if s, ok := value.ToString(); ok {
    		v = s
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/es/config/bsbhv/BsFileConfigBhv.java

            try {
                final RESULT result = entityType.newInstance();
                result.setAvailable(DfTypeUtil.toBoolean(source.get("available")));
                result.setBoost(DfTypeUtil.toFloat(source.get("boost")));
                result.setConfigParameter(DfTypeUtil.toString(source.get("configParameter")));
                result.setCreatedBy(DfTypeUtil.toString(source.get("createdBy")));
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  8. internal/s3select/sql/evaluate.go

    				return false
    			}
    			for i := range aA {
    				if !cmp(aA[i], bA[i]) {
    					return false
    				}
    			}
    			return true
    		}
    		// Try as numbers
    		aF, aOK := a.ToFloat()
    		bF, bOK := b.ToFloat()
    
    		diff := math.Abs(aF - bF)
    		return aOK && bOK && diff < floatCmpTolerance
    	}
    
    	var rhs Value
    	var err error
    	var eltVal *Value
    	switch {
    	case e.JPathExpr != nil:
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 12K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/beans/impl/BeanDescImpl.java

                    args[index] = LongConversionUtil.toLong(args[index]);
                    return true;
                } else if (paramTypes[index] == float.class) {
                    args[index] = FloatConversionUtil.toFloat(args[index]);
                    return true;
                } else if (paramTypes[index] == double.class) {
                    args[index] = DoubleConversionUtil.toDouble(args[index]);
                    return true;
                }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/es/config/bsbhv/BsDataConfigBhv.java

            try {
                final RESULT result = entityType.newInstance();
                result.setAvailable(DfTypeUtil.toBoolean(source.get("available")));
                result.setBoost(DfTypeUtil.toFloat(source.get("boost")));
                result.setCreatedBy(DfTypeUtil.toString(source.get("createdBy")));
                result.setCreatedTime(DfTypeUtil.toLong(source.get("createdTime")));
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 10.2K bytes
    - Viewed (0)
Back to top