jQuery: jquery-tmpl nje, get string from template
September 3rd, 2010 by jeremychone | No Comments »var tmplFn = $( "#myXmlTmpl" ).template();
var xml = tmplFn($,{data:myData}).join("");
var tmplFn = $( "#myXmlTmpl" ).template();
var xml = tmplFn($,{data:myData}).join("");
var fullElementHtml = $('#myElement')[0].outerHTML;
//or, the same
fullElementHtml = $('#myElement').attr("outerHTML");
1) Download Mod_JK
2) Copy it in the /etc/httpd/module as jk_module.so
3) Add the following in the /etc/httpd/httpd.conf
LoadModule jk_module modules/mod_jk.so JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info
4) Have the following in workers.properties
worker.list=workerD,worker81 #workerD (default) 8080 worker.workerD.type=ajp13 worker.workerD.host=localhost worker.workerD.port=8009 worker.worker81.type=ajp13 worker.worker81.host=localhost worker.worker81.port=8109
Source: BenODwyer
Creating a “Group” in XCode doesn’t create a real Directory within your app Bundle.
You need to import the directory into your app using the following method:
Create a Directory on your Mac.
Select to Add Existing Files to your project
Select the Directory you want to import
In the pop-up window make sure you select “Copy items into destination group’s folder” and “Create Folder References for any added folders”
Hit “Add”
Your done!
The Directory should appear blue instead of yellow.
Now try your code:
Code
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"w1" ofType:@"geo" inDirectory:@"part1"];
To set the hostname of your Mac, do:
sudo scutil --set HostName myhostname.local
To check your hostname:
hostname
Source: Change the hostname in a Mac
This is particularly useful when using perforce from different location. Perforce link a hostname to a workspace, and OSX seems to take the hostname based on the network (in some occasions). So, you can end up with an error like:
Client ‘jeremy_MBPro_4′ can only be used from host ‘dyn105.sm1.corp.agkn.net’.
in the home folder (~), edit (or create) the .profile file with the following
# Set git autocompletion and PS1 integration
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
. /usr/local/git/contrib/completion/git-completion.bash
fi
GIT_PS1_SHOWDIRTYSTATE=true
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '