text 创建和保存客户属性

创建和保存客户属性

customer-attribute-create-save
## Create attribute
```php
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
	{
	    $setup->startSetup();

        if (version_compare($context->getVersion(), '0.1.1') < 0)
        {
            $customerSetup = $this->_customerSetupFactory->create(['setup' => $setup]);

            $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
            $attributeSetId = $customerEntity->getDefaultAttributeSetId();

            /**@var $attributeSet AttributeSet */
            $attributeSet = $this->_attributeSetFactory->create();
            $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

            $customerSetup->addAttribute(Customer::ENTITY, 'sp_id', [
                'type' => 'varchar',
                'label' => 'SiemprePago Id',
                'input' => 'text',
                'required' => 0,
                'visible' => 1,
                'user_defined' => 0,
                'sort_order' => 200,
                'position' => 150,
                'system' => 0,
                'is_used_in_grid' => false,
                'is_visible_in_grid' => false,
                'is_filterable_in_grid' => false,
                'is_searchable_in_grid' => false
            ]);

            $attributeSpId = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'sp_id');
            $attributeSpId->addData([
                    'attribute_set_id' => $attributeSetId,
                    'attribute_group_id' => $attributeGroupId,
                    'used_in_forms' => [
                        'adminhtml_customer'
                    ]
                ])->save();
        }

        $setup->endSetup();
	}
```

## Save attribute by script

```php
/** @var \Magento\Customer\Model\ResourceModel\Customer $customerResource */
$customerResource = $this->_objectManager->create('Magento\Customer\Model\ResourceModel\Customer');
$customerFactory = $this->_objectManager->create('Magento\Customer\Model\CustomerFactory');
/** @var \Magento\Customer\Model\Customer $customer */
$customer = $customerFactory->create();
$customerResource->load($customer,4);

$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('sp_id', '1462');
$customerData->setCustomAttribute('cellphone', '091919190');
$customer->updateData($customerData);

$customerResource->save($customer);
```

text Añadir支持una扩展

anyadir-propiedad-extension
//SACADO DE AQUI: https://stackoverflow.com/a/25428013


private var xoAssociationKey: CGFloat = 0
extension UIButton {

    var originalFontSize : CGFloat? {
        get {
            return objc_getAssociatedObject(self, &xoAssociationKey) as? CGFloat
        }
        set(newValue) {
            objc_setAssociatedObject(self, &xoAssociationKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
        }
    }
    
    open override func awakeFromNib() {
        
        let currentFont = self.titleLabel?.font;
        if self.originalFontSize == nil {
            self.originalFontSize = currentFont?.pointSize
        }
        let fontSize = Utils.getFontSize(originalFontSize: (self.originalFontSize)!);
        
        self.titleLabel?.font = currentFont?.withSize(fontSize);
        
    }

}

text Tulkki 24/7 Titetoturvapolitiikka(隐私政策)

privacy-policy
Titetoturvapolitiikka (Privacy policy)

Sovellus tarvitsee oikeuden lukea puhelimen puhelutietoja, jotta tulkkauksen alkaminen ja kesto pystytään tunnistamaan.
Tätä ominaisuutta käytetään vain tulkkien puhelimissa. Tavallisten käyttäjien puhelutietoja ei lueta.
Kun tulkki soittaa tulkkausta tilanneelle, aloittaa sovellus seuraamaan puhelun alkamista ja loppumista.
Oikeutta käytetään ainoastaan tähän tarkoitukseen.

text Pi-Hole黑名单

Pi-Hole黑名单

blacklist.txt
ad.flipboard.com
ads.viksaffiliates.com
anzeigen-buchen.sueddeutsche.de
anzeigen.sueddeutsche.de
app-measurement.com
blickonl-ssl.wemfbox.ch
cdn2.teads.tv
cdn.xplosion.de
ciqcol01.ciq.labs.att.com
click2createahero.net
cn.tatami-solutions.com
config.samqaicongen.com
connect.facebook.net
de-odc.samsungapps.com
de.quasargaming.com
developed.down.hontamelenton.co.com
eu2-scloud-proxy.ssp.samsungosp.com
ew1.dms-gld.bigdata.ssp.samsung.com
f1-blick-ch.cdn.ampproject.org
immobilienmarkt.sueddeutsche.de
jpflmmxdflmm.com
js.simploracdn.com
lapalingo.com
mobile.pipe.aria.microsoft.com
ms.cmcm.com
ollisbumsblog.com
op.ule88.com
quasargaming.zendesk.com
reiseangebote.sueddeutsche.de
rt.applovin.com
samsungresources.visionobjects.com
t.bauernative.com
unconf.adkmob.com
ups.ksmobile.net
ups.xplosion.de
us-knox.secb2b.com
vas.samsungapps.com
viks.cdn.netrefer.com
w.dating-and-fuck.online
www.spiegelgruppe-nachdrucke.de
www.stargames.com
www.viks.com
xdm.wireless.att.com

text Flickity-prev-next-button不会为第一个元素#598触发事件

我在主旋转木马下面有导航旋转木马。这两个轮播使用asNavFor链接。 <br/> <br/>根据文档,我注意到导航轮播上箭头按钮的默认行为是向左或向右滑动导航轮播 - 当缩略图的宽度/数量超过容器宽度时非常有用。 <br/> <br/>我想要做的是,当用户点击这些导航箭头时,它将选择上一个/下一个图像。正如你在GIF中看到的那样,它工作正常,但不适用于第一个或最后一个缩略图。我相信这是因为“禁用”属性被添加到这些按钮。

Doc
https://github.com/metafizzy/flickity/issues/598

Sounds there is a bit of confusion in how the previous/next arrows work for a navigation carousel. The previous/next buttons allow a user to navigate cells in that carousel. So you could swipe to the far left or far right, and it wouldn't change the main carousel. The main carousel would only change when you clicked on a navigation cell.

To enable your desired behavior, you'll have to implement your own custom buttons. See demo https://codepen.io/desandro/pen/291975a383c8bce86d733dbcb2435a07

text Python设置和练习

Python设置和练习

python-setup.txt

Commands:
  pip install jupyter

