built-in Questions
11
Solved
I am coding a React page with VS Code.
Suddenly, some snippets like rfce started not working even if it's never given me problems. I don't know what's wrong.
picture of before
picture of now
What...
Nun asked 9/2, 2021 at 11:23
3
Is there a way in js to list all the builtin functions and some info on their parameterlists? I couldn't really find anything about reflection to do this sort of thing
edit:
The functions such as ...
Barton asked 1/1, 2012 at 15:54
6
Solved
Here is my Key function:
def Key(message, decision):
key = input("Input the key which will be used to encode the message.\n".lower)
n = 0
for i in range(len(key)):
if 64 < ord(key[...
3
Solved
The format function in builtins seems to be like a subset of the str.format method used specifically for the case of a formatting a single object.
eg.
>>> format(13, 'x')
'd'
is appar...
Stricklin asked 22/5, 2013 at 4:33
10
Solved
If I have this:
def array = [1,2,3,4,5,6]
Is there some built-in which allows me to do this ( or something similar ):
array.split(2)
and get:
[[1,2],[3,4],[5,6]]
?
5
Solved
I am trying to debug the behaviour of a large library I depend on, which uses a scattering (no make that plethora) of debug print statements through its many source files. Trouble is, most if not a...
Phelips asked 3/2, 2011 at 8:22
4
Solved
I came across a built-in function compile today. Though i read the documentation but still do not understand it's usage or where it is applicable. Please can anyone explain with example the use of ...
2
Solved
In GCC atomic built-in I found that __atomic_exchange function does have a third parameter int memorder, which could take one of the values __ATOMIC_RELAXED, __ATOMIC_SEQ_CST, __ATOMIC_ACQUIRE, __A...
Biller asked 3/9, 2015 at 13:36
2
Solved
Going through the gcc documentation, I stumbled into the builtin function __builtin___clear_cache.
— Built-in Function: void __builtin___clear_cache (char *begin, char
*end) This function is us...
15
Solved
I read an article about the getattr function, but I still can't understand what it's for.
The only thing I understand about getattr() is that getattr(li, "pop") is the same as calling li....
Cyprio asked 2/11, 2010 at 5:45
6
Solved
At work today we were trying to come up with any reason you would use strspn.
I searched google code to see if it's ever been implemented in a useful way and came up blank. I just can't imagine a ...
8
Solved
elif(listb[0] == "-test"):
run_all.set("testview")
listb.pop[0]
ERROR: Exception in Tkinter callback Traceback (most recent call
last): File
"/tools/python/2.7.2/lib/py...
3
I have found out about __builtin_ctzll to count trailing zeros of a 64bit int really fast through the post Intrinsic to count trailing zero bits in 64-bit integers?.
I'm a beginner to C++ and don't...
6
Solved
I understand that all of the math functions in java are built in. But I was wondering out of curiosity how Math.min() actually works?
I checked the java documentation and couldn't find anything to...
3
Solved
Recently, I discovered void __builtin_assume(bool) for clang, which can provide additional information about the state of the program to the compiler. This can make a huge difference, like for exam...
Alialia asked 19/8, 2020 at 19:46
7
Solved
There are two R directories on my computer:
one is /home/R-2.15.2,the other is /home/R-2.15.1,
when I input R , I can start R, now I want to know which R is running: 2.15.1 or 2.15.2?
3
Solved
I am currently learning about the built-in functions in Julia, specifically max and maximum, and I am seeking clarification on their differences.
julia> max(1, 2, 3, 4)
4
julia> maximum([1, 2...
5
Solved
I am new to python programming. How can I add new built-in functions and keywords to python interpreter using C or C++?
Hectorhecuba asked 6/8, 2011 at 5:55
5
Solved
I try to extend JavaScript Math. But one thing surprised me.
When I tried to extend it by prototype
Math.prototype.randomBetween = function (a, b) {
return Math.floor(Math.random() * (b - a + 1)...
Bathsheba asked 20/12, 2014 at 13:56
9
Solved
I wrote this simple function:
def padded_hex(i, l):
given_int = i
given_len = l
hex_result = hex(given_int)[2:] # remove '0x' from beginning of str
num_hex_chars = len(hex_result)
extra_zero...
4
Solved
Is there a good way to merge two objects in Python? Like a built-in method or fundamental library call?
Right now I have this, but it seems like something that shouldn't have to be done manually:
...
Sochi asked 12/2, 2013 at 18:43
3
Solved
I was wondering on how to use this function, because I get an error when I do this:
#define INT_ADD_OVERFLOW_P(a, b) \
__builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0);
#include <std...
Pettus asked 28/7, 2016 at 1:46
6
Solved
Which one is more efficient using math.pow or the ** operator? When should I use one over the other?
So far I know that x**y can return an int or a float if you use a decimal
the function pow will ...
4
Solved
When looping recursively through folders with files containing spaces the shell script I use is of this form, copied from the internet:
while IFS= read -r -d $'\0' file; do
dosomethingwith "...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.