根据毫秒数转换为自然语言表示的时间
@param ms 毫秒
@return 自然语言表示的时间
488022
public static String getTimeDes(Long ms) {
        //处理参数为NULL的情况
        if(ms == null){
            return "";
        }
        int ss = 1000;
        int mi = ss * 60;
        int hh = mi * 60;
        int dd = hh * 24;

        long day = ms / dd;
        long hour = (ms - day * dd) / hh;
        long minute = (ms - day * dd - hour * hh) / mi;
        long second = (ms - day * dd - hour * hh - minute * mi) / ss;
        long milliSecond = ms - day * dd - hour * hh - minute * mi - second * ss;

        StringBuilder str=new StringBuilder();
        if(day>0){
            str.append(day).append("天,");
        }
        if(hour>0){
            str.append(hour).append("小时,");
        }
        if(minute>0){
            str.append(minute).append("分钟,");
        }
        if(second>0){
            str.append(second).append("秒,");
        }
        if(milliSecond>0){
            str.append(milliSecond).append("毫秒,");
        }
        if(str.length()>0){
            str=str.deleteCharAt(str.length()-1);
        }

        return str.toString();
    }
1214635
function _msb(word) {
  word |= word >> 1;
  word |= word >> 2;
  word |= word >> 4;
  word |= word >> 8;
  word |= word >> 16;
  word = (word >> 1) + 1;
  return multiplyDeBruijnBitPosition[(word * 0x077CB531) >>> 27];
}
720319
public static char[] readPassword(String msg) {
		Console console = System.console();
		if (console != null) {
			return console.readPassword();
		}
		// console not available, most likely because of running inside IDE, try normal
		scanner = getScanner();
		System.out.print(msg);
		return scanner.nextLine().toCharArray();
	}
1179744
public static long getMs(String time) {
    try {
      return FormatUtils.parseTimeSize(time);
    } catch (Exception e) {
      throw new RuntimeException(ExceptionMessage.INVALID_TIME.getMessage(time));
    }
  }
363620
public S ms(Long milliseconds) {
        builder.milliseconds(String.valueOf(milliseconds));
        return self;
    }
1325764
def _sub_ms_char(self, match):
        """"""
        orig = match.group(1)
        if self.smart_quotes_to == 'ascii':
            sub = self.MS_CHARS_TO_ASCII.get(orig).encode()
        else:
            sub = self.MS_CHARS.get(orig)
            if type(sub) == tuple:
                if self.smart_quotes_to == 'xml':
                    sub = '&#x'.encode() + sub[1].encode() + ';'.encode()
                else:
                    sub = '&'.encode() + sub[0].encode() + ';'.encode()
            else:
                sub = sub.encode()
        return sub
979882
public static function makeMsgId()
    {
        static $sequence = 0;
        static $t = 0;
        if (!$t) {
            $t = static::getMillisecond();
            $t = ($t - $t % 1000) / 1000;
            $t = $t % 10000 * 10000;
        }
        //获取msgId
        ++$sequence;

        return $t + $sequence;
    }
22146
function _get_ms(a, b) {
	debug.assert(a).is('date');
	debug.assert(b).is('date');
	if(a < b) {
		return b.getTime() - a.getTime();
	}
	return a.getTime() - b.getTime();
}
333917
protected String getResultString(Object result) {
        if (result == null) {
            return StringUtils.EMPTY;
        }

        if (result instanceof Map) { // 处理map
            return getMapResultString((Map) result);
        } else if (result instanceof List) {// 处理list
            return getListResultString((List) result);
        } else if (result.getClass().isArray()) {// 处理array
            return getArrayResultString((Object[]) result);
        } else {
            // 直接处理string
            return ObjectUtils.toString(result, StringUtils.EMPTY).toString();
            // return ToStringBuilder.reflectionToString(result, ToStringStyle.SIMPLE_STYLE);
        }
    }
270698
public static String msgToString(AbstractMessage message)
   {
     if (message == null) return STRING_NULL;
     if (message instanceof JsMessage) return message + "[" + ((JsMessage)message).getSystemMessageId() + "]";
     return message.toString();
   }
640565
public String existsWithPrimaryKey(MappedStatement ms) {
        Class<?> entityClass = getEntityClass(ms);
        StringBuilder sql = new StringBuilder();
        sql.append(SqlHelper.selectCountExists(entityClass));
        sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
        sql.append(SqlHelper.wherePKColumns(entityClass));
        return sql.toString();
    }
812357
public static String getString(final String msg) {
        ConsoleMenu.print(msg);

        BufferedReader bufReader = null;
        String opt = null;

        try {
            bufReader = new BufferedReader(new InputStreamReader(System.in));
            opt = bufReader.readLine();
        } catch (final IOException ex) {
            log(ex);
            System.exit(1);
        }

        return opt;
    }
444312
function shortFormat(ms) {
  if (ms >= d) return Math.round(ms / d) + 'd';
  if (ms >= h) return Math.round(ms / h) + 'h';
  if (ms >= m) return Math.round(ms / m) + 'm';
  if (ms >= s) return Math.round(ms / s) + 's';
  return ms + 'ms';
}
618515
public static boolean makeSureMsgId(Map<String, Object> map) {
        boolean newMsgIdGenerated = false;
        if (StringUtil.isEmpty(map.get("$msgId"))) {
            if (MsgIdHolder.get() == null) {
                MsgIdHolder.init();
                newMsgIdGenerated = true;
                LOG.debug("没有提供$msgId,因此这里初始化一个!");
            }
            map.put("$msgId", MsgIdHolder.get());
        } else {
            MsgIdHolder.set(map.get("$msgId").toString());
        }
        return newMsgIdGenerated;
    }
1249804
public static String readString(String msg) {
		Console console = System.console();
		if (console != null) {
			return console.readLine(msg);
		}
		// console not available, most likely because of running inside IDE, try normal
		scanner = getScanner();
		System.out.print(msg);
		return scanner.nextLine();
	}
290729
public Class<?> getEntityClass(MappedStatement ms) {
        String msId = ms.getId();
        if (entityClassMap.containsKey(msId)) {
            return entityClassMap.get(msId);
        } else {
            Class<?> mapperClass = getMapperClass(msId);
            Type[] types = mapperClass.getGenericInterfaces();
            for (Type type : types) {
                if (type instanceof ParameterizedType) {
                    ParameterizedType t = (ParameterizedType) type;
                    if (t.getRawType() == this.mapperClass || this.mapperClass.isAssignableFrom((Class<?>) t.getRawType())) {
                        Class<?> returnType = (Class<?>) t.getActualTypeArguments()[0];
                        //获取该类型后，第一次对该类型进行初始化
                        EntityHelper.initEntityNameMap(returnType, mapperHelper.getConfig());
                        entityClassMap.put(msId, returnType);
                        return returnType;
                    }
                }
            }
        }
        throw new MapperException("无法获取 " + msId + " 方法的泛型信息!");
    }
742936
public String deleteByPrimaryKey(MappedStatement ms) {
        final Class<?> entityClass = getEntityClass(ms);
        StringBuilder sql = new StringBuilder();
        if (SqlHelper.hasLogicDeleteColumn(entityClass)) {
            sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass)));
            sql.append("<set>");
            sql.append(SqlHelper.logicDeleteColumnEqualsValue(entityClass, true));
            sql.append("</set>");
            MetaObjectUtil.forObject(ms).setValue("sqlCommandType", SqlCommandType.UPDATE);
        } else {
            sql.append(SqlHelper.deleteFromTable(entityClass, tableName(entityClass)));
        }
        sql.append(SqlHelper.wherePKColumns(entityClass));
        return sql.toString();
    }