Categories
Linux Mastering Development

Can’t filter file extensions when the list is in a variable [duplicate]

I guess this is a relative simple question, but I can’t find the way to access the variable content when doing a git diff, so it lists all the files with specific extension. // This works fine git diff –name-only –cached –diff-filter=d *.{sln,csproj,vbproj,vcxprojfilters,proj,projitems,shproj,xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct,json,json5,webmanifest,yml,yaml,md,htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue,cmd,bat,sh,Makefile,cs,csx,cake,vb,vbx,cs,csx,cake,cs,csx,cake,vb,vb} MyProyect/Service/App/AppGridService.cs // but this does not work // this is the variable […]

Categories
Mastering Development

Cannot find module ‘class-transformer’ or its corresponding type declarations

I am trying to use the class-transformer package with NestJS v7. The class-transformer package was installed with npm i class-transformer –save. I’ve followed instructions as per readme.md This package does have a typescript definition, I can see it on my filesystem (in the correct directory inside node_modules), VS Code navigates to the definition just fine, […]

Categories
Mastering Development

.Net Core API (POST) – Read payload that is coming in the body

I am new to writing API’s. I am writing a post method that will receive JSon object as part of the body but I don’t know how to read the body or possibly I’m not passing it properly in my test. I can see that the payload is there because the ContentLength matches exactly. The […]

Categories
Mastering Development

Built ASP.NET Application in Visual Studio – How Move it to IIS Express?

Been scouring web, this seems like a very simple thing to do…I have done a lot of PHP deployments, but ASP.NET is killing me… I built ASP.NET app in Visual Studio. I can run it from the IIS Express button. Not sure what it does, sticks in on a new port. Anyway, I want to […]

Categories
Mastering Development

Httpclient returns 403 for post request but works using postman and restclient

I am scratching my head since morning today and not able to figure out why it’s not working. I am trying to consume third party api in my sample .net core (3.1) console application. I have tested its working from the postman and restclient and it worked fine. For some reason, I am getting 403 […]

Categories
Mastering Development Software

Applying function to file line by line or read entirely into structure first?

I’ve often found myself with the need to develop tools that process large files over a network and perform an operation to every element in that file. An element may be an individual line or an object that is parsed out based on its structure (XML, JSON, binary format). A key feature of these tools […]

Categories
User Help Web Pro

Is there a somewhat reliable way to turn an ugly HTML table (as a string) into a nice JSON/array structure in PHP?

PS: Stack Overflow has started showing perpetual CAPTCHAs, never allowing me to post, so I cannot ask there. I keep finding myself in this situation: I find some data table somewhere, or get sent it to me as in the case of my grocery shopping, where they e-mail a HTML receipt to me, not providing […]

Categories
Mastering Development System & Network

PHP Warning: PHP Startup: imagick: Unable to initialize module

I am getting following error when installed with lib imagick, but able to see the imagick module. Could you please check and help to resolve the issue without uninstalling the imagick module. Thank you Error: php_errors.log:[22-Jun-2020 17:40:47 UTC] PHP Warning: PHP Startup: imagick: Unable to initialize module php_errors.log:Module compiled with module API=20100525 php_errors.log:PHP compiled with […]

Categories
Mastering Development

Jest test with TypeScript not recognizing @ symbol in imports [duplicate]

I’m setting up the tests for my Vue project (with TypeScript) using the Jest framework. Everything seems to work alright, except with the @ symbol in my imports, e.g., import { Foo } from ‘@/bar. Whether it’s in my test files or in the source code, it doesn’t understand it and returns: Cannot find module […]

Categories
CMS Mastering Development

Uploading user photo with content-type multipart/form-data

I’m using Vue + Axios to update user information. Everything is working well when the content-type header is set to application/json, but when a user tries to upload a profile image with the multipart/form-data content-type header, I get an error saying "Username cannot be blank" and "Email cannot be blank". I’m guessing that the necessary […]