macos

Mac Excel 2016 VBA - Workbook.open gives 1004 error

旧巷老猫 提交于 2021-02-10 05:12:48
问题 I'm trying to get a macro that works perfectly in Excel 2011 for Mac to work in Excel 2016 for mac. The goal is to have the user specify a folder with .csv files in it, and then the macro loops through all the .csvs, opening each to copy information out of it into another Workbook. The macro fails when trying to open the first .csv file in the user-chosen folder, with a 1004 error, file cannot be found. (side note: Earlier in the macro, workbooks.open works perfectly with a user selected FILE

Run a python script and a compiled c code without terminal or dock item in Mac OS X

廉价感情. 提交于 2021-02-10 05:11:55
问题 For great help from stackoverflow, the development for the Mac version of my program is done. Now I need to deploy my program, and I was wondering if there is any way to "hide" my running Python code (it also runs .so library and it seems it makes a dock item to appear). The program is supposed to be running in the background and it would be great if I can hide any terminal or dock items. In Windows or linux, it was easy, but I am still not that used to Mac and could not figure out how to do

Why am I allowed to exit main using ret?

白昼怎懂夜的黑 提交于 2021-02-10 05:10:46
问题 I am about to figure out how exactly a programm stack is set up. I have learned that calling the function with call pointer; Is effectively the same as: mov register, pc ;programcounter add register, 1 ; where 1 is one instruction not 1 byte ... push register jump pointer However, this would mean that when the Unix Kernel calls the main function that the stack base should point to reentry in the kernel function which calls main. Therefore jumping "*rbp-1" in the C - Code should reenter the

Why am I allowed to exit main using ret?

独自空忆成欢 提交于 2021-02-10 05:07:11
问题 I am about to figure out how exactly a programm stack is set up. I have learned that calling the function with call pointer; Is effectively the same as: mov register, pc ;programcounter add register, 1 ; where 1 is one instruction not 1 byte ... push register jump pointer However, this would mean that when the Unix Kernel calls the main function that the stack base should point to reentry in the kernel function which calls main. Therefore jumping "*rbp-1" in the C - Code should reenter the

Cython: prange is repeating not parallelizing

…衆ロ難τιáo~ 提交于 2021-02-10 04:13:35
问题 I have the following simple Cython function for a parallel reduction: # cython: boundscheck = False # cython: initializedcheck = False # cython: wraparound = False # cython: cdivision = True # cython: language_level = 3 from cython.parallel import parallel, prange cpdef double simple_reduction(int n, int num_threads): cdef int i cdef int sum = 0 for i in prange(n, nogil=True, num_threads=num_threads): sum += 1 return sum Which horrifyingly returns the following: In [3]: simple_reduction(n=10,

Cython: prange is repeating not parallelizing

守給你的承諾、 提交于 2021-02-10 04:07:36
问题 I have the following simple Cython function for a parallel reduction: # cython: boundscheck = False # cython: initializedcheck = False # cython: wraparound = False # cython: cdivision = True # cython: language_level = 3 from cython.parallel import parallel, prange cpdef double simple_reduction(int n, int num_threads): cdef int i cdef int sum = 0 for i in prange(n, nogil=True, num_threads=num_threads): sum += 1 return sum Which horrifyingly returns the following: In [3]: simple_reduction(n=10,

rvm install 2.1.4 hangs on OSX

一笑奈何 提交于 2021-02-10 04:07:30
问题 when attempting to install a new version of ruby with the command: rvm install 2.1.4 the process hangs in the middle of compiling: ruby-2.1.4 - #downloading ruby-2.1.4, this may take a while depending on your connection... ruby-2.1.4 - #extracting ruby-2.1.4 to /Users/alutz/.rvm/src/ruby-2.1.4.... ruby-2.1.4 - #configuring..................................................... ruby-2.1.4 - #post-configuration. ruby-2.1.4 - #compiling.......\ 回答1: This solved my issue: rvm install 2.1.4 -- -

Cython: prange is repeating not parallelizing

落爺英雄遲暮 提交于 2021-02-10 04:06:23
问题 I have the following simple Cython function for a parallel reduction: # cython: boundscheck = False # cython: initializedcheck = False # cython: wraparound = False # cython: cdivision = True # cython: language_level = 3 from cython.parallel import parallel, prange cpdef double simple_reduction(int n, int num_threads): cdef int i cdef int sum = 0 for i in prange(n, nogil=True, num_threads=num_threads): sum += 1 return sum Which horrifyingly returns the following: In [3]: simple_reduction(n=10,

rvm install 2.1.4 hangs on OSX

て烟熏妆下的殇ゞ 提交于 2021-02-10 04:01:22
问题 when attempting to install a new version of ruby with the command: rvm install 2.1.4 the process hangs in the middle of compiling: ruby-2.1.4 - #downloading ruby-2.1.4, this may take a while depending on your connection... ruby-2.1.4 - #extracting ruby-2.1.4 to /Users/alutz/.rvm/src/ruby-2.1.4.... ruby-2.1.4 - #configuring..................................................... ruby-2.1.4 - #post-configuration. ruby-2.1.4 - #compiling.......\ 回答1: This solved my issue: rvm install 2.1.4 -- -

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

故事扮演 提交于 2021-02-10 03:57:05
问题 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