This algorithm returns the points that form an orthogonal path between two rectangles.
// Define shapes
const shapeA = {left: 50, top: 50, width: 100, height: 100};
const shapeB = {left: 200, top: 200, width: 50, height: 100};This algorithm returns the points that form an orthogonal path between two rectangles.
// Define shapes
const shapeA = {left: 50, top: 50, width: 100, height: 100};
const shapeB = {left: 200, top: 200, width: 50, height: 100};| public static class EventUtil | |
| { | |
| // The repetition in here is because of the four combinations of handlers (sync/async * with/without arg) | |
| public static Action AsNonRenderingEventHandler(Action callback) | |
| => new SyncReceiver(callback).Invoke; | |
| public static Action<TValue> AsNonRenderingEventHandler<TValue>(Action<TValue> callback) | |
| => new SyncReceiver<TValue>(callback).Invoke; | |
| public static Func<Task> AsNonRenderingEventHandler(Func<Task> callback) | |
| => new AsyncReceiver(callback).Invoke; | |
| public static Func<TValue, Task> AsNonRenderingEventHandler<TValue>(Func<TValue, Task> callback) |
Update the installed packages.
yum update
Install the EPEL repository.
# CentOS/RHEL 6
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
| # Author: Zameer Ansari | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # http://wiki.nginx.org/Pitfalls | |
| # http://wiki.nginx.org/QuickStart | |
| # http://wiki.nginx.org/Configuration | |
| # | |
| # Generally, you will want to move this file somewhere, and start with a clean | |
| # file but keep this around for reference. Or just disable in sites-enabled. | |
| # |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server ipv6only=on; | |
| listen 443 ssl; | |
| root /var/www/lumen/public; | |
| index index.php index.html index.htm; | |
| server_name server_domain_or_IP; |
| /* | |
| For some reason, the change() event only fires when the input field loses focus. | |
| Binding to other options ('change keypress paste focus textInput input') will | |
| fire the event several times, which is bad. The below code works even when | |
| content is pasted into the text field, and only fires once as expected. | |
| */ | |
| $('#search-form .term').bind('input', function(){ | |
| console.log('this actually works'); | |
| }); |