Showing posts with label parameters. Show all posts
Showing posts with label parameters. Show all posts

Friday, January 7, 2022

DOS batch file: Expand * into list of filenames in command line

expand-wildcard.bat

@echo off

setlocal EnableDelayedExpansion


set params=command

for %%a in ("%~1") do (

    set params=!params! %%a

)


echo %params%

%params%

 

Then, running the following command:

C:\>expand-wildcard filename*


Will be executed as following:

C:\>command filename1 filename2 filename3 filename4 ..

Thursday, March 8, 2018

Map server URL with query parameters in ArcGIS JS 4.6

Starting from ArcGIS JS 4.6, the map server URL should not have any query parameters. Any query parameters exists in the map server URL will be removed.

To handle this issues, you can override the urlUtils.removeQueryParameters() as below


require(["esri/core/urlUtils"], function(urlUtils) {

   urlUtils.removeQueryParameters = function(a){
      return a;
   };

});

But somehow that's a bad trick. A better way is to use the TileLayer._set() to get rid of the parameters stripping action when setting the URL. i.e.

TileLayer._set('url', 'map_server_url')


Upgrade nodejs in conda (from v18 to v26)

If your conda env is nodejs v18, doing a conda install nodejs=26 is likely to create a lot of conflict. Consider remove those conflicting p...