码迷,mamicode.com
首页 >  
搜索关键字:a number whose    ( 27532个结果)
013#猜字游戏
重点:如何生成随机数? #!/bin/bash # random=$(date +%s%N) max=100 number=$((random%max)) guess=0 guessCount=0 echo "Guess a guess between 1 and $max." while [ "$ ...
分类:其他好文   时间:2020-06-05 00:40:25    阅读次数:69
1365. How Many Numbers Are Smaller Than the Current Number
package LeetCode_1365 import java.util.* /** * 1365. How Many Numbers Are Smaller Than the Current Number * https://leetcode.com/problems/how-many-num ...
分类:其他好文   时间:2020-06-04 19:56:56    阅读次数:67
正则表达式:去除Unicode
背景:最近在做中文分词的时候,发现分词后的数据中出现很多特殊字符,即使进行了去停用词操作,但是特殊字符太多,也不可能都加到停用词里,所以就准备用正则去掉,正则很简单,直接上代码: /** * 正则去掉unicode等特殊字符 * */ private static String regularFil ...
分类:其他好文   时间:2020-06-04 16:52:49    阅读次数:84
leetcode 525. Contiguous Array
Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. Example 1: Input: [0,1] Output: 2 Explanation: [0 ...
分类:其他好文   时间:2020-06-04 01:36:55    阅读次数:59
【leetcode】1431. Kids With the Greatest Number of Candies
题目如下: Given the array candies and the integer extraCandies, where candies[i] represents the number of candies that the ith kid has. For each kid check ...
分类:其他好文   时间:2020-06-03 23:40:35    阅读次数:99
CSS 变量
CSS 原生支持变量 不需要 各种预编译器 放 mdn 链接 https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties 直接点 个人喜欢用 :root :root 伪类上设置自定义属性,然后在整个文档需要 ...
分类:Web程序   时间:2020-06-03 23:22:29    阅读次数:88
数值常用的属性和方法
toString方法、toFixed方法、toPrecision方法、isNaN方法、isFinte方法、parseInt方法、parseFloat方法、Number.isInteger方法 ...
分类:其他好文   时间:2020-06-03 20:29:14    阅读次数:76
数据类型判断
// var num = 10; // console.log(typeof num); // number // var str = 'eric'; // console.log(typeof str); //string // var flag = true; // console.log(ty ...
分类:其他好文   时间:2020-06-03 20:25:14    阅读次数:68
Powershell 检测设备管理器
Powershell 检查设备管理器 Get-WmiObject -Class Win32_PNPEntity 获取设备信息 Name存在且 PNPClass 为 $Null 的设备为其他设备(Other Devices) Status 为 "Error" 的设备为未正常工作设备(Yellow Ba ...
分类:系统相关   时间:2020-06-03 20:14:07    阅读次数:99
Number of Operations to Make Network Connected 之 并查集
本题的关键是要知道图论中的一个原理:无向图中, n个结点 至少需要 n-1条边,才能使各个结点相连。 有两种解法: 1.用递归遍历的方式,计算有多少个独立的连通的部分,我称为“簇”。需要移动的边就是 簇的个数减1。 2.使用并查集,计算有几个联通部分,有几条多余的边。如果多余的边小于联通部分,返回- ...
分类:Web程序   时间:2020-06-03 17:36:29    阅读次数:81
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!