Snippets Collections
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":x-connect: Boost Days - What's on this week! :x-connect:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Happy Monday Singapore! We're excited to kickstart another great week in the office with our new Boost Day Program :zap: Please see below for what's coming up! "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-26: Monday, 17th Mar",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Café-style beverages with *Group Therapy Coffee*\n:breakfast: *Breakfast*: Provided by *Group Therapy Café* from *8:30AM - 10:30AM* in the Kitchen."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-31: Wednesday, 19th Mar",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Café-style beverages with *Group Therapy Coffee*\n:breakfast: *Lunch*: Provided by *Group Therapy Café* from *12PM - 1PM* in the Kitchen.\n:wine_glass: *Social Happy Hour*: Gather for drinks, light snacks and great connections with each other from *4PM to 5:30PM* in the Kitchen!"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=Y19lZTA1MmE0NWUxMzQ1OTQ0ZDRjOTk2M2IyNjA4MGMxMmIwMGQ1YzExMDQ4NzBjMjRmZmJhODk0MGEwYjQ4ZDllQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|*Singapore Social Calendar*>, and get ready to Boost your workdays!\n\nLove,\nWX Team :party-wx:"
			}
		}
	]
}
#include <bits/stdc++.h>
#include <iostream>
#include <utility>
#include <vector>
#include <queue>
#include <limits>
using namespace std;

void D(int N, vector<pair<int,int>> adj[N]; int source){
    vector<int> dist(V,1000000);
    dist[source] = 0;
    priority_queue<pair<int,int>, vector<pair<int,int>> , greater<pair<int,int>>> pq;
    pq.push({0,source});
    
    while(pq.empty() != 0) {
        int u = pq.top().second;
        int d = pq.top().first;
        pq.pop();
        
        for(int i = 0; i < adj[u].size(); i++){
            int v = adj[u][i].first;
            int weight = adj[u][i].second;
            
            if(dist[adj[u][i].first] > pq.top().first + adj[u][i].second){
                dist[adj[u][i].first] = pq.top().first + adj[u][i].second;
                pq.push({dist[adj[u][i].first], adj[u][i].first});
            }
    }
}


int main(){
    int N,M; //số đỉnh, cạnh
    cin >> N >> M;
    
    vector<pair<int,int>> adj;
    for (int i = 0; i < M; i++) {
        int a, b, c;
        cin >> a >> b >> c;
        adj[a].push_back({b,c}); // Nếu đồ thị là vô hướng
        adj[b].push_back({a,c});
    }
    
    int source;
    cin >> source;
    D(N, adj, source);
    return 0;
    
}
# This IPython Notebook magic writes the content of the cell to a specified .py 
# file before executing it. An identifier can be used when writing to the file,
# thus making it possible to overwrite previous iterations of the same code block.
# The use case for this extension is to export selected code from a Notebook for 
# reuse through a .py file.

%install_ext https://raw.githubusercontent.com/minrk/ipython_extensions/master/extensions/writeandexecute.py


# Then load it with

%load_ext writeandexecute

jupyter nbextension install https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/gist.js
jupyter nbextension enable gist
#include <stdio.h>

int main() {
    int n, m;
    
    // Input size of the first array (Tech Wizards)
    scanf("%d", &n);
    int arr1[n];
    for (int i = 0; i < n; ++i) {
        scanf("%d", &arr1[i]);
    }
    
    // Input size of the second array (Creative Minds)
    scanf("%d", &m);
    int arr2[m];
    for (int i = 0; i < m; ++i) {
        scanf("%d", &arr2[i]);
    }
    
    // Merge and find unique member IDs
    int merged[n + m]; // Maximum possible size
    int i = 0, j = 0, k = 0;
    
    while (i < n && j < m) {
        if (arr1[i] < arr2[j]) {
            merged[k++] = arr1[i++];
        } else if (arr1[i] > arr2[j]) {
            merged[k++] = arr2[j++];
        } else { // arr1[i] == arr2[j]
            merged[k++] = arr1[i++];
            j++;
        }
    }
    
    // Copy remaining elements from arr1 (if any)
    while (i < n) {
        merged[k++] = arr1[i++];
    }
    
    // Copy remaining elements from arr2 (if any)
    while (j < m) {
        merged[k++] = arr2[j++];
    }
    
    // Output the merged and unique member IDs
    for (int idx = 0; idx < k; ++idx) {
        if (idx == 0 || merged[idx] != merged[idx - 1]) {
            printf("%d ", merged[idx]);
        }
    }
    printf("\n");

    return 0;
}
#include <stdio.h>

int main() {
    int n, m;
    
    // Input number of math scores and the scores themselves
    scanf("%d", &n);
    int mathScores[n];
    for (int i = 0; i < n; ++i) {
        scanf("%d", &mathScores[i]);
    }
    
    // Input number of science scores and the scores themselves
    scanf("%d", &m);
    int scienceScores[m];
    for (int i = 0; i < m; ++i) {
        scanf("%d", &scienceScores[i]);
    }
    
    // Find the maximum score in both arrays
    int maxScore = mathScores[0];
    
    for (int i = 0; i < n; ++i) {
        if (mathScores[i] > maxScore) {
            maxScore = mathScores[i];
        }
    }
    
    for (int i = 0; i < m; ++i) {
        if (scienceScores[i] > maxScore) {
            maxScore = scienceScores[i];
        }
    }
    
    // Output the maximum score found
    printf("%d\n", maxScore);

    return 0;
}
#include <stdio.h>

int main() {
    int n, m;
    
    // Input size of the first array
    scanf("%d", &n);
    
    // Input elements of the first array
    int arr1[n];
    for (int i = 0; i < n; i++) {
        scanf("%d", &arr1[i]);
    }
    
    // Input size of the second array
    scanf("%d", &m);
    
    // Input elements of the second array
    int arr2[m];
    for (int i = 0; i < m; i++) {
        scanf("%d", &arr2[i]);
    }
    
    // Determine the size of the merged array
    int merged_size = (n > m) ? n : m; // Choose the maximum size
    
    // Initialize the merged array and add elements from both arrays
    int merged[merged_size];
    for (int i = 0; i < merged_size; i++) {
        int sum = 0;
        if (i < n) {
            sum += arr1[i];
        }
        if (i < m) {
            sum += arr2[i];
        }
        merged[i] = sum;
    }
    
    // Output the merged array in reverse order
    for (int i = merged_size - 1; i >= 0; i--) {
        printf("%d ", merged[i]);
    }
    printf("\n");

    return 0;
}
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main() {
    int n;
    char words[15][101]; // Array to store up to 15 words of max length 100 characters
    char letter;
    int count = 0;

    scanf("%d", &n);

    // Input each word into the array
    for (int i = 0; i < n; ++i) {
        scanf("%s", words[i]);
    }

    // Input the letter to check
    scanf(" %c", &letter);

    // Convert letter to lowercase (if it's uppercase)
    letter = tolower(letter);

    // Count words that start with the specified letter
    for (int i = 0; i < n; ++i) {
        if (words[i][0] == letter) {
            count++;
        }
    }
    
    printf("%d\n", count);
    return 0;
}
public function model()
    {
        return UserConnectedEmail::class;
    }
    // Repository interface methods here
    public function create(array $data): UserConnectedEmail{

        return $this->model->create($data);
    }

    public function bulkInsert(array $data): bool
    {
        return $this->model->insert($data);
    }

    public function createOrUpdateWithWhereCondition(array $where, array $params): object
    {
        return $this->model->updateOrCreate($where, $params);
    }

    public function getAllDataByWhereCondition(array $where, Array $columns = ['*']): Collection{

        return $this->model->select($columns)->where($where)->get();
    }

    public function getSingleDataByWhereCondition(array $where, array $columns = ['*']): ?object
    {
        return $this->model->select($columns)->where($where)->first();

    }

    public function deleteByQuery(array $where): bool
    {
        return $this->model->where($where)->delete();
    }

    public function bulkDelete(array $ids): bool
    {
        return $this->model->whereIn('id',$ids)->delete();
    }

    public function updateByWhereCondition(array $where, array $params): bool
    {
        return $this->model->where($where)->update($params);
    }

    public function getDataWithWhereIn(array $where, string $whereInColumn, array $whereInData, array $columns = ['*']): Collection{

        return $this->model->where($where)->whereIn( $whereInColumn , $whereInData)->select($columns)->get();
    }

    public function getDataByPagination(array $where, int $skip, int $limit, string $orderByColumn = 'id', string $order = 'desc', array $columns = ['*']): ?object
    {
        return $this->model->where($where)->select($columns)->skip($skip)->limit($limit)->orderBy($orderByColumn, $order)->get();
    }

    public function getCountByWhereCondition(array $where): int
    {
        return $this->model->where($where)->count();
    }
<div>Teachable Machine Image Model</div>
<button type="button" onclick="init()">Start</button>
<div id="webcam-container"></div>
<div id="label-container"></div>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest/dist/tf.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@teachablemachine/image@latest/dist/teachablemachine-image.min.js"></script>
<script type="text/javascript">
    // More API functions here:
    // https://github.com/googlecreativelab/teachablemachine-community/tree/master/libraries/image

    // the link to your model provided by Teachable Machine export panel
    const URL = "{{URL}}";

    let model, webcam, labelContainer, maxPredictions;

    // Load the image model and setup the webcam
    async function init() {
        const modelURL = URL + "model.json";
        const metadataURL = URL + "metadata.json";

        // load the model and metadata
        // Refer to tmImage.loadFromFiles() in the API to support files from a file picker
        // or files from your local hard drive
        // Note: the pose library adds "tmImage" object to your window (window.tmImage)
        model = await tmImage.load(modelURL, metadataURL);
        maxPredictions = model.getTotalClasses();

        // Convenience function to setup a webcam
        const flip = true; // whether to flip the webcam
        webcam = new tmImage.Webcam(200, 200, flip); // width, height, flip
        await webcam.setup(); // request access to the webcam
        await webcam.play();
        window.requestAnimationFrame(loop);

        // append elements to the DOM
        document.getElementById("webcam-container").appendChild(webcam.canvas);
        labelContainer = document.getElementById("label-container");
        for (let i = 0; i < maxPredictions; i++) { // and class labels
            labelContainer.appendChild(document.createElement("div"));
        }
    }

    async function loop() {
        webcam.update(); // update the webcam frame
        await predict();
        window.requestAnimationFrame(loop);
    }

    // run the webcam image through the image model
    async function predict() {
        // predict can take in an image, video or canvas html element
        const prediction = await model.predict(webcam.canvas);
        for (let i = 0; i < maxPredictions; i++) {
            const classPrediction =
                prediction[i].className + ": " + prediction[i].probability.toFixed(2);
            labelContainer.childNodes[i].innerHTML = classPrediction;
        }
    }
</script>
<!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>
paylink.cancelInvoice(
  transactionNo: '1713690519134'
)
.then((_) {
  /// Handle success response
})
.onError((error, stackTrace) {
  /// Handle error response
});
<?php
	include('system_load.php');
	//This loads system.
	
	authenticate_user('subscriber');
?>		

1.HTML - blockquote tag and q tag

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Traditional Fair Poster</title>
</head>
<body>
    <h2>Wedding Event</h2>
    <p>A wedding is a ceremony where two people or a couple are united in marriage. Wedding traditions and customs vary greatly between cultures, ethnic groups, religions, countries, and social classes. Most wedding ceremonies involve an exchange of marriage vows by the couple, presentation of a gift, and a public proclamation of marriage by an authority figure or celebrant. Special wedding garments are often worn, and the ceremony is sometimes followed by a wedding reception. Music, poetry, prayers or readings from religious texts or literature are also commonly incorporated into the ceremony.</p>

    <blockquote cite="https://www.brainyquote.com/quotes/sheri_l_dew_679111">
        <q>Neither man nor woman is perfect or complete without the other. Thus, no marriage or family, no ward or stake is likely to reach its full potential until husbands and wives, mothers and fathers, men and women work together in unity of purpose, respecting and relying upon each other's strengths.</q>
    </blockquote>
</body>
</html>



2. HTML Basics - Formatted tags-Olympics


<html>
    <head>
        <title>My First Website</title>
    </head>
    <body>
      <h1>Olympic Games</h1>

The modern <b>Olympic Games</b> or <b>Olympics</b> are leading international sporting events featuring summer and winter sports competitions in which thousands of <i>athletes</i> from around the world participate in a variety of competitions. The Olympic Games are considered the world's foremost sports competition with more than <i>200 nations</i> participating. The Olympic Games are normally held every <u>four years</u>, alternating between the <u>Summer</u> and <u>Winter Olympics</u> every two years in the four-year period.
Their creation was inspired by the <ins>ancient Olympic Games</ins>, held in Olympia, Greece from the 8th century BC to the 4th century AD. <mark>Baron Pierre de Coubertin</mark> founded the <ins>International Olympic Committee</ins> (IOC) in 1894, leading to the first modern Games in Athens in 1896. The IOC is the governing body of the Olympic Movement, with the Olympic Charter defining its <small>structure and authority</small>.
The evolution of the Olympic Movement during the 20<sup>th</sup> and 21<sup>st</sup> centuries has resulted in several changes to the Olympic Games. Some of these adjustments include the creation of the Winter Olympic Games for snow and ice sports, the Paralympic Games for athletes with disabilities, the Youth Olympic Games for athletes aged <sub>14 to 18</sub>, the five Continental games <big>(Pan American, African, Asian, European, and Pacific)</big>, and the World Games for sports that are not contested in the Olympic Games. The IOC also endorses the <strike>Deaflympics and the Special Olympics</strike>. The IOC has needed to adapt to a variety of <del>economic, political, and technological</del> advancements.
<tt>The Olympic Movement consists of international sports federations (IFs), National Olympic Committees (NOCs), and organising committees for each specific Olympic Games.</tt>

    </body>
</html>
1ST QUESTION


<!DOCTYPE html>
<html>


<body>


      <h2>Wedding Event</h2>  

<p>A wedding is a ceremony where two people or a couple are united in marriage. Wedding traditions and customs vary greatly between cultures, ethnic groups, religions, countries, and social classes. Most wedding ceremonies involve an exchange of marriage vows by the couple, presentation of a gift, and a public proclamation of marriage by an authority figure or celebrant. Special wedding garments are often worn, and the ceremony is sometimes followed by a wedding reception. Music, poetry, prayers or readings from religious texts or literature are also commonly incorporated into the ceremony.</p>

 <blockquote cite="https://www.brainyquote.com/quotes/sheri_l_dew_679111">
<q> Neither man nor woman is perfect or complete without the other. Thus, no marriage or family, no ward or stake is likely to reach its full potential until husbands and wives, mothers and fathers, men and women work together in unity of purpose, respecting and relying upon each other's strengths.</q>
 </blockquote>
</body>
</html>







2ND QUESTION




<html>
    <head>
        <title>My First Website</title>
    </head>
    <body>
        
        <h1>Olympic Games</h1>

        The modern <b>Olympic Games</b> or <b>Olympics</b> are leading international sporting events featuring summer and winter sports competitions in which thousands of <i>athletes</i> from around the world participate in a variety of competitions. The Olympic Games are considered the world's foremost sports competition with more than <i>200 nations</i> participating. The Olympic Games are normally held every <u>four years</u>, alternating between the <u>Summer</u> and <u>Winter Olympics</u> every two years in the four-year period.

        Their creation was inspired by the <ins>ancient Olympic Games</ins>, held in Olympia, Greece from the 8th century BC to the 4th century AD. <mark>Baron Pierre de Coubertin</mark> founded the <ins>International Olympic Committee</ins> (IOC) in 1894, leading to the first modern Games in Athens in 1896. The IOC is the governing body of the Olympic Movement, with the Olympic Charter defining its <small>structure and authority</small>.
   
        The evolution of the Olympic Movement during the 20<sup>th</sup> and 21<sup>st</sup> centuries has resulted in several changes to the Olympic Games. Some of these adjustments include the creation of the Winter Olympic Games for snow and ice sports, the Paralympic Games for athletes with disabilities, the Youth Olympic Games for athletes aged <sub>14 to 18</sub>, the five Continental games<big> (Pan American, African, Asian, European, and Pacific)</big>, and the World Games for sports that are not contested in the Olympic Games. The IOC also endorses the <strike>Deaflympics and the Special Olympics</strike>. The IOC has needed to adapt to a variety of <del>economic, political, and technological </del>advancements.


       <tt> The Olympic Movement consists of international sports federations (IFs), National Olympic Committees (NOCs), and organising committees for each specific Olympic Games.</tt>


    </body>
</html>



/*----------------------- Custom Post type Services ------------------------------------*/
//Services Post Type
add_action('init', 'services_post_type_init');
function services_post_type_init()
{
 
    $labels = array(
 
        'name' => __('Services', 'post type general name', ''),
        'singular_name' => __('Services', 'post type singular name', ''),
        'add_new' => __('Add New', 'Services', ''),
        'add_new_item' => __('Add New Services', ''),
        'edit_item' => __('Edit Services', ''),
        'new_item' => __('New Services', ''),
        'view_item' => __('View Services', ''),
        'search_items' => __('Search Services', ''),
        'not_found' =>  __('No Services found', ''),
        'not_found_in_trash' => __('No Services found in Trash', ''),
        'parent_item_colon' => ''
    );
    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'rewrite' => true,
        'query_var' => true,
        'menu_icon' => get_stylesheet_directory_uri() . '/images/testimonials.png',
        'capability_type' => 'post',
        'hierarchical' => true,
        'public' => true,
        'has_archive' => true,
        'show_in_nav_menus' => true,
        'menu_position' => null,
        'rewrite' => array(
            'slug' => 'services',
            'with_front' => true
        ),
        'supports' => array(
            'title',
            'editor',
            'thumbnail'
        )
    );
 
    register_post_type('services', $args);
}
// SHORTCODE

 
// Add Shortcode [our_services];
add_shortcode('our_services', 'codex_our_services');
function codex_our_services()
{
    ob_start();
    wp_reset_postdata();
?>
    <div class="container-fluid">
	
        <div class="services-slider ser-content">
			
            <?php
            $arg = array(
                'post_type' => 'services',
                'posts_per_page' => -1,
            );
            $po = new WP_Query($arg);
            ?>
            <?php if ($po->have_posts()) : ?>
 
                <?php while ($po->have_posts()) : ?>
                    <?php $po->the_post(); ?>
                    <div class="item">
                        <div class="ser-body">
                           <div class="thumbnail-blog">
							   <?php echo get_the_post_thumbnail(get_the_ID(), 'full'); ?>
							</div>
							
							<!-- Hover DIV-->
							<div class="content">
								<h3 class="title"><?php the_title(); ?></h3>
								<div class="excerpt">
									<?php echo wp_trim_words(get_the_content(), 25, '...'); ?>
								</div>
								<div class="readmore">
									<a href="<?php echo get_permalink() ?>">Read More</a>
								</div>
							</div>
							<!-- Hover DIV-->
							
                        </div>
                    </div>
                <?php endwhile; ?>
 
            <?php endif; ?>
        </div>
    </div>

 
<?php
    wp_reset_postdata();
    return '' . ob_get_clean();
}
function slick_cdn_enqueue_scripts(){
    wp_enqueue_style( 'slick-style', '//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css' );
    wp_enqueue_script( 'slick-script', '//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js', array(), null, true );
}
add_action( 'wp_enqueue_scripts', 'slick_cdn_enqueue_scripts' );
curl --location --request GET 'https://linkable.to/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
Performance of –parallel
Without --parallel:

> python3 manage.py test --keepdb
...
----------------------------------------------------------------------
Ran 591 tests in 670.560s
 Save
With --parallel (concurrency: 6):

> python3 manage.py test --keepdb --parallel 6
...
----------------------------------------------------------------------
Ran 591 tests in 305.394s
{countries.length > 0 && (
  <>
    <h3>Countries in {inputValue}</h3>
    <div className={isVisible ? "reveal" : ""}>
      <div className="country-contain">
        {countries.map((item, index) => (
          <p key={index} className="country">
            {item.name}
          </p>
        ))}
      </div>
    </div>
  </>
)}
useEffect(() => {
  if (inputValue) {
    const query = `query($code: ID!) {
      continent(code: $code) {
        countries {
          name
        }
      }
    }`;

    fetchGraphQL(query, { code: inputValue }).then((data) => {
      setCountries(data.data.continent.countries);
    });

    setIsVisible(true);
    const timer = setTimeout(() => {
      setIsVisible(false);
    }, 1000);

    return () => clearTimeout(timer);
  }
}, [inputValue]);
<select className="custom-select" onChange={(e) => setInputValue(e.target.value)}>
  <option selected hidden>Select a Continent</option>
  {continents.map((item, index) => (
    <option key={index} value={item.code}>
      {item.name}
    </option>
  ))}
