stream {
upstream reality {
server ;
}
upstream other {
server 127.0.0.1:8443;
}
upstream nginx {
server 127.0.0.1:8443;
}
map_hash_bucket_size 128;
map $ssl_preread_server_name $upstream {
reality;
default other;
}
server {
listen 443;
proxy_pass $upstream;
proxy_protocol on;
ssl_preread on;
}
}
function dayofweek(d, m, y)
{
let t = [ 0, 0,0,0,0,0,0,0,0,0,0,0];
y -= (m < 3) ? 1 : 0;
return ( y + y/5- y/100 + y/500 + t[m-1] + d) % 7;
}
let days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
let day = dayofweek (01, 01, 1000);
let weekday = Math.round(day);
if (weekday == 1) {
newweekday = days[0];
}else if (weekday == 2){
newweekday = days[1];
}else if (weekday == 3){
newweekday = days[2];
}else if (weekday == 4){
newweekday = days[3];
}else if (weekday == 5){
newweekday = days[4];
}else if (weekday == 6){
newweekday = days[5];
}else if (weekday == 7){
newweekday = days[6];
}
console.log(newweekday);
<div class='shape'></div>
.shape {
position: relative;
height: 100px;
width: 100px;
overflow: hidden;
}
.shape:after {
position: absolute;
content: '';
height: calc(100% * 1.414); /* using Pythogras theorem */
width: calc(100% * 1.414); /* using Pythogras theorem */
transform: rotate(-45deg);
transform-origin: left top;
background: blue;
transition: all 1s;
}
.shape:hover:after {
transform: rotate(0deg);
}
var myVar = setInterval(function() {
nowtrack()
}, 1000);
function nowtrack() {
$(document).ready(function() {
$.getJSON('https://www.site.ru/xml/json.txt', {}, function(json) {
$('#nowtrack').html('');
$('#nowtrack').append('<div class="artist">' + json.artist + '</div >')
$('#nowtrack').append('<div class="title">' + json.title + '</div >')
$('#nowtrack').append('<img src="' + json.image600 + '" style="width: 250px;";>')
});
});
}
+ jQuery.3.3.1<div id="nowtrack">
</div>
$me = curl_init();
curl_setopt($me, CURLOPT_URL, "https://graph.facebook.com/v2.5/{COMMUNITY_ID}/posts/?fields=description,full_picture,message&format=json&access_token={ACCESS_TOKEN}&limit=25");
curl_setopt($me, CURLOPT_RETURNTRANSFER, true);
$curl = json_decode(curl_exec($me), true);
$data = $curl['data'];
static $id = 0;
while ($id <= 15) {
echo ' <h1>' . $data[$id]["message"] . '</h1>';
$id--;
}
?>
Второй вариант: