使用本指令碼即代表你同意本免責聲明。
本指令碼用於繞過臺灣電子書與教學工具的前端驗證,達成不需要教師帳號即可使用。
使用本指令碼即代表你同意本免責聲明。
本指令碼用於繞過臺灣電子書與教學工具的前端驗證,達成不需要教師帳號即可使用。
{% if certificate and certificate_id > 0 -%} | |
{% if ssl_forced == 1 or ssl_forced == true %} | |
{% if hsts_enabled == 1 or hsts_enabled == true %} | |
# HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years) | |
add_header Strict-Transport-Security "max-age=63072000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload" always; | |
add_header Referrer-Policy strict-origin-when-cross-origin; | |
add_header X-Content-Type-Options nosniff; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header X-Frame-Options SAMEORIGIN; | |
add_header Content-Security-Policy upgrade-insecure-requests; |
#!/usr/bin/env python3 | |
# Download your data dump and place this file in the "messages" folder of your data dump. | |
# Run it using python | |
from datetime import datetime, timedelta, timezone | |
import dateutil.parser | |
import matplotlib.pyplot as plt | |
import matplotlib.ticker as ticker | |
import matplotlib.dates as mdates | |
import csv |
#!/usr/bin/env python | |
import SimpleHTTPServer | |
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def end_headers(self): | |
self.send_my_headers() | |
SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self) | |
def send_my_headers(self): | |
self.send_header("Cache-Control", "no-cache, no-store, must-revalidate") |
/// This | |
unsafe { | |
ffmpeg::av_register_all(); | |
// This portion of code was written by taking as resource: http://dranger.com/ffmpeg/tutorial01.html | |
// This article is outdated, and some APIs got deprecated, here I used the non deprecated version. | |
// | |
// The idea of FFmpeg is to | |
// 1. open the file |
''' | |
A simple animation function to animate collective movement of flocks, given trajectory data. | |
(c) Arshed Nabeel, 2024 | |
''' | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import animation |
import numpy as np | |
from tqdm import trange | |
def get_neighbour_matrix(x, L, R): | |
dx = np.subtract.outer(x[:, 0], x[:, 0]) | |
dy = np.subtract.outer(x[:, 1], x[:, 1]) | |
dx[dx > (L / 2) ** 2] -= (L / 2) ** 2 | |
dy[dy > (L / 2) ** 2] -= (L / 2) ** 2 | |
pair_dist = dx ** 2 + dy ** 2 |
# ---------- Status Cats Error Pages!!! via: https://http.cat/ --------- | |
# | |
# requires that a dns resolver be set for nginx as in: resolver 127.0.0.1; | |
# typically uses dnsmasq for 127.0.0.1 resolver | |
# | |
# Usage: | |
# place this file somewhere accessible to nginx. /etc/nginx/snippets is a decent choice. | |
# then inside the server block(s) you want cat themed error status responses do: | |
# include snippets/http-cat-error-pages.conf | |
# |
<?php | |
# SHORTS | |
# DIRECTORY SEPARATOR | |
define( 'DS', DIRECTORY_SEPARATOR ); | |
# PATH SEPARATOR | |
define( 'PS', PATH_SEPARATOR ); | |
# Absolute path to the WordPress directory. | |
! defined( 'ABSPATH' ) | |
AND define( 'ABSPATH', dirname( __FILE__ ).DS ); |
긴 자료형에서 타이핑/가독성 이득을 보고, 변수명을 뚜렷하게 네이밍하고 var 사용하는 방식을 채택하는게 좋다.
다만, 내장 숫자 타입(int, float, double 등)을 선언할 때는 명시적으로 타입을 선언하는 편이 낫다.
런타임 상수는 컴파일 상수보다 성능이 약간 떨어지지만 유연성이 높고, 어셈블리를 재컴파일을 하지않아도 된다.
static readonly로 사용 시, 인스턴스 별로 다른 값을 갖을 수 있다. 생성자에서 정의할 수 있기 때문이다.
다만, 컴파일할 때 사용되는 상숫값을 정의할 때는 const를 사용한다. 특성의 매개변수, switch/case 문의 레이블, enum 정의 시 사용하는 상수등.