Snippets Collections
string JSONresult;
JSONresult = JsonConvert.SerializeObject(dt);  
Response.Write(JSONresult);
.gradient {
  background-image:
    linear-gradient(
      to right, 
      red, 
      blue,
      yellow, 
      green
    );
}
 add_filter( 'jetpack_sharing_counts', '__return_false', 99 );
add_filter( 'jetpack_implode_frontend_css', '__return_false', 99 );
                                
.dynamic-shadow {

  position: relative;

  width: rem;

  height: 10rem;

  background: linear-gradient(5deg, #d7ff, #00ffb8);
6
  z-index: 1;
7
}
8
.dynamic-shadow::after {

  content: '';
10
  width: 100%;

  height: 100%;

  position: absolute;

  background: inherit;

  top: 0.5rem;

  filter: blur(0.4rem);

  opacity: 0.7;

  z-index: -1;

}

​
<h1 class="ribbon">
   <strong class="ribbon-content">Everybody loves ribbons</strong>
</h1>
 .lower-canvas {
                width: 100% !important;
                height: 100% !important;
                position: relative !important;  
            }
            .upper-canvas {
                width: 100% !important;
                height: 100% !important;
                position: absolute !important;
            }
            .canvas-container {
                width: 100% !important;
                height: auto !important;
                border-radius: 20px;
            }
cssbuttons/index.html
​ ​<p>​
​   ​<input​ class=​"button"​ type=​"button"​ value=​"A Button!"​​>​
​   ​<a​ class=​"button"​ href=​"http://pragprog.com"​​>​A Link!​</a>​
​ ​</p>​
span {
  min-height: 100px;
  display: inline-flex;
  align-items: center;
  border: 1px solid aqua;
}
<div class="skt-hero"> <!--Inicia contenedor -->
<div class="columnas z1" style="--backgroundImg: url(https://cdn.thecoolist.com/wp-content/uploads/2016/05/Japanese-Cherry-beautiful-tree.jpg)">1ahola</div>
<div class="columnas z2" style="--backgroundImg: url(https://wallpaperstock.net/wonderful-trees-path-sun-light-wallpapers_47680_1920x1200.jpg)">2a</div>
<div class="columnas z3" style="--backgroundImg: url(https://img.culturacolectiva.com/featured_image/2018/10/04/1538678265674/deforestacion-del-bosque-amazonico-diecisiete-por-ciento.jpg)" >3a</div>
<div class="columnas z4" style="--backgroundImg: url(https://st.depositphotos.com/1012061/4434/i/600/depositphotos_44342021-stock-photo-sun-rays-inside-coconut-palms.jpg)">4a</div>
</div> <!-- Fin del contenedor -->

// css 

body{
z-index: -10:
} /* para asegurar que nadie este por debajo de body*/
.skt-hero {
    position: absolute;
    width: 100vw;
    height: 100vh;
    display: flex;
    background-image: url(https://haciendofotos.com/wp-content/uploads/las-mejores-fotos-de-paisajes-2020.jpg);
    background-size: cover;
}
.skt-hero:hover{
    z-index:-3;
}
.columnas {
    width: 25%;
    height: 100%;
    border: 1px solid gray;
    background-color: transparent;
    position:absolute;
    opacity: 0.05;
    transition: opacity 2s ease;
}
.columnas:hover {
    height: 100%;
    width:100vw;
    background-image: var(--backgroundImg);
    position: ;
    z-index: -1;
    background-size: cover;
    opacity: 1;
}
.z1{
left:0%;
}
.z1:hover{
left:0%;
}
.z2{
left:25%;
}
.z2:hover{
left:0%;
}
.z3{
left:50%;
}
.z3:hover{
left:0%;
}
.z4{
left:75%;
}
.z4:hover{
left:0%;
}
.ticker-wrap .ticker {
  display: inline-block;
  height: 4rem;
  line-height: 4rem;
  white-space: nowrap;
  padding-right: 100%;
  box-sizing: content-box;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
  -webkit-animation-name: ticker;
  animation-name: ticker;
  -webkit-animation-duration: 30s;
  animation-duration: 30s;
}
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
/* General Styles */
body {
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

/* Carousel */
#carousel-container {
    width: 100%;
    overflow-x: hidden;
    background-color: rgba(255, 255, 255, 0);
    z-index: 920;
}

#carousel {
    white-space: nowrap;
    animation: scroll 40s linear infinite;
    margin-bottom: 20px;
    z-index: 921;
}

#carousel img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    margin-right: -5px;
}

/* Home Services */
.home-services {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background-color: #515151;
    text-align: center;
    padding: 0;
}

.home-services a h2 {
    font-size: 15px;
    color: #ffffff;
    background-color: #515151;
    transition: color .5s ease, background-color .5s ease;
    padding: 20px 30px;
    border-radius: 200px;
    margin: 10px;
    border: 0;
}

.home-services a h2:hover {
    color: #ffffff;
    background-color: #4A1621;
}

