osx

Git index resets itself

Every so often when I run git add . to add new files to my repo my git index will reset and think all the files in the repo have been deleted. I run these commands: git status git add . git status git commit -a -m "Commit message" everything looks fine at all those points until I commit and it says every file was deleted, all I have t...

Dendrogram generated by scipy-cluster does not show

I am using scipy-cluster to generate a hierarchical clustering on some data. As a final step of the application, I call the dendrogram function to plot the clustering. I am running on Mac OS X Snow Leopard using the built-in Python 2.6.1 and this matplotlib package. The program runs fine, but at the end the Rocket Ship icon (as I underst...

Boot Problem with Tomcat on Mac OS X

Hi, Using recently Tomcat. So far I have used it on a Windows XP machine, and everything went well. I decided to install it on a Mac machine, Mac OS X Snow Leopard, but can not boot. I installed Tomcat by following this step: 1. download from site, 2. create folder /Library/Tomcat, 3. untar file in this new folder, 4. create simbolic l...

What would be the best way to install (distribute) dynamic libraries in Mac OSX using CMake/Cpack ?

Hello all, I have a project whose artifacts are two dynamic libraries, let's say libX.dylib and libY.dylib (or .so for linux distributions). There are no executables. Now I would like to distribute these libraries. Since I already use CMake to compile it, I looked at CPack and successfully generated .tgz and .deb packages for Linux. ...

I want to query whitepages.com 4,000 times, how to save the results?

I have an old customer list of 4,000 businesses. I want to determine if the phone numbers associated with each listing are still working (and therefore the business is probably still open). I can put each number in whitepages.com and check them one by one... but want to automate the results. I have looked at their API and can't digest i...

CGEventTapCreate breaks down mysteriously with "key down" events

I'm using CGEventTapCreate to "steal" media keys from iTunes when my app is running. The code inside of the callback that I pass to CGEventTapCreate examines the event, and if it finds that it's one of the media keys, posts an appropriate notification to the default notification center. Now, this works fine if I post a notification for...

MacOSX - File extension associate with application - Programatically

I'm trying to get my program to automatically associate certain file extensions to be opened by it but I'm not sure how to do that in MacOSX. I'm not asking how to associate a program with a file extension in the GUI, I want to be able to program it into my program. ...

pyGame in a thread

I want to use a pyGame program as a part of another process. Using the following code, pyGame doesn't seem to be processing events; it doesn't respond to the 'q' key nor does it draw the titlebar for the window. If go() is not run as a thread, it works fine. This is under OSX; I'm unsure if that's the problem or not. import pygame, thre...

Camera input as Mouse(Motion Tracking)

Dears, I have been developing a project which use web cam as source of input to imitate as mouse event on mac. I'm always handle with opencv for image processing and Qt framework for GUI framework. My problem is, I want to write a program which imitates mouse. I don't know how to control a mouse out of the window form and sent the int...

What is the optimal way to monitor changes in a directory with a kqueue()?

OK: I'm implementing File Sharing in an iPhone OS app, and of course this means filesystem monitoring. Yay! Basically, the OS copies and/or deletes from and to a directory I can access when the user manipulates files into my app's section in iTunes. Thus, I need to monitor the directory for changes presumably via an efficient mechanism ...

banner appears off in osx browsers but it is fine in windows browsers

here's a live example http://bit.ly/9JgNmN tested in IE7, firefox, safari, chrome in windows 7 seems to be centered but in osX the banner is off! any ideas? p.s.here is the original of the example that i have modified: css-tricks.com/examples/InfoGrid/ Thank you Will ...

Implementing Apple's HTTP Live Streaming - problem with mediafilesegmenter tool

Hi, I have MAC OS 10.6 (Snow Leopard) and according to Apple's guide on HTTP Live Streaming, the mediafilesegmenter tool should be there in /usr/bin/ directory but it isnt. There is only the mediastreamsegmenter there. I need the mediafilesegmenter tool to segment MPEG2 Transport streams. How can I get/install the mediafilesegmenter to...

Mac os x systems programmng and bsd

Hi all I'd like to get into some mac os x systems programming and wondered, although mac os x is a Mach and bsd hybrid, would a bsd programming book suffice since I can't seem to find any books on mac os x systems level coding (or mac os x architecture)? Any pointers would be much appreciated. Thanks ste ...

Including FFMPEG with a Java application on Mac

I'm writing a Java program that will be used on both Windows and Mac. In the program, I'm using FFMPEG to convert a MOV file to an FLV. On Windows, it's no problem -- simply call the command. But on Mac, I'm not quite sure what to do. Does the user really have to install FFMPEG on their machine, or can it somehow be included in the Java ...

Deleting a folder that contains symlinks

If I rm -rf a folder that has soft links in it, will it try to follow those links and delete the corresponding folder, or will it simply unlink them? I have a copy of my home directory with sym links in it, and I'm scared to rm -rf it in case it follows those links and blows up the corresponding folders... ...

CGFloat vs GLfloat

I understand CGFloat should be used in Cocoa applications to make them 64-bit clean. But what about in a simple OpenGL game that uses Cocoa/Objective-C for everything but the rendering (to an NSOpenGLView)? CGFloat is a part of Core Graphics, so if I would it also be alright to use CGPoint, CGRect etc.? or should I just write rects and v...

What's a good way to set up a development environment on OS X for ruby, rails, and git?

I'm going to start development on a web app using ruby, rails, probably either postgres or mysql, and most likely apache. I'll be using a git repository with the master repo on another server. I've searched through stackoverflow and done some Googling... so here's what I have so far... What are your opinions on what's described on this...

How to create svn folder in mac os x

hi, i am working on iphone project, i like to create an svn folder and link that one to my server I tried to run the below command fsp3s-MacBook-Pro:~ fsp3$ svnadmin create /ram/Code/SVN i got the below error svnadmin: Repository creation failed svnadmin: Could not create top-level directory svnadmin: Can't create directory '/ram/Co...

How to build mach-0 for different architectures?

I have some dylibs to load from python with ctypes. I can load libbass.dylib without problem, but I can't load the self-compiled libmp3lame.dylib. Here is the error I get. OSError: dlopen(libmp3lame.dylib, 6): no suitable image found. Did find: libmp3lame.dylib: mach-o, but wrong architecture Then, I inspect the file typ...

Flipping OpenGL texture

When I load textures from images normally, they are upside down because of OpenGL's coordinate system. What would be the best way to flip them? glScalef(1.0f, -1.0f, 1.0f); mapping the y coordinates of the textures in reverse vertically flipping the image files manually (in Photoshop) flipping them programatically after loading them (I...