Questions tagged [standard-library]

The standard library contains core utilities provided by all implementations of the language.

The standard library contains core utilities provided by all implementations of the language.

The size and scope of the standard library varies between languages, some provide only a few basic components for such things as string handling and I/O, whereas others provide higher-level tools for a wide variety of tasks such as XML processing, networking and database access.

For questions about specific languages' standard libraries use this tag in conjunction with the tag for the language, or use the indicated tags for these languages:

677 questions
-1
votes
1 answer

String to Double and leading whitespace

I found odd behavior in the Swift standard library struct Double(). This function converts a string representing a number into a double precision number. All well and good. I recently discovered odd behavior wrt to leading whitespace, namely the…
BlueskyMed
  • 765
  • 7
  • 24
-1
votes
3 answers

JSON package not available in anaconda

I installed python with anaconda with my computer and I need to import the JSON library. I learned that JSON is part of the standard library of PYthon, so I am surprised that actually it is not the case with…
JFerro
  • 3,203
  • 7
  • 35
  • 88
-1
votes
1 answer

Where can I find the tests made to verify the functions in the python standard library?

I am currently in a group project in school. We are using the python standard-library, and we are wondering if it has been tested by the python team. In other words, is there any documentation or open source unit tests for the entire python…
August Jelemson
  • 962
  • 1
  • 10
  • 29
-1
votes
2 answers

pythonic way of sorting a log lexicographically

I'm a newbie to python. I'm trying to solve a problem.Lets assume I'm getting a log file with identifier followed by space separated words. I need to sort the log based on words (identifiers can be omitted). However if the words match I need to sort…
Ani
  • 149
  • 1
  • 1
  • 8
-1
votes
2 answers

Is there a method to perform a derivative by inbuilt function in python 3.5?

I don't want to use numpy because it isn't permitted in competitive programming.I want to take derivative of for instance m=a(a**2-24a). Now,a=0 and a=8 are critical points. I want to find this value.Is it possible by using any python library…
mozilla-firefox
  • 864
  • 1
  • 15
  • 23
-1
votes
1 answer

windows.Environ() strings [0] and [1]

I'm confused by the first 2 strings returned by "windows.Environ()" on a Windows pro 7 system (go version go1.8 windows/amd64). env[0] apparently has a key of "=::"; env[1] has a key "=C:". Can anyone point me to where this is documented? Thx in…
mnemotronic
  • 856
  • 1
  • 9
  • 16
-1
votes
2 answers

C standard library function 'strncpy' not working

C code: #include #include #define STRINGS 10 #define STR_LEN 20 int main(void) { char words[STRINGS][STR_LEN]; char input[STR_LEN]; int i; int mycount; for(i = 0;i < STRINGS;++i;) { …
TechDinoKing
  • 51
  • 1
  • 8
-1
votes
1 answer

Correct way to regex match parenthesis in puppet file_line after clause

Using puppet to modify a listener.ora file: file_line { 'addFloatingListenerTCPS': ensure => present, path => "${LSNR_PATH}/listener.ora", line => " (ADDRESS = (PROTOCOL = TCPS)(HOST = ${FLOATING_IP})(PORT = 1522))", after =>…
Derek_6424246
  • 237
  • 3
  • 12
-1
votes
4 answers

Is `Console.In` an instance of `StreamReader`?

In .NET Framework Class Library, a book says that Console.In is an instance of TextReader. TextReader is an abstract class, so how can it have an instance Console.In? StreamReader is a derived class of TextReader, and is a non-abstract class. Is…
Tim
  • 1
  • 141
  • 372
  • 590
-1
votes
1 answer

Is Java Cryptography standard libraries in Android run as native code

I am integrating standard java cryptography classes in my Android application, but I noticed that the AES algorithm is not that fast, it cannot encrypt more than about 5 Kb per second, so do someone know if I can get more performance if I implement…
ammcom
  • 992
  • 1
  • 7
  • 24
-1
votes
2 answers

No library C implementation

I've heard while looking at different C implementations that any system that hopes to implement C must minimally include certain libraries, stdarg.h etc. My question is why this is, it can't be that the C library is not Turing complete without some…
ocket8888
  • 1,060
  • 12
  • 31
-1
votes
2 answers

In the context of C++, what is an "implementation"?

I am reading Accelerated C++ and there are lines written there about standard header It is worth noting that although we refer to our own headers as header files, we refer to the implementation-supplied headers as standard headers rather than…
OldSchool
  • 2,123
  • 4
  • 23
  • 45
-1
votes
3 answers

Why isn't the C standard library built into the language?

I am currently learning C. I understand that many common functions, like printf and scanf are not actually part of the C language -- they are part of the "standard library" of functions. My question is, why aren't such functions built into the…
intelli78
  • 137
  • 1
  • 8
-1
votes
2 answers

How does std::find auto-magically knows the end of an array in C++?

Why there is an atomic variable in the code below? - because it is part of a larger code base where the m_subscriptions array is being updated from multiple threads. Please bear with me on that one .. Here is my question: #include…
Chani
  • 5,055
  • 15
  • 57
  • 92
-1
votes
1 answer

C building (from C#'s perspective)

When I build C# applications I only reference external libraries, be they standard libraries as part of the framework or any other, but in C one includes them (copy and paste). Isn't it very inefficient and redundant to include the standard…
HelloWorld
  • 2,375
  • 5
  • 22
  • 21