To update to a new major version all the packages, install the npm-check-updates package globally:
npm install -g npm-check-updates
then run it:
ncu -u
To update to a new major version all the packages, install the npm-check-updates package globally:
npm install -g npm-check-updates
then run it:
ncu -u
# 2021年浙江卫视春晚让郭冬临喝了很多瓶水的小品里的一道数学题 | |
# 题面:小明有10元钱,一瓶饮料2元钱,2个瓶盖可以换一瓶饮料,4个瓶身可以换一瓶饮料 | |
# 问小明最多可以用这10元钱取得多少瓶饮料? | |
import math | |
# 持有的钱 | |
money = 10 | |
# 饮料单价 | |
price = 2 | |
# 瓶盖兑换规则 |
<html> | |
<head> | |
.editor-main-menu.sticky { | |
position: fixed; | |
top: 0; | |
width: 100%; | |
z-index: 10; | |
} | |
.editor-main-menu.sticky + .sibling-element { |
My code when taking the project in Jupyter notebook for DataQuest: https://www.dataquest.io/m/218/guided-project%3A-exploring-gun-deaths-in-the-us/9/next-steps
import csv
f = open("guns.csv", "r")
data = list(csv.reader(f))
print(data[0:4])
[['', 'year', 'month', 'intent', 'police', 'sex', 'age', 'race', 'hispanic', 'place', 'education'], ['1', '2012', '01', 'Suicide', '0', 'M', '34', 'Asian/Pacific Islander', '100', 'Home', '4'], ['2', '2012', '01', 'Suicide', '0', 'F', '21', 'White', '100', 'Street', '3'], ['3', '2012', '01', 'Suicide', '0', 'M', '60', 'White', '100', 'Other specified', '4']]
<!-- This is the corresponding "starter code" for 07_Markers/Infowindows in Udacity and Google's Maps | |
API Course, Lesson 1 --> | |
<html> | |
<head> | |
<!-- styles put here, but you can include a CSS file and reference it instead! --> | |
<style type="text/css"> | |
html, body { | |
height: 100%; | |
margin: 0; | |
padding: 0; |
(function () { | |
const form = document.querySelector('#search-form'); | |
const searchField = document.querySelector('#search-keyword'); | |
let searchedForText; | |
const responseContainer = document.querySelector('#response-container'); | |
form.addEventListener('submit', function (e) { | |
e.preventDefault(); | |
responseContainer.innerHTML = ''; | |
searchedForText = searchField.value; |
/** | |
* @description function to replace text with a English language attribute | |
* @param {string} element - html element that need to be check and updated | |
* @param {string} text - text to be replaced | |
* @param {string} langCode - the language attribute that needs to be included. | |
*/ | |
function insertLangSpan(element, text, langCode) { | |
var newHTML = '<span lang="' + langCode + '">'+ text +'</span>'; |
//Simple media queries mixins for phone and tablet. Including variables of the basic mobile size, portrait and landscape orientation in sass. Can be quick applied in a mini site. | |
// Author: Millie Lin | |
// website: www.millielin.com | |
// ***** Breakpoints for Responsive Screen | |
// width scale for phone | |
$phone-min-width: 320px !default; | |
$phone-max-width: 504px !default; | |
// height scale for phone | |
$phone-min-height: 346px !default; |