Calculate the lineprotocol entry for a single point, using a specific {@link TimeUnit} for the timestamp.
@param precision the time precision unit for this point
@return the String without newLine
540487
public String lineProtocol(final TimeUnit precision) {

    // setLength(0) is used for reusing cached StringBuilder instance per thread
    // it reduces GC activity and performs better then new StringBuilder()
    StringBuilder sb = CACHED_STRINGBUILDERS.get();
    sb.setLength(0);

    escapeKey(sb, measurement);
    concatenatedTags(sb);
    concatenatedFields(sb);
    formatedTime(sb, precision);

    return sb.toString();
  }
306316
def get_line_for_offset(self, code_offset):
        

        prev_line = 0

        for (offset, line) in self.get_linenumbertable():
            if offset < code_offset:
                prev_line = line
            elif offset == code_offset:
                return line
            else:
                return prev_line

        return prev_line
16430
private void appendLine(final String timeStampStr, final int indentLevel, final String line,
            final StringBuilder buf) {
        buf.append(timeStampStr);
        buf.append('\t');
        buf.append(ClassGraph.class.getSimpleName());
        buf.append('\t');
        final int numDashes = 2 * (indentLevel - 1);
        for (int i = 0; i < numDashes; i++) {
            buf.append('-');
        }
        if (numDashes > 0) {
            buf.append(' ');
        }
        buf.append(line);
        buf.append('\n');
    }
1296267
def write_points_with_precision(self, data, time_precision='s'):
        
        warnings.warn(
            "write_points_with_precision is deprecated, and will be removed "
            "in future versions. Please use "
            "``DataFrameClient.write_points(time_precision='..')`` instead.",
            FutureWarning)
        return self.write_points(data, time_precision='s')
587084
public static double precision(long tpCount, long fpCount, double edgeCase) {
        //Edge case
        if (tpCount == 0 && fpCount == 0) {
            return edgeCase;
        }

        return tpCount / (double) (tpCount + fpCount);
    }
754015
public double precision() {
    if(!isBinary())throw new UnsupportedOperationException("precision is only implemented for 2 class problems.");
    double tp = _arr[1][1];
    double fp = _arr[0][1];
    return tp / (tp + fp);
  }
1212859
public static Value timestamp(@Nullable Timestamp v) {
    return new TimestampImpl(v == null, v == Value.COMMIT_TIMESTAMP, v);
  }
446089
public double precision() {
    if(!isBinary())throw new UnsupportedOperationException("precision is only implemented for 2 class problems.");
    if(tooLarge())throw new UnsupportedOperationException("precision cannot be computed: too many classes");
    double tp = _cm[1][1];
    double fp = _cm[0][1];
    return tp / (tp + fp);
  }
1106105
public static boolean isExactEarthTimestamp(String line) {
		try {
			new NmeaMessageExactEarthTimestamp(line);
			return true;
		} catch (AisParseException e) {
			return false;
		} catch (NmeaMessageParseException e) {
			return false;
		}
	}
247209
@Pure
	public double distanceSquaredLine(Point3D point) {
		return distanceSquaredLinePoint(
				getX1(), getY1(), getZ1(),
				getX2(), getY2(), getZ2(),
				point.getX(), point.getY(), point.getZ());
	}
829625
public BatchOptions precision(final TimeUnit precision) {
    BatchOptions clone = getClone();
    clone.precision = precision;
    return clone;
  }
299621
@DefinedBy(Api.COMPILER)
    public long getLineNumber() {
        if (sourcePosition == null) {
            sourcePosition = new SourcePosition();
        }
        return sourcePosition.getLineNumber();
    }
1232022
static TimeUnit parseTimeUnit(String key, @Nullable String value) {
    requireArgument((value != null) && !value.isEmpty(), "value of key %s omitted", key);
    @SuppressWarnings("NullAway")
    char lastChar = Character.toLowerCase(value.charAt(value.length() - 1));
    switch (lastChar) {
      case 'd':
        return TimeUnit.DAYS;
      case 'h':
        return TimeUnit.HOURS;
      case 'm':
        return TimeUnit.MINUTES;
      case 's':
        return TimeUnit.SECONDS;
      default:
        throw new IllegalArgumentException(String.format(
            "key %s invalid format; was %s, must end with one of [dDhHmMsS]", key, value));
    }
  }
1281104
public BitZKline getKline(
      CurrencyPair currencyPair, BitZKlineResolution resolution, Integer size, String microsecond)
      throws IOException {
    return bitz.getKline(BitZUtils.toPairString(currencyPair), resolution.code(), size, microsecond)
        .getData();
  }
1303202
public static final TimeUnit getTimeUnit(int value)
   {
      TimeUnit result = null;

      switch (value)
      {
         case 1:
         {
            // Appears to mean "use the document format"
            result = TimeUnit.ELAPSED_DAYS;
            break;
         }

         case 2:
         {
            result = TimeUnit.HOURS;
            break;
         }

         case 4:
         {
            result = TimeUnit.DAYS;
            break;
         }

         case 6:
         {
            result = TimeUnit.WEEKS;
            break;
         }

         case 8:
         case 10:
         {
            result = TimeUnit.MONTHS;
            break;
         }

         case 12:
         {
            result = TimeUnit.YEARS;
            break;
         }

         default:
         {
            break;
         }
      }

      return result;
   }
292103
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
	public float getLineSpacingExtra (){
		if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
			return mInputView.getLineSpacingExtra();
		return 0f;
	}
577398
public Integer getPrecision()
   {
      if(childNode.getAttribute("precision") != null && !childNode.getAttribute("precision").equals("null"))
      {
         return Integer.valueOf(childNode.getAttribute("precision"));
      }
      return null;
   }