macos

Why does strptime() behave differently on OSX and on Linux?

空扰寡人 提交于 2021-02-10 03:54:45
问题 Consider this program: #include <stdio.h> #include <time.h> int main() { struct tm t; strptime("2015-08-13 12:00:00", "%F %T", &t); printf("t.tm_wday = %d\n", t.tm_wday); return 0; } Under OSX, this is what I obtain: $ gcc test_strptime.c $ ./a.out t.tm_wday = 0 But on Linux, this is what I get: $ gcc test_strptime.c $ ./a.out t.tm_wday = 4 Why is the bahaviour different? I would expect the day of the week to be well defined, given the data and the time of the day? 回答1: The Linux (glibc) and

Error: “unsupported locale setting” on Python / OSX

折月煮酒 提交于 2021-02-09 20:44:24
问题 I've got the following error trying to run a local Python scriot on OSX Lion 10.7: You are using the base settings file. You are advised to create a local.py file (based on local_sample.py) with your personal settings. Traceback (most recent call last): File "manage.py", line 39, in <module> detect_port(sys.argv) File "manage.py", line 22, in detect_port default_port = getattr(settings, 'RUNSERVER_PORT', None) File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 53, in _

Error: “unsupported locale setting” on Python / OSX

我与影子孤独终老i 提交于 2021-02-09 20:44:20
问题 I've got the following error trying to run a local Python scriot on OSX Lion 10.7: You are using the base settings file. You are advised to create a local.py file (based on local_sample.py) with your personal settings. Traceback (most recent call last): File "manage.py", line 39, in <module> detect_port(sys.argv) File "manage.py", line 22, in detect_port default_port = getattr(settings, 'RUNSERVER_PORT', None) File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 53, in _

Error: “unsupported locale setting” on Python / OSX

断了今生、忘了曾经 提交于 2021-02-09 20:43:54
问题 I've got the following error trying to run a local Python scriot on OSX Lion 10.7: You are using the base settings file. You are advised to create a local.py file (based on local_sample.py) with your personal settings. Traceback (most recent call last): File "manage.py", line 39, in <module> detect_port(sys.argv) File "manage.py", line 22, in detect_port default_port = getattr(settings, 'RUNSERVER_PORT', None) File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 53, in _

Error: “unsupported locale setting” on Python / OSX

岁酱吖の 提交于 2021-02-09 20:43:38
问题 I've got the following error trying to run a local Python scriot on OSX Lion 10.7: You are using the base settings file. You are advised to create a local.py file (based on local_sample.py) with your personal settings. Traceback (most recent call last): File "manage.py", line 39, in <module> detect_port(sys.argv) File "manage.py", line 22, in detect_port default_port = getattr(settings, 'RUNSERVER_PORT', None) File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 53, in _

How to change the Docker image installation directory on Mac?

守給你的承諾、 提交于 2021-02-09 10:57:34
问题 Docker images are stored in $HOME/Library/Containers/com.docker.docker/Data but how to move those large files to an external drive for example? I have tried symbolic link, it didn't work. Also I couldn't find the -g option for docker as mentioned here. Any suggestions? 回答1: All you have to do is go to preferences Then Disk and click at "move disk image" Select the folder you want to move to, awaits it completes and you are done. 来源: https://stackoverflow.com/questions/40467032/how-to-change

How to change the Docker image installation directory on Mac?

为君一笑 提交于 2021-02-09 10:57:00
问题 Docker images are stored in $HOME/Library/Containers/com.docker.docker/Data but how to move those large files to an external drive for example? I have tried symbolic link, it didn't work. Also I couldn't find the -g option for docker as mentioned here. Any suggestions? 回答1: All you have to do is go to preferences Then Disk and click at "move disk image" Select the folder you want to move to, awaits it completes and you are done. 来源: https://stackoverflow.com/questions/40467032/how-to-change

Import IORegistryEntrySearchCFProperty from Macapi.IOKit in Delphi for OSX64

拥有回忆 提交于 2021-02-09 10:42:31
问题 I used this import definition in OSX32 successfully: uses MacApi.ObjectiveC, MacApi.Foundation, Macapi.CoreFoundation, Macapi.Mach, Macapi.IOKit; type io_iterator_t = io_object_t; io_name_t = array[0..127] of AnsiChar; function IORegistryEntrySearchCFProperty(entry: io_registry_entry_t; plane: io_name_t; key: CFStringRef; allocator: CFAllocatorRef; options: IOOptionBits): CFTypeRef; cdecl; external libIOKit name _PU + 'IORegistryEntrySearchCFProperty'; function IOServiceGetMatchingServices

What is “-lc++”?

不羁的心 提交于 2021-02-09 09:50:07
问题 Anybody has any idea about what is this and how can I solve this build error ?? ld: library not found for -lc++ clang: error: linker command failed with exit code 1 (use -v to see invocation) thanks in advance. 回答1: Install libc++ You can download from: http://libcxx.llvm.org/ 来源: https://stackoverflow.com/questions/17302349/what-is-lc

Java installation on MacOS: Apt commando doesn't work

♀尐吖头ヾ 提交于 2021-02-09 08:48:29
问题 I have installed the latest version of JAVA (jdk-15.0.1_osx-x64_bin.dmg) on a MacBook (Catalina: 10.15.7). When I try to use JAVA to install PUPPET MASTER with this command: $ sudo apt Puppet Master install I get this message back: Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/bin/apt" (-1) Can anybody explain to me what that means and how I can go about installing Puppet Master in my machine? Thank you so much Mike 回答1: I am not very