Recursive nested lists python, Simple print of list recursivley

nested = ['Bob', 'Slack', ['reddit', '89', 101, ['alacritty', '(brackets)', 5, 375]], 0, [{"slice", "owned"}], 22]

def print_list(arr):
	for x in arr:
		if isinstance(x, list):
			print_list(x)
		elif isinstance(x, set):
			print_list(x)
		else:
			print(x)
		

print_list(nested)

Card Carousel

// react
import * as React from "react";
import { FC } from "react";
// react-slick
import Slider from "react-slick";
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
// material-ui
import {
  Card,
  CardActionArea,
  CardActions,
  CardContent,
  CardMedia,
  Button,
  Typography
} from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";

const lists = [
  {
    name: "Apple",
    image:
      "https://t3.ftcdn.net/jpg/01/78/91/98/240_F_178919820_P2pZcZaRlmdnPyzySimiwUO8gxUdXczm.jpg"
  },
  {
    name: "Google",
    image:
      "https://t4.ftcdn.net/jpg/03/08/54/37/240_F_308543787_DmPo1IELtKY9hG8E8GlW8KHEsRC7JiDN.jpg"
  },
  {
    name: "Amazon",
    image:
      "https://t3.ftcdn.net/jpg/03/46/91/30/240_F_346913052_0q7EJ7E9rIMs1XKfFHeFPc5liv2gFpS6.jpg"
  },
  {
    name: "Facebook",
    image:
      "https://as1.ftcdn.net/jpg/03/60/06/64/500_F_360066448_MWBdpBisJyf1clYLUy1i1x0cO1osOj0b.jpg"
  },
  {
    name: "Microsoft

Database info

![](https://cdn.cacher.io/attachments/u/3d66b3pypor7b/LOnkbDn5izc7yLXnPLEvcfUVf_H0W2Fi/9eyryt5ce.png) ![](https://cdn.cacher.io/attachments/u/3d66b3pypor7b/fZLSEuh8DDTrLgaZZ-HwhMjFqIYTpa_f/m4rrrjahw.png) ![](https://cdn.cacher.io/attachments/u/3d66b3pypor7b/hF3Dt4AuV-c5VyjHGEsWlQ3Kku_SPRye/hgrit6sai.png) ![](https://cdn.cacher.io/attachments/u/3d66b3pypor7b/iCCj2XzTSiU7bgSkaeosk_1ZMJcI-MAZ/qs66mqk22.png) ![](https://cdn.cacher.io/attachments/u/3d66b3pypor7b/8Q51qTHiBOT7BFvdxE004zVampeVbHX8/u7oppuzx3.png) ![](https://cdn.cacher.io/attachments/u/3d66b3pypor7b/haGGCJ5ulWxxH4oJNlTKISZ-hevnoByq/sjsm2u2dg.png) ![](https://cdn.cacher.io/attachments/u/3d66b3pypor7b/HYpnI5e0u9qg5Z03iQwnf79O5S7XAcPS/l8vjex0wp.png)
CREATE TABLE "Users" (
	name	VARCHAR(128),
	email	VARCHAR(128)
);
SELECT * FROM Users WHERE email='csev@umich.edu'
SELECT * FROM Users ORDER BY email


INSERT INTO Users (name, email) values('Kristin','kf@umich.edu')
UPDATE Users SET name='Charles' where email='csev@umich.edu'
DELETE FROM Users WHERE email='fred@umich.edu'

Display Order Notes in Checkout Process

$( document ).ready(function() {
  //Check if note exists. If it does, get it
   var additionalNote = window.CHDataObject.additionalNote;
   //Put additional note in a cookie
   //Create a div in the checkout page
   $(".CE__line-items").("<div>Order Notes: " + additionalNote);
   
});

软件装机笔记Server

## Personal PC
### Mac

### Windows10

## Server

Palv

*###########################################;
*	ANL01FL									;
*###########################################;

*COUNT NUMBER OF PATIENTS IN SAFFL PHASE 2;
data saf2fl_count;
	set adam.adsl;
	if saf2fl^='Y' then delete;
	const	=	1;
	count	=	1;
	keep const count;
run;

proc sql noprint;
	create table saf2fl_count1 as 
	select distinct  	const, 
		sum(count)	as 	cnt
	from saf2fl_count group by const;
run;

data saf2fl_count;
	set saf2fl_count1;
	percent	=	(cnt/100)*3;
	keep const cnt percent;
run;

*COUNT NUMBER OF AES IN SAFFL PHASE 2 PER EACH AEBODSYS AEDECOD;
data anl01fl;
	set final;
	if aphase='OLTE'					then tag=1;
	if aphase='PTF' and respdfl^='Y'	then tag=1;
	if tag^=1 							then delete;
	if saf2fl^='Y' 						then delete;
	if trtemfl^='Y' 					then delete;
	const	=	1;
	count	=	1;
	keep usubjid aebodsys aedecod const count;
run;

%sort (inds=anl01fl		,varstr=%str(usubjid aebodsys aedecod const count),ndk=1,outds=anl01fl);

proc sql noprin

Добавление пользовательского поля в настройки пользователя

add_filter( 'user_contactmethods', 'ved_user_contactmethods' );
function ved_user_contactmethods( $user_contactmethods )
{
	$user_contactmethods = null;
	$user_contactmethods['phone_number'] = 'Телефон';

	return $user_contactmethods;
}

Responsive svg

const svg = d3.select('.canvas')
      .append('svg')
      .attr('viewBox', [0, 0, w, h])
      .style("width", "100%")
      .style("height", "auto")
      .style("padding", "10px")
      //.style("font", "10px sans-serif")
      .style("box-sizing", "border-box");

JQuery, справка

// Операции с коллециями

$('<div />')appendTo('body') //

// Получает элемент по индексу
var imgElement = $('img[alt]')[0];
var imgElement = $('img[alt]').get(0);
var imgElement = $('img[alt]').get(-1);

// Массив элементов из коллекции
var imgElements = $('img[alt]').get();

// Получает объект jQuery, содержащий конкретный элемент по индексу
$('div').eq(1);
$('div:eq(1)');

// Получает первый/последний элемент с классом .my-list внутри li
$('li', '.my-list').first(); // last()

// Команда собирает все <button> на странице, которым непосредственно предшествует <label>, в объект jQuery, 
// а затем создает JavaScript-массив этих элементов
var allLabeledButtons = $('label + button').toArray();

// Индекс элемента
var index = $('#main-menu > li').index($('#blog-link'));
var index = $('#container > img').index();

// Кол-во предков div для абзаца description
var count = $('#description').parents('div').length;

// Кол-во потомков
var count = $('#description').children().length;
// var cou

マクロをプレーンテキスト編集する

:%s/\(INSERT.*VALUES \)*(/(/g^M:%s/),/)^V^M/g^M

上記は^Mは<C-v><C-m>、^Vは<C-v><C-v>で入力している上記は下記コマンドの連続実行のようなマクロになる
:%s/\(INSERT.*VALUES \)*(/(/g
:%s/),/)^V^M/g

:%s/\(INSERT.*VALUES \)*(/(/g^M:%s/),/)^V^M/g^M
この文字列を好きなレジスタにヤンク(例えばk)してマクロ実行(kなら@k)すれば良い

php date

<?php
// Предположим, что текущей датой является 10 марта 2001, 5:16:18 вечера,
// и мы находимся во временной зоне Mountain Standard Time (MST)

$today = date("F j, Y, g:i a");                 // March 10, 2001, 5:16 pm
$today = date("m.d.y");                         // 03.10.01
$today = date("j, n, Y");                       // 10, 3, 2001
$today = date("Ymd");                           // 20010310
$today = date('h-i-s, j-m-y, it is w Day');     // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
$today = date('\i\t \i\s \t\h\e jS \d\a\y.');   // it is the 10th day.
$today = date("D M j G:i:s T Y");               // Sat Mar 10 17:16:18 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h');     // 17:03:18 m is month
$today = date("H:i:s");                         // 17:16:18
$today = date("Y-m-d H:i:s");                   // 2001-03-10 17:16:18 (формат MySQL DATETIME)
?>

font awesome rails 6

yarn add @fortawesome/fontawesome-free

# app/javascript/packs/application.js
import "@fortawesome/fontawesome-free/js/all";

# app/javascript/css/main.scss
@import '@fortawesome/fontawesome-free';

OR

# app/javascript/packs/application.js
import "@fortawesome/fontawesome-free/css/all.css";


<p><i class="far fa-smile-beam fa-3x"></i></p>

Minicart cartjs


https://cartjs.org/

Java Profiler VM Options

-XX:+UnlockCommercialFeatures -XX:+FlightRecorder 

Class (or Static) members

# Example extracted from : https://www.geeksforgeeks.org/g-fact-34-class-or-static-variables-in-python/
# This article is on the differences between static or class members and instance/non-attribute members
# Python program to show that the variables with a value  
# assigned in class declaration, are class variables 
  
# Class for Computer Science Student 
class CSStudent: 
    stream = 'cse'                  # Class Variable 
    def __init__(self,name,roll): 
        self.name = name            # Instance Variable 
        self.roll = roll            # Instance Variable 
  
# Objects of CSStudent class 
a = CSStudent('Geek', 1) 
b = CSStudent('Nerd', 2) 
  
print(a.stream)  # prints "cse" 
print(b.stream)  # prints "cse" 
print(a.name)    # prints "Geek" 
print(b.name)    # prints "Nerd" 
print(a.roll)    # prints "1" 
print(b.roll)    # prints "2" 
  
# Class variables can be accessed using class 
# name also 
print(CSStudent.stream) # prints "cse" 

Translator - null

<?php

$form['yearofbirth']->setTranslator(NULL);