Categories
Mastering Development

Trying to build vue component library using rollup and vueJs 3

I am trying to create a vue component library using rollup and vuejs. It worked with vue2 but was unable to parse css with vue3. I have upgraded the dependency in package.json package.json { "name": "vue2tslibrary", "version": "0.1.59", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", "build:js": "rimraf dist && rollup -c […]

Categories
Ask Engineering Software Engineering

Does default settings should be considered as business rules from the view point of “Clean Architecture”?

The examples of default settings: Default port for server applications Default resources directory for Java Applications Default Webpack config file ("webpack.config.js") My particular case I have the utility for web application projects building, based on gulp and webpack. When user did not specified some settings in config file of his project (similar to pom.xml, webpack.config.js, […]

Categories
Mastering Development

How to use web worker inside a for loop in javascript?

Following is the code to create a 2d matrix in javascript: function Create2DArray(rows) { var arr = []; for (var i=0;i<rows;i++) { arr[i] = []; } return arr; } now I have a couple of 2d matrices inside an array: const matrices = [] for(let i=1; i<10000; i++){ matrices.push(new Create2DArray(i*100)) } // I’m just mocking […]

Categories
Mastering Development

File type VS-code icons do not show in Windows Explorer

I recently upgraded Windows 7 to Windows 10. All file type extensions that open with VS Code (.c ,.js,etc.) have the same icon in Windows Explorer, which is confusing. I know that VS code 1.28 introduced different icons for different file-types. I tried re-installing but nothing changed. Here is a picture of my Windows Explorer […]

Categories
Mastering Development

TypeError: Duplicate declaration, Module build failed Error in Typescript Project

Good Day, I have code something like below In A.ts file: declare class LayerManager { //code constructor(factory: Factory); //code } let self: LayerManager; function LayerManager(factory: Factory) { //code self = this; //code } export default LayerManager; In B.ts file: import LayerManager from ‘../layer-manager/index’; //Code this.layer = new LayerManager(this.factory); //<—In order to have construct Signature I […]

Categories
Mastering Development System & Network

Selenium and python in intranet

At the moment there is a local web solution in Python with FRAMEWORK CHERRYPY running, when deploying the application on a web server it does not work. The code or function (complement) is needed in the user’s browser, the URL of the Reuter (MODEM) http://192.168.100.1 is opened and the user and password fields automatically fill […]

Categories
Mastering Development

NestJS Testing: decorator is not a function

My dependencies: "@nestjs/common": "7.4.4", "@nestjs/core": "7.4.4", "typescript": "4.0.2", "jest": "26.4.2", "jest-junit": "11.1.0", "ts-jest": "26.3.0", I have a custom decorator: import { Inject } from "@nestjs/common"; import { DATABASE_SERVICE } from "./database.constants"; export const InjectDatabase = () => Inject(DATABASE_SERVICE); I use it in constructor for a service I’m willing to cover with tests: import { DatabaseService, […]

Categories
User Help

Is there a way to pause or turn off individual code completions for sublime text editor 3

I currently have a plethora or plugins installed for sublime text editor, but I was wondering if there is a way to turn off[Not Uninstall] various different code completions, so If i am working on Js or a Node application, I only see code completions for Node and Js. Currently I’m getting auto completions for […]

Categories
Mastering Development

How do I reflect a dotnet web api endpoint that uses query string parameters in SwagggerUI?

I’m trying to implement a dotnet web api with API versioning that uses query strings and headers. Here im using swagger to document and test the endpoints. I successfully used path versioning and reflected the endpoints in swagger. But im struggling to understand how to reflect query string & header versioning in swagger. I tried […]

Categories
CMS Magento Mastering Development

Magento 2: How to make Product image uploader rename the image file if the same filename exists?

I’m using Magento v2.3.4 and Cloudflare to cache css, js, and images. The problem is when i tried to upload product image from the backend using the same filename and extension, the image uploader still showing the old image, if i turn off the cloudflare caching , this issue doesn’t exists because the file is […]