macos

localhost doesn't resolve to 127.0.0.1

余生长醉 提交于 2021-02-16 05:14:51
问题 I make a call to Inet4Address.getByName("localhost") expecting to see 127.0.0.1 , but instead I see my IP assigned to my ethernet/airport. If I disconnect my ethernet/airport, I will get the resolution of 127.0.0.1 , but as soon as I connect again it resolves to the IP address of the ethernet/airport. I'm using OSX 10.6.7 and java version "1.6.0_24". My /etc/hosts file has "127.0.0.1 localhost" . Ping localhost in the terminal does resolve to 127.0.0.1. The reason I need this is that I'm

SQLAlchemy/MySQL Lost connection to MySQL server during query

老子叫甜甜 提交于 2021-02-16 05:08:35
问题 SQLAlchemy (0.9.8) and mysql-5.6.21-osx10.8-x86_64 and MAC OS X 10.3.3 (Yosemite) I keep getting intermittent: InterfaceError: (InterfaceError) 2013: Lost connection to MySQL server during query u'SELECT..... ' I have read up a few thread and most cases are resolved by adding this to my.cnf max_allowed_packet = 1024M which should be more than big enough for what I tried to do. After doing this, I step hit it intermittently. And putting this line in /etc/my.cnf: log-error = "/Users/<myname>

Zsh detects insecure completion-dependent directories

泄露秘密 提交于 2021-02-15 11:24:42
问题 I get the following error messages when I open my terminal, Hyper: [oh-my-zsh] Insecure completion-dependent directories detected: drwxrwxr-x 7 dwaynethe2nd admin 224 Apr 25 15:00 /usr/local/share/zsh drwxrwxr-x 4 dwaynethe2nd admin 128 Apr 25 14:53 /usr/local/share/zsh/site-functions 回答1: This is an issue with ZSH, your shell, not Hyper, your terminal. I actually had the same issue earlier today. There are some solutions in this issue on Github, and I will quote some of them here but I

Huge fort.# files when running gfortran

自闭症网瘾萝莉.ら 提交于 2021-02-15 03:13:46
问题 I am using gfortran for an application and running the Fortran through a Matlab mex file. I have noticed that in the current directory when I run the Fortran file, on my mac, it creates a fort.9 or fort.16 file, where the 9 or 16 are some arbitrary number. Recently, I have noticed that these fort. files can be GBs big! Generally they are quite small, like a few kBs. I was just wondering what purpose these files have? And second, is there some error I have in my code that is causing them to be

Unable to import opengl.gl in python on macos

自作多情 提交于 2021-02-13 12:40:49
问题 I am using OpenGL to render a scene in python. My code works perfectly fine on windows but, for some reason, I'm having issues when importing opengl.gl on MacOS. The issue arises when calling from OpenGL.GL import ... in both python scripts and the python console. More specifically here is the exact call in my script: from OpenGL.GL import glGenBuffers, glBindBuffer, glBufferData, \ glGenVertexArrays, glBindVertexArray, glEnableVertexAttribArray, glVertexAttribPointer, \ glDrawArrays,

Unable to import opengl.gl in python on macos

耗尽温柔 提交于 2021-02-13 12:40:27
问题 I am using OpenGL to render a scene in python. My code works perfectly fine on windows but, for some reason, I'm having issues when importing opengl.gl on MacOS. The issue arises when calling from OpenGL.GL import ... in both python scripts and the python console. More specifically here is the exact call in my script: from OpenGL.GL import glGenBuffers, glBindBuffer, glBufferData, \ glGenVertexArrays, glBindVertexArray, glEnableVertexAttribArray, glVertexAttribPointer, \ glDrawArrays,

How to play uploaded videos in an iframe on a Mac system

大兔子大兔子 提交于 2021-02-11 18:07:52
问题 I have tried using iframe and also video tag and object tag to play the video. In some cases, it plays only the audio from the video, but video doesn't show up. Secondly, the same video file plays well on a separate tab in the browser, but not within my iframe. This issue is on all browsers on my Mac, but on a windows machine it plays well. 回答1: I finally found it. Apple has a good documentation of its own for this. https://developer.apple.com/library/mac/documentation/quicktime/conceptual

How to play uploaded videos in an iframe on a Mac system

 ̄綄美尐妖づ 提交于 2021-02-11 18:07:26
问题 I have tried using iframe and also video tag and object tag to play the video. In some cases, it plays only the audio from the video, but video doesn't show up. Secondly, the same video file plays well on a separate tab in the browser, but not within my iframe. This issue is on all browsers on my Mac, but on a windows machine it plays well. 回答1: I finally found it. Apple has a good documentation of its own for this. https://developer.apple.com/library/mac/documentation/quicktime/conceptual

Not able to open a process in authorization plugin in swift

不想你离开。 提交于 2021-02-11 17:41:23
问题 I am trying to open a cocoa GUI application from authorization plugin which runs during login. I have placed the application in /Library/Application Support/MyFolder/Example.app . I am using below environment and code to open the application. Environment OSX: 10.14.5 (Mojave) Xcode: 11.2.1 Swift: 4.2 Code let task = Process.init() task.launchPath = "/Library/Application Support/MyFolder/Example.app/Contents/MacOS/Example" task.arguments = ["Hi", "Hello"] task.launch() task.waitUntilExit()

Not able to open a process in authorization plugin in swift

两盒软妹~` 提交于 2021-02-11 17:40:41
问题 I am trying to open a cocoa GUI application from authorization plugin which runs during login. I have placed the application in /Library/Application Support/MyFolder/Example.app . I am using below environment and code to open the application. Environment OSX: 10.14.5 (Mojave) Xcode: 11.2.1 Swift: 4.2 Code let task = Process.init() task.launchPath = "/Library/Application Support/MyFolder/Example.app/Contents/MacOS/Example" task.arguments = ["Hi", "Hello"] task.launch() task.waitUntilExit()