</select>
useEffect(() => {
  const query = `query {
    continents {
      name
      code
    }
  }`;

  fetchGraphQL(query).then((data) => {
    setContinents(data.data.continents);
  });
}, []);
const fetchGraphQL = (query, variables = {}) => {
  return fetch("https://countries.trevorblades.com/", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      query,
      variables,
    }),
  }).then((res) => res.json());
};
SELECT DISTINCT
 "Accounts"."Id" AS "Account ID",
 "Accounts"."Account Name" AS "Account Name",
 "Promoter"."Id" AS "Promoter ID",
 REPLACE("Promoter"."Promoter Name", ',', '') AS "Promoter Name",
 if(SUM(CASE
 WHEN DATE_FORMAT("Promoters Vs Invoices"."Invoice Date", '%Y-%m')  = DATE_FORMAT(today(), '%Y-%m') THEN "Promoters Vs Invoices"."Total"
 ELSE 0
 END)  > 0, 'Invoiced', if(SUM("Check Transactions"."Previous Month Contribution")  > 0, 'Invoice Missing', 'No Contributions')) AS "Current Month Billing Status",
 SUM(CASE
 WHEN DATE_FORMAT("Promoters Vs Invoices"."Invoice Date", '%Y-%m')  = DATE_FORMAT(today(), '%Y-%m') THEN "Promoters Vs Invoices"."Total"
 ELSE 0
 END) AS "Invoiced Current Month",
 SUM(CASE
 WHEN DATE_FORMAT("Promoters Vs Invoices"."Invoice Date", '%Y-%m')  = DATE_FORMAT(today() -INTERVAL 1 MONTH, '%Y-%m') THEN "Promoters Vs Invoices"."Total"
 ELSE 0
 END) AS "Invoiced Last Month",
 SUM(CASE
 WHEN DATE_FORMAT("Promoters Vs Invoices"."Invoice Date", '%Y-%m')  = DATE_FORMAT(today() -INTERVAL 2 MONTH, '%Y-%m') THEN "Promoters Vs Invoices"."Total"
 ELSE 0
 END) AS "Invoiced Two Months Ago"
FROM  "Accounts"
JOIN "Promoter" ON "Promoter"."Account"  = "Accounts"."Id" 
LEFT JOIN "Promoters Vs Invoices" ON "Promoters Vs Invoices"."Promoter ID"  = "Promoter"."Id"
 AND	"Promoters Vs Invoices"."Invoice Date"  >= DATE_SUB(start_day(month, today()), INTERVAL 3 MONTH) 
LEFT JOIN(	SELECT
 "Promoter Id",
 SUM("Contribution Amount") as "Overall Contributions",
 SUM(CASE
 WHEN DATE_FORMAT("Transaction Date", '%Y-%m')  = DATE_FORMAT(today() -INTERVAL 1 MONTH, '%Y-%m') THEN "Contribution Amount"
 ELSE 0
 END) AS "Previous Month Contribution"
	FROM  "AWS Transactions - Final (3 Hour Sync)" 
	GROUP BY  "Promoter Id" 
) AS  "Check Transactions" ON "Check Transactions"."Promoter Id"  = "Promoter"."Id"  
WHERE "Accounts"."Billing Cycle"  != ''
 AND	"Accounts"."Auto Invoice"  = 'Yes'
 AND	("Promoter"."Promoter Status"  = 'Live'
 OR	("Promoter"."Promoter Status"  = 'Cancelled'
 AND	"Promoter"."Cancellation/Pause Date"  is not null))
 AND	"Promoter"."Bill To"  is not null
 AND	"Check Transactions"."Overall Contributions"  > 0
GROUP BY "Accounts"."Id",
 "Accounts"."Account Name",
 "Promoter"."Id",
  "Promoter"."Promoter Name" 
ORDER BY "Accounts"."Account Name",
 replace("Promoter"."Promoter Name", ',', '')
<?php 
// Put this in Functions
function popular_posts($post_id) {
	$count_key = 'popular_posts';
	$count = get_post_meta($post_id, $count_key, true);
	if ($count == '') {
		$count = 0;
		delete_post_meta($post_id, $count_key);
		add_post_meta($post_id, $count_key, '0');
	} else {
		$count++;
		update_post_meta($post_id, $count_key, $count);
	}
}
function track_posts($post_id) {
	if (!is_single()) return;
	if (empty($post_id)) {
		global $post;
		$post_id = $post->ID;
	}
	popular_posts($post_id);
}
add_action('wp_head', 'track_posts');
?>
  
 <h3>Popular Posts</h3>
<ul>
	<?php 
		$args_mostread = array(
		'post_type' => 'nyheder',
		'meta_key'=>'popular_posts',
		'orderby'=>'meta_value_num',
		'posts_per_page' => 6,
		'order' => 'DESC',
		'category_name' => 'ligaherrer'
		);
	$mostread = new WP_Query( $args_mostread ); 
	while ($mostread->have_posts()) : $mostread->the_post(); ?>
	<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
	<?php endwhile; wp_reset_postdata(); ?>
</ul>


//Enable or Disable Developer Mode
bench set-config developer_mode 1
bench set-config developer_mode 0

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


//*Enable Server Script*//
bench set-config -g server_script_enabled 1
bench --site site1.local set-config server_script_enabled true



//*Enable Developer Mode*//
bench set-config -g developer_mode 1
bench --site site1.local clear-cache
bench setup requirements --dev

frappe-bench/sites/site1.local/site_config.json
  Manually write (( "developer_mode": 1,))



//Enable Scheduler//
bench --site all enable-scheduler
bench --site site1.local enable-scheduler
Manually write (( "pause_scheduler": 1,))



//Refresh your site.
//if your site is in production, run the command.
sudo supervisorctl restart all
input[type="color"]::-webkit-color-swatch {
    border-color: transparent;
}
#include <bits/stdc++.h>
#include <vector>
#include <string>
#include <deque>
#include <iosream>
#include <algorimth>
#include <cmath>

int main(){
int n;
vector<int> S(n);
for(int i = 0; i < n; i++){
	int a;
	cin >> a;
	S.push_back(a);
}

vector<int> dp1(n);
for(int i = 0; i < n; i++){
	dp1[i] = 1;
}

for(int i = 1; i < n; i++){
	if(a[i] > a[i-1]){
		dp[i] += 1;
}

//in ra day con lien tiep tang dan dai nhat

cout << *max_element(dp1.begin(), dp1.end());


#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    string s;
    cin >> s;
    int temp = 1;
    int ans;
    for(int i = 1; i < s.size(); i++){
        if(s[i] == s[i-1]){
            temp += 1;
            cout << temp << " ";
        }
        else;
            ans = max(ans, temp);
            temp = 1;
        }
    if(ans >= 7){
        cout << "YES";
    }
    else{
        cout << "NO";
    }
    return 0;
}
In the world of fast-changing crypto trading, AI Trading Bot have built as most effective tool for earning from price discrepancies across all over the crypto exchange. These robust algorithms make trades instantly and with profit by automating the analysis of data in real time. 

How does AI Crypto Trading Bot work?

AI Crypto Trading Bot utilizes cutting-edge machine learning algorithms to analyze immense amounts of data and permit trades effectively and instantly. These trading bots profit from price differences caused by inefficiencies and delays in data transfers all over many crypto exchanges. Are you an entrepreneur or startup want to initiate your own advanced technology trading bot solution, then Maticz offers you the top-notch AI Crypto Trading bot development solutions that includes in-built features and functionalities that assist you to initiate your own business solutions into top-notch level. Connect with us today to learn more about our high-tech AI Trading bot solutions!

Email: sales@maticz.com
Whatsapp: +91 93845 87998
Telegram: @maticzofficial
Skype: live:.cid.817b888c8d30b212
​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))
import * as React from 'react';
import {Camera, CameraPermissionStatus} from "react-native-vision-camera";

export default function PermissionsScreen(){
    const [CameraPermissionStatus, setCameraPermissionStatus] = React.u
    return (
        <>
        </>
    )
}
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int maxSumIncreasingSubsequenceWithLengthK(const vector<int>& arr, int k) {
    int n = arr.size();
    if (n == 0 || k == 0 || k > n) return 0;

    // Khởi tạo mảng dp có kích thước n x (k+1)
    vector<vector<int>> dp(n, vector<int>(k+1, 0));

    // Khởi tạo dp[i][1] bằng arr[i]
    
    for(int i = 0; i < n; i++){
        dp[i][1] = arr[i];
    }
    // Tính toán dp[i][j] cho các độ dài từ 2 đến k
    for(int i = 1; i < n; i++){
        for(int j = 0; j < i; j++){
            if(arr[i] > arr[j]){
                for(int l = 2; l < k; l++){
                    dp[i][l] = max(dp[i][l], dp[j][l-1] + arr[i]);
                }
            }
        }
    }
    


    // Tìm giá trị lớn nhất trong dp[i][k]
    int max_sum = 0;
    for (int i = 0; i < n; ++i) {
        max_sum = max(max_sum, dp[i][k]);
    }

    return max_sum;
}

int main() {
    vector<int> arr = {2, 3, 5, 7, 3, 9};
    int k = 3; // Độ dài yêu cầu của dãy con

    int result = maxSumIncreasingSubsequenceWithLengthK(arr, k);
    cout << "Tổng lớn nhất của dãy con tăng có độ dài " << k << " là: " << result << endl;

    return 0;
}
AL|Alabama
AK|Alaska
AZ|Arizona
AR|Arkansas
CA|California
CO|Colorado
CT|Connecticut
DE|Delaware
FL|Florida
GA|Georgia
HI|Hawaii
ID|Idaho
IL|Illinois
IN|Indiana
IA|Iowa
KS|Kansas
KY|Kentucky
LA|Louisiana
ME|Maine
MD|Maryland
MA|Massachusetts
MI|Michigan
MN|Minnesota
MS|Mississippi
MO|Missouri
MT|Montana
NE|Nebraska
NV|Nevada
NH|New Hampshire
NJ|New Jersey
NM|New Mexico
NY|New York
NC|North Carolina
ND|North Dakota
OH|Ohio
OK|Oklahoma
OR|Oregon
PA|Pennsylvania
RI|Rhode Island
SC|South Carolina
SD|South Dakota
TN|Tennessee
TX|Texas
UT|Utah
VT|Vermont
VA|Virginia
WA|Washington
WV|West Virginia
WI|Wisconsin
WY|Wyoming
DC|District of Columbia
AS|American Samoa
GU|Guam
MP|Northern Mariana Islands
PR|Puerto Rico
UM|United States Minor Outlying Islands
VI|Virgin Islands, U.S.
SUBSTITUTE(select(Dining Menu Slice[Menu and Counter], [Counter]>0), " , ", "
")
#include <bits/stdc++.h>
using namespace std;
 
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    
    int n;
    cin >> n;
    
    vector<vector<int>> S(n);
    for(int i = 0; i < n; i++){
        for(int j = 0; j <= i; j++){
            int a;
            cin >> a;
            S[i].push_back(a);
        }
    }
 
    vector<vector<int>> dp(n);
    for(int i = 0; i < n; i++){
        dp[i] = vector<int>(i + 1, 1);
    }
    
    dp[0][0] = S[0][0];
 
    for(int i = 1; i < n; i++){
        for(int j = 0; j <= i; j++){
            if (j == 0) {
                dp[i][j] = dp[i-1][j] * S[i][j];
            } else if (j == i) {
                dp[i][j] = dp[i-1][j-1] * S[i][j];
            } else {
                if(S[i][j] > 0){
                    dp[i][j] = max(dp[i-1][j], dp[i-1][j-1]) * S[i][j];
                } else {
                    dp[i][j] = min(dp[i-1][j], dp[i-1][j-1]) * S[i][j];
                }
            }
        }
    }
    
    cout << *max_element(dp[n-1].begin(), dp[n-1].end());
 
    return 0;
}
<!-- Text Animation Scripts -->
<script src="https://unpkg.com/split-type"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/ScrollTrigger.min.js"></script>
<script>
window.addEventListener("DOMContentLoaded", (event) => {
  // Split text into spans
  let typeSplit = new SplitType("[text-split]", {
    types: "words, chars",
    tagName: "span"
  });

  // Link timelines to scroll position
  function createScrollTrigger(triggerElement, timeline) {
    // Reset tl when scroll out of view past bottom of screen
    ScrollTrigger.create({
      trigger: triggerElement,
      start: "top bottom",
      onLeaveBack: () => {
        timeline.progress(0);
        timeline.pause();
      }
    });
    // Play tl when scrolled into view (60% from top of screen)
    ScrollTrigger.create({
      trigger: triggerElement,
      start: "top 60%",
      onEnter: () => timeline.play()
    });
  }

  $("[words-slide-up]").each(function (index) {
    let tl = gsap.timeline({ paused: true });
    tl.from($(this).find(".word"), { opacity: 0, yPercent: 100, duration: 0.5, ease: "back.out(2)", stagger: { amount: 0.5 } });
    createScrollTrigger($(this), tl);
  });

  $("[words-rotate-in]").each(function (index) {
    let tl = gsap.timeline({ paused: true });
    tl.set($(this).find(".word"), { transformPerspective: 1000 });
    tl.from($(this).find(".word"), { rotationX: -90, duration: 0.6, ease: "power2.out", stagger: { amount: 0.6 } });
    createScrollTrigger($(this), tl);
  });

  $("[words-slide-from-right]").each(function (index) {
    let tl = gsap.timeline({ paused: true });
    tl.from($(this).find(".word"), { opacity: 0, x: "1em", duration: 0.6, ease: "power2.out", stagger: { amount: 0.2 } });
    createScrollTrigger($(this), tl);
  });

  $("[letters-slide-up]").each(function (index) {
    let tl = gsap.timeline({ paused: true });
    tl.from($(this).find(".char"), { yPercent: 100, duration: 0.2, ease: "power1.out", stagger: { amount: 0.6 } });
    createScrollTrigger($(this), tl);
  });

  $("[letters-slide-down]").each(function (index) {
    let tl = gsap.timeline({ paused: true });
    tl.from($(this).find(".char"), { yPercent: -120, duration: 0.3, ease: "power1.out", stagger: { amount: 0.7 } });
    createScrollTrigger($(this), tl);
  });

  $("[letters-fade-in]").each(function (index) {
    let tl = gsap.timeline({ paused: true });
    tl.from($(this).find(".char"), { opacity: 0, duration: 0.2, ease: "power1.out", stagger: { amount: 0.8 } });
    createScrollTrigger($(this), tl);
  });

  $("[letters-fade-in-random]").each(function (index) {
    let tl = gsap.timeline({ paused: true });
    tl.from($(this).find(".char"), { opacity: 0, duration: 0.05, ease: "power1.out", stagger: { amount: 0.4, from: "random" } });
    createScrollTrigger($(this), tl);
  });

  $("[scrub-each-word]").each(function (index) {
    let tl = gsap.timeline({
      scrollTrigger: {
        trigger: $(this),
        start: "top 90%",
        end: "top center",
        scrub: true
      }
    });
    tl.from($(this).find(".word"), { opacity: 0.2, duration: 0.2, ease: "power1.out", stagger: { each: 0.4 } });
  });

  // Avoid flash of unstyled content
  gsap.set("[text-split]", { opacity: 1 });
});
</script>

<!-- Lenis Smooth Scroll Script -->
<script src="https://cdn.jsdelivr.net/gh/studio-freight/lenis@1.0.23/bundled/lenis.min.js"></script> 
<script>
// LENIS SMOOTH SCROLL
let lenis;
if (Webflow.env("editor") === undefined) {
  lenis = new Lenis({
    lerp: 0.1,
    wheelMultiplier: 0.7,
    gestureOrientation: "vertical",
    normalizeWheel: false,
    smoothTouch: false
  });
  function raf(time) {
    lenis.raf(time);
    requestAnimationFrame(raf);
  }
  requestAnimationFrame(raf);
}
$("[data-lenis-start]").on("click", function () {
  lenis.start();
});
$("[data-lenis-stop]").on("click", function () {
  lenis.stop();
});
$("[data-lenis-toggle]").on("click", function () {
  $(this).toggleClass("stop-scroll");
  if ($(this).hasClass("stop-scroll")) {
    lenis.stop();
  } else {
    lenis.start();
  }
});
</script>
star

Mon Aug 26 2024 02:00:39 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Sun Aug 25 2024 20:24:50 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/cpp-programming/online-compiler/

@LizzyTheCatto #c++

star

Sun Aug 25 2024 19:50:05 GMT+0000 (Coordinated Universal Time) https://github.com/minrk/ipython_extensions

@jrb9000 #ipython #jupyter-notebook

star

Sun Aug 25 2024 19:47:41 GMT+0000 (Coordinated Universal Time) https://github.com/minrk/ipython_extensions

@jrb9000 #jupyter-notebook #ipython #nbextensions #gist

star

Sun Aug 25 2024 13:22:28 GMT+0000 (Coordinated Universal Time) https://superuser.com/questions/1419613/change-git-init-default-branch-name

@jrb9000 #bash

star

Sun Aug 25 2024 13:11:25 GMT+0000 (Coordinated Universal Time)

@Xyfer

star

Sun Aug 25 2024 13:02:12 GMT+0000 (Coordinated Universal Time)

@Xyfer

star

Sun Aug 25 2024 12:40:10 GMT+0000 (Coordinated Universal Time)

@Xyfer

star

Sun Aug 25 2024 11:47:37 GMT+0000 (Coordinated Universal Time)

@Xyfer

star

Sun Aug 25 2024 07:12:33 GMT+0000 (Coordinated Universal Time)

@taufiq_ali

star

Sun Aug 25 2024 05:43:57 GMT+0000 (Coordinated Universal Time) https://gist.github.com/Bradley-D/1c092a62b9b6475dca49

@mediasolutions

star

Sun Aug 25 2024 03:58:58 GMT+0000 (Coordinated Universal Time) https://github.com/googlecreativelab/teachablemachine-community/blob/master/snippets/markdown/image/tensorflowjs/javascript.md

@Divyansh

star

Sat Aug 24 2024 19:53:14 GMT+0000 (Coordinated Universal Time)

