Snippets Collections
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>

function add_slug_body_class( $classes ) {
global $post;
if ( isset( $post ) ) {
$classes[] = $post->post_type . '-' . $post->post_name;
}
return $classes;
}
add_filter( 'body_class', 'add_slug_body_class' );
All are good
People who are close to the heart are very good
The ones that are close to the heart are the best
.modal-dialog--schedule-tour .modal-content__list-view


.modal-schedule-tour .map__overlay .gm-style-iw-d .school-list > .school-list__image{}

.modal-schedule-tour .map__overlay .gm-style-iw-d

.modal-schedule-tour .modal-content__list-view {}
// Function to set the height of headings within a specific row
function setHeadingHeight(rowId) {
// Get all heading elements inside the specified row
const headings = document.querySelectorAll(.${rowId} .mints-name);

// Find the maximum height among all heading elements in this row
let maxHeight = 0;
headings.forEach(heading => {
const height = heading.getBoundingClientRect().height;
maxHeight = Math.max(maxHeight, height);
});

// Set the height of all heading elements in this row to the maximum height
headings.forEach(heading => {
heading.style.height = ${maxHeight}px;
});
}

// Call the function for each row
setHeadingHeight('owl-stage');
setHeadingHeight('projects-carousel');
// Call for other rows as needed
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

    <property name="LOGS" value="./logs"/>
    <property name="SERVICE" value="gateway-tts"/>

    <appender name="Console"
              class="ch.qos.logback.core.ConsoleAppender">
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>
                %black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1.}): %msg%n%throwable
            </Pattern>
        </layout>
    </appender>

    <appender name="RollingFile"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOGS}/${SERVICE}.log</file>
        <encoder
                class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
        </encoder>

        <rollingPolicy
                class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOGS}/%d{yyyy-MM}/${SERVICE}-%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>7</maxHistory>
        </rollingPolicy>
    </appender>

    <!-- LOG everything at INFO level -->
    <root level="info">
        <appender-ref ref="RollingFile"/>
        <appender-ref ref="Console"/>
    </root>

    <!-- LOG "com.baeldung*" at TRACE level -->
    <logger name="com.baeldung" level="trace" additivity="false">
        <appender-ref ref="RollingFile"/>
        <appender-ref ref="Console"/>
    </logger>

    <logger name="org.apache.poi" level="ERROR" />

</configuration>
def prophet_features(df, horizon=24*7): 
    temp_df = df.reset_index() 
    temp_df = temp_df[['datetime', 'count']] 
    temp_df.rename(columns={'datetime': 'ds', 'count': 'y'}, inplace=True) 
 
    # Using the data from the previous week as an example for validation 
    train, test = temp_df.iloc[:-horizon,:], temp_df.iloc[-horizon:,:] 
 
    # Define the Prophet model 
    m = Prophet( 
                growth='linear', 
                seasonality_mode='additive', 
                interval_width=0.95, 
                daily_seasonality=True, 
                weekly_seasonality=True, 
                yearly_seasonality=False 
            ) 
    # Train the Prophet model 
    m.fit(train) 
 
    # Extract features from the data, using Prophet to predict the training set
    predictions_train = m.predict(train.drop('y', axis=1)) 
    # Use Prophet to extract features from the data to predict the test set
    predictions_test = m.predict(test.drop('y', axis=1)) 
    # Combine predictions from the training and test sets
    predictions = pd.concat([predictions_train, predictions_test], axis=0) 
 
    return predictions



def train_time_series_with_folds_autoreg_prophet_features(df, horizon=24*7, lags=[1, 2, 3, 4, 5]): 
    
    # Create a dataframe containing all the new features created with Prophet
    new_prophet_features = prophet_features(df, horizon=horizon) 
    df.reset_index(inplace=True) 
 
    # Merge the Prophet features dataframe with our initial dataframe
    df = pd.merge(df, new_prophet_features, left_on=['datetime'], right_on=['ds'], how='inner') 
    df.drop('ds', axis=1, inplace=True) 
    df.set_index('datetime', inplace=True) 
 
    # Use Prophet predictions to create some lag variables (yhat column)
    for lag in lags: 
        df[f'yhat_lag_{lag}'] = df['yhat'].shift(lag) 
    df.dropna(axis=0, how='any') 
 
    X = df.drop('count', axis=1) 
    y = df['count'] 
 
    # Using the data from the previous week as an example for validation
    X_train, X_test = X.iloc[:-horizon,:], X.iloc[-horizon:,:] 
    y_train, y_test = y.iloc[:-horizon], y.iloc[-horizon:] 
 
    # Define the LightGBM model, train, and make predictions
    model = LGBMRegressor(random_state=42) 
    model.fit(X_train, y_train) 
    predictions = model.predict(X_test) 
 
    # Calculate MAE 
    mae = np.round(mean_absolute_error(y_test, predictions), 3)     
 
    # Plot the real vs prediction for the last week of the dataset
    fig = plt.figure(figsize=(16,6)) 
    plt.title(f'Real vs Prediction - MAE {mae}', fontsize=20) 
    plt.plot(y_test, color='red') 
    plt.plot(pd.Series(predictions, index=y_test.index), color='green') 
    plt.xlabel('Hour', fontsize=16) 
    plt.ylabel('Number of Shared Bikes', fontsize=16) 
    plt.legend(labels=['Real', 'Prediction'], fontsize=16) 
    plt.grid() 
    plt.show()
.test {
    width: 200px; 
    height: 200px;
    background-color:skyblue;
    overflow-y: scroll;

    -ms-overflow-style: none; /* 인터넷 익스플로러 */
    scrollbar-width: none; /* 파이어폭스 */
}

.test::-webkit-scrollbar {
    display: none; /* 크롬, 사파리, 오페라, 엣지 */
}
שיטת משלוח 1: ישראל > ירושלים
שיטת משלוח 2: ישראל > בית שמש, ביתר, בני ברק, אלעד וכו׳ וכו׳....
type RemoveNaughtyChildren<T> = {
  [K in keyof T as K extends `naughty_${string}` ? never : K]: T[K];
};
.center-five-columns,
.center-seven-columns {
    display: flex;
    column-gap: 30px;
    row-gap: 50px;
    justify-content: center;
    flex-wrap: wrap;
}

.center-five-columns .flex_column,
.center-seven-columns .flex_column {
    width: 100% !important;
}

@media (min-width: 641px) {
    .center-seven-columns .flex_column,
    .center-five-columns .flex_column {
        width: calc(50% - 15px) !important;
    }
}

@media (min-width: 800px) {
    .center-seven-columns .flex_column,
    .center-five-columns .flex_column {
        width: calc(33.33% - 20px) !important;
    }
}

@media (min-width: 1251px) {
    .center-seven-columns .flex_column {
        width: calc(14.28% - 25.72px) !important;
    }

    .center-five-columns .flex_column {
        width: calc(20% - 24px) !important;
    }
}

@media (max-width: 640px) {
    .center-seven-columns .flex_column,
    .center-five-columns .flex_column {
        width: 380px !important;
    }
}
package tests;

import com.adak.ir.LoggingUtils;
import com.epam.reportportal.annotations.attribute.Attribute;
import com.epam.reportportal.annotations.attribute.Attributes;
import com.epam.reportportal.annotations.attribute.MultiKeyAttribute;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.ITestListener;
import org.testng.ITestResult;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Listeners;

import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;

@Listeners(BasePage.TestListener.class)
public class BasePage {
    public static final Logger LOGGER = LoggerFactory.getLogger(BasePage.class);
    public static AppiumDriver driver;


    @BeforeClass
    public void Android_setUp() throws MalformedURLException {
        LOGGER.info("آماده سازی دستگاه");

        DesiredCapabilities capabilities = new DesiredCapabilities();

        capabilities.setCapability("appium:automationName", "UIAutomator2");
        capabilities.setCapability("appium:platformVersion", "12");
        capabilities.setCapability("appium:deviceName","RF8NB25E39B");
        capabilities.setCapability("udid","RF8NB25E39B");

        capabilities.setCapability("platformName", "Android");
        capabilities.setCapability(MobileCapabilityType.APP, "/Users/adak/Documents/easypayment_direct_v6.3.4.apk");

        //capabilities.setCapability("appium:app", "/Users/qtroom/Test-project/My/ap_otp/apps/easypayment_direct_v6.4.2.apk");
        capabilities.setCapability("appPackage", "com.sibche.aspardproject.app");
        //capabilities.setCapability("appActivity", "com.sibche.aspardproject.app.ui.activity.LauncherActivity");
        capabilities.setCapability("autoAcceptAlerts", "true");
        driver = new AndroidDriver(new URL("http://localhost:4723/wd/hub"), capabilities);
        driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));

    }
    @Attributes(attributes = { @Attribute(key = "Platform", value = "Android"),
            @Attribute(key = "key2", value = "value2") }, multiKeyAttributes = { @MultiKeyAttribute(keys = { "k1", "k2" }, value = "v") })

    public static class TestListener implements ITestListener {
        @Override
        public void onTestStart(ITestResult result) {
            LOGGER.info("Test Started: " + result.getName());
        }

        @Override
        public void onTestSuccess(ITestResult result) {
            LOGGER.info("Test Passed: " + result.getName());
        }

        @Override
        public void onTestFailure(ITestResult result) {
            LOGGER.info("Test Failed: " + result.getName());
            captureScreenshot(result.getMethod().getMethodName());
        }

        private void captureScreenshot(String methodName1) {
            LoggingUtils.logBase64(((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64), methodName1);
        }
        }



    @AfterClass
    public void tearDown() {
        if(driver != null) {
            ((AndroidDriver) driver).closeApp();
            driver.quit();
        }
    }
}
package tests;

import com.adak.ir.LoggingUtils;
import com.epam.reportportal.annotations.Step;
import com.epam.reportportal.testng.ReportPortalTestNGListener;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.appium.java_client.AppiumBy;
import org.junit.Assert;
import org.openqa.selenium.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;

import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

import static java.lang.Thread.sleep;


@Listeners({ReportPortalTestNGListener.class})
public class AppiumAndroidTest extends BasePage {
    public static final Logger LOGGER = LoggerFactory.getLogger(AppiumAndroidTest.class);


    @Test
    void easypayment() throws InterruptedException, IOException {

        navigateToSplashPage();
        inputNubmer();

     //   Home();
    }


    @Step
    public void navigateToSplashPage() {


        String elementText = "فارسی";
        By byText = AppiumBy.androidUIAutomator("new UiSelector().text(\"" + elementText + "\")");
        WebElement element = driver.findElement(byText);
        element.click();
        String screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);
        LoggingUtils.logBase64(screenshot, "صفحه معرفی");
        LOGGER.info(" صفحه معرفی");
    }
    @Step
    public void inputNubmer() throws InterruptedException, IOException {

        String baseUrl = "http://192.168.2.112:8090/api/v1/%s";
        String assignBodyTemplate = "{\"operator\": \"%s\", \"simType\": \"%s\", \"appName\": \"%s\"}";
        HttpClient client = HttpClient.newBuilder().build();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(String.format(baseUrl, "assign")))
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(String.format(assignBodyTemplate, "MCI", "CREDIT", "MY_MCI")))
                .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        ObjectMapper objectMapper = new ObjectMapper();
        JsonNode jsonNode = objectMapper.readTree(response.body());
        driver.findElement(By.id("com.sibche.aspardproject.app:id/edit_text")).sendKeys(jsonNode.get("number").asText());
        driver.findElement(By.id("com.sibche.aspardproject.app:id/btn_action")).click();


        request = HttpRequest.newBuilder()
                .uri(URI.create(String.format(baseUrl, "watch?token=" + jsonNode.get("token").asText())))
                .header("Content-Type", "application/json")
                .GET()
                .build();
        response = client.send(request, HttpResponse.BodyHandlers.ofString());
        objectMapper = new ObjectMapper();
        jsonNode = objectMapper.readTree(response.body());
        String code = jsonNode.get("code").asText();
        driver.findElement(By.id("com.sibche.aspardproject.app:id/et_pin_code")).sendKeys(code);
        LOGGER.info("لاگین");



        String screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);
        LoggingUtils.logBase64(screenshot, "تست otp");
        LOGGER.info(" تست otp");
        //  driver.findElement(By.id("com.sibche.aspardproject.app:id/favorites_container")).isDisplayed();
        sleep(500);
        driver.findElement(By.id("com.sibche.aspardproject.app:id/barcode_view")).isEnabled();

        boolean isWizard = false;
        boolean isFavorites = false;

        try {
            isWizard = driver.findElement(By.id("com.sibche.aspardproject.app:id/wizardPositiveBtn")).isDisplayed();
        } catch (NoSuchElementException e) {
            // Element not found
        }

        try {
            isFavorites = driver.findElement(By.id("com.sibche.aspardproject.app:id/favorites_container")).isDisplayed();
        } catch (NoSuchElementException e) {
            // Element not found
        }

        if (isWizard || isFavorites) {
            LOGGER.info("PASS");
        } else {
            LOGGER.error("Test failed");
            Assert.fail("Test failed");

        }
        String screenshot2 = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);
        LoggingUtils.logBase64(screenshot2, "نهایی");
        LOGGER.info(" صفحه نهایی");
    }


}
#include<stdio.h>

int main()
{
    int i,j,k,m,n,p,q,sum;
    printf("Enter Rows and Columns of Matrix 1:");
    scanf("%d%d",&m,&n);
    printf("Enter Rows and Columns of Matrix 2:");
    scanf("%d%d",&p,&q);
    int a[m][n],b[p][q],c[m][q];
    if(n != p){
        printf("Can't Multiply Matrices");
    }
    else{
    printf("Enter Matrix 1:\n");
    for(i=0;i<m;i++){
        for(j=0;j<n;j++){
            scanf("%d",&a[i][j]);
        }
    }
    printf("Enter Matrix 2:\n");
    for(i=0;i<p;i++){
        for(j=0;j<q;j++){
            scanf("%d",&b[i][j]);
        }
    }
    printf("Matrix 1:\n");
    for(i=0;i<m;i++){
        for(j=0;j<n;j++){
            printf("%d\t",a[i][j]);
        }
        printf("\n");
    }
    printf("Matrix 2:\n");
    for(i=0;i<p;i++){
        for(j=0;j<q;j++){
            printf("%d\t",b[i][j]);
        }
        printf("\n");
    }
    for(i=0;i<m;i++){
        for(j=0;j<q;j++){
            sum = 0;
            for(k=0;k<m;k++){
                sum = sum + a[i][k] * b[k][j];
            }
                c[i][j] = sum;
         }
    }
    printf("Matrix 3:\n");
    for(i=0;i<m;i++){
        for(j=0;j<q;j++){
            printf("%d\t",c[i][j]);
        }
        printf("\n");
    }
    }

    return 0;
}
<script is:inline>
    document.getElementById('wf-form-Digital-Wings-Contact-Page-Form').addEventListener('submit', function (event) {
      if (window.grecaptcha.getResponse().length > 0) { return; }
      event.preventDefault();
    });
</script>
"Insert what you want to showe in here" * 10 // change number to whatever many time you want to show something//
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

//Make a new model Use pascal case in naming. Also make the name in singular
//create model > npx prisma format > npx prisma migrate dev

model Issue {
  id          Int      @id @default(autoincrement())
  title       String   @db.VarChar(255)
  description String   @db.Text
  status      Status   @default(OPEN)
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
}

//enum is set of constanst values
enum Status {
  OPEN
  IN_PROGRESS
  CLOSED
}
get-command -Module ISEScriptingGeek
<iframe src="https://sabine725.substack.com/embed" width="480" height="320" style="border:1px solid #EEE; background:white;" frameborder="0" scrolling="no"></iframe>
<?php 
class WP_Skills_MetaBox_MyCustomMetaBox {
  private $screen = array(
	'post',
	'page',
  );

  private $meta_fields = array(
    array(
      'label' => 'My Custom Field',
      'id' => 'my_custom_field',
      'type' => 'text',
      'default' => '',
    )
  );

  public function __construct() {
    add_action('add_meta_boxes', array($this, 'add_meta_boxes'));
    add_action('admin_footer', array($this, 'media_fields'));
    add_action('save_post', array($this, 'save_fields'));
  }

  public function add_meta_boxes() {
    foreach ($this->screen as $single_screen) {
      add_meta_box(
        'MyCustomMetaBox',
        __('My Custom MetaBox', 'text-domain'),
        array($this, 'meta_box_callback'),
        $single_screen,
        'normal',
        'default'
      );
    }
  }

  public function meta_box_callback($post) {
    wp_nonce_field('MyCustomMetaBox_data', 'MyCustomMetaBox_nonce');
    echo 'Lorem ipsum dolor sit amet.';
    $this->field_generator($post);
  }
  public function media_fields() { ?>
    <script>
      jQuery(document).ready(function($) {
        if (typeof wp.media !== 'undefined') {
          var _custom_media = true,
            _orig_send_attachment = wp.media.editor.send.attachment;
          $('.new-media').click(function(e) {
            var send_attachment_bkp = wp.media.editor.send.attachment;
            var button = $(this);
            var id = button.attr('id').replace('_button', '');
            _custom_media = true;
            wp.media.editor.send.attachment = function(props, attachment) {
              if (_custom_media) {
                if ($('input#' + id).data('return') == 'url') {
                  $('input#' + id).val(attachment.url);
                } else {
                  $('input#' + id).val(attachment.id);
                }
                $('div#preview' + id).css('background-image', 'url(' + attachment.url + ')');
              } else {
                return _orig_send_attachment.apply(this, [props, attachment]);
              };
            }
            wp.media.editor.open(button);
            return false;
          });
          $('.add_media').on('click', function() {
            _custom_media = false;
          });
          $('.remove-media').on('click', function() {
            var parent = $(this).parents('td');
            parent.find('input[type="text"]').val('');
            parent.find('div').css('background-image', 'url()');
          });
        }
      });
    </script>
  <?php 
  }

  public function field_generator($post) {
    $output = '';
    foreach ($this->meta_fields as $meta_field) {
      $label = '<label for="' . $meta_field['id'] . '">' . $meta_field['label'] . '</label>';
      $meta_value = get_post_meta($post->ID, $meta_field['id'], true);
      if (empty($meta_value)) {
        if (isset($meta_field['default'])) {
          $meta_value = $meta_field['default'];
        }
      }
      switch ($meta_field['type']) {

        default:
          $input = sprintf(
            '<input %s id="%s" name="%s" type="%s" value="%s">',
            $meta_field['type'] !== 'color' ? 'style="width: 100%"' : '',
            $meta_field['id'],
            $meta_field['id'],
            $meta_field['type'],
            $meta_value
          );
      }
      $output .= $this->format_rows($label, $input);
    }
    echo '<table class="form-table"><tbody>' . $output . '</tbody></table>';
  }

  public function format_rows($label, $input) {
    return '<tr><th>' . $label . '</th><td>' . $input . '</td></tr>';
  }

  public function save_fields($post_id) {
    if (!isset($_POST['mycustommetabox_nonce']))
      return $post_id;
    $nonce = $_POST['mycustommetabox_nonce'];
    if (!wp_verify_nonce($nonce, 'mycustommetabox_data'))
      return $post_id;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
      return $post_id;
    foreach ($this->meta_fields as $meta_field) {
      if (isset($_POST[$meta_field['id']])) {
        switch ($meta_field['type']) {
          case 'email':
            $_POST[$meta_field['id']] = sanitize_email($_POST[$meta_field['id']]);
            break;
          case 'text':
            $_POST[$meta_field['id']] = sanitize_text_field($_POST[$meta_field['id']]);
            break;
        }
        update_post_meta($post_id, $meta_field['id'], $_POST[$meta_field['id']]);
      } else if ($meta_field['type'] === 'checkbox') {
        update_post_meta($post_id, $meta_field['id'], '0');
      }
    }
  }
}

if (class_exists('WP_Skills_MetaBox_MyCustomMetaBox')) {
  new WP_Skills_MetaBox_MyCustomMetaBox;
};
#include<stdio.h>

int main()
{
    int a[3][3],b[3][3],c[3][3];
    int i,j;
    printf("Enter Matrix 1:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            scanf("%d",&a[i][j]);
        }
    }
    printf("Enter Matrix 2:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            scanf("%d",&b[i][j]);
        }
    }
    printf("Matrix 1:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            printf("%d\t",a[i][j]);
        }
        printf("\n");
    }
    printf("Matrix 2:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            printf("%d\t",b[i][j]);
        }
        printf("\n");
    }
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            c[i][j] = a[i][j] + b [i][j];
        }
    }
    printf("Matrix 3:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            printf("%d\t",c[i][j]);
        }
        printf("\n");
    }
    return 0;
}
#include<stdio.h>

int main()
{
    int arr[3][3];
    int i,j,sr,sc;
    printf("Enter Matrix:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            scanf("%d",&arr[i][j]);
        }
    }
    printf("Matrix is:\n");
    for(i=0;i<3;i++){
        for(j=0;j<3;j++){
            printf("%d\t",arr[i][j]);
        }
        printf("\n");
    }
    for(i=0;i<3;i++){
        sr = 0;
        sc = 0;
        for(j=0;j<3;j++){
        sr = sr + arr[i][j];
        sc = sc + arr[j][i];
        }
        printf("The Sum of Row is:-----%d\n",sr);
        printf("The Sum of Coloumn is:-%d\n",sc);
    }
    return 0;
}
Question: 
Write a C program to create a binary tree as shown in bellow, with the following elements: 50, 17, 72, 12, 23, 54, 76, 9, 14, 25 and 67. After creating the tree, perform an in-order traversal to display the elements. 

Answer:

#include <stdio.h>
#include <stdlib.h>

struct Node 
{
    int data;
    struct Node* left;
    struct Node* right;
};

struct Node* createNode(int value)
{
    struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
    newNode -> data = value;
    newNode -> left = NULL;
    newNode -> right = NULL;
    
    return newNode;
}
void inOrderTraversal(struct Node* root)
{
    if(root!=NULL) {
        inOrderTraversal(root -> left);
        printf("%d ", root -> data);
        inOrderTraversal(root -> right);
    }
}

int main() {
   struct Node* root = createNode(50);
   root -> left = createNode(17);
   root -> right = createNode(72);
   
   root -> left -> left = createNode(12);
   root -> left -> right = createNode(23);
   
   root -> left -> left -> left = createNode(9);
   root -> left -> left -> right = createNode(14);
   
   root -> left -> right -> right = createNode(25);
   
   root -> right -> left = createNode(54);
   root -> right -> right = createNode(76);
   root -> right -> left -> right = createNode(67);
   inOrderTraversal(root);

    return 0;
}

//OUTPUT:

In-Order Traversal: 
9 12 14 17 23 25 50 54 67 72 76 
/** @type {import('next').NextConfig} */

const isProd = process.env.NODE_ENV === 'production';
const nextConfig = {
  basePath: isProd ? '/Deploy-a-Next.js-App-to-GitHub-Pages': '',
  output: 'export',
  distDir: 'dist',
  images: {
    unoptimized: true,
  },
}
module.exports = nextConfig
#include <bits/stdc++.h>
using namespace std;

// tree node is defined
class TreeNode {
public:
    int val;
    TreeNode* left;
    TreeNode* right;
    TreeNode(int data)
    {
        val = data;
        left = NULL;
        right = NULL;
    }
};

// inorder traversal to check if the given 
// sorted subsequence exists in the BST
void DoesSeqExistRec(TreeNode* root, vector<int> sequence, int& index)
{
    //base case
    if (!root)
        return;

    // traverse left subtree first as it's inorder traversal
    DoesSeqExistRec(root->left, sequence, index);

    // If current node matches with current sequence 
    // element(sequence[index]) then move
    // to the next element in the sequenece
    if (root->val == sequence[index])
        index++;

    // traverse right subtree
    DoesSeqExistRec(root->right, sequence, index);
}

// function to check whether the sequence exists or not
bool DoesSeqExist(TreeNode* root, vector<int> sequence)
{

    int index = 0;

    // recursive function to check if all elements 
    // of the sequence are in the BST or not
    DoesSeqExistRec(root, sequence, index);

    //if after the inorder traversal as we have discussed, 
    //index reaches towards the end
    //then the BST contains the sequence other wise not
    if (index == sequence.size())
        return true;
    else
        return false;
}

int main()
{
    TreeNode* root = new TreeNode(16);
    
    root->left = new TreeNode(3);
    root->left->right = new TreeNode(13);
    root->left->right->left = new TreeNode(10);
    root->left->right->left->left = new TreeNode(7);
    root->right = new TreeNode(20);
    root->right->left = new TreeNode(18);

    vector<int> sequence1{ 7, 13, 18, 20 };

    if (DoesSeqExist(root, sequence1))
        cout << "Yes the sequence exists in the binary search tree\n";
    else
        cout << "No, the sequence exists in the binary search tree";

    vector<int> sequence2{ 7, 13, 14, 20 };

    if (DoesSeqExist(root, sequence2))
        cout << "Yes the sequence exists in the binary search tree\n";
    else
        cout << "No, the sequence doesn't exist in the binary search tree";

    return 0;
}
#include<stdio.h>

int main()
{
    int n=6,i,j,temp,flag;
    int arr[n] = {60,34,76,23,89,29};
    for(i=0;i<n-1;i++){
        flag = 0;
        for(j=0;j<n-1;j++){
            if(arr[j]>arr[j+1]){
                temp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = temp;
                flag = 1;
            }
        }
        if(flag==0){
            break;
        }
    }
    for(i=0;i<n;i++){
        printf("%d ",arr[i]);
    }
    return 0;
}
Function ExcelToCsv ($File) {
    $Excel = New-Object -ComObject Excel.Application
    $wb = $Excel.Workbooks.Open($File)

    $x = $File | Select-Object Directory, BaseName
    $n = [System.IO.Path]::Combine($x.Directory, (($x.BaseName, 'csv') -join "."))

    foreach ($ws in $wb.Worksheets) {
        $ws.SaveAs($n, 6)
    }
    $Excel.Quit()
}

Get-ChildItem C:\Junk\*.xlsx |
    ForEach-Object{
        ExcelToCsv -File $_
    }
#include<stdio.h>

int main()
{
    int arr[8],i,flag=0,n;
    printf("Enter 8 Elements of array:\n");
    for(i=0;i<8;i++){
        printf("arr[%d] = ",i);
        scanf("%d",&arr[i]);
    }
    printf("Enter the element to search in array:");
    scanf("%d",&n);
    for(i=0;i<8;i++){
        if(arr[i] == n){
            flag = 1;
            break;
        }
        else{
            flag = 0;
        }
    }
    if(flag==1){
        printf("The element is found at location : %d",i);
    }
    else{
        printf("Element not found");
    }
    return 0;
}
Calendar = 
  
VAR CalTable = CALENDARAUTO ()
VAR MyCal =
    ADDCOLUMNS (
        CalTable,
        "Index", MONTH ( [Date] ),
        "Month", FORMAT ( [Date], "mmm" ),
        "Qtr", FORMAT ( [Date], "\QQ" ),
        "Year", FORMAT ( [Date], "yyyy" )
    )
RETURN
    MyCal
document.onreadystatechange = function () {
  if (document.readyState === "complete") {
    // Here fire whatever you want when all rendered
  }
}
<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<article>
<articleinfo>
  <title>OLS Tutorial</title>
</articleinfo>

<sect1>
<title>Introduction</title>
<para>This is a paragraph.
</para>

<para>This is <emphasis>emphasized</emphasis> text. This is
<emphasis role="strong">strongly emphasized</emphasis> text.
</para>
<note>
<para>This is not a very <emphasis>brilliant</emphasis> document!</para>
</note>
<para>some text  DocBook stylesheets are in
<filename>/usr/share/sgml/docbook/docbook-xsl-1.51.1</filename>
</para>

<para>Use <indexterm><primary>xsltproc</primary><secondary>XSLT
processing</secondary></indexterm><footnote><para>Don't volunteer to show
indexing if you don't work with it regularly.</para></footnote>
<command>xsltproc</command> to process your files.  See the 
<link linkend="installation">Installation section</link> for more info.
</para>

<para>Use <command>xsltproc</command> to process your files.  See
<xref linkend="installation"/> for more info.
</para>

<warning>
<para>Don't use the 802.11 network while presenting!</para>
</warning>

<para>SOme more text.
</para>

<example>
  <title>My example</title>
  <programlisting>
    print "Hello, my &amp; world!"
  </programlisting>
</example>

<para>This is a paragraph.
</para>
   <itemizedlist>
   <listitem>
   <para>This is my first item
   </para>

      <itemizedlist>
      <listitem>
      <para>item a
      </para>
      </listitem>
      <listitem>
      <para>item b
      </para>
      </listitem>
      </itemizedlist>

   </listitem>
   <listitem> <para>This is my second item.  </para>
   <para>This is another paragraph.
   </para></listitem>
   
   <listitem>
   <para>
   </para>
   </listitem>
   </itemizedlist>
<sect2 >
<title>Purpose</title>
<para>There is little purpose to this document.
</para>
</sect2>

<sect2 os="windows;mac">
<title>Scope</title>
<para>The scope of this document is a intro to DocBook.
</para>
</sect2>
</sect1>

<sect1 id="installation"> 
<title>Installation</title>
<para>This is another paragraph. Here is an XML file:
</para>

<para os="windows">On Windows, you install this .EXE.
</para>
<para os="mac">On the Mac, you double-click some icon.
</para>
<para os="linux">On Linux, you install this RPM.
</para>

<para category="general">Download <command>xsltproc</command> from
<ulink url="ftp://xmlsoft.org/">xmlsoft.org</ulink>. You need both
<filename>libxml2</filename> and <filename>libxslt</filename>
</para>

<para id="foo" category="expert"><indexterm><primary>foo</primary></indexterm>
This section talks about installation
</para>

<programlisting>

<![CDATA[ <?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd">

<article>
<articleinfo>
<title>My First DocBook Article</title>
</articleinfo>

<sect1 id="installation">
<title>Installation</title>
<para>To install DocBook, you do the following...
</para>
<para >On Windows, you install this .EXE.
</para>
<para >On Linux, you install this RPM.
</para>
</sect1>
</article>
]]>   
</programlisting>
</sect1>

<sect1 id="troubleshooting" os="linux" >
<title>Troubleshooting</title>
<para><indexterm><primary>troubleshooting</primary></indexterm>this is some text on troubleshooting
</para>
<para ><indexterm><primary>foo</primary></indexterm>
This section talks about installation
</para>

</sect1>

<index/>

</article>
#include<stdio.h>

int main()
{
    int n=6,i,j,temp;
    int arr[n] = {77,42,35,12,101,5};

    for(i=0;i<n-1;i++){
        for(j=0;j<n-1;j++){
            if(arr[j] > arr[j+1]){
                temp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = temp;
            }
        }
    }
    for(i=0;i<n;i++){
        printf("%d ",arr[i]);
    }


    return 0;
}
# Initialize the smallest_input with a large value
smallest_input = float('inf')

# Use a while loop to get user input until 0 is entered
while True:
    user_input = float(input("Enter a value (enter 0 to finish): "))
    
    # Check if the user wants to finish
    if user_input == 0:
        break
    
    # Compare with the current smallest_input
    if user_input < smallest_input:
        smallest_input = user_input

# Display the result
print("The smallest input is:", smallest_input)
.item:after {
    content: ' ';
    border-left: 1px solid var(--color-border);
    position: absolute;
    left: 0;
    top: calc(50% + 25px);
    height: calc(50% - 25px);
  }
<script>
import moment from "moment";
export default {
  name: "TheFooter",
  computed: {
    year() {
      return moment().year();
    }
  }
}
</script>
- Random variables
- Probability distribution functions (PDFs)
- Mean, Variance, Standard Deviation
- Covariance and Correlation 
- Bayes Theorem
- Linear Regression and Ordinary Least Squares (OLS)
- Gauss-Markov Theorem
- Parameter properties (Bias, Consistency, Efficiency)
- Confidence intervals
- Hypothesis testing
- Statistical significance 
- Type I & Type II Errors
- Statistical tests (Student's t-test, F-test)
- p-value and its limitations
- Inferential Statistics 
- Central Limit Theorem & Law of Large Numbers
- Dimensionality reduction techniques (PCA, FA)
WazirX clone script is a software solution replicating the features and functionalities of the WazirX cryptocurrency exchange platform. It enables the creation of a similar platform for buying, selling, and trading cryptocurrencies. Beleaf Technologies, a pioneer in providing WazirX clone script services, offers a bespoke solution to launch your cryptocurrency platform. Dive into the future of digital assets with our expertly crafted and customizable script, ensuring a stellar trading experience for your users.

To Contact
Telegram: https://t.me/BeleafTech                      
Whatsapp: +91 80567 86622
Skype: live:.cid.62ff8496d3390349
Mail to: business@beleaftechnologies.com
${true ? "this part run when true" : "this part run when false" }
$files = Get-ChildItem -Path "C:\Folder\*.txt"
$output = @()
foreach ($file in $files) {
    $output += Get-Content -Path $file.FullName
}
Set-Content -Path "C:\Folder\output.txt" -Value $output
/*
 * script to export data in all sheets in the current spreadsheet as individual csv files
 * files will be named according to the name of the sheet
 * author: Michael Derazon
*/

function onOpen() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
  ss.addMenu("csv", csvMenuEntries);
};

function saveAsCSV() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheets = ss.getSheets();
  // create a folder from the name of the spreadsheet
  var folder = DriveApp.createFolder(ss.getName().toLowerCase().replace(/ /g,'_') + '_csv_' + new Date().getTime());
  for (var i = 0 ; i < sheets.length ; i++) {
    var sheet = sheets[i];
    // append ".csv" extension to the sheet name
    fileName = sheet.getName() + ".csv";
    // convert all available sheet data to csv format
    var csvFile = convertRangeToCsvFile_(fileName, sheet);
    // create a file in the Docs List with the given name and the csv data
    folder.createFile(fileName, csvFile);
  }
  Browser.msgBox('Files are waiting in a folder named ' + folder.getName());
}

function convertRangeToCsvFile_(csvFileName, sheet) {
  // get available data range in the spreadsheet
  var activeRange = sheet.getDataRange();
  try {
    var data = activeRange.getValues();
    var csvFile = undefined;

    // loop through the data in the range and build a string with the csv data
    if (data.length > 1) {
      var csv = "";
      for (var row = 0; row < data.length; row++) {
        for (var col = 0; col < data[row].length; col++) {
          if (data[row][col].toString().indexOf(",") != -1) {
            data[row][col] = "\"" + data[row][col] + "\"";
          }
        }

        // join each row's columns
        // add a carriage return to end of each row, except for the last one
        if (row < data.length-1) {
          csv += data[row].join(",") + "\r\n";
        }
        else {
          csv += data[row];
        }
      }
      csvFile = csv;
    }
    return csvFile;
  }
  catch(err) {
    Logger.log(err);
    Browser.msgBox(err);
  }
}
star

Mon Dec 11 2023 13:02:16 GMT+0000 (Coordinated Universal Time)

@mubashir_aziz

star

Mon Dec 11 2023 13:00:47 GMT+0000 (Coordinated Universal Time) https://www.wpbeginner.com/wp-themes/how-to-add-page-slug-in-body-class-of-your-wordpress-themes/

@mubashir_aziz

star

Mon Dec 11 2023 12:58:00 GMT+0000 (Coordinated Universal Time)

@mubashir_aziz

star

Mon Dec 11 2023 12:57:40 GMT+0000 (Coordinated Universal Time) https://technoderivation.com/fintech-software-development

@prbhakar #fintechdevelopment #softwareengineering #softwaredevelopment #digitaltransformation #usa #us #uk #2024 #2023 #future #technology #webdevelopment

star

Mon Dec 11 2023 12:55:42 GMT+0000 (Coordinated Universal Time)

@mubashir_aziz

star

Mon Dec 11 2023 12:39:37 GMT+0000 (Coordinated Universal Time)

@mubashir_aziz

star

Mon Dec 11 2023 11:34:22 GMT+0000 (Coordinated Universal Time) https://github.com/codigofacilito/python-concurrente/tree/master

@razek

star

Mon Dec 11 2023 11:33:30 GMT+0000 (Coordinated Universal Time) https://github.com/AlexxIT/go2rtc/wiki/Tunnel-RTSP-camera-to-Intenet

@razek

star

Mon Dec 11 2023 07:09:53 GMT+0000 (Coordinated Universal Time)

@manhmd

star

Mon Dec 11 2023 05:19:01 GMT+0000 (Coordinated Universal Time) https://medium.com/@tubelwj/time-series-forecasting-with-lightgbm-and-prophet-62caca1a926d

@nurdlalila306

star

Mon Dec 11 2023 04:15:34 GMT+0000 (Coordinated Universal Time) https://bskyvision.com/entry/css-스크롤-기능은-작동하지만-스크롤바는-안-보이게-하기

@wheedo #css

star

Mon Dec 11 2023 00:36:21 GMT+0000 (Coordinated Universal Time) undefined

@Deas

star

Sun Dec 10 2023 13:19:20 GMT+0000 (Coordinated Universal Time)

@odesign

star

Sun Dec 10 2023 12:34:37 GMT+0000 (Coordinated Universal Time) https://ayedot.com/6231/MiniBlog/Day-1--Christmas-Cookies--Typehero-Advent-of-TypeScript-Challenge-

@gabe_331 #typescript

star

Sun Dec 10 2023 12:32:56 GMT+0000 (Coordinated Universal Time) https://ayedot.com/6239/MiniBlog/Day-8--Filtering-The-Children-part-3--Typehero-Advent-of-TypeScript-Challenge-

@gabe_331

star

Sun Dec 10 2023 10:56:14 GMT+0000 (Coordinated Universal Time)

@omnixima #css

star

Sun Dec 10 2023 10:13:12 GMT+0000 (Coordinated Universal Time)

@mehran

star

Sun Dec 10 2023 10:12:40 GMT+0000 (Coordinated Universal Time)

@mehran

star

Sun Dec 10 2023 09:24:37 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sun Dec 10 2023 08:38:04 GMT+0000 (Coordinated Universal Time) https://answers.netlify.com/t/know-if-recaptcha-v2-was-checked-or-not/41271/14

@Kiwifruit #forms #recaptcha #captcha

star

Sun Dec 10 2023 06:56:21 GMT+0000 (Coordinated Universal Time)

@SabsZinn123

star

Sun Dec 10 2023 04:54:59 GMT+0000 (Coordinated Universal Time)

@Jeremicah

star

Sun Dec 10 2023 01:23:36 GMT+0000 (Coordinated Universal Time) https://jdhitsolutions.com/blog/powershell/4169/friday-fun-updated-ise-scripting-geek-module/

@baamn #powershell

star

Sun Dec 10 2023 00:19:56 GMT+0000 (Coordinated Universal Time) https://sabine725.substack.com/publish/settings

@sabinesmith

star

Sun Dec 10 2023 00:02:44 GMT+0000 (Coordinated Universal Time) https://wp-skills.com/tools/meta-box-generator

@dmsearnbit

star

Sat Dec 09 2023 21:08:57 GMT+0000 (Coordinated Universal Time) https://www.thiscodeworks.com/extension/initializing?newuser

@Joshuapower297

star

Sat Dec 09 2023 20:28:27 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 20:15:34 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 20:10:19 GMT+0000 (Coordinated Universal Time)

@Mohamedshariif #java

star

Sat Dec 09 2023 18:41:06 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v=mJuz45RXeXY

@devbymohsin

star

Sat Dec 09 2023 17:44:36 GMT+0000 (Coordinated Universal Time) https://www.includehelp.com/data-structure-tutorial/check-if-given-sorted-subsequence-exits-in-the-binary-search-tree-or-not.aspx

@AtulPatil

star

Sat Dec 09 2023 17:22:39 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 16:47:49 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/en-us/answers/questions/597931/convert-xlsx-to-csv-using-powershell

@baamn #powershell

star

Sat Dec 09 2023 15:37:33 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 15:23:14 GMT+0000 (Coordinated Universal Time)

@marcopinero #javascript

star

Sat Dec 09 2023 14:59:34 GMT+0000 (Coordinated Universal Time) https://www.cellml.org/Members/stevens/docs/sample.xml/view

@johnyjohny_

star

Sat Dec 09 2023 14:29:46 GMT+0000 (Coordinated Universal Time)

@abdul_rehman #c

star

Sat Dec 09 2023 13:28:05 GMT+0000 (Coordinated Universal Time)

@msaadshahid

star

Sat Dec 09 2023 12:58:01 GMT+0000 (Coordinated Universal Time) https://www.addustechnologies.com/defi-development-company

@jonathandaveiam #defi #decentralizedfinance

star

Sat Dec 09 2023 11:03:08 GMT+0000 (Coordinated Universal Time) https://github.com/passavlasso/log-bee-front

@robota1989

star

Sat Dec 09 2023 11:01:40 GMT+0000 (Coordinated Universal Time) https://github.com/passavlasso/log-bee-front

@robota1989

star

Sat Dec 09 2023 09:37:38 GMT+0000 (Coordinated Universal Time) https://medium.com/lunartechai/fundamentals-of-statistics-for-data-scientists-and-data-analysts-69d93a05aae7

@miskat80

star

Sat Dec 09 2023 09:37:02 GMT+0000 (Coordinated Universal Time) https://www.beleaftechnologies.com/wazirx-clone-script-development

@Gracesparkle

star

Sat Dec 09 2023 08:42:44 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v

@devbymohsin #javascript #basicjs

star

Sat Dec 09 2023 07:01:14 GMT+0000 (Coordinated Universal Time)

@devbymohsin #javascript #basicjs

star

Sat Dec 09 2023 06:08:50 GMT+0000 (Coordinated Universal Time) https://ezcode.tistory.com/48

@wheedo #mysq

star

Sat Dec 09 2023 05:07:33 GMT+0000 (Coordinated Universal Time) https://ubuntu.com/server/docs/security-users

@neuromancer

star

Sat Dec 09 2023 00:04:06 GMT+0000 (Coordinated Universal Time) https://www.google.com/search?q

@baamn

star

Fri Dec 08 2023 21:37:44 GMT+0000 (Coordinated Universal Time) https://www.drzon.net/posts/export-all-google-sheets-to-csv/

@baamn ##google #apps #script

Save snippets that work with our extensions

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