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-27 23:47:02
javascript submit a form with id
// 1. Acquire a reference to our <form>. // This can also be done by setting <form name="blub" id="myAwsomeForm">: // var form = document.forms.blub; var form = document.getElementById("myAwsomeForm"); ... Add solution -
Python 2021-08-27 16:13:01
neural network hyperparameter tuning
# random search cross validation in neural network model from keras.models import Sequential from keras.layers import Dense, Dropout from keras.wrappers.scikit_learn import KerasClassifier def report(results, n_top=3): for i in range(1, n_top + 1): ... Add solution -
-
Javascript 2021-08-27 10:34:01
puppeeter
const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto('https://news.ycombinator.com', {waitUntil: 'networkidle2'}); await page.pdf({path: 'hn.pdf'... Add solution -
Other 2021-08-26 15:14:02
order
SELECT node.created AS node_created, node.nid AS nid FROM {node} node WHERE (( (node.status = '1') AND (node.type IN ('youtube', 'facebook', 'instagram', 'tweet')) AND (node.type IN ('youtube', 'facebook', 'instagram')) )) ORDER BY node_created DESC LI... Add solution -
Python 2021-08-26 11:02:04
difference between args and kwargs in python
>>> def argsKwargs(*args, **kwargs): ... print(args) ... print(kwargs) ... >>> argsKwargs('1', 1, 'slgotting.com', upvote='yes', is_true=True, test=1, sufficient_example=True) ('1', 1, 'slgotting.com') {'upvote': 'yes', 'is_true... Add solution