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
/* | |
* https://www.cs.cmu.edu/afs/cs/academic/class/15213-f99/www/class26/udpserver.c | |
* udpserver.c - A simple UDP echo server | |
* usage: udpserver <port> | |
*/ | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <unistd.h> | |
#include <stdlib.h> |
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
(function (angular) { | |
"use strict"; | |
modalDraggable.$inject = ['$window', '$document', '$interval', '$log']; | |
angular.module('apt.widgets') | |
.directive('modalDraggable', modalDraggable); | |
function modalDraggable($window, $document, $interval, $log) { | |
return function (scope, element) { | |
var startX = 0; |
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).ajaxComplete(function (event, xhr, ajaxOption) { | |
if (xhr.getResponseHeader('x-debug-token')) { | |
$.get(window.location.protocol + '//' + window.location.hostname + '/app_dev.php/_profiler/' + xhr.getResponseHeader('x-debug-token'), function (data, status, innerXhr) { | |
var toolbar = $(data).filter('.sf-toolbarreset'); | |
$('.sf-toolbarreset').remove(); | |
$('.sf-toolbar').append(toolbar); | |
}); | |
} | |
}); |