If you're shipping iOS apps,
and dream of the bucks you'll make,
you might think of "going native",
but Xcode's a big headache.
:: NOTE needs to be elevated | |
@set /p HTTP_PORT=Enter Port number [e.g. 10082]: | |
netsh http add urlacl url=http://*:%HTTP_PORT%/ user=everyone | |
netsh http add urlacl url=http://localhost:%HTTP_PORT%/ user=everyone | |
netsh http add urlacl url=http://%COMPUTERNAME%:%HTTP_PORT%/ user=everyone | |
netsh http add urlacl url=http://%COMPUTERNAME%.local:%HTTP_PORT%/ user=everyone | |
@pause |
;(function($){ | |
var touch = {}, | |
touchTimeout, tapTimeout, swipeTimeout, | |
longTapDelay = 750, longTapTimeout | |
function parentIfText(node) { | |
return 'tagName' in node ? node : node.parentNode | |
} | |
function swipeDirection(x1, x2, y1, y2) { |
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open mobile safari | |
echo Open mobile safari on emulator and press return | |
read | |
# Plug debug to MobileSafari.app |
Update: The original post on Netmag has been updated since this was written.
This is a response to an article posted on Net Magazine earlier this week that offers optimization tips for those writing JavaScript. Generally, these performance-related articles are inaccurate and harmful to new Front-End Developers trying to understand the craft -- there are many other things you should do to improve a page's performance before worrying about the purported perf hit of multiplication vs. division -- while the intention of this post may have been to inform and educate it did the opposite: it offered inaccurate advice.
A few of us have taken the time to assemble a list of corrections in the hope that Net Magazine will update the article and avoid lead
buttonifyAndHide = function($obj) { | |
$obj.button().hide(); | |
}; |
/* | |
* Full example here: http://jsfiddle.net/jboesch26/3SKsL/1/ | |
*/ | |
$.fn.outerHTML = function(){ | |
// IE, Chrome & Safari will comply with the non-standard outerHTML, all others (FF) will have a fall-back for cloning | |
return (!this.length) ? this : (this[0].outerHTML || ( | |
function(el){ | |
var div = document.createElement('div'); |
$('form.section_edit_form').live('submit', function () { | |
var section_id = $(this).parent().attr('id').split("_")[1]; | |
$.ajax({ | |
url: "/wiki/ajax/section_edit/?section_id=" + section_id, | |
type: "POST", | |
data: $(this).serialize(), | |
success: function(data) { | |
$(this).parent().html(data); | |
} |
$('form.section_edit_form').live('submit', function () { | |
var section_id = $(this).parent().attr('id').split("_")[1]; | |
$.ajax({ | |
url: "/wiki/ajax/section_edit/?section_id=" + section_id, | |
type: "POST", | |
data: $(this).serialize(), | |
success: function(data) { | |
$(this).parent().html(data); | |
} |
$('form.section_edit_form').live('submit', function () { | |
var section_id = $(this).parent().attr('id').split("_")[1]; | |
$.ajax({ | |
url: "/wiki/ajax/section_edit/?section_id=" + section_id, | |
type: "POST", | |
data: $(this).serialize(), | |
success: function(data) { | |
$(this).parent().html(data); | |
} |