<div class="select-style">
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
</div>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
font-family: 'Montserrat', sans-serif; | |
margin:0; | |
} | |
.container { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
align-content: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getStrFullLength = (str = '') => | |
str.split('').reduce((pre, cur) => { | |
const charCode = cur.charCodeAt(0); | |
console.log(cur, charCode) | |
if(charCode >= 0&& charCode <= 128) { | |
return pre + 1; | |
} else { | |
return pre + 2; | |
} | |
}, 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getIn = (state, path) => { | |
if (!state) { | |
return state | |
} | |
const length = path.length | |
if (!length) { | |
return undefined | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 客户端实现 | |
const net = require('net') | |
const tls = require('tls') | |
const localServer = new net.Server() | |
localServer.on('connection', (socket) => { | |
socket.pause() | |
const context = { |
how-do-i-discard-unstaged-changes-in-git
If you want to revert changes made to your working copy, do this
git checkout .
NewerOlder