In bash shell with emacs key-binding, you can use key combination like M-f, M-b to move one word forward or backward on the shell prompt respectively. Usually, the meta key is mapped to Alt key on Windows and Linux. However, in iTerm, I could not find a way to map this meta key to either Option or Command key on my MacBook Pro.
It seems...
On occasion, my local Rails app loses its connection to MySQL. I get some error that the connection failed, but if I just refresh the page, it works fine. This has never happpened in my STAGE or PROD environments (I deploy to Ubuntu), so it has not been that big a deal.
Does this happen to anybody else? Is there something I can do to fi...
I want to create a bundle from an arbitrary bundle identifier
e.g. com.apple.iokit.IOStorageFamily
It's not an unreasonable thing to do as bundle IDs are supposed
to be unique, however the obvious code does not work:
NSString* bID = @"com.apple.iokit.IOStorageFamily";
NSBundle* bundle = [NSBundle bundleWithIdentifier:bID];
This cod...
I have a Java Applet that uses AWT. In some (rare) circumstances, the platform does not refresh the screen properly. I can move or minimize/maximize the window and see that my applet refreshed properly. I am looking for code that will give me the fullest possible applet screen repaint, simulating the behaviour of a minimize/maximize.
I...
I'm trying to create a QTVR movie via QTKit, and I've got all the frames in the movie. However, setting the attributes necessary doesn't seem to be having any effect. For example:
NSNumber *val = [NSNumber numberWithBool:YES];
[fMovie setAttribute:val forKey:QTMovieIsInteractiveAttribute];
val = [NSNumber numberWithBool:NO];
[fMovie ...
I have two NSURLConnections. The second one depends on the content of the first, so handling the data received from the connection will be different for the two connections.
I'm just picking up Objective-C and I would like to know what the proper way to implement the delegates is.
Right now I'm using:
NSURL *url=[NSURL URLWithString...
What are those bad habits you've developed since you've started coding in Cocoa?
I think making a list of bad habits and actively adding to it and, more importantly, breaking those habits is a good technique to produce your code quality. So start now, get your bad habits off your chest. Maybe other people share your bad habits.
...
When used in an AIR app, some standard keystrokes in OS X are either ignored or produce "mystery" characters rather than behaving as expected. Examples:
option + left arrow should move the caret one word backward, it prints a mystery character
ctrl + h should delete one character backward, it prints h
How do I support OS X default ke...
Although I've been getting more and more familiar with Xcode while developing for the iPhone, there are times I just wished I had a better IDE, something like Eclipse.
So I was wondering does anyone know how to migrate iPhone projects to Eclipse, and if it's worth it?
...
I've Googled this in various ways, and there's no shortage of software to do it. Since this is something I'm unlikely ever to do again, I'd prefer a free solution, but I'm also willing to pay if the best solution requires it.
I'm a fairly skilled software developer in multiple languages, so if anyone knows of a library that will do it (...
I want to get other process' argv like ps.
I'm using Mac OS X 10.4.11 running on Intel or PowerPC.
First, I read code of ps and man kvm, then I wrote some C code.
#include <kvm.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/sysctl.h>
#include <paths.h>
int
main(void) {
char errbuf[1024];
kvm_t *kd ...
Objective-C is getting wider use due to its use by Apple for Mac OS X and iPhone development. What are some of your favourite "hidden" features of the Objective-C language?
One feature per answer.
Give an example and short description of the feature, not just a link to documentation.
Label the feature using a title as the first line.
...
For my side job as programmer, I need Windows. It will be installed in VMWare Fusion. I will be writnig mostly C-code for Matlab-Mex-files, some DSP-development, some easy command-line tools in C and C++ for a tutorial and hopefully some easy GUIs using Visual Studio.
I will be using VisualDSP++, Bloodshed Dev-Cpp, the Matlab mex-compile...
Who uses Macs for cross-platform development?
By cross platform I essentially mean you can compile to target Windows or Unix (not necessarily both at the same time). I understand that this also has a lot to do with writing portable code, but I am more interested in people's experience with Mac OS X to develop software.
I understand tha...
On Mac OS X I can’t enter a pound sterling sign (£) into the Python interactive shell.
* Mac OS X 10.5.5
* Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
* European keyboard (£ is shift-3)
When I type shift-3 in the Python interactive shell, I seem to invoke the previous word function, i.e. the cursor will move to the start of the l...
I'm looking around for a local code snippet storage solution for my Mac. I've run into a for-pay solution called "code collector", but I'm being cheap.
Sure, I could hack up a nest of scripts based around "grep", or maybe build a funky database solution, but I'd like someone else to take the work of said solutions. ;)
...
Hi All,
ColdFusion 8 Standard Edition on OS X Leopard.
Developing a new website.
What is the best database to use in conjunction with ColdFusion?
Will be storing simple Credit Card operations, registration information, CRM info for an indie software company
...
I'd like to log the call trace during certain points, like failed assertions, or uncaught exceptions.
UPDATE:
Thanks for the answers.. followup question... how do you do the same in a thread other than the main thread?
Neither method properly displayed the stack in such a case. The output is nonsensical wrt to the current context. Ho...
I have a class with the following member functions:
/// caller pid
virtual pid_t Pid() const = 0;
/// physical memory size in KB
virtual uint64_t Size() const = 0;
/// resident memory for this process
virtual uint64_t Rss() const = 0;
/// cpu used by this process
virtual double PercentCpu() const = 0;
/// memory used by this p...
What is the simplest way of copying symbolic links on the Mac?
A python or perl solution would be preferred, but any solution would be a help.
I am copying frameworks for an installation package, and need the links to be maintained
...