Snippets Collections
1. Utilizar el widget TextArea con la propiedad autoSize:

use yii\widgets\ActiveForm;
use yii\widgets\TextArea;

$form = ActiveForm::begin();

echo $form->field($model, 'my_field')->widget(TextArea::class, [
    'options' => [
        'rows' => 3,
        'style' => 'resize:none;', // Deshabilita el redimensionamiento manual
    ],
    'pluginOptions' => [
        'autoSize' => [
            'enable' => true,
            'maxLines' => 5, // Número máximo de líneas
            'minLines' => 3, // Número mínimo de líneas
        ],
    ],
]);

ActiveForm::end();

2. Utilizar el widget TinyMCE con la propiedad autogrow:

use dosamigos\tinymce\TinyMce;

echo $form->field($model, 'my_field')->widget(TinyMce::class, [
    'options' => [
        'rows' => 3,
    ],
    'pluginOptions' => [
        'autogrow_onload' => true,
        'autogrow_minimum_height' => 100,
        'autogrow_maximum_height' => 400,
        'autogrow_bottom_margin' => 20,
    ],
]);

3. Utilizar JavaScript para ajustar automáticamente el tamaño del campo:

use yii\helpers\Html;

echo Html::activeTextArea($model, 'my_field', [
    'rows' => 3,
    'style' => 'resize:none;', // Deshabilita el redimensionamiento manual
    'onInput' => 'this.style.height = this.scrollHeight + "px";',
]);
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
* {
  box-sizing: border-box;
}
​
/* Create two equal columns that floats next to each other */
.column {
  float: left;
  width: 50%;
  padding: 10px;
}
​
/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}
/* Style the buttons */
.btn {
  border: none;
  outline: none;
  padding: 12px 16px;
  background-color: #f1f1f1;
  cursor: pointer;
}
​
.btn:hover {
  background-color: #ddd;
}
​
.btn.active {
  background-color: #666;
  color: white;
}
</style>
</head>
<body>
<!DOCTYPE html>
<html>
<style>
#mydiv {
  position: absolute;
  z-index: 9;
  background-color: #f1f1f1;
  text-align: center;
  border: 1px solid #d3d3d3;
}
​
#mydivheader {
  padding: 10px;
  cursor: move;
  z-index: 10;
  background-color: #2196F3;
  color: #fff;
}
</style>
<body>
​
<h1>Draggable DIV Element</h1>
​
<p>Click and hold the mouse button down while moving the DIV element</p>
​
<div id="mydiv">
  <div id="mydivheader">Click here to move</div>
  <p>Move</p>
  <p>this</p>
  <p>DIV</p>
</div>
​
<script>
//Make the DIV element draggagle:
dragElement(document.getElementById("mydiv"));
​
function dragElement(elmnt) {
  var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
  if (document.getElementById(elmnt.id + "header")) {
    /* if present, the header is where you move the DIV from:*/
    document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
  } else {
    /* otherwise, move the DIV from anywhere inside the DIV:*/
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {box-sizing: border-box}
body {font-family: Verdana, sans-serif; margin:0}
​
/* Slideshow container */
.slideshow-container {
  position: relative;
  background: #f1f1f1f1;
}
​
/* Slides */
.mySlides {
  display: none;
  padding: 80px;
  text-align: center;
}
​
/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -30px;
  padding: 16px;
  color: #888;
  font-weight: bold;
  font-size: 20px;
  border-radius: 0 3px 3px 0;
  user-select: none;
}
​
/* Position the "next button" to the right */
.next {
  position: absolute;
  right: 0;
  border-radius: 3px 0 0 3px;
}
​
<!DOCTYPE html>
<html>
<style>
#myContainer {
  width: 400px;
  height: 400px;
  position: relative;
  background: yellow;
}
#myAnimation {
  width: 50px;
  height: 50px;
  position: absolute;
  background-color: red;
}
</style>
<body>
​
<p>
<button onclick="myMove()">Click Me</button> 
</p>
​
<div id ="myContainer">
<div id ="myAnimation"></div>
</div>
​
<script>
var id = null;
function myMove() {
  var elem = document.getElementById("myAnimation");   
  var pos = 0;
  clearInterval(id);
  id = setInterval(frame, 10);
  function frame() {
    if (pos == 350) {
      clearInterval(id);
    } else {
      pos++; 
      elem.style.top = pos + 'px'; 
      elem.style.left = pos + 'px'; 
    }
  }
}
<!DOCTYPE html>
<html>
<body>
​
<div id="myDiv">
&lt;!DOCTYPE html&gt;<br>
&lt;html&gt;<br>
&lt;body&gt;<br>
<br>
&lt;h1&gt;Testing an HTML Syntax Highlighter&lt;/h2&gt;<br>
&lt;p&gt;Hello world!&lt;/p&gt;<br>
&lt;a href="https://www.w3schools.com"&gt;Back to School&lt;/a&gt;<br>
<br>
&lt;/body&gt;<br>
&lt;/html&gt;
</div>
​
<script>
w3CodeColor(document.getElementById("myDiv"));
​
function w3CodeColor(elmnt, mode) {
  var lang = (mode || "html");
  var elmntObj = (document.getElementById(elmnt) || elmnt);
  var elmntTxt = elmntObj.innerHTML;
  var tagcolor = "mediumblue";
  var tagnamecolor = "brown";
  var attributecolor = "red";
  var attributevaluecolor = "mediumblue";
  var commentcolor = "green";
  var cssselectorcolor = "brown";
  var csspropertycolor = "red";
  var csspropertyvaluecolor = "mediumblue";
  var cssdelimitercolor = "black";
  var cssimportantcolor = "red";  
  var jscolor = "black";
  var jskeywordcolor = "mediumblue";
  var jsstringcolor = "brown";
  var jsnumbercolor = "red";
  var jspropertycolor = "black";
  elmntObj.style.fontFamily = "Consolas,'Courier New', monospace";
  if (!lang) {lang = "html"; }
  if (lang == "html") {elmntTxt = htmlMode(elmntTxt);}
  if (lang == "css") {elmntTxt = cssMode(elmntTxt);}
 if (window.fetch) {
            document.getElementById("submit").addEventListener("click", (e) => {
                e.preventDefault();
                fetch("https://jsonplaceholder.typicode.com/posts", {
                    method: "POST",
                    body: new FormData(document.getElementById("myForm")),
                })
                    .then((response) => response.json())
                    .then((json) => console.log(json))
                    .catch(error => console.log(error));
            });
        } else {
            document.getElementById("submit").addEventListener("click", (e) => {
                e.preventDefault();
                let xhttp = new XMLHttpRequest();
                xhttp.onreadystatechange = function () {
                    if (this.readyState == 4 && this.status == 200) {
                        let result = JSON.parse(this.responseText);
                        console.log(result);
                    } else if (this.readyState == 4) {
                        console.log("can't fecth data")
                    }
                }

                xhttp.open("POST", "https://jsonplaceholder.typicode.com/posts", true);
                const formData = new FormData(document.getElementById("myForm"));
                xhttp.send(formData);
            });
        }
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>random practice</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
        }
        th, td {
            padding: 8px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        th {
            background-color: #f4f4f4;
        }
    </style>
</head>

<body>
    <table id="table">
        <thead>
            <tr>
                <th>ID</th>
                <th>Title</th>
                <th>Body</th>
            </tr>
        </thead>
        <tbody id="tbody">

        </tbody>
    </table>

    <script>
        let xhttp = new XMLHttpRequest();

        xhttp.onreadystatechange = function () {
            if (this.readyState == 4 && this.status == 200) {
                let result = JSON.parse(this.responseText);
                result.forEach(element => {

                    let tBody = document.getElementById("tbody");

                    let id = element.id;
                    let title = element.title;
                    let body = element.body;
                    
                    let tr = document.createElement("tr");
                    let td1 = document.createElement("td");
                    let td2 = document.createElement("td");
                    let td3 = document.createElement("td");

                    td1.innerHTML = id;
                    td2.innerHTML = title;
                    td3.innerHTML = body;

                    tr.appendChild(td1);
                    tr.appendChild(td2);
                    tr.appendChild(td3);
                    
                    tBody.appendChild(tr);
                });
            }
        }

        xhttp.open("GET", "https://jsonplaceholder.typicode.com/posts", true);
        xhttp.send();
    </script>
</body>

</html>
​import os

def generate_structure_string(start_path, exclude_dirs=None):
    if exclude_dirs is None:
        exclude_dirs = []

    structure = []
    for root, dirs, files in os.walk(start_path):
        # 跳过需要排除的目录
        if any(excluded in root for excluded in exclude_dirs):
            continue

        level = root.replace(start_path, '').count(os.sep)
        indent = '│   ' * level + '├── ' if level > 0 else ''
        sub_indent = '│   ' * (level + 1) + '├── '
        structure.append(f'{indent}{os.path.basename(root)}/')

        for f in files:
            structure.append(f'{sub_indent}{f}')

    return '\n'.join(structure)

if __name__ == "__main__":
    start_path = '.'  # 你的项目根目录路径
    exclude_dirs = ['static', '__pycache__', '.git']  # 需要排除的文件夹列表
    print(generate_structure_string(start_path, exclude_dirs))
public function rules()
  {
    return [

      [['id_ente', 'id_estado', 'id_aeropuerto', 'id_linea', 'id_indicador', 'id_concep', 'pasajeros_transportados_n', 'pasajeros_transportados_i', 'cantidad_aeronaves_operativas_n', 'cantidad_aeronaves_operativas_i', 'cantidad_aeronaves_recuperadas_n', 'cantidad_aeronaves_recuperadas_i', 'cantidad_aeronaves_recuperar_n', 'cantidad_aeronaves_necesarias_n', 'cantidad_aeronaves_necesarias_i', 'cantidad_aeronaves_operativas_ci', 'cantidad_aeronaves_operativas_cn', 'numero_operaciones_vu', 'id_municipio', 'id_parroquia','id_plazo_ae', 'id_tip_trans_ae', 'id_tip_inve_ae', 'id_estatus_obra'], 'integer'],
      [['vuelo', 'uso', 'moneda'], 'string'],
      [['monto', 'cantidad_aeronaves_recuperar_i'], 'number', 'min' => 0],
      [['fecha', 'carga_transportada_i', 'carga_transportada_n'], 'safe'],
      [['nombre_proyecto'], 'string', 'max' => 250],
      [['descripcion'], 'string', 'max' => 250],
      [['id_municipio'], 'exist', 'skipOnError' => true, 'targetClass' => Municipios::className(), 'targetAttribute' => ['id_municipio' => 'id_municipio']],
      [['id_parroquia'], 'exist', 'skipOnError' => true, 'targetClass' => Parroquias::className(), 'targetAttribute' => ['id_parroquia' => 'id_parroquia']],
      [['id_tip_trans_ae'], 'exist', 'skipOnError' => true, 'targetClass' => TipoTransporteAe::className(), 'targetAttribute' => ['id_tip_trans_ae' => 'id_tip_trans_ae']],
      [['id_tip_inve_ae'], 'exist', 'skipOnError' => true, 'targetClass' => TiposInversiones::className(), 'targetAttribute' => ['id_tip_inve_ae' => 'id_tip_inve']],
      [['fecha'], 'required'],
    ];
  }
<div style="flex: 1 0 100%; display: block;" id='carga_transportada_i'>
                                            <?= $form->field($model, 'carga_transportada_i')->widget(MaskedInput::className(), [
                                        'clientOptions' => [
                                            'alias' => 'decimal',
                                            'groupSeparator' => '.',
                                            'radixPoint' => ',',
                                            'autoGroup' => true,
                                            'digits' => 2,
                                            'digitsOptional' => false,
                                            'allowMinus' => false,
                                            'rightAlign' => false
                                        ],
                                        'options' => [
                                            'class' => 'form-control',
                                            //'placeholder' => '600 (Número entero)',
                                            //'maxlength' => 10
                                        ]
                                        ]) ?>
                                        </div>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
body
{
background: #000;
}
h1
{
	width: 900px;
    color: #164E63;
    text-transform: uppercase;
    font-size: 4.5em;
    border: 1px dotted #FFFFFF40;
    position: relative;
    text-align: center;
}
h1::before
{
	content: attr(data-txt);
    position: absolute;
    inset:0;
    margin:auto;
    text-align:center;
    transition: 300ms ease-in-out 500ms;
}
h1>span
{
	transition:transform ease-in 500ms;
    display:inline-block;
    transform-origin: center center;
    transform: rotateY(90deg)
}
h1:hover::before
{
	opacity:0;
    transform-delay:0ms;
}

h1:hover>span 
{
	transform: rotateY(0deg);
}
</style>
</head>
<body>

<h1 data-txt="Can you see me">Code The World!</h1>
<script>
const h1 = document.querySelector("h1");
const text = h1.textContent;
h1.innerHTML = '';

text.split('').forEach((char) => {
	const span = document.createElement("span");
    if (char === ' '){
    	span.innerHTML = '&nbsp';
    }else{
    	span.textContent = char;
    }
    h1.appendChild(span);
});
</script>
</body>
</html>
1.- de esta manera: 
'modules' => [
    'gridview' =>  [
        'class' => '\kartik\grid\Module',
                    ],
     'redactor' => [
            'class' => '\yii\redactor\RedactorModule',
            'uploadDir' => '@webroot/path/to/uploadfolder',
            'uploadUrl' => '@web/path/to/uploadfolder',
            'imageAllowExtensions'=>['jpg','png','gif']
        ]
        ],
  
2.- O de esta otra manera:
  return [
    'id' => 'app-backend',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'backend\controllers',
    'bootstrap' => ['log'],
    'modules' => [ 'redactor' => 'yii\redactor\RedactorModule'], /* el redactor esta aqui */
    'components' => [
        'request' => [
            'csrfParam' => '_csrf-backend',
        ],
        'user' => [
            'identityClass' => 'common\models\User',
            'enableAutoLogin' => true,
            'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
            'authTimeout' => 60 * 10, // auth expire 
        ],
        'session' => [
            // this is the name of the session cookie used for login on the backend
            'name' => 'advanced-backend',
            'cookieParams' => [/*'httponly' => true,*/'lifetime' => 60 * 10//3600 * 24 * 30
            ],
            'timeout' => 60 * 10,//3600 * 24 * 30,
            'class' => 'yii\web\DbSession',
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        /*
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
            ],
        ],
        */
    'site/captcha/<refresh:\d+>' => 'site/captcha',
    'site/captcha/<v:\w+>' => 'site/captcha',
    ],
    'params' => $params,
];
@import "compass/css";

​
3
// toggle the cube dimensions here.

$cubeWidth: px;
5
$cubeHeight: 0px;

$cubeDepth: $cubeHeight;

​

body {

  color: #3;

  padding: 20px;

  text-align: center;

  font-family: Arial;

}

​

.separator {

  margin-top: px;

}

  

.twitter {
20
  color: #FFF;

  text-decoration: none;

  border-radius: 4px;

  background: #00ACED;

  display: inline-block;
25
  padding: 10px 8px;

  margin-bottom: 15px;

  font-weight: bold;

}

​

/* 3D Cube */

.space3d {

  perspective: 1000px;
33
  width: $cubeWidth;

  height: $cubeHeight;

  text-align: center;

  display: inline-block;

}

​

._3dbox {
40
  display: inline-block;

  transition: all 0.85s cubic-bezier(0.175,0.885,0.320,1.275);

​

  text-align: center;

  position: relative;

  width: 100%;

  height: 100%;

  transform-style: preserve-3d;

  transform: rotateX(-15deg) rotateY(15deg);

}

​

._3dface {

  overflow: hidden;

  position: absolute;

  

  border: 1px solid #888;

  background: #FFF;

  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.1),
/* Add your CSS code here.

​

For example:

.example {

    color: red;

}

​

For brushing up on your CSS knowledge, check out http://www.w3schools.com/css/css_syntax.asp

​

End of comment */ 

​

​
# Leverage Browser Caching by SG-Optimizer
<IfModule mod_expires.c>
    ExpiresActive on
  # CSS
    ExpiresByType text/css                              "access plus 1 year"
  # JavaScript
    ExpiresByType application/javascript                "access plus 1 year"
    ExpiresByType application/x-javascript              "access plus 1 year"
  # Manifest files
    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
    ExpiresByType text/cache-manifest                   "access plus 0 seconds"
  # Media
    ExpiresByType audio/ogg                             "access plus 1 year"
    ExpiresByType image/gif                             "access plus 1 year"
    ExpiresByType image/jpg                             "access plus 1 year"
    ExpiresByType image/jpeg                            "access plus 1 year"
    ExpiresByType image/png                             "access plus 1 year"
    ExpiresByType image/svg                             "access plus 1 year"
    ExpiresByType image/svg+xml                         "access plus 1 year"
    ExpiresByType video/mp4                             "access plus 1 year"
    ExpiresByType video/ogg                             "access plus 1 year"
    ExpiresByType video/webm                            "access plus 1 year"
    ExpiresByType image/x-icon                          "access plus 1 year"
    ExpiresByType application/pdf                       "access plus 1 year"
    ExpiresByType application/x-shockwave-flash         "access plus 1 year"
  # XML
    ExpiresByType text/xml                              "access plus 0 seconds"
    ExpiresByType application/xml                       "access plus 0 seconds"
  # Web feeds
    ExpiresByType application/atom+xml                  "access plus 1 hour"
    ExpiresByType application/rss+xml                   "access plus 1 hour"
  # Web fonts
    ExpiresByType application/font-woff                 "access plus 1 year"
    ExpiresByType application/font-woff2                "access plus 1 year"
    ExpiresByType application/vnd.ms-fontobject         "access plus 1 year"
    ExpiresByType application/x-font-ttf                "access plus 1 year"
    ExpiresByType font/opentype                         "access plus 1 year"
</IfModule>
# END LBC





# GZIP enabled by SG-Optimizer
<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
       AddOutputFilterByType DEFLATE "application/atom+xml" \
          "application/javascript" \
          "application/json" \
          "application/ld+json" \
          "application/manifest+json" \
          "application/rdf+xml" \
          "application/rss+xml" \
          "application/schema+json" \
          "application/vnd.geo+json" \
          "application/vnd.ms-fontobject" \
          "application/x-font-ttf" \
          "application/x-javascript" \
          "application/x-web-app-manifest+json" \
          "application/xhtml+xml" \
          "application/xml" \
          "font/eot" \
          "font/opentype" \
          "image/bmp" \
          "image/svg+xml" \
          "image/vnd.microsoft.icon" \
          "image/x-icon" \
          "text/cache-manifest" \
          "text/css" \
          "text/html" \
          "text/javascript" \
          "text/plain" \
          "text/vcard" \
          "text/vnd.rim.location.xloc" \
          "text/vtt" \
          "text/x-component" \
          "text/x-cross-domain-policy" \
          "text/xml"
    </IfModule>
</IfModule>
# END GZIP

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74___lsphp .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# SGO Unset Vary
  Header unset Vary
# SGO Unset Vary END
<section class="app">

  <aside class="sidebar">

         <header>

        Menu

      </header>

    <nav class="sidebar-nav">

 

      <ul>

        <li>

          <a href="#"><i class="ion-bag"></i> <span>Shop</span></a>

          <ul class="nav-flyout">

            <li>

              <a href="#"><i class="ion-ios-color-filter-outline"></i>Derps</a>

            </li>

            <li>

              <a href="#"><i class="ion-ios-clock-outline"></i>Times</a>

            </li>

            <li>

              <a href="#"><i class="ion-android-star-outline"></i>Hates</a>

            </li>

            <li>

              <a href="#"><i class="ion-heart-broken"></i>Beat</a>
<main>

  <span class="scroll">Scroll for more</span>

  <section class="shadow">

    <p data-attr="shadow">shadow</p>

  </section>

  <section class="break">

    <p data-attr="ak">bre</p>

  </section>

  <section class="slam">

    <p data-splitting>slam</p>

  </section>

  <section class="glitch">

    <p data-attr="glitch">glitch</p>

  </section>

</main>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
video {
  width: 100%;
  height: auto;
}
</style>
</head>
<body>
​
<video width="400" controls>
  <source src="mov_bbb.mp4" type="video/mp4">
  <source src="mov_bbb.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>
​
<p>Resize the browser window to see how the size of the video player will scale.</p>
​
</body>
</html>
​
​
​
construccion 

en el formulario:

<?= $form->field($model, 'id_sector')->dropDownList(ArrayHelper::map(Sectores::find()->orderBy('nombre_sector')->all(), 'id_sector', 'nombre_sector'), ['prompt' => 'Seleccione ', 'id' => 'id-sector','onchange' => 'actualizarEntes(value)']); ?>

    </div>

     <div class="col-xs-3">
                <?php /*$form->field($model, 'id_ente')->widget(Select2::classname(), [
                    'model' => $model,
                    'attribute' => 'id_ente',
                    'data' => ArrayHelper::map(Entes::find()->orderBy('nombre_ente')->asArray()->all(), 'id_ente', 'nombre_ente'),
                    'language' => 'es',
                    'maintainOrder' => true,
                    'showToggleAll'=> false,
                    'readonly'=>true,
                    'options' => ['placeholder' => 'Seleccione...', 'multiple' => true,],
                    'pluginOptions' => [
                    'maximumSelectionLength'=>35,
                    'minimumInputLength'=>0,
                    ],
                    ]);*/ ?>

        <?= $form->field($model, 'id_ente')->widget(DepDrop::classname(), [
        'type' => DepDrop::TYPE_SELECT2,
        'data' => [], // Inicialmente vacío
        'options' => ['placeholder' => 'Seleccione...', 'multiple' => true],
        'pluginOptions' => [
            'depends' => ['id-sector'], // ID del campo del que depende
            'url' => Url::to(['/entes/listar']), // URL para obtener los datos dependientes
            'loadingText' => 'Cargando entes...',
        ],
    ]); ?>
        </div> 
    </div>

en el modelo de la tabla que voy a mostrar en el DepDrop:

public static function Lista(){
    $s = \yii\helpers\ArrayHelper::map(Entes::find()->orderBy('id_ente')->all(),'id_ente','nombre_ente');
    return ($s) ? $s : [];
    }

en la action update del controlador:
   public function actionUpdate($id)
{
    $model = $this->findModel($id);

    // Carga los datos de 'indicadores_entes' en el modelo
    $model->id_ente = ArrayHelper::map($model->entes, 'id_ente', 'nombre_ente');

    if ($model->load(Yii::$app->request->post())) {
        // Desvincula todos los 'entes' existentes para evitar duplicados
        $model->unlinkAll('entes', true);

        // Guarda los nuevos valores seleccionados en la tabla de relación
        foreach ($model->id_ente as $enteId) {
            $ente = Entes::findOne($enteId);
            $model->link('entes', $ente);
        }

        if ($model->save()) {
            return $this->redirect(['view', 'id' => $model->id_indicador]);
        }
    }
    return $this->render('update', [
        'model' => $model,
    ]);
}
 en la action create :
                         
public function actionCreate()
        {
            $model = new Indicadores();

            if ($model->load(Yii::$app->request->post())) {
                if ($model->save()) {
                    // Obtén los valores seleccionados del campo 'id_ente'
                    $entesSeleccionados = Yii::$app->request->post('Indicadores')['id_ente'];

                    // Guarda los valores seleccionados en la tabla de relación
                    foreach ($entesSeleccionados as $enteId) {
                        $ente = Entes::findOne($enteId);
                        $model->link('entes', $ente);
                    }

                    return $this->redirect(['view', 'id' => $model->id_indicador]);
                }
            }

            return $this->render('create', [
                'model' => $model,
            ]);
        }                         
    
<div class="col-xs-3">
    <?= $form->field($model, 'fecha')->widget(
            DatePicker::classname(),
            [
                'language' => 'es',
                'removeButton' => false,
                'options' => [
                    'placeholder' => 'Fecha:',
                    'class' => 'form-control',
                    'id' => 'fecha_desde-input',
                    'onchange' => 'buscarProyeccion(this.value)'
                ],
                'pluginOptions' =>
                [
                    'startDate' => '01-01-2000',
                    //'startDate' => date('d-m-Y'),
                    'autoclose' => true,
                    'format' => 'dd-mm-yyyy',
                ]
            ]
            )->label('Fecha'); ?>

    </div>
const playBoard = document.querySelector(".play-board");

const scoreElement = document.querySelector(".score");

const highScoreElement = document.querySelector(".high-score");

const controls = document.querySelectorAll(".controls i");

​

let gameOver = false;

let foodX, foodY;

let snakeX = 5, snakeY = 5;

let velocityX = 0, velocityY = 0;

let snakeBody = [];

let setIntervalId;

let score = 0;

​

// Getting high score from the local storage

let highScore = localStorage.getItem("high-score") || 0;

highScoreElement.innerText = `High Score: ${highScore}`;

​

const updateFoodPosition = () => {

    // Passing a random 1 -  value as food position

    foodX = Math.floor(Math.random() * 30) + 1;

    foodY = Math.floor(Math.random() * 30) + 1;

}

​

const handleGameOver = () => {

    // Clearing the timer and reloading the page on game over

    clearInterval(setIntervalId);

    alert("Game Over! Press OK to replay...");

    location.reload();

}
30
​

const changeDirection = e => {

    // Changing velocity value based on key press

    if(e.key === "ArrowUp" && velocityY != 1) {

        velocityX = 0;

        velocityY = -1;

    } else if(e.key === "ArrowDown" && velocityY != -1) {

        velocityX = 0;

        velocityY = 1;

    } else if(e.key === "ArrowLeft" && velocityX != 1) {

        velocityX = -1;

        velocityY = 0;

    } else if(e.key === "ArrowRight" && velocityX != -1) {

        velocityX = 1;

        velocityY = 0;

    }
package main

​

import (

    "encoding/json"

    "fmt"

    "os"

)

​

type response1 struct {

    Page   int

    Fruits []string

}

type response2 struct {

    Page   int      `json:"page"`

    Fruits []string `json:"fruits"`

}

​

func main() {

    bolB, _ := json.Marshal(true)

    fmt.Println(string(bolB))

​

    intB, _ := json.Marshal(1)

    fmt.Println(string(intB))

​

    fltB, _ := json.Marshal(2.)

    fmt.Println(string(fltB))

​

    strB, _ := json.Marshal("gopher")

    fmt.Println(string(strB))

​

    slcD := []string{"apple", "peach", "pear"}

    slcB, _ := json.Marshal(slcD)

    fmt.Println(string(slcB))
34
​

    mapD := map[string]int{"apple": 5, "lettuce": 7}

    mapB, _ := json.Marshal(mapD)

    fmt.Println(string(mapB))

​

    res1D := &response1{
​const p1={
  name:"Raphael",
  age:21,
  isMaried:false,
  say:()=>{
    console.log(`I'm ${p1.name} I'm ${p1.age} years old`);
    if(p1.isMaried === false){
      console.log(`I'm Celobator`);
    }else{
      console.log(`I'm maried`);
    }
  }
}
p1.say()
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
// Import the functions you need from the SDKs you need

import { initializeApp } from "firebase/app";
 
 
import is not yet supported in RunKit.

import { getAnalytics } from "firebase/analytics";

// TODO: Add SDKs for Firebase products that you want to use

// https://firebase.google.com/docs/web/setup#available-libraries

​

// Your web app's Firebase configuration

// For Firebase JS SDK v7..0 and later, measurementId is optional
20
const firebaseConfig = {

  apiKey: "AIzaSyAG_Fk7ftN5dN7WzmvR4ZKXlDe8aYCZwPw",

  authDomain: "vscode-563f2.firebaseapp.com",

  projectId: "vscode-563f2",

  storageBucket: "vscode-563f2.appspot.com",

  messagingSenderId: "675466337672",

  appId: "1:675466337672:web:ea15fe47d0aee63c2aee3d",

  measurementId: "G-RZ4LJN5S1L"

};

​

// Initialize Firebase

const app = initializeApp(firebaseConfig);

const analytics = getAnalytics(app);
// Let's show where the Internation Space Station currently is.

console.log("Let's see where the ISS is with Node " + process.version);

​

// We can use any package from NPM since they are all built in.

var getJSON = require("async-get-json"); 

​

// And we can use ES7 async/await to pull the ISS's position from the open API.

var result = await getJSON("http://api.open-notify.org/iss-now.json");

​

// RunKit will automatically display the last statement and try to find its best representation:

result.iss_position;
// Let's show where the Internation Space Station currently is.

console.log("Let's see where the ISS is with Node " + process.version);

​

// We can use any package from NPM since they are all built in.

var getJSON = require("async-get-json"); 

​

// And we can use ES7 async/await to pull the ISS's position from the open API.

var result = await getJSON("http://api.open-notify.org/iss-now.json");

​

// RunKit will automatically display the last statement and try to find its best representation:

result.iss_position;
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
<!DOCTYPE html>
<html>
<body>
​
<h2>Image Maps</h2>
<p>Click on the computer, the phone, or the cup of coffee to go to a new page and read more about the topic:</p>
​
<img src="workplace.jpg" alt="Workplace" usemap="#workmap" width="400" height="379">
​
<map name="workmap">
  <area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
  <area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
  <area shape="circle" coords="337,300,44" alt="Cup of coffee" href="coffee.htm">
</map>
​
</body>
</html>
​
​
from azure.ai.ml import MLClient
from azure.ai.ml.entities import (
    ManagedOnlineEndpoint,
    ManagedOnlineDeployment,
    Model,
    Environment,
    CodeConfiguration,
)
registry_name = "HuggingFace"
model_name = "bert_base_uncased"
model_id = f"azureml://registries/{registry_name}/models/{model_name}/labels/latest"from azure.ai.ml import MLClient
from azure.ai.ml.entities import (
    ManagedOnlineEndpoint,
    ManagedOnlineDeployment,
    Model,
    Environment,
    CodeConfiguration,
)
registry_name = "HuggingFace"
model_name = "bert_base_uncased"
model_id = f"azureml://registries/{registry_name}/models/{model_name}/labels/latest"
@import 'jeet'

@import 'nib'

​

.large-header

   position: relative

   width: 0%

   background: #eeeeee

   overflow: hidden

   background-size: cover
10
   background-position: center center

   z-index: 1

​

.demo .large-header

   background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/4994/demo-bg.jpg')

​
16
.main-title

   position: absolute

   margin: 0

   padding: 0

   color: #ffffff

   text-align: center

   top: 50%

   left: 50%
@import 'jeet'

@import 'nib'

​

.large-header

   position: relative

   width: 0%

   background: #eeeeee

   overflow: hidden

   background-size: cover
10
   background-position: center center

   z-index: 1

​

.demo .large-header

   background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/4994/demo-bg.jpg')

​
16
.main-title

   position: absolute

   margin: 0

   padding: 0

   color: #ffffff

   text-align: center

   top: 50%

   left: 50%
<div class="container demo">

   <div class="content">

      <div id="large-header" class="large-header">

         <canvas id="demo-canvas"></canvas>

         <h1 class="main-title"><span>IMD <span class='thin'>[ Coach ]</h1>

      </div>

   </div>

</div>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

main {
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.item {
  width: 200px;
  height: 300px;
  list-style-type: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background-position: center;
  background-size: cover;
  border-radius: 20px;
  box-shadow: 0 20px 30px rgba(255, 255, 255, 0.3) inset;
  transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;

  &:nth-child(1),
  &:nth-child(2) {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
  }

  &:nth-child(3) {
    left: 50%;
  }
  &:nth-child(4) {
    left: calc(50% + 220px);
  }
  &:nth-child(5) {
    left: calc(50% + 440px);
  }
  &:nth-child(6) {
    left: calc(50% + 660px);
    opacity: 0;
  }
}

.content {
  width: min(30vw, 400px);
  position: absolute;
  top: 50%;
  left: 3rem;
  transform: translateY(-50%);
  font: 400 0.85rem helvetica, sans-serif;
  color: white;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  display: none;

  & .title {
    font-family: "arial-black";
    text-transform: uppercase;
  }

  & .description {
    line-height: 1.7;
    margin: 1rem 0 1.5rem;
    font-size: 0.8rem;
  }

  & button {
    width: fit-content;
    background-color: rgba(0, 0, 0, 0.1);
    color: white;
    border: 2px solid white;
    border-radius: 0.25rem;
    padding: 0.75rem;
    cursor: pointer;
  }
}

.item:nth-of-type(2) .content {
  display: block;
  animation: show 0.75s ease-in-out 0.3s forwards;
}

@keyframes show {
  0% {
    filter: blur(5px);
    transform: translateY(calc(-50% + 75px));
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

.nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  user-select: none;

  & .btn {
    background-color: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.6);
    margin: 0 0.25rem;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;

    &:hover {
      background-color: rgba(255, 255, 255, 0.3);
    }
  }
}

@media (width > 650px) and (width < 900px) {
  .content {
    & .title {
      font-size: 1rem;
    }
    & .description {
      font-size: 0.7rem;
    }
    & button {
      font-size: 0.7rem;
    }
  }
  .item {
    width: 160px;
    height: 270px;

    &:nth-child(3) {
      left: 50%;
    }
    &:nth-child(4) {
      left: calc(50% + 170px);
    }
    &:nth-child(5) {
      left: calc(50% + 340px);
    }
    &:nth-child(6) {
      left: calc(50% + 510px);
      opacity: 0;
    }
  }
}

@media (width < 650px) {
  .content {
    & .title {
      font-size: 0.9rem;
    }
    & .description {
      font-size: 0.65rem;
    }
    & button {
      font-size: 0.7rem;
    }
  }
  .item {
    width: 130px;
    height: 220px;

    &:nth-child(3) {
      left: 50%;
    }
    &:nth-child(4) {
      left: calc(50% + 140px);
    }
    &:nth-child(5) {
      left: calc(50% + 280px);
    }
    &:nth-child(6) {
      left: calc(50% + 420px);
      opacity: 0;
    }
  }
}
<div class="ag-format-container">

  <div class="ag-courses_box">

    <div class="ag-courses_item">

      <a href="#" class="ag-courses-item_link">

        <div class="ag-courses-item_bg"></div>

​

        <div class="ag-courses-item_title">

          UI/Web&amp;Graph design for teenagers -&#0;years old

        </div>

​
11
        <div class="ag-courses-item_date-box">

          Start:

          <span class="ag-courses-item_date">

            04.11.

          </span>
16
        </div>
17
      </a>

    </div>

​
20
    <div class="ag-courses_item">

      <a href="#" class="ag-courses-item_link">
22
        <div class="ag-courses-item_bg"></div>

​
.ag-format-container {

  width: 2px;

  margin: 0 auto;
4
}

​

​

body {

  background-color: #000;

}

.ag-courses_box {
11
  display: -webkit-box;

  display: -ms-flexbox;

  display: flex;

  -webkit-box-align: start;

  -ms-flex-align: start;

  align-items: flex-start;

  -ms-flex-wrap: wrap;

  flex-wrap: wrap;

​

  padding: 50px 0;

}

.ag-courses_item {

  -ms-flex-preferred-size: calc(33.33333% - 30px);

  flex-basis: calc(33.33333% - 30px);
body {

  margin: 0;

  background: #020202;

  cursor: crosshair;

}

canvas{display:block}

h1 {

  position: absolute;

  top: 20%;

  left: 50%;

  transform: translate(-50%, -50%);

  color: #fff;

  font-family: "Source Sans Pro";

  font-size: 5em;

  font-weight: 900;

  -webkit-user-select: none;

  user-select: none;

}
<h1>Happy Birthday</h1>

<canvas id="birthday"></canvas>
https://voidnull.es/instalacion-de-pgadmin-para-gestionar-postgresql/
Configure
Add to config file (config/web.php or common\config\main.php)

    'modules' => [
        'redactor' => 'yii\redactor\RedactorModule',
    ],
php composer.phar require --prefer-dist yiidoc/yii2-redactor "*"

ejemplo:
     <?php $form->field($model, 'resumen_reporte')->widget(\yii\redactor\widgets\Redactor::className(), [
    'clientOptions' => [
        'imageManagerJson' => ['/redactor/upload/image-json'],
        'imageUpload' => ['/redactor/upload/image'],
        'fileUpload' => ['/redactor/upload/file'],
        'lang' => 'zh_cn',
        'plugins' => ['clips', 'fontcolor','imagemanager']
    ]
]); ?>
php composer.phar require --prefer-dist 2amigos/yii2-ckeditor-widget": "*"

ejemplo ckeditor-widget:
 <?php $form->field($model, 'resumen_reporte')->widget(CKEditor::className(), [
    'options' => ['rows' => 6],
    'preset' => 'basic'
]); ?>
div#comparison { 

  width: 0vw;

  height: 60vw;

  max-width: 600px;

  max-height: 600px;
6
  overflow: hidden; }

div#comparison figure { 

  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/photoshop-face-before.jpg); 

  background-size: cover;

  position: relative;

  font-size: 0;

  width: 100%; 

  height: 100%;

  margin: 0; 

}

div#comparison figure > img { 

  position: relative;

  width: 100%;

}

div#comparison figure div { 

  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/photoshop-face-after.jpg);

  background-size: cover;
<div id="comparison">

  <figure>

    <div id="divisor"></div>

  </figure>

  <input type="range" min="0" max="100" value="50" id="slider" oninput="moveDivisor()">

</div>

​
<!DOCTYPE html>
<html>
<body>
​
<p>If your browser supports bi-directional override (bdo), the next line will be written from right to left (rtl):</p>
​
<bdo dir="rtl">This line will be written from right to left</bdo>
​
</body>
</html>
​
​
<!-- Google tag (gtag.js) -->

<script async src="https://www.googletagmanager.com/gtag/js?id=G-HTKNHG"></script>
3
<script>
4
  window.dataLayer = window.dataLayer || [];
5
  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());

​
8
  gtag('config', 'G-H34TKNH5G8');

</script>
var $cont = document.querySelector(".cont");

var $elsArr = [].slice.call(document.querySelectorAll(".el"));

var $closeBtnsArr = [].slice.call(document.querySelectorAll(".el__close-btn"));

​

setTimeout(function () {

 $cont.classList.remove("s--inactive");

}, 0);

​

$elsArr.forEach(function ($el) {

 $el.addEventListener("click", function () {

  if (this.classList.contains("s--active")) return;

  $cont.classList.add("s--el-active");

  this.classList.add("s--active");

 });

});

​

$closeBtnsArr.forEach(function ($btn) {

 $btn.addEventListener("click", function (e) {

  e.stopPropagation();
20
  $cont.classList.remove("s--el-active");

  document.querySelector(".el.s--active").classList.remove("s--active");

 });

});
document.addEventListener('DOMContentLoaded', function() {

    var wishlistButton = document.getElementById('wishlistBtn');

​

    wishlistButton.addEventListener('click', function() {

        // Create or toggle popup container

        var popupContainer = document.querySelector('.popup');

        if (!popupContainer) {

            popupContainer = document.createElement('div');

            popupContainer.className = 'popup';

            popupContainer.innerHTML = `

                <div class="popup-content">

                    <span class="close" onclick="closePopup()">&times;</span>

                    <h2>Wishlist</h2>

                    ${getWishlistContent()} <!-- Insert WooCommerce Smart Wishlist shortcode content here -->

                    <p><a href="#" id="wishlistLink">View Wishlist</a></p>

                </div>

            `;

            // Set the link to the wishlist page (replace with your wishlist link)

            var wishlistLink = popupContainer.querySelector('#wishlistLink');

            wishlistLink.href = '#'; // replace with your wishlist page URL

            // Append the popup container to the body

            document.body.appendChild(popupContainer);

        } else {

            // Toggle display property

            var currentDisplay = window.getComputedStyle(popupContainer).getPropertyValue('display');

            popupContainer.style.display = currentDisplay === 'none' ? 'block' : 'none';

        }

    });

​

    // Function to close the popup

    window.closePopup = function() {

        var popupContainer = document.querySelector('.popup');

        if (popupContainer) {

            document.body.removeChild(popupContainer);

        }
Name:
[your-name]

Email:
[your-email]

Phone:
[your-number]

City:
[your-city]

State:
[your-state]

Comment:
[your-message]




--
This e-mail was sent from a contact form on Clean Diesel Specialists Inc (https://cleandieselspecialists.com)
<p><strong>Name:</strong> (required)
    [text* your-name] </p>

<p><strong>Email:</strong> (required)
    [email* your-email] </p>

<p><strong>Number:</strong>
    [tel your-number] </p>

<p><strong>City:</strong> (required)
    [text* your-city] </p>

<p><strong>State:</strong> (required)
    [text* your-state] </p>

<p><strong>Comment:</strong>
    [textarea your-message 40x3] </p>

[cf7sr-simple-recaptcha]

<p>[submit "Submit"]</p>
int minimumBoxes(int* apple, int appleSize, int* capacity, int capacitySize) {

    

}
add_shortcode('whatsapp_message_url', 'gerar_link_whatsapp_produto2');

function gerar_link_whatsapp_produto2() {
    global $product;
    if (!$product) {
        return 'Produto não disponível.';
    }

    $whatsapp_number = get_option('site-config')['whatsapp_number'];
    $sku_exibe = get_option('site-config')['sku_exibe'];

    if (empty($whatsapp_number)) {
        return 'Número do WhatsApp não configurado.';
    }

    $post_id = $product->get_id();
    $post_title = get_the_title($post_id);
    $post_url = get_permalink($post_id);

    $message = "Olá, gostaria de saber mais sobre este produto:\n\n";
    $message .= "*Produto:* {$post_title}\n";
    $message = htmlentities($message);

    $message_id = uniqid('msg_');

    ob_start();
    ?>
    <script>
    (function($) {
        $(document).ready(function() {
            var messageSelector = '#<?php echo $message_id; ?>';
            var variationForm = $('.variations_form');
            
            variationForm.on('found_variation', function(event, variation) {
                var variationDetails = '';

                <?php if ($sku_exibe === 'true'): ?>
                var productSku = variation.sku ? "*SKU:* " + variation.sku + '\n' : '';
                variationDetails += productSku;
                <?php endif; ?>
                
                var productVariationPrice = variation.display_price ? "*Preço:* R$ " + variation.display_price.toFixed(2).replace('.', ',') + '\n' : '';
                variationDetails += productVariationPrice;

                $.each(variation.attributes, function(key, value) {
                    if (value) {
                        var attribute_name = key.replace('attribute_', '');
                        var normalized_name = attribute_name.replace(/pa_/, '').replace(/_/g, ' ');
                        var cleanValue = value.replace(/-/g, ' ').replace(/^pa_/, '');
                        variationDetails += "*" + normalized_name.capitalize() + ":* " + cleanValue + '\n';
                    }
                });

                variationDetails += "*Link do Produto:* " + "<?php echo $post_url; ?>\n\n";
                var fullMessage = $(messageSelector).data('base-message') + variationDetails + "Obrigado.";
                $(messageSelector).attr('href', function() {
                    return $(this).data('base-url') + '&text=' + encodeURIComponent(fullMessage);
                });
            }).trigger('update_variation_values');
        });

        // Função para capitalizar a primeira letra de cada palavra
        String.prototype.capitalize = function() {
            return this.replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); });
        };
    })(jQuery);
    </script>
    <?php
    $script = ob_get_clean();

    $whatsapp_base_url = "https://api.whatsapp.com/send?phone={$whatsapp_number}";
    $encoded_message = urlencode($message);
    $link = "{$whatsapp_base_url}&text={$encoded_message}";

    return "<a href='{$link}' target='_blank' class='whatsapp-link' id='{$message_id}' data-base-message='{$message}' data-base-url='{$whatsapp_base_url}'>
        <i class='fab fa-whatsapp icon'></i>Pedir via WhatsApp</a>{$script}";
}
learning_rate = 1e-3
​
model = None
optimizer = None
​
################################################################################
# TODO: Instantiate and train Resnet-10.                                       #
################################################################################
# *****START OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)*****
​
​
​
model = None
​
​
# *****END OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)*****
################################################################################
#                                 END OF YOUR CODE                             
################################################################################
​
print_every = 700
train_part34(model, optimizer, epochs=10)
print_every = 100
########################################################################
# TODO: "Implement the forward function for the Resnet specified"        #
# above. HINT: You might need to create a helper class to              # 
# define a Resnet block and then use that block here to create         #
# the resnet layers i.e. conv2_x, conv3_x, conv4_x and conv5_x         #
########################################################################
# *****START OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)*****
class ResNet(nn.Module):
    def __init__(self):
        super(ResNet, self).__init__()
        in_channels = 64
        out_channels = 64
        stride = 1
        self.conv1 = nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3, bias=False)
        self.bn1 = nn.BatchNorm2d(64)
        nn.ReLU()
        self.maxpool = nn.MaxPool2d(kernel_size = 3, stride = 2, padding = 1)
        
​
        
        pass
    def forward(self):
        pass
    
    
########################################################################
#                             END OF YOUR CODE                         #
########################################################################
listar dispositivos con 
df
sudo umount /dev/sdb1
sudo mkfs.vfat -F 32 -n "nombredelpendrive" /dev/sdb1

/**

 * Allow SVG uploads for administrator users.

 *

 * @param array $upload_mimes Allowed mime types.

 *

 * @return mixed

 */

add_filter(

    'upload_mimes',

    function ( $upload_mimes ) {

        // By default, only administrator users are allowed to add SVGs.

        // To enable more user types edit or comment the lines below but beware of

        // the security risks if you allow any user to upload SVG files.

        if ( ! current_user_can( 'administrator' ) ) {

            return $upload_mimes;

        }

​

        $upload_mimes['svg']  = 'image/svg+xml';

        $upload_mimes['svgz'] = 'image/svg+xml';

​

        return $upload_mimes;
<div class="swiper-container">

    <!-- Additional required wrapper -->

    <div class="swiper-wrapper">

        <!-- Slides -->

        <div class="swiper-slide">Slide 1</div>

        <div class="swiper-slide" data-swiper-autoplay="6000">Slide 2</div>

        <div class="swiper-slide" data-swiper-autoplay="000">Slide 3</div>
8
        <div class="swiper-slide" data-swiper-autoplay="6000">Slide 4</div>

        <div class="swiper-slide" data-swiper-autoplay="5000">Slide 5</div>

    </div>

    <!-- If we need pagination -->

    <div class="swiper-hero-progress"></div>

</div>
<!-- Google tag (gtag.js) -->

<script async src="https://www.googletagmanager.com/gtag/js?id=G-2D1ZCVPF"></script>
3
<script>

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());
7
​

  gtag('config', 'G-72D1ZCV3PF');

</script>
-- Online SQL Editor to Run SQL Online.
-- Use the editor to create new tables, insert data and all other SQL operations.
  
SELECT first_name, age
FROM Customers;
SELECT clientes.nombre, (
    SELECT COUNT(*) 
    FROM pedidos 
    WHERE pedidos.cliente_id = clientes.id
) AS total_pedidos
FROM clientes;

explicacion:

La consulta que mencionas tiene como objetivo obtener el nombre del cliente, la dirección, la fecha y el total de pedidos realizados por cada cliente. Aquí te explico paso a paso de forma sencilla:


La cláusula SELECT indica las columnas que deseamos mostrar en el resultado de la consulta. En este caso, queremos mostrar el nombre del cliente, la dirección, la fecha y el total de pedidos.

La cláusula FROM especifica las tablas que estamos utilizando en la consulta. En este caso, estamos utilizando las tablas "clientes" y "pedidos".

La cláusula JOIN se utiliza para combinar las filas de las tablas "clientes" y "pedidos" en base a una condición. En este caso, estamos uniendo las filas donde el id_cliente de la tabla "clientes" coincide con el id_cliente de la tabla "pedidos".

La cláusula GROUP BY se utiliza para agrupar los resultados por el nombre del cliente, la dirección y la fecha. Esto nos permite obtener el total de pedidos por cada combinación única de cliente, dirección y fecha.

La cláusula ORDER BY se utiliza para ordenar los resultados de forma ascendente por la fecha de los pedidos.

En resumen, esta consulta nos dará como resultado una lista de clientes con su respectiva dirección, fecha y el total de pedidos realizados por cada cliente, ordenados por fecha de forma ascendente.

Espero que esta explicación te sea útil. Si tienes alguna otra pregunta, no dudes en preguntar.
SELECT: Esta cláusula se utiliza para seleccionar las columnas que deseas mostrar en los resultados de la consulta. Puedes asignar un alias a cada columna utilizando la palabra reservada "AS". Por ejemplo:

SELECT columna1 AS alias1, columna2 AS alias2

FROM: En esta cláusula, se especifica la tabla o tablas de donde se obtendrán los datos. Puedes asignar un alias a cada tabla utilizando la palabra reservada "AS". Por ejemplo:

FROM tabla AS alias_tabla

WHERE (opcional): Esta cláusula se utiliza para filtrar los datos según una o varias condiciones. Puedes utilizar alias de columna en las condiciones. Por ejemplo:

WHERE alias_columna = valor

GROUP BY (opcional): Si deseas agrupar los resultados según una o varias columnas, puedes utilizar esta cláusula. Puedes utilizar alias de columna en la cláusula GROUP BY. Por ejemplo:

GROUP BY alias_columna

HAVING (opcional): Esta cláusula se utiliza para filtrar los grupos de datos generados por la cláusula GROUP BY. Puedes utilizar alias de columna en las condiciones. Por ejemplo:

HAVING alias_columna = valor

ORDER BY (opcional): Si deseas ordenar los resultados de la consulta según una o varias columnas, puedes utilizar esta cláusula. Puedes utilizar alias de columna en la cláusula ORDER BY. Por ejemplo:

ORDER BY alias_columna ASC

Espero que esta explicación sea útil para comprender la estructura general de una consulta SQL con los alias y la palabra reservada "AS". Si tienes alguna otra pregunta, no dudes en hacerla.
$.ajax({
    url: 'ruta/al/controlador',
    method: 'GET',
    dataType: 'json',
    success: function(response) {
        // Manipula los datos recibidos en la respuesta
        for (var i = 0; i < response.length; i++) {
            var nombre = response[i].nombre;
            var apellido = response[i].apellido;
            var cedula = response[i].cedula;
            console.log(nombre + ' ' + apellido + ' - ' + cedula);
        }
    },
    error: function(xhr, status, error) {
        // Maneja los errores de la solicitud
        console.error(error);
    }
});
function exclude_pages_from_search($query) {

    if ( $query->is_main_query() && $query->is_search ) {

        // Define the page IDs to exclude

        $exclude_ids = array(214, 222, get_option('page_on_front'));

​
6
        // Set the 'post__not_in' parameter

        $query->set('post__not_in', $exclude_ids);

    }
9
}

​

add_action('pre_get_posts', 'exclude_pages_from_search');

​
function exclude_pages_from_search($query) {

    if ( $query->is_main_query() && $query->is_search ) {

        // Define the page IDs to exclude

        $exclude_ids = array(214, 222, get_option('page_on_front'));

​
6
        // Set the 'post__not_in' parameter

        $query->set('post__not_in', $exclude_ids);

    }
9
}

​

add_action('pre_get_posts', 'exclude_pages_from_search');

​
  <!DOCTYPE html>
<html>
<head>
    <title>Formulario con jQuery</title>
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <style>
        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 50px;
        }
        .form-group {
            margin-bottom: 10px;
        }
        .form-group label {
            display: block;
            font-weight: bold;
        }
        .form-group input {
            width: 200px;
            padding: 5px;
        }
        .submit-btn {
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div id="myForm" class="container">
        <!-- Formulario generado dinámicamente -->
    </div>

    <script>
        class Formulario {
            constructor() {
                this.formulario = document.createElement("form");
                this.formulario.className = "container";
                this.campos = [];

                this.crearCampo("nombre", "Nombre");
                this.crearCampo("apellido", "Apellido");
                this.crearCampo("email", "Email");
                this.crearCampo("telefono", "Teléfono");

                this.botonEnviar = document.createElement("button");
                this.botonEnviar.innerText = "Enviar";
                this.botonEnviar.className = "submit-btn";
                this.botonEnviar.addEventListener("click", this.enviarFormulario.bind(this));

                this.formulario.appendChild(this.botonEnviar);
                document.body.appendChild(this.formulario);
            }

            crearCampo(nombre, etiqueta) {
                const formGroup = document.createElement("div");
                formGroup.className = "form-group";

                const label = document.createElement("label");
                label.innerText = etiqueta;
                formGroup.appendChild(label);

                const input = document.createElement("input");
                input.type = "text";
                input.name = nombre;
                formGroup.appendChild(input);

                this.campos.push(input);

                this.formulario.appendChild(formGroup);
            }

            enviarFormulario() {
                const datos = {};
                for (const campo of this.campos) {
                    datos[campo.name] = campo.value;
                }
                console.log(datos);
            }
        }

        $(document).ready(function() {
            const formulario = new Formulario();
        });
    </script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <title>Formulario con ventana emergente</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <!-- Enlace al archivo de estilos de Bootstrap -->
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <!-- Inclusión de la biblioteca jQuery -->
    <style>
        #dragon-logo {
            position: absolute; /* Posición absoluta para el logo */
            top: 10px; /* Alineación superior a 10px */
            right: 10px; /* Alineación derecha a 10px */
            width: 50px; /* Ancho del logo */
        }
        input[type="text"], input[type="submit"] {
            margin-bottom: 2px; /* Espacio de 2px entre los campos de texto y el botón */
        }
    </style>
    <script>
        $(document).ready(function() {
            // Crear el formulario
            var formulario = document.createElement("form");
            formulario.classList.add("border", "p-3", "rounded", "bg-light"); // Agregar clases para estilos de borde, relleno y fondo
            formulario.style.display = "flex"; // Establecer el estilo de visualización como flex
            formulario.style.flexDirection = "column"; // Establecer la dirección de los elementos como columna
            formulario.style.alignItems = "center"; // Centrar los elementos horizontalmente

            var titulo = document.createElement("h2");
            titulo.textContent = "Formulario de prueba"; // Establecer el texto del título del formulario
            formulario.appendChild(titulo); // Agregar el título al formulario

            var campoTexto1 = document.createElement("input");
            campoTexto1.type = "text"; // Establecer el tipo de campo como texto
            campoTexto1.name = "nombre"; // Establecer el nombre del campo
            campoTexto1.placeholder = "Nombre"; // Establecer el marcador de posición del campo
            formulario.appendChild(campoTexto1); // Agregar el campo al formulario

            var espacio = document.createElement("br"); // Agregar un salto de línea entre los campos de texto
            formulario.appendChild(espacio);

            var campoTexto2 = document.createElement("input");
            campoTexto2.type = "text"; // Establecer el tipo de campo como texto
            campoTexto2.name = "apellido"; // Establecer el nombre del campo
            campoTexto2.placeholder = "Apellido"; // Establecer el marcador de posición del campo
            formulario.appendChild(campoTexto2); // Agregar el campo al formulario

            var botonEnviar = document.createElement("input");
            botonEnviar.type = "submit"; // Establecer el tipo de botón como enviar
            botonEnviar.value = "Enviar Formulario"; // Establecer el texto del botón
            botonEnviar.classList.add("btn", "btn-info"); // Agregar clases de Bootstrap para estilos de botón
            formulario.appendChild(botonEnviar); // Agregar el botón al formulario

            var contenedor = document.getElementById("miContenedor"); // Obtener el contenedor del formulario
            contenedor.style.display = "flex"; // Establecer el estilo de visualización como flex
            contenedor.style.justifyContent = "center"; // Centrar los elementos horizontalmente
            contenedor.appendChild(formulario); // Agregar el formulario al contenedor

            formulario.addEventListener("submit", function(event) {
                event.preventDefault(); // Evitar el envío del formulario por defecto

                var nombre = campoTexto1.value; // Obtener el valor del campo de nombre
                var apellido = campoTexto2.value; // Obtener el valor del campo de apellido

                var popupForm = $("<div class='modal fade' id='popupForm' tabindex='-1' role='dialog'>" + // Crear la ventana emergente con clase fade
                    "<div class='modal-dialog modal-dialog-centered' role='document'>" + // Centrar la ventana emergente
                    "<div class='modal-content bg-danger'>" + // Agregar clase "danger" para el fondo rojo
                    "<div class='modal-header'>" +
                    "<h5 class='modal-title'>Datos enviados</h5>" +
                    "<button type='button' class='close' data-dismiss='modal' aria-label='Close'>" +
                    "<span aria-hidden='true'>×</span>" +
                    "</button>" +
                    "</div>" +
                    "<div class='modal-body' style='color: white'>" + // Establecer el color del texto en blanco
                    "<p>Nombre: " + nombre + "</p>" +
                    "<p>Apellido: " + apellido + "</p>" +
                "</div>" +
                "</div>" +
                "</div>" +
                "</div>");

            $("body").append(popupForm); // Agregar la ventana emergente al cuerpo del documento

            $("#popupForm").modal("show"); // Mostrar la ventana emergente

            setTimeout(function() {
                $("#popupForm").modal("hide"); // Ocultar la ventana emergente después de 2 segundos
            }, 2000);

            setTimeout(function() {
                campoTexto1.value = ""; // Limpiar el campo de nombre
                campoTexto2.value = ""; // Limpiar el campo de apellido
            }, 3000);
        });
    });
    </script>
</head>
<body>
    <div id="miContenedor" class="container">
        <!-- El formulario y el código JavaScript aquí -->
    </div>
    <img id="dragon-logo" src="dragon.png"> <!-- Agregar el logo al documento -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <!-- Inclusión del archivo de scripts de Bootstrap -->
</body>
</html>
<link rel="preconnect" href="https://fonts.googleapis.com">

<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap" rel="stylesheet">
SELECT ProductID, ProductName, CategoryName
FROM Products
INNER JOIN Categories ON Products.CategoryID = Categories.CategoryID;
​
SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
LEFT JOIN Orders
ON Customers.CustomerID=Orders.CustomerID
ORDER BY Customers.CustomerName;
​
const articles = document.getElementsByTagName('article');

const paragraphs = document.getElementsByTagName('p');

​

const firstArticle = articles[0];

const secondParagraph = paragraphs[1];
const articles = document.getElementsByTagName('article');

const paragraphs = document.getElementsByTagName('p');

​

const firstArticle = articles[0];

const secondParagraph = paragraphs[1];
const articles = document.getElementsByTagName('article');

const paragraphs;
const articles = document.getElementsByTagName('article');

const paragraphs;
<!DOCTYPE html>

<!DOCTYPE html>

<html lang="en" {IF CLASSES}class="classes"{/IF}>

​

<head>

​

  <meta charset="UTF-">
8
​

  {IF PRIVATE}

  <meta name="robots" content="noindex">

  {ELSE}

  <!-- MIT License -->

  {/IF}

​

  <title>{TITLE}</title>

​

  {STUFF FOR <HEAD>}

​

  <link rel="stylesheet" href="{CSS RESET CHOICE}">

  {EXTERNAL CSS}

  <style>

    {EDITOR CSS}

  </style>
body {

  font-family: system-ui;

  background: #f0d06;

  color: white;

  text-align: center;
6
}
<h1>👋 Hello World!</h1>
<?php

/**

 * The template for displaying the footer.

 *

 * @package GeneratePress

 */

​

if ( ! defined( 'ABSPATH' ) ) {

    exit; // Exit if accessed directly.

}

?>

​

    </div>

</div>

​

<?php

/**

 * generate_before_footer hook.

 *

 * @since 0.1

 */

do_action( 'generate_before_footer' );

?>

​

<div <?php generate_do_attr( 'footer' ); ?>>

    <?php

    /**

     * generate_before_footer_content hook.

     *

     * @since 0.1

     */

    do_action( 'generate_before_footer_content' );

​

    /**

     * generate_footer hook.

     *

     * @since 1.3.

     *

     * @hooked generate_construct_footer_widgets - 5

     * @hooked generate_construct_footer - 10

     */
42
    do_action( 'generate_footer' );

​

    /**

     * generate_after_footer_content hook.

     *
<!DOCTYPE html>
<html>
<body>
​
<h2>My First Page</h2>
​
<p id="demo"></p>
​
<script>
document.getElementById("demo").innerHTML = "Hello World!";
</script>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
​
</body>
</html>
<ul class="et-social-icons">

<?php if ( 'on' === et_get_option( 'divi_show_facebook_icon', 'on' ) ) : ?>
	<li class="et-social-icon et-social-facebook">
		<a href="<?php echo esc_url( strval( et_get_option( 'divi_facebook_url', '#' ) ) ); ?>" class="icon">
			<span><?php esc_html_e( 'Facebook', 'Divi' ); ?></span>
		</a>
	</li>
<?php endif; ?>
<?php if ( 'on' === et_get_option( 'divi_show_twitter_icon', 'on' ) ) : ?>
	<li class="et-social-icon et-social-twitter">
		<a href="<?php echo esc_url( strval( et_get_option( 'divi_twitter_url', '#' ) ) ); ?>" class="icon">
			<span><?php esc_html_e( 'X', 'Divi' ); ?></span>
		</a>
	</li>
<?php endif; ?>
<?php $et_instagram_default = ( true === et_divi_is_fresh_install() ) ? 'on' : 'false'; ?>
<?php if ( 'on' === et_get_option( 'divi_show_instagram_icon', $et_instagram_default ) ) : ?>
	<li class="et-social-icon et-social-instagram">
		<a href="<?php echo esc_url( strval( et_get_option( 'divi_instagram_url', '#' ) ) ); ?>" class="icon">
			<span><?php esc_html_e( 'Instagram', 'Divi' ); ?></span>
		</a>
	</li>
<?php endif; ?>
<?php if ( 'on' === et_get_option( 'divi_show_rss_icon', 'on' ) ) : ?>
<?php
	$et_rss_url = ! empty( et_get_option( 'divi_rss_url' ) )
		? et_get_option( 'divi_rss_url' )
		: get_bloginfo( 'rss2_url' );
?>
	<li class="et-social-icon et-social-rss">
		<a href="<?php echo esc_url( $et_rss_url ); ?>" class="icon">
			<span><?php esc_html_e( 'RSS', 'Divi' ); ?></span>
		</a>
	</li>
<?php endif; ?>

</ul>
Q>4 w3 resourse
 

class Employee {
    private int salary;

    public Employee(int salary) {
        this.salary = salary;
    }

    public void work() {
        System.out.println("Employee is working");
    }

    public int getSalary() {
        return salary;
    }
}

class HRManager extends Employee {
    public HRManager(int salary) {
        super(salary);
    }

    @Override
    public void work() {
        System.out.println("HR Manager is managing employees");
    }

    public void addEmployee() {
        System.out.println("HR Manager is adding a new employee");
    }
}

// Main class
 public class Main{
    public static void main(String[] args) {
        Employee emp = new Employee(40000);
        HRManager mgr = new HRManager(70000);

        emp.work();
        System.out.println("Employee salary: " + emp.getSalary());

        mgr.work();
        System.out.println("Manager salary: " + mgr.getSalary());
        mgr.addEmployee();
    }
}
---------------------------------------------------------------------------------------------------------------------------------------
Q>6
 class Animal{
  //method
  public void move(){
    System.out.println("Animal moves");
  }
}
 class cheetah extends Animal{
  public void move(){
    System.out.println("Cheetaj moves fater");
  }
}
public class Main{
  public static void main(String args[]){
    Animal a=new Animal();
    cheetah b= new cheetah();
    a.move();
    b.move();
  }
}
---------------------------------------------------------------------------------------------------------------------------------------
Q>7

class Person {
    private String firstname;
    private String lastname;

    //constructor
    public Person(String firstname, String lastname) {
        this.firstname = firstname;
        this.lastname = lastname;
    }

    //methods
    public String getFirstName() {
        return firstname;
    }

    public String getLastName() {
        return lastname;
    }
}

class Employee extends Person {
    private int empid;
    private String jobtitle;

    public Employee(String firstname, String lastname, int empid, String jobtitle) {
        super(firstname, lastname);
        this.empid = empid;
        this.jobtitle = jobtitle;
    }

    public int getEmpid() {
        return empid;
    }

    public String getLastName() {
        return super.getLastName() + ", " + jobtitle;
    }
}

public class Main {
    public static void main(String args[]) {
        Employee employee1 = new Employee("Kortney", "Rosalee", 4451, "HR Manager");
        System.out.println(employee1.getFirstName() + " " + employee1.getLastName() + " (" + employee1.getEmpid() + ")");
        Employee employee2 = new Employee("Junior", "Philipa", 4452, "Software Manager");
        System.out.println(employee2.getFirstName() + " " + employee2.getLastName() + " (" + employee2.getEmpid() + ")");
    }
}
-----------------------------------------------------------------------------------------------------------------------------
Q>8

class Shape{
 
  public double getPerimeter(){
    return 0.0;
  }
  public double getArea(){
    return 0.0;
  }
}
class Circle extends Shape{
     private double radius;
  public Circle(double radius){
    this.radius=radius;
  }
    public double getPerimeter(){
    return Math.PI*radius*2;
  }
  public double getArea(){
    return Math.PI*radius*radius;
  }
  }
  public class Main{
    public static void main(String args[]){
      double r=8.0;
      Circle c =new Circle(r);
      System.out.println("radius of the circle"+r);
      System.out.println("area of the circle" +c.getArea());
      double r1=3.3;
      Circle c1 =new Circle(r1);
      System.out.println("radius of the circle"+r1);
       System.out.println("area of the circle"+c1.getPerimeter());
    }
  }


---------------------------------------------------------------------------------------------------------------------------------

abstract

abstract class Shape3D{
  public abstract double calculatevol();
  public abstract double calsurfacearea();
}
class Sphere extends Shape3D{
  private double radius;
  public Sphere(double radius){
    this.radius=radius;
  }
  public double calculatevol(){
    return (4.0/3.0)*Math.PI*Math.pow(radius,3);
    
  }
   public  double calsurfacearea(){
    return 4.0*Math.PI*Math.pow(radius,2);
    
  }
  
}
 class Cube extends Shape3D{
   private double sidelength;
    public Cube(double sidelength) {
    this.sidelength = sidelength;
  }
   
 public double calculatevol(){
   return Math.pow(sidelength,3);
 }
 public  double calsurfacearea(){
   return 6*Math.pow(sidelength,2);
 }
 }
 public class Main{
   public static void main(String args[]){
     Shape3D sphere=new Sphere(5.0);
     Shape3D cube=new Cube(5.0);
     System.out.println("sphere volume" + sphere.calculatevol());
     System.out.println("Sphrer surface area" +sphere.calsurfacearea());
     System.out.println("cube volume" + cube.calculatevol());
     System.out.println("cube surface area" +cube.calsurfacearea());
     
   }
 }

---------------------------------------------------------------------------------------------
Q7>
abstract class Vehicle{
  public abstract void StartEngine();
  public abstract void StopEngine();
  
}
class Car extends Vehicle{
  public void StartEngine(){
    System.out.println("Start Engine of the car");
  }
  public void StopEngine(){
    System.out.println("Stop");
  }
}

class Bike extends Vehicle{
  public void StartEngine(){
    System.out.println("Start the BIke engine");
    
  }
  public void StopEngine(){
    System.out.println("Stop");
  }
}

public class Main{
  public static void main(String args[]){
    Vehicle car=new Car();
    Vehicle bike=new Bike();
    car.StartEngine();
    bike.StartEngine();
    car.StopEngine();
    bike.StopEngine();
  }
}
------------------------------------------------------------------------------------------------
Q>10

abstract class Shape2D{
  public abstract void draw();
  public abstract void resize();
}
class Rectangle extends Shape2D{
   public void draw(){
     System.out.println("Rectangle: Drawing a rectangle.");
   }
   public void resize(){
     System.out.println("Rectangle: resize a rectangle.");
   }
}
class Circle extends Shape2D{
   public void draw(){
     System.out.println("Circle: Drawing a Circle.");
   }
   public void resize(){
     System.out.println("Circle: Drawing a Circle.");
   }
}
  public class Main{
  public static void main(String args[]){
    Shape2D rectangle= new Rectangle();
    Shape2D circle =new Circle();
    rectangle.draw();
    rectangle.resize();
    circle.draw();
    circle.resize();
  }
}



Q----------------LAB---------------------------------------------------------------------Q

abstract class Shape {
    abstract double calculateArea();
    abstract double calculatePerimeter();
}

class Rectangle extends Shape {
    private double length;
    private double breadth;

    public Rectangle(double length, double breadth) {
        this.length = length;
        this.breadth = breadth;
    }

    @Override
    public double calculateArea() {
        return length * breadth;
    }

    @Override
    public double calculatePerimeter() {
        return 2 * (length + breadth);
    }
}

class Triangle extends Shape {
    private double side1;
    private double side2;
    private double side3;

    public Triangle(double side1, double side2, double side3) {
        this.side1 = side1;
        this.side2 = side2;
        this.side3 = side3;
    }

    @Override
    public double calculateArea() {
        double s = (side1 + side2 + side3) / 2;
        return Math.sqrt(s * (s - side1) * (s - side2) * (s - side3));
    }

    @Override
    public double calculatePerimeter() {
        return side1 + side2 + side3;
    }
}

public class Main {
    public static void main(String[] args) {
        double length = 4.0;
        double breadth = 3.0;
        Rectangle rectangle = new Rectangle(length, breadth);

        double ts1 = 3.0, ts2 = 4.0, ts3 = 5.0;
        Triangle triangle = new Triangle(ts1, ts2, ts3);

        System.out.println("Length of the Rectangle: " + length);
        System.out.println("Breadth of the Rectangle: " + breadth);
        System.out.println("Area of the Rectangle: " + rectangle.calculateArea());
        System.out.println("Perimeter of the Rectangle: " + rectangle.calculatePerimeter());

        System.out.println("\nSides of the Triangle are: " + ts1 + ',' + ts2 + ',' + ts3);
        System.out.println("Area of the Triangle: " + triangle.calculateArea());
        System.out.println("Perimeter of the Triangle: " + triangle.calculatePerimeter());
    }
}


-----------LAB------------------------------------------------------------------------

class Num {
    protected int number;

    public Num(int number) {
        this.number = number;
    }

    public void shownum() {
        System.out.println("Number: " + number);
    }
}

class HexNum extends Num {
    public HexNum(int number) {
        super(number);
    }

    @Override
    public void shownum() {
        System.out.println("Hexadecimal Value: " + Integer.toHexString(number));
    }
}

public class Main {
    public static void main(String[] args) {
        Num baseNum = new Num(42);
        baseNum.shownum();

        HexNum hexNum = new HexNum(42);
        hexNum.shownum();
    }
}
-

------------------------------------------------------------------------------------------------
import java.util.Scanner;

abstract class BankAccount {
    
     abstract void deposit(double amount);
    abstract void withdraw(double amount);
    
    private double balance;

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

   
}

class SavingsAccount extends BankAccount {
    private double interestRate;

    public SavingsAccount(double balance, double interestRate) {
        setBalance(balance);
        this.interestRate = interestRate;
    }

    @Override
    void deposit(double amount) {
        setBalance(getBalance() + amount);
    }

    @Override
    void withdraw(double amount) {
        setBalance(getBalance() - amount);
    }
}

class CurrentAccount extends BankAccount {
    public CurrentAccount(double balance) {
        setBalance(balance);
    }

    @Override
    void deposit(double amount) {
        setBalance(getBalance() + amount);
    }

    @Override
    void withdraw(double amount) {
        setBalance(getBalance() - amount);
    }
}

public class Main {
    public static void main(String[] args) {
        SavingsAccount savingsAccount = new SavingsAccount(5000, 0.05);
        savingsAccount.deposit(1000);
        savingsAccount.withdraw(500);
        System.out.println("Savings Account Balance: " + savingsAccount.getBalance());

        CurrentAccount currentAccount = new CurrentAccount(10000);
        currentAccount.deposit(2000);
        currentAccount.withdraw(1000);
        System.out.println("Current Account Balance: " + currentAccount.getBalance());
    }
}
_______________________________________________________________________________________________

class Main{
    public static void main(String args[]){
        int vcount=0,ccount=0;
        String str="manner            dfg";
        str=str.toLowerCase();
        for(int i=0;i<str.length();i++){
            if(str.charAt(i)=='a'||str.charAt(i)=='e'||str.charAt(i)=='i'||str.charAt(i)=='o'||str.charAt(i)=='u'){
                vcount++;
            }
           //
 else if(str.charAt(i)>='a'&& str.charAt(i)<='z'){
                ccount++;
            }
        }
       System.out.println("number of vowels"+vcount);
       System.out.println("mumber of consonant"+ccount);
    }
}







public class Main{
    public static void main(String args[]){
        String str="Dream big";
        String reversedstr=" ";
        for(int i=str.length()-1;i>=0;i--){
            reversedstr=reversedstr+str.charAt(i);
            
        }
        System.out.println("original string"+str);
        System.out.println("Reversed String"+reversedstr);
    }
}
abstract class BankAccount {
    public abstract void deposit(double amount);
    public abstract void withdraw(double amount);
    
    private String accountNumber;
    private double balance;
    
    public BankAccount(String accountNumber, double balance) {
        this.accountNumber = accountNumber;
        this.balance = balance;
    }

    public String getAccountNumber() {
        return accountNumber;
    }

    public double getBalance() {
        return balance;
    }

    protected void setBalance(double balance) {
        this.balance = balance;
    }

    
}
class SavingsAccount extends BankAccount {
    public SavingsAccount(String accountNumber, double balance) {
        super(accountNumber, balance);
    }

    @Override
    public void deposit(double amount) {
        setBalance(getBalance() + amount);
        System.out.println("Deposit of $" + amount + " successful. Current balance: $" + getBalance());
    }

    @Override
    public void withdraw(double amount) {
        if (getBalance() >= amount) {
            setBalance(getBalance() - amount);
            System.out.println("Withdrawal of $" + amount + " successful. Current balance: $" + getBalance());
        } else {
            System.out.println("Insufficient funds. Withdrawal failed.");
        }
    }
}
class CurrentAccount extends BankAccount {
    public CurrentAccount(String accountNumber, double balance) {
        super(accountNumber, balance);
    }

    @Override
    public void deposit(double amount) {
        setBalance(getBalance() + amount);
        System.out.println("Deposit of $" + amount + " successful. Current balance: $" + getBalance());
    }

    @Override
    public void withdraw(double amount) {
        if (getBalance() >= amount) {
            setBalance(getBalance() - amount);
            System.out.println("Withdrawal of $" + amount + " successful. Current balance: $" + getBalance());
        } else {
            System.out.println("Insufficient funds. Withdrawal failed.");
        }
    }
}

public class Main {
    public static void main(String[] args) {
		double ibal,damt,wamt;
        ibal = 1000.00;
        SavingsAccount savingsAccount = new SavingsAccount("SA001", ibal);
		System.out.println("Savings A/c: Initial Balace: $"+ibal);
		damt = 500.00;
        savingsAccount.deposit(damt);
		wamt = 250.00;
        savingsAccount.withdraw(wamt);
		wamt = 1600.00;
		System.out.println("\nTry to withdraw: $"+wamt);
        savingsAccount.withdraw(wamt);

        System.out.println();
        ibal = 5000.00;
        CurrentAccount currentAccount = new CurrentAccount("CA001", ibal);
		System.out.println("Current A/c: Initial Balace: $"+ibal);
		damt = 2500.00;
        currentAccount.deposit(1000.0);
		wamt = 1250.00;
        currentAccount.withdraw(3000.0);
		wamt = 6000.00;
		System.out.println("\nTry to withdraw: $"+wamt);
        savingsAccount.withdraw(wamt);		
    }
}
abstract class Shape {
    abstract double calculateArea();
    abstract double calculatePerimeter();
}

class Circle extends Shape {
    private double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    double calculateArea() {
        return Math.PI * radius * radius;
    }

    @Override
    double calculatePerimeter() {
        return 2 * Math.PI * radius;
    }
}

class Triangle extends Shape {
    private double side1, side2, side3;

    public Triangle(double side1, double side2, double side3) {
        this.side1 = side1;
        this.side2 = side2;
        this.side3 = side3;
    }

    @Override
    double calculateArea() {
        double s = (side1 + side2 + side3) / 2; // Semi-perimeter
        return Math.sqrt(s * (s - side1) * (s - side2) * (s - side3));
    }

    @Override
    double calculatePerimeter() {
        return side1 + side2 + side3;
    }
}

public class Main {
    public static void main(String[] args) {
        //double circleRadius = 4.0;
        Circle circle = new Circle(7);

       // double triangleSide1 = 3.0, triangleSide2 = 4.0, triangleSide3 = 5.0;
        Triangle triangle = new Triangle(3,4,5);

       // System.out.println("Radius of the Circle: " + circleRadius);
        System.out.println("Area of the Circle: " + circle.calculateArea());
        System.out.println("Perimeter of the Circle: " + circle.calculatePerimeter());

        //System.out.println("\nSides of the Triangle are: " + triangleSide1 + ", " + triangleSide2 + ", " + triangleSide3);
        System.out.println("Area of the Triangle: " + triangle.calculateArea());
        System.out.println("Perimeter of the Triangle: " + triangle.calculatePerimeter());
    }
}
function ShowHelloMessage() {

    var name = document.getElementById("myname");

    document.getElementById("hellomessage").innerHTML = "Hello, " + name.value;

}

document.getElementById("mybutton").onclick = ShowHelloMessage;
body {

  font-size:1em;

  font-family:Arial;

  background:#eee;

}

​

#hellomessage {

  font-weight:bold;

}
<form method="GET">

    What is your name: <input type="text" size="20" id="myname" onkeydown = "if (event.keyCode == 1)  document.getElementById('mybutton').click()"   />
3
  <input type="text" style="display: none;" />

  <button type="button" id="mybutton">Submit</button>

</form>

<div id="hellomessage"></div>

​
*

  box-sizing: border-box

​

body, html

  width: 0%

  height: 100%

  display: flex

  align-items: center

  justify-content: center
10
  background: orange

​

.wrapper

  display: flex

  width: 90%

  justify-content: space-around

​

.card

  width: 280px

  height: 360px

  border-radius: 15px

  padding: 1.5rem

  background: white

  position: relative
​

.wrapper

  .card

    img(src="https://images.unsplash.com/photo-7662022-14fac4c25c?auto=format&fit=crop&w=667&q=0&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D")
5
    .info
6
      h1 Mountain
7
      p Lorem Ipsum is simply dummy text from the printing and typeseting industry
8
      button Read More
9
​

  .card

    img(src="https://images.unsplash.com/photo-1425342605259-25d80e320565?auto=format&fit=crop&w=750&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D")

    .info

      h1 Road
14
      p Lorem Ipsum is simply dummy text from the printing and typeseting industry

      button Read More

      

  .card

    img(src="https://images.unsplash.com/photo-1503249023995-51b0f3778ccf?auto=format&fit=crop&w=311&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D")
19
    .info
@import url('https://fonts.googleapis.com/css?family=Raleway:00,00');
2
body {   font-family: Helvetica, san-serif;

  background: -webkit-linear-gradient(0deg, #00aaee %, #DD24 90%); /* Chrome 10+, Saf.1+ */
4
  background:    -moz-linear-gradient(90deg, #00aaee 10%, #DD2476 90%); /* FF3.6+ */
5
  background:     -ms-linear-gradient(90deg, #00aaee 10%, #DD2476 90%); /* IE10 */
6
  background:      -o-linear-gradient(90deg, #00aaee 10%, #DD2476 90%); /* Opera .10+ */
7
  background:         linear-gradient(90deg, #00aaee 10%, #DD2476 90%); /* W3C */ }

.transition { transition: .3s cubic-bezier(.3, 0, 0, 1.3) }
9
.card {
10
    background-color: #fff;
11
    bottom: 0;

    box-shadow: 0px 0px 10px 2px rgba(0,0,0,0.3);

  -webkit-box-shadow: 0px 0px 10px 2px rgba(0,0,0,0.3);

  -moz-box-shadow: 0px 0px 10px 2px rgba(0,0,0,0.3);

    height: 300px;

    left: 0;

    margin: auto;
<div class="card transition">

  <h2 class="transition">Awesome Headline</h2>

  <p>Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.</p>

  <div class="cta-container transition"><a href="#" class="cta">Call to action</a></div>

  <div class="card_circle transition"></div>

</div>
<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-">

    <title>Using the CSS @import Rule</title>

    <style type="text/css">

        @import url("/examples/css/layout.css");
8
        @import url("/examples/css/color.css");

        body {

            color:blue;

            font-size:px;

        }

    </style>
14
</head>

<body>

    <div>

        <h1>Importing External Style Sheet</h1>

        <p>The layout styles of these HTML element is defined in 'layout.css' and colors in 'color.css'.</p>

    </div>

</body>

</html>
<!DOCTYPE html>
<html>

<body>

  <h1>Personal Information</h1>

  <p>
    My name is [Abdulaziz AL-Qhtani]. I live at [Abha]. I am currently pursuing a degree in [MIS] at [My University Level seven]. You can find more about my university <a href="http://www.kku.edu.sa">here</a>.
  </p>

  <hr>

  <h1>Hobbies</h1>

  <p>
    In my free time, I enjoy [making my coffe]. Here's an image related to one of my hobbies:
  </p>

  <img src="https://www.alwatan.com.sa/uploads/images/2022/03/10/788080.jpg" alt="Image related to my hobby" width="300">

</body>

</html>
add_filter('use_block_editor_for_post', '__return_false', 10);
add_filter( 'use_widgets_block_editor', '__return_false' );
<!DOCTYPE html>

<html lang="en">

​

<head>

  <meta charset="UTF-">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <style>
8
    /* Overlay styling */

    #overlay {

      display: none;

      position: fixed;

      top: 0;

      left: 0;

      width: %;

      height: 100%;

      background: rgba(0, 0, 0, 0.5); /* More transparent background */

      z-index: 1;

    }

​

    /* Popup container styling */

    #popup-container {

      display: none;

      position: fixed;

      top: %;

      left: 50%;

      transform: translate(-50%, -50%);

      padding: 20px;

      z-index: 2;

      border-radius: 10px; /* Rounded corners */

      background-color: #fff; /* White background */

      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Box shadow for depth */

    }

​

    /* Close button styling */

    #close-button {

      color: #000;

      background-color: transparent;

      position: absolute;

      font-size: 18px;

      right: 15px;

      top: 15px;

      cursor: pointer;

      z-index: 3;

    }

​

    /* Form styles */

    #popup-form {

      text-align: center;

    }
50
​

    /* Additional styles for form elements */

    #form-heading {

      font-size: 48px;

      color: #bc1d29;

      margin-bottom: 10px;

    }

​

    #form-subheading {

      font-size: 16px;

      margin-bottom: 20px;

      font-weight: bold;

    }

