Cheat Sheet of Thomas Zuberbuehler :)
async function retrieveUser(firstName) {
const response = await fetch(url + "?" + new URLSearchParams({
firstName: firstName,
});
""" | |
Converts PDF pages to images. | |
```python | |
pip install PyMuPDF | |
pip install PySimpleGUI | |
``` | |
:See also: | |
https://pymupdf.readthedocs.io/en/latest/faq.html |
Note: Works with ArcGIS for JavaScript 3.35, should work with 4.x
let layer = new GraphicsLayer();
layer.on("graphic-node-add", (event) => {
const title = document.createElementNS("http://www.w3.org/2000/svg", "title");
const isRestaurant = event.graphic.attributes.isRestaurant;
If you run Jupyter on a remote computer, you could start Jupyter with --ip 0.0.0.0
and access with the remote computer's IP address. However, this leaves your data wide open to anyone in the internet.
Alternatively, you could also use SSH Port Forwarding:
jupyter notebook --no-browser --port=XXXX
ssh -N -f -L localhost:YYYY:localhost:XXXX remoteuser@remotehost
http://localhost:XXXX
Note: Replace USER_NAME
with your username.
In this scenario we assume that we use two different GIT repos:
ssh-keygen -t rsa -C "[email protected]"
C:\Users\USER_NAME\.ssh\id_rsa_github
id_rsa_azure
import os | |
import json | |
import requests | |
import shutil | |
# prerequisites: | |
# pip install instagram-scraper | |
# pip install requests | |
# do only use to download your own images |
Following code snippet fetches the image from an URL and converts the blob to a base64 string before saving the file to the file system. (Saving the file to the file system can be considered being additional boilerplate as a conversion from a blob to a base64 string is not needed to save a file to the file system. See second example.)
The code snippets shows how to:
/**
* Fetches an image from given URL.
There is no Esri Proxy (https://github.com/Esri/resource-proxy) for ASP.NET Core. However, it's very easy to implement a simple ASP.NET HTTP proxy. The solution below is not a full replacement of proxy.ashx
but elaborates an idea how to handle CORS issues and login credential in a webmap application.
Note: If you have authorization and access to configure the webserver and/or configure ArcGIS Online services, there may be other alternatives (https://github.com/Esri/resource-proxy#alternatives). In addition, it may be worth to consider a dedicated proxy server (depending on the traffic).
The NuGet Package AspNetCore.Proxy
(https://github.com/twitchax/AspNetCore.Proxy) must be installed.