var exp=undefinded; if(typeof(exp)=="undefined") { //变量是undefined的处理 } typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined ...
分类:
编程语言 时间:
2020-07-15 15:38:30
阅读次数:
72
Angle Between Hands of a Clock (M) 题目 Given two numbers, hour and minutes. Return the smaller angle (in degrees) formed between the hour and the minut ...
分类:
其他好文 时间:
2020-07-15 10:47:17
阅读次数:
102
Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an inte ...
分类:
其他好文 时间:
2020-07-15 01:00:03
阅读次数:
73
260 Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. ...
分类:
其他好文 时间:
2020-07-14 21:54:31
阅读次数:
104
效果图 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user ...
分类:
Web程序 时间:
2020-07-14 18:34:16
阅读次数:
252
CSS数据样式 表格 定制表格 我们除了可以使用<table>标签进行绘制表格,在css3中display也支持进行表格的样式绘制。 样式规则说明 table 对应 table table-caption 对应 caption table-row 对表 tr table-cell 对于th或td t ...
分类:
Web程序 时间:
2020-07-14 13:37:41
阅读次数:
125
关于thymeleaf中th:insert、th:replace、th:include的区别 1. th:insert:保留自己的主标签,保留th:fragment的主标签 1 需要替换的片段内容: 2 <footer th:fragment="copy"> 3 <script type="text ...
分类:
其他好文 时间:
2020-07-14 13:20:09
阅读次数:
62
转换函数、强制类型转换、利用js变量弱类型转换。 1. 转换函数: js提供了parseInt()和parseFloat()两个转换函数。前者把值转换成整数,后者把值转换成浮点数。只有对String类型调用这些方法,这两个函数才能正确运行;对其他类型返回的都是NaN(Not a Number)。 一 ...
分类:
Web程序 时间:
2020-07-14 11:45:19
阅读次数:
74
Number of Segments in a String (E) 题目 Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space ch ...
分类:
其他好文 时间:
2020-07-14 09:24:30
阅读次数:
84
Given a list of dominoes, dominoes[i] = [a, b] is equivalent to dominoes[j] = [c, d] if and only if either (a==c and b==d), or (a==d and b==c) - that ...
分类:
其他好文 时间:
2020-07-14 00:23:31
阅读次数:
56