Newest Questions
24,169,331 questions
0
votes
0
answers
6
views
Why does the dash command `test -d` without the file arg pass without error?
#!/bin/sh
# dash script
zero=0
test $zero -eq 0
echo $? # prints 0
zerostr="000"
test $zerostr -eq 0
echo $? # prints 0
test
echo $? # prints 1 (as documented)
test -d
echo $? # prints 0 (...
0
votes
0
answers
9
views
"Uncaught TypeError: Cannot read properties of undefined" when accessing nested object in JavaScript React component
Problem:
I am trying to display a user's address from a nested user object in my React component. When the component first loads, I get an Uncaught TypeError: Cannot read properties of undefined (...
0
votes
0
answers
12
views
Read list of packages in gitlab repository
I am new to generic gitlab repositories and am struggling a bit testing out one I created.
I can push a package with the following:
curl --location --header "DEPLOY-TOKEN: xxxx" --upload-...
0
votes
0
answers
18
views
Equations in EPUB created with Bookdown are not displayed on a Kindle ebook reader
I created an EPUB ebook in R with Bookdown. It contains in-text mathematical formulas such as $\pi$, $\hat\pi$ and $X$ as well as equations such as:
\begin{equation}
\hat\pi = \frac{e^{a + X\cdot b}}{...
0
votes
1
answer
30
views
Can someone help me not make the code terminate whenever i input "right"
i understand this is seemingly simple im a beginner i apologize if ive wasted anyones time but im pretty lost rn heres my code
print ("you awaken in a dark room")
print ("you look to ...
0
votes
0
answers
26
views
std::mersenne_twister_engine and range of values generated
wrt std::mersenne_twister_engine
w-the power of two that determines the range of values generated by the engine
Based on the widely used C++ method for generating random numbers in a range as ...
0
votes
0
answers
17
views
I'm facing a "404 Not Found" issue with my images in a PHPe
I'm facing a "404 Not Found" issue with my images in a PHP project running on Laragon (Apache) and shared via Ngrok.
C:/laragon/www/IAKA_Tickets/
├── app/
│ └── Views/
│ └── checkout....
Advice
0
votes
0
replies
24
views
Differences between SQL dialects?
i'm quite new to the programming world and i'm just wondering about the different kinds of SQL? I have heard of SQLite, MySQL and a couple of others but i don't really understand. Like how do they ...
1
vote
1
answer
23
views
Distributed computing with Ray/Python has no parallelism at all on GCP
I am trying to setup a distributed environment for NLP processing. I use Ray and Python on GCP. I have a master and several workers. What happens is that when I run 1 worker or 8 workers, it takes ...
Best practices
0
votes
1
replies
19
views
Namespace tracking best practices
I'm new. Is it best practice to make a list of the variable's "namespace," and if so, what are some of the methods to track them that others might use? Are there other things that should be ...
1
vote
1
answer
29
views
How to use a regular expression in R as the replacement in gsub
I have file names with text in them that looks like "1999_2000" (year followed by underscore then year). The years change. I want to change the underscore to a hyphen ("-"). I'...
Advice
0
votes
3
replies
29
views
Terminal closing after outputting code result
I'm new to coding, and I'm trying to use VS code to learn Python. I had an issue when I ran the debugger. I got some extra output showing something like this:
PS C:\Users\user\Desktop\Python\oops> ...
Best practices
0
votes
0
replies
18
views
Integrating Testing and QA into AI Workflows
Is anyone aware or can anyone verify whether AI software development pipelines and processes have evolved to the point that they incorporate basic industry testing procedures (unit testing, smoke ...
Best practices
0
votes
1
replies
21
views
How to Use Threading in Python (and How to Go Beyond It)
The Direct Answer to the Original Question
If you simply want to run a function in a separate thread, the minimal working pattern is:
import threading
def worker():
print("Running in a ...
0
votes
0
answers
25
views
Which thing was tapped?
If I use the launch tag in a WFF watch face, it always only launches the main activity of the app, no matter what I specify as the target of the launch tag. That would be OK if I could tell which ...