Cocoa application with SPM

My general goal is to create an app, that grabs all data from the postgreSQL database. Firstly, I connected C API libpq to connect my database. Then, I found a nice wrapper around libpq to make my life easier, thanks to Perfect. To install this wrapp...
more »

2017-01-11 22:01 (1) Answers

Customize R base plot fonts (macOS)

I have followed this blog to customize base R plot font on macOS (using quartzFonts() in .Rprofile), with success to a certain degree. My problem with this approach is, defining a new font family has to be put in a function such as .define.fonts() an...
more »

2017-01-11 19:01 (0) Answers

Is there a way to set thread stack size using GCD?

I have a multiplatform code that has some recursive calls (running in a thread, not the main one), and in some cases the default stack size is not enough for the recursivity depth. I solve this in windows using the /STACK compiler flag: /STACK:20971...
more »

2017-01-11 18:01 (0) Answers

Detect ethernet - wifi network change

I want to detect when the network changes from ethernet to wifi (or wifi to ethernet). I want to have an observer to notify me about this change. reachability isn't good enough - it's always returns ReachableViaWiFi for both cases. P.S - There wer...
more »

2017-01-11 13:01 (0) Answers

Java Hide Dock Icon in Mac osx

I want to make a system tray without icon of Mac osx dock, just only tray icon using java code. I developed the tray function but I cannot hide the dock icon. Is it possible? What can i do for that? help me. ...
more »

2017-01-11 09:01 (0) Answers

Ghostscript preview on macOS

I'm trying to get GhostScript 9.20 working on macOS 10.11 El Capitan. The problem is that I can't generate any preview. The PS file is very simple and looks as below: %!PS-Adobe-2.0 % The indispensable Hello World program in PostScript << /P...
more »

2017-01-10 22:01 (1) Answers

How do I get the File Kind of a URL?

I was using this to get the file kind string from a given URL var umKindStr: Unmanaged<CFString>? = nil LSCopyKindStringForURL(url, &umKindStr) if let kindStr: CFString = umKindStr!.takeRetainedValue() { return kindStr as String ...
more »

2017-01-10 14:01 (0) Answers

Can I get a -1 exit code using C++ on mac?

I was just wondering if it's possible to get a function in C++ on a Unix system to return -1 and not 255? I have been programming some OpenCV stuff and realised stuff wasnt working as intended. The functions I was using were meant to return -1, but ...
more »

2017-01-10 05:01 (2) Answers

python3 won't run from mac shell script

I am trying to use Automator on macOS 10.12 to launch a Python 3 script. The script works just fine when I run it from the terminal with the command: python3 Automator has a "Run Shell Script" function that uses the /bin/bash shell. Th...
more »

2017-01-09 20:01 (2) Answers

Launchd PATH issue with TeamCity

I recently asked this question, and got everything working appropriately. The build agent is launching, RAM disk is being created. It seems that there is an issue with the PATH environment variable. When I run the same command from terminal, all my...
more »

2017-01-09 19:01 (0) Answers

Server Sent Events with Kitura

I try to do a client-server application with on the client side a Angular2/typescript web site and on the server side a Kitura server in Swift on Mac OSX. On the client side, the typescript code instanciates an EventSource object : this.eventSou...
more »

2017-01-09 17:01 (1) Answers

Ruby throws data exception in macOS

The Objective: Write a Ruby program to replace a single line in a text file. The Problem: Ruby throws an exception regarding the data in my text file when I run the program in Terminal in macOS 10.12. Specifically, the message is: myprog.rb:3:in `...
more »

2017-01-09 17:01 (0) Answers

gdb parses stream as argument

When executing ./foo 0 1 2 > out.txt arguments 0, 1 and 2 are passed to foo and stdout is streamed to out.txt. When running in gdb: run 0 1 2 > out.txt everything is passed to foo as arguments, including ">" and "out.txt". AFAIK, the shell ...
more »

2017-01-09 17:01 (0) Answers

HID Device Interface in MAC

I have to create a software/driver for OSX that interact with HID device connected through USB. The purposes of the application are as follows, Detect when HID device is plugged in or Removed. The PID and VID of the device is known. Read HID devic...
more »

2017-01-09 13:01 (2) Answers

How to debug kernel hang on osx

I have installed one kernel extension, after which sometimes machine hangs. Not easily reproducible. I have got the kernel dump from my customer which he generated by generating NMI after hang. Now how should I analyse this core file to find which t...
more »

2017-01-09 11:01 (0) Answers

Unrecognized selector on OS X 10.11

I'm using a custom item with menu in the system Status Bar for controlling some functions in my app. Here is my code: import Foundation class StatusBarMenuController { var statusItem: NSStatusItem init() { self.statusItem = NSStatu...
more »

2017-01-09 11:01 (1) Answers

Java RMI call slow first time

I'm working on a personal project for school where I have to user RMI to communicate between server and client. Project info The goal of my project is to retrieve stock info (from NYSE) for each day on the server at a specific time (after NYSE is c...
more »

2017-01-09 09:01 (1) Answers