sed -e 's/ *-\{0,1\},\{0,1\} *[Pp][Aa]\{0,1\}[Rr]\{0,1\}[Tt].\{0,1\} *\([0-9]\{1,\}\) *$/ (\1)/'
I'm piping titles through this from an iTunes AppleScript. This should convert any title with a Part designation at the end to a parenthetical format
For instance, Best of Both Worlds, Part 2 becomes Best of Both Worlds (2).
The trouble r...
Hi all.
Is their any apple sample code to implement coverflow in MacOS. Apple core animation documentation shows example of coverflow. But I could not find related sample code. Parden me if I overlooked.
-Thanks in advance
shakthi
...
My goal is to make it so that links clicked on one osx machine are loaded into safari on a remote computer with apple events enabled. To do this, I am trying to create an applescript application which i then make the default browser on the system.
My applescript looks like this:
on run argv
set theurl to item 1 of argv
set dest...
How to do "sudo apt-get install " on OSX?
...
Hey Guys,
I am trying to use the ASIHTTPRequest libraries to simulate a form post and gather the resulting cookies; however, when I am running the post, I get an error. I have traced through the request and narrowed it down to a NSPOSIXErrorDomain error. The site I am trying to connect too is an HTTPS: site and this error makes me th...
I've got a webserver that I'm presently benchmarking for CPU usage. What I'm doing is essentially running one process to slam the server with requests, then running the following bash script to determine the CPU usage:
#! /bin/bash
for (( ;; ))
do
echo "`python -c 'import time; print time.time()'`, `ps -p $1 -o '%cpu' | grep -vi ...
I am using a NSSearchField to run a query over the internet and display the results in a table view. Whilst the query is running I would like to display a progress indicator inside an NSSearchField? I think I have seen this done in another application before.
Is there an open source component that I could use to accomplish this?
How wo...
We want to validate file paths, e.g. foo/bar, which the user can enter. Is it possible to create files with leading or trailing space on OS X or Linux, e.g. foo/ bar /bazz?
...
Hi All,
I have a BATCH File script on a Windows machine that consists of the following line:
c:\R\bin\Rscript.exe "c:\Users\user\Documents\Shares.R"
I want to do the same thing but using Mac OS X at the moment I am using Automator => Run Shell Script and the following line:
open "/usr/bin/Rscript" "/Users/usr/Documents/Shares.R"
...
Hey,
What's the equivalent to Windows's VirtualAlloc in OS X? That is, how can i reserve a contiguous address space without actually commiting it and then commit chunks of it later?
Thanks,
Alex
...
I recently installed jEdit on my Mac OS 10.6 system. I would like to be able to run jEdit in the terminal as I would emacs, i.e. 'emacs FILE.NAME'. My plan was to write a script jedit.sh containing...
touch $1
open -a /Applications/jEdit.app $1
...where the argument is the filename. Strangely, jEdit is opened but only with the default...
I'm writing an app that needs to work in both 10.5 and 10.6 (We still have PPC machines). My development machine is 10.6.4 with Xcode 3.2.3, and I have a 10.5.8 machine with Xcode 3.1.2 on it.
I use remote debugging to test out the app on the 10.5.8 machine, and I've run into a problem with a Drag and Drop method that only occurs when r...
How can I slow down an audio file (for playback only) on Mac OS X, but preserve good quality? I tried using QTKit to slow down audio but the quality is bad.
Edit: I'm using this code:
QTMovie *audio = [[QTMovie alloc] initWithFile:mediaClipURL error:&error];
// ... (error handling)
[audio setRate:0.5];
...
I'm going to develop mostly Django sites on a MacBook Pro and would like to use Ubuntu VMs for testing purposes.
Which product is better suited for this purpose?
Can I connect to the VM via TCP/IP (so I can have apache running on the VM and access it from Safari on my MBP)?
Thanks!
...
Is there a way to create a transparent panel as described by the Apple Human Interface Guidelines in Qt 4.6 (built for OS X 10.6/Cocoa)?
If not, are there any alternatives similar in look and function?
I understand that Qt is a cross platform toolkit, but I want my application to feel as »native« as possible…
...
I want to sort the words on lines in a file line by line and I want the ouptut to be lines with the words sorted alphabetically.
for example:
queue list word letter gum
another line of example words
...
I want the output to be:
gum letter list queue word
another example line of words
...
I can't seem to get it to wo...
Mac OSX has this feature called (I think) 'Services'. It is available in the menu bar under the filename of the application (e.g. Finder) and then selecting 'Services'. This gives you access to a list of applications that provide 'services'. For example, if you are browsing a website with firefox and you have some text selected on the pa...
Hi, I want to write a little vnc similar program that moves the Mac OS cursor to a position (x, y) given through a protocol which gets data from Bonjour service. The problem is that I don't know how to move the cursor!
I'm working with Cocoa.
Thanks for help!
...
I'm working with launchd to run some automated tasks, and I was wondering what the difference is between 'Day' and 'Weekday'.
According to http://discussions.apple.com/thread.jspa?threadID=1361809 there is a 'subtle' difference that can cause launchd to misbehave.
Ultimately, I'd like to have a plist that runs every weekday (Mon - Fri...
I am trying to obtain the absolute path to the currently running script on OS X.
I saw many replies going for readlink -f $0. However since OS X's readlink is the same as BSD's, it just doesn't work (it works with GNU's version).
Any suggestions for an out of the box solution to this?
...