FAQ Database Discussion Community
c++,eclipse,osx,terminal,64bit
New to the C++ world and wanted to fiddle around using Eclipse's IDE for C/C++ called CDT. I am on OSX 10.10.2 using eclipse-cpp-luna-SR2-macosx-cocoa-x86_64. Sadly this simple example is not printing anything in the eclipse terminal. #include <iostream> using namespace std; int main() { cout << "Hello World" << endl;...
objective-c,osx,web-scraping,request
Hi so I wanted to retrieve data from this website: http://www.timeapi.org/utc/now for an app that I was making, but when I make the request with the following code, I always get null: NSURL * timeAPI = [[NSURL alloc]initWithString:@"http://www.timeapi.org/utc/now"]; NSURLRequest * urlRequest = [[NSURLRequest alloc]initWithURL:timeAPI]; __block NSData * responseData; [NSURLConnection sendAsynchronousRequest:urlRequest...
osx,bash,docker,boot2docker
I have installed Boot2Docker on my Mac. By clicking on the app icon, a terminal window opens with some bash script running to prepare the docker vm and then you're good to go. My problem is, I want to write a bash script to run the Boot2Docker vm and then...
android,ios,facebook,osx,login
Yesterday I logged in to Airbnb with my Facebook account on my OSX. Shortly later I got a notification both on my iPhone and computer saying "Airbnb is available to install on your iPhone" My question is, does anyone here know how this was done? Is this a feature available...
excel,osx,vba,excel-vba,excel-vba-mac
This snippet of code appears to run perfectly fine in Excel on Windows. But on OSX, its erroring out with a "Named argument not found (Error 448)". With Sheets("Colors") Set rangeFound = .Cells.find(What:=Resource, After:=.Cells(1, 1), LookIn:=xlValues, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) End With ...
python,django,osx,notifications,vagrant
I can think of many ways to skin this cat, and Googling hasn't shown an elegant solution either. Does anyone have an easy / elegant way to forward the output from Django's runserver command in a terminal connected to a guest Vagrant VM to the host to display to Mac's...
python,osx,kivy,pyinstaller
I'm trying to package a Kivy/Python application on Yosemite with pyinstaller (OSX 10.10, Kivy 1.9, pyinstaller 2.1) and not having much success, via the Kivy OSX package how-to. After troubleshooting my PYTHONPATH to make sure it included Kivy and all the dependencies, I tried just building their demo touchtracer app,...
ios,osx,core-graphics,core-animation,cgaffinetransform
Let's assume i have a CGPathRef called somePath and I'm doing this: CAShapeLayer *shapeLayer = [[CAShapeLayer alloc] init]; shapeLayer.path = somePath; shapeLayer.geometryFlipped = YES; But for some reason i don't want to flip the geometry – i'd want to do something like this: CAShapeLayer *shapeLayer = [[CAShapeLayer alloc] init]; CGAffineTransform...
c++,osx,arduino,serial-port
I have been scouring the internet for some time now trying to figure out how to send data from C++ (which will read an input .txt file) to an Arduino. Because there does not seem to be a native way in Arduino to read files directly, I chose to use...
osx,fonts,apple
I've recently installed El Capitan on OSX, which comes with the new San Franciso font as system font. The apple presentation here https://developer.apple.com/videos/wwdc/2015/?id=804 (Bit of an overview here: http://codemotionapps.com/san-francisco-display-vs-text-compact-vs-normal-a-brief-review/) states that, by default, numbers are displayed proportionally. They do allow to switch to displaying them mono-spaced (at least in their...
osx,swift,cocoa,sorting,nstableview
I have a NSTableView in MyViewController and have an array controller bound to it. I want to be able to sort it by clicking the table column headers and it should also auto-sort. So for auto-sort I set the Sort Descriptors binding of my array controller in IB as following:...
linux,osx,date
I am trying to convert a timestamp to a number of seconds and it is not working as intended on a mac. On linux I can run: date -d "2015-06-11 12:39" +%s and I get 1434044340 as intended. However, when I run that same command on a mac, I get...
osx,perl,debugging,documentation,locale
I was discussing here about setting no locales in Perl and was recommended to run this perldoc perllocale in OSX Yosemite 10.10.3 but I get the error: Error while formatting with Pod::Perldoc::ToMan: at /System/Library/Perl/5.18/Pod/Perldoc.pm line 1346. at /usr/bin/perldoc5.18 line 11. Got a 0-length file from /System/Library/Perl/5.18/pods/perllocale.pod via Pod::Perldoc::ToMan!? at /usr/bin/perldoc5.18...
python,json,windows,osx,encoding
I have a file log.json that contains one line: {"k":"caf\u00e9"} I run the following code on Windows 7 SP1 x64 Ultimate: import json a = json.load(open('log.json', 'r')) f = open('test.txt', 'w') f.write(a['k']) I don't have any issue. When I run the same code on Max OS X 10.10 x64: Traceback...
objective-c,xcode,osx,cocoa
I am writing an OSX app in Xcode 6 but want my application to have support for OSX 10.7 and up. Unfortunately Xcode 6 only includes SDK for 10.10 and 10.9. What is the best way to make sure I am not using any unavailable API's that would crash on...
ios,osx,swift,eventkit
When running my code, I am getting a number of 1's printing to the console rather than 1,2,3,4,5.... Some help with why this is happening would be great, I'm having trouble figuring it out. The idea is to loop through the Calendar names until finding the 'Travel' calendar. func checkCalendarExists(){...
objective-c,xcode,osx,swift,nsthread
I have a framework that calls back methods in the AppDelegate using detachNewThreadSelector: of NSThread, which looks something like this: private func bridgeSelector(selector: String?, object: String?) { if selector != nil && responder != nil { dispatch_async(dispatch_get_main_queue(), { NSThread.detachNewThreadSelector(Selector( selector!), toTarget: self.responder!, withObject: object ) }) } } The responder...
osx,cocoa,screensaver
I'm making a custom *.saver application, and I would like to add my own thumbnail to show up above the name of screensaver (the ladybug pictures in the left column). How do I do that? ...
c++,osx,gcc,android-ndk,vtk
I'm trying to build native code on android because I want to use VTK for my android tablet. However, I am facing some issues when it comes to building one of the vtk examples. I know this problem has been covered here for an objective c issue but I guess...
node.js,osx,npm
I installed module by sudo npm install -g xxx in OS X, and the command echoes the module was installed in /usr/local/lib/node_modules/xxx. But the require('xxx') still fails claiming `Cannot find module 'xxx'. Only installing the module locally again by sudo npm install xxx can fix the error. Anything need to...
osx,swift,core-graphics
When programmatically working with display modes in OS X (documentation), I've found that the CGDisplayCopyAllDisplayModes leaves out the rightmost option that is presented in System Preferences. A simple utility that prints the size of the current display mode and all available display mode sizes outputs this current size: 1920x1200 available...
xcode,osx,gcc
On OSX, I can't compile simple programs from the command-line when I use an externally-provided compiler (e.g. gcc-4.8). System headers like limits.h cannot be found. Example error messages: fatal error: limits.h: No such file or directory Or: fatal error: stdio.h: No such file or directory and so on. What's wrong?...
java,osx,deployment
On Macs, there's a default menu at the top for basic application handling functions: I've made an application using Java for my Grade 10 final project, (and I'm quite convinced that it's better than Microsoft Paint) and I decided to package it. Using Eclipse, I exported it as a Mac...
osx,terminal
I have been looking for a while for a patch for this. Usually on a Unix/Linux terminal when you press tab it will auto-complete until there are several options and then it will list the options below for you to select. For example: cd he helpFolder/ helpMe/ heIsThere/ cd help...
osx,swift,cocoa,nstextfield
I have a NSTextField that uses no border and window background color while it is displayed but I want it to change to have the default border and white BG color when being edited. I know I can change these properties with: nameTextField.bezeled = true nameTextField.backgroundColor = NSColor.textBackgroundColor() What I...
osx,pcap,libpcap,arp
I have few devices connected to wifi router, but pcap_dispatch() always returns 0 for wifi interface while live capturing on Mac OS X. The same code captures response in case of wired interface. Please clarify if I have missed any flag here.
osx,kernel,interrupt,shortcut,canopy
I'm on OSX, using canopy. Does anybody know what the shortcut for interrupting the kernel is? Thanks.
osx,format,osx-mavericks,intel
I am trying to format a 32GB MicroSD card using the Disk Utilities app in OSX however I am receiving this error: I need that for processing with this manual....
osx,swift,if-statement,logic,collisions
I am having some trouble with the logic inside of didBeginContact on an OSX game i'm creating. It is written in swift, here is what the code currently is: func didBeginContact(contact: SKPhysicsContact) { let collision: UInt32 = contact.bodyA.categoryBitMask | contact.bodyB.categoryBitMask if collision == PhysicsCategory.player | PhysicsCategory.wall { } else if...
osx,terminal,cpu
Ive seen the same question asked on linux and windows but not mac (terminal). Can anyone tell me how to get the current processor utilization in %, so an example output would be 40%. Thanks
osx,qt
System: Mac OSX Yosemite. I installed qt 4.8.7 from homebrew, and then went to a directory I cloned from github (MagRead @ https://github.com/ieatlint/MagRead.git). I ran: qmake MagRead.pro and got this error: Cannot find file: magread.pro. But the file is clearly in the directory! I googled and found one similar question...
ruby,osx,shell,zsh
I am running the command echo $PATH which is returning the following information containing RVM /Users/RAI/.rvm/gems/ruby-2.1.1/bin:/Users/RAI/.rvm/gems/[email protected]/bin:/Users/RAI/.rvm/rubies/ruby-2.1.1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/RAI/.rvm/bin Should this command only return the following? /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin Note that I am currently using on My Zsh...
ios,osx,core-bluetooth,iobluetooth
I'm intending on doing some simple experiments sending simulated key strokes from mac to IOS and I'm trying to decide which framework to spend my effort on. The impression I get is that CoreBluetooth is too high level for this and that IOBluetooth would be the best choice. Is IOBluetooth...
osx,perl
I am trying without success to build the Pg perl module. I set up the POSTGRES_LIB and POSTGRES_INCLUDE respectively to /opt/local/lib/postgresql93 and /opt/local/include/postgresql93. But when I run perl Makefile.pl I get this error Configuring Pg Remember to actually read the README file ! please set environment variables POSTGRES_INCLUDE and POSTGRES_LIB...
osx,swift,cocoa,nstableview,cocoa-bindings
I'm showing the contents of an array of strings with an NSTableView via binding through an Array Controller. I have "NSString" in Class Name in the attributes inspector for the Array Controller and in the Model Key Path of the Array Controller's binding inspector I have the path to my...
objective-c,xcode,osx,cocoa,cocoa-touch
I am trying to add a gradient to a CALayer I have created. I can set the background colour of the CALayer with the following: self.colorLayer = [CALayer layer]; [self.colorLayer setBackgroundColor:color.CGColor]; [self.colorView setWantsLayer:YES]; [self.colorView setLayer:self.colorLayer]; I've looked around with no success (surprisingly I thought this would have been answered many...
c++,osx,twitter,makefile,clang
I am attempting to install twitcurl on OS X and have met with some problems. At first, running make would return the clang error: ld: unknown option: -soname. I looked through the responses from other users with similar problems on OS X and found the following advice: In the makefile,...
c++,osx,c++11,compiler-errors,llvm
We are in the process of porting some c++ code from windows to mac and are having issues compiling it with LLVM 6.1 using c++11. We are encountering errors all over the place of "Call to implicitly-deleted copy contructor" Some of these errors are popping up in our code. for...
php,osx,homebrew,phpredis
I want to install php54-redis. Yu:nginx Yu$ brew install josegonzalez/php/php54-redis ==> Installing php54-redis from josegonzalez/homebrew-php Error: Formulae found in multiple taps: homebrew/php/php54 josegonzalez/php/php54 Please use the fully-qualified name e.g. homebrew/php/php54 to refer the formula. What am I doing wrong and how is thise done properly?...
java,linux,osx,jvm,pthreads
Does JVM on Mac OS X use pthread to create threads? What about on Linux distributions, is it now default way to create threads for JVM on all distributions?...
c++,osx,file-io
so I'm just starting to learn fileIO. I've been using a program called CodeRunner on my mac and I have a folder that contains: validsudoku.cpp, validsudoku, sudokugood0.txt The beginning of the code I wrote is: int main(int argc, char const *argv[]){ //string filetoopen; ifstream sudokutxtfile; string txtline; string sudokubox[9]; //bool...
osx,swift,cocoa,storyboard,nswindow
I am trying to open a new window in my Swift application but I cannot get it to open. class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(aNotification: NSNotification) { openMyWindow() } func openMyWindow() { if let storyboard = NSStoryboard(name: "Main",bundle: nil) { if let vc = storyboard.instantiateControllerWithIdentifier("MyList") as? MyListViewController { var...
osx,swift,cocoa,nstextfield
I want to restrict character input on NSTextField, i.e. so that disallowed characters aren't even appearing. Most of what I found about this topic were solutions that only validate after text input finished or using NSFormatter which still allows the character to appear. So far I came up with this...
python,osx,matplotlib,backend
I'm having trouble getting matplotlib plots to appear in front of my other windows - this is apparently a macosx backend problem. However, after making the following changes in ~/.matplotlib/matplotlibrc.py: #backend : macosx backend : TkAgg I run this command in python import matplotlib print matplotlib.rcParams['backend'] and it returns: MacOSX...
c,osx,locale
I use Mac OSX Yosemite. When I run locale I get this: locale LANG= LC_COLLATE="C" LC_CTYPE="UTF-8" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= Question 1: Does the emptiness of LANG and LC_ALL bad/normal/prefered? Normally, I wouldn't care that much about it, but I've got a warning (process:16182): Gtk-WARNING **: Locale not supported...
osx,cocoa
I have a small Swift-based Cocoa app that I'm writing. It's a single window app, something like Spotlight/QuickSilver/Alfred. It's set as NSApplicationActivationPolicyAccessory (docs) (though I've tried the same thing using LSUIElement, which is equivalent). It's activated via a global hot key. Everything works well, except that when it's active I...
osx,asp.net-5,kestrel
I'm building a simple WebApi in asp.net vnext on a Mac. I've followed the example set in this tutorial but I'm having a problem where the response codes I set in my controller methods are being overridden Take this method in my CrudController: [HttpPost] public void Post([FromBody]CrudObject crudObject) { var...
osx,cocoa
I've a document based app with an NSSplitViewController as the main window's content view controller. The left pane contains a custom view with controller, which implements some menu commands. The right pane contains a standard NSTableView with controller. When the app starts the menu commands work as expected, but as...
osx,bash
I see dozens of programs, some written in different colors in my shell, others with different background colors. Google isn't helping on this. ...
ios,xcode,osx,xcode6,cocoapods
xI am a new iOS developer. Recently when I ran "pod update" sth just went wrong see the detail in the following: (unable to find the utility "xcode-select") bash-3.2$ pod install Analyzing dependencies sh: line 1: 4936 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find xcode-select 2> /dev/null xcrun: error: unable...
c,osx,clang,static-libraries,ar
I'm trying to generate a static library and link it with an execution binary. This is a library function: #include <stdio.h> int hello() { return 10; } With these commands, I could get a static library. gcc -c io.c ar -crv libio.a io.o With lip -info, I checked it is...
objective-c,xcode,osx
I'm trying to access in ~/Library/Preferences/ but my code doesn't work. NSString *resPath = @"~/Library/Preferences/"; NSError *error = nil; NSArray *filenames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:resPath error:&error]; if (!error) { for (NSString * filename in filenames) { NSLog(@"%@", filename); } } Maybe I should ask for some permission.. Any idea?...
objective-c,osx,cocoa
Newbie question follows... I am learning Objective C based OS X Cocoa app development. Most of the books and videos I have are for iOS, so I am converting some simple iOS code examples to OS X. When I create a new OS X "Cocoa Application" project, with the "use...
python,django,osx,python-2.7,python-3.x
I have python3 installed with Django 1.8.2 on Mac OS. There is also python 2.7 installed by default with the OS. When trying to run startproject I get - $ django-admin startproject mysite Traceback (most recent call last): File "/usr/local/bin/django-admin", line 7, in <module> from django.core.management import execute_from_command_line ImportError: No...
xcode,osx
After rebooting my mac, Xcode doesn't start. I use Xcode 6.3 on OS X 10.10.2. I click on the icon and nothing happens. I searched a while and found out how to start Xcode using the CLI. /Applications/Xcode.app/Contents/MacOS/Xcode This works, but with following errors: ^[[Aobjc[2051]: Class IDEBlockScrollView is implemented in...
objective-c,osx,singleton
This is for a Mac OS X app. I have created a singleton class, but I'm not sure how to add class members (not sure if this is the correct term). I am getting the error Property 'chordDictionary' not found on object of type '__strong id' and I'm not sure...
ios,osx,swift,dictionary,protocols
short question here: I got a protocol protocol SCResourceModel {..} and a dictionary which shall use this protocol type as key: [SCResourceModel : String]. This obviously does not work, as a key in a dictionary has to conform to the protocol Hashable. Making my SCResourceModel inherit from Hashable or trying...
osx,shell,unix
I have 2 shell scripts and 2 mpkg installer, I am trying to use an unix excitable file to run them all. here is the script I have, but it always has error message "No such file or directory" ? #!/bin/sh # Find the absolute script current path path=$( cd...
osx,bash,shell
first time post so please let me know how I could improve.. I created a shell script which requires a person to input their name and then generates a report. The script works as needed when chmod'd into an executable script and run from terminal. But, I would like to...
objective-c,osx,cocoa,xib,nib
I'm trying to learn OSX development, and I've created a view in a .xib file, and I'm trying to initialize and then add this view as a subview. I've googled how to do this, and all of the solutions are for iOS and use a call such as MyViewClass* myViewObject...
ios,objective-c,xcode,osx,cocoa-touch
How can I add a angle (rotate) my CAGradientLayer? Without rotating my view (self.colorView). I just want to add a angle to the gradient I create my CAGradientLayer like below CAGradientLayer *gradient = [CAGradientLayer layer]; gradient.colors = [NSArray arrayWithObjects:(id)[[NSColor blueColor] CGColor], (id)[self.gradColorTwo CGColor], nil]; gradient.frame = self.colorView.bounds; [self.colorView setLayer:gradient]; [self.colorView...
windows,osx,ffmpeg,file-conversion,wmv
On Mac OS X 10.6.8, I converted a animated gif to a video file in wmv (a requested file format) by using ffmpeg -i File.gif -s 400x400 NewFile.wmv The video file played fine using VLC on Mac. The file can't be played on a Windows 7 machine using the Windows...
objective-c,xcode,osx,cocoa
I'm coming over from iOS development and I can't figure out this basic thing: if I open MainMenu.xib in Interface Builder and I drag a button onto the main window's view, what class should I connect that button's action to -- the App Delegate? If I want to add a...
osx,session,vim,configuration-files,tmux
So I have tmux and vim running in iterm2 on OSX. I have a tmux.conf file that sources a session in ~/.tmux/ called 'left'. I have successfully loaded this session with three panes. Two panes in a left column and a single pane on the right. I have also managed...
objective-c,osx,cocoa
Total newbie question follows... I am learning Objective C based Cocoa (OS X) app development. Most of the books and videos I have are iOS based, so I'm seeing how the two platforms differ. I have converted a simple iOS app to OS X. I got the converted OS X...
objective-c,osx,cocoa
I have an application that runs as an agent and has icon in the top bar. It should be able to run another app with window and icon in the dock. Both should to share same core data. Is there way to do it? How to open one app from...
osx,keycode
I learned from somewhere that I can reset keybindings of keyboard in OSX. like: { "\UF72C" = "moveToBeginningOfLine:"; } I used a keycode of up key to test and it works well. Now I want to bind another key but I don't know the character code of the key, so...
c,osx,openssl,clang,llvm
I'm trying to use OpenSSL to compute sha1 hash from a c program. I am compiling with clang on Mac OS X Yosemite with an Intel i7 (so 64 bit). The relevant piece of code is roughly like so: #include <openssl/evp.h> ... unsigned char outHash[20]; hash("SHA1","abcd", 20, outHash); The thing...
objective-c,osx,swift,nstableview
I have an NSTableView with cells that contain various NSTextFields and NSProgressIndicators. I set the cells up programmatically and I control their behavior programmatically. The way I have implemented my cells basically prevents me from being able to use Interface Builder. Everything works great except when I resize the NSWindow,...
osx,swift,cocoa,interface-builder,nstextview
I'm trying to set up a text view that a user can type Hebrew text into from right-to-left. Currently it defaults to a left-to-right text direction, which the user can manually change by right-clicking and selecting "Writing Direction > Right to Left", but what I need is for the text...
c++,osx,qt,fsevents,file-watcher
im trying to test a simple filewatcher in mac using the FSEvent Api. I get the callback with the events and everything seems to work but i can't recover the info contained in the info field of the context structure. Here is my code: void feCallback(ConstFSEventStreamRef streamRef, void* pClientCallBackInfo, size_t...
osx,bash
When I run the word count command in OSX terminal like wc -c file.txt I get the below answer that includes spaces padded before the answer. Does anyone know why this happens, or how I can prevent it? 18000 file.txt I would expect to get: 18000 file.txt This occurs using...
osx,swift,cocoa,nstableview,nstableviewcell
I have a NSTableView configured in Interface Builder which uses several default cell views. However the first column's cell view needs to be created from a custom class. How do I implement NSTableViewDataSource method tableView.viewForTableColumn() so that it creates the default cell views for the remaining columns? Here's my method...
objective-c,xcode,osx,swift,cocoa
On El Capitan in Xcode 7 beta using Swift 2.0, I subclassed a NSView to use as a prototype view of NSCollectionView's item view, and override the updateTrackingAreas: method to do the mouse tracking. The NSCollectionView was inside a NSPopover. It seems that only the first 2 times the updateTrackingAreas:...
objective-c,osx,objective-c-runtime
Hi I'm using this answer to get list of class to automatically build some structure. My code looks like that: NSMutableDictionary *result = [NSMutableDictionary dictionaryWithCapacity: 32]; Class* classes = NULL; int numClasses = objc_getClassList(NULL, 0); if (numClasses > 0 ) { classes = (Class*)malloc(sizeof(Class) * numClasses); numClasses = objc_getClassList(classes, numClasses);...
python,osx,subprocess
I am on Mac OS X Yosemite 10.10 and Python 2.7. If I type the following: du -g -d1 /Users 2> /dev/null in the command line, everything works perfectly. Now, my goal is to use that command in a python script. My idea was to use the following: import subprocess...
javascript,osx,google-chrome,karma-runner
This is based on this question where it was discovered that when Chrome is not in the foreground, the tests run really slow. Anyone know how to get around that so I can continue to use Chrome, but don't have to keep it in the foreground?
json,database,osx,swift,firebase
I'm new to swift and databases. All I'm trying to do is read from my firebase database. I'm using the example code provided here: https://www.firebase.com/docs/ios/guide/retrieving-data.html. I'm calling this from my viewcontroller.swift file in override func viewDidLoad(){} func getRootRef(){ // Read data and react to changes println("entered getRootRef") myRootRef.observeEventType(.Value, withBlock: {...
python,osx
I'm looking for a way to cleanly uninstall all versions of python on OS X 10.10 except the default version that followed with the Mac. How do I proceed? Currently I've some weird behaviour. When typing which -a python I get the following output: /Users/harisfawad/anaconda/bin/python /Library/Frameworks/Python.framework/Versions/2.7/bin/python /usr/local/bin/python /usr/bin/python Why doesn't...
python,osx,python-2.7
Hello it's my first post. I started doing some coding in Python on OS X today. I've noticed that OS X has such thing as a date added which is the time the file was put into specified folder. I'm trying to get that date as a timestamp, however none...
image,osx,applescript,image-resizing,automator
I've been searching google.com a couple of hours trying to find a way to do this, but there is no answer. Everywhere is resize to the longest size, but nothing about resize to the specified width only. Is there any way in Automator or AppleScript to resize images to a...
osx,g++,macports,libstdc++
I try to determine which version of libstdc++ is running by the gcc5.1 port on Mac OS X (Yosemite 10.10.3). The otool command gives the following information: /opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.21.0) What is the meaning of version 7.21.0? libstdc++7 does really exist?...
java,android,osx,unity3d,jar
I'm trying to compile a simple Java library for Unity, and after running ant jar, I get the following message: /Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:649: The following error occurred while executing this line: /Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:694: Execute failed: java.io.IOException: Cannot run program "/Users/****/UnityProjects/****/JavaTestPlugin/${aapt}": error=2, No such file or directory This is strange, because I've compiled this...
excel,osx,terminal
I am carrying out a research project for which I need to do quite a lot of calculations. I basically calculated a lot of features for structures present in a .sdf file. I automated the entire process and carried it out in the terminal of my mac. The thing is,...
osx,bash,task-switching
I'm not even sure if bash is the most proper way to achieve this but, I need to, programmatically, switch between opened applications on OS X. I'm thinking about doing a bash program to execute "cmd+tab". I'm unable to find this on a regular search, so, perhaps someone can point...
ios,objective-c,xcode,osx,swift
I have to share my OS X app, all the paths I have used for files used by project are linked to my username and the structure of my computer. Is there a way to have paths related to my project so that once my project is shared the user...
java,osx,maven,java-home
I followed this thread to solve my problem, I have the same problem with a different version of JDK and for some reason it didn't work. I still get -bash: JAVA_HOME: command not found when I type JAVA_HOME to my terminal. I have JDK1.8.0.45 located at Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home which I can...
ruby,osx,installation,homebrew,command-prompt
I tried the command ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ==> This script will install: /usr/local/bin/brew /usr/local/Library/... /usr/local/share/man/man1/brew.1 ==> The following directories will be made group writable: /usr/local/include /usr/local/lib /usr/local/lib/pkgconfig ==> The following directories will have their group set to admin: /usr/local/include /usr/local/lib /usr/local/lib/pkgconfig but I have no idea what that...
osx,swift,nsview
In my ViewController's main NSView, I override the func drawRect(dirtyRect: NSRect) method to implement rounded corners on my main view using NSBezierPath. In that same method I also designate the gradient background of my main view. override func drawRect(dirtyRect: NSRect) { let path: NSBezierPath = NSBezierPath(roundedRect: self.bounds, xRadius: 18.0, yRadius:...
osx,swift,key-value-coding
I am converting an app from Objective-C to Swift 2.0 and while converting an NSView-subclass, I am getting an error while trying to store a weak back-reference from a CALayer to the ActionViewItemInternal which is needed so that the layer drawing code can access the item data. I want to...
objective-c,osx,performance,cocoa,nsview
I having some Performance troubles with my app: It takes more than 2 seconds to load -> So straight away I went to Apple documentation https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/CustomViews.html#//apple_ref/doc/uid/TP40001443-CJBJIFGC In the section named "Avoid the Overuse of Views" at the bottom I got very confused: I indeed adding a lot of NSViews (Guess...
c,osx,mmap
I'm trying to trace down a memory allocation problem I have in OSX. If I compile and run the following code normally, it will run pretty fast. #include <sys/mman.h> #define SIZE 8 * 1024 * 1024 int main(int argc, char const *argv[]) { for (int i = 0; i <...
c++,linux,osx,gcc,llvm
I'm getting a segfault on MacOSX ("Segmentation fault: 11", in gdb "Program received signal SIGSEGV, Segmentation fault"), appearing in the destructor in which a container is looped over with an iterator and memory deleted. I've tried with clang++, g++ (both part of LLVM) and homebrew g++. The segfault appears when...
python,osx
After completing upgrading Python 2.7 to 3.4 on mac (10.10.3), I can't compile my codes. Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> Traceback (most recent call last):...
ios,osx,swift,eventkit,ekevent
I have been stuck on trying to hardcode a new event. My difficulty lies especially with the dates and formatting let dateFormatter = NSDateFormatter() dateFormatter.dateFormat = "MM'/dd'/YYYY" var dateString = "07/16/2015" var startDate = dateFormatter.dateFromString(dateString) var endDate = dateFormatter.dateFromString(dateString) var newEvent : EKEvent = EKEvent(eventStore: store) var error : NSError?...
osx,bash,rename
I have a directory called "Theme_1" and I want to capitalize all the filenames starting with "theme". The first letter of every file name is lowercase and I want it to be upcase. I've tried this but all the letters in the filename are upcase, which is not what I...
osx,swift,cocoa,nstableview,nstableviewcell
I have a NSTableView that uses mostly standard NSTextTableCellViews but I want some other cells that contain another UI component in my table in one or two rows. The question is: Where do I define those custom cells so that Cocoa finds them? I just dropped a custom NSTableCellView into...
osx,bash,shell
I am flattening a directory of nested folders/picture files down to a single folder. I want to move all of the nested files up to the root level. There are 3,381 files (no directories included in the count). I calculate this number using these two commands and subtracting the directory...
osx,qt,escaping
I have HTML input I am supposed to extract 2 Strings of, build a document title string of type <string 1> / <string 2, create a PDF from the source on the users mac desktop and name it as described. I do know that a slash in a document name...
c++,xcode,osx,opencv,opencv3.0
I am using CIDetector to detect faces, then using OpenCV on the lower half of each face to detect the size of any smiles. I am using the below code to create the cv::mat which OpenCV can perform the detection on, as you can see the image goes through the...