This file contains hidden or 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
SET @rownumber = 0; | |
update projects set position = (@rownumber:=@rownumber+1) | |
order by title asc |
This file contains hidden or 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
<?php | |
$url = $_REQUEST["url"]; | |
$ch = curl_init(); | |
// Disable SSL verification | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
// Will return the response, if false it print the response | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
// Set the url |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div> | |
<canvas id = "canvasArea" width = "501" height = "501" style = "background: #fcfcfc;"> |
This file contains hidden or 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 swap(items, firstIndex, secondIndex){ | |
var temp = items[firstIndex]; | |
items[firstIndex] = items[secondIndex]; | |
items[secondIndex] = temp; | |
} | |
function partition(items, left, right) { | |
var pivot = items[Math.floor((right + left) / 2)], | |
i = left, |
This file contains hidden or 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 debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
var later = function() { | |
timeout = null; | |
if (!immediate) func.apply(context, args); | |
}; | |
var callNow = immediate && !timeout; | |
clearTimeout(timeout); |
This file contains hidden or 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 trigonometric = { | |
degToRad: function(degrees) { | |
return degrees * Math.PI / 180; | |
}, | |
radToDeg: function(radians) { | |
return radians * 180 / Math.PI; | |
}, | |
} |