macos

Can't Connect to MySQL Server through Xcode application even tho I am able to connect it via Terminal

强颜欢笑 提交于 2021-02-08 09:56:47
问题 I'm trying to create an application that fetches data from the MySQL server. I installed MySQL from Homebrew and using the PerfectMySql swift package. I want to test it on my localhost first but I'm unable to connect it from my application . When I mysql -u root -p in the command line, it works as it should. My code for MySQL connection: import PerfectHTTP import PerfectHTTPServer import PerfectMySQL import Foundation public class DB { let host = "localhost" // or "127.0.0.1" let user = "root

OS X Status Bar Application with a title in two lines

我只是一个虾纸丫 提交于 2021-02-08 09:39:33
问题 I'm an old iOS developer and now I want to make a simple OS X status bar application. I need to put a title at the NSStatusItem but it should be in two lines, like iStatPro network feature. How should I add it? 回答1: Here is a very simple example. This example shows two lines with two simple blinking lights. It uses a NSView (Custom view) with two NSTextFields and two NSImageWells inside of it. The red and green light images are added to the project and set to the Image wells in IB. .m // //

unresolved inclusion error eclipse

有些话、适合烂在心里 提交于 2021-02-08 09:35:13
问题 So I went to this thing call the digital media academy for 3D game programming. We used eclipse along with Panda3D using their Macbook Pro's to create 3D games. I created an awesome game there which ran beautifully. However when I put everything on a USB and installed everything back on my personal macbook pro at home, I see question marks next to these lines of code that say Unresolved inclusion: // Panda3D stuff. #include "auto_bind.h" #include "audioManager.h" #include

How do I disable the Show Tab Bar menu option in SwiftUI

南笙酒味 提交于 2021-02-08 09:24:07
问题 I have created a very simple app on MacOS created with SwiftUI. Default there is a menu item show tab bar . How do I remove this? I doesn't make sense to have tabs in this app. I've found the following answering the same question, but for older versions of Swift, not for SwiftUI: How do I disable the Show Tab Bar menu option in Sierra apps? 回答1: I was looking for an answer for this as well and found out the following: by default - as you already mentioned - the Show/Hide Tab is active: There

AppleScript used in my cocoa mac app, stopped working in osx 10.14

允我心安 提交于 2021-02-08 09:19:38
问题 I have used AppleScript to get selected text from third party app. Which is working fine in osx 10.13 but stopped working in osx 10.14. From searching, got one suggestion to add "NSAppleEventsUsageDescription" in info.plist, but that is also not working for me. let latestApp = "Safari" //Write script to activate the app and get the selected text to our app let script = """ tell application \"\(latestApp)\" activate end tell tell application \"System Events\" tell process \"\(latestApp)\"

App name in Finder not matching app name in Terminal

半城伤御伤魂 提交于 2021-02-08 08:24:39
问题 It's shown as nwjs.app in Finder but nw-demo.app in Terminal. If I rename the app using mv nw-demo.app nw-demo2.app , it shows correctly in Finder. If I then rename it back using mv nw-demo2.app nw-demo.app , it shows as nwjs.app again. Strange. The name should be nw-demo.app , that's what I want, but it's nwjs.app . I don't see anything in nw-demo.app/Contents/Info.plist or anywhere that would set it to nwjs . Here's the Info.plist : 回答1: All I had to do was delete nw-demo.app/Contents

c# System.Data.SqlClient.SqlException: Snix_Connect in macOS

我们两清 提交于 2021-02-08 08:18:33
问题 I am writing an asp.net 5 app with ef 7 to work with sql server. It's all okay when the app is running under windows. When I tried running it under macOS and when i need to interact with the database the following exception appeared: Unhandled Exception: System.Data.SqlClient.SqlException (0x80131904): Snix_Connect (provider: SNI_PN7, error: 25 - SNI_ERROR_25) Snix_Connect (provider: SNI_PN7, error: 25 - SNI_ERROR_25) ---> System.Net.Sockets.SocketException (0x80004005): The socket is not

c# System.Data.SqlClient.SqlException: Snix_Connect in macOS

∥☆過路亽.° 提交于 2021-02-08 08:18:12
问题 I am writing an asp.net 5 app with ef 7 to work with sql server. It's all okay when the app is running under windows. When I tried running it under macOS and when i need to interact with the database the following exception appeared: Unhandled Exception: System.Data.SqlClient.SqlException (0x80131904): Snix_Connect (provider: SNI_PN7, error: 25 - SNI_ERROR_25) Snix_Connect (provider: SNI_PN7, error: 25 - SNI_ERROR_25) ---> System.Net.Sockets.SocketException (0x80004005): The socket is not

Git untracked/unstaged files right after clone

元气小坏坏 提交于 2021-02-08 08:14:13
问题 I make clone of a git repository, and right after it I get untracked and unstaged (modified/deleted) files in git status . Then I set fileMode=false for Mac, and several files go away from unstaged. But I cannot understand what to do with the others. I've tried a bunch of things from stackoverflow and other places, but nothing helps. So my question is why I get all these untracked / unstaged files right after cloning the repo, and how to fix it. I use Mac for development, but I've tried to

Git untracked/unstaged files right after clone

纵然是瞬间 提交于 2021-02-08 08:10:26
问题 I make clone of a git repository, and right after it I get untracked and unstaged (modified/deleted) files in git status . Then I set fileMode=false for Mac, and several files go away from unstaged. But I cannot understand what to do with the others. I've tried a bunch of things from stackoverflow and other places, but nothing helps. So my question is why I get all these untracked / unstaged files right after cloning the repo, and how to fix it. I use Mac for development, but I've tried to