What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-08-28 00:09:02
react proptypes
import PropTypes from 'prop-types'; MyComponent.propTypes = { // You can declare that a prop is a specific JS type. By default, these // are all optional. optionalArray: PropTypes.array, optionalBool: PropTypes.bool, optionalFunc: PropTypes.fun... Add solution -
Javascript 2021-08-28 00:08:01
node.js express post query string
const express = require('express'); const bodyParser = require('body-parser'); const app = express(); app.use(bodyParser.urlencoded({ extended: true })); app.post('/post-test', (req, res) => { console.log('Got body:', req.body); res.sendStatu... Add solution -
Javascript 2021-08-28 00:03:02
Access to XMLHttpRequest has been blocked by CORS policy node js
/* npm i cors or yarn add cors then in your node app */ const cors = require('cors'); const corsOptions ={ origin:'http://localhost:3000', credentials:true, //access-control-allow-credentials:true optionSuccessStatus:200 } app.use... Add solution -
Python 2021-08-27 23:28:02
using swagger with serverless python
{ "swagger": "2.0", "info": { [...] }, "schemes": ["https"], "consumes": ["application/json"], "produces": ["application/json"], "paths": { &q... Add solution -
Python 2021-08-27 22:41:02
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: auth
# foo/apps.py #### #The problem is that with the changes to apps in Django 1.7, apps are required to have a unique label. #By default the app label is the package name, so if you've got a package with the same name as one of your app modules (foo in this... Add solution -
Other 2021-08-27 22:40:01
fastify point-of-view
//BASIC TEMPLATE const fastify = require('fastify')() fastify.register(require('point-of-view'), { engine: { ejs: require('ejs') } }) fastify.get('/', (req, reply) => { reply.view('/templates/index.ejs', { text: 'text' }) }) // With async... Add solution -
Shell/Bash 2021-08-27 21:12:01
linux ping options
-a Audible ping. -A Adaptive ping. Interpacket interval adapts to round-trip time, so that effectively not more than one (or more, if preload is set) unanswered probes present in the network. Minimal interval is 200msec for not super-user. On networks wi... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5