- A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
- lengths are in any unit (ex: pixels)
- code snippets are in JavaScript
angleRad = angleDeg * Math.PI / 180;
services: | |
memos: | |
image: neosmemo/memos:stable | |
container_name: memos | |
volumes: | |
- memos:/var/opt/memos | |
environment: | |
- SERVICE_FQDN_MEMOS_5230 |
Take note that you can use this approach to move the /var/lib/docker
directory to another disk or partition.
Just make sure you create the destination directory in this new disk or partition.
sudo systemctl stop docker
{
function mysite_pending($order_id) { | |
error_log("$order_id set to PENDING", 0); | |
} | |
function mysite_failed($order_id) { | |
error_log("$order_id set to FAILED", 0); | |
} | |
function mysite_hold($order_id) { | |
error_log("$order_id set to ON HOLD", 0); | |
} | |
function mysite_processing($order_id) { |
We want to upload file to a server with POST HTTP request. We will use curl functions.
// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");
// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");
//Here's an eye catching example to get your visitors back when your web page tab is not active within the browser (onblur). This script will animate the original title text with an intro, the original title text is restored when the tab is returned to active state (focus). When the tab is clicked the original page title is restored. For social media sharing it is highly recommended to include the original page title text with the prefaced animated text (onblur). | |
//Created by SHEmedia.us | |
window.jQuery(function($) { | |
var origTitle, animatedTitle, timer; | |
function animateTitle(newTitle) { | |
var currentState = false; | |
origTitle = document.title; // save original title |
<?php | |
/* | |
* Create order dynamically | |
*/ | |
add_action( 'woocommerce_before_checkout_form', 'create_order' ); | |
function create_order() { | |
global $woocommerce; | |
<?php PRECISO QUE TENHA:FOTO/NUMERO DE CURTIDA / NUMERO DE COMENTARIO / DESCRICAO ?> | |
<?php | |
//SHORTCODE INSTAGRAM | |
add_filter( 'wpis_default_shortcode_attributes', 'custom_wpis_instagram_access_token' ); | |
function custom_wpis_instagram_access_token ( $atts ) { | |
$atts['token'] = '2195092261.1677ed0.f7e6b044cdc54b859d0f9413e0e404c6'; | |
return $atts; | |
} |
<?php | |
$cart = WC()->cart; | |
$weigth_unit = 'kg'; | |
$items = sprintf( _n( '%d item', '%d items', $cart->get_cart_contents_count() ), $cart->get_cart_contents_count() ); | |
$weight = wc_get_weight( $cart->get_cart_contents_weight(), $weigth_unit ) . $weigth_unit; | |
$total = $cart->get_cart_total(); | |
?> | |
<a class="cart-contents" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"> | |
<?php echo "$items - $weight - $total"; ?> | |
</a> |
define("PV_ATTRIBUTE", "vendor"); | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
/** | |
* Check if WooCommerce is active | |
*/ | |
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
if ( ! class_exists( 'TH_Shipping_Options' ) ) { | |
class TH_Shipping_Options { | |
/** |