Search thousands of free JavaScript snippets that you can quickly copy and paste into your web pages. Get free JavaScript tutorials, references, code, menus, calendars, popup windows, games, and much more.
nodejs os module
const os = require('os');
var totalMemory = os.totalmem();
var freeMemory = os.freemem(); console.log(`Total Memory: ${totalMemory}`);
console.log(`Free Memory: ${freeMemory}`);
nodejs path module
const path = require('path'); var pathObj = path.parse(__filename); console.log(pathObj);> node path-module.js
{ root: 'C:\\',
dir: 'C:\\Users\\Edward Lance Lorilla\\Documents\\node-practice',
base: 'path-module.js',
ext: '.js',
name: 'path-module' }
multipart element ui
<form name="documentForm" ref="form" @submit.prevent = "store$" method="post" enctype="multipart/form-data">
<el-upload :on-change="handleChange" :file-list="create$.file" action="" class="upload-demo" ref="upload" multiple :auto-upload="false"> <v-btn slot="trigger">Upload</v-btn> </el-upload>
<v-btn color="blue darken-1" flat form="documentForm" type="submit">Save</v-btn>
</form>
new Vue({methods:{store$(){ var vm = this var store$ = new FormData(vm.$refs.form); store$.append('category_id', vm.create$.category_id ) _.map(vm.create$.file, function(data){ store$.append('file[]', data.raw ) }) post('/api/documents', store$).then(function (response) { vm.$set(vm.$root.$data.documents, vm.$root.$data.documents.length, response.data ) vm.$root.successResponse('Create A Document') vm.$router.push('/documents') }).catch(function (_ref2) { vm.$root.errorResponse(_ref2) });}
})
creating and loading a module nodejs
//app.js
//logger.js
var logger = require('./logger.js');logger('edward');
//logger.js
var url = 'edward.io';function log(message) { console.log(message) } module.exports = log;
Subscribe to:
Posts (Atom)
Renowned Water Expert Reynold Aquino Offers Exclusive Water Softener Discounts
Los Angeles, California - November 21, 2024 - World-renowned water expert Reynold Aquino is excited to announce exclusive discounts on prem...
-
code.gs // 1. Enter sheet name where data is to be written below var SHEET_NAME = "Sheet1" ; // 2. Run > setup // // 3....