macos

when opening multiple files in vscode, only the first is actually loaded in memory

时间秒杀一切 提交于 2021-02-11 14:58:18
问题 For my job i'm frequently opening lists of files from the terminal. When i do this with vscode, they are opened and all the tabs are there. But only the files i have clicked though and looked at are loaded into memory. If i were to do a find and replace it would only bring up results from the files i have looked at. It also doesnt tell me how many files are open exactly which would be nice. These all seem like things other editors do by default. I was wondering what i have to do to enable

PHP-Intl on XAMPP 7.4.11 / Mac Catalina 10.15.7

≯℡__Kan透↙ 提交于 2021-02-11 14:58:18
问题 I've recently updated to XAMPP 7.4.11, running on Mac Catalina 10.15.7. PHP-Intl does not come installed with XAMPP. Previously, I've been able to download the corresponding PHP version and intialize the Intl code – not this time. When I attempt to 'make' intl, I receive the following error: /bin/sh /Users/SLaptop/Downloads/php-7.4.11/ext/intl/libtool --mode=compile cc -I@@BITROCK_COMMON_ROOTDIR@@/include -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DU_HIDE_OBSOLETE_UTF_OLD_H=1 -Wno-write-strings -D

.NET Core Web API Application cannot connect to SQL server running on Docker

别来无恙 提交于 2021-02-11 14:49:16
问题 Using MAC. Error (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server). Connection string "Data Source=localhost,1433;Initial Catalog=MyDatabase;Integrated Security=True;User id=sa;Password=MyPassword;MultipleActiveResultSets=true" Using .NET Core 3.1. The Web API is running in a container The database is running on docker container. ports mapped 1433:1433 Able to query the database from Azure Data Studio. But while trying to connect from .net.core application it

How to set DATABASE_URL environment variable for Postgres Mac terminal?

旧时模样 提交于 2021-02-11 14:45:19
问题 I am using postgres on Mac. I have a database up and running. I want to use it with Flask (SQL Alchemy) but the DATABASE_URL environment variable didn't create itself (I think it's supposed to do that). Here is the code I tried running: import os print(os.getenv("DATABASE_URL")) And there's no output. How can I set the variable (if I need to set it up manually). 回答1: Yes, you have to do that manually. So, within your terminal do this: % cd % nano .bash_profile It will open a file 'bash

What alternatives are there for “ readlink -e”

那年仲夏 提交于 2021-02-11 14:44:14
问题 I use a makefile which in order to create a library uses a .pc file which looks like this current_path=`readlink -e .` cat > lib/libmy.pc << EOM prefix=$current_path includedir=\${prefix}/inc libdir=\${prefix}/lib Name: my Description: My library Version: 1.0 Cflags: -I\${includedir} Libs: -L\${libdir} -lmy Libs.private: -lm EOM The problem is that on mac the -e flag doesn't work (even I installed coreutils). I there a method to replace the flag? 回答1: The most portable way I could find:

How can I modify this SRT file parser?

一曲冷凌霜 提交于 2021-02-11 14:41:42
问题 I found some good code for parsing .srt files on stackoverflow (Parsing SRT file with Objective C) shown below: NSScanner *scanner = [NSScanner scannerWithString:[theTextView string]]; while (![scanner isAtEnd]) { @autoreleasepool { NSString *indexString; (void) [scanner scanUpToCharactersFromSet:[NSCharacterSet newlineCharacterSet] intoString:&indexString]; NSString *startString; (void) [scanner scanUpToString:@" --> " intoString:&startString]; (void) [scanner scanString:@"-->" intoString

0curl: (7) Couldn't connect to server

。_饼干妹妹 提交于 2021-02-11 14:40:43
问题 I'm trying to install pip with curl on macOS on 10.14.3. This command curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py has the following output: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (7) Couldn't connect to server I tried to ping bootstrap.pypa.io and the server responded. What can I do? 回答1: curl is preferable but not needed here. If ping can access the server but curl can

Override menu button label text color (MacOS SwiftUI)

我与影子孤独终老i 提交于 2021-02-11 14:23:34
问题 Can I override a Menu button label's "post-set dimmed" color? The GIF below shows a legibly bright menu item that dims after new selection. (Default behavior for this system style (e.g., in trackpad prefs). But it fails accessibility standards, such as WCAG's requirement for > 4.5 : 1 luminance contrast for that font size in an active control (system default is ~ 2). I've tried: setting accentColor and foregroundColor everywhere using onChange to update an @State color fed into the

“value of type ____ has no member 'help' ” after update to latest stable XCode release

徘徊边缘 提交于 2021-02-11 14:21:55
问题 MacOS: 11.0 Beta (20A5384c) Xcode: 12.0.1 (12A7300) After update from Xcode beta to release version I see lot of errors like: "value of type ____ has no member 'help' " Is it was deprecated from release build of Xcode 12 ? On the XCode 12 beta works well. 来源: https://stackoverflow.com/questions/64148126/value-of-type-has-no-member-help-after-update-to-latest-stable-xcode-r

“value of type ____ has no member 'help' ” after update to latest stable XCode release

最后都变了- 提交于 2021-02-11 14:20:20
问题 MacOS: 11.0 Beta (20A5384c) Xcode: 12.0.1 (12A7300) After update from Xcode beta to release version I see lot of errors like: "value of type ____ has no member 'help' " Is it was deprecated from release build of Xcode 12 ? On the XCode 12 beta works well. 来源: https://stackoverflow.com/questions/64148126/value-of-type-has-no-member-help-after-update-to-latest-stable-xcode-r