Snippets Collections
# Python3 implementation of the approach 

# Function to sort the array such that 
# negative values do not get affected 
def sortArray(a, n): 

	# Store all non-negative values 
	ans=[] 
	for i in range(n): 
		if (a[i] >= 0): 
			ans.append(a[i]) 

	# Sort non-negative values 
	ans = sorted(ans) 

	j = 0
	for i in range(n): 

		# If current element is non-negative then 
		# update it such that all the 
		# non-negative values are sorted 
		if (a[i] >= 0): 
			a[i] = ans[j] 
			j += 1

	# Print the sorted array 
	for i in range(n): 
		print(a[i],end = " ") 


# Driver code 

arr = [2, -6, -3, 8, 4, 1] 

n = len(arr) 

sortArray(arr, n) 

const comparePassword = async (password, hash) => {
    try {
        // Compare password
        return await bcrypt.compare(password, hash);
    } catch (error) {
        console.log(error);
    }

    // Return false if error
    return false;
};

//use case
(async () => {
    // Hash fetched from DB
    const hash = `$2b$10$5ysgXZUJi7MkJWhEhFcZTObGe18G1G.0rnXkewEtXq6ebVx1qpjYW`;

    // Check if password is correct
    const isValidPass = await comparePassword('123456', hash);

    // Print validation status
    console.log(`Password is ${!isValidPass ? 'not' : ''} valid!`);
    // => Password is valid!
})();
#!/bin/bash
# Bash Menu Script Example

PS3='Please enter your choice: '
options=("Option 1" "Option 2" "Option 3" "Quit")
select opt in "${options[@]}"
do
    case $opt in
        "Option 1")
            echo "you chose choice 1"
            ;;
        "Option 2")
            echo "you chose choice 2"
            ;;
        "Option 3")
            echo "you chose choice $REPLY which is $opt"
            ;;
        "Quit")
            break
            ;;
        *) echo "invalid option $REPLY";;
    esac
done
wsl --shutdown
diskpart
# open window Diskpart
select vdisk file="C:\WSL-Distros\…\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit
javascript:(d=>{var css=`:root{background-color:#f1f1f1;filter:invert(1) hue-rotate(180deg)}img:not([src*=".svg"]),picture,video{filter: invert(1) hue-rotate(180deg)}`,style,id="dark-mode",ee=d.getElementById(id);if(null!=ee)ee.parentNode.removeChild(ee);else {style = d.createElement('style');style.type="text/css";style.id=id;if(style.styleSheet)style.styleSheet.cssText=css;else style.appendChild(d.createTextNode(css));(d.head||d.querySelector('head')).appendChild(style)}})(document)
// Optimised Bubble Sort

import java.io.*;

class GFG {
    
    static void bubbleSort(int arr[], int n){
        boolean swapped;
        
        for(int i = 0; i < n; i++){
            
            swapped = false;
            
            for(int j = 0; j < n - i - 1; j++){
                if( arr[j] > arr[j + 1]){
                    
                    // swapping
                    int temp = arr[j];
                    arr[j] = arr[j+1];
                    arr[j+1] = temp;
                    
                    swapped = true;
                    
                }
            }
            if(swapped == false)
            break;
        }
    }
    
	public static void main (String[] args) {
	    int a[] = {2, 1, 4, 3};
	    bubbleSort(a, 4);
	    
	    for(int i = 0; i < 4; i++){
	        System.out.print(a[i] + " ");     // OUTPUT : 1 2 3 4
	    }
	}
}






// Bubble Sort

import java.io.*;

class GFG {
    
    static void bubbleSort(int arr[], int n){
        for(int i = 0; i < n; i++){
            for(int j = 0; j < n - i - 1; j++){
                if( arr[j] > arr[j + 1]){
                    
                    // swapping
                    int temp = arr[j];
                    arr[j] = arr[j+1];
                    arr[j+1] = temp;
                    
                }
            }
        }
    }
    