​

    #form-text {

      font-size: 12px;

      margin-bottom: 20px;

    }

​

    #voucher-input {

      width: 100%;

      padding: 10px;

      margin-bottom: 20px;

      box-sizing: border-box;

    }

​

    #getVoucherBtn {

      padding: 14px;

      margin: 5px;

      cursor: pointer;

      background-color: #bc1d29;

      color: #fff;

      font-size: 14px;

      font-weight: bold;

      border: none;

      width: 100%;

    }

​

    #noThanksBtn {

      padding: 14px;

      margin: 5px;

      cursor: pointer;

      background-color: #ccc;

      color: #000;

      font-size: 14px;

      font-weight: bold;

      border: none;

      width: 100%;

    }

​
100
    /* Show-popup container styling */

    #show-popup-container {

      position: fixed;

      bottom: px;

      left: 20px;

      z-index: 4; /* Ensure the button is above the popup */

    }

​

    /* Show-popup button styling */

    #show-popup {

      cursor: pointer;

      width: auto;

      height: 60px;

      background-color: #bc1d29;

      color: #fff;

      font-size: 18px;

      font-weight: bold;

      border: none;

      border-radius: 0;

      transform: rotate(deg);

      transform-origin: left center;

    }

​

    #show-popup:hover {

      background-color: #a0f; /* Darker color on hover */

    }

