大约有 47,000 项符合查询结果(耗时:0.0489秒) [XML]
What's the difference between eval, exec, and compile?
I've been looking at dynamic evaluation of Python code, and come across the eval() and compile() functions, and the exec statement.
...
Sorting Python list based on the length of the string
I want to sort a list of strings based on the string length. I tried to use sort as follows, but it doesn't seem to give me correct result.
...
Conveniently Declaring Compile-Time Strings in C++
Being able to create and manipulate strings during compile-time in C++ has several useful applications. Although it is possible to create compile-time strings in C++, the process is very cumbersome, as the string needs to be declared as a variadic sequence of characters, e.g.
...
Recommendation for compressing JPG files with ImageMagick
I want to compress a JPG image file with ImageMagick but can't get much difference in size. By default the output size is bigger than the input. I don't know why, but after adding some +profile options and setting down the quality I can get an smaller size but still similar to original.
...
What is the Python 3 equivalent of “python -m SimpleHTTPServer”
What is the Python 3 equivalent of python -m SimpleHTTPServer ?
5 Answers
5
...
How to print a list of symbols exported from a dynamic library
So I've been trying to get dynamic libraries to work in my XCode project under Mac OS X. So far no joy.
4 Answers
...
How to capitalize the first character of each word in a string
Is there a function built into Java that capitalizes the first character of each word in a String, and does not affect the others?
...
Plotting time in Python with Matplotlib
I have an array of timestamps in the format (HH:MM:SS.mmmmmm) and another array of floating point numbers, each corresponding to a value in the timestamp array.
...
Converting an integer to a string in PHP
Is there a way to convert an integer to a string in PHP?
14 Answers
14
...
Why does Go have a “goto” statement
I was surprised to find that Go has a 'goto' statement. I've always been taught that 'goto' statements are a thing of the past and evil for it occludes the actual flow of a program, and that functions or methods are always a better way of controlling flow.
...
