duplicate rows plsql

https://dba.stackexchange.com/questions/217589/repeat-row-in-the-result-based-on-the-value-of-a-column/217602

SELECT FIRST_COL, VAL_COL
FROM table1
CROSS APPLY (
  SELECT LEVEL
    FROM DUAL  
    CONNECT BY LEVEL <= table1.VAL_COL
);

Iterating in Python

# one line iterate through list
country_list = [item.name for item in Country]

# iterate using enumerate function (gives you an index)
for i, name in enumerate(presidents, start=1):
    print(f'President {i}: {name}')

Iterate Through Enum

from enum import Enum

class Country(Enum):
    Afghanistan = 93
    Albania = 355
    Algeria = 213
    Andorra = 376
    Angola = 244
    Antarctica = 672
for data in Country:
    print(f'{data.name:15} = {data.value}')

Hide an element visually but keep it in the Accessibility Tree

.hidden-visually {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

Design time DataContext

       d:DataContext="{d:DesignInstance models:LineViewPresenter, IsDesignTimeCreatable=True}"

cookie set

if(Cookies.get('alert_cookie') == 'hide'){
  $('.alertbar').removeClass('x');
}
$('.alertbar--title').on('click',function(){
  $('.alertbar').toggleClass('x');
  Cookies.set('alert_cookie', 'hide', { expires: 1, path: '/' });
});

Create DMARC DNS record



https://dmarcian.com/dmarc-record-wizard/

Sample Record:

Record Type: 
TXT


DMARC Record:
v=DMARC1; p=none; rua=mailto:name@mydomain.com;


Target / Host / Location:
_dmarc.mydomain.com





Breadcrumb example


<?php

namespace Drupal\portale_articolo\Breadcrumb;

use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Breadcrumb\Breadcrumb;
use Drupal\Core\Link;
use Drupal\taxonomy\Entity\Term;
use Drupal\taxonomy\Entity\Vocabulary;

class ArticoloBreadcrumb implements BreadcrumbBuilderInterface{

	/**
	 * {@inheritdoc}
	 */
	public function applies(RouteMatchInterface $attributes){
		$node = \Drupal::routeMatch()->getParameter('node');
		if

ComprobarInternetMobile

comprobarNet(){
 try{
     final resul = await InternetAddress.lookup('google.com').timeout(Duration(seconds: 5));
      if (resul.isNotEmpty && resul[0].rawAddress.isNotEmpty) {}
 }cath(){
   
 }
}

Create Quick K8s Cluster on GCP

# CREATE cks-master VM using gcloud command
# not necessary if created using the browser interface
gcloud compute instances create cks-master --zone=us-central1-c \
--machine-type=e2-medium \
--image=ubuntu-1804-bionic-v20201014 \
--image-project=ubuntu-os-cloud \
--boot-disk-size=50GB

# CREATE cks-worker VM using gcloud command
# not necessary if created using the browser interface
gcloud compute instances create cks-worker --zone=us-central1-c \
--machine-type=e2-medium \
--image=ubuntu-1804-

BABEL REPL JS NEXT to ES5

# BABEL REPL JS NEXT to ES5

![image](https://user-images.githubusercontent.com/15247302/118287504-2e729c80-b4dc-11eb-88eb-d043c061ebcf.png)

Reports specs

# Report layout

### Filters bar layout

  ![](https://cdn.cacher.io/attachments/u/3emzzkhqgrxbv/Qzdj6LY1d5iWDLsBf_-lIEbbRt1H8AMw/ppds7w7h4.png)

  - On the left side we always will have the **date filters** and on the right side some **"special filters"** depending on the chart itself e.g. on the picture above we have Department and User.
  - **Department** is a textfield/dropdown where you can type to search for the department by name or just select one from dropdown options.
  - **User** is a

Initialization custom type in Properties.Settings

Need edit Settings.cs DefaultSettingValueAttribute is used to initialize with a default constructor, else it will be null as default value. Как вариант можно установить начальное значение 0, тогда при первой отладке возникнет Exception и файл Settings.cs откроется автоматически, тут и отредактировать
    [global::System.Configuration.UserScopedSettingAttribute()]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
\!h     [global::System.Configuration.DefaultSettingValueAttribute("")]
    public YourType PropertyName
    {
        get => (YourType)this["PropertyName"];
        set => this["PropertyName"] = value;
    }

Blue Lines on White Screens on Chrome in Mac

https://macreports.com/google-chrome-showing-blue-horizontal-lines-fix/

turning off acceleration did the trick for me,.

Random Image Background

use liquid to shuffle a bunch o' images and return with a random one for a background image.
<script>

{% if List.Items | Size > 0 -%}
    {% assign min = 0 -%}
    {% assign max = List.Items | Size -%}
    {% assign max = max | Minus: 1 %}
    {% assign num = "now" | DateFormat: "%s" %}
    {% assign day = num | Round: 0 %}
    {% assign final = day | Modulo: max %}
    {% assign final = max | Minus: final %}
    
    $('#default-hero .bg-img').css('background-image', 'url("{{List.Items[final].FieldValues.BackgroundImage.Src}}")');
    

{% endif %}


</script>
    

Random Image Background

use liquid to shuffle a bunch o' images and return with a random one for a background image.
<script>

{% if List.Items | Size > 0 -%}
    {% assign min = 0 -%}
    {% assign max = List.Items | Size -%}
    {% assign max = max | Minus: 1 %}
    {% assign num = "now" | DateFormat: "%s" %}
    {% assign day = num | Round: 0 %}
    {% assign final = day | Modulo: max %}
    {% assign final = max | Minus: final %}
    
    $('#default-hero .bg-img').css('background-image', 'url("{{List.Items[final].FieldValues.BackgroundImage.Src}}")');
    

{% endif %}


</script>