on-internet

How can I represent a matrix in Github markdown?

I am trying to represent a basic vector, the following code works in Visual Studio Code. I am using the following line $\begin{bmatrix}X\\Y\end{bmatrix}$ All whitespace removed. It should look like this, However, when pushed to Github it does not render correctly and instead just renders to entire text letter for letter like it is unsupported. Does anybody know how to get get the following vector to display correctly?

Join the discussion →

"at" sign (@) in Pylance/Pyright type hints

The July 2022 release of the Python extension for Visual Studio Code introduced "Inlay Type Hints", which automatically suggests return types of functions that don't have an explicit annotation. To enable it, you can set "python.analysis.inlayHints.functionReturnTypes": true to your IDE user settings (Preferences: Open Settings (JSON) command). While testing this feature, I noticed the following kind of suggestion, inside a class: ... where the highlighted text in yellow is the return type suggested by the Python extension, which is based on Pylance, which itself relies on Pyright. My question

Join the discussion →

"at" sign (@) in Pylance/Pyright inlay hints/error messages

The July 2022 release of the Python extension for Visual Studio Code introduced "Inlay Type Hints", which automatically suggests return types of functions that don't have an explicit annotation. To enable it, you can set "python.analysis.inlayHints.functionReturnTypes": true to your IDE user settings (Preferences: Open Settings (JSON) command). While testing this feature, I noticed the following kind of suggestion, inside a class: ... where the highlighted text in yellow is the return type suggested by the Python extension, which is based on Pylance, which itself relies on Pyright. My question

Join the discussion →

Having error during use ispconfig auto installer in debian 11

[WARN] Query CREATE DATABASE phpmyadmin; failed. (/lib/os/class.ISPConfigDebianOS.inc.php:339)[WARN] Query CREATE USER 'pma'@'localhost' IDENTIFIED BY 'uUFMzprRqDAZm1B'; failed. (/lib/os/class.ISPConfigDebianOS.inc.php:339) [INFO] HTTPoxy config. [INFO] Installing acme.sh (Let's Encrypt). [INFO] acme.sh (Let's Encrypt) installed. [INFO] Installing packages quota, quotatool, haveged, geoip-database, libclass-dbi-mysql-perl, libtimedate-perl, build-essential, autoconf, automake, libtool, flex, bison, debhelper, binutils [INFO] Installed packages quota, quotatool, haveged, geoip-database, libclas

Join the discussion →

Would a gene whose alleles have "circular dominance" be plausible?

Okay, so based on some quick research, there don't appear to be any real-life cases in genetics of "circular dominance" where, for example, allele A is dominant to allele B, B is dominant to C and C is dominant to A, sort of like a genetic game of rock-paper-scissors. However, what I'm wondering is whether there's any reason such a system would be impractical/implausible. Can anyone share any insights on that? As a side note, I'm also curious to whether the prevalence of the different versions of the trait controlled by such a gene could reasonably remain skewed in favor of one form. (Drawing

Join the discussion →

react API calls(leaflet, ip Geolocation)

working on a challenge from frontend mentor.an ip address tracker with Api calls feom react leaflet map and IP geolocation API and i'm having issues using the value of the props for the latitude and longitude. This is my code: function App() { const [address, setAddress] = useState({}) useEffect(()=>{ try { axios.get('https://geo.ipify.org/api/v2/country,city?apiKey=at_FmUFGKJxGxjnnNkYNr9W2TAv3XShk&ipAddress=8.8.8.8') .then((res) => setAddress(res.data)) } catch(err) { console.log('error') }},[]) return ( <div className="App font-Rubik"> <Map position={{...address}} /> </div> ); } // Map compo

Join the discussion →

Tkinter winfo_interps always empty

Why does winfo_interps always return an empty tuple ? The documentation states: Returns a list whose members are the names of all Tcl interpreters (e.g. all Tk-based applications) currently registered for a particular display. If the -displayof option is given then the return value refers to the display of window; otherwise it refers to the display of the application's main window. and the source code is: def winfo_interps(self, displayof=0): """Return the name of all Tcl interpreters for this display.""" args = ('winfo', 'interps') + self._displayof(displayof) return self.tk.splitlist(self.tk

Join the discussion →

Migrating a graphics heavy Java Swing application to the web

I have a large Java Swing application I'd like to migrate to the web. It makes very heavy use of 2D interactive graphics and also uses Java3D. It started life as an Applet in Java 1.0 and grew quite considerably. If only applets were still available they'd be perfect for me. There are so many options I'm not sure which way to turn. But I don't want to end up recoding the whole thing in JavaScript or something. Even the data layer in this is big (dozens of proprietary data types supported) so just rewriting and testing would be a massive project. I there some way that Java EE can run interactiv

Join the discussion →

IntelliJ "extracting project structure from sbt"

I have this problem concerning intelliJ revolving around SBT and Scala. The problem is that intelliJ cannot correctly import the project, and I am left with an intelliJ that recognizes only false syntax errors and which cant compile from the "run" bottom integrated within the IDEA. When I start IntelliJ/Open the project, the SBT goes to work and tries to index the project, after which it fails, returning me multiple errors. Extracting structure failed: Structure file /tmp/sbt-structure.xml is empty The thing is, that the code works, using the terminal it can both compile and run! I feel like I

Join the discussion →

Rust iterate over ChunkExactMut -> use of moved value

I'm trying to generate a simple test image but I get a "use of moved value" error. I think it is because the ChunkExactMut iterator does not implement Copy. But the step_by function should create a new iterator (Rust documentation). fn step_by(self, step: usize) -> StepBy<Self>ⓘ Creates an iterator starting at the same point, but stepping by the given amount at each iteration. What is the Rust way to write it? Or a good way. I thought usage of iterators would be a safer approach than a pointer or vec[index] = value implementation. /// generate bayer image with rg pattern fn generate_test_image

Join the discussion →

Override SonarQube automatic branch detection

SonarQube has the concept of a main branch irrespective of its actual name. According to the documentation, the key is not to pass the sonar.branch.name property to the analysis. So far, so good. However, when my Gradle build in Github does not set the property, then automatic branch detection kicks in and I get: Detected branch/PR in 'GitHub Action' Auto-configuring branch 'develop' Well, that’s unfortunate, because now sonar.branch.name is set to develop, and SonarQube will not accept it as the main branch. This develop is set as the default branch in Github, but the scanner seems not able t

Join the discussion →

Run Macros in Excel file from a SharePoint site

I have migrated some Excel files, which contain Macro, in SharePoint. I am trying to get the macro runs based on the files in Excel but I am getting the following error: "run-time error 76: Path not found". When I have the files local, this code used to run perfectly: Sub Proceso_diarioLB() ' PROCESO DIARIO MACRO Application.Run "'LIBRO MACROS LB.xlsm'!PROFLOSTN" Application.Run "'LIBRO MACROS LB.xlsm'!STOFCONDN" Application.Run "'LIBRO MACROS LB.xlsm'!COPIASTOFCONDN" End Sub Sub PROFLOSTN() ' ' PROFLOSTN Macro ' ' ChDir "S:\local\007repctrlbcocoa\DOWNLOADS\data" Workbooks.OpenText Filename:="

Join the discussion →

Change dot formatted date to Slash format

Hi all I want to change the date format from dot to slash and I have tried all ways of changing the date from control panel and also from the "Format option" in excel but nothing works. Please would anyone can recommend how can I do this bulk change of format of date except doing it manually. Any advices would be much appreciated.

Join the discussion →

Replace a Python exception with another one

I expect a python function I use to raise a KeyError, in case the user of my script entered a wrong value. When this happens, I want to raise a ValueError, not a KeyError. I tried to catch the KeyError, then raise a ValueError instead. I then get both. For example: def func(my_dict): return my_dict["my_key"] a = {} try: func(a) except KeyError as e: raise ValueError("Replaced exception") results in this: $ python3 except.py Traceback (most recent call last): File "except.py", line 7, in <module> func(a) File "except.py", line 2, in func return my_dict["my_key"] KeyError: 'my_key' During handli

Join the discussion →

How can I adjust Hoosier's M query so that it retrieves my SharePoint list data?

I am trying to retrive data from my SharePoint lists: Here is the link to my SharePoint list called 'Customers': https://thebravanesesocietycouk-my.sharepoint.com/personal/jeilani_thebravanesesociety_co_uk/Lists/Customers?env=WebViewList I was looking for a quick way to retrieve data from the SharePoint list which is what lead me to find Hoosier's M query for his SharePoint site: let sitename ="<your site>", // if a subsite use "Site/SubSite" listname = "BigList", baseurl = "https://<your SharePoint URL>/sites/" & sitename & "/_api/web/lists/GetByTitle('" & listname & "')/", itemcount = Json.D

Join the discussion →

PyAutoGUI was unable to import pyscreeze

My code: import pyautogui from time import sleep x, y = pyautogui.locateOnScreen("slorixsh.png", confidence=0.5) Error: Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> x, y = pyautogui.locateOnScreen("slorixsh.png", confidence=0.5) File "C:\Users\mrnug\AppData\Local\Programs\Python\Python310\lib\site-packages\pyautogui\__init__.py", line 231, in _couldNotImportPyScreeze raise PyAutoGUIException( pyautogui.PyAutoGUIException: PyAutoGUI was unable to import pyscreeze. (This is likely because you're running a version of Python that Pillow (which pyscreeze depends on) do

Join the discussion →

vscode interactive window with turtle module

I try to use the interactive window in vscode to run a very basic turtle program. For example draw a single line: import turtle as ttl ttl.shape('turtle') ttl.speed(0) # draw a line ttl.forward(200) ttl.mainloop() print('done') I exit gracefully (get the 'done' at the end). When i try to run a second time in interactive mode i get an error. Terminator Traceback (most recent call last) c:\tests\test_stackoverflow.py in <cell line: 6>() 24 # %% 25 26 # a 2d graphics module 27 import turtle as ttl ----> 30 ttl.shape('turtle') 31 ttl.speed(0) 33 # draw a line File <string>:5, in shape(name) Termin

Join the discussion →

pg_isready not installed on RHEL

We have an application that uses PostgreSQL 11 from Ubuntu, and the installation procedure installs the PG client tools, including pg_isready. I'm working on converting this over to Red Hat Enterprise Linux 8, and am following the instructions here to select the correct PG repo (it's telling me to use https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm). If I just use the command sudo dnf install -y postgresql11 (rather than postgresql11-server), I get all the client tools except pg_isready. I even tried installing the server package, but still

Join the discussion →

Find all substrings which are repeated

I need to find all substring of length greater than 2 which are repeated. I can solve it using brute force .Is there any other optimal solution available? eg . SpringisHereAgainSpringHere Sample output : Spr,Spri,Spring,Here,Her

Join the discussion →

Can I resolve environment variables with pathlib.Path without os.path.expandvars?

Is there a clean way to resolve environment variables or %VARIABLES% in general purely with the Path class without having to use a fallback solution like os.path.expandvars or "my/path/%variable%".format(**os.environ)? The question How to use win environment variable "pathlib" to save files? doesn't provide an answer. It's exactly the opposite. It suggests using os.path.expandvars.

Join the discussion →

Python script to get data as JSON from SEC EDGAR source results in 404

on the following page, there is as Data source a JSON link: https://www.sec.gov/edgar/browse/?CIK=1067983&owner=exclude Data source: CIK0001067983.json -> https://data.sec.gov/submissions/CIK0001067983.json This is my Python code (it works): headers = { "Host": "www.sec.gov", "User-Agent": "jo boulement [email protected]", "Accept-Encoding": "gzip, deflate" } sec_url = "https://data.sec.gov/submissions/CIK0001067983.json" resp = requests.get(sec_url, headers=headers) with open("e:\\sec_api_of_1448574_7.html", "w", encoding="utf-8") as my_file: my_file.write(resp.text) but as result I get a file looks

Join the discussion →

Did not find frame

I get the following error when using InAppWebview and switching between pages, works in one emulator, not in another E/FrameEvents( 5237): updateAcquireFence: Did not find frame.

Join the discussion →

Republish Docker Image with Preserved Digest to Different Registry

I pull images from public registries such as DockerHub, and push them to a singular private registry. This is a simple process for images in the format of image:tag but not so for those of image@digest. I want to re-publish, or push in Docker's terminology, images from a public registry to my private registry whilst maintaining the integrity of the exact immutable image. I want to preserve the digest so there's no abstraction between the digest referenced from my private registry to the image's source in a public registry. I attempted to perform the same docker push command that works for imag

Join the discussion →

"secret not found" reported by ExternalSecret

I have been struggling with this issue for the past 2 days and I'm stuck. I'm using External Secrets Operator to obtain secrets from Vault: https://external-secrets.io/ It seems ExternalSecret is not creating the secret. This is my yaml file: apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: ape-external-secrets namespace: ape-test spec: data: - remoteRef: secretKey: secret-ape-username key: secret-ape property: secret-ape-username - remoteRef: secretKey: secret-ape-password key: secret-ape property: secret-ape-password refreshInterval: 1h secretStoreRef: kind: Secre

Join the discussion →

How to check value against a group of enum values?

How to check a value against a list of enum values, in TypeScript? I.e., in Java: public enum Animal { CAT, DOG, BIRD, SNAKE public static EnumSet<Animal> Mammals = EnumSet.of(CAT, DOG); } Usage: Animal.Mammals.contains(myPet) Is there a way to do something like that without predefining a helper class for each enum (which can feel a little excessive with multiple enum types)? The best solution I have so far is: export enum Animal { CAT, DOG, BIRD, SNAKE } export namespace Animal { export const Mammals = [Animal.CAT, Animal.DOG]; } //Usage: Animal.Mammals.includes(myPet) ...Which is nice becaus

Join the discussion →

Recomendations for places and ways to achieve spanish language immersion in south america

I'm english, 33yo, remote worker with an intermediate level of spanish. I've spent some months living in spain but really struggled to find what I really want - language immersion. I find that spaniards my age often have pretty good english and the places I stay are often pretty international - so lots of english and often minimal spanish from the people around. Sometimes I feel a little frustrated at what seems like my slow language progression and I really feel like if I had something close to full immersion for just a few months I could achieve some good progress. I'm planning to visit and

Join the discussion →
Older stories