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 | |
function to_unicode($text) { | |
$str = preg_replace_callback( | |
"%(?:\xF0[\x90-\xBF][\x80-\xBF]{2} | [\xF1-\xF3][\x80-\xBF]{3} | \xF4[\x80-\x8F][\x80-\xBF]{2})%xs", | |
function($emoji){ | |
$emojiStr = mb_convert_encoding($emoji[0], 'UTF-32', 'UTF-8'); | |
return preg_replace("/^[0]+/","&#x",bin2hex($emojiStr) . ';'); | |
}, | |
$text | |
); |
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
import logging | |
import telegram | |
from telegram.error import NetworkError, Unauthorized | |
from telegram.ext import Updater, CommandHandler | |
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', | |
level=logging.INFO) | |
logger = logging.getLogger(__name__) | |
def start(update, context): |
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
<meta charset="utf-8" /> | |
<?php | |
require "standalone.php"; | |
$file_name = 'files/filesToImport/import.xml'; | |
$root_category_id = 2; | |
$category_type_id = \umiHierarchyTypesCollection::getInstance()->getTypeByName('catalog', 'category')->getId(); | |
$brand_type_id = 126; | |
$model_type_id = 127; |
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
SELECT DISTINCT COUNT(DISTINCT h.id) | |
FROM cms3_hierarchy h, cms3_object_types t, cms3_permissions p, cms3_objects o | |
LEFT JOIN cms3_object_content oc_674_lj ON oc_674_lj.obj_id=o.id AND oc_674_lj.field_id = '674' | |
WHERE o.type_id IN (123, 124, 125, 126, 132) AND | |
t.id = o.type_id AND | |
h.type_id IN (55) AND | |
(oc_674_lj.varchar_val IN()) AND | |
h.domain_id = '7' AND | |
h.lang_id = '1' AND | |
h.is_deleted = '0' AND |
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 | |
require "standalone.php"; | |
$file_name = 'files/filesToImport/sgimport.xml'; | |
$reader = new XMLReader(); | |
$reader->open($file_name); | |
$doc = new DOMDocument(); |
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
ver@localhost ~ $ emerge --info | |
!!! Directory initialization failed: '/var/cache/edb' | |
!!! chown('/var/cache/edb', -1, 1000) | |
!!! Directory initialization failed: '/var/lib/portage' | |
!!! chown('/var/lib/portage', -1, 1000) | |
Portage 2.3.13 (python 3.4.6-final-0, default/linux/amd64/17.0, gcc-7.3.0, glibc-2.26-r6, 4.4.52-gentoo x86_64) | |
================================================================= | |
System uname: Linux-4.4.52-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8200_@_2.66GHz-with-gentoo-2.4.1 | |
KiB Mem: 4048044 total, 1400324 free | |
KiB Swap: 1048572 total, 114912 free |
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
localhost ~ # emerge -avu qgis | |
These are the packages that would be merged, in order: | |
Calculating dependencies... done! | |
[ebuild N ] dev-db/spatialite-4.3.0a::gentoo USE="geos iconv proj xls xml {-test}" 4 337 KiB | |
[ebuild NS ] net-libs/libsrtp-1.6.0:0/1::gentoo [2.1.0:2/1::gentoo] USE="-aesicm -console -debug -doc -libressl -openssl -static-libs -syslog {-test}" ABI_X86="(64) -32 (-x32)" 1 611 KiB | |
[ebuild U ] dev-python/setuptools-38.5.1::gentoo [36.5.0::gentoo] USE="{-test}" PYTHON_TARGETS="python2_7 python3_5* -pypy -pypy3 -python3_4* -python3_6" 721 KiB | |
[ebuild U ] dev-python/certifi-2017.11.5::gentoo [2017.7.27.1::gentoo] PYTHON_TARGETS="python2_7 python3_5* -pypy -pypy3 -python3_4* -python3_6" 322 KiB | |
[ebuild N ] dev-util/meson-0.45.1::gentoo PYTHON_TARGETS="python3_5 -python3_6" 1 137 KiB |
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
<?xml version="1.0"?> | |
<xsl:stylesheet version="1.0"> | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="udata[@module = 'content' and @method = 'menu']"> | |
<ul> | |
<xsl:apply-templates select="items/item" /> | |
</ul> | |
</xsl:template> | |
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
<div class="sppb-addon sppb-addon-ajax-contact "> | |
<div class="sppb-addon-content"> | |
<form class="sppb-ajaxt-contact-form"> | |
<div class="sppb-form-group input"> | |
<input type="text" name="name" class="input-field sppb-form-control" id="input-name" required="required" /> | |
<label class="input-label" for="input-name"> | |
<span class="input-label-content">Name</span> | |
</label> | |
</div> | |
<div class="sppb-form-group input"> |
NewerOlder