homebrew

Apple Silicon M1 Homebrew 安装及使用简介

拥有回忆 提交于 2020-12-14 10:10:05
原安装指令: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 改为新指令: arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 对应的,其它使用场景也需要在指令前加上 arch -x86_64 brew install xxx arch -x86_64 brew update xxx 如果不想每次都加前辍也可以执行以下指令 alias ibrew=arch -x86_64 brew 来源: oschina 链接: https://my.oschina.net/quicker/blog/4795055

How to install openjdk with brew? [closed]

廉价感情. 提交于 2020-12-13 03:38:00
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 months ago . Improve this question Seems like there's 3 packages "openjdk", "cask java" and "adoptopenjdk". Which one should be used? 回答1: You can use brew install openjdk@11 回答2: You can use AdoptOpenJDK for brew 回答3: To install latest: brew cask install adoptopenjdk To install a specific version

How to install openjdk with brew? [closed]

旧城冷巷雨未停 提交于 2020-12-13 03:35:28
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 months ago . Improve this question Seems like there's 3 packages "openjdk", "cask java" and "adoptopenjdk". Which one should be used? 回答1: You can use brew install openjdk@11 回答2: You can use AdoptOpenJDK for brew 回答3: To install latest: brew cask install adoptopenjdk To install a specific version

面试官 | 什么是递归算法?它有什么用?

有些话、适合烂在心里 提交于 2020-12-12 14:57:22
前言 递归是算法中一种非常重要的思想,应用也很广,小到阶乘,再在工作中用到的比如统计文件夹大小,大到 Google 的 PageRank 算法都能看到,也是面试官很喜欢的考点 最近看了不少递归的文章,收获不小,不过我发现大部分网上的讲递归的文章都不太全面,主要的问题在于解题后大部分都没有给出相应的时间/空间复杂度,而时间/空间复杂度是算法的重要考量!递归算法的时间复杂度普遍比较难(需要用到归纳法等),换句话说,如果能解决递归的算法复杂度,其他算法题题的时间复杂度也基本不在话下。另外,递归算法的时间复杂度不少是不能接受的,如果发现算出的时间复杂度过大,则需要转换思路,看下是否有更好的解法 ,这才是根本目的,不要为了递归而递归! 本文试图从以下几个方面来讲解递归 什么是递归? 递归算法通用解决思路 实战演练(从初级到高阶) 力争让大家对递归的认知能上一个新台阶,特别会对递归的精华:时间复杂度作详细剖析,会给大家总结一套很通用的求解递归时间复杂度的套路,相信你看完肯定会有收获 什么是递归 简单地说,就是如果在函数中存在着调用函数本身的情况,这种现象就叫递归。 以阶乘函数为例,如下, 在 factorial 函数中存在着 factorial(n - 1) 的调用,所以此函数是递归函数 public int factorial ( int n) { if (n < = 1 ) {

Jupyter Notebook ModuleError after Homebrew Upgrade

感情迁移 提交于 2020-12-12 10:25:12
问题 I have been using Jupyter for some time now and it has worked just fine. I have Jupyter and Python installed via Homebrew. I am running on MacOS. Yesterday, I ran the command brew upgrade and now my Jupyter notebook is unable to find any of the installed python packages. I will use Numpy as the example. When inside of a Jupyter notebook, I try to do import numpy I get the message: ModuleNotFoundError: No module named 'numpy' If, however, I launch python in a terminal window, then I can import

mac安装homebrew,xcode报错

半城伤御伤魂 提交于 2020-12-11 13:30:33
环境:mac10.15.6 安装homebrew时报错 具体错误: no developer tools were found at ‘/Applications/Xcode.app’, requesting install. Choose an option in the dialog to download the command line developer tools. 报错原因:mac没有装xcode,xcode居然有11个G 解决方法:其实不需要下xcode,只需要下一个xcode的管理工具(个人理解),而且只有不到800M(亲测有效) 下载地址:https://developer.apple.com/download/more/ 再次执行安装命令就可以了 /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” 完成~ 来源: oschina 链接: https://my.oschina.net/u/4412439/blog/4791880

High Sierra 下终端走代理的方法

穿精又带淫゛_ 提交于 2020-12-11 06:57:15
proxychains-ng在10.13下更新brew update已失效。 《让 Homebrew 走代理更新》 的方法失效。 无意中看到了Shadow****-NG 下有了http代理的功能 于是打开终端,输入 export http_proxy=127.0.0.1:1087 export https_proxy=127.0.0.1:1087 访问正常 yaochengzhideMacBook-Pro:~ yaochengzhi$ curl www.google.com <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>302 Moved</TITLE></HEAD><BODY> <H1>302 Moved</H1> The document has moved <A HREF="http://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=http://www.google.com.hk/%3Fgws_rd%3Dcr&ust=1516862030594982&usg=AOvVaw1X0JBmay4TgmXJT1pm5vQC">here</A>. </BODY></HTML>

Unable to install cocoa pods

混江龙づ霸主 提交于 2020-12-08 16:02:03
问题 I want to install cocoapods on MacOS to run the pod command. But on doing sudo gem install cocoa-pods I get the following: Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /usr/local/lib/ruby/gems/2.7.0/gems/ffi-1.13.1/ext/ffi_c /usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.7.1_2/lib/ruby/2.7.0 -r ./siteconf20200702-22528-1o4wbn0.rb extconf.rb checking for ffi.h... *** extconf

Unable to install cocoa pods

自古美人都是妖i 提交于 2020-12-08 15:54:07
问题 I want to install cocoapods on MacOS to run the pod command. But on doing sudo gem install cocoa-pods I get the following: Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /usr/local/lib/ruby/gems/2.7.0/gems/ffi-1.13.1/ext/ffi_c /usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.7.1_2/lib/ruby/2.7.0 -r ./siteconf20200702-22528-1o4wbn0.rb extconf.rb checking for ffi.h... *** extconf

Unable to install cocoa pods

。_饼干妹妹 提交于 2020-12-08 15:52:31
问题 I want to install cocoapods on MacOS to run the pod command. But on doing sudo gem install cocoa-pods I get the following: Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /usr/local/lib/ruby/gems/2.7.0/gems/ffi-1.13.1/ext/ffi_c /usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.7.1_2/lib/ruby/2.7.0 -r ./siteconf20200702-22528-1o4wbn0.rb extconf.rb checking for ffi.h... *** extconf