This file contains 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
<canvas id="myCanvas"> </canvas> | |
<script> | |
let img = new (window as any).Image(); | |
img.crossOrigin = `Anonymous`; | |
img.src = "https://images.unsplash.com/photo-1667461143891-d52ffd5500f5"; | |
img.onload = function () { | |
canvas = document.getElementById("myCanvas") as HTMLCanvasElement; |
This file contains 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
/** | |
* Get a list of the top selling products on a Drupal Commerce site | |
* If you have different product types - add them to the in list. | |
* Based on https://drupal.org/node/1292104#comment-6866420 by tmsimont https://drupal.org/user/566678 | |
*/ | |
SELECT node.title AS product_title, node.nid AS product_nid, COUNT(cp.title) AS order_count | |
FROM commerce_order | |
LEFT JOIN field_data_commerce_line_items as fdcli ON commerce_order.order_id = fdcli.entity_id AND (fdcli.entity_type = 'commerce_order' AND fdcli.deleted = '0') | |
INNER JOIN commerce_line_item as cli ON fdcli.commerce_line_items_line_item_id = cli.line_item_id |
This file contains 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 | |
/* | |
KOIVI HTML Form to FDF Parser for PHP (C) 2004 Justin Koivisto | |
Version 1.1 | |
Last Modified: 2010-02-17 | |
This library is free software; you can redistribute it and/or modify it | |
under the terms of the GNU Lesser General Public License as published by | |
the Free Software Foundation; either version 2.1 of the License, or (at | |
your option) any later version. |