Categories
Ask Geographic Information System (GIS)

Problem when running the Clip Raster by Mask Layer – Layers were not correctly generated

I need help, this is for my Final Year Project and it stress me out. Please help me. Yesterday before I did something on my QGIS, I can run the mask layer but suddenly after I followed a tutorial on youtube on how to do 3D Map, I cannot run the mask layer again. I’ve […]

Categories
Mastering Development

Error: multi (webpack)-dev-server/client?http://0.0.0.0:0&sockPath=/sockjs-node ./node_modules/@angular/material/prebuilt-themes/indigo-pink.css

I am not able to resolve this Error. Tried listing the inner version used by angular-cli like this : npm ls @ngtools/webpack and manualy installing @ngTools/webpack with the same version of angular-cli : npm install @ngtools/webpack@11.0.5 –save-dev but the error persists. What am I doing wrong? Code below: app.module.ts import { BrowserModule } from ‘@angular/platform-browser’; […]

Categories
Mastering Development

Can’t track HTTP response code in middleware

I’ve been struggling for almost one day with a simple middleware to keep track of the HTTP response code of an HTTP server. I’m using the go-openapi to generate from a swagger config an http server and handle all handlers. The schema of my middleware would be request -> override func -> do http stuff […]

Categories
Mastering Development System & Network

NGINX configuration for serving Laravel API at root as well as at subdirectory

Below is my NGINX configuration for serving Laravel API at endpoint http://api.example.com server { listen 80; server_name api.example.com; index index.php index.html; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log; root /var/www/public; location ~ \.php$ { try_files $uri =404; add_header ‘Access-Control-Allow-Origin’ ‘*’; add_header ‘Access-Control-Allow-Methods’ ‘GET, POST, OPTIONS, DELETE, PUT’; add_header ‘Access-Control-Allow-Headers’ ‘DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization’; add_header ‘Access-Control-Expose-Headers’ ‘DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range’; if ($request_method = ‘OPTIONS’) { […]

Categories
Ask Geographic Information System (GIS)

Accessing processing algorithm results from Whitebox Tools in PyQGIS

When I run a GDAL processing algorithm from the Python Console in QGIS that loads a result raster: resultClip = processing.runAndLoadResults("gdal:cliprasterbymasklayer", { ‘ALPHA_BAND’ : False, ‘CROP_TO_CUTLINE’ : True, ‘DATA_TYPE’ : 0, ‘EXTRA’ : ”, ‘INPUT’ : ‘E:/geodata/nsw100k.vrt’, ‘KEEP_RESOLUTION’ : False, ‘MASK’ : ‘C:/Users/brennant/Downloads/data.geojson’, ‘MULTITHREADING’ : False, ‘NODATA’ : None, ‘OPTIONS’ : ”, ‘OUTPUT’ : ‘TEMPORARY_OUTPUT’, […]

Categories
Mastering Development

express js server dosn’t allow post from deployed app

I have problem with the server when deploy my app with gh-pages. When i try to POST on /contact url it respond 405 Method Not Allowed. I tried with cors on express but it’s same. My client side is with React. When I run it on localhost everything work normal but in production like server […]

Categories
Mastering Development

python json capture entire node from found element

I am loading json and trying to extract a portion. I can load the json fine and query it. Im stuck on retrieving the json node its found in. So i have a json strcuture like the below. How would I look for an element and capture its entire node. i.e. name="7004389c-c47a-4611-9bd7-9f5dfe051d17" and then return […]

Categories
Mastering Development

CORS error in Spring Boot. CORS configuration works unstable

The problem is that when we try to make a GET request, sometimes (not always) we get the following error Access to XMLHttpRequest at ‘http://localhost:8080/v1/projects/f5ddcfa7033d463c8836f5f776b397f5/solutions’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Back-end is implemented in Spring boot , I have tried all the […]

Categories
Mastering Development

XmlHttpRequest GET data is empty

I try to avoid jQuery and the perfect $.ajax function, but I’m encountering some problems: my PHP API doesn’t receive params. // Appel de l’API // Identification var authentification_email = document.getElementById(‘authentification_email’).value; var authentification_password = document.getElementById(‘authentification_password’).value; var params = ‘?email=’ + authentification_email + ‘&password=’ + authentification_password; let xhr = new XMLHttpRequest(); xhr.open(‘GET’, urlApi, true); xhr.responseType = […]

Categories
Mastering Development

spring boot returns 200 with “OK” ErrorAttributes attached to normal body response

Spring boot starter version: 2.3.4.RELEASE SPRINGWEB version 5.2.8.RELEASE My get requests started to respond with extraneous "OK" ErrorAttributes appended to the response body, which breaks all json deserialization on the upstream clients HTTP/1.1 200 Date: Tue, 26 Jan 2021 07:44:00 GMT Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive X-Trace-Id: 55418518fcaa412b X-Span-Id: 55418518fcaa412b Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: HEAD, […]