@ahmad_raza #undefined

star

Sat Aug 24 2024 17:28:06 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/62158057/how-to-play-animation-through-script-unity

@Kibu

star

Sat Aug 24 2024 17:16:38 GMT+0000 (Coordinated Universal Time) https://gist.github.com/samsheffield/96608e465091069d15fdaea29457ec85

@Kibu

star

Sat Aug 24 2024 16:25:22 GMT+0000 (Coordinated Universal Time) https://pub.dev/packages/paylink_payment

@testhrfnj

star

Sat Aug 24 2024 10:29:15 GMT+0000 (Coordinated Universal Time) https://www.webfulcreations.com/envato/php_login_script_demo/subscriber.php

@poramet128

star

Sat Aug 24 2024 05:57:25 GMT+0000 (Coordinated Universal Time)

@chatgpt #kotlin

star

Sat Aug 24 2024 05:48:05 GMT+0000 (Coordinated Universal Time) https://codepen.io/robertostringa/pen/yLdjjON

@rstringa

star

Sat Aug 24 2024 04:56:24 GMT+0000 (Coordinated Universal Time)

@login123

star

Fri Aug 23 2024 23:33:43 GMT+0000 (Coordinated Universal Time)

@humdanaliii

star

Fri Aug 23 2024 23:32:55 GMT+0000 (Coordinated Universal Time)

@humdanaliii

star

Fri Aug 23 2024 21:27:50 GMT+0000 (Coordinated Universal Time) https://linkable.to/developers

@CallTheCops

star

Fri Aug 23 2024 18:58:01 GMT+0000 (Coordinated Universal Time) https://www.orfium.com/engineering/speeding-up-your-python-django-test-suite/

@fearless

star

Fri Aug 23 2024 17:25:38 GMT+0000 (Coordinated Universal Time)

@negner

star

Fri Aug 23 2024 17:22:28 GMT+0000 (Coordinated Universal Time)

@negner

star

Fri Aug 23 2024 17:19:37 GMT+0000 (Coordinated Universal Time)

@negner

star

Fri Aug 23 2024 17:16:56 GMT+0000 (Coordinated Universal Time)

@negner

star

Fri Aug 23 2024 17:13:36 GMT+0000 (Coordinated Universal Time)

@negner

star

Fri Aug 23 2024 15:08:13 GMT+0000 (Coordinated Universal Time)

@RehmatAli2024 #deluge

star

Fri Aug 23 2024 13:14:33 GMT+0000 (Coordinated Universal Time) https://www.codechef.com/practice/course/two-pointers/POINTERF/problems/PREP68

@iampran

star

Fri Aug 23 2024 11:43:27 GMT+0000 (Coordinated Universal Time) https://www.tenforums.com/user-accounts-family-safety/159403-command-turn-off-uac-prompts-specific-apps.html

@Curable1600

star

Fri Aug 23 2024 11:38:14 GMT+0000 (Coordinated Universal Time) https://digwp.com/2016/03/diy-popular-posts/

@andersdeleuran #php

star

Fri Aug 23 2024 10:23:05 GMT+0000 (Coordinated Universal Time)

@Taimoor

star

Fri Aug 23 2024 09:23:06 GMT+0000 (Coordinated Universal Time)

@divyasoni23 #css

star

Fri Aug 23 2024 08:09:38 GMT+0000 (Coordinated Universal Time) https://hnoj.edu.vn/problem/loop8

@LizzyTheCatto

star

Fri Aug 23 2024 08:04:56 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/cpp-programming/online-compiler/

@LizzyTheCatto #c++

star

Fri Aug 23 2024 07:29:04 GMT+0000 (Coordinated Universal Time) http://octopi.local/?

@amccall23

star

Fri Aug 23 2024 07:24:20 GMT+0000 (Coordinated Universal Time) https://www.konkadayclub.co.za/

@blackcypher

star

Fri Aug 23 2024 06:31:04 GMT+0000 (Coordinated Universal Time) https://kaspi.kz/shop/p/mikrovolnovaja-pech-grand-ggmw-20afmb-chernyi-20l-109822448/?c

@bekzatkalau

star

Fri Aug 23 2024 05:22:00 GMT+0000 (Coordinated Universal Time) https://maticz.com/ai-crypto-trading-bot-development

@jamielucas #drupal

star

Fri Aug 23 2024 03:27:59 GMT+0000 (Coordinated Universal Time)

@theshyxin #undefined

star

Fri Aug 23 2024 02:59:19 GMT+0000 (Coordinated Universal Time)

@azariel #glsl

star

Fri Aug 23 2024 01:45:55 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/cpp-programming/online-compiler/

@LizzyTheCatto

star

Fri Aug 23 2024 00:52:26 GMT+0000 (Coordinated Universal Time) https://dailydictation.com/exercises/short-stories/11-summer-vacation.323/listen-and-type

@testhrfnj

star

Fri Aug 23 2024 00:51:29 GMT+0000 (Coordinated Universal Time) https://dailydictation.com/exercises/short-stories/11-summer-vacation.323/listen-and-type

@testhrfnj

star

Thu Aug 22 2024 20:14:05 GMT+0000 (Coordinated Universal Time) https://www.drupal.org/node/332575

@DKMitt #php

star

Thu Aug 22 2024 17:43:55 GMT+0000 (Coordinated Universal Time) https://www.appsheet.com/template/appdef?utm_campaign

@Wittinunt

star

Thu Aug 22 2024 17:30:29 GMT+0000 (Coordinated Universal Time)

@besho

star

Thu Aug 22 2024 13:38:33 GMT+0000 (Coordinated Universal Time) https://gsap-text-animate.webflow.io/

@zily

Save snippets that work with our extensions

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