How to avoid forcing a second component one day?

I'm using this code to create a document for a document base application for macOS, which hase as name the seconds elapsed since the Date() referencing date. func saveDocumentInApplicationSupport() { do { // create a directory in Application Support

Read a text file in a table with OS X Javascript

I'm really struggling to find documentation on how to read a text file into an array using OS X Automation with Javascript. Here's what I have so far: var app = Application.currentApplication(); app.includeStandardAdditions = true; var myFile = "/Use

Is it possible to install CNTK on a macbook?

It is possible to install Microsoft CNTK on a macbook? I have OS X El Capitan. The official Microsoft documentation at https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-your-machine doesn't provide any information for mac users. Thank youAs of Jun

Install xgboost on Mac - ld: library not found

I am trying to install OpenMP enabled xgboost on my mac. I installed gcc with no problem: brew install gcc --without-multilib then cloned git repository: git clone --recursive https://github.com/dmlc/xgboost cd xgboost; cp make/config.mk ./config.mk

QFileDialog and setDefaultSuffix for Mac Sandbox

I would like to set default file extension in QFileDialog for saving files in my app ( it needs to run in mac app store sandbox ). The default behaviour of setDefaultSuffix on mac ( without sandbox) is that it adds an extension to any name that user

Search string to repeat instances of a word

I have a string, and I want to find the locations of every user chosen word inside that string. For instance, if the user chooses "my", I want to find every time "my" is found in the string. Currently I am using: var range = stringCont

EXC_BAD_ACCESS in Swift when adding a SKSpriteNode

I am creating a little game in Swift for OS X to practise but I encountered an error unkonwn to me. It appears when I try to create two new SKSpriteNodes: var battleBegan:Bool = false let beginButton = SKSpriteNode(imageNamed: "button") var back

DocumentType does not match Xcode 6 Beta 5 using Swift

I was building a Document based app for OS X using Swift in Xcode 6 Beta 4 and it worked fine. After upgrading to Xcode 6 Beta 5, however, I get the following error message every time a document window tries to open: The DocumentType type doesn't map

route add application net traffic

Recently I´ve been changed from a building in my job and I have a small issue. Do you know how can I route a traffic to a specified gateway but only when SSH y used? I have in my macmini 2 network interfaces, the lan and the wifi. - Lan IP Addres: 10

Cocoa Websocket Server on Mac OS X

I'm porting my application from Windows to Mac using XCode. One thing my application does is it runs a WebSocket server for communication. I've seen many WebSocket client libraries on github, but I'm having trouble finding one that handles server com

Variable change on a set of conditions

This question is related to the thread here: Today's date, minus X days in shell script But because I'm now manipulating the variable, I started another thread. As described above, I need to get today's date minus 200 days, with the Year, Month, and

Java, Mac OS, Windows and Linux

I have migrated from Linux (Ubuntu) to Mac OS. I have wrote an application in Java (swing). I have run it successfully the same code in windows and linux but in mac os I have some problems. Here is the code and problems in comments: public MainForm()

flexible alternative to NSTokenField?

I am trying to customize an NSTokenField and after trying several hours I realized that NSTokenField is not customizable enough (at least using public methods). Do you know an alternative to NSTokenField which can be easily customized? Thanks!How abo

Compilation error & ldquo; Undefined symbols & rdquo; on osx

I am trying out a very simple cpp program on osx just to get myself familiar with the osx platform, so I am very surprised to encounter any error message. Here is the code: #include <iostream> using namespace std; int main() { cout << "He

How can I escape spaces in $ HOME in a bash script?

I'm trying to run a script which uses my $HOME variable to set things up (it's gitolite, by the way). However, it's failing because I'm on a system where the home directory path has spaces in it. I want to hack the gitolite bash script at a single po

Presentation of text on Mac and PC

Can someone help me out on this one. I have a website which was developed on a Mac. When viewing certain text in "verdana" on the Mac all looks great, but on the PC the text is very fine and thin on all browsers. Other text with bold and larger

how to know 2 PC LAN is connected with my program in php?

I have 4 PCs which are connected through the LAN. I am making a PHP program that will differentiate each PC separately and i will keep each pc record. But when i am getting an IP address i am getting same IP for all. I guess i should retrieve MAC add

fork in the Cocoa application

My problem is not the best scenario for fork(). However, this is the best func I can get. I am working on a Firefox plugin on Mac OSX. To make it robust, I need to create a new process to run my plugin. The problem is, when I forked a new process, mu

Can not update RubyGems

I'm having difficulties updating RubyGems from version 1.1.1 to newest. I've tried the following: gem update Result: Updating installed gems Bulk updating Gem source index for: http://gems.rubyforge.org/ Nothing to update and gem install rubygems-upd