/* Home Content */
.home-content {
    line-height: 25px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-item {
    display: flex;
    justify-content: space-between;
    background-color: #000000;
    align-items: center;
    transition: background-color 1s ease;
    border-radius: 200px;
    margin: 20px;
    cursor: pointer;
}

.home-item:hover {
    background-color: #515151;
}

.home-text {
    margin: 0 4vw 0 4vw;
    font-size: 16px;
}

.home-img img {
    width: 20vw;
    height: 100%;
}

.home-item ul {
    font-family: nunito;
    text-indent: 10px;
    color: white;
    line-height: 2vw;
    display: none;
}

.arrow img {
    width: 4vw;
    margin: 0 10vw;
    transform: translateX(0);
    transition: 2s ease;
}

.home-item:hover .arrow img {
    transform: translateX(30px);
}

.home-content h1,
.home-content h2 {
    color: white;
    white-space: nowrap;
}

/* Hero */
.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    z-index: 2;
    opacity: .4;
    transition: opacity 1s ease-in-out;
}

/* Hero Mobile */
@media (max-width: 900px) {
    .home-title h1 {
        display: none;
    }

    .hero-buttons {
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 10px 0;
    }

    .hero-image {
        position: relative;
        width: 100%;
        height: auto;
    }

    .hero-image img {
        width: 100%;
        height: 500px;
        display: block;
        object-fit: cover;
    }

    .hero-content {
        position: absolute;
        display: flex;
        flex-direction: column;
        top: 20vh;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: #fff;
        z-index: 1;
        width: 100%;
        justify-content: center;
    }

    .hero-content button {
        border-radius: 200px;
        border: none;
        padding: 15px;
        font-family: Montserrat;
        cursor: pointer;
        margin: 5px;
        background-color: #fff;
        transition: .5s ease;
        width: 60vw;
        font-size: 15px;
        line-height: 14px;
        align-items: center;
        display: flex;
        justify-content: center;
    }

    .hero-content button:hover {
        background-color: black;
        color: white;
    }
}
<!-- This tells you if your device is dark mode enabled or not. -->
<meta name=”color-scheme” content=”light dark”>
<meta name=”supported-color-schemes” content=”light dark”>
<style type=”text/css”>
:root {
Color-scheme: light dark;
supported-color-schemes:light dark;
}
</style>

/* Here you can adjust the colors of your brand’s preferred dark mode theme. */
@media (prefers-color-scheme: dark ) {
.body {
      background-color: #CCCCCC !important;
}
h1, h2, h3, td {
      color: #9ea1f9 !important;
      padding: 0px 0px 0px 0px !important;
}
}
String capitalize(String s) {
  if (s == null || s.isEmpty) {
    return s;
  }
  return s.length < 1 ? s.toUpperCase() : s[0].toUpperCase() + s.substring(1);
}
Text("Border test",
    style: TextStyle(
      inherit: true,
      fontSize: 48.0,
      color: Colors.pink,
      shadows: [
        Shadow( // bottomLeft
          offset: Offset(-1.5, -1.5),
          color: Colors.white
        ),
        Shadow( // bottomRight
          offset: Offset(1.5, -1.5),
          color: Colors.white
        ),
        Shadow( // topRight
          offset: Offset(1.5, 1.5),
          color: Colors.white
        ),
        Shadow( // topLeft
          offset: Offset(-1.5, 1.5),
          color: Colors.white
        ),
      ]
    ),
);
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(title: Text('IntrinsicWidth')),
    body: Center(
      child: IntrinsicWidth(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            RaisedButton(
              onPressed: () {},
              child: Text('Short'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('A bit Longer'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('The Longest text button'),
            ),
          ],
        ),
      ),
    ),
  );
}
  class MyBlinkingButton extends StatefulWidget {
    @override
    _MyBlinkingButtonState createState() => _MyBlinkingButtonState();
  }

  class _MyBlinkingButtonState extends State<MyBlinkingButton>
      with SingleTickerProviderStateMixin {
    AnimationController _animationController;

    @override
    void initState() {
      _animationController =
          new AnimationController(vsync: this, duration: Duration(seconds: 1));
      _animationController.repeat(reverse: true);
      super.initState();
    }

    @override
    Widget build(BuildContext context) {
      return FadeTransition(
        opacity: _animationController,
        child: MaterialButton(
          onPressed: () => null,
          child: Text("Text button"),
          color: Colors.green,
        ),
      );
    }

    @override
    void dispose() {
      _animationController.dispose();
      super.dispose();
    }
  }
                Container(
                  height: SizeConfig.safeBlockVertical * 24,
                  width: SizeConfig.safeBlockHorizontal * 45,
                  padding: EdgeInsets.only(
                      left: SizeConfig.safeBlockHorizontal * 5,
                      right: SizeConfig.safeBlockHorizontal * 4,
                      bottom: SizeConfig.safeBlockVertical * 2),
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(20),
                      color: Colors.white,
                      gradient: RadialGradient(
                          focalRadius: 100,
                          radius: 1.5,
                          center: Alignment.bottomLeft,
                          colors: [
                            colorStyles["maslowGreen"]!.withOpacity(0.65),
                            colorStyles["maslowGreen"]!.withOpacity(0.65),
                          ],
                          stops: [
                            0.0,
                            1.0
                          ])),
                  child: _collectionName(),
                ),
Container(
                                child: Text(
                                  items[index].itemName,
                                  style: TextStyle(
                                      color: Colors.black, fontSize: 30),
                                  textAlign: TextAlign.center,
                                ), //Text
                                height: 40,
                                width: 400,
                                  decoration:
                               BoxDecoration(
                  border: Border.all(color: Colors.black38, width: 3),
                  borderRadius: BorderRadius.circular(20),
                  boxShadow: [
                    BoxShadow(
                      color: Colors.black.withOpacity(0.5),
                      spreadRadius: 5,
                      blurRadius: 5,
                      offset: Offset(0, 3), // changes position of shadow
                    ),
                  ],
                  color: Colors.white,
                  image: DecorationImage(
                    image: AssetImage(filterList[index].itemImg),
                    fit: BoxFit.contain,
                  ),
                ),
def ffill_cols(df, cols_to_fill_name='Unn'):
    """
    Forward fills column names. Propagate last valid column name forward to next invalid column. Works similarly to pandas
    ffill().
    
    :param df: pandas Dataframe; Dataframe
    :param cols_to_fill_name: str; The name of the columns you would like forward filled. Default is 'Unn' as
    the default name pandas gives unnamed columns is 'Unnamed'
    
    :returns: list; List of new column names
    """
    cols = df.columns.to_list()
    for i, j in enumerate(cols):
        if j.startswith(cols_to_fill_name):
            cols[i] = cols[i-1]
    return cols
 """ 
'UserWarning: pyproj unable to set database path.' <- This happens with multiple pyproj installations on the same machine, which is quite common, as almost every geo software depends on it.

How to fix:
First, find all copies of 'proj.db' on the machine. Get the path for the correct one, which is probably something like 'C:/Users/Clemens Berteld/.conda/pkgs/proj-8.2.0-h1cfcee9_0/Library/share/proj'. Definitively not a QGIS or PostGIS path.

Then, use it as a parameter for this function and run it at the top of your code:
"""

def set_pyproj_path(proj_path):
    from pyproj import datadir
    datadir.set_data_dir(proj_path)
    # print(datadir.get_data_dir.__doc__)
df['SettlementDate'] = pd.TimedeltaIndex(df['SettlementDate'], unit='d') + dt.datetime(1900,1,1)
String fileFullPath = "Your\\java\\ file \\full\\path";
    JavaDocBuilder builder = new JavaDocBuilder();
    builder.addSource(new FileReader( fileFullPath  ));

    JavaSource src = builder.getSources()[0];
    String[] imports = src.getImports();

    for ( String imp : imports )
    {
        System.out.println(imp);
    }
 
def merge_two_dicts(a, b):
 
 
   c = a.copy()   # make a copy of a
 
   c.update(b)    # modify keys and values of a with the ones from b
 
   return c
 
 
 
 
 
a = { 'x': 1, 'y': 2}
 
b = { 'y': 3, 'z': 4}
 
 
print(merge_two_dicts(a, b)) # {'y': 3, 'x': 1, 'z': 4}
 
 
# Git Commands

## git init
initialize git and create a new local repository

## git add .
track all the files in the local repo for changes

## git add filename
track a specific file in the repo for changes

## git commit -m "first commit" -m "the description"
take a snapshot of the files in the repo

## git status
check the status of your code

## git remote add origin https-link
add a new remote repository

## git push origin master
push the local repository to github

## git push -u origin master
push the local repository to github and also set upstream (enables you to use git push only in future)

## git branch
check the current branch and available branches

## git checkout -b new-branch-name
go to another new branch

## git checkout existing-branch
switch to an existing branch

## git diff feature
see the difference between files you want to merge

## git config --global user.name "[name]"
Sets the name you want attached to your commit transactions

## git config --global user.email "[email address]"
Sets the email you want attached to your commit transactions

## git config --global color.ui auto
Enables helpful colorization of command line output

## git push
use this cmd when pushing a new branch to see how it should be done

## git pull
when upstream is set , to pull from github when changes made on the github and want them to reflect on local machine

## git pull origin master
to pull from github when changes made on the github and want them to reflect on local machine

## git branch -d branch-name
delete a branch

## git commit -am "message"
commit and add at the same time
docker ps //List running containers
docker ps --all //List all containers
docker system prune //Remove unused data
docker system prune --all //Remove all unused images not just dangling ones
docker run {IMAGE} //combining 'docker create' & 'docker start'
docker run -d {IMAGE} // Run container in background and print container ID
docker run -p {systemport}:{dockerport} {IMAGE} // Map Port of the OS to the dockerport
docker run -it {IMAGE} //Input output
docker run -it {IMAGE} sh //Run docker container and shell into it
docker exec -it {IMAGE} sh //Shell into running docker container
docker build . //Build docker image with random id 
docker build -t {REPO}/{TAGNAME}. //Build docker image with random id 
docker stop {IMAGE} //Stop container from running

docker-compose up //Execute docker compose
docker-compose up --build // Rebuild Docker container and execute docker compose
docker-compose -d {IMAGE} // Run container in background and print container ID
docker-compose down //Stop container from running
more: https://gist.github.com/endolith/157796

ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻ 

http://www.fileformat.info/convert/text/upside-down.htm

ಠ_ಠ [disapprove]
Ծ_Ծ [disapprove]
ಠ~ಠ [hrm…]
ఠ_ఠ [o rly?]
ಠ_ರೃ [dignified]
ಠ_ృ [dignified]
ಠ╭╮ಠ [frown]
◔_◔ [rolling eyes]
𝄇⥀.⥀𝄆 [rolling eyes]
⊙_ʘ [crazy/wonky]
◴_◶ [herp derp]
◕ ◡ ◕ [smile]
(๏̯͡๏﴿ [sad]
(͡๏̯͡๏) [sad]
◔̯◔ [sad]
⊙︿⊙ [sad]
◕︵◕ [sad]
●︵• [sad]
◉︵◉ [really sad]
ಡ_ಡ [misty eyes]
ಥ_ಥ [crying]
ಢ_ಢ [crying]
ಢ_ಥ [heavily distraught]
⊙﹏⊙ [embarrassed]
( ゚o゚) [surprised]
⋋_⋌ [frustrated]
〴⋋_⋌〵[angry]
ಠ益ಠ [rage]
ヽ(`Д´)ノ [raging] ‎(ノ≥∇≤)ノ [raging]
(︶ε︶メ) [deep breaths]
˚▱˚ [gasp]
⊙▂⊙ [gasp]
⊙▃⊙ [bigger gasp]
(ΘεΘ;) [nervous]
(゚ヮ゚) [happy]
〓D [happy]
(´ー`) [content]
(´▽`) [haha]
(゚*゚) [pucker]
(。・_・。) [blush]
♥╭╮♥ [lovesick]
≖◡ಎ≖ [devious]
(///_ಥ) [injured]
(≥_<) [black eye]
ʕʘ‿ʘʔ [doofy]
:-þ [silly]
:^Þ
¯\_(ツ)_/¯ [lol i dunno]
ヘ(◕。◕ヘ) [ballin]
๏_๏ [stare]
◉_◉
ਉ_ਉ [tired]
☼_☼ [bulging|bloodshot]
♨_♨ [CAN’T UNSEE] ☯‿☯ [peace]
(゚ー゚) [cool]
(• ε •) [sheepish]
(`・ω・´)
¬_¬ [glare]
ಸ_ಸ
ↁ_ↁ
ಆ_ಆ
ಊ_ಊ
ಹ_ಹ
ㅎ_ㅎ
【•】_【•】[woah]
(ு८ு_ .:)
(づ。◕‿‿◕。)づ [hug]
(/◔ ◡ ◔)/ [hug]
٩(̾●̮̮̃̾•̃̾)۶ [celebrate]
\(• ◡ •)/ [celebrate]
\( ゚◡゚)/ [celebrate]
⊂(◉‿◉)つ [wave]
ح˚௰˚づ [wave]
╚(•⌂•)╝ [stop]
☜-(ΘLΘ)-☞ [which way?]
☜。◕‿◕。☞
(✌゚∀゚)☞ [point and laugh]
щ(゚Д゚щ) [Dear god why‽]
ლ(ಠ_ಠ ლ) [settle down]
◖|◔◡◉|◗ [HURR DURR]
( ‘-’)人(゚_゚ ) [high-five]
( _)=mm=(^_^ ) [brofist]
(>'o’)> ♥ <('o’<)
⎝⏠⏝⏠⎠ [content]
( ´_⊃`)[content]
(Ō_ƆŎ) [eyebrow raised]
≖_≖ [I see what you did there…]
\|  ̄ヘ ̄|/ [praise me]
̿’ ̿’\̵͇̿̿\з=(•̪●)=ε/̵͇̿̿/’̿’̿ [big guns]
< ('o'<) ( '-’ ) (>‘o’)> v( ‘.’ )v < (' .' )> < ('.'<) ( '.’ ) (>‘.’)> v( ‘.’ )v < (' .' )> [dancing]
♪┏(・o・)┛♪┗ ( ・o・) ┓♪┏ ( ) ┛♪┗ (・o・ ) ┓♪┏(・o・)┛♪ [singing/dancing]
Ƹ̵̡Ӝ̵̨̄Ʒ [butterfly]
/╲/\╭ºoꍘoº╮/\╱\ [spider]
(* ・(エ)・ *) [pedobear?]
(\/) (°,,°) (\/) [WOOPwoopwoopwoopwoop]
⊛ठ̯⊛ [bicycle… face?]
ತಟತ [buttface]
’;‘ [scream]
/:€ [Myth busted!]
˚⌇˚ [squirm]
ಈ_ಈ [eyes tied shut] (wat?)
ⓧ_ⓧ [x]
⨂_⨂ [x]
✖_✖ [x]
×̯× [x]
‹•.•›
•ﺑ• [oooh]
(० ्०)
ôヮô
¢‿¢
!⑈ˆ~ˆ!⑈
•(⌚_⌚)• [late]
(▰˘◡˘▰)
۹ↁﮌↁ
乂◜◬◝乂
ತ_ಎತ
ಠﭛಠ [goatee]
⏠⏝⏠
⇎_⇎
흫_흫
句_句
໖_໖
༺‿༻
ಠ , ಥ
१✌◡✌५
१|˚–˚|५
โ๏௰๏ใ ื
◜㍕◝
◷_௰◴
◎ܫ◎
(˚ㄥ_˚)
(˚இ˚)
ộ_ộ
◘_◘ 
◙‿◙
δﺡό
⊂•⊃_⊂•⊃
ح˚ᆺ˚ว
❂‿❂ 
❐‿❑
☾˙❀‿❀˙☽ 
(ΘL_Θ)
●¿_●
《〠_〠》 [f*ck yeah]
حᇂﮌᇂ) [f*ck yeah]
ಠ︵ಠ凸 [f* u]
┌∩┐(>_<)┌∩┐ [f* u]
‹^› ‹(•¿•)› ‹^› [f* u]
✄————- [scissors]
╰▄︻▄╯ [YEAAAAAAHHH]
▄︻┻┳═一 [rifle]
(̅_̅_̅_̅(̅_̅_̅_̅_̅_̅_̅̅_̅()ڪے [cigarette]
( ̲̅:̲̅:̲̅:̲̅[̲̅ ̲̅]̲̅:̲̅:̲̅:̲̅) [band-aid]
ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡ [house]
lıllı ((((|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅|)))) ıllı [boombox]
┣▇▇▇═── [needle]
┣▇▇▇═─────────── [*whimper]
╰☆╮ [spinning killblade]
ϟ [Potter]
ಠ_ಠ
<script>
jQuery( document ).ready(function($){
	$(document).on('click','.elementor-location-popup a', function(event){
		elementorProFrontend.modules.popup.closePopup( {}, event);
	})
});
</script>
//******--- Remove Font Awesome ---*****
//===============================
add_action( 'elementor/frontend/after_register_styles',function() {
	foreach( [ 'solid', 'regular', 'brands' ] as $style ) {
		wp_deregister_style( 'elementor-icons-fa-' . $style );
	}
}, 20 );
//*****---  Remove Eicons:  ---*****
//==========================
add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 ); 
function remove_default_stylesheet() { 
	wp_deregister_style( 'elementor-icons' ); 
}
try {
  let hello = prompt("Type hello");
  if (hello !== 'hello'){
    throw new Error("Oops, you didn't type hello");
  }
}
catch(e) {
  alert(e.message);
}
finally {
  alert('thanks for playing!');
}
split_col = pyspark.sql.functions.split(df['my_str_col'], '-')
df = df.withColumn('NAME1', split_col.getItem(0))
df = df.withColumn('NAME2', split_col.getItem(1))
const sessionMiddleware = expressSession({
    secret: 'Tecky Academy teaches typescript',
    resave:true,
    saveUninitialized:true,
    cookie:{secure:false}
});

app.use(sessionMiddleware);

io.use((socket,next)=>{
    let req = socket.request as express.Request
    let res = req.res as express.Response
    sessionMiddleware(req, res, next as express.NextFunction
});
//...
io.on('connection', function (socket) {
    // You can set any values you want to session here.
    const req = socket.request as express.Request;
    req.session['key'] = 'XXX';
    // There is no auto save for session.
    socket.request.session.save();

    // You can also send data using socket.emit() although it is not very useful
    socket.emit('any-key','values');
    socket.on("disconnect",()=>{
        //... rest of the code
    })
});
pipeline {
    stages { ... }
    post {
       // only triggered when blue or green sign
       success {
           slackSend(channel: 'alerts-testing', color: 'good', message: ":party_parrot: NOTIFICATION: NEW RELEASE ${newRelease} WILL BE CREATED AUTOMATICALLY :party_parrot:")
       }
       // triggered when red sign
       failure {
           slackSend(channel: 'alerts-testing', color: 'RED', message: ":alarm_clock: NOTIFICATION: NEW RELEASE ${newRelease} WITH SOME FAILURE :alarm_clock:")
       }
       // trigger every-works
       always {
           slackSend ...
       }
    }
}
hasSpecialCharacters = password.contains(new RegExp(r'[!@#$%^&*(),.?":{}|<>]')); 

  final bool isNumeric = password.contains(RegExp('[0-9]'));
  final bool isLowerCase = password.contains(RegExp("(?:[^a-z]*[a-z]){1}"));
  final bool isUpperCase = password.contains(RegExp("(?:[^A-Z]*[A-Z]){1}"));
def when(predicate, when_true):
  return lambda x: when_true(x) if predicate(x) else x
  
EXAMPLES
double_even_numbers = when(lambda x: x % 2 == 0, lambda x : x * 2)
double_even_numbers(2) # 4
double_even_numbers(1) # 1
def unfold(fn, seed):
  def fn_generator(val):
    while True: 
      val = fn(val[1])
      if val == False: break
      yield val[0]
  return [i for i in fn_generator([None, seed])]
  
  
EXAMPLES
f = lambda n: False if n > 50 else [-n, n + 10]
unfold(f, 10) # [-10, -20, -30, -40, -50]
import java.io.*;
import java.util.*;

class Solution {
    public ArrayList<Integer> quadraticRoots(int a, int b, int c) {
        
       ArrayList<Integer> numbers = new ArrayList<Integer>();
       int d = (int) (Math.pow(b,2)-(4*a*c));
       int r1 = (int) Math.floor(((-1*b)+Math.sqrt(d))/(2*a));
       int r2 = (int) Math.floor(((-1*b)-Math.sqrt(d))/(2*a));
       if(d<0){
           numbers.add(-1);
       }
       else
       {
           numbers.add(Math.max(r1,r2));
           numbers.add(Math.min(r1,r2));
       }
       return numbers;
    }
}

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int T = sc.nextInt();
        while (T-- > 0) {
            int a, b, c;
            a = sc.nextInt();
            b = sc.nextInt();
            c = sc.nextInt();
            Solution obj = new Solution();
            ArrayList<Integer> ans = obj.quadraticRoots(a, b, c);
            if (ans.size() == 1 && ans.get(0) == -1)
                System.out.print("Imaginary");
            else
                for (Integer val : ans) System.out.print(val + " ");
            System.out.println();
        }
    }
}
class Solution
{
    // String array to store keypad characters
    static String hash[] = {"", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};
    
    //Function to find list of all words possible by pressing given numbers.
    static ArrayList <String> possibleWords(int a[], int N)
    {
        String str = "";
        for(int i = 0; i < N; i++)
        str += a[i];
        ArrayList<String> res = possibleWordsUtil(str);
        //arranging all possible strings lexicographically.
        Collections.sort(res); 
        return res;
                    
    }
    
    //recursive function to return all possible words that can
    //be obtained by pressing input numbers.  
    static ArrayList<String> possibleWordsUtil(String str)
    {
        //if str is empty 
        if (str.length() == 0) { 
            ArrayList<String> baseRes = new ArrayList<>(); 
            baseRes.add(""); 
  
            //returning a list containing empty string.
            return baseRes; 
        } 
        
        //storing first character of str
        char ch = str.charAt(0); 
        //storing rest of the characters of str 
        String restStr = str.substring(1); 
  
        //getting all the combination by calling function recursively.
        ArrayList<String> prevRes = possibleWordsUtil(restStr); 
        ArrayList<String> Res = new ArrayList<>(); 
      
        String code = hash[ch - '0']; 
  
        for (String val : prevRes) { 
  
            for (int i = 0; i < code.length(); i++) { 
                Res.add(code.charAt(i) + val); 
            } 
        } 
        //returning the list.
        return Res; 
    }
}
import json
import requests

apikey = '43979f1b-f353-4842-ad8a-ecb2735f3b71'

headers = {
    'X-CMC_PRO_API_KEY' : apikey,
    'Accepts' : 'application/json'
}

params = {
    'start' : '1',
    'limit' : '5',
    'convert' : 'USD'
}

url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest'

json = requests.get(url, params=params, headers=headers).json()

coins = json['data']

for coin in coins:
    print(coin['symbol'], coin['quote']['USD']['price'])
- git init         #Initialise locat repositiry
- git add <file>   #Add files to index
- git status       #Check status of working tree
- git commit       #Commit changes in index
- git push         #Push to remote repository
- git pull         #Pull latest from remote repository
- git clone        #Clone repository into a new directory
##-----------------------------------------------------------------------------
1. Configure
- git config --global user.name 'Ian Horne'
- git config --global user.email 'ian@ihorne.com'
##-----------------------------------------------------------------------------
2. File to staging
- git add <file name> #Add file 
- git rm <file name>  #Remove file
- git add *.py        #Add all .py files to staging area
- git add .           #Add all files in directory to staging area
##-----------------------------------------------------------------------------
3. Commit staging area to your local repository
- git commit -m "your comments"
##-----------------------------------------------------------------------------
4. Ignore file
- create .git ignore file <touch .gitignore> 
- enter file or folder into .gitignore file to exclude it from the repository 
   -Add file           - <file.ext>
   -Add directory      - </dirname> 
   -Add all text files - <*.txt>
##-----------------------------------------------------------------------------
5. Branches - https://www.atlassian.com/git/tutorials/using-branches
- git branch <branch_name>    #Create branch
- git checkout <branch_name>  #move to branch
- git add <filename>          #add file change to branches
- git commit -m "comments"    #commit file and add comments
- git checkout <master>       #move to main branch
- git merge <branch name>     #merge branch into current branch location
- git push                    #push branch to hub
- git branch -d <branch>      #delete branch

##-----------------------------------------------------------------------------
6. Remove repositories
- Create new repository
- git remote                #list all remote repositories
- git remote add origin https://github.com/Ianhorne73/WageReport.git
- git push -u origin master
##-----------------------------------------------------------------------------
Future workflow
- change file
- git add .
- git push
##-----------------------------------------------------------------------------
Clone repository 
- git clone <get link from GIT hub>  #Clone repository from GIT Hub
- git pull                           #Get latest updates
select Opportunity__r.Country_of_Ownership__c,CALENDAR_MONTH(Transaction_Allocation__c.Close_Date__c)themonth,
  CALENDAR_YEAR(Transaction_Allocation__c.Close_Date__c)theyear, COUNT_DISTINCT(Opportunity__r.Id) The_Count, sum(Opportunity__r.Ask_Amount__c) amount

from Transaction_Allocation__c

where 
(Transaction_Allocation__c.Close_Date__c  > 2022-03-31 AND Transaction_Allocation__c.Close_Date__c  < NEXT_N_DAYS:1) 
AND
(Transaction_Allocation__c.Stage__c IN ('Posted','Refunded','Failed','Refund','Reversal')
AND
((
Opportunity__r.RecordTypeId IN ('012w00000006jGy')
 AND
Opportunity__r.Date_Recurring_Donation_Established__c  > 2022-03-31
 
)
OR
(Opportunity__r.RecordTypeId IN ('0122X000000ie1A') 
AND
Opportunity__r.Direct_Regular_Donor_Start_of_FY__c = False))
 
AND
Transaction_Allocation__c.GL_Code__c IN ('50030','50090')
)
 

Group by 
Opportunity__r.Country_of_Ownership__c,CALENDAR_MONTH(Transaction_Allocation__c.Close_Date__c),
  CALENDAR_YEAR(Transaction_Allocation__c.Close_Date__c)
# Open the terminal in the app dyno in Heroku

heroku run bash

 

# We may then run the seed file

node bin/seed.js
import org.json.*;


JSONObject obj = new JSONObject(" .... ");
String pageName = obj.getJSONObject("pageInfo").getString("pageName");

JSONArray arr = obj.getJSONArray("posts");
for (int i = 0; i < arr.length(); i++)
{
    String post_id = arr.getJSONObject(i).getString("post_id");
    ......
}
star

Mon May 08 2023 17:26:03 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/17398019/convert-datatable-to-json-in-c-sharp

@javicinhio #cs

star

Wed Jan 08 2020 19:00:00 GMT+0000 (Coordinated Universal Time)

@solitaire_4_07 #css #design #gradient

star

Fri May 01 2020 11:04:04 GMT+0000 (Coordinated Universal Time) https://css-tricks.com/snippets/wordpress/removing-jetpack-css/

@RedQueen #css

star

Wed May 27 2020 07:31:50 GMT+0000 (Coordinated Universal Time)

@performmarketing #css

star

Mon Jun 22 2020 12:55:43 GMT+0000 (Coordinated Universal Time) https://css-tricks.com/snippets/css/ribbon/

@Amna #css

star

Mon May 11 2020 22:00:28 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/css/css_grid.asp

@Ulises Villa #css

star

Sat Jun 06 2020 16:08:47 GMT+0000 (Coordinated Universal Time)

@usama #css

star

Fri Jan 22 2021 13:05:25 GMT+0000 (Coordinated Universal Time) https://codepen.io/marcobiedermann/pen/WNGWzYR

@bifrost #css #react.js

star

Tue May 04 2021 15:40:32 GMT+0000 (Coordinated Universal Time) https://medium.com/pragmatic-programmers/styling-buttons-and-links-ed4e8c354369

@randomize_first #css

star

Fri Nov 12 2021 13:51:39 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/37754621/how-to-vertically-center-text-in-a-span/37754674

@arielvol #css

star

Mon Nov 29 2021 23:44:23 GMT+0000 (Coordinated Universal Time) https://es.stackoverflow.com/questions/499239/transici%c3%b3n-css-de-background-image/500273#500273

@samn #css #html #z-index

star

Tue Jan 11 2022 21:41:16 GMT+0000 (Coordinated Universal Time)

@shadowtek #wordpress #css

star

Wed Feb 16 2022 20:19:26 GMT+0000 (Coordinated Universal Time) https://codeconvey.com/horizontal-news-ticker-css/

@VM89 #css

star

Wed Jun 29 2022 23:07:31 GMT+0000 (Coordinated Universal Time) https://meyerweb.com/eric/tools/css/reset/

@adeilsonaalima #css

star

Sun Nov 12 2023 21:19:22 GMT+0000 (Coordinated Universal Time)

@dannyholman #css

star

Tue Nov 21 2023 08:13:13 GMT+0000 (Coordinated Universal Time) https://www.emailaudience.com/dark-mode-email/

@Sebhart #css #mark-up #email

star

Thu Dec 26 2019 18:27:15 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/52146269/how-to-decorate-text-stroke-in-flutter

@sher93oz #dart #flutter #howto

star

Wed Jan 22 2020 18:35:33 GMT+0000 (Coordinated Universal Time) https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e

@loop_ifthen #dart #flutter #layout

star

Fri Dec 04 2020 20:33:23 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/51733044/flutter-blinking-button

@Kenana #dart

star

Sun Jul 04 2021 12:00:39 GMT+0000 (Coordinated Universal Time) https://github.com/Temidtech/Flutter-Cheat-Sheet/blob/master/README.md

@putrandasky #dart #flutter

star

Fri Sep 24 2021 02:03:52 GMT+0000 (Coordinated Universal Time)

@viewsource #dart

star

Sun Jan 30 2022 11:39:22 GMT+0000 (Coordinated Universal Time)

@abir_hasnat95 #flutter #dart

star

Thu Aug 06 2020 08:57:00 GMT+0000 (Coordinated Universal Time)

@import_fola #python #pandas #data-cleaning

star

Thu Aug 18 2022 07:19:21 GMT+0000 (Coordinated Universal Time)

@ClemensBerteld #pyproj #python #database #path

star

Mon Oct 18 2021 02:56:55 GMT+0000 (Coordinated Universal Time)

@ianh #python #datetime #pandas

star

Wed Apr 01 2020 10:09:44 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/5701305/how-to-get-all-imports-defined-in-a-class-using-java-reflection

@SunLoves #java #java #reflection #dependencies

star

Tue Mar 31 2020 05:32:45 GMT+0000 (Coordinated Universal Time)

@EnjoyByte #python #python #dictionary #mergedictionary #dict

star

Wed Dec 30 2020 19:26:24 GMT+0000 (Coordinated Universal Time)

@lewiseman #django,python,django #django

star

Fri Oct 01 2021 11:30:05 GMT+0000 (Coordinated Universal Time)

@alexactivate #docker

star

Wed Jun 16 2021 13:49:40 GMT+0000 (Coordinated Universal Time) http://wrttn.me/30dbfd/

@hisam #unicode #emoticons #dongers

star

Fri Jan 10 2020 20:51:27 GMT+0000 (Coordinated Universal Time) https://github.com/Microsoft/vscode

@mishka #microsoft #typescript #editor #opensource

star

Wed May 12 2021 22:36:52 GMT+0000 (Coordinated Universal Time)

@Alz #php #wordpress #elementor

star

Wed May 12 2021 22:37:16 GMT+0000 (Coordinated Universal Time)

@Alz #php #wordpress #elementor

star

Wed Jan 01 2020 19:00:00 GMT+0000 (Coordinated Universal Time) https://codeburst.io/learn-how-to-handle-javascript-errors-with-try-throw-catch-finally-83b4f9ef8c6f

@new_roman11 #javascript #errors #howto

star

Wed Feb 24 2021 17:36:03 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/39235704/split-spark-dataframe-string-column-into-multiple-columns

@lorenzo_xcv #pyspark #spark #python #etl

star

Thu Aug 19 2021 17:56:37 GMT+0000 (Coordinated Universal Time)

@ExplodeMilk #typescript #express #socketio

star

Thu Jan 21 2021 20:06:06 GMT+0000 (Coordinated Universal Time)

@abovetheroar #qgis #fieldcalculator

star

Fri Jan 14 2022 15:10:07 GMT+0000 (Coordinated Universal Time) https://gist.github.com/rahulbagal/4a06a997497e6f921663b69e5286d859

@lewiseman #flutter

star

Sat Jan 11 2020 20:54:48 GMT+0000 (Coordinated Universal Time) https://www.30secondsofcode.org/python/s/when/

@dry_toasts #python #function

star

Fri Jan 10 2020 19:00:00 GMT+0000 (Coordinated Universal Time) https://www.30secondsofcode.org/python/s/unfold/

@peterents #python #lists #function

star

Sun Feb 06 2022 01:36:19 GMT+0000 (Coordinated Universal Time) https://practice.geeksforgeeks.org/problems/quadratic-equation-roots/1/?track=DSASP-Mathematics&batchId=190

@Uttam #java #mathematics #gfg #geeksforgeeks #quadraticequationroots

star

Sun Feb 06 2022 23:42:45 GMT+0000 (Coordinated Universal Time) https://practice.geeksforgeeks.org/problems/possible-words-from-phone-digits-1587115620/1/?track=DSASP-Recursion&batchId=190

@Uttam #java #gfg #geeksforgeeks #recursion #possiblewordsfrom phone digits

star

Thu Mar 17 2022 17:43:19 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v=iIGNhBcj4zs

@Taylor #python #get #requests

star

Mon Oct 26 2020 04:28:26 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v=SWYqp7iY_Tc

@ianh #git

star

Wed Jun 01 2022 11:22:06 GMT+0000 (Coordinated Universal Time)

@Matt_Stone #globalkpi

star

Mon Jun 14 2021 12:02:44 GMT+0000 (Coordinated Universal Time)

@hisam #heroku #seed #nodejs

star

Thu Dec 26 2019 16:01:30 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/2591098/how-to-parse-json-in-java

@mishka #java #howto #json

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension