Questions tagged [built-in]

Built-in functions, modules and classes are standard parts of a programming language or framework.

Built-in functions, modules and classes are standard parts of a programming language or framework.

Generally, all parts of a programming language or framework that don't require the installation of additional components are considered built-in.

1177 questions
22
votes
4 answers

Haskell replace element in list

Is there any built-in function to replace an element at a given index in haskell? Example: replaceAtIndex(2,"foo",["bar","bar","bar"]) Should give: ["bar", "bar", "foo"] I know i could make my own function, but it just seems it should be built-in.
Stefan Bucur
  • 221
  • 1
  • 2
  • 3
21
votes
3 answers

No man page for the cd command

Ubuntu Linux 15.10 - I just noticed that there is no man page for cd This seems a bit strange. I tried: man cd at the cmd line and I get back No manual entry for cd I was trying to find documentation on cd - which is super-handy for flipping…
bph
  • 10,728
  • 15
  • 60
  • 135
21
votes
3 answers

What is "_csv" in Python?

In attempting to read the source code for the csv.py file (as a guide to implementing my own writer class in another context) I found that much of the functionality in that file is, in turn, imported from something called _csv: from _csv import…
Larry Lustig
  • 49,320
  • 14
  • 110
  • 160
20
votes
4 answers

How does --$| work in Perl?

Recently I came across this way to filter out every second value of a list: perl -E 'say grep --$|, 1..10' 13579 How does it work?
Eugene Yarmash
  • 142,882
  • 41
  • 325
  • 378
20
votes
2 answers

How to refer to current file from Integrated Terminal in Visual Studio Code

I want to know if it is possible (with a built in variable) to work directly with current file opened in Visual Studio from intergrated terminal, for example: >some_command $current_file (Where $current_file would be a built-in variable that…
Ger Cas
  • 2,188
  • 2
  • 18
  • 45
20
votes
2 answers

How do I prevent bash to use a builtin command?

I'm trying to fix a script that use echo, that is using the builtin command instead of the command, how can I prevent that? I know I can do /bin/echo to force the usage of that, but I wouldn't like to hardcode the path (for portability). I thought…
eloyesp
  • 3,135
  • 1
  • 32
  • 47
20
votes
6 answers

What is the perl equivalent of MAX_INT?

I am new to perl and seeking the lowest value in an @array. Is there some constant that represents a very large integer number? I know I could sort the array and take the beginning, but that seems to be a lot of wasted CPU cycles. What is an elegant…
Zak
  • 12,213
  • 21
  • 59
  • 105
19
votes
1 answer

Where is append() implementation?

I cannot find implementation code of append() or any other builtin functions anywhere? I tried finding the code through godoc and using jump-to-definition feature of IDE's. May be i am looking at wrong places. Could anyone show me the way to see…
Mayank Patel
  • 8,088
  • 5
  • 55
  • 75
19
votes
3 answers

"Assume" clause in gcc

Does gcc (latest versions: 4.8, 4.9) have an "assume" clause similar to __assume() built-in supported by icc? E.g., __assume( n % 8 == 0 );
user2052436
  • 4,321
  • 1
  • 25
  • 46
19
votes
1 answer

How can I see the source of built-in JavaScript functions?

E.g., alert(), Object(), String(), etc. How would I see the code behind these functions? Would I need to understand the language that an engine, such as V8, is written in and read through that, or is there a simpler solution?
jFasaJr
  • 497
  • 4
  • 17
19
votes
3 answers

Decimal to hex conversion c++ built-in function

Is there a built-in function in c++ that would take a decimal input from a user and convert it to hex and vice versa?? I have tried it using a function I've written but I was wondering if there is a built-in one to minimize the code a little bit.…
user3002197
  • 191
  • 1
  • 1
  • 4
18
votes
7 answers

Naming conflict with built-in function

I have made a mistake as below: >>> list = ['a', 'b', 'c'] But now I want to use the built-in function list(). As you can see, there is a naming conflict between listname list and the built-in function list(). How can I use list as a built-in…
holys
  • 13,869
  • 15
  • 45
  • 50
18
votes
2 answers

How to override built-in PHP function(s)?

I would like to override, let's say mysql_num_rows with let's say following: $dataset = array(array('id' => 1, 'name' => 'Zlatan', 'onSOF' => 1), array('id' => 1, 'name' => 'Guest', 'onSOF' => 0)); function mysql_num_rows($dataset) { return…
user1386320
16
votes
1 answer

Does anyone know the word that built-in function ord() abbreviate for?

python has a built-in function ord(), I think it must be a anbbreviation. Just like another built-in function chr(), which is an abbreviation of the word "character". Does anyone know the word that built-in function ord() abbreviate for?
arnkore
  • 425
  • 5
  • 14
16
votes
10 answers

Built-in snippet not working in VS Code for React

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 I did recently was just updated react-router-dom to…
SteakOverflow
  • 193
  • 1
  • 2
  • 9