I have the following code:
if ( ( m_mainSocket = ::socket( PF_INET, SOCK_STREAM, IPPROTO_TCP ) ) < 0 )
{
throw Exception( __FILE__, __LINE__ ) << "Unable to create socket";
}
int on( 0 );
if ( setsockopt( m_mainSocket, SOL_SOCKET, SO_REUSEADDR, &on, sizeof( on ) ) )
{
throw Exception( __FILE__, __LINE__ ) << "Can't make server...
I've tried class-dump ( http://www.codethecode.com/projects/class-dump/ ) and class-dump-x ( http://iphone.freecoder.org/classdump_en.html ), but neither works on /System/Library/PrivateFrameworks/CoreSymbolication.framework on Snow Leopard (OSX 10.6.2). Are there are any other
ways to retrieve the headers for this framework?
...
I have a working setup, where all files are in the same directory (Desktop). The Terminal output is like so:
$ gcc -c mymath.c
$ ar r mymath.a mymath.o
ar: creating archive mymath.a
$ ranlib mymath.a
$ gcc test.c mymath.a -o test
$ ./test
Hello World!
3.14
1.77
10.20
The files:
mymath.c:
float mysqrt(float n) {
return 10.2;
}
te...
If so, where is this documented?
Thanks!
...
Ok - I am writing a daemon in Objective C that checks the connected router mac address every 5 seconds.
I am completely new to objective C, and I am looking for a better way to do what I'm already doing.
I'm currently calling "arp -a" and parsing the results via "Task":
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath...
I want to install Ruby SVM. I already have macports with normal settings, and installed libsvm via port just fine. But when I go to compile rubysvm, it barfs. :(
Ruby SVM: http://rubysvm.cilibrar.com/download/ (most links are 404 though)
libsvm: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
Try this:
sudo port install libsvm
wget http://d...
Hi,
I have two enities: path <-->>> node. (one to many)
In nodes ArrayController I override -DeleteObjects: to remove path if the last node is removed.
Everything works perfect, but it's impossible to save edited document, because nodes are left in [ManagedObjectContext deletedObjcets]. It gives error on save. How to clean them up?
Bab...
I originally posted this question looking for an answer with using python, got some good help, but have still not been able to find a solution. I have a script running on OS X 10.5 client machines that captures internet browsing history (required as part of my sys admin duties in a US public school). Firefox 3.x stores history in a sqlit...
We use MySQL server 5.1.43 64-bit edition. InnoDB is used as engine.
We have a sql script which we execute every time we build the application.
On ubuntu machine with MySQL server and InnoDB engine it takes about 55 seconds to complete the execution.
If I run the same script on OSX, it takes close to 3 minutes!
Any ideas why OSX is s...
Are there any frameworks for say, putting a display like in Terminal.app in MY app, and then displaying text on it like usual output to STDOUT? Complete with scrollback and etc.?
...
I have an NSToolbar set up in my app. It was created in IB. One of the toolbar items uses a spinner-style NSProgressIndicator as its view, the rest are images.
When the toolbar's customization sheet is showing, the spinner does not show in the sheet.
I initially thought that this was because the spinner's -displayedWhenStopped was set ...
For a while now, I've been noticing that my MacPorts-installed Apache2 instance hasn't been starting when I start up (http://stackoverflow.com/questions/2042992/macports-apache2-stopped-launching-on-boot). The LaunchDaemon is loaded. Today I bumped into something in a log file that may point to an answer, but I can't find any confirmatio...
It used to be that stdout went to the console log, displayed by Console.app. I've been having some problems with a firefox plugin (see other questions, sorry about the spam...) and I was trying to use printfs to at least see if I was STARTING my plugin.
I just noticed today that my console log hasn't been updated since January 6. (Yes,...
Hi Everyone,
I've been trying to follow this blog post to get my python version back to the snow leopard default. I have followed the first two steps without a problem but am lost when it comes to 3 and 4. I installed Python 2.6.4 but I assume the instructions are pretty similar. Thanks for your help!
...
In /usr/include ,
I tried grepping for GL gl and OpenGL .. .but can't find it.
Where are these header files located?
...
I'm finding an non-daemon, interactive-mode only, portable(moveable) FTP server for Mac OS X.
Like MAMP.
This will be used temporarily for local development only. Not for service.
Just file listing and serving(download) features required. Complex features like account management or SSL are not required.
This should be run as an UI appl...
Has anyone figured out how to change the keybindings for the meta and control keys for Conkeror on Mac OSX? For example, in Emacs I have my C mapped to the apple command key and my M mapped to the option key. Is there any way to do this for Conkeror? Can anyone supply the javascript for the .conkerorrc file?
...
I'm creating an object with:
NSMenu *appMainMenu = [[NSMenu alloc] initWithTitle:@"MyApp"];
(Ignore the fact I'm creating this menu programmatically and not using a Nib File. I understand the disadvantages of doing so)
The menu appears correctly in the menubar.
However, when I try to call any instance method such as:
[appMainMenu...
I know 'clear' command clears current screen, but the cleared contents just scrolled up.
Is there a way to clear all cleared buffer contents? I'm figuring this to prevent scrolling up on Terminal.
---(edit)---
I'm finding a way which can be used in shell script. Or program.
...
I want to copy a folder from my X-Serve RAID to an external HDD on an X-Serve. Both disks are on the same server, so copying is fairly easy. I use the ditto command:
ditto -rsrc /Volumes/WadXServeRaid/Users/ $destinationpath/Users/
However, I only want the copy to start if there is enough space on the destination disk. I know I can us...