	public static void main (String[] args) {
	    int a[] = {2, 1, 4, 3};
	    bubbleSort(a, 4);
	    
	    for(int i = 0; i < 4; i++){
	        System.out.print(a[i] + " ");     // OUTPUT : 1 2 3 4
	    }
	}
}
let userName = '';
/* Con nombre o sin nombre */
userName ? console.log(`Hello, ${userName}!`) : console.log('Hello!');
/* Se guarda la pregunta */
let userQuestion = 'Is this true?';
/* Se muestra la pregunta */
console.log(`Hey ${userName}! You just asked this: ${userQuestion}`);
/* Se genera un número aleatorio entre 0-8 */
randomNumber = Math.floor(Math.random() * 8);
/* Se guarda la respuesta en una variable */
let eightBall = '';
/* Se guardan distintas respuestas para el número que toque */
// takes in randomNumber, then eightBall = 'Reply'
// you can use if/else or switch;
// If the randomNumber is 0, then save an answer to the eightBall variable; if randomNumber is 1, then save the next answer, and so on.
/* Se utiliza switch */
/*
switch (randomNumber) {
  case 0:
    eightBall = 'It is certain';
    break;
  case 1:
    eightBall = 'It is decidedly so';
    break;
  case 3:
    eightBall = 'Reply hazy try again';
    break;
  case 4:
    eightBall = 'Cannot predict now';
    break;
  case 5:
    eightBall = 'My sources say no';
    break;
  case 6:
    eightBall = 'Outlook not so good';
    break;
  case 7:
    eightBall = 'Signs point to yes';
    break;
}
*/
/* Se utiliza if */
if (randomNumber === 0) {
  eightBall = 'It is certain';
} 
if (randomNumber === 1) {
  eightBall = 'It is decidedly so';
}
if (randomNumber === 2) {
  eightBall = 'Reply hazy try again';
}
if (randomNumber === 3) {
  eightBall = 'Cannot predict now';
}
if (randomNumber === 4) {
  eightBall = 'Do not count on it';
}
if (randomNumber === 5) {
  eightBall = 'My sources say no';
}
if (randomNumber === 6) {
  eightBall = 'Outlook not so good';
}
if (randomNumber === 7) {
  eightBall = 'Signs point to yes';
}
/* Se muestra */
console.log(eightBall);
def generateParenthesis(n):
    #only add parentehsis if openN < n 
    #only add close parenthesis if closeN < openN 
    #valid if open == closed == n 

    stack = []
    res = []
    
    def backtrack(openN, closeN): 
        if openN == closeN == n: 
            res.append("".join(stack))
            return 
        if openN < n: 
            stack.append('(')
            backtrack(openN + 1, closeN)
            stack.pop()
        if closeN < openN: 
            stack.append(")")
            backtrack(openN, closeN + 1)
            stack.pop()
        #stack.pop() is necessary to clean up stack and come up with other solutions 
        
    backtrack(0, 0)
    #concept is you build openN, closeN but initially, they are at 0 
    return res 

generateParenthesis(3)
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
/* This will come in the body at XML but the header will be text/plain, which is why  
all this is happening manually to get this read from the stream.  
*/  
var reqHeaders = request.headers;
gs.info("CPSNS: reqHeaders content-type" + reqHeaders['content-type']);
if (reqHeaders['content-type'] == "text/plain; charset=UTF-8") {
    var stream = request.body.dataStream;
    var reader = new GlideTextReader(stream);
    var input = "";
    var ln = "";
    while ((ln = reader.readLine()) != null) {
        input += ln;
    }
    gs.info("CPSNS: SUB" + input);
} else {
    var body = {};
    var data = request.body.data;

    gs.info("CPSNS: req.body data" + data);

}
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    TextBox1.Text = "Bernard" + vbTab + "32"
    TextBox2.Text = "Luc" + vbTab + "47"
    TextBox3.Text = "François-Victor" + vbTab + "12"