  python -m nenv class


  /class/scripts/activate   (starts the script)


  jupyter notebook  (starts jupyter server and opens the browser for the server)


(Exercise Homework until the end of the day tomorrow August 9)

SE02.ipynb (jupyter file)  found in Google Classroom iAcademy
at the end of the line **Exercise**

text scratch_272

scratch_272
[!Wayfinder? &startId=`6` &level=`1` &hereTpl=`innerMenuHere` &outerClass=`inner_menu` &lastClass=`last` !]

<link href="assets/templates/main/img/html5.css" rel="stylesheet" media="all" />
<style>
    .tabs .tab {
        display: none;
        background: #fff;

    }
    .tabs .tabs-nav{
        text-align: center;
        background: none;
    }
    #content .tabs .tabs-nav a{
        background: #600011;
        border: 1px solid #580110;
    }
    #content .tabs .tabs-nav a {
        font: normal 15px Tahoma, "DejaVu Sans",sans-serif;
        display: inline-block;
        border: 1px solid #EB060F;
        line-height: 8px;
        height: 10px;
        width: 55px;
        background: #b2000f;
        background: -webkit-gradient(linear, left top, left bottom, from(#c00010), to(#b2000f));
        background: -webkit-linear-gradient(top, #c00010, #b2000f);
        background: -moz-linear-gradient(top, #c00010, #b2000f);
        background: -ms-linear-gradient(top, #c00010, #b2000f);
        background: -o-linear-gradient(top, #c00010, #b2000f);
        background-image: -ms-linear-gradient(top, #c00010 0%, #b2000f 100%);
        padding: 11px 14px;
        color: #DBD0AE;
        vertical-align: middle;
        margin-right: -5px;
        text-decoration: underline;
    }
    #content .tabs .tabs-nav a:hover{
        color: #fff !important;
    }
    #content .tabs .tabs-nav .active{
        background: #600011;
        border: 1px solid #580110;
        text-decoration: none;
        cursor: default;
    }
    #content .tabs .tabs-nav .tab1{
        border-bottom-left-radius: 4px;
        border-top-left-radius: 4px;
    }
    #content .tabs .tabs-nav .tab2{
        border-bottom-right-radius: 4px;
        border-top-right-radius: 4px;
    }
    .tabs .active{
        display: block;
    }


    .video_wrap {
        margin-right: 44px;
    }

</style>
<!--[if lte IE 6]>
<style>
    p.avi{
        margin-bottom:46px !important;
    }
</style>
<![endif]-->
<script type="text/javascript" src="/assets/js/player/video.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('.videomenu li').eq(0).css('margin-bottom','38px')
        $('.vjs-big-play-button').live('click',function(){
//if (pageTracker) {  pageTracker._trackEvent('Video', 'Отрывки о Максе Ибрагимове из фильма «Запад России»', 'Просмотр'); }
//$('#example_video_1').attr({'poster':'http://www.artmix.ru/maxick_video/dvd/preload-dvd55_.jpg'});
//$('.video-container').css({'margin-bootom','15px'})
        });

        $('.tabs').each(function () {
            var self = $(this);

            if (self.find('.tabs-wrapper .tab.active').length === 0) {
                self.find('.tabs-nav > *:first').addClass('active');
                self.find('.tabs-wrapper .tab:first').addClass('active');
            }

            self.find('.tabs-nav a').click(function () {
                $('.video-js-box').css('width','480px');

                var tab = $($(this).attr('href')),
                    isActive = $(this).hasClass('active'),
                    linkActive = self.find('.tabs-nav .active'),
                    tabActive = self.find('.tab.active');

                if (!isActive) {
                    linkActive.removeClass('active');
                    tabActive.removeClass('active');
                    tab.addClass('active');
                    $(this).addClass('active');
                }

                return false;
            });
        });
    });
</script>
<div class="inner">
    <h1>Открытие салона в Калиниграде</h1>
    <div class="tabs">
        <div class="tabs-nav">
            <a class="tab1" href="#tab1">Часть 1</a>
            <a class="tab2" href="#tab2">Часть 2</a>
        </div>
        <div class="tabs-wrapper">
            <div class="tab" id="tab1">
                <div class="video_wrap" style="width:480px;">
                    [[facebox]]

                    {{view-tracking}}



                    {{html5VideoEvent}}


                    [[html5video? &ogg=`/assets/media/video/opensalon/opensalon_1.mp4` &mp4=`/assets/media/video/opensalon/opensalon_1.mp4` &webm=`/assets/media/video/opensalon/opensalon_1.mp4` &width=`480` &height=`358` &image=`/assets/media/video/opensalon/open1_big.jpg` &skin=`/assets/flash/maxick_party.xml`]]
                    <!-- maxick_favorit.xml -->
                </div>
            </div>
            <div class="tab" id="tab2">
                <div class="video_wrap" style="width:480px;">
                    [[facebox]]
                    {{view-tracking}}


                    [[html5video? &ogg=`/assets/media/video/opensalon/opensalon_2.mp4` &mp4=`/assets/media/video/opensalon/opensalon_2.mp4` &webm=`/assets/media/video/opensalon/opensalon_2.mp4` &width=`480` &height=`358` &image=`/assets/media/video/opensalon/open2_big.jpg` &skin=`assets/flash/maxick_party.xml`]]
                    <!-- maxick_favorit.xml -->
                </div>

            </div>
        </div>
    </div>


    <p> Состоялось открытие 35-го салона «Максик». Чем новый салон в Калининграде отличается от других, в сюжете новостей на телеканале «Россия&nbsp;1».</p>
    <p>Продолжительность 05:00</p>

    <h2 style="text-align: left; font-style: italic;">Смотрите также:</h2>

    [!Wayfinder? &startId=`24` &level=`2` &rowTpl=`videoMenuRow`  &hereTpl=`videoMenuHere` &outerClass=`videomenu` &lastClass=`last` &excludeDocs=`[*id*]` &sortBy=`createdon` &sortOrder=`DESC` !]

</div>

text 媒体拉动

vendor / bin / dep percorso dove si trova dip

vendor_bin_dep magentomedia-pull
vendor/bin/dep magento:media-pull

text Git凭证osxkeychain sourcetree

Cuando Source tree pide guardar密码una y otra vez <br/>

git-credential-store-sourcetree
git config --global credential.helper osxkeychain

text Git凭证osxkeychain sourcetree

Cuando Source tree pide guardar密码una y otra vez <br/>

git-credential-store-sourcetree
git config --global credential.helper osxkeychain