This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table border="1"> | |
<% for header in request.env.select {|k,v| k.match("^HTTP.*")} %> | |
<tr> | |
<td><%=header[0].split('_',2)[1]%></td><td><%=header[1]%></td> | |
</tr> | |
<% end %> | |
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To get all the elements starting with "jander" you should use: | |
$("[id^=jander]") | |
To get those that end with "jander" | |
$("[id$=jander]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ExhibitorList BoothID="164991"> | |
<BoothNumber>N1849</BoothNumber> | |
<CompanyID>407</CompanyID> | |
<CompanyNumber>166212</CompanyNumber> | |
</ExhibitorList> | |
SoapResponse = xmlParse(httpResponse.fileContent); | |
ResponseNodes = xmlSearch(SoapResponse, "//*[ local-name() = 'ExhibitorList' ]"); | |
for (i = 1; i lte arrayLen(ResponseNodes); i++) { | |
BoothNumber = ResponseNodes[i].BoothNumber; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allClients = []; | |
io.sockets.on('connection', function(socket) { | |
allClients.push(socket); | |
socket.on('disconnect', function() { | |
console.log('Got disconnect!'); | |
var i = allClients.indexOf(socket); | |
delete allClients[i]; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gg gg | |
"" "" | |
,gg, ,gg gg gg,gggg, gg ,ggggg, | |
""8b,dP" 88 I8P" "Yb 88 dP" "Y8ggg | |
,88" 88 I8' ,8i 88 i8' ,8I | |
,dP"Y8, _,88,_,I8 _ ,d8' d8b _,88,_,d8, ,d8' | |
dP" "Y888P""Y8PI8 YY88888P Y8P 8P""Y8P"Y8888P" | |
I8 | |
I8 wildcard DNS for everyone | |
"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$("#myForm").validate({ | |
rules: { | |
myDropDown:{ | |
required: function (element) { | |
if($("#myCheckbox").is(':checked')) | |
{ | |
var e = document.getElementById("myDropDown"); | |
if(e.options[e.selectedIndex].value=="") | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global merge.tool diffmerge | |
git config --global mergetool.diffmerge.cmd "diffmerge --merge --result=\$MERGED \$LOCAL \$BASE \$REMOTE" | |
git config --global mergetool.diffmerge.trustExitCode true | |
ln -s /Applications/DiffMerge.app/Contents/Resources/diffmerge.sh /usr/local/bin/diffmerge | |
git config --global mergetool.keepBackup false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var row = $("<tr></tr>"); | |
$.each(data, function(key, val) { | |
$('<td>'+val+'</td>').appendTo(row); | |
}); | |
$('#current_logged_in_users').append(row); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python -m SimpleHTTPServer 8888 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( document.body ).on( 'click', '.dropdown-menu li', function( event ) { | |
var $target = $( event.currentTarget ); | |
$target.closest( '.btn-group' ) | |
.find( '[data-bind="label"]' ).text( $target.text() ) | |
.end() | |
.children( '.dropdown-toggle' ).dropdown( 'toggle' ); | |
return false; |
NewerOlder