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
use PDF::API2; | |
my $filePath = 'example.pdf'; | |
my $scale = 0.82; # Scale 82% | |
my ($x,$y) = (-13,113); # Coordinates | |
my $old_pdf = PDF::API2->open($filePath); # Open existing PDF file | |
my $pdf = PDF::API2->new(); # Open empty new PDF Document | |
my $page = $pdf->page(); | |
my $gfx = $page->gfx(); |
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 | |
class Search extends SearchCore{ | |
public static function find($id_lang, $expr, $page_number = 1, $page_size = 16, $order_by = 'quantity', | |
$order_way = 'desc', $ajax = false, $use_cookie = true, Context $context = null) | |
{ | |
if (!$context) { | |
$context = Context::getContext(); | |
} |
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
// replace this function in modules/blocklayered/blocklayered.php | |
private static function getId_featureFilterSubQuery($filter_value, $ignore_join = false) | |
{ | |
if (empty($filter_value)) | |
return array(); | |
$query_filters = ' AND EXISTS (SELECT * FROM '._DB_PREFIX_.'feature_product fp WHERE fp.id_product = p.id_product AND ('; | |
foreach ($filter_value as $filter_val){ | |
$query_filters .= 'fp.`id_feature_value` = '.(int)$filter_val.' OR '; | |
} | |
$query_filters = rtrim($query_filters, 'OR ').') '; |
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
use utf8; | |
use Encode qw(decode encode); | |
# Source code should be saved in UTF-8 encoding | |
my $sting = 'ąćźłóżęĄĆŹŁÓŻĘ'; | |
my $nonUTF = encode("UTF-8", $sting); | |
my $filters = { |
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
sub keyboard{ | |
# init by : keyboard(\$mw->Frame()->pack(-side => 'bottom', -anchor => 'se')); | |
my $ref = shift; | |
my @numbersArray = ([(7..9)],[(4..6)],[(1..3)]); | |
my $keyboardFont = $$ref->Font(-size => 18); | |
my $keyboardFrame = $$ref->Frame(-padx => 10, -pady => 10)->pack( -fill => 'y', -expand => 1); | |
my $keyboardLeft = $keyboardFrame->Frame()->pack(-side => 'left'); | |
my $keyboardRight = $keyboardFrame->Frame->pack(-side => 'right', -anchor => 'ne', -fill => 'both', -expand => 1); | |
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
use Data::Dumper; | |
# usage: perl varcount.pl source.pl | |
open(X,$ARGV[0]); | |
my @lines = <X>; | |
close(X); | |
my $lineCount = 1; | |
my $variables = {}; | |
foreach my $line (@lines){ |
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
POWER: 0x04fb 0x4ab5 | |
MUTE: 0x04fb 0xca35 | |
SOURCE: 0x04fb 0x02fd | |
EPG: 0x04fb 0xea15 | |
EXIT: 0x04fb 0x50af | |
FAVOURITE: 0x04fb 0x58a7 | |
TIMER: 0x04fb 0x728d | |
^: 0x04fb 0xe21d |
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
<irplus> | |
<device manufacturer="MANTA" model="3204" columns="12" format="WINLIRC_NEC1" bits="16" pre-bits="16"> | |
<button label="" labelSize="25.0" span="4" backgroundColor="FFC84334">0x04fb 0x4ab5</button> | |
<button label="󿖁" labelSize="25.0" span="4">0x04fb 0xca35</button> | |
<button label="TV/AV" labelSize="18.0" span="4">0x04fb 0x02fd</button> | |
<button label="EPG" labelSize="18.0" span="4">0x04fb 0xea15</button> | |
<button label="P+" labelSize="18.0" span="4">0x04fb 0x40bf</button> | |
<button label="EXIT" labelSize="18.0" span="4">0x04fb 0x50af</button> |
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
POWER: 0x0538 0xBC81 | |
VOL-: 0x0500 0x8481 | |
VOL+: 0x0500 0x0401 | |
AUX: 0x0500 0x595C | |
AUTO OFF: 0x0538 0x1924 | |
SLEEP: 0x0538 0x6954 | |
MUTING: 0x0500 0x4C49 | |
DISK: 0x0550 0x2570 | |
>=10: 0x0538 0x211C |
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
var http = require('http'); | |
var httpProxy = require('http-proxy'); | |
var body = require("body"); | |
var proxy = httpProxy.createProxyServer({secure:false}); | |
proxy.on('proxyReq', (proxyReq, req) => { | |
if (req.body) { | |
console.log(req.body); | |
proxyReq.setHeader('Content-Length', Buffer.byteLength(req.body)); | |
proxyReq.write(req.body); |
OlderNewer