Regex to reject an extension
If you want a regular expression to match anything except a certain extension (such as .png) : ^((?!\.png$).)*$
If you want a regular expression to match anything except a certain extension (such as .png) : ^((?!\.png$).)*$
You need to use Niutl to change your shell. In the terminal : $ sudo niutil -createprop . /users/dave shell /bin/zsh Alternatively, you can use the NetInfo Manager utility (in the Utilities folder). Select your user in the navigator, and change the value of the shell property. ...
A couple of useful array manipulation functions: clear, inArray and remove. Courtesy of Todd Ditchendorf ...
To colour-code a new extension ( .ctp CakePHP templates for example ), edit the file C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\Extensions.txt and add the .ctp extension to the first line ( All Documents ) and the PHP Files section : ...
If you are using CakePHP in conjunction with an existing PHP application, chances are you need to import the normal application’s session into cake. Create a file called session_import.php or something similar in your cake app/config directory with the following contents : ...
Edit : To avoid confusion, cake has quite a nice mechanism for defining multiple DBs already (the database.php file), and if you only want to define a finite set of DBs, this is not the way to do it. This method is only useful if you want to have multiple DBs with the same structure (a database for each customer, for example). ...
To replace all occurences of string1 in a file with string2 : $ sed -ri "s|string1|string2|" some_file.txt
Go to Project->Edit Active Target->Properties (Tab) and enter the filetypes that you want your dock icon to respond to : ...
Add this method to your NSWindowController : -(BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { return YES; }
If you’re trying to hide an NSTextView without success, be aware that setHidden only hides the NSTextView itself - it doesn’t hide the enclosing NSScrollView. Instead of doing this : [myTextView setHidden:YES]; you need to do : [[myTextView enclosingScrollView] setHidden:YES];