What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-04 16:20:02
responsive media queries
/* Max-width */ @media only screen and (max-width: 600px) {...} /* Min-width */ @media only screen and (min-width: 600px) {...} /* Combining media query expressions */ @media only screen and (max-width: 600px) and (min-width: 400px) {...} Add solution -
Other 2021-09-04 12:01:02
bodyparser is deprecated
The package bodyParser is deprecated. You will get this warning with these lines of code: app.use(bodyparser.json()); app.use(bodyParser.urlencoded({extended: true})); If you are using Express 4.16+ you can now replace those lines with: app.use(expres... Add solution -
Javascript 2021-09-04 08:02:02
how to make an express server
const express = require('express'); const app = express(); const PORT = process.env.PORT || 3000; app.get('/', (req, res) => { res.send('<h1>Some HTML</h1>'); res.send('<p>Even more HTML</p>'); }); app.listen(PORT, () =>... Add solution -
Python 2021-09-04 02:52:01
can you assign a pid to a process via python
def main(): # Fetch information for current processes: proc_info_old = get_proc_info() # Extract list of PIDs: pids_old = get_all(proc_info_old, "ProcessId") # Do something that starts one or more new processes: os.sy... Add solution -
Javascript 2021-09-04 00:59:01
javascript ellipsis
function sum(x, y, z) { return x + y + z; } const numbers = [1, 2, 3]; console.log(sum(...numbers)); // expected output: 6 console.log(sum.apply(null, numbers)); // expected output: 6 /* Spread syntax (...) allows an iterable such as an array expres... Add solution -
Shell/Bash 2021-09-03 23:22:02
bash print n lines after match
# Basic syntax: grep -A number word_to_match input_file # This prints "number" number of lines after and including the first # line that matches word_to_match in the input_file # Note, the word_to_match can be any expression that grep uses for ... Add solution