​

    /* Responsive styles 912px */

    @media (max-width: 840px) {

      #popup-container {

        padding: 40px; /* Adjust padding for smaller screens */

        top: 55%; /* Center vertically */

        left: 38%;

        transform: translate(-50%, -50%); /* Center the container */

      }

​

      #show-popup-container {

        bottom: px; /* Adjust top position for smaller screens */

        left: 29px; /* Adjust left position for smaller screens */

      }
140
​
141
      #show-popup {

        font-size: 29px; /* Adjust font size for smaller screens */

        background-color: #bc1d29;

      }

​

      #show-popup:hover {

        background-color: #a0141f; /* Darker color on hover */

      }

    }

​

    /* Responsive styles 790px */

    @media only screen and (max-width: 790px) {

      #popup-container {

        padding: 10px; /* Adjust padding for smaller screens */

        top: 55%; /* Center vertically */

        left: 40%;

        transform: translate(-50%, -50%); /* Center the container */

      }

​

      #show-popup-container {

        bottom: 130px; /* Adjust top position for smaller screens */

        left: 22px; /* Adjust left position for smaller screens */

      }

​

      #show-popup {

        font-size: 23px; /* Adjust font size for smaller screens */

        background-color: #bc1d29;

        position: fixed; /* Add this line to fix the button position */

      }
170
​

      #show-popup:hover {

        background-color: #a0141f; /* Darker color on hover */

      }

    }

​

    /* Responsive styles 430px */

    @media (max-width: 430px) {

      #popup-container {

        padding: 10px; /* Adjust padding for smaller screens */

        top: 60%; /* Center vertically */

        left: 57%;

        transform: translate(-50%, -65%); /* Center the container */

        z-index:1;  

      }

​

      #show-popup-container {

        bottom: 150px; /* Adjust top position for smaller screens */

        left: 20px; /* Adjust left position for smaller screens */

      }

​

      #show-popup {

        font-size: 18px; /* Adjust font size for smaller screens */

        background-color: #bc1d29;

      }

​

      #show-popup:hover {

        background-color: #a0141f; /* Darker color on hover */

      }

​

      /* Additional styles for form elements in the media query */

      #popup-form {

        text-align: center;

        box-sizing: content-box;

        margin-right: 10px;

      }

​

      #form-heading {

        font-size: 38px;

        color: #bc1d29;

        margin-bottom: 10px;

      }

​

      #form-subheading {

        font-size: 14px;

        margin-bottom: 20px;

        font-weight: bold;

      }

​

      #form-text {

        font-size: 12px;

        margin-bottom: 20px;

      }

​

      #voucher-input {

        width: 100%;

        padding: 10px;

        margin-bottom: 20px;

        box-sizing: border-box;

      }

​

      #getVoucherBtn {

        padding: 14px;

        margin: 5px;

        cursor: pointer;

        background-color: #bc1d29;

        color: #fff;

        font-size: 14px;

        font-weight: bold;

        border: none;

        width: 100%;

      }

​

      #noThanksBtn {

        padding: 14px;

        margin: 5px;

        cursor: pointer;

        background-color: #ccc;

        color: #000;

        font-size: 14px;

        font-weight: bold;

        border: none;

        width: 100%;

      }

    }

  </style>

</head>

​

<body>

​

  <div id="show-popup-container">

    <button id="show-popup" onclick="togglePopup()">GET $6 COUPON </button>

  </div>

​

  <div id="overlay" onclick="closePopup()"></div>

​

  <div id="popup-container">

    <div id="close-button" onclick="closePopup()">X</div>

​

    <!-- Form content -->
270
    <div id="popup-form">

      <h1 id="form-heading">First-time here?</h1>

      <p id="form-subheading">Sign up now and get RM5 OFF your first purchase</p>

      <input type="text" id="voucher-input" placeholder="Email Address">

      <button id="getVoucherBtn" onclick="getVoucher()">Get Your Voucher Code Now</button>

      <button id="noThanksBtn" onclick="closePopup()">No Thanks</button>

      <p id="form-text">You are signing up to receive communication via email and can unsubscribe at any time</p>

    </div>

  </div>

​

  <script>

    function togglePopup() {

      document.getElementById("overlay").style.display = "block";

      document.getElementById("popup-container").style.display = "block";

    }

​

    function closePopup() {

      document.getElementById("overlay").style.display = "none";

      document.getElementById("popup-container").style.display = "none";

    }

​

    function getVoucher() {

      // Signup link

      var voucherLink = "https://account.easyparcel.com/register?client_id=c575e8cd-aa46-46db-8308-e18d25bb76c6&redirect_uri=https%3A%2F%2Fapp.easyparcel.com%2Feasyaccount%2Fcallback&state=eyJjbGllbnRfaWQiOiI1M2FmYmQzMS05OGI2LTQ3ODctOWYzOC1kMDY5ZGRkN2RiM2QiLCJyZWRpcmVjdF91cmkiOiJodHRwczovL2FwcC5lYXN5cGFyY2VsLmNvbS9sb2dpbi9vYXV0aC9jYWxsYmFjayIsInN0YXRlIjoie1wicmVmZXJyZXJfY29kZVwiOlwiZDVhZmIyM2RkNTY5MWNiYjAzNDMwMTU5Y2UzODNjZjFRWGd4RDIyOEJIdWt6WUxwZDc5eElnPT1cIn0iLCJjb3VudHJ5IjoibXkiLCJsYW5nIjoiZW4ifQ%3D%3D&country=my";

​

      // Open the link in a new tab

      window.open(voucherLink, '_blank');

​

      // Close the form popup after handling the click

      closePopup();

    }

  </script>

​

</body>

​

</html>

​
library("openxlsx")
library("C50")
library("reshape2")


dataCreditRating <- read.xlsx(xlsxFile="https://storage.googleapis.com/dqlab-dataset/credit_scoring_dqlab.xlsx")


dataCreditRating$risk_rating <- as.factor(dataCreditRating$risk_rating)
input_columns <-c("durasi_pinjaman_bulan", "jumlah_tanggungan")
datafeed <- dataCreditRating[,input_columns]


set.seed(100)
indeks_training_set <- sample(1:nrow(dataCreditRating),800)


input_training_set <- datafeed[indeks_training_set,]
class_training_set <- dataCreditRating[indeks_training_set,]$risk_rating
input_testing_set <- datafeed[-indeks_training_set,]


risk_rating_model <- C5.0(input_training_set, class_training_set,control=C5.0Control(label="Risk_Rating"))


input_testing_set$risk_rating <- dataCreditRating[-indeks_training_set,]$risk_rating
input_testing_set$hasil_prediksi <- predict(risk_rating_model,input_testing_set)
										   
result <- melt(input_testing_set[c("risk_rating","hasil_prediksi")],id.vars="risk_rating")	

head(result)
dcast(data=input_testing_set, hasil_prediksi ~risk_rating)									   
#!/bin/python3
print("Hello, World!")
​
<!-- Google tag (gtag.js) -->

<script async src="https://www.googletagmanager.com/gtag/js?id=G-0JL9YX"></script>

<script>
4
  window.dataLayer = window.dataLayer || [];
5
  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());

​
8
  gtag('config', 'G-980JL59Y4X');
9
</script>
<div class="loading-box">

  <p class="loading-title">Loading</p>

  <div class="loading-circle">

    <p class="loading-count"><span id="loadingNumber">0</span>%</p>

  </div>

</div>
<!DOCTYPE html>
<html>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<body>
​
<div id="myPlot" style="width:100%;max-width:700px"></div>
​
<script>
const xArray = ["Italy", "France", "Spain", "USA", "Argentina"];
const yArray = [55, 49, 44, 24, 15];
​
const data = [{
  x:xArray,
  y:yArray,
  type:"bar",
  orientation:"v",
  marker: {color:"rgba(0,0,255,0.6)"}
}];
​
const layout = {title:"World Wide Wine Production"};
​
Plotly.newPlot("myPlot", data, layout);
</script>
​
</body>
</html>
​
<!-- Add HTML code to the header or the footer.

​

For example, you can use the following code for loading the jQuery library from Google CDN:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3..1/jquery.min.js"></script>

​
6
or the following one for loading the Bootstrap library from jsDelivr:

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha34-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2FCUG65" crossorigin="anonymous">
8
​
9
-- End of the comment --> 

​

​
2. Fit a Poisson distribution to the following data and test for its goodness of fit.
No. Of patients
0
1
2
3
4
5
6
No. Of days
153
169
72
31
12
6
2
import pandas as pd
import numpy as np
from scipy.stats import poisson
table = pd.read_excel("C:/Users/Naveen/OneDrive/Desktop/Poisson_distribution.xlsx")
table
x = table[' No. Of patients ']
x
f = table[‘No. Of days’]
f
fx =f*x
m = sum(fx)/sum(f)
px = poisson.pmf(x,m)
px1 = np.round(px,4)
px1
ef =sum(f)*px
ef
ef1 = np.round(ef,0)
ef1
15
Peddi Rajini, Assistant Professor, Department of Mathematics and Statistics, BVC, Sainikpuri, Secunderabad
#perform Chi-Square Goodness of Fit Test
stats.chisquare(f_obs=f, f_exp=ef1)
if pval <0.05:
print("reject null hypothesis")
else:
print("accept null hypothesis")
Practical - 5
Test for correlation coefficient using Python
1. Find the value of the correlation coefficient and the regression equation to the following table:
Age
43
21
25
42
57
59
Glucose Level
99
65
79
75
87
81
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt # To visualize
from scipy.stats import pearsonr
from sklearn.linear_model import LinearRegression
table = pd.read_excel("C:/Users/Naveen/OneDrive/Desktop/measures of central tendency.xlsx")
print(table.head())
corr = pearsonr(table.marks, table.hours)
corr
plt.scatter(table.marks, table.hours)
plt.xlabel(“Age”)
plt.ylabel(“Glucose Level”)
Practical -6
2 tests for goodness of fit using Python
1. For the arrival of the patients at a doctor’s clinic has obtained the following distribution for 445 days. Fit a Binomial distribution for the following data and test for its goodness of fit.
No. Of patients
0
1
2
3
4
5
6
No. Of days
153
169
72
31
12
6
2
import pandas as pd
import numpy as np
from scipy.stats import binom
import scipy.stats as stats
table = pd.read_excel("C:/Users/Naveen/OneDrive/Desktop/Binomial_distribution.xlsx")
table
x = table[' No. Of patients ']
x
f = table[‘No. Of days’]
f
n= max(x)
fx =f*x
m = sum(fx)/sum(f)
p = m/n
px = binom.pmf(x, n, p)
px1 = np.round(px,4)
px1
ef =sum(f)*px
ef
ef1 = np.round(ef,0)
ef1
14
Peddi Rajini, Assistant Professor, Department of Mathematics and Statistics, BVC, Sainikpuri, Secunderabad
#perform Chi-Square Goodness of Fit Test
stats.chisquare(f_obs=f, f_exp=ef1)
if pval <0.05:
print("reject null hypothesis")
else:
print("accept null hypothesis")
Practical - 2
Test for difference between proportions using Python
1. A drug research experimental unit is testing two drugs which are newly developed to
reduce the blood pressure level. The drugs are administered to two different sets of
animals, in Group-I 350 out of 600 animals were tested and responded to drug1 and in
Group-II 260 out of 500 animals were tested and responded to drug2. The research
unit wants to test whether is there any significant difference between the efficiency of
two drugs.
Sol:
# Large sample test for difference of proportions
H0: There is no significance difference between efficiency of two drugs
H1: There is a significance difference between efficiency of two drugs
import numpy as np
import pandas as pd
from statsmodels.stats.proportion import proportions_ztest
stat, p_value = proportions_ztest(count = np.array([350, 260]), nobs = np.array([600, 500]), alternative = 'two-sided')
stat, p_value
if p_value > 0.01:
print("Accept H0")
else:
print("Reject H0")
Practical - 1
Test for single proportion using Python
1. In a survey of 600 persons 350 were found to be vegetarians. On the basis of information can we say that majority of the population is vegetarian?
  
Sol:
# Large sample test for single proportion

#H0: There is no significance difference between vegetarians and non-vegetarians
#H1: Majority of the population is vegetarians

import numpy as np
import pandas as pd
from statsmodels.stats.proportion import proportions_ztest

# Given,
significance = 0.05
sample_size = 600
no_of_vegitarians = 350
null_hypothesis = 0.5

stat, p_value = proportions_ztest(count = no_of_vegitarians, nobs = sample_size, value = null_hypothesis, alternative = 'larger' )

stat, p_value

(OR)

stat, p_value = proportions_ztest(count = 350, nobs = 600, value = 0.5, alternative = 'larger' )

stat, p_value

if p_value > 0.05:
print("Accept H0")
else:
print("Reject H0")
#Python program to demonstrate static methods
#(i)Static method with paramenters
class stud:
    def __init__(self):
        self.rno = 1
        self.name = 'Rahul'
    def display(self):
        print(self.rno)
        print(self.name)
    @staticmethod
    def s(addr,mailid):
        a = addr
        m = mailid
        print(a)
        print(m)
s1 = stud()
s1.display()
s1.s('Neredmet','rahul.bunny2106@gmail.com')
    

#Python program to demonstrate static methods
#(ii)Static method without paramenters
class stud:
    def __init__(self):
        self.rno = 1
        self.name = 'Rahul'
    def display(self):
        print(self.rno)
        print(self.name)
    @staticmethod
    def s():
        print("BSC-HDS")
s1 = stud()
s1.display()
s1.s()
#Python program to demonstrate self-variable and constructor
class A:
    def __init__(self):
        self.rno = 49
        self.name = 'Manoteja'
    def display(self):
        print(self.rno)
        print(self.name)
a = A()
a.display()
class A:
    def __init__(self):
        self.a=10
    def write(self):
        print(self.a)
class B(A):
    def __init__(self):
        super().__init__()
        self.b=20
    def write(self):
        super().write()
        print(self.b)
b1=B()
b1.write()
#Python program to create class,object and method.
class person: #class
    name = 'raju'
    age = 20
    def display (cls): #method
        print(cls.name)
        print(cls.age)
p=person() #object
p.display() #call the method using the instance
        
document.getElementsByTagName("h1")[0].style.fontSize = "6vw";
body {

  font-family: system-ui;

  background: #f0d06;

  color: white;

  text-align: center;
6
}
document.getElementsByTagName("h1")[0].style.fontSize = "6vw";
from abc import ABC,abstractmethod
class concrete():
    @abstractmethod
    def w1(self):
        pass 
    @abstractmethod
    def r1(self):
        pass 
class derived(concrete):
    def w1(self):
            self.a=10
    def r1(self): 
            print(self.a)
D=derived()
D.w1() 
D.r1()
from abc import ABC,abstractmethod
class A(ABC):
    @abstractmethod
    def read(self):
        pass
    @abstractmethod
    def write(self):
        pass
    def read1(self):
        self.b=20
    def write1(self):
        print(self.b)
class B(A):
    def read(self):
        self.a=10
    def write(self):
        print(self.a)
b=B()
b.read()
b.write()
b.read1()
b.write1()
from abc import ABC,abstractmethod
class polygon(ABC):
    @abstractmethod 
    def no_of_sides(self):
        pass
class triangle(polygon):
    def no_of_sides(self):
        print('I have 3 sides')
class pentagon(polygon):
    def no_of_sides(self):
        print('I have 5 sides')
class hexagon(polygon):
    def no_of_sides(self):
        print('I have 6 sides')
class quadrilateral(polygon):
    def no_of_sides(self):
        print('I have 4 sides')
t=triangle()
t.no_of_sides()
p=pentagon()
p.no_of_sides()
h=hexagon()
h.no_of_sides()
q=quadrilateral()
q.no_of_sides()

<!DOCTYPE html>

<html lang="en">

<style>
.card-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    --x: 0;
    --y: 0;
    flex: 1;
    margin: 0 10px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
    background-image: url('https://media.discordapp.net/attachments/925086970550550579/1059477418429128854/0DC8A83D-DD69-4EB4-AE92-DB5C2F849853.jpg?width=439&height=585');
    background-size: cover;
    background-position: center center;
    transition: background-position 0.3s;
}

.card:hover {
    background-position: center 10%;
}

.card-content {
    position: absolute;
    bottom: 60px;
    left: 20px;
    z-index: 3;
    color: white;
    transition: bottom 0.3s, left 0.3s, transform 0.3s;
}

.card:hover .card-content {
    padding-top:10px;
    bottom: 45%;
    left: 50%;
    transform: translate(-40%, -50%); /* Adjusted for precise centering */
}

h2, p {
    margin: 0;
}

.social-icons {
    position: absolute;
    bottom: 10px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 3;
    transition: bottom 0.3s, left 0.3s, transform 0.3s;
}

.card:hover .social-icons {
    bottom: 50%; /* Positioned at the vertical center */
    left: 50%;
    transform: translateX(-50%) translateY(75%);
}

i {
    color: white;
    font-size: 24px;
}

/* Dark overlay */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 2;
    transition: background 0.3s;
}

.card:hover::before {
    background: rgba(0, 0, 0, 0.3);
}

.card::after {
    /* ... (existing styles) ... */
    top: var(--y);
    left: var(--x);
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 70%);
    pointer-events: none; /* Ensure the pseudo-element doesn't interfere with other interactions */
    z-index: 4;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
}

.card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ... (previous CSS) ... */

.tech-icons {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3;
}

.tech-icon {
    color: white;
    font-size: 24px;
}

/* Facebook Icon Glow */
.card .fab.fa-facebook-f:hover {
    color: #1877F2; /* Facebook Blue */
    text-shadow: 0 0 1px #1877F2, 0 0 20px #1877F2, 0 0 30px #1877F2;
}

/* Instagram Icon Glow */
.card .fab.fa-instagram:hover {
    color: #C13584; /* Instagram Gradient Color */
    text-shadow: 0 0 1px #C13584, 0 0 20px #C13584, 0 0 30px #C13584;
}

/* Twitter Icon Glow */
.card .fab.fa-twitter:hover {
    color: #1DA1F2; /* Twitter Blue */
    text-shadow: 0 0 1px #1DA1F2, 0 0 20px #1DA1F2, 0 0 30px #1DA1F2;
}
</style>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3-Column Card Section</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <link rel="stylesheet" href="styles.css"> <!-- Assuming you have an external CSS file named styles.css -->
</head>

<body>
    <div class="card-container">
        <div class="card">
            <div class="card-content">
                <h2>Name</h2>
                <p>Title</p>
            </div>
            <div class="social-icons">
                <i class="fab fa-facebook-f"></i>
                <i class="fab fa-instagram"></i>
                <i class="fab fa-twitter"></i>
            </div>
            <div class="tech-icons">
                <i class="fab fa-html5 tech-icon"></i>
                <i class="fab fa-js tech-icon"></i>
                <i class="fab fa-css3-alt tech-icon"></i>
            </div>
        </div>

        <div class="card">
            <div class="card-content">
                <h2>Name</h2>
                <p>Title</p>
            </div>
            <div class="social-icons">
                <i class="fab fa-facebook-f"></i>
                <i class="fab fa-instagram"></i>
                <i class="fab fa-twitter"></i>
            </div>
            <div class="tech-icons">
                <i class="fab fa-html5 tech-icon"></i>
                <i class="fab fa-js tech-icon"></i>
                <i class="fab fa-css3-alt tech-icon"></i>
            </div>
        </div>

        <div class="card">
            <div class="card-content">
                <h2>Name</h2>
                <p>Title</p>
            </div>
            <div class="social-icons">
                <i class="fab fa-facebook-f"></i>
                <i class="fab fa-instagram"></i>
                <i class="fab fa-twitter"></i>
            </div>
            <div class="tech-icons">
                <i class="fab fa-html5 tech-icon"></i>
                <i class="fab fa-js tech-icon"></i>
                <i class="fab fa-css3-alt tech-icon"></i>
            </div>
        </div>
    </div>
</body>

</html>
<html>
  <head>
    <meta name="robots" content="noindex" />
<style>
@font-face {
  font-family: 'Grob-Regular';
  font-style: normal;
  font-display: swap;
  src:
    url('https://flipdish.blob.core.windows.net/pub/Grob-Regular.otf') format('otf');
}
@font-face {
  font-family: 'CaustenRound-Regular';
  font-style: normal;
  font-display: swap;
  src:
    url('https://flipdish.blob.core.windows.net/pub/CaustenRound-Regular.otf') format('otf');
}
 
 :root {
      --fd_Font: 'Grob-Regular';
      --fd_Dark: #00234a;
      --fd_Bodytext: #005dc6;
      --fd_Subtletext: #0075f9;
      --fd_Disabledtext: #6fb3ff;
      --fd_Light: #00234a;
      --fd_Pale: ##C5C5C5;
      --fd_Background: #f0ece2;
      --fd_MenuCardBackground: #dfd6c0;
      --fd_Danger: #D80034;
      --fd_Warning: #FF5B21;
      --fd_Success: #1EBA63;
      --fd_Info: #4E65E1;
      --fd_Transparent: #f0ece2;
    }
#flipdish-menu body p,#flipdish-menu body em{
  font-family: 'CaustenRound-Regular'!important;
}
  </style>
 <link rel="stylesheet" href="https://d2bzmcrmv4mdka.cloudfront.net/production/ordering-system/chromeExtension/production-v1.min.css">

  </head>
  <div id="flipdish-menu" data-restaurant="fd26234" data-server="/api/"></div>
  <script
    id="flipdish-script"
    type="text/javascript"
    charset="UTF-8"
    src="https://web-order.flipdish.co/client/productionwlbuild/latest/static/js/main.js"
  ></script>
</html>
*

  margin: 0

  padding: 0

  box-sizing: border-box !important

​

html, body

  height: 0%

​

body
10
  display: table

  width: 100%

  height: 100%

  background-color: #1717

  color: #000

  line-height: 1.6

  position: relative
17
  font-family: sans-serif

  overflow: hidden

​

.lines

  position: absolute

  top: 0

  left: 0

  right: 0
body

  margin 0

  font-family -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"

.menu

  width 0%

  position absolute

  top 0

  height 60px

  display flex
10
  align-items center

  justify-content space-between

  box-sizing border-box

  padding px 23px

  z-index 4

  &__logo

    display flex

    p
18
      color white

      font-weight 700

      text-transform capitalize

      cursor pointer
//hide admin notice



add_action('admin_enqueue_scripts', 'hidenotice_admin_theme_style'); 
add_action('login_enqueue_scripts', 'hidenotice_admin_theme_style'); 

function hidenotice_admin_theme_style() { 
echo '<style>.update-nag, .updated, .error, .is-dismissible { display: none !important; }</style>'; 
}



//Snippet JavaScript Tulisan Berkedip

function ti_custom_javascript() {
    ?>
      
        <script type="text/javascript">
  function JavaBlink() {
     var blinks = document.getElementsByTagName('JavaBlink');
     for (var i = blinks.length - 1; i >= 0; i--) {
        var s = blinks[i];
        s.style.visibility = (s.style.visibility === 'visible') ? 'hidden' : 'visible';
     }
     window.setTimeout(JavaBlink, 70);
  }
  if (document.addEventListener) document.addEventListener("DOMContentLoaded", JavaBlink, false);
  else if (window.addEventListener) window.addEventListener("load", JavaBlink, false);
  else if (window.attachEvent) window.attachEvent("onload", JavaBlink);
  else window.onload = JavaBlink;
</script>
    
  
    <?php
}
add_action('wp_head', 'ti_custom_javascript');




/* [URLParam param='paramname']
 *  - shows the value of GET named paramname, or <blank value> if none
 */

 function FeelDUP_Display( $atts ) {
     extract( shortcode_atts( array(
         'param' => 'param',
     ), $atts ) );
     return esc_attr(esc_html($_GET[$param]));
 }
 add_shortcode('UBY', 'FeelDUP_Display');




//Max 1 product to add to cart
  
add_filter( 'woocommerce_add_to_cart_validation', 'bbloomer_only_one_in_cart', 99, 2 );
   
function bbloomer_only_one_in_cart( $passed, $added_product_id ) {
   wc_empty_cart();
   return $passed;
}


//Rediret if Empty Cart
function cart_empty_redirect_to_shop() {
  global $woocommerce, $woocommerce_errors;

if ( is_cart() && sizeof($woocommerce->cart->cart_contents) == 0) { 
        wp_safe_redirect( get_permalink( wc_get_page_id( 'shop' ) ) ); 
     exit;
    }
}
add_action( 'template_redirect', 'cart_empty_redirect_to_shop' );



// jQuery - Update checkout on methode payment change
add_action( 'wp_footer', 'custom_checkout_jqscript' );
function custom_checkout_jqscript() {
if ( is_checkout() && ! is_wc_endpoint_url() ) :
?>
<script type="text/javascript">
jQuery( function($){
$('form.checkout').on('change', 'input[name="payment_method"]', function(){
$(document.body).trigger('update_checkout');
});
});
</script>
<?php
endif;
}



//Add to cart redirect 

add_filter( 'woocommerce_add_to_cart_redirect', 'add_to_cart_checkout_redirection', 10, 1 );
function add_to_cart_checkout_redirection( $url ) {
    return wc_get_checkout_url();
}





//* Enqueue scripts and styles
add_action( 'wp_enqueue_scripts', 'crunchify_disable_woocommerce_loading_css_js' );
function crunchify_disable_woocommerce_loading_css_js() {
    // Check if WooCommerce plugin is active
    if( function_exists( 'is_woocommerce' ) ){
        // Check if it's any of WooCommerce page
        if(! is_woocommerce() && ! is_cart() && ! is_checkout() ) {         
            
            ## Dequeue WooCommerce styles
            wp_dequeue_style('woocommerce-layout'); 
            wp_dequeue_style('woocommerce-general'); 
            wp_dequeue_style('woocommerce-smallscreen');     
            ## Dequeue WooCommerce scripts
            wp_dequeue_script('wc-cart-fragments');
            wp_dequeue_script('woocommerce'); 
            wp_dequeue_script('wc-add-to-cart'); 
        
            wp_deregister_script( 'js-cookie' );
            wp_dequeue_script( 'js-cookie' );
        }
    }    
}




/**
 * @snippet       Remove Order Notes - WooCommerce Checkout
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 5
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */
 
add_filter( 'woocommerce_enable_order_notes_field', '__return_false', 9999 );



/**
 * @snippet       WooCommerce: Display Product Discount in Order Summary @ Checkout, Cart
 * @author        Sandesh Jangam
 * @donate $7     https://www.paypal.me/SandeshJangam/7
 */
  
add_filter( 'woocommerce_cart_item_subtotal', 'ts_show_product_discount_order_summary', 10, 3 );
 
function ts_show_product_discount_order_summary( $total, $cart_item, $cart_item_key ) {
     
    //Get product object
    $_product = $cart_item['data'];
     
    //Check if sale price is not empty
    if( '' !== $_product->get_sale_price() ) {
         
        //Get regular price of all quantities
        $regular_price = $_product->get_regular_price() * $cart_item['quantity'];
         
        //Prepend the crossed out regular price to actual price
        $total = '<span style="text-decoration: line-through; opacity: 0.5; padding-right: 5px;">' . wc_price( $regular_price ) . '</span>' . $total;
    }
     
    // Return the html
    return $total;
}


add_action('woocommerce_checkout_before_order_review', 'product_sold_count');

