npm init -y
npm i --save-dev nodemon
npm add babel-preset-env babel-cli
Create a .babelrc config in your project root. Insert the following
{
"presets": ["env"]
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| //License CC0 1.0: https://creativecommons.org/publicdomain/zero/1.0/ | |
| class Deferred extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| value: '' | |
| }; | |
| } | |
| componentDidMount() { |
| const a = [{ | |
| 'id': '1', | |
| 'name': 'a1' | |
| }, { | |
| 'id': '2', | |
| 'name': 'a2' | |
| }, { | |
| 'id': '3', | |
| 'name': 'a3' | |
| }]; |
| { | |
| "name": "tf-js", | |
| "version": "1.0.0", | |
| "main": "script.js", | |
| "license": "MIT", | |
| "dependencies": { | |
| "@tensorflow-models/mobilenet": "^0.2.2", | |
| "@tensorflow/tfjs": "^0.12.3", | |
| "@tensorflow/tfjs-node": "^0.1.9", | |
| "jpeg-js": "^0.3.4" |
| // Public Domain CC0 license. https://creativecommons.org/publicdomain/zero/1.0/ | |
| class Tokenizer { | |
| constructor(config = {}) { | |
| this.filters = config.filters || /[\\.,/#!$%^&*;:{}=\-_`~()]/g; | |
| this.lower = typeof config.lower === 'undefined' ? true : config.lower; | |
| // Primary indexing methods. Word to index and index to word. | |
| this.wordIndex = {}; | |
| this.indexWord = {}; |
| const someFunction1 = () => { | |
| // Call This Function | |
| console.log('called'); | |
| } | |
| const ChildComponent = (props) => { | |
| const [state, useState] = React.useState(0); | |
| const someFunction2 = () => { | |
| // Call This Function | |
| console.log('called'); |
| <?php | |
| /** | |
| * First Method. | |
| */ | |
| function array_search_partial($arr, $keyword) { | |
| foreach($arr as $index => $string) { | |
| if (strpos($string, $keyword) !== FALSE) | |
| return $index; | |
| } | |
| } |
| <?php | |
| //Javascript ki zaroorat nahi yeh sirf php code use karay ga | |
| $server = "localhost"; | |
| $user = "root"; | |
| $password = ""; | |
| $db = "userregistration"; | |
| try { | |
| $con = mysqli_connect($server, $user, $password, $db ); | |
| }catch(Exception $e) { |