End Sub
.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 .rotate {

  transform: rotate(-90deg);


  /* Legacy vendor prefixes that you probably don
                                
.box-one {
	width: 100px;
	margin: 0 auto;
}

.box-two {
	width: 100px;
	margin-left: auto;
    margin-right: auto;
}
/*EX:.container {
    padding: 0 15px;
// 576px window width and more
    @include sm {
        padding: 0 20px;
    }
// 992px window width and more
    @include lg {
        margin-left: auto;
        margin-right: auto;
        max-width: 1100px;
    } */

// Small tablets and large smartphones (landscape view)
$screen-sm-min: 576px;

// Small tablets (portrait view)
$screen-md-min: 768px;

// Tablets and small desktops
$screen-lg-min: 992px;

// Large tablets and desktops
$screen-xl-min: 1200px;


// Small devices
@mixin sm {
   @media (min-width: #{$screen-sm-min}) {
       @content;
   }
}

// Medium devices
@mixin md {
   @media (min-width: #{$screen-md-min}) {
       @content;
   }
}

// Large devices
@mixin lg {
   @media (min-width: #{$screen-lg-min}) {
       @content;
   }
}

// Extra large devices
@mixin xl {
   @media (min-width: #{$screen-xl-min}) {
       @content;
   }
}
.border { 
    width: 400px;
    padding: 20px;
    border-top: 10px solid #FFFF00;
    border-bottom:10px solid #FF0000;
    background-image: 
        linear-gradient(#FFFF00, #FF0000),
        linear-gradient(#FFFF00, #FF0000)
    ;
    background-size:10px 100%;
    background-position:0 0, 100% 0;
    background-repeat:no-repeat;
}
.LikeButton button {
  margin: 1rem;
  transition: all 0.5s ease;
  transform: scale(1);
}

.LikeButton button:hover {
  cursor: pointer;
  transform: scale(1.25);
  filter: brightness(120%);
}
.text-gradient {
    background: linear-gradient(94.23deg,#5374fa 12.41%,#fd9179 52.55%,#ff6969 89.95%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
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'),
            ),
          ],
        ),
      ),
    ),
  );
}
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
keys, values)) # {'a': 2, 'c': 4, 'b': 3}
 
 
#make a function: def is the keyword for the function:
def to_dictionary(keys, values):
 
 
#return is the keyword that tells program that function has to return value   
return dict(zip(keys, values))
 
  
 
# keys and values are the lists:
 
keys = ["a", "b", "c"]   
 
values = [2, 3, 4]
                                
                                
// models.py
from django.db.models.fields import FloatField

class Product(models.Model):
    title = models.CharField(max_length=225)
    price = models.FloatField()
    discount_percent = FloatField(default=0) # Assigning it a default value of 0 so it doesn't throw a 'NoneType' error when it's null.
  
    @property
    def discount(self):
        if self.discount_percent > 0:
            discounted_price = self.price - self.price * self.discount_percent / 100
            return discounted_price

class OrderItem(models.Model):
    product = models.ForeignKey(Product, on_delete=models.SET_NULL, null=True)
    order = models.ForeignKey(Order, on_delete=models.SET_NULL, null=True)
    quantity = models.IntegerField(default=0, null=True, blank=True)
	
	# get_total function has to be updated too to calculate using the correct current price
    @property
    def get_total(self):
        if self.product.discount_percent > 0:
            price_now = self.product.price - self.product.price * self.product.discount_percent / 100
        else:
            price_now = self.product.price

        total = price_now * self.quantity
        return total

// Your template
{% if product.discount_percent %}
                <h4 class="product__price--original">₾{{ product.price|floatformat:2 }}</h4>
                <h4 class="product__price--discounted">₾{{ product.discount|floatformat:2 }}</h4>
                {% else %}  
                <h4>₾{{ product.price|floatformat:2 }}</h4>
                {% endif %}
                
// Here's some Sass too, if you need it
.product__price {
  &--original {
    text-decoration: line-through;
  }
  &--discounted {
    color: green;
  }
}
<html>	
   
   <input id="contact" name="address">
 
 <script>

    document.getElementById("contact").attribute = "phone";
	
    //ALTERNATIVE METHOD TO CHANGE
    document.getElementById("contact").setAttribute('name', 'phone');	

  </script>

</html>
//*****---  Remove Eicons:  ---*****
//==========================
add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 ); 
function remove_default_stylesheet() { 
	wp_deregister_style( 'elementor-icons' ); 
}
import java.io.*;

class GFG {
    
    static void selectionSort(int arr[], int n){
        for(int i = 0; i < n; i++){
            int min_ind = i;
            
            for(int j = i + 1; j < n; j++){
                if(arr[j] < arr[min_ind]){
                    min_ind = j;
                }
            }
            
            int temp = arr[i];
            arr[i] = arr[min_ind];
            arr[min_ind] = temp;
        }
    }
    
	public static void main (String[] args) {
	    int a[] = {2, 1, 4, 3};
	    selectionSort(a, 4);
	    
	    for(int i = 0; i < 4; i++){
	        System.out.print(a[i] + " ");    // OUTPUT : 1 2 3 4
	    }
	}
}
git log --all --graph --decorate
$w.onReady(function () {
	$w('#collapsedelement').collapse();
    $w('#closebtn').hide();
});

export function openbtn_click(event) {
	let $item = $w.at(event.context);

	if ($item("#collapsedelement").collapsed) {
		$item("#collapsedelement").expand();
		$item('#openbtn').hide();
		$item('#closebtn').show();

	} else {
		$item("#collapsedelement").collapse();
		$item('#openbtn').show();
		$item('#closebtn').hide();
	}
}

export function closebtn_click(event) {
	let $item = $w.at(event.context);

	if ($item("#collapsedelement").collapsed) {
		$item("#collapsedelement").expand();
		$item('#openbtn').hide();
		$item('#closebtn').show();

	} else {
		$item("#collapsedelement").collapse();
		$item('#openbtn').show();
		$item('#closebtn').hide();
	}
}
<h3>Email</h3>
<div class="py-1">
    <input class="p-1 br-1 email-input" type="email" placeholder="@email">
</div>
<h3>Password</h3>
<div class="py-1">
    <input class="p-1 br-1 password-input" type="password" placeholder="password">
</div>
<h3>Ranges</h3>
<div class="py-1">
    <input class="p-1 range-input" type="range">
</div>
<h3>Radio buttons</h3>
<div class="py-1">
    <input class="p-2 radio-btn" type="radio"><span class="px-1">Option one is this and that—be sure to include why it's great</span>
</div>
<h3>Checkboxes</h3>
<div class="py-1">
    <input class="p-2 radio-btn" type="checkbox"><span class="px-1">Default checkbox</span>
</div>
<div class="py-1">
    <input class="p-1 btn-primary" type="submit">
</div>
Map<String, String> map = ...
for (Map.Entry<String, String> entry : map.entrySet()) {
    System.out.println(entry.getKey() + "/" + entry.getValue());
}
String[][] deepArray = new String[][] {{"John", "Mary"}, {"Alice", "Bob"}};
System.out.println(Arrays.toString(deepArray));
//output: [[Ljava.lang.String;@106d69c, [Ljava.lang.String;@52e922]
System.out.println(Arrays.deepToString(deepArray));
public <T> List<Class<? extends T>> findAllMatchingTypes(Class<T> toFind) {
    foundClasses = new ArrayList<Class<?>>();
    List<Class<? extends T>> returnedClasses = new ArrayList<Class<? extends T>>();
    this.toFind = toFind;
    walkClassPath();
    for (Class<?> clazz : foundClasses) {
        returnedClasses.add((Class<? extends T>) clazz);
    }
    return returnedClasses;
}
(function(){
    //
    var $posts = $('#posts li');
    var $search = $('#search');
    var cache = [];

    $posts.each(function(){
        cache.push({
            element: this,
            title: this.title.trim().toLowerCase(),
        });
    });

    function filter(){
        var query = this.value;
        console.log("query is "+query);
        cache.forEach(function(post){
            var index = 0;

            if (query) {
                index = post.title.indexOf(query);

            }
            var results = document.getElementsByClassName('search-results');
            results.innerHTML = "<li>"+cache.title+"</li>";
            post.element.style.display = index === -1 ? 'none' : '';
        });
    }

   if ('oninput' in $search[0]){
        $search.on('input', filter);
    } else {
        $search.on('keyup', filter);
    }

}());
var d = new Date();
var n = d.getFullYear();
const renameKeys = (keysMap, obj) =>
  Object.keys(obj).reduce(
    (acc, key) => ({
      ...acc,
      ...{ [keysMap[key] || key]: obj[key] }
    }),
    {}
  );
EXAMPLES
const obj = { name: 'Bobo', job: 'Front-End Master', shoeSize: 100 };
renameKeys({ name: 'firstName', job: 'passion' }, obj); // { firstName: 'Bobo', passion: 'Front-End Master', shoeSize: 100 }
                             
                                
                                package com.rizki.mufrizal.belajar.spring.boot.domain

import org.springframework.data.annotation.Id
import org.springframework.data.mongodb.core.mapping.Document
import org.springframework.data.mongodb.core.mapping.Field

/**
 *
 * @Author Rizki Mufrizal <mufrizalrizki@gmail.com>
 * @Web <https://RizkiMufrizal.github.com>
 * @Since 12 January 2017
 * @Time 10:13 PM
 * @Project Belajar-Spring-Boot
 * @Package com.rizki.mufrizal.belajar.spring.boot.domain
 * @File Barang
 *
 */
@Document(collection = "tb_barang")
class Barang implements Serializable {

    @Id
    @Field(value = "id_barang")
    String idBarang

    @Field(value = "nama_barang")
    String namaBarang

    @Field(value = "jenis_barang")
    JenisBarang jenisBarang

    @Field(value = "tanggal_kadaluarsa")
    Date tanggalKadaluarsa

    @Field(value = "harga_satuan_barang")
    BigDecimal hargaSatuanBarang

    @Field(value = "jumlah_barang_tersedia")
    Integer jumlahBarangTersedia

}
                                
amount
	.toFixed(2)
    .toString()
    .replace(/\B(?=(\d{3})+(?!\d))/g, ",")
    
// or

amount
	.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
//Replace the closeSelf() function in iframe page to the following

function closeSelf() {
   parent.window.postMessage("removetheiframe", "*");
}

//and on the parent page, add the following code to listen when the iframe sends a message :

function receiveMessage(event){
   if (event.data=="removetheiframe"){
      var element = document.getElementById('iframe-element');
      element.parentNode.removeChild(element);
   }
}
window.addEventListener("message", receiveMessage, false);
   var Person = mongoose.model('Person', yourSchema);
   // find each person with a name contains 'Ghost'
   Person.findOne({ "name" : { $regex: /Ghost/, $options: 'i' } },
          function (err, person) {
                 if (err) return handleError(err);
                 console.log('%s %s is a %s.', person.name.first, person.name.last, person.occupation);

   });
const { useState } = React;

function PageComponent() {
  const [count, setCount] = useState(0);
  const increment = () => {
    setCount(count + 1)
  }

  return (
    <div className="App">
      <ChildComponent onClick={increment} count={count} />         
      <h2>count {count}</h2>
      (count should be updated from child)
    </div>
  );
}

const ChildComponent = ({ onClick, count }) => {
  return (
    <button onClick={onClick}>
       Click me {count}
    </button>
  )
};

ReactDOM.render(<PageComponent />, document.getElementById("root"));
const buff_to_base64 = (buff) => btoa(String.fromCharCode.apply(null, buff));

const base64_to_buf = (b64) =>
  Uint8Array.from(atob(b64), (c) => c.charCodeAt(null));

const enc = new TextEncoder();
const dec = new TextDecoder();

const getPasswordKey = (password) =>
  window.crypto.subtle.importKey("raw", enc.encode(password), "PBKDF2", false, [
    "deriveKey",
  ]);

const deriveKey = (passwordKey, salt, keyUsage) =>
  window.crypto.subtle.deriveKey(
    {
      name: "PBKDF2",
      salt: salt,
      iterations: 250000,
      hash: "SHA-256",
    },
    passwordKey,
    {
      name: "AES-GCM",
      length: 256,
    },
    false,
    keyUsage
  );

export async function encrypt(secretData, password) {
  try {
    const salt = window.crypto.getRandomValues(new Uint8Array(16));
    const iv = window.crypto.getRandomValues(new Uint8Array(12));
    const passwordKey = await getPasswordKey(password);
    const aesKey = await deriveKey(passwordKey, salt, ["encrypt"]);
    const encryptedContent = await window.crypto.subtle.encrypt(
      {
        name: "AES-GCM",
        iv: iv,
      },
      aesKey,
      enc.encode(secretData)
    );

    const encryptedContentArr = new Uint8Array(encryptedContent);
    let buff = new Uint8Array(
      salt.byteLength + iv.byteLength + encryptedContentArr.byteLength
    );
    buff.set(salt, 0);
    buff.set(iv, salt.byteLength);
    buff.set(encryptedContentArr, salt.byteLength + iv.byteLength);
    const base64Buff = buff_to_base64(buff);
    return base64Buff;
  } catch (e) {
    console.log(`Error - ${e}`);
    return "";
  }
}

export async function decrypt(encryptedData, password) {
  const encryptedDataBuff = base64_to_buf(encryptedData);
  const salt = encryptedDataBuff.slice(0, 16);
  const iv = encryptedDataBuff.slice(16, 16 + 12);
  const data = encryptedDataBuff.slice(16 + 12);
  const passwordKey = await getPasswordKey(password);
  const aesKey = await deriveKey(passwordKey, salt, ["decrypt"]);
  const decryptedContent = await window.crypto.subtle.decrypt(
    {
      name: "AES-GCM",
      iv: iv,
    },
    aesKey,
    data
  );
  return dec.decode(decryptedContent);
}
let now = new Date();
alert( now ); // показывает текущие дату и время
function my_scripts() {
     if(!is_admin() {
          wp_deregister_script('jquery');
          wp_enqueue_script('jquery', '//code.jquery.com/jquery-latest.min.js');
     }
}
add_action('wp_enqueue_scripts', 'my_scripts');


//Complete the method that takes a boolean value and return a "Yes" string for true, or a "No" string for false.

function boolToWord( bool ){
const str = bool === true ? "Yes" : "No"
return str
  }
[
   {
      "mostrar":"in,out",
      "label":"CURSO DE FORMAÇÃO EM TERAPEUTA AYURVEDA",
      "campo":"cursotitulo",
      "tipo":"titulo6",
      "colunas_in":"12",
      "colunas_out":"12"
   },
   {
      "mostrar":"in,out",
      "label":"Nome Completo",
      "campo":"nomecompleto",
      "tipo":"text",
      "colunas_in":"12",
      "colunas_out":"4",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"Data de nascimento",
      "campo":"data_nasc",
      "tipo":"data",
      "colunas_in":"6",
      "colunas_out":"4",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"CPF",
      "campo":"nrocpf",
      "tipo":"cpf",
      "colunas_in":"6",
      "colunas_out":"4",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"Estado Civil",
      "campo":"estado_civil",
      "tipo":"select_valor",
      "colunas_in":"6",
      "colunas_out":"4",
      "opcoes":[
         "Casado",
         "Solteiro",
         "Separado",
         "Viuvo"
      ],
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"Profissão",
      "campo":"profi",
      "tipo":"text",
      "colunas_in":"6",
      "colunas_out":"4",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"Email",
      "campo":"email",
      "tipo":"text",
      "colunas_in":"12",
      "colunas_out":"4",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"Telefone Celular",
      "campo":"telcelular",
      "tipo":"text",
      "placeholder":"(xx) x xxxx-xxxx",
      "colunas_in":"6",
      "colunas_out":"6",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"Telefone Residencial",
      "campo":"telresidencial",
      "tipo":"text",
      "placeholder":"(xx) x xxxx-xxxx",
      "colunas_in":"6",
      "colunas_out":"6"
   },
   {
      "mostrar":"in,out",
      "label":"Endereço",
      "campo":"logradouro",
      "tipo":"text",
      "colunas_in":"6",
      "colunas_out":"4",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"Cidade",
      "campo":"cid",
      "tipo":"text",
      "colunas_in":"6",
      "colunas_out":"4",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"CEP",
      "campo":"cep_user",
      "tipo":"text",
      "colunas_in":"6",
      "colunas_out":"4",
      "requerido":"1"
   },
   {
      "mostrar":"in,out",
      "label":"PAGAMENTO",
      "campo":"pagamento",
      "tipo":"titulo6",
      "colunas_in":"12",
      "colunas_out":"12"
   },
   {
      "mostrar":"in,out",
      "label":"Forma de Pagamento",
      "campo":"forma_pagamento",
      "tipo":"select_valor",
      "colunas_in":"6",
      "colunas_out":"6",
      "requerido":"1",
      "opcoes":[
         "À vista",
         "À prazo",
         "Boleto",
         "Cheque"
      ],
      "conditions":[
         {
            "when":"equal",
            "value":"À prazo",
            "action":{
               "show":[
                  "parcelas"
               ],
               "required":[
                  "parcelas"
               ]
            }
         }
      ]
   },
   {
      "mostrar":"in,out",
      "label":"Em quantas parcelas?",
      "campo":"parcelas",
      "tipo":"number",
      "colunas_in":"12",
      "colunas_out":"12",
      "classe":"hide"
   },
   {
      "mostrar":"in,out",
      "label":"Escola",
      "campo":"escola",
      "tipo":"select_valor",
      "colunas_in":"12",
      "colunas_out":"12",
      "requerido":"1",
      "opcoes":[
         "Semente da Paz",
         "Leveza do Ser",
         "Beija Flor",
         "La vie",
         "Karina Gomes"
      ],
      "aceita_recategorizar":"1"
   },
   {
      "mostrar":"in,out",
      "label":"TERMO DE AUTORIZAÇÃO",
      "campo":"termo",
      "tipo":"titulo6",
      "colunas_in":"12",
      "colunas_out":"12"
   },
   {
      "mostrar":"in,out",
      "campo":"autori",
      "tipo":"texto",
      "valor_padrao":"Eu, autorizo a gravar (minha imagem em vídeo ou fotografia) e veicular minha imagem e depoimentos em qualquer meios de comunicação para fins didáticos, de pesquisa e divulgação de conhecimento científico sem quaisquer ônus e restrições. Fica ainda autorizada, de livre e espontânea vontade, para os mesmos fins, a cessão de direitos da veiculação, não recebendo para tanto qualquer tipo de remuneração. ",
      "colunas_in":"12",
      "colunas_out":"12"
   },
   {
      "mostrar":"in,out",
      "label":"Eu concordo e autorizo",
      "campo":"concordancia",
      "tipo":"checkbox",
      "colunas_in":"12",
      "colunas_out":"12",
      "requerido":"1"
   }
]
val sheetState = rememberModalBottomSheetState(
    initialValue = ModalBottomSheetValue.Hidden,
    confirmStateChange = { it != ModalBottomSheetValue.HalfExpanded }
)
star

Thu Dec 26 2019 15:35:22 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/sort-an-array-without-changing-position-of-negative-numbers/

@divisionjava #python #interesting #arrays #sorting #interviewquestions

star

Sun Jun 06 2021 15:47:09 GMT+0000 (Coordinated Universal Time) https://attacomsian.com/blog/nodejs-password-hashing-with-bcrypt

@hisam #bcrypt #authentication #express #nodejs #password

star

Sat Apr 24 2021 21:00:41 GMT+0000 (Coordinated Universal Time) https://askubuntu.com/questions/1705/how-can-i-create-a-select-menu-in-a-shell-script

@LavenPillay #bash

star

Mon Dec 27 2021 12:25:33 GMT+0000 (Coordinated Universal Time) https://github.com/microsoft/WSL/issues/4699#issuecomment-627133168

@RokoMetek #bash #powershell

star

Sat Mar 13 2021 17:40:37 GMT+0000 (Coordinated Universal Time) https://gist.github.com/lweiss01/7a6c60843b64236b018e7398fb0d5f40#file-darkmodeswitcher-js

@lisa #javascript #js #bookmarklet #css

star

Tue Feb 08 2022 14:45:51 GMT+0000 (Coordinated Universal Time)

@Uttam #java #gfg #geeksforgeeks #lecture #sorting #bubblesort

star

Mon Oct 11 2021 12:26:57 GMT+0000 (Coordinated Universal Time) https://www.codecademy.com/courses/introduction-to-javascript/projects/magic-eight-ball-1

@ianvalentino #javascript #controlflow #if...else #if #else #switch...case #switch #case

star

Tue Sep 27 2022 02:03:10 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/generate-parentheses/

@bryantirawan #python #neetcode #parenthesis #open #close

star

Wed Dec 25 2019 18:55:34 GMT+0000 (Coordinated Universal Time) https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository

@frogblog #commandline #git #github #howto

star

Mon Feb 01 2021 21:22:08 GMT+0000 (Coordinated Universal Time) https://developer.servicenow.com/blog.do?p

@nhord2007@yahoo.com #servicenow #content #type #plain #text

star

Fri Nov 11 2022 18:41:00 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/366124/inserting-a-tab-character-into-text-using-c-sharp

@javicinhio #cs

star

Sun Jan 05 2020 18:59:56 GMT+0000 (Coordinated Universal Time) https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/

@billion_bill #css #webdev #text

star

Wed Apr 29 2020 11:26:35 GMT+0000 (Coordinated Universal Time) https://css-tricks.com/snippets/css/text-rotation/

@Bubbly #css

star

Sat Jan 18 2020 20:39:59 GMT+0000 (Coordinated Universal Time) https://www.freecodecamp.org/news/how-to-center-things-with-style-in-css-dc87b7542689/

@_fools_dev_one_ #css #layout

star

Tue Oct 27 2020 05:31:31 GMT+0000 (Coordinated Universal Time)

@abeerIbrahim #css

star

Fri Feb 26 2021 19:33:52 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/2717127/gradient-borders

@MAI #css

star

Wed Jun 30 2021 08:18:15 GMT+0000 (Coordinated Universal Time)

@hisam #css

star

Fri Sep 03 2021 08:50:14 GMT+0000 (Coordinated Universal Time) https://www.matuzo.at/blog/element-diversity/

@gorlanova #css

star

Fri Apr 08 2022 16:10:51 GMT+0000 (Coordinated Universal Time)

@Mazen #css

star

Tue May 12 2020 11:02:17 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/48893935/how-to-remove-debug-banner-in-flutter-on-android-emulator

@bassel #dart #flutter

star

Mon Mar 08 2021 13:00:55 GMT+0000 (Coordinated Universal Time) https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e

@Hackerman_max #dart #flutter

star

Mon Nov 01 2021 11:23:17 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/68015014/flutter-error-filesystemexception-creation-failed-path-storage-emulated-0

@awaisab171 #dart

star

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

@import_fola #python #pandas #data-cleaning

star

Tue Apr 21 2020 11:45:29 GMT+0000 (Coordinated Universal Time) https://towardsdatascience.com/30-helpful-python-snippets-that-you-can-learn-in-30-seconds-or-less-69bb49204172

@TrickyMind #python #python #lists #dictionary

star

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

@Alz #php #wordpress #elementor

star

Sun Mar 29 2020 07:06:35 GMT+0000 (Coordinated Universal Time) https://gist.github.com/trantorLiu/5924389

@billion_bill #javascript #nodejs #handlebars #express

star

Tue Feb 08 2022 14:54:48 GMT+0000 (Coordinated Universal Time)

@Uttam #java #gfg #geeksforgeeks #lecture #sorting #selectionsort

star

Wed Nov 17 2021 14:07:48 GMT+0000 (Coordinated Universal Time)

@swina #git

star

Thu Jan 02 2020 19:00:00 GMT+0000 (Coordinated Universal Time)

@mishka #wix #howto

star

Thu Feb 16 2023 15:18:12 GMT+0000 (Coordinated Universal Time)

@logesh #html

star

https://stackoverflow.com/questions/46898/how-do-i-efficiently-iterate-over-each-entry-in-a-java-map

#java
star

https://stackoverflow.com/questions/409784/whats-the-simplest-way-to-print-a-java-array

#java
star

Tue May 11 2021 05:06:03 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/9991253/finding-all-classes-implementing-a-specific-interface

@anoopsugur #java

star

https://www.amazon.com/JavaScript-JQuery-Interactive-Front-End-Development/dp/1118531647

@mishka #javascript

star

https://www.w3schools.com/jsref/jsref_getfullyear.asp

@mishka #javascript

star

Wed May 06 2020 11:46:54 GMT+0000 (Coordinated Universal Time) https://www.30secondsofcode.org/js/s/rename-keys/

@Glowing #javascript

star

Sat May 09 2020 07:01:41 GMT+0000 (Coordinated Universal Time) https://rizkimufrizal.github.io/membuat-restful-web-service-dengan-framework-spring-boot/

@hanatakaruki #javascript

star

Fri May 15 2020 06:24:00 GMT+0000 (Coordinated Universal Time) https://css-tricks.com/snippets/javascript/1024x768-bookmarklet/

@RedQueen #javascript

star

Mon Jun 08 2020 10:26:33 GMT+0000 (Coordinated Universal Time)

@salitha.pathi #javascript

star

Tue May 12 2020 11:23:22 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/21881901/how-do-i-remove-iframe-within-itself-by-using-javascript

@mishka #javascript

star

Wed Jun 10 2020 12:20:30 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/38497650/how-to-find-items-using-regex-in-mongoose/38498075

@mishka #javascript #mongoose #mongodb #mean

star

Wed Oct 06 2021 21:25:25 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/55726886/react-hook-send-data-from-child-to-parent-component

@richard #javascript

star

Wed Dec 22 2021 03:34:04 GMT+0000 (Coordinated Universal Time) https://explosion-scratch.github.io/blog/0-knowledge-auth/

@Explosion #javascript

star

Fri Nov 24 2023 10:05:35 GMT+0000 (Coordinated Universal Time) https://learn.javascript.ru/date

@jimifi4494 #javascript

star

Sat Nov 25 2023 07:59:24 GMT+0000 (Coordinated Universal Time) https://www.thepixelpixie.com/how-to-properly-enqueue-jquery-in-a-wordpress-site/

@dmsearnbit #javascript

star

Tue Apr 12 2022 13:25:38 GMT+0000 (Coordinated Universal Time)

@Luduwanda #javascriptreact

star

Tue May 18 2021 15:14:20 GMT+0000 (Coordinated Universal Time)

@zlucxie #json #premaom

star

Mon Dec 13 2021 08:42:45 GMT+0000 (Coordinated Universal Time)

@GoodRequest. #kotlin

Save snippets that work with our extensions

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