1,199 questions
1
vote
2
answers
161
views
2D matrix convolution with convolve() in R
I am trying to perform 2D matrix processing (convolution) by applying a kernel/filter to a large matrix. There is a built-in function convolve that can perform convolution. It offers three different ...
0
votes
0
answers
102
views
Cannot execute commands in Android -- Runtime.getRuntime().exec()
I am using Android Jetpack Compose to build a little app, and don't seem to be able to run terminal commands.
I have tried the following:
val cmdExample1 = arrayOf("sudo", "apt", &...
1
vote
1
answer
79
views
Why is it necessary to set the prototype of an extended object of a built in class in javascript/typescript to its own prototype? [duplicate]
I'm taking an online course in which the instructor writes out this code:
import { ValidationError } from 'express-validator';
export class RequestValidationError extends Error {
constructor(...
0
votes
1
answer
150
views
how to export an app screenshot to a powerpoint slide through powerapps?
I am trying to develop or apply a built-in function for the OnSelect property of a button to let the user press on it and automatically export a screenshot of the powerapps canvas app to a powerpoint ...
-1
votes
1
answer
73
views
__builtin_neon_vqtbl4q_v: what is difference between first arg (__a) and sixth arg (__c)
ChatGPT and Gemini can not give me a proper working example of this Clang builtin - does anyone have experience working with this builtin?
If an LLM can't give an answer (and it has sucked up all the ...
0
votes
1
answer
62
views
Does the `hash` builtin command in Bash has an `-l` option? [closed]
I am teaching myself the shell and enjoying it a lot. I came across the hash builtin the other day in a course and did some study on it. This led me to the bash manual, and namely this section on the ...
1
vote
1
answer
106
views
Why does __builtin_clzll(variable) return a random number when the variable is 0, but returns 64 when the value is 0 directly?
I’m trying to understand how the __builtin_clzll function works, but I’m encountering unexpected behavior when using a variable instead of a direct 0. Here is a minimal example:
#include <iostream&...
0
votes
0
answers
107
views
Is it possible to redefine or create a new dunder method to built in objects like int? [duplicate]
I’m trying to define a new type of division such that 1/0 doesn’t raise a ZeroDivisionError, instead, it returns a new object called infty(0), which is defined as follow:
class infty:
def ...
0
votes
2
answers
65
views
Is it possible to run 2 Python unitttests that have different patches in a single file?
Let's say you want to test a function that requires input and another that prints output. This requires two different patches. I created two distinct classes, but only 1 of them runs. The sample ...
1
vote
0
answers
34
views
Are built-in static methods bound? [duplicate]
According to the specification, are built-in Javascript static methods, like Array.from, Object.assign, console.log, etc meant to be bound or do they need to be invoked via the constructor/object?
...
4
votes
1
answer
77
views
In ruby, custom method does not work on File builtin class
I want to create a custom method on Object class and Array class.
It works perfectly with array of Integer, Strings, etc. but not for File.
Weird!
class Object
def foo
puts("Object#...
0
votes
1
answer
95
views
How do I implement putchar in C to support RTS?
I'm implementing a minimal Ada RTS for the esp32s3 SoC. Currently, I am stuck with an error that's proving resistant to every solution I've thrown at it. It claims putchar is undefined:
Link
[link] ...
0
votes
1
answer
97
views
AssemblyScript library files in tsconfig.json
Using AssemblyScript to compile and run untrusted code server-side, I've added some additional library extending the standard library provided by AssemblyScript. These host function bindings are ...
0
votes
1
answer
78
views
How and why does Python's built-in round() function work flawlessly with pandas?
I have difficulty in understanding the following behavior of Python's built-in round function:
round doesn't work with lists:
round([1.345, 2.718], 2) # Raises TypeError
round doesn't work with numpy ...
1
vote
0
answers
120
views
Eclipse PHP built in server wrong path and cant find resources
CURRENT SETUP
Software
Windows 10
XAMPP (Apache, PHPMyadmin, Fillezilla, openssl etc.)
Eclipse Version: 2024-03 (4.31.0)
PHP Version 8.2.12
XDEBUG 3.3.2
project path: G:xampp\\htdocs\\api\\project
...