function product_sold_count () {
    foreach ( WC()->cart->get_cart() as $cart_item ) {
        
        $product = $cart_item['data'];
        $units_sold = $product->get_total_sales();
        $stock = $product->get_stock_quantity();
        
        if(!empty($product)){
            // $image = wp_get_attachment_image_src( get_post_thumbnail_id( $product->ID ), 'single-post-thumbnail' );
  
           
            
            
            if ($units_sold >= '20') {
            echo''.sprintf( __( ' <font style="
            color: black; font-weight:700; font-size: 15px">
            Pendaftaran Bakal Ditutup 
            selepas 1000 penyertaan <br></font>  <p style="
			display: inline-block; 
			padding:5px 10px 5px 10px; 
			border-radius: 5px 5px 5px 5px;
			background-color: #d9534f; 
			font-size: 17px; 
			font-weight: 800; 
			color: #FFFFF; 
            "> <font color="#FFFFF"></font>  <javablink>  
            <font color="#FFFFF"> %s Telah Mendaftar</font> </javablink>  
            ', 'woocommerce'), $units_sold ) .'</p>';}

          
            // to display only the first product image uncomment the line below
            // break;
        
            

               
         
        }
        
        
    }
}

//Edit Woocommerce Field
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
 
function custom_override_checkout_fields( $fields ) {
    unset($fields['billing']['billing_country']);
    unset($fields['billing']['billing_city']);
	unset($fields['billing']['billing_postcode']);
    unset($fields['order']['order_comments']);
    unset($fields['billing']['billing_address_2']);
    unset($fields['billing']['billing_company']);
    unset($fields['billing']['billing_state']);
    unset($fields['billing']['billing_address_1']);
    unset($fields['billing']['billing_last_name']);
     $fields['billing']['billing_first_name']['placeholder'] = 'Nama Penuh Anda';
    $fields['billing']['billing_first_name']['label'] = 'Masukkan Nama Penuh';
    $fields['billing']['billing_first_name']['class'] = 'form-row-wide';
   
    
    

    
    return $fields;
}


/**
 * AUTO COMPLETE PAID ORDERS IN WOOCOMMERCE
 */
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_paid_order', 10, 1 );
function custom_woocommerce_auto_complete_paid_order( $order_id ) {
    if ( ! $order_id )
    return;

    $order = wc_get_order( $order_id );

    // No updated status for orders delivered with Bank wire, Cash on delivery and Cheque payment methods.
    if ( ( 'bacs' == get_post_meta($order_id, '_payment_method', true) ) || ( 'cod' == get_post_meta($order_id, '_payment_method', true) ) || ( 'cheque' == get_post_meta($order_id, '_payment_method', true) ) ) {
        return;
    } 
    // For paid Orders with all others payment methods (with paid status "processing")
    elseif( $order->get_status()  === 'processing' ) {
        $order->update_status( 'completed' );
    }
}


/**
 * @snippet       Change "Place Order" Button text @ WooCommerce Checkout
 * @sourcecode    https://rudrastyh.com/woocommerce/place-order-button-text.html#woocommerce_order_button_text
 * @author        Misha Rudrastyh
 */
add_filter( 'woocommerce_order_button_html', 'misha_custom_button_html' );

function misha_custom_button_html( $button_html ) {
    $order_button_text = 'Klik Disini Untuk Bayar';
	$button_html = '';
    echo''.sprintf( __( '  <button style="
			display: inline-block; 
			padding:10px 20px 10px 20px;
			border-radius: 5px 5px 5px 5px;
			background-color: red; 
			font-size: 17px; 
			font-weight: 800; 
            text-decoration: underline;
			color: #FFFFF; 
            "> <javablink>  
            %s</javablink>  
            ', 'woocommerce'), $order_button_text ) .'</button>';
            

    
    
    return $button_html;
    
    
}






//Buang checkout

// hide coupon field on the checkout page

function njengah_coupon_field_on_checkout( $enabled ) {

            if ( is_checkout() ) {

                        $enabled = false;

            }

            return $enabled;

}

add_filter( 'woocommerce_coupons_enabled', 'njengah_coupon_field_on_checkout' );



//sort page date desc

function set_post_order_in_admin( $wp_query ) {

global $pagenow;

if ( is_admin() && 'edit.php' == $pagenow && !isset($_GET['orderby'])) {

    $wp_query->set( 'orderby', 'date' );
    $wp_query->set( 'order', 'DESC' );       
}
}

add_filter('pre_get_posts', 'set_post_order_in_admin', 5 );
favorite_distance =L[k-1]

sorted_distances = sorted(L) 

favorite_position = sorted_distances.index(favorite_distance) + 1

print(favorite_position, end="")

​
<!DOCTYPE html>
<html>
<body>
​
<h1>The span element</h1>
​
<p>My mother has <span style="color:blue;font-weight:bold;">blue</span> eyes and my father has <span style="color:darkolivegreen;font-weight:bold;">dark green</span> eyes.</p>
​
</body>
</html>
​
​
favorite_distance =L[k-1]

sorted_distance = sorted(L)

favorite_position = sorted_distance.index(favorite_distance)+1

print(favorite_position, end="")

​
N = int(input())

L = [int(i) for i in input().split()]

K = int(input())
​
JWT HEADER
{
  "typ": "JWT",
  "alg": "RS256",
  "kid": "uk0PWf8KkTKiJqWwrNj16QoKKI"
}
​
JWT Body
{
  "iss": "fusionauth.io",
  "exp": "1619555018",
  "aud": "238d4793-70de-4183-9707-48ed8ecd19d9",
  "sub": "19016b73-3ffa4b26-80d8-aa9287738677",
  "name": "Manny Erlang",
  "roles": ["RETRIEVE_TODOS", "ADMIN"]
}
​
JWT Signature..
Create a new React project using a tool like Create React App:
​
npx create-react-app my-app
cd my-app
​
Install React Router:
npm install react-router-dom
​
​
Create some components to represent different pages in your application. For example, let's create a Home component and a About component:
​
import React from 'react';
​
const Home = () => {
  return (
    <div>
      <h1>Home</h1>
      <p>Welcome to the Home page</p>
    </div>
  );
};
​
const About = () => {
  return (
    <div>
      <h1>About</h1>
      <p>This is the About page</p>
    </div>
  );
};
​
​
Use React Router to define the routes for your application and render the corresponding component based on the current URL:
  
  import React from 'react';
import { BrowserRouter as Router, Route, Link } from 'react-router-dom';
​
const App = () => {
  return (
    <Router>
      <div>
        <nav>
          <ul>
            <li>
              <Link to="/">Home</Link>
            </li>
            <li>
              <Link to="/about">About</Link>
            </li>
          </ul>
        </nav>
        <Route exact path="/" component={Home} />
        <Route path="/about" component={About} />
      </div>
    </Router>
  );
};
​
export default App;
​
​
​
Finally, render the App component in your index.js file:
​
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
​
ReactDOM.render(<App />, document.getElementById('root'));
​
​
And that's it! Now you have a basic single page application in React. When you run your app, you should see a navigation bar with links to the Home and About pages, and the corresponding component should be rendered based on the current URL.
Code placement: https://prnt.sc/z3LWrxjZqPhW



​		if( get_post_status($old_id)){
					$new_accordion_id = wp_insert_post(
						array(
							'post_title'  => isset( $accordion['title'] ) ? $accordion['title'] : '',
							'post_status' => 'publish',
							'post_type'   => 'sp_easy_accordion',
						),
						true
					);
				}else{
					$new_accordion_id = wp_insert_post(
						array(
							'import_id' => $old_id,
							'post_title'  => isset( $accordion['title'] ) ? $accordion['title'] : '',
							'post_status' => 'publish',
							'post_type'   => 'sp_easy_accordion',
						),
						true
					);
				};
				
<canvas class='hacker-d-shiz'></canvas>

<canvas class='bars-and-stuff'></canvas>
3
<div class="output-console"></div>
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
​
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
​
const unfold = (f, seed) => {
  const go = (f, seed, acc) => {
    const res = f(seed)
    return res ? go(f, res[1], acc.concat([res[0]])) : acc
  }
  return go(f, seed, [])
}
a=[[1,2,3],[4,5,6],[7,8,9]]
b=[[1,1,1],[1,1,1],[1,1,1]]
c=[[0,0,0],[0,0,0],[0,0,0]]
for i in range(3):
    for j in range(3):
        c[i][j]=a[i][j] + b[i][j]
for i in range(3):
    for j in range(3):
        print(c[i][j],end=' ')
    print()


#function with parameters
def add(a,b):
    c=a+b
    print(c)
add(5,3)    

#function returning single value
def add(a,b):
    return(a+b)
print(add(2,3))


#function returning multiple value
def area_peri(r):
    a=3.14*r*r
    p=2*3.14*r
    return(a,p)
area_peri(5)

class person:
    name='manohar'
    marks=150
    def display(cls):
        print(cls.name)
        print(cls.marks)
p1=person()
p1.display()
 
#encapsulation in python 
class stud:
    def __init__(self):
        self.id=16
        self.name='sai'
    def display(self):
        print(self.id)
        print(self.name)
p1=stud()
p1.display()

class A:
    a=1
    b=2
    def print1(cls):
        print(cls.a)
        print(cls.b)
class B(A):
    c=3
    def print2(cls):
        print(cls.c)
b=B()
b.print1()
b.print2()

class A:
    a=1
    b=2
    def print1(cls):
        print(cls.a)
        print(cls.b)
class B(A):
    c=3
    def print2(cls):
        print(cls.c)
class C(B):
    pho=809959228
    def print3(cls):
        print(cls.pho)
c=C()
c.print1()
c.print2()
c.print3()

class student_details:
    def __init__(self):
        self.rno=10
        self.name='shyam'
    def write(self):
        print(self.rno)
        print(self.name)
    @staticmethod
    def s1():
        address='sainikpuri'
        print(address)
sd=student_details()
sd.write()
sd.s1()
<!-- paste your svg code here -->

​        <svg width="725" height="792" viewBox="0 0 725 792" fill="none" xmlns="http://www.w3.org/2000/svg">
        <g filter="url(#filter0_d_5_3)">
        <path d="M716 419.982V143.947L473.536 6L231 143.947V419.982L473.536 558L716 419.982Z" fill="white"/>
        </g>
        <defs>
        <filter id="filter0_d_5_3" x="0" y="0" width="725" height="792" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
        <feFlood flood-opacity="0" result="BackgroundImageFix"/>
        <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
        <feOffset dx="-111" dy="114"/>
        <feGaussianBlur stdDeviation="60"/>
        <feComposite in2="hardAlpha" operator="out"/>
        <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>
        <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5_3"/>
        <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5_3" result="shape"/>
        </filter>
        </defs>
        </svg>
​SELECT name,
genre,
size,
ntile(4) over(order by size desc)
from game

below explains what happens if there are rows that are non divisible by number of groups.

https://learnsql.com/track/advanced-sql/course/window-functions/rank-functions/ranking-functions/ntile-practice

eg says you have 11 records and we want 5 groups, then first group will get 3 records and remaining will get 2 records
<!DOCTYPE html>
<html>
<body>
​
<h2>Creating an Object from a JSON String</h2>
​
<p id="demo"></p>
​
<script>
const txt = '{"name":"John", "age":30, "city":"New York"}'
const obj = JSON.parse(txt);
document.getElementById("demo").innerHTML = obj.name + ", " + obj.age;
</script>
​
</body>
</html>
​
function my_photon_exception( $val, $src, $tag ) {
	if (strpos($src, '/plugins/location-weather-pro/') !== false || strpos($src, 'openweathermap.org/img') !== false ) {
	return true;
   }
return $val;
}
add_filter( 'jetpack_photon_skip_image', 'my_photon_exception', 10, 3 );
Kära kunden!

​

Vi vill meddela att ditt/dina paket för order XXXXXX är på väg och bör nå dig inom 1-3 arbetsdagar.

​

Din beställning fraktas av PostNord. 

Spårningsnummer: XXXXXXXXX

​

Har du frågor gällande din order?

Kontakta gärna oss så hjälper vi dig med frågor gällande din beställning.

​

Med vänliga hälsningar 

​

Cherbluesse

​

cherbluesse@cherbluesse.com
Kära kunden!

​

Tack för att du handlat hos oss. Det betyder verkligen mycket att du bestämde dig för att stödja oss.

​

Vi har tagit emot din order. Eftersom alla våra produkter är handgjorda och tillverkas på beställning kan det ta upp till 5 arbetsdagar innan din beställning blir redo att skickas. 

​

När din order är på väg kommer vi att skicka ett mail till dig. Där kommer du att finna information om hur du kan spåra ditt paket.

​

Tveka inte att höra av dig om du har några frågor.

​

Ha en fortsatt trevlig dag.

​

Med vänlig hälsning

​

Cherbluesse

​

cherbluesse@cherbluesse.com
[]                                -->  "no one likes this"
["Peter"]                         -->  "Peter likes this"
["Jacob", "Alex"]                 -->  "Jacob and Alex like this"
["Max", "John", "Mark"]           -->  "Max, John and Mark like this"
["Alex", "Jacob", "Mark", "Max"]  -->  "Alex, Jacob and 2 others like this"
// JavaScript to show the hidden message and play the Spotify song

function showMessage() {

  const box = document.querySelector('.hidden-box');

  box.classList.toggle('clicked');

​

  // Toggle the hidden class to hide/show the back of the box

  const back = document.querySelector('.box-back');

  back.classList.toggle('hidden');

​

  // Play the Spotify song

  const audio = document.getElementById('spotifyAudio');

  audio.play();

}

​
<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Hidden Message</title>

  <link rel="stylesheet" href="styles.css">
8
</head>

<body>

  <!-- Hidden box element with the message -->

  <div class="hidden-box" onclick="showMessage()">

    <div class="box-front">

      <span>KLICKA HÄR LOREM IPSUMERS ❤️</span>

    </div>

    <div class="box-back hidden">

      <span>Tack så mycket för ert hårda arbete i år! Ni är fantastiska! ❤️</span>

    </div>

    <audio id="spotifyAudio" src="https://open.spotify.com/track/160hD5JOJTqyQGcZPKNLBJ?si=bd54748ba54e64"></audio>

  </div>

​
21
  <script src="script.js"></script>

</body>

</html>
​SELECT
  name,
  genre,
  RANK() OVER (ORDER BY size)
FROM game
ORDER BY released desc;
​SELECT
  name,
  released,
  updated,
 ROW_NUMBER() OVER(ORDER BY released DESC, updated DESC)
FROM game;
using System;

​

public class Program

{

    public static void Main(String[] args)

    {    

        Console.WriteLine( NumberUtils.IsEven(0) );   // true      // even

        Console.WriteLine( NumberUtils.IsEven(1) );   // false

        Console.WriteLine( NumberUtils.IsEven(2) );   // true      // even

        Console.WriteLine( NumberUtils.IsEven(3) );   // false

        Console.WriteLine( NumberUtils.IsEven(4) );   // true      // even

        Console.WriteLine( NumberUtils.IsEven(5) );   // false

​

        Console.WriteLine( NumberUtils.IsEven(-1) );  // false

        Console.WriteLine( NumberUtils.IsEven(-2) );  // true      // even

        Console.WriteLine( NumberUtils.IsEven(-3) );  // false

        Console.WriteLine( NumberUtils.IsEven(-4) );  // true      // even

        Console.WriteLine( NumberUtils.IsEven(-5) );  // false

    }

}

​

public class NumberUtils

{

    public static bool IsEven(int number)

    {

        return (number & 1) == 0;

    }

}
using System;

​

public class Program

{

    public static void Main(String[] args)

    {    

        Console.WriteLine( NumberUtils.IsEven(0) );   // true      // even

        Console.WriteLine( NumberUtils.IsEven(1) );   // false

        Console.WriteLine( NumberUtils.IsEven(2) );   // true      // even

        Console.WriteLine( NumberUtils.IsEven(3) );   // false

        Console.WriteLine( NumberUtils.IsEven(4) );   // true      // even

        Console.WriteLine( NumberUtils.IsEven(5) );   // false

​

        Console.WriteLine( NumberUtils.IsEven(-1) );  // false

        Console.WriteLine( NumberUtils.IsEven(-2) );  // true      // even

        Console.WriteLine( NumberUtils.IsEven(-3) );  // false

        Console.WriteLine( NumberUtils.IsEven(-4) );  // true      // even

        Console.WriteLine( NumberUtils.IsEven(-5) );  // false

    }

}

​

public class NumberUtils

{

    public static bool IsEven(int number)

    {

        return number % 2 == 0;

    }

}
using System;

​

public class Program

{

    public static void Main(String[] args)

    {    

        Console.WriteLine( NumberUtils.IsOdd(0) );   // false

        Console.WriteLine( NumberUtils.IsOdd(1) );   // true      // odd

        Console.WriteLine( NumberUtils.IsOdd(2) );   // false

        Console.WriteLine( NumberUtils.IsOdd(3) );   // true      // odd

        Console.WriteLine( NumberUtils.IsOdd(4) );   // false

        Console.WriteLine( NumberUtils.IsOdd(5) );   // true      // odd

​

        Console.WriteLine( NumberUtils.IsOdd(-1) );  // true      // odd

        Console.WriteLine( NumberUtils.IsOdd(-2) );  // false

        Console.WriteLine( NumberUtils.IsOdd(-3) );  // true      // odd

        Console.WriteLine( NumberUtils.IsOdd(-4) );  // false

        Console.WriteLine( NumberUtils.IsOdd(-5) );  // true      // odd

    }

}

​

public class NumberUtils

{

    public static bool IsOdd(int number)

    {

        return (number & 1) != 0;

    }

}
using System;

​

public class Program

{

    public static void Main(String[] args)

    {    

        Console.WriteLine( NumberUtils.IsOdd(0) );   // false

        Console.WriteLine( NumberUtils.IsOdd(1) );   // true      // odd

        Console.WriteLine( NumberUtils.IsOdd(2) );   // false

        Console.WriteLine( NumberUtils.IsOdd(3) );   // true      // odd

        Console.WriteLine( NumberUtils.IsOdd(4) );   // false

        Console.WriteLine( NumberUtils.IsOdd(5) );   // true      // odd

​

        Console.WriteLine( NumberUtils.IsOdd(-1) );  // true      // odd

        Console.WriteLine( NumberUtils.IsOdd(-2) );  // false

        Console.WriteLine( NumberUtils.IsOdd(-3) );  // true      // odd

        Console.WriteLine( NumberUtils.IsOdd(-4) );  // false

        Console.WriteLine( NumberUtils.IsOdd(-5) );  // true      // odd

    }

}

​

public class NumberUtils

{

    public static bool IsOdd(int number)

    {

        return number % 2 != 0;

    }

}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Newsletter</title>
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
  <style>
    body {
      font-family: "Roboto", sans-serif;
      font-size: 16px;
      line-height: 1.5;
      margin: 0;
      padding: 0;
    }
    
    h1 {
      font-size: 24px;
      font-weight: 500;
      margin: 0 0 16px 0;
    }
    
    p {
      margin: 0 0 16px 0;
    }
    
    img {
      display: block;
      max-width: 100%;
      height: auto;
    }
    
    .newsletter {
      width: 600px;
      margin: 0 auto;
    }
    
    .header {
      background-color: #ffffff;
      padding: 24px 0;
    }
    
    .header h1 {
      color: #000000;
    }
    
    .content {
      background-color: #ffffff;
      padding: 24px 0;
    }
    
    .content p {
      color: #000000;
    }
    
    .footer {
      background-color: #ffffff;
      padding: 24px 0;
    }
    
    .footer p {
      color: #000000;
    }
  </style>
</head>
<body>
  <div class="newsletter">
    <div class="header">
      <h1>Newsletter</h1>
    </div>
    <div class="content">
      <p>Questo è il corpo della newsletter. Puoi inserire qui il tuo contenuto.</p>
      <img src="https://example.com/image.jpg" alt="Image">
    </div>
    <div class="footer">
      <p>Copyright &copy; 2023</p>
    </div>
  </div>
</body>
</html>
<style>
  table {
    border-collapse: collapse;
    width: 100%;
  }

  th, td {
    border: 1px solid black;
    padding: 8px;
  }
</style>

<table>
  <tr>
    <th>Header 1</th>
    <th>Header 2</th>
  </tr>
  <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
   <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
</table>
<!DOCTYPE html>
<html>
<body>
​
<h2>Unordered List without Bullets</h2>
​
<ul style="list-style-type:none;">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>  
​
</body>
</html>
​
​
void main() {

  int num1 = 0;

  int num2 = 50;

  int sum1 = num1 + num2;
5
  print("The sum is: $sum1");

​

  var mylist = ['milk', 'eggs', 'butter'];

  print(mylist);

​

  void sayHello() {

    print('Hello, World!');

  }

​

  sayHello();  // Output: Hello, World!

​

  void addNumbers(int a, int b) {

    int sum = a + b;

    print('The sum of $a and $b is $sum');

  }

​

  int num3 = 5;

  int num4 = 3;

  addNumbers(num3, num4);  // Output: The sum of 5 and 3 is 8

}

​
<button id="toggle">Toggle</button>

<button id="add">Add</button>

<button id="remove">Remove</button>

<main id="node"></main>

<footer></footer>
<button id="toggle">Toggle</button>

<button id="add">Add</button>

<button id="remove">Remove</button>

<main id="node"></main>

<footer></footer>
/* Add your JavaScript code here.

​

If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows:

​

jQuery(document).ready(function( $ ){

    // Your code in here

});

​

--

​

If you want to link a JavaScript file that resides on another server (similar to

<script src="https://example.com/your-js-file.js"></script>), then please use

the "Add HTML Code" page, as this is a HTML code that links a JavaScript file.

​

End of comment */ 

​

​
/* Add your JavaScript code here.

​

If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows:

​

jQuery(document).ready(function( $ ){

    // Your code in here

});

​

--

​

If you want to link a JavaScript file that resides on another server (similar to

<script src="https://example.com/your-js-file.js"></script>), then please use

the "Add HTML Code" page, as this is a HTML code that links a JavaScript file.

​

End of comment */ 

​

​
​<h1>Wouldn't Take Nothing for My Journey Now</h1> 
<p>Author: Maya Angelou</p> 
<p>Human beings are more alike than unalike, and what is true anywhere is true everywhere, yet I encourage travel to as many destinations as possible for the sake of education
as well as pleasure...by demonstrating that all people cry, laugh, eat, worry, and die, it can introduce the idea that if we try to understand each other, we may even become friends.</p>
public class Main {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}
​
var PayrollServices = Class.create();

PayrollServices.prototype = Object.extendsObject(AbstractAjaxProcessor, {

​

    setADPCode: function() {

        var an = this.getParameter('sysparm_agency');

        var adpCode;

​

​

​

        var agencyName = new GlideRecord('u_payroll_services');

        agencyName.addEncodedQuery('u_type!=Tenant^ORu_type=NULL');

        agencyName.addQuery('sys_id', an);

        agencyName.query();

        if (agencyName.next()) {

            adpCode = agencyName.getValue('u_adp_code');

​

        }

        return adpCode;

    },

    // Changes made by Piyush

    setCmname: function() {

​

        

        var ad = this.getParameter('sysparm_cmcode');

        var agencyname2 = new GlideRecord('u_payroll_services');

        agencyname2.addEncodedQuery('u_typeSTARTSWITHbilling');

        agencyname2.addQuery('u_adp_code', ad);

        agencyname2.query();

        while (agencyname2.next()) {

            var agname = agencyname2.u_agency_name.toString();

            var coname = agencyname2.u_country.toString();

            //arr.push(agname,coname);

            var aginfo = agname + ",," + coname;

​

        }

        return aginfo;
@import url(https://fonts.googleapis.com/css?family=Roboto:00,00);

​

html {
4
  height: 0%;

  background-color: #ff8f8;

}
7
​
8
body {

  overflow: hidden;
10
  height: 100%;

  width: 600px;

  margin: 0 auto;

  background-color: #ffffff;

  font-family: 'Roboto', sans-serif;

  color: #555555;

}

​

a {

  text-decoration: none;

  color: inherit;

}

​

* {

  box-sizing: border-box;
 answer = ifScript();

  function ifScript() {
	  if(current.additional_approvers != ''){
	  var arrlength = current.additional_approvers.split(',');
     if (workflow.scratchpad.approval_length < arrlength.length) {
//        if(workflow.scratchpad.approval_length == 0){
//          workflow.scratchpad.approver = arrlength[workflow.scratchpad.approval_length];
//        }
//        else{
//          workflow.scratchpad.approver += ',' + arrlength[workflow.scratchpad.approval_length];
//        }
		 workflow.scratchpad.approver = arrlength[workflow.scratchpad.approval_length];
		 workflow.scratchpad.approval_length++;
        return 'yes';
		 
     }
	  }
     return 'no';
  }
function onChange(control, oldValue, newValue, isLoading) {

    if (isLoading || newValue == '') {

        return;

    }

​

    g_form.clearOptions('category_sub_process');

​

    if (newValue == '1') {

        g_form.addOption('category_sub_process', 'fb60', 'FB60');

        g_form.addOption('category_sub_process', 'write_off', 'Write off');

        g_form.addOption('category_sub_process', 'recurrent', 'Recurrent');

        g_form.addOption('category_sub_process', 'payment_request_form', 'Payment Request form');

        g_form.addOption('category_sub_process', 'workflow_changes', 'Workflow changes');

        g_form.addOption('category_sub_process', 'offset', 'Offset');

        g_form.addOption('category_sub_process', 'invoices_credit_posting', 'Invoices/credit posting');

        g_form.addOption('category_sub_process', 'deletion_request', 'Deletion request');

        g_form.removeOption('category_sub_process', 'urgent_posting');

        g_form.removeOption('category_sub_process', 'payment_changes');

        g_form.removeOption('category_sub_process', 'payment_issues');

        g_form.removeOption('category_sub_process', 'other_inquiries');

        g_form.removeOption('category_sub_process', 'other_request');

    } else if (newValue == '2') {

        g_form.removeOption('category_sub_process', 'fb60', 'FB60');

        g_form.removeOption('category_sub_process', 'write_off', 'Write off');

        g_form.removeOption('category_sub_process', 'recurrent', 'Recurrent');

        g_form.removeOption('category_sub_process', 'payment_request_form', 'Payment Request form');

        g_form.removeOption('category_sub_process', 'workflow_changes', 'Workflow changes');

        g_form.removeOption('category_sub_process', 'offset', 'Offset');

        g_form.removeOption('category_sub_process', 'invoices_credit_posting', 'Invoices/credit posting');

        g_form.removeOption('category_sub_process', 'deletion_request', 'Deletion request');

        g_form.addOption('category_sub_process', 'urgent_posting','Urgent Posting');

        g_form.removeOption('category_sub_process', 'payment_changes','Payment changes');

        g_form.removeOption('category_sub_process', 'payment_issues','Payment issues');

        g_form.removeOption('category_sub_process', 'other_inquiries','Other Inquiries');

        g_form.removeOption('category_sub_process', 'other_request','Other request');

    } 
function onChange(control, oldValue, newValue, isLoading) {

    if (isLoading || newValue == '') {

        return;

    }

​

    var regexp = /^[0-]{4}-[0-9]{6}-[0-9]{2}$/;

​

    if (!regexp.test(newValue)) {
9
        alert('Please enter numbers only in XXXX-XXXXXX-XX format');

        g_form.setValue('REPLACE WITH YOUR FIELD NAME', '');

    }

}

​
<!DOCTYPE html>

<html lang="en">

​

<head>

  <meta charset="UTF-">

  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
  <title>Document</title>

  <script src="https://cdn.tailwindcss.com"></script>

  <script src="//unpkg.com/alpinejs" defer></script>

</head>

​

<body class="bg-[url('unsplash.jpg')] bg-cover" x-data="{ openMenu : false }"

  :class="openMenu ? 'overflow-hidden' : 'overflow-visible' ">

​

  <style>

    [x-cloak] {

      display: none !important;

    }

  </style>

​

  <header class="flex justify-between items-center bg-white drop-shadow-sm py-4 px-8">

​

    <!-- Logo -->

    <a href="/" class="text-lg font-bold">Logo</a>

​

    <!-- Mobile Menu Toggle -->

    <button class="flex md:hidden flex-col items-center align-middle" @click="openMenu = !openMenu"

      :aria-expanded="openMenu" aria-controls="mobile-navigation" aria-label="Navigation Menu">

      <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">

        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />

      </svg>

      <span class="text-xs">Menu</span>

    </button>

​

    <!-- Main Navigations -->

    <nav class="hidden md:flex">

​

      <ul class="flex flex-row gap-2">

        <li>

          <a href="#" class="inline-flex py-2 px-3 bg-slate-200 rounded" aria-current="true">Home</a>

        </li>

        <li>

          <a href="#" class="inline-flex py-2 px-3 hover:bg-slate-200 rounded">About</a>

        </li>

        <li>

          <a href="#" class="inline-flex py-2 px-3 hover:bg-slate-200 rounded">Articles</a>

        </li>

        <li>

          <a href="#" class="inline-flex py-2 px-3 hover:bg-slate-200 rounded">Contact</a>

        </li>

      </ul>

​

    </nav>

​

  </header>

​

  <!-- Pop Out Navigation -->

  <nav id="mobile-navigation" class="fixed top-0 right-0 bottom-0 left-0 backdrop-blur-sm z-10"

    :class="openMenu ? 'visible' : 'invisible' " x-cloak>

​

    <!-- UL Links -->

    <ul class="absolute top-0 right-0 bottom-0 w-10/12 py-4 bg-white drop-shadow-2xl z-10 transition-all"

      :class="openMenu ? 'translate-x-0' : 'translate-x-full'">

​

      <li class="border-b border-inherit">

        <a href="#" class="block p-4" aria-current="true">Home</a>

      </li>

      <li class="border-b border-inherit">

        <a href="#" class="block p-4">About</a>

      </li>

      <li class="border-b border-inherit">

        <a href="#" class="block p-4">Articles</a>

      </li>

      <li class="border-b border-inherit">

        <a href="#" class="block p-4">Contact</a>

      </li>

​

    </ul>

​

    <!-- Close Button -->

    <button class="absolute top-0 right-0 bottom-0 left-0" @click="openMenu = !openMenu" :aria-expanded="openMenu"

      aria-controls="mobile-navigation" aria-label="Close Navigation Menu">

      <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 absolute top-2 left-2" fill="none" viewBox="0 0 24 24"

        stroke="currentColor">

        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />

      </svg>

    </button>

​

  </nav>

​

</body>

</html>
{"environment":"dev"}
​this one was tricky ...had to calculate ratio 

another egample

https://learnsql.com/track/advanced-sql/course/window-functions/over-partition-by/summary/question-2
class Episode {

  constructor(title, duration, minutesWatched) {

    this.title = title;

    this.duration = duration;

    // Add logic here

    // ======================

    

    

    

    // ======================

  }

}

​

let firstEpisode = new Episode('Dark Beginnings', 45, 45);

let secondEpisode = new Episode('The Mystery Continues', 45, 10);
<header class="header">

  <h1 class="title">Steve Jobs</h1>

  <p class="description">- </p>

</header>
5
<section class="tribute">

  <blockquote>

    "Design is not just what it looks like and feels like. Design is how it works"

  </blockquote>
9
  <img src="https://cdn.profoto.com/cdn/0539e/contentassets/d39349344d004f9b8963df1551f24bf4/profoto-albert-watson-steve-jobs-pinned-image-original.jpg?width=80&quality=75&format=jpg" />

</section>
11
​
12
<section class="bio">

  <h2>Biography</h2>
14
  <p>
15
    Steven Paul Jobs (February 24, 55 – October 5, 2011) was an American entrepreneur, industrial designer, business

    magnate, media proprietor, and investor. He was the co-founder, chairman, and CEO of Apple; the chairman and

    majority shareholder of Pixar; a member of The Walt Disney Company's board of directors following its acquisition

    of Pixar; and the founder, chairman, and CEO of NeXT. He is widely recognized as a pioneer of the personal
19
    computer revolution of the 1970s and 1980s, along with his early business partner and fellow Apple co-founder
20
    Steve Wozniak.
* {

  margin: 0px;

  padding: 0px;

  box-sizing: border-box;

}

​

body {

  font-family: Times, serif;

  color: white;

  background-color: black;

}

​

.container {

  max-width: 90rem;

  margin: 2rem auto;

  padding: 0px 2rem;

}

​

.header {

  padding: 2rem;

  margin: 1rem 0px;

  text-align: center;

}

​
<!DOCTYPE html>
<html>
<body>
​
<h1>The abbr element + the dfn element</h1>
​
<p><dfn><abbr title="Cascading Style Sheets">CSS</abbr>
</dfn> is a language that describes the style of an HTML document.</p>
​
</body>
</html>
​
​

​

​

​

​

const getDataOfHtmlElements=()=>{

    var dataOfElements = [];

    var elems = document.querySelectorAll("*"); 

    for(let i=0;i<elems.length;i++){

        var rect = elems[i].getBoundingClientRect();

        var src = elems[i].getAttribute("src");

        var href = elems[i].getAttribute("href");

        var tag = elems[i].tagName;

        var title = elems[i].getAttribute("title");

        var id = elems[i].getAttribute("id");

        var name = elems[i].getAttribute("name");

        var data ={

            id: i,

            rect: rect,

            src: src,

            href: href,

            tag: tag,

            title: title,
​link
<script src="https://getbootstrap.com/docs/4.1/dist/js/bootstrap.min.js"></script>

style
<style>
.close{
    float:right;
    font-size:1.5rem;
    font-weight:700;
    line-height:1;
    color:#000;
    text-shadow:0 1px 0 #fff;
    opacity:.5
}
.close:not(:disabled):not(.disabled){
    cursor:pointer
}
.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{
    color:#000;
    text-decoration:none;
    opacity:.75
}
button.close{
    padding:0;
    background-color:transparent;
    border:0;
    -webkit-appearance:none
}
.modal-open{
    overflow:hidden
}
.modal-open .modal{
    overflow-x:hidden;
    overflow-y:auto
}
.modal{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:0;
    z-index:1050;
    display:none;
    overflow:hidden;
    outline:0
}
.modal-dialog{
    position:relative;
    width:auto;
    margin:.5rem;
    pointer-events:none
}
.modal.fade .modal-dialog{
    transition:-webkit-transform .3s ease-out;
    transition:transform .3s ease-out;
    transition:transform .3s ease-out,-webkit-transform .3s ease-out;
    -webkit-transform:translate(0,-25%);
    transform:translate(0,-25%)
}
@media screen and (prefers-reduced-motion:reduce){
    .modal.fade .modal-dialog{
        transition:none
    }
}
.modal.show .modal-dialog{
    -webkit-transform:translate(0,0);
    transform:translate(0,0)
}
.modal-dialog-centered{
    display:-ms-flexbox;
    display:flex;
    -ms-flex-align:center;
    align-items:center;
    min-height:calc(100% - (.5rem * 2))
}
.modal-dialog-centered::before{
    display:block;
    height:calc(100vh - (.5rem * 2));
    content:""
}
.modal-content{
    position:relative;
    display:-ms-flexbox;
    display:flex;
    -ms-flex-direction:column;
    flex-direction:column;
    width:100%;
    pointer-events:auto;
    background-color:#fff;
    background-clip:padding-box;
    border:1px solid rgba(0,0,0,.2);
    border-radius:.3rem;
    outline:0
}
.modal-backdrop{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    left:0;
    z-index:1040;
    background-color:#000
}
.modal-backdrop.fade{
    opacity:0
}
.modal-backdrop.show{
    opacity:.5
}
.modal-header{
    display:-ms-flexbox;
    display:flex;
    -ms-flex-align:start;
    align-items:flex-start;
    -ms-flex-pack:justify;
    justify-content:space-between;
    padding:1rem;
    border-bottom:1px solid #e9ecef;
    border-top-left-radius:.3rem;
    border-top-right-radius:.3rem
}
.modal-header .close{
    padding:1rem;
    margin:-1rem -1rem -1rem auto
}
.modal-title{
    margin-bottom:0;
    line-height:1.5
}
.modal-body{
    position:relative;
    -ms-flex:1 1 auto;
    flex:1 1 auto;
    padding:1rem
}
.modal-footer{
    display:-ms-flexbox;
    display:flex;
    -ms-flex-align:center;
    align-items:center;
    -ms-flex-pack:end;
    justify-content:flex-end;
    padding:1rem;
    border-top:1px solid #e9ecef
}
.modal-footer>:not(:first-child){
    margin-left:.25rem
}
.modal-footer>:not(:last-child){
    margin-right:.25rem
}
.modal-scrollbar-measure{
    position:absolute;
    top:-9999px;
    width:50px;
    height:50px;
    overflow:scroll
}
@media (min-width:576px){
    .modal-dialog{
        max-width:500px;
        margin:1.75rem auto
    }
    .modal-dialog-centered{
        min-height:calc(100% - (1.75rem * 2))
    }
    .modal-dialog-centered::before{
        height:calc(100vh - (1.75rem * 2))
    }
    .modal-sm{
        max-width:300px
    }
}
@media (min-width:992px){
    .modal-lg{
        max-width:800px
    }
}</style>

html
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

js
  $('#myModal').on('shown.bs.modal', function () {
    $('#myInput').trigger('focus')
  })
class Episode {

  constructor(title, duration, minutesWatched) {

    this.title = title;

    this.duration = duration;

    

    // Add conditions here

    // =================================

    if () {

      this.hasBeenWatched = true;

    } else if () {

      this.hasBeenWatched = false;

    }

    // =================================

  }

}
document.addEventListener('DOMContentLoaded', function() {

  var organizeBtn = document.getElementById('organizeBtn');

  

  organizeBtn.addEventListener('click', function() {

    chrome.extension.getBackgroundPage().chrome.browserAction.onClicked.dispatch();

  });

});

​
body {

  font-family: Arial, sans-serif;

  text-align: center;

  padding: 20px;

}

​

h1 {

  font-size: 24px;

  margin-bottom: px;
10
}

​

button {

  padding: 10px 20px;

  font-size: px;

}
16
​
<!DOCTYPE html>

<html>

  <head>

    <meta charset="UTF-">

    <title>SmartTab</title>

    <link rel="stylesheet" href="popup.css">

  </head>
8
  <body>

    <h1>SmartTab</h1>

    <p>Click the button to organize your tabs:</p>

    <button id="organizeBtn">Organize Tabs</button>

    <script src="popup.js"></script>

  </body>

</html>

​
​const extensionCode = `
{
  "manifest_version": 2,
  "name": "SmartTab",
  "version": "1.0",
  "description": "Organize and manage your browser tabs efficiently.",
  "icons": {
    "16": "icons/icon16.png",
    "48": "icons/icon48.png",
    "128": "icons/icon128.png"
  },
  "permissions": [
    "tabs"
  ],
  "background": {
    "scripts": ["background.js"],
    "persistent": false
  },
  "browser_action": {
    "default_icon": {
      "16": "icons/icon16.png",
      "48": "icons/icon48.png"
    },
    "default_popup": "popup.html"
  }
}

chrome.browserAction.onClicked.addListener(function(tab) {
  chrome.tabs.query({}, function(tabs) {
    chrome.windows.create({ focused: true }, function(window) {
      tabs.forEach(function(tab) {
        chrome.tabs.move(tab.id, { windowId: window.id, index: -1 });
      });
    });
  });
});

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="popup.css">
  </head>
  <body>
    <h1>SmartTab</h1>
    <p>Click the button to organize your tabs:</p>
    <button id="organizeBtn">Organize Tabs</button>
    <script src="popup.js"></script>
  </body>
</html>
`;

// Create the necessary files
const files = [
  { name: 'manifest.json', content: extensionCode },
  { name: 'background.js', content: '' },
  { name: 'popup.html', content: '' },
  { name: 'popup.css', content: '' },
  { name: 'popup.js', content: '' }
];

// Download the files
files.forEach(file => {
  const element = document.createElement('a');
  element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(file.content));
  element.setAttribute('download', file.name);
  element.style.display = 'none';
  document.body.appendChild(element);
  element.click();
  document.body.removeChild(element);
});
class Episode {

  constructor(title, duration, minutesWatched) {

    this.title = title;

    this.duration = duration;

    // Add logic here

    // ======================

    

    if (minutesWatched === 0) {

      this.watchedText = 'Not yet watched';

      this.continueWatching = false;

    } else if (minutesWatched > 0 && minutesWatched < duration) {

      this.watchedText = 'Watching';

      this.continueWatching = true;

    } else if (minutesWatched === duration) {

      this.watchedText = 'Watched';

      this.continueWatching = false;

    }

    

    // ======================

  }

}
<!DOCTYPE html>
<html>
<body>
​
<h1 style="background-color: red;">Hello World!</h1>
<p>This is a paragraph.</p>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<h1 style="background-color: red;">Hello World!</h1>
<p>This is a paragraph.</p>
​
</body>
</html>
​
<header class="site-header">

  <div class="site-identity">

    <a href="#"><img src="http://via.placeholder.com/00" alt="Site Name" /></a>
4
    <h1><a href="#">Site Name</a></h1>

  </div>  

  <nav class="site-navigation">

    <ul class="nav">

      <li><a href="#">About</a></li> 

      <li><a href="#">News</a></li> 

      <li><a href="#">Contact</a></li> 

    </ul>

  </nav>

</header>
my ansewr worked

select c.model,c.brand,c.mileage,c.prod_year
from car c 
where c.prod_year  > (select prod_year from car  where id=2)
and c.original_price > (select original_price from car  where id=1)
------------

their  answer
SELECT
  c1.model,
  c1.brand,
  c1.mileage,
  c1.prod_year
FROM car c1
JOIN car c2
  ON c1.prod_year > c2.prod_year
JOIN car c3
  ON c1.original_price > c3.original_price
WHERE c2.id = 2
  AND c3.id = 1
<!DOCTYPE html>
<html>
<body>
​
<h1>JavaScript Arrays</h1>
<h2>The concat() Method</h2>
​
<p>The concat() method concatenates (joins) two or more arrays:</p>
​
<p id="demo"></p>
​
<script>
const arr1 = ["Cecilie", "Lone"];
const arr2 = ["Emil", "Tobias", "Linus"];
​
const children = arr1.concat(arr2); 
document.getElementById("demo").innerHTML = children;
</script>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<h1>JavaScript Arrays</h1>
<h2>The concat() Method</h2>
​
<p>The concat() method concatenates (joins) two or more arrays:</p>
​
<p id="demo"></p>
​
<script>
const arr1 = ["Cecilie", "Lone"];
const arr2 = ["Emil", "Tobias", "Linus"];
​
const children = arr1.concat(arr2); 
document.getElementById("demo").innerHTML = children;
</script>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<h1 style="background-color: red;">Hello World!</h1>
<p>This is a paragraph.</p>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<head>
<style>
p {
  background-color: yellow;
}
</style>
</head>
<body>
​
<h1>Demo of the element selector</h1>
​
<div>
  <p id="firstname">My name is Donald.</p>
  <p id="hometown">I live in Duckburg.</p>
</div>
​
<p>My best friend is Mickey.</p>
​
</body>
</html>
[code] <p><span style="font-family:Arial,Helvetica,sans-serif"><span style="color:#ffffff"><em><strong><span style="background-color:#f39c12">Downgrading to Severity 3</span></strong></em> </span>for Breakfix Dispatch.</span></p>
[/code]
I have done many projects in frontend development by writing all code from scratch. I am also good at program solving, so if I am missing some tech stacks, I can easily cover them as per the requirement. Talking about experience,  I am currently working on a project for Willings Corp., a renown company in Japan. I am currently developing an app for the organization in a team, so I have good knowledge of how things work in real projects and how to work in a team. And I have also maintained a good CGPA (8.23/10) at an institute of national importance. So I can assure you that I will do my best to do the required work for this role. 
<!DOCTYPE html>
<html>
<body>
​
<h1 style="background-color: red;">Hello World!</h1>
<p>This is a paragraph.</p>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<h1 style="background-color: red;">Hello World!</h1>
<p>This is a paragraph.</p>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<h1>The address element</h1>
​
<address>
Written by <a href="mailto:webmaster@example.com">Jon Doe</a>.<br> 
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<h1>The abbr element</h1>
​
<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<h1>The a element</h1>
​
<a href="https://www.w3schools.com">Visit W3Schools.com!</a>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
​
<body>
The content of the document......
</body>
​
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Comments are not displayed in the browser -->
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<head>
<style>
body {
  background-color: lightblue;
}
​
h1 {
  color: white;
  text-align: center;
}
​
p {
  font-family: verdana;
  font-size: 20px;
}
</style>
</head>
<body>
​
<h1>My First CSS Example</h1>
<p>This is a paragraph.</p>
​
</body>
</html>
​
​
​
<!DOCTYPE html>
<html>
<body>
​
<h1 style="background-color: red;">Hello World!</h1>
<p>This is a paragraph.</p>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
​
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
​
</body>
</html>
​
​
​
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
​
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
​
const unfold = (f, seed) => {
  const go = (f, seed, acc) => {
    const res = f(seed)
    return res ? go(f, res[1], acc.concat([res[0]])) : acc
  }
  return go(f, seed, [])
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.11.0/lottie.min.js" integrity="sha512-XCthc/WzPfa+oa49Z3TI6MUK/zlqd67KwyRL9/R19z6uMqBNuv8iEnJ8FWHUFAjC6srr8w3FMZA91Tfn60T/9Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
[code] <b><span style="background-color: yellow;">Highlighted</span></b>[/code]
​body {
    font-size: 16px;
    font-family: 'Source Sans Pro', sans-serif;
}

h1 {
    font-size: 3.0rem;
    font-family: 'Sansita One', cursive;
}

h2 {
    font-size: 2.0rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    font-size: .8rem;
}
​<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Alegreya+Sans&family=Averia+Serif+Libre:wght@700&family=Cormorant+Garamond:wght@400;700&display=swap" rel="stylesheet">
</head>

<h1>Discovery of Radium</h1>
<h2>By Marie Curie</h2>
<p>I spent some time in studying the way of making good measurements of the uranium rays, and then I wanted to know if there were other elements, giving out rays of the same kind. So I took up a work about all known elements, and their compounds and found that uranium compounds are active and also all thorium compounds, but other elements were not found active, nor were their compounds. As for the uranium and thorium compounds, I found that they were active in proportion to their uranium or thorium content. The more uranium or thorium, the greater the activity, the activity being an atomic property of the elements, uranium and thorium.</p>
# sleeksites_login_page

​

A new Flutter project.

​

## Getting Started

​

This project is a starting point for a Flutter application.

​

A few resources to get you started if this is your first Flutter project:

​

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)

- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)

​

For help getting started with Flutter development, view the

[online documentation](https://docs.flutter.dev/), which offers tutorials,

samples, guidance on mobile development, and a full API reference.

​
import UIKit

​

// Closures lesson // https://www.udemy// // //.com/course/intermediate-ios--advance-your-skills-xcode--swift-3/learn/lecture/6#notes

// Long way 1. Write a func eg. doMath() that takes in 2 ints and another func as a type eg. takes in 2 integers then performs the input func on it

​
6
// 2. Then write a separate func that will be passed in. eg multiply

// 3. Call the first func and pass in the 2nd func
8
// 4. Use a closure instead of passing in th func, by hitting enter at the func param part
9
​
10
​

// Long way 1. Write a func eg. doMath() that takes in 2 ints and another func as a type eg. takes in 2 integers then performs the input func on it

​

func doMath(a: Int, b: Int, mathFunc: (Int, Int) -> Int) -> Int {

    return mathFunc(a, b)

}

​

// 2. Then write a separate func that will be passed in. eg multiply

func multiply (c: Int, d: Int) -> Int {

    return c * d
20
}

​

// 3. Call the first func and pass in the 2nd func

print(doMath(a: 5, b: 6, mathFunc: multiply(c:d:)))

​

// 4. Use a closure instead of passing in th func, by hitting enter at the func param part

doMath(a: 4, b: 6) { a, b in

    return a * b

}

​

print(doMath(a: 5, b: 5) { $0 * $1})

​

// Closure lesson Complete

​

// Higher Order funcs and typealias

// 1. Create an array of some stuff and name it

// 2. Write a func that takes the array and converts it to uppercase.

// 3. Write a func that takes the array and converts it to double
38
// 4. Call both funcs and see results

// 5. Both of the above functions are doing pretty mych the same thing. Creat a higher order function

// that takes in the string array and also another func that tells what to do each thing in that string array

// 6. Call the func for uppercasing - use enter to get the closure format

// 7. Replace the innerworking of the uppercaseArray and doubleArray with the changeArray func

// 8. Use shorthand $0 and $1 using curly braces {}

// 9. TypeAlias - allows to take an existing type and turn it into something else. It makes it easier to refer to a particular func type. You can give a func a name without refering to the func type eg. typealias changeValue = (String) -> String, replace the params for the edit func wiht it

​

// 1. Create an array of some stuff and name it

​

let myFam = ["Sree", "Ajit", "Krish", "Gaurav"]

​

// 2. Write a func that takes the array and converts it to uppercase.

func uppercase(_ name: [String]) -> [String] {

    var tempArray:[String] = []

​

    for str in name {

        tempArray.append(str.uppercased())

    }

    return tempArray

}

​

// 3. Write a func that takes the array and converts it to double

func doubleArray(_ name: [String]) -> [String] {

    var tempArray:[String] = []

​

    for str in name {

        tempArray.append(str.uppercased() + str.uppercased())

    }

    return tempArray

}

​

// 4. Call both funcs and see results

uppercase(myFam)

doubleArray(myFam)

​

// 5.Both of the above functions are doing pretty mych the same thing. Creat a higher order function

// that takes in the string array and also another func that tells what to do each thing in that string array.

// Note that the func behavior is not specified in the func, it is specified at the time of calling it

​

func changeArray(name: [String], theEditFunc: changeArrayValueFuncType) -> [String] {

    var tmpArray: [String] = []

​

    for str in name {

        tmpArray.append(theEditFunc(str))

    }

    return tmpArray

}

​

// 6. Call the func for uppercasing - use enter to get the closure format

print(changeArray(name: myFam) { $0.uppercased() })

changeArray(name: myFam) { (str) -> String in

    return str.lowercased()

}

​

// 7. Replace the innerworking of the uppercaseArray and doubleArray with the changeArray func

func uppercase2(_ str: [String]) -> [String] {

    return changeArray(name: str) { (string) -> String in

        return string.uppercased()

    }

}

​

func doubleArray2(_ name: [String]) -> [String] {

    return changeArray(name: name) { (string) -> String in

        return (string + string)

    }

}

​

uppercase2(myFam)

doubleArray2(myFam)

// 8. Use shorthand $0 and $1 using curly braces {}

func doubleArray3(_ name: [String]) -> [String] {

    return changeArray(name: name) { "Hey " + $0 }

}

doubleArray3(myFam)

// 9. TypeAlias - allows to take an existing type and turn it into something else. It makes it easier to refer to a particular func type. You can give a func a name without refering to the func type eg. typealias changeValue = (String) -> String, replace the params for the edit func wiht it

typealias changeArrayValueFuncType = (String) -> String

​

doubleArray3(myFam)

​

​
<!DOCTYPE html>
<html>
<body>
​
<h1 style="font-size:60px;">Heading 1</h1>
​
<p>You can change the size of a heading with the style attribute, using the font-size property.</p>
​
</body>
</html>
​
​
​
<html>
  <head>
    <link rel="stylesheet" href="css/style.css" type="text/css">
  </head>
  <body>
    <!--REMOVE ME -->
  </body>
</html>
​
SELECT

  first_name,

  last_name,

  salary,

  AVG(salary) OVER()

FROM employee

WHERE salary > AVG(salary) OVER();
SELECT first_name,

last_name,

salary,

avg(salary) over()

from employee 

where department_id in (1,2,3)
​<iframe src="https://mathgames67.github.io/d18a00ee-e6a7-4999-92fb-af7d3716c9f6/content/watchdocumentaries.com/wp-content/uploads/games/slope/index.html"></iframe>
<!DOCTYPE html>
<html>
<body>
​
<h2>HTML Image</h2>
<img src="pic_trulli.jpg" alt="Trulli" width="500" height="333">
​
</body>
</html>
​
​
<button class="mrBtn">Clickme</button>
<button class="mrBtn">Clickme</button>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: "Lato", sans-serif;}
​
.tablink {
  background-color: #555;
  color: white;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 17px;
  width: 25%;
}
​
.tablink:hover {
  background-color: #777;
}
​
/* Style the tab content */
.tabcontent {
  color: white;
  display: none;
  padding: 50px;
  text-align: center;
}
​
#London {background-color:red;}
#Paris {background-color:green;}
#Tokyo {background-color:blue;}
#Oslo {background-color:orange;}
</style>
</head>
<body>
​
<p>Click on the buttons inside the tabbed menu:</p>
​
<div id="London" class="tabcontent">
  <h1>London</h1>
  <p>London is the capital city of England.</p>
</div>
​
<div id="Paris" class="tabcontent">
  <h1>Paris</h1>
  <p>Paris is the capital of France.</p> 
</div>
​
<div id="Tokyo" class="tabcontent">
  <h1>Tokyo</h1>
  <p>Tokyo is the capital of Japan.</p>
</div>
​
<div id="Oslo" class="tabcontent">
  <h1>Oslo</h1>
  <p>Oslo is the capital of Norway.</p>
</div>
​
The capital city of Heahburg has several temples to the gods in particularly @[Selûne](person:cddcc710-76bd-4878-aba9-6eb89e15566), @[Helm](person:9117bca6-2fb4-4556-8dae-5899908ebb0), and @[Tyr](person:01ef02df-2922-44dc-b695-098f01e2dfa5). @[The Temple of Helm](landmark:e66b54db-89be-4e54-a419-d5a6d6a9d7ab) trains Paladins. @[The Temple of Tyr](landmark:0e6e62a4-8f18-4fe1-b672-a7572fd0e538), produces some of the best legal minds and judges. @[The Temple of Selûne](landmark:6283e8a0-646d-47d5-8465-d422b6fbbc00) hold great influence with the royal family and is quite wealthy.
2
​
3
Heahburg also use to be the home of the @[Wizards' College](landmark:53b62cb5-9889-42ae-b306-4244cba7b253). When @[Mystra](person:ce63d4dd-9a14-4035-a830-10aed7d125b8), and @[Azuth](person:3aeadb0e-7e57-4b9b-ab9b-7e5c2d7ccc7d), disappeared from the world, the college shut down and wizards slowly faded away in both importance and power. All that is left of magic is the great artifacts and runes that still holds any power. No spells besides cantrips have been cast in the last thousand years.
<!DOCTYPE html>
<html>
​
<body>
The content of the body element is displayed in your browser.
</body>
​
</html>
​
<!DOCTYPE html>
<html>
​
<body>
The content of the body element is displayed in your browser.
</body>
​
</html>
​
// Complete the solution so that it returns true if the first argument(string) passed in ends with the nd argument (also a string).
2
// https://www.codewars.com/kata/1f2d1cafcc0f5c0007d/train/javascript
3
// Test: Test.assertEquals(solution('abcde', 'cde'), true)
4
// Test.assertEquals(solution('abcde', 'abc'), false)
5
​

// function solution(str, ending){
7
//   for(i = -1; i >= -(ending.length); i--) {

//   if(str[str.length + i] === ending[ending.length + i]){
9
//     var match = str[str.length + i] === ending[ending.length + i]

//   }    

//   }

//   return match

// }

​
<!DOCTYPE html>
<html>
<body>
​
<h1>The a target attribute</h1>
​
<p>Open link in a new window or tab: <a href="https://www.w3schools.com" target="_blank">Visit W3Schools!</a></p>
​
</body>
</html>
​
<!DOCTYPE html>
<html>
<body>
​
<h2>My First Web Page</h2>
<p>My First Paragraph.</p>
​
<p id="demo"></p>
​
<script>
document.getElementById("demo").innerHTML = 5 + 6;
</script>
​
</body>
</html> 
​
<!DOCTYPE html>

<html lang="en">

​

<head>

  <meta charset="UTF-">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
  <title>Tính toán giá bất động sản</title>

  <link rel="stylesheet" href="style.css">

</head>

​

<body>

  <div class="container">

    <h1>Tính toán giá bất động sản</h1>

    <form>
// Lấy các phần tử HTML cần sử dụng

const form = document.querySelector("form");

const priceInput = document.querySelector("#price");

const sizeInput = document.querySelector("#size");

const locationSelect = document.querySelector("#location");

const resultContainer = document.querySelector("#result");

​

// Mảng giá trị đất của các khu vực

const prices = {

  city: 1000,

  suburb: 500,

  rural: 250

};

​
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Map Objects</h2>
<p>Using Map.get():</p>
​
<p id="demo"></p>
​
<script>
// Create a Map
const fruits = new Map([
  ["apples", 500],
  ["bananas", 300],
  ["oranges", 200]
]);
​
document.getElementById("demo").innerHTML = fruits.get("apples");
</script>
​
</body>
</html>
​
​
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Map Objects</h2>
<p>Creating a Map from an Array:</p>
​
<p id="demo"></p>
​
<script>
// Create a Map
const fruits = new Map([
  ["apples", 500],
  ["bananas", 300],
  ["oranges", 200]
]);
​
document.getElementById("demo").innerHTML = fruits.get("apples");
</script>
​
</body>
</html>
​
​
<script>
  jQuery(document).ready(function($) {
    $('a[href^="#"]').click(function(event) {
      event.preventDefault();
      var target = $(this.hash);
      $('html, body').animate({
        scrollTop: target.offset().top
      }, 1000);
    });
  });
</script>
@import url('https://fonts.googleapis.com/css?family=Roboto')

​

$m: #FF4E00
4
​

html, body

    width: 0%

    height: 100%

    font-family: 'Roboto', sans-serif

    letter-spacing: 2px
10
.wrapper

    width: 100%

    height: 100%

    display: flex

    justify-content: center

    align-items: center

    background: linear-gradient(135deg, #e1e1e1 0%, white 50%, #e1e1e1 100%)

​

a

    color: #000

    text-transform: uppercase

    transition: all .2s ease

    text-decoration: none
<div class="wrapper">

    <nav class="main__menu">

        <ul>
4
            <li><a href="#">Текст</a></li><li><a href="#">Текст</a></li><li><a href="#">Текст</a></li><li><a href="#">Текст</a></li><li><a href="#">Текст</a></li>

        </ul>

    </nav>

</div>
var canvas = $('canvas')[0];

var context = canvas.getContext('2d');

​

canvas.width = window.innerWidth;

canvas.height = window.innerHeight;

​

var Projectile;

var State = false;

var Explode = false;

var Collapse = false;

var Particles = [];

​

var colors = ["#1abc9c", "#2ecc71", "#3498db", "#9b59b6", "#9b59b6", "#f1c40f", "#e67e", "#e74c3c"];

​

function Proj() {

  this.radius = 5.2;

  this.x = Math.random() * canvas.width;

  this.y = canvas.height + this.radius;

  this.color = "#e74c3c";

  this.velocity = {x: 0, y: 0};

  this.speed = 12;
22
}

​
[class*="fontawesome-"]:before {

  font-family: 'FontAwesome', sans-serif;

}

​

body {

  background: #ececec;

  overflow: hidden;

  user-select: none;

}

​

#Button {

  position: absolute; top: px; left: 15px;

  width: 60px; height: 60px;

  font-size: px; 
15
  text-align: center; 

  line-height: 60px; 

  background: #e74c3c;
18
  border-radius: 50%;

  color: #ececec;

  cursor: pointer;

  z-index: 1;

}

​
<div id="Button" class="fas fa-fire"></div>

​

<div class="Nav">

  <a href="#"><span class="fas fa-home"></span></a>

  <a href="#"><span class="fas fa-user"></span></a>

  <a href="#"><span class="fas fa-upload"></span></a>

  <a href="#"><span class="fas fa-wrench"></span></a>

</div>

​

<canvas></canvas>

​

​

​

​
     $('.open-overlay').click(function() {

       $('.open-overlay').css('pointer-events', 'none');

       var overlay_navigation = $('.overlay-navigation'),

         top_bar = $('.bar-top'),

         middle_bar = $('.bar-middle'),

         bottom_bar = $('.bar-bottom');

​

       overlay_navigation.toggleClass('overlay-active');

       if (overlay_navigation.hasClass('overlay-active')) {

​

         top_bar.removeClass('animate-out-top-bar').addClass('animate-top-bar');

         middle_bar.removeClass('animate-out-middle-bar').addClass('animate-middle-bar');

         bottom_bar.removeClass('animate-out-bottom-bar').addClass('animate-bottom-bar');

         overlay_navigation.removeClass('overlay-slide-up').addClass('overlay-slide-down')

         overlay_navigation.velocity('transition.slideLeftIn', {

           duration: 300,

           delay: 0,

           begin: function() {

             $('nav ul li').velocity('transition.perspectiveLeftIn', {

               stagger: 150,
@import url(https://fonts.googleapis.com/css?family=Work+Sans:00,00,00|Open+Sans:400italic,300italic);

body {
3
  background-color: #fff
4
}

​

.home {
7
  width: 0%;

  height: 100vh;

  position: relative;
10
  background-image: url(https://images.unsplash.com/photo-44927714506-8492d94b4e3d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=067f0b097deff88a789e5210406ffe);

  background-size: cover;
12
  background-position: center center;

}
14
​

​

/* ====================================

Navigation 

==================================== */

​
<div class="overlay-navigation">

  <nav role="navigation">

    <ul>

      <li><a href="#" data-content="The beginning">Home</a></li>

      <li><a href="#" data-content="Curious?">About</a></li>

      <li><a href="#" data-content="I got game">Skills</a></li>

      <li><a href="#" data-content="Only the finest">Works</a></li>

      <li><a href="#" data-content="Don't hesitate">Contact</a></li>

    </ul>

  </nav>

</div>

​

<section class="home">

    <a href="https://codepen.io/fluxus/pen/gPWxXJ" target="_blank">Click for CSS version</a>

  <div class="open-overlay">

    <span class="bar-top"></span>

    <span class="bar-middle"></span>

    <span class="bar-bottom"></span>

  </div>
/* Clearing floats */
.cf:before,
.cf:after {
  content: " ";
  display: table;
}
​
.cf:after {
  clear: both;
}
​
.cf {
  *zoom: ;
}
​
/* Mini reset, no margins, paddings or bullets */
.menu,
.submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}
​
/* Main level */
.menu {     
  margin: 0px auto;
  width: 00px;
  /* http://www.red-team-design.com/horizontal-centering-using-css-fit-content-value */
  width: -moz-fit-content;
  width: -webkit-fit-content;
  width: fit-content; 
<ul class="menu cf">
  <li><a href="">Menu item</a></li>
  <li>
    <a href="">Menu item</a>
    <ul class="submenu">
      <li><a href="">Submenu item</a></li>
      <li><a href="">Submenu item</a></li>
      <li><a href="">Submenu item</a></li>
      <li><a href="">Submenu item</a></li>
    </ul>     
  </li>
  <li><a href="">Menu item</a></li>
  <li><a href="">Menu item</a></li>
  <li><a href="">Menu item</a></li>
</ul>
// Header
<link rel="stylesheet" href="../wp-content/themes/cyberrecoverygroup/build/css/intlTelInput.css">
<link rel="stylesheet" href="../wp-content/themes/cyberrecoverygroup/build/css/demo.css">




//Footer

<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/js/intlTelInput.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/inputmask/4.0.8/jquery.inputmask.bundle.min.js'></script><script  src="./script.js"></script>

<script>
    var input = document.querySelector("#form-field-phone");
    window.intlTelInput(input, {
//       allowDropdown: false,
      // autoHideDialCode: false,
      // autoPlaceholder: "off",
			   initialCountry: "auto",
      // dropdownContainer: document.body,
      // excludeCountries: ["us"],
         preferredCountries: ['au','be', 'ca', 'dk', 'fi', 'hk', 'ie', 'nl', 'nz', 'no', 'sg', 'se', 'ae', 'us'],
      // formatOnDisplay: false,
      geoIpLookup: function(callback) {
        $.get("https://ipinfo.io", function() {}, "jsonp").always(function(resp) {
          var countryCode = (resp && resp.country) ? resp.country : "";
          callback(countryCode);
        });
      },
      // hiddenInput: "full_number",
      // localizedCountries: { 'de': 'Deutschland' },
      	 nationalMode: false,
      // onlyCountries: ['us', 'gb', 'ch', 'ca', 'do'],
//       placeholderNumberType: "MOBILE",
//       	 preferredCountries: ['cn', 'jp'],
      separateDialCode: true,
      utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/js/utils.js",
    });
  </script>



add_action('admin_init', function () {

    // Redirect any user trying to access comments page

    global $pagenow;

    

    if ($pagenow === 'edit-comments.php') {

        wp_safe_redirect(admin_url());

        exit;

    }

​

    // Remove comments metabox from dashboard

    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');

​

    // Disable support for comments and trackbacks in post types

    foreach (get_post_types() as $post_type) {

        if (post_type_supports($post_type, 'comments')) {

            remove_post_type_support($post_type, 'comments');

            remove_post_type_support($post_type, 'trackbacks');

        }

    }

});

​
function resizeGridItem(item){

  grid = document.getElementsByClassName("layout-classic")[0];

  rowHeight = parseInt(window.getComputedStyle(grid).getPropertyValue('grid-auto-rows'));

  rowGap = parseInt(window.getComputedStyle(grid).getPropertyValue('grid-row-gap'));

    imgHeight = item.querySelector('.featured-img').getBoundingClientRect().height

    contentHeight = item.querySelector('.post-content').getBoundingClientRect().height

  rowSpan = Math.ceil(((imgHeight+contentHeight)+rowGap)/(rowHeight+rowGap));

    item.style.gridRowEnd = "span "+rowSpan;

}

​

function resizeAllGridItems(){

  allItems = document.querySelectorAll(".layout-classic .post");

  for(x=0;x<allItems.length;x++){

    resizeGridItem(allItems[x]);

  }

}

​

function resizeInstance(instance){

    item = instance.elements[0];

  resizeGridItem(item);

}
# These are supported funding model platforms

​

github: # Replace with up to  GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
patreon: # Replace with a single Patreon username

open_collective: # Replace with a single Open Collective username

ko_fi: # Replace with a single Ko-fi username

tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel

community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry

liberapay: # Replace with a single Liberapay username

issuehunt: # Replace with a single IssueHunt username

otechie: # Replace with a single Otechie username

lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry

custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

​
# These are supported funding model platforms

​

github: # Replace with up to  GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
patreon: # Replace with a single Patreon username

open_collective: # Replace with a single Open Collective username

ko_fi: # Replace with a single Ko-fi username

tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel

community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry

liberapay: # Replace with a single Liberapay username

issuehunt: # Replace with a single IssueHunt username

otechie: # Replace with a single Otechie username

lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry

custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

​
<div id="page-body" data-select-id="select2-data-page-body">
2
​

  <div id="col-center">

​

    <div id="content-wrapper">

​

      <div class="tabs forma-podbora" id="forma-podbora">

​

        <div class="tabs__content  active">

          <div class="row">

​

            <!--                         СЮДА -->

            <form action="/primerka-diskov/podbor" id="diskiForm" method="post" data-select2-id="select2-data-diskiForm">

​

              <div class="col-md-9 form__image fixedBlock" style="width: 100%; max-width: 100%; flex: 0 0 100%; height: 288px; min-height: auto; position: fixed; top: 0px; left: 0px; z-index: 80; padding: 0px;">

                <div class="image__block">

                  <img data-savepage-currentsrc="https://konsulavto.ru/static/images/avto/kia/2M6CPv_15507_imgred.jpg" data-savepage-src="https://konsulavto.ru/static/images/avto/kia/2M6CPv_15507_imgred.jpg" src="https://konsulavto.ru/static/images/avto/kia/2M6CPv_15507_imgred.jpg" alt="Подбор автомобильных дисков" id="avto__image" data-toggle="tooltip" data-placement="bottom" class="img-responsive" data-original-title="Установлены диски Диск колесный  литой " style="max-height: 0px; margin-top: 0px;">
18
                  <img class="dials left-dial" data-x="1" data-y="56" data-d="" data-savepage-currentsrc="https://konsulavto.ru/static/images/dials/%D0%A1%D0%9A%D0%90%D0%94/yf9Fle_40684_img2.png" data-savepage-src="https://konsulavto.ru/static/images/dials/СКАД/yf9Fle_40684_img2.png" src="https://konsulavto.ru/static/images/dials/СКАД/yf9Fle_40684_img2.png" style="display: inline; width: 59.3688px; height: 59.3688px; left: 166.035px; bottom: 15.8588px; opacity: 1;">

                  <img class="dials right-dial" data-x="523" data-y="56" data-d="" data-savepage-currentsrc="https://konsulavto.ru/static/images/dials/%D0%A1%D0%9A%D0%90%D0%94/yf9Fle_40684_img2.png" data-savepage-src="https://konsulavto.ru/static/images/dials/СКАД/yf9Fle_40684_img2.png" src="https://konsulavto.ru/static/images/dials/СКАД/yf9Fle_40684_img2.png" style="display: inline; width: 59.3688px; height: 59.3688px; left: 492.157px; bottom: 15.8588px; opacity: 1;">

                </div>
21
                <div class="selector__image" id="selectImg" style="background: rgb(255, 255, 255); margin-top: 0px; padding-top: 25px; padding-bottom: 25px; padding-left: 25px;">
22
                  <div class="car__color_picker car__color_img_blue" onclick="changeImage('https://konsulavto.ru/static/images/avto/kia/2M6CPv_15507_imgblue.jpg')"></div>
<div id="page-body" data-select-id="select2-data-page-body">
2
​

  <div id="col-center">

​

    <div id="content-wrapper">

​

      <div class="tabs forma-podbora" id="forma-podbora">

​

        <div class="tabs__content  active">

          <div class="row">

​

            <!--                         СЮДА -->

            <form action="/primerka-diskov/podbor" id="diskiForm" method="post" data-select2-id="select2-data-diskiForm">

​

              <div class="col-md-9 form__image fixedBlock" style="width: 100%; max-width: 100%; flex: 0 0 100%; height: 288px; min-height: auto; position: fixed; top: 0px; left: 0px; z-index: 80; padding: 0px;">

                <div class="image__block">

                  <img data-savepage-currentsrc="https://konsulavto.ru/static/images/avto/kia/2M6CPv_15507_imgred.jpg" data-savepage-src="https://konsulavto.ru/static/images/avto/kia/2M6CPv_15507_imgred.jpg" src="https://konsulavto.ru/static/images/avto/kia/2M6CPv_15507_imgred.jpg" alt="Подбор автомобильных дисков" id="avto__image" data-toggle="tooltip" data-placement="bottom" class="img-responsive" data-original-title="Установлены диски Диск колесный  литой " style="max-height: 0px; margin-top: 0px;">
18
                  <img class="dials left-dial" data-x="1" data-y="56" data-d="" data-savepage-currentsrc="https://konsulavto.ru/static/images/dials/%D0%A1%D0%9A%D0%90%D0%94/yf9Fle_40684_img2.png" data-savepage-src="https://konsulavto.ru/static/images/dials/СКАД/yf9Fle_40684_img2.png" src="https://konsulavto.ru/static/images/dials/СКАД/yf9Fle_40684_img2.png" style="display: inline; width: 59.3688px; height: 59.3688px; left: 166.035px; bottom: 15.8588px; opacity: 1;">

                  <img class="dials right-dial" data-x="523" data-y="56" data-d="" data-savepage-currentsrc="https://konsulavto.ru/static/images/dials/%D0%A1%D0%9A%D0%90%D0%94/yf9Fle_40684_img2.png" data-savepage-src="https://konsulavto.ru/static/images/dials/СКАД/yf9Fle_40684_img2.png" src="https://konsulavto.ru/static/images/dials/СКАД/yf9Fle_40684_img2.png" style="display: inline; width: 59.3688px; height: 59.3688px; left: 492.157px; bottom: 15.8588px; opacity: 1;">

                </div>
21
                <div class="selector__image" id="selectImg" style="background: rgb(255, 255, 255); margin-top: 0px; padding-top: 25px; padding-bottom: 25px; padding-left: 25px;">
22
                  <div class="car__color_picker car__color_img_blue" onclick="changeImage('https://konsulavto.ru/static/images/avto/kia/2M6CPv_15507_imgblue.jpg')"></div>
#include<iostream>

#include<vector>

using namespace std;

​

void merge(int arr1[], int n, int arr2[], int m, int arr3[]) {

​

    int i = 0, j = 0;

    int k = 0;

    while( i<n && j<m) {

        if(arr1[i] < arr2[j]){

            arr3[k++] = arr1[i++];

        }

        else{

            arr3[k++] = arr2[j++];

        }

    }

​

    //copy first array k element ko

    while(i<n) {

        arr3[k++] = arr1[i++];

    }

​

    //copy kardo second array k remaining element ko

    while(j<m) {

        arr2[k++] = arr2[j++];

    }

}

​

void print(int ans[], int n) {

    for(int i=0; i<n; i++) {

        cout<< ans[i] <<" ";

    }

    cout << endl;

}

​

int main() {

​

    int arr1[5] = {1,3,5,7,9};

    int arr2[3] = {2,4,6};

​

    int arr3[8] = {0};

​

    merge(arr1, 5, arr2, 3, arr3);

​

    print(arr3, 8);
​the answer as hint (see how AND is used for multiple join conditions between same table ...last line)
SELECT
  couples.couple_name,
  couples.pref_location,
  apartments.id
FROM couples
JOIN apartments
  ON apartments.price NOT BETWEEN couples.min_price AND couples.max_price
  AND location != pref_location

///////////////////
btw my answer also worked

SELECT c.couple_name,c.pref_location,a.id
FROM apartments a
join 
couples c on c.pref_location <> a.location
where a.price not between c.min_price and c.max_price

<!DOCTYPE html>
<html>
<head>
<style>
div {
  width: 100px;
  height: 100px;
  background-color: red;
  animation-name: example;
  animation-duration: 4s;
}
​
@keyframes example {
  0%   {background-color: red;}
  25%  {background-color: yellow;}
  50%  {background-color: blue;}
  100% {background-color: green;}
}
</style>
</head>
<body>
​
<h1>CSS Animation</h1>
​
<div></div>
​
<p><b>Note:</b> When an animation is finished, it goes back to its original style.</p>
​
</body>
</html>
​
​
<div onclick="window.open('http://www.website.com/page', '_blank')">Click Me</div>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
​
<h1>My First Heading</h1>
<p>My first paragraph.</p>
​
</body>
</html>
​
​
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
​
<h1>My First Heading</h1>
<p>My first paragraph.</p>
​
</body>
</html>
​
​
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
​
<h1>My First Heading</h1>
<p>My first paragraph.</p>
​
</body>
</html>
​
​
​veru useful to find pairs and avoid repeating 
eg 1,2 is included so no need to incude 2,1
<canvas id="canvas"></canvas>

<div class="copy">

    <h1>Confetti Cannon</h1>

    <p>click, drag & release</p>

    <p>CodeWorks4U</p>

</div>
// in code snippet.
function sptp_suppress_filters_mod( $suppress_filters){
	if (defined('DOING_AJAX') && DOING_AJAX) {
	 	$suppress_filters = true;
	 } else {
	 	$suppress_filters = false;
	}

	return $suppress_filters;
}
add_filter( 'sptp_suppress_filters', 'sptp_suppress_filters_mod');

function sptp_filter_groups_mod( $group, $shortcode_id ){
	if('' == $group ){
		$sptp_group = get_terms(array(
			'taxonomy' => 'sptp_group',
			'hide_empty' => false,
		));
		$group = array();
		foreach($sptp_group as $category) {
			$group[] = $category->slug;
		}
	}
	return $group;
}
add_filter( 'sptp_filter_groups', 'sptp_filter_groups_mod', 10, 2);

// New hook in ajax search funtion.
$group = apply_filters( 'sptp_filter_groups', $group, $generator_id );

// Helper.php in sptp_query funtion
if ( isset( $group ) && ! empty( $group ) ) {
			$args['tax_query'] = array(
				array(
					'taxonomy' => 'sptp_group',
					'field'    => 'slug',
					'terms'    => $group,
				),
			);
		}
<html>
<head>
<style>
* {
  box-sizing: border-box;
}

.column {
  float: left;
  width: 50%;
  padding: 10px;
  text-align:center;
}

.row:after {
  content: "";
  display: table;
  clear: both;
}
a{
  text-decoration: none;
  }
</style>
</head>
<body>

<div class="row">
  <div class="column" >

    <h2>Reserve from Dun Laogharie</h2>
 <a href="#">Reservation</a>
  

  </div>
  <div class="column">
   <h2>Reserve from Kimmage</h2>
 <a href="#">Reservation</a>
  </div>
</div>

</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
​
<h2>Setting the Viewport</h2>
<p>This example does not really do anything, other than showing you how to add the viewport meta element.</p>
​
</body>
</html>
​
​
void * SwappyTracer::userData
#include <stdio.h>
​
int main() {
  int x = 5;
  x %= 3;
  printf("%d", x);
  return 0;
}
#include <stdio.h>
​
int main() {
  float x = 5;
  x /= 3;
  printf("%f", x);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  x *= 3;
  printf("%d", x);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  x -= 3;
  printf("%d", x);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 10;
  x += 5;
  printf("%d", x);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  printf("%d", --x);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  printf("%d", ++x);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  int y = 2;
  printf("%d", x % y);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 12;
  int y = 3;
  printf("%d", x / y);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  int y = 3;
  printf("%d", x * y);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  int y = 3;
  printf("%d", x - y);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  int y = 3;
  printf("%d", x + y);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  int y = 3;
  printf("%d", x + y);
  return 0;
}
#include <stdio.h>
​
int main() {
  int sum1 = 100 + 50;        // 150 (100 + 50)
  int sum2 = sum1 + 250;      // 400 (150 + 250)
  int sum3 = sum2 + sum2;     // 800 (400 + 400)
  printf("%d\n", sum1);
  printf("%d\n", sum2);
  printf("%d\n", sum3);
  return 0;
}
#include <stdio.h>
​
int main() {
  int myNum = 100 + 50;
  printf("%d", myNum);
  return 0;
}
#include <stdio.h>
​
int main() {
  const int minutesPerHour = 60;
  const float PI = 3.14;
​
  printf("%d\n", minutesPerHour);
  printf("%f\n", PI);
  return 0;
}
#include <stdio.h>
​
int main() {
  int num1 = 5;
  int num2 = 2;
  float sum = (float) num1 / num2;
​
  printf("%.1f", sum);
  return 0;
}
#include <stdio.h>
​
int main() {
  // Manual conversion: int to float
  float sum = (float) 5 / 2;
​
  printf("%f", sum);
  return 0;
}
#include <stdio.h>
​
int main() {
  char greetings[] = "Hello World!";
  printf("%s", greetings);
 
  return 0;
}
#include <stdio.h>
​
int main() {
  // Student data
  int studentID = 15;
  int studentAge = 23;
  float studentFee = 75.25;
  char studentGrade = 'B';
​
  // Print variables
  printf("Student id: %d\n", studentID);
  printf("Student age: %d\n", studentAge);
  printf("Student fee: %f\n", studentFee);
  printf("Student grade: %c", studentGrade);
​
  return 0;
}
#include <stdio.h>
​
int main() {
  int x, y, z;
  x = y = z = 50;
  printf("%d", x + y + z);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5, y = 6, z = 50;
  printf("%d", x + y + z);
  return 0;
}
#include <stdio.h>
​
int main() {
  int x = 5;
  int y = 6;
  int sum = x + y;
  printf("%d", sum);
  return 0;
}
#include <stdio.h>
​
int main() {
  // Create a myNum variable and assign the value 15 to it
  int myNum = 15;
  
  // Declare a myOtherNum variable without assigning it a value
  int myOtherNum;
​
  // Assign value of myNum to myOtherNum
  myOtherNum = myNum;
​
  // myOtherNum now has 15 as a value
  printf("%d", myOtherNum);
  
  return 0;
}
#include <stdio.h>
​
int main() {
  int myNum = 15;
  
  int myOtherNum = 23;
​
  // Assign the value of myOtherNum (23) to myNum
  myNum = myOtherNum;
​
  // myNum is now 23, instead of 15
  printf("%d", myNum);
  
  return 0;
}
#include <stdio.h>
​
int main() {
  int myNum = 15;
  
  int myOtherNum = 23;
​
  // Assign the value of myOtherNum (23) to myNum
  myNum = myOtherNum;
​
  // myNum is now 23, instead of 15
  printf("%d", myNum);
  
  return 0;
}
#include <stdio.h>
​
int main() {
  // Create variables
  int myNum = 15;              // Integer (whole number)
  float myFloatNum = 5.99;     // Floating point number
  char myLetter = 'D';         // Character
  
  // Print variables
  printf("%d\n", myNum);
  printf("%f\n", myFloatNum);
  printf("%c\n", myLetter);
  return 0;
}
#include <stdio.h>
​
int main() {
  int myNum = 15;
  printf("My favorite number is: %d", myNum);
  return 0;
}
#include <stdio.h>
​
int main() {
  int myNum = 15;
  char myLetter = 'D';
  printf("My number is %d and my letter is %c", myNum, myLetter);
  return 0;
}
#include <stdio.h>
​
int main() {
  int myNum = 15; // myNum is 15
  myNum = 10; // Now myNum is 10
  
  printf("%d", myNum);
  return 0;
}
#include <stdio.h>
​
int main() {
  // Create variables
  int myNum = 15;              // Integer (whole number)
  float myFloatNum = 5.99;     // Floating point number
  char myLetter = 'D';         // Character
  
  // Print variables
  printf("%d\n", myNum);
  printf("%f\n", myFloatNum);
  printf("%c\n", myLetter);
  return 0;
}
#include <stdio.h>
​
int main() {
  printf("Hello World!");
  return 0;
}
/* Add your CSS code here.

​

For example:

.example {

    color: red;

}

​

For brushing up on your CSS knowledge, check out http://www.w3schools.com/css/css_syntax.asp

​

End of comment */ 

body {

    background-color: #f9f9f9;

}

#sinatra-header-inner {

    background: #f9f9f9;

}

​

:root {

    --primary : #4b7a;

}

h2 {

    word-break: keep-all;

}

select[data-filter="category"] {

    width: 100%;

}

#books_grid .books ul.vc_grid-filter center {
28
    font-weight: bold;

    color: #000;

    font-size: 1.1rem;

}

.vc_grid-filter.vc_grid-filter-color-white>.vc_grid-filter-item.vc_active, .vc_grid-filter.vc_grid-filter-color-white>.vc_grid-filter-item:hover {

    background-color: #103965;

    color: #ffffff;

    border-radius: 4px;

}

.vc_grid-filter.vc_grid-filter-color-white>.vc_grid-filter-item.vc_active>span, .vc_grid-filter.vc_grid-filter-color-white>.vc_grid-filter-item:hover>span {
    

    $("body").on('click', 'li.vc_grid-filter-item.back-to-top',function() {

        $([document.documentElement, document.body]).animate({

            scrollTop: $("div#all_books").offset().top

        }, 1000);

        

    });

    

    jQuery("select#ct_mobile_filter").change(function(){

        var link = jQuery(this).val()

        window.location = link

    // console.log(link)

    })

    

    //  ========= Custom Filter ==============

    jQuery("li.cm_grid-filter-item:not(.back-to-top)").click(function(){

        text = jQuery(this).find("span").text();

        jQuery(".section_title h2 span#all").text(text)

        target = jQuery(this).find("span").data("cm-grid-filter-value")

        if(target == "*"){

            jQuery("article.elementor-post.elementor-grid-item").fadeIn()

        }else{

            jQuery("article.elementor-post.elementor-grid-item").hide()

            jQuery(".elementor-post__badge:contains("+target+")").parents(".elementor-grid-item").fadeIn()

        }

    })

    jQuery(".cm_grid-styled-select select").click(function(){

        target = jQuery(this).val();

        jQuery(".section_title h2 span#all").text(target);

        if(target == "*"){

            jQuery("article.elementor-post.elementor-grid-item").fadeIn()

        }else{

            jQuery("article.elementor-post.elementor-grid-item").hide()

            jQuery(".elementor-post__badge:contains("+target+")").parents(".elementor-grid-item").fadeIn()

        }

    })

    //  ========= Custom Filter ==============

});

​