Snippets Collections
public class Exercise {

	public static void main(String[] args) {
		int[] array = {2,3,4,1,5};
		int[] myarray = {2,9,5,4,8,1,6};
		
		System.out.println("my normal array is: " + Arrays.toString(array));
		
//bubbleSort array:		
		bubbleSort(array);
		System.out.println();
		System.out.println("After Sorting From Small number to Large number. ");
		System.out.println("\t" + Arrays.toString(array));
		
		sort(array);
		System.out.println();
		System.out.println("After Sorting From Large number to Small number: ");
		System.out.println("\t" + Arrays.toString(array));
		
//selection array
		System.out.println();
		
		System.out.println("my second array is : " + Arrays.toString(myarray));
		selectionArray(myarray);
		System.out.println();
		System.out.println("After Selection Array from minimum number to maximum number: ");
		System.out.println("\t" + Arrays.toString(myarray));
		
		
	}
	public static void bubbleSort(int[] array) {
		for(int i=0; i<array.length; i++) {
			for(int j=0; j<array.length-1-i; j++) {
				if(array[j] > array[j+1]) {
					int temp = array[j];
					array[j] = array[j+1];
					array[j+1] = temp;
				}
			}
		}
	}
	public static void sort(int[] array) {
		for(int i=0; i<array.length; i++) {
			for(int j=0; j<array.length-1-i; j++) {
				if(array[j] < array[j+1]) {
					int temp = array[j];
					array[j] = array[j+1];
					array[j+1] = temp;
				}
			}
		}
	}
	public static void selectionArray(int[] myarray) {
		for(int i =0; i<myarray.length; i++) {
			//find minimum in the list
			int currentMin = myarray[i];
			int currentMinIndex = i;
			
			for(int j= i+1; j< myarray.length; j++) {
				if(currentMin > myarray[j]) {
					currentMin = myarray[j];
					currentMinIndex = j;
				}
			}
			//swap list[i] with list[currentMinIndex]
			if(currentMinIndex != i) {
				myarray[currentMinIndex] = myarray[i];
				myarray[i] = currentMin;
			}
		}
	}

}


cd <name of project goes here>
npm start
expo init <name of project> 
BRC20 token is an experimental token standard that has witnessed a surprising hype and surge, it is nothing but BRC2O that permits the issuance and trading of fungible tokens using the Ordinals protocol on the Bitcoin network., The BRC-20 coins are based on the Ethereum blockchain and are comparable to ERC-20 tokens.

We at Maticz, a leading BRC20 Token Development company offer end-to-end solutions to develop and launch your BRC20 tokens.Check out >> https://maticz.com/brc20-tokens
function extractEmails() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var range = sheet.getRange('F:F');
  var values = range.getValues();

  var extractedEmails = [];
  var maxEmailCount = 0;

  for (var i = 0; i < values.length; i++) {
    var emails = [];
    if (values[i][0] !== "" && typeof values[i][0] === "string") {
      var emailRegex = /[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/g;
      var emailMatches = values[i][0].match(emailRegex);

      if (emailMatches) {
        emails = emailMatches.map(function (email) {
          return [email];
        });
        if (emails.length > maxEmailCount) {
          maxEmailCount = emails.length;
        }
      }
    }
    extractedEmails.push(emails);
  }

  // Adjust the range dimensions based on the maximum email count
  var outputRange = sheet.getRange(1, 7, extractedEmails.length, maxEmailCount);
  
  // Fill any remaining empty cells with empty strings
  var emptyEmails = new Array(maxEmailCount).fill([""]);
  for (var i = 0; i < extractedEmails.length; i++) {
    extractedEmails[i] = extractedEmails[i].concat(emptyEmails.slice(extractedEmails[i].length));
  }
  
  outputRange.setValues(extractedEmails);
}
Due to the widespread adoption of cryptocurrencies, cryptocurrency exchange platforms have rapidly increased, which allows traders and investors to buy and sell digital currencies on their respective platforms. Coinmarketcap, the most popular cryptocurrency price tracking website, monitors 235 cryptocurrency exchanges.

Maticz is a top-rated Crypto Exchange Development Company that offers cutting-edge exchange solutions to speed up the development of your cryptocurrency exchange business, with industry-leading functionality that can be altered to meet your company's needs. Get to know the easy 10-step process to create your own crypto exchange.

{"content":[{"id":"2405decd-f11c-492e-944d-06b4b5fcb420","product_name":"Samsung S20","product_price":26000.0,"product_quantity":5,"live":false,"product_imageName":"833b1433-531d-4aec-81dc-7d32d563e96e.webp","product_desc":"8 gb ram 256 storage","stock":true,"category":{"id":"22b6d892-28cb-4f68-97af-8784838895bd","category_title":"Mobile"}},{"id":"413a17a8-9a78-4d2f-92a7-35ee0a834d1e","product_name":"Realme 8","product_price":10000.0,"product_quantity":5,"live":false,"product_imageName":"d7176c51-7897-4ca9-b023-39e7a354a32e.jpg","product_desc":"8 gb ram 256 storage","stock":true,"category":{"id":"22b6d892-28cb-4f68-97af-8784838895bd","category_title":"Mobile"}}],"pageNumber":0,"pageSize":2,"totalPages":3,"lastPage":false}
public class Exercise {

	public static void main(String[] args) {
		int[] array = {2,3,4,1,5};
		
		System.out.println("my normal array is: " + Arrays.toString(array));
		
		bubbleSort(array);
		System.out.println();
		System.out.println("After Sorting From Small number to Large number. ");
		System.out.println(Arrays.toString(array));
		
		sort(array);
		System.out.println();
		System.out.println("After Sorting From Large number to Small number: ");
		System.out.println(Arrays.toString(array));
		
	}
	public static void bubbleSort(int[] array) {
		for(int i=0; i<array.length; i++) {
			for(int j=0; j<array.length-1-i; j++) {
				if(array[j] > array[j+1]) {
					int temp = array[j];
					array[j] = array[j+1];
					array[j+1] = temp;
				}
			}
		}
	}
	public static void sort(int[] array) {
		for(int i=0; i<array.length; i++) {
			for(int j=0; j<array.length-1-i; j++) {
				if(array[j] < array[j+1]) {
					int temp = array[j];
					array[j] = array[j+1];
					array[j+1] = temp;
				}
			}
		}
	}

}


如果对于该问题您没有疑问,您可以关闭此chat。稍后,我会整理此次chat的信息,并通过 email 回复您。

请问您还在线吗?

请问您是否还在线上呢?如您已经不在线上,2分钟后我将关闭此连接,并通过案例回复该Chat的相关信息。

我将关闭此连线,并稍后通过案例整理相关信息回复您。于此同时,您也可以随时透过案例开启新的chat请求。感谢您的理解与支持。
I noticed that original case owner is . please allow me a second to check if he can continue taking the case. 
Dear Customer,


Thank you for contacting AWS Premium Support, my name is Yuqi Pu, and it will be my pleasure to assist you on the case.

This email is to acknowledge that I have received this case, and I am working on it.

I will be updating you as soon as I have additional information. Meanwhile your patience are highly appreciated.


Thanks!
Dear Customer,

Thank you for contacting AWS Premium Support, my name is  Yuqi, and it will be my pleasure to assist you on the case. 

From the case description I could understand that {}

Please correct me in case I misunderstood.





To resolve this issue, I suggest that


I hope you will find this information useful. Please let me know if you have any further queries and I will be glad to assist you.

Thank you and have a great day ahead!

Reference:
[1]
[2]
尊敬的客户您好,

非常感谢您与AWS技术支持联系。我是 Yuqi,很高兴为您提供帮助。

根据您的描述,我了解到 。

如果我的理解有误还请您指正。





希望我的回答能够帮到您,如果您有任何其他问题或者需要协助进一步调查,欢迎您随时联系AWS Support,我们将很高兴继续为您服务!

感謝您的理解与支持!

参考文档:
[1]
[2]
"""
<div className="row email-phone-main-wrapper">
            <div className="col-md-6 phone-col-wrapper">
              <div className="mb-3">
                <label htmlFor="phoneNumber" className="form-label phone-number-label w-100">
                  Phone Number*
                </label>
                <div className="d-flex">
                  <Autocomplete
                    disablePortal
                    id="combo-box-demo"
                    placeholder="+971"
                    options={isdCodesList}
                    isOptionEqualToValue={(option: any, value: any) => option.label === value.label}
                    renderInput={(params) => (
                      <TextField
                        {...params}
                        {...register('isdCode', {
                          required: true,
                        })}
                      />
                    )}
                    onChange={(e, newVal: any) => {
                      console.log('newVal', newVal);
                      setPhoneNumber(newVal?.label);
                    }}
                  />
                  <input
                    type="text"
                    className="form-control-phonenumber"
                    id="phoneNumber"
                    aria-describedby="phoneNumberHelp"
                    placeholder="xxx xxxx xxxxxx"
                    {...register('phoneNumber', {
                      required: true,
                    })}
                    onChange={(e) => setPhoneNumber(e.target.value)}
                  />
                </div>
                {
                  errors?.phoneNumber?.type === 'required' && (
                    <span className="error">
                      please enter your phone number
                    </span>
                  )
                }
              </div>
            </div>
            <div className="col-md-4 email-col-wrapper">
              <div className="mb-3">
                <label htmlFor="email" className="form-label w-100">
                  Email Address
                </label>
                <input
                  type="text"
                  className="form-control"
                  id="email"
                  aria-describedby="emailHelp"
                  placeholder="eg:abc@mail.com"
                  {...register('email')}
                  onChange={(e) => setEmail(e.target.value)}
                />
              </div>
            </div>
          </div>
"""


You aree CSS expert. You have to do following design changes written inbullet points:

parent element - email-phone-main-wrapper
child elements - phone-col-wrapper, email-col-wrapper 
1. childs of email-phone-main-wrapper div element should appear in row format ie top and bottom style when screem with is equal or below 768px and height 1024 px. 
2. Both the child element should have same width when responsive. code for your reference is above.
3. YOu can media queries to achieve this result.
4. Return the updated sass code having media queries.
row {
  
  display: flex;
    flex-direction: column;
}


@media (min-width: 768px)
.phone-number-wrapper {
    flex: 0 0 auto;
    width: 100%;
}

.form .email-col-wrapper {
    margin-left: 0px;
    width: 75%;
}

dnf remove kmod-nvidia-530.30.02-4.18.0-425.13.1.x86_64
dnf update
ansible-playbook tasks/nvidia.yml  -i vars/rocky.yml --limit=cpv-ws044 -k
P2P Crypto Exchanges that have been created so far in the industry have brought significant revenue for the owners. The trust involved is the primary reason why people often sign up for a P2P Crypto Exchange. Users picking their preferred buying and selling prices and the crypto escrow script services are two factors determining confidence in a peer-to-peer cryptocurrency exchange.

Thus, Owners won't have a liquidity issue when more users join the platform. Increasing liquidity allows exchange owners to make money via a variety of methods.

Listing fee
Commission fee for ad-based transactions
Affiliate market for currency conversion using foreign fiat
Fees for withdrawals

Due to all of these opportunities for making money, startups should invest in the development of peer-to-peer cryptocurrency exchanges. In addition to the direct earnings, setting up a P2P Exchange. 

Startups should invest in P2P Crypto Exchange software to expand their revenue streams because of all this potential to make money. In addition to the direct income generated, creating a P2P Exchange indirectly contributes to making money. Future firms may develop a hybrid P2P cryptocurrency exchange that offers both centralized and decentralized choices.
"""
<form className="form">
          <div className="row form-row">
            <div
              className="col-md-4"
            >
              <div className="mb-3">
                <label
                  htmlFor="forename"
                  className="form-label w-100 forename-label"
                >
                  Forename(s) - All First and Middle Names(as per passport)
                </label>
                <input
                  type="text"
                  className="form-control forename-input"
                  id="forename"
                  placeholder="Aron Mathew"
                  onChange={(e) => setForeName(e.target.value)}
                  {...register('foreName', {
                    required: true,
                  })}
                />
                {
                errors?.foreName?.type === 'required' && (
                  <span className="error">
                    please enter your forename
                  </span>
                )
              }
              </div>
            </div>
            <div className="col" />
            <div className="row">
              <div className="col-md-4">
                <div className="mb-3">
                  <label htmlFor="surname" className="form-label w-100">
                    Surname*
                  </label>
                  <input
                    type="text"
                    className="form-control surname-input"
                    id="surname"
                    aria-describedby="surnameHelp"
                    placeholder="Eg: Philip"
                    onChange={(e) => setSurName(e.target.value)}
                    {...register('surName', {
                      required: true,
                    })}
                  />
                  {
                  errors?.surName?.type === 'required' && (
                    <span className="error">
                      please enter your surname
                    </span>
                  )
                }
                </div>
              </div>
            </div>
            {/* date of birth and  nationality */}
            <div className="row">
              <div className="col-md-4">
                <div className="mb-3">
                  <label htmlFor="dateOfBirth" className="form-label date-of-birth-label w-100">
                    Date of Birth*
                  </label>
                  <DatePicker
                    onChange={(e: any) => {
                      handleDatePicker(e);
                    }}
                    value={dateOfBirth}
                    renderInput={(params: any) => (
                      <TextField
                        {...params}
                        inputProps={{
                          ...params.inputProps,
                          placeholder: 'Select Date of Birth',
                        }}
                        {
                            ...register('dateOfBirth', {
                              required: true,
                            })
                          }
                        className="date-picker date-picker-input"
                      />
                    )}
                    className="date-picker-field"
                  />
                  {
                    errors?.surName?.type === 'required' && (
                      <span className="error">
                        please enter your date of birth
                      </span>
                    )
                  }
                </div>
              </div>
              <div className="col-md-4">
                <div className="mb-3">
                  <label htmlFor="nationality" className="form-label nationality-label w-100">
                    Nationality*
                  </label>
                  <Autocomplete
                    disablePortal
                    id="combo-box-demo"
                    options={nationalitiesList}
                    isOptionEqualToValue={(option: any, value: any) => option.nationalityGuid === value.nationalityGuid}
                    renderInput={(params) => (
                      <TextField
                        {...params}
                        {...register('nationality', {
                          required: true,
                        })}
                      />
                    )}
                    onChange={(e, newVal: any) => {
                      console.log('newVal', newVal);
                      setNationalityGuid(newVal?.nationalityGuid);
                    }}
                  />
                </div>
              </div>
            </div>

            {/* passport number and emirates ID */}
            <div className="row">
              <div className="col-md-4">
                <div className="mb-3">
                  <label htmlFor="passportNo" className="form-label passport-number-label w-100">
                    Passport Number*
                  </label>
                  <input
                    type="text"
                    className="form-control passport-number-input"
                    id="passportNo"
                    placeholder="xx xxxx xxxx"
                    onChange={(e) => setPassportNo(e.target.value)}
                    {...register('passportNo', {
                      required: true,
                    })}
                  />
                  {
                    errors?.passportNo?.type === 'required' && (
                      <span className="error">
                        please enter your passport number
                      </span>
                    )
                  }
                </div>
              </div>

              <div className="col-md-4">
                <div className="mb-3">
                  <label htmlFor="emiratesId" className="form-label emirates-id-label w-100">
                    Emirates ID*
                  </label>
                  <input
                    type="text"
                    className="form-control emirates-id-input"
                    id="emiratesId"
                    placeholder="Eg: 123456789"
                    onChange={(e) => setEmiratesID(e.target.value)}
                    {...register('emiratesID', {
                      required: true,
                    })}
                  />
                  {
                    errors?.emiratesID?.type === 'required' && (
                      <span className="error">
                        please enter your emirates id
                      </span>
                    )
                  }
                </div>
              </div>
            </div>
            <h4 className="form-sub-head">
              Current Residential Address (Not PO Box)
              <hr />
            </h4>
"""

You are scss expert.
you have to nest form-sub-head element of form class. You have to follow sass conventions.
Return the converted styling.
#include<bits/stdc++.h>
using namespace std;
 
#define noOfDigits(n) ((int)log10(n) + 1)
#define ll long long
#define ull unsigned long long
#define ld long double
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define vi vector<int>
#define vll vector<ll>
#define vi2d(n,m,grid) vector<vector<int>> grid(n, vector<int> (m, 0))
#define in(v) for(auto &i : v) cin >> i
#define fi(n) for(int i = 0; i < n; ++i)
#define mxx(v) *max_element(all(v))
#define mnn(v) *min_element(all(v))
 
void FILES (){
    freopen ( "window.in" , "r" , stdin ) ;
    freopen ( "number2.out" , "w" , stdout ) ;
}
ull sumFrom1ToN(int n) { return (ull)n * (n + 1) / 2; }
ull sumFromAtoB(ll a, ll b) { return (max(a, b) - min(a, b) + 1) * (a + b) / 2; }

bool isPrime(ull val) {
    if (val == 0 || val == 1) return false;
    for (ll i = 2; i * i <= val; i++) {
        if (val % i == 0) return false ;
    }
    return true ;
}
vll getDivisors(ll n) {
    vll v;
    for (int i = 1; i * i <= n; ++i) {
        if (n % i == 0) {
            v.push_back(i); v.push_back(n / i);
        }
    }
    sort(all(v));
    return v;
}
bool isLucky(ull n) {
    if (n <= 0) return false;
    while (n > 0) {
        if ((n % 10 != 7) && (n % 10 != 4)) return false;
        n /= 10;
    }
    return true;
}

string toBinary (ll decimal) {
    string s;
    while (decimal) {
        s += to_string(decimal % 2);
        decimal /= 2;
    }
    return s ;
}
ll sumV(vector<int> &v) {
    return (long long)accumulate(v.begin(), v.end(), (long long)0);
}
void solve() {
    int n; cin >> n;
    vi v(n);

}
int main() {
    FAST
//    FILES();
    int T = 1;
//    cin >> T;
    while (T--) {
        solve();
    }
}
A cryptocurrency trading bot is a software program that uses automated bot algorithms to make bitcoin trades on behalf of traders. Its functions include market data analysis, opportunity identification, and trade execution using preset parameters and techniques. Because these bots may run continuously, traders can profit from market changes even when they are not actively tracking the market.

Hivelance is a leading provider of innovative solutions in the cryptocurrency trading industry. With a dedicated team of experts and a commitment to excellence, we aim to revolutionize the way traders navigate the digital asset market.

"At Hivelance, our mission is to empower traders with the tools they need to succeed in the crypto market, With the launch of our advanced cryptocurrency trading bot, we are excited to offer a solution that combines cutting-edge technology, powerful features, and ease of use, ultimately enabling our users to multiply their crypto portfolio and achieve their financial goals."
Binance clone script is a replica of the Binance exchange software, which enables for a large number of trades to be made at the same time and has many capabilities, as previously stated. However, despite being corresponding to Binance, it is not Binance. In fact, they can be customized. It follows that you can include or exclude certain elements from the software used to create a clone as needed to meet your business needs.

Hivelance is a company you can rely on to produce dependable cryptocurrency exchange development solutions like Binance clone script for your every need. Hivelance has almost ten years of experience in the cryptocurrency exchange development business.

Our area of expertise is the development of cutting-edge cryptocurrency exchanges, and we have a team of developers who are the best at it. You can be sure that whatever your requirement is, we have the expertise and resources to fulfil it because we deal with a variety of tech stacks.
Trust Wallet is a popular cryptocurrency wallet that allows users to store, buy, sell, and swap cryptocurrencies. It is a secure and user-friendly wallet that is available on both Android and iOS devices. If you are looking to create your own cryptocurrency wallet, you can use a Trust Wallet clone script. A Trust Wallet clone script is a ready-made solution that allows you to quickly and easily launch your own wallet. 

Hivelance is a leading cryptocurrency Exchange and Crypto wallet development company that offers a wide range of services, including Trust Wallet clone script development. We have a team of experienced developers who are proficient in blockchain technology and have expertise in developing secure and scalable cryptocurrency wallet apps. We offer a wide range of customization options, so you can create a wallet that meets your specific needs.
$post_id = wp_insert_post(array (
   'post_type' => 'your_post_type',
   'post_title' => $your_title,
   'post_content' => $your_content,
   'post_status' => 'publish',
   'comment_status' => 'closed',
   'ping_status' => 'closed',
   'meta_input' => array(
      '_your_custom_1' => $custom_1,
      '_your_custom_2' => $custom_2,
      '_your_custom_3' => $custom_3,
    ),
));
var elements = document.getElementsByTagName("sup");

while(elements.length > 0){
    elements[0].parentNode.removeChild(elements[0]);
}
import java.util.*;

class Factorial

{

    public static void main (String[] args)

    {

        int fact=1;

        int n,i;

        Scanner s = new Scanner(System.in);

           System.out.print("Enter Number ");

           

           n = s.nextInt();

           for(i=1;i<=n;i++)

           {

               fact = fact*i;

           }

          System.out.println("Factorial of "+n+"is "+fact);

    }

}
#include <iostream>
#include <cstring>
#include <vector>
using namespace std;


struct Client{
    string name;
    int phoneNumber;
};

class HashTable {
public:
    static const int size=10;
    Client table[size];
    int collisions[size];
    
    int hash(int key) { return key%size; }
    
    HashTable() { for(int i=0;i<size;i++) collisions[i]=0; }
    
    //function for linear probing
    void linearprobing(Client client){
     
    int index=hash(client.phoneNumber);
    int count=0;
    
    while(collisions[index]==1){
        index=(index+1)%size;
        count++;
    }
    
    table[index]=client;
    collisions[index]=1;
    cout<<"Inserted "<<client.name<<"'s phone number after "<<count<<" collisions using linear probing."<<endl;
 }
  
//function for quadratic probing  
 void quadraticprobing(Client client){
     
    int index=hash(client.phoneNumber);
    int count=0;
    while(collisions[index]!=0 && collisions[index]!=client.phoneNumber){
        count++;
        index=(hash(client.phoneNumber)+count*count)%size;
    }
    table[index]=client;
    collisions[index]=1;
    cout<<"Inserted "<<client.name<<"'s phone number after "<<count<<" collisions using quadratic probing."<<endl;
 }
 
 bool search(int phoneNumber){
    int index=hash(phoneNumber);
    int count=0;
    while(collisions[index]!=0) {
        if(table[index].phoneNumber==phoneNumber){
            cout<<"Found "<<table[index].name<<"'s phone number after "<<count <<" comparisons using linear probing."<< endl;
            return true;
        }
        index=(index+1)%size;
        count++;
    }
    cout<<"Phone number not found."<<endl;
    return false;
}
    
};


int main()
{
    HashTable ht;
    int number;
    string name;
    int x=11, y;
    
    while(x!=0){
        cout<<"\n1.INSERT NUMBER\n2.SEARCH NUMBER\n0.EXIT\nEnter your choice:";
        cin>>x;
 
        switch(x){
            
                case 1:
                  cout<<"\nEnter name:";
                  cin>>name;
                  cout<<"Enter number:";
                  cin>>number;
                  cout<<"\n\n1.Linear probing\n2.Quadratic probing\nEnter your option:";
                  cin>>y;
            
                  if(y==1) ht.linearprobing({name, number});
                  else if(y==2) ht.quadraticprobing({name, number});
                  else cout<<"Error! invalid option\n\n";
                break;
                
                case 2:
                  cout<<"\nEnter number to search:";
                  cin>>number;
                  ht.search(number);
                break;
                
                case 0:
                  cout<<"\nExiting\n\n";
                break;
                
                default:
                  cout<<"\nInvalid choice!!\nEnter again\n\n";
                break;
                }
    }
 return 0;
}
package com.example.codelearning.api;

import com.aspose.cells.*;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;

@RestController
@RequestMapping("excel")
public class ExcelApi {

    @GetMapping("/download")
    public ResponseEntity<Resource> downloadExcel() throws Exception {

        Workbook workbook = new Workbook();
        Worksheet worksheet = workbook.getWorksheets().get(0);

        // Tạo dữ liệu và biểu đồ
        createChartData(worksheet);

        // Lưu workbook vào ByteArrayOutputStream
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        workbook.save(outputStream, SaveFormat.XLSX);

        InputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
        org.apache.poi.ss.usermodel.Workbook workbookApache = WorkbookFactory.create(inputStream);

        workbookApache.removeSheetAt(1);
        outputStream.reset();
        workbookApache.write(outputStream);

        // Chuẩn bị tệp Excel để tải xuống
        ByteArrayResource resource = new ByteArrayResource(outputStream.toByteArray());

        return ResponseEntity.ok()
                .contentType(MediaType.parseMediaType("application/vnd.ms-excel"))
                .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=chart_example.xlsx")
                .body(resource);
    }

    private void createChartData(Worksheet worksheet) {
        // Tạo dữ liệu mẫu
        Cells cells = worksheet.getCells();
        cells.get("A1").setValue("Month test test test");
        cells.get("A2").setValue("Oct");
        cells.get("A3").setValue("Nov");

        cells.get("B1").setValue("Toyota");
        cells.get("B2").setValue(32);
        cells.get("B3").setValue(42);

        cells.get("C1").setValue("VinFast");
        cells.get("C2").setValue(100);
        cells.get("C3").setValue(125);

        Range range = worksheet.getCells().createRange("A1:C3");
        Style style = worksheet.getWorkbook().createStyle();
        style.setBorder(BorderType.TOP_BORDER, CellBorderType.THIN, Color.getBlack());
        style.setBorder(BorderType.BOTTOM_BORDER, CellBorderType.THIN, Color.getBlack());
        style.setBorder(BorderType.LEFT_BORDER, CellBorderType.THIN, Color.getBlack());
        style.setBorder(BorderType.RIGHT_BORDER, CellBorderType.THIN, Color.getBlack());
        range.setStyle(style);

        // Đặt chiều rộng cho cột A
        Column columnA = worksheet.getCells().getColumns().get(0);
        columnA.setWidth(25);

        // Tạo biểu đồ
        int chartIndex = worksheet.getCharts().add(ChartType.LINE_WITH_DATA_MARKERS, 5, 0, 15, 5);
        Chart chart = worksheet.getCharts().get(chartIndex);

        chart.getNSeries().add("B2:B3", true);
        chart.getNSeries().get(0).setName("Toyota");
        chart.getNSeries().add("C2:C3", true);
        chart.getNSeries().get(1).setName("VinFast");

        chart.getNSeries().setCategoryData("A2:A3");

        chart.getChartArea().setWidth(400);
        chart.getChartArea().setHeight(300);
    }
}
$post_id = wp_insert_post(array (
   'post_type' => 'your_post_type',
   'post_title' => $your_title,
   'post_content' => $your_content,
   'post_status' => 'publish',
   'comment_status' => 'closed',
   'ping_status' => 'closed',
   'meta_input' => array(
      '_your_custom_1' => $custom_1,
      '_your_custom_2' => $custom_2,
      '_your_custom_3' => $custom_3,
    ),
));
$user = $_POST['user'] ?? $_SESSION['user'] ?? $_COOKIE['user'] ?? '';
<?php
    var_dump(5 ?: 0); // 5
    var_dump(false ?: 0); // 0
    var_dump(null ?: 'foo'); // 'foo'
    var_dump(true ?: 123); // true
    var_dump('rock' ?: 'roll'); // 'rock'
?>
//code heapsort

#include<iostream>
#include<algorithm>
using namespace std;

class Heap{
    int n;
    int *minheap, *maxheap;
    
    public:
    void get();
    void displaymin(){
        cout <<"minimum number is: "<<maxheap[0]<<endl;
    }
    void displaymax(){
        cout<<"maximun number is: "<<minheap[0]<<endl;
    }
    void upadjust(bool,int);
};

void Heap::get(){
    cout<<"enter the number of entries you want: ";
    cin >> n;
    minheap= new int[n];
    maxheap= new int[n];
    
    cout <<"enter numbers :"<<endl;
    for(int i=0; i<n; i++){
        int k;
        cin >>k;
        minheap[i]=k;
        upadjust(0,i);
        maxheap[i]=k;
        upadjust(1,i);
    }
}

void Heap::upadjust(bool m, int l){
    int s;
    if(!m){
        while(minheap[(l-1)/2]<minheap[l]){
            swap(minheap[l], minheap[(l-1)/2]);
            l=(l-1)/2;
            
            if(l== -1) break;
        }
      
    }else{
        while(maxheap[(l-1)/2]>maxheap[l]){
            swap(maxheap[l], maxheap[(l-1)/2]);
            l=(l-1)/2;
            
            if(l== -1) break;
        }
    }
}



int main(){
    int choice;
    cout<<"1. min heap"<<endl;
    cout<<"2. max heap"<<endl;
    cout<<"enter your choice: "<<endl;
    cin >>choice;
    
    Heap h;
    
    switch(choice){
        case 1:
            h.get();
            h.displaymax();
            break;
        case 2:
            h.get();
            h.displaymax();
            break;
        return(0);
    }
    
    return 0;
}
#include <iostream>
#include<queue>
#include <string>
using namespace std;

struct patient{
    string name;
    int priority;
};

bool operator<(const patient &a, const patient &b){return a.priority<b.priority;}

int main(){
    priority_queue<patient> q;
    
    int choice;
    do{
        cout<<"1. add patient"<<endl;
        cout<<"2. treat patient"<<endl;
        cout<<"3. exit"<<endl;
        cout<<"enter your choice: "<<endl;
        cin>>choice;
        
        switch(choice){
            case 1:
            {
                patient p;
                cout<<"enter patient name: "<<endl;
                cin>>p.name;
                cout<<"priority-> 1. serious 2. non serious 3. general checkup\n enter priority"<<endl;
                cin >>p.priority;
                q.push(p);
                cout<<"patient added successfully"<<endl;
            }
            break;
            
            case 2:
            {
                if(q.empty()){cout<<"no patient in the queue"<<endl;}
                else{cout<<"serving patient "<<q.top().name<<endl;}
                q.pop();
            }
            break;
            
            case 3:cout<<"thank you! visit again!"<<endl;
            break;
            
            default:cout<<"Enter a valid choice"<<endl;
        }
    }while(choice!=3);
    
    return 0;
}
$post_id = wp_insert_post(array (
   'post_type' => 'your_post_type',
   'post_title' => $your_title,
   'post_content' => $your_content,
   'post_status' => 'publish',
   'comment_status' => 'closed',
   'ping_status' => 'closed',
   'meta_input' => array(
      '_your_custom_1' => $custom_1,
      '_your_custom_2' => $custom_2,
      '_your_custom_3' => $custom_3,
    ),
));
   function save_function()
{

    $subject_term = 'subject';
    $my_subject_term = term_exists($subject_term, 'my_custom_taxonomy');   // check if term in website or no
    // Create Term if it doesn't exist
    if (!$my_subject_term) {
        $my_subject_term = wp_insert_term($subject_term, 'my_custom_taxonomy');
    }
    $custom_tax = array(
        'my_custom_taxonomy' => array(
            $my_subject_term['term_taxonomy_id'],
        )
    );

    // MESSAGE FIELDS
    $public_post = array(
        'post_title' => filter_input(INPUT_POST, 'title'),
        'post_author' => 1,
        'post_type' => 'message',
        'post_status' => 'pending',
        'tax_input' => $custom_tax
    );

    $post_id = wp_insert_post($public_post);

    
}
sudo apt install ./<file>.deb

# If you%27re on an older Linux distribution, you will need to run this instead:
# sudo dpkg -i <file>.deb
# sudo apt-get install -f # Install dependencies
/* Access Variables

   objectName.variableName; this way is very rare mostly you use methods to get variables
   
   Access Methods
   
   objectName.methodName; */

Example;

public class CarApp{
    public static void main(String[] args){
      
    Tesla redTesla = new Tesla(5,56999,..);
    Tesla blueTesla = new Tesla(4,66999,..);
      
    // accessing
   
    redTesla.getPrice(); // returns 56999
    blueTesla.getSeat(); // returns 4

    redTesla.startEngine() // returns the engine is started
    
   
    }
}
// className objectName = new className(parameters);

Example:
  public class CarApp{
    public static void main(String[] args){
      
    Tesla redTesla = new Tesla(5,56999,..);
    Tesla redTesla = new Tesla(4,66999,..);
      
   
    }
}
  /* accessmodifier keyword(class) className{
             variables;
             methods
            }  */

  public class Tesla{
      byte numberOfSeats;
      int price;
      int mileage;

  public void startEngine(){
    System.out.println("Then Engine is started: ");
  }
}
byte numberOfSeats = 5;
byte emissionSticker = 4;

short power = 362;
short horsepower = 492;
    
int price = 39999;
int mileage = 14999;

long registartionNumber = 354255256499845L;

float fuelConsumptionCombined = 15.5F;

boolean isdamaged = true;

char energyEfficiencey = 'G';
byte numberOfSeats = 5;
byte emissionSticker = 4;

short power = 362;
short horsepower = 492;
    
int price = 39999;
int mileage = 14999;

long registartionNumber = 354255256499845L;

float fuelConsumptionCombined = 15.5F;

boolean isdamaged = true;

char energyEfficiencey = 'G';
<p class="line-item-property__field">
  <label for="">お名前</label>
  <input id="" type="text" name="properties[お名前]" form="product-form-{{ section.id }}" >
</p>
      <li>
        {% for banner in shop.metaobjects.banners.values %}
          {{ banner.link.value }}
        {% endfor %}
# see https://unix.stackexchange.com/a/295652/332452
source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh

# see https://wiki.archlinux.org/title/GNOME/Keyring#xinitrc
eval $(/usr/bin/gnome-keyring-daemon --start)
export SSH_AUTH_SOCK

# see https://github.com/NixOS/nixpkgs/issues/14966#issuecomment-520083836
mkdir -p "$HOME"/.local/share/keyrings
sudo pacman -S gnome-keyring libsecret libgnome-keyring
Using PyPi - $ pip3 install google_images_download--------------------------------------------------------------------Using CLI - (cd into working directory)$ git clone https://github.com/hardikvasa/google-images-download.git$ cd google-images-download $ python setup.py install
star

Mon Jun 05 2023 15:48:36 GMT+0000 (UTC)

@Mohamedshariif #java

star

Mon Jun 05 2023 15:40:13 GMT+0000 (UTC)

@AbishKamran

star

Mon Jun 05 2023 14:00:52 GMT+0000 (UTC)

@AbishKamran

star

Mon Jun 05 2023 13:32:43 GMT+0000 (UTC) https://maticz.com/brc20-tokens

@RebbaLancaster #unity3dgamedevelopmentcompany #unitygamedevelopment

star

Mon Jun 05 2023 12:34:52 GMT+0000 (UTC)

@menaheero

star

Mon Jun 05 2023 11:54:11 GMT+0000 (UTC) https://maticz.com/how-to-create-a-crypto-exchange

@RebbaLancaster #unity3dgamedevelopmentcompany #unitygamedevelopment

star

Mon Jun 05 2023 11:49:23 GMT+0000 (UTC) https://ecom.loca.lt/products

@sunto123

star

Mon Jun 05 2023 11:47:12 GMT+0000 (UTC)

@Mohamedshariif #java

star

Mon Jun 05 2023 10:45:25 GMT+0000 (UTC)

@YuqiPu

star

Mon Jun 05 2023 10:43:21 GMT+0000 (UTC) https://tenhou.net/3/

@rongda2

star

Mon Jun 05 2023 10:41:25 GMT+0000 (UTC)

@YuqiPu

star

Mon Jun 05 2023 10:40:42 GMT+0000 (UTC)

@YuqiPu

star

Mon Jun 05 2023 10:38:28 GMT+0000 (UTC)

@YuqiPu

star

Mon Jun 05 2023 10:38:14 GMT+0000 (UTC)

@YuqiPu

star

Mon Jun 05 2023 09:33:33 GMT+0000 (UTC)

@JISSMONJOSE #react.js #css #javascript

star

Mon Jun 05 2023 09:11:59 GMT+0000 (UTC)

@AngeSamuels

star

Mon Jun 05 2023 09:04:22 GMT+0000 (UTC) https://maticz.com/p2p-cryptocurrency-exchange-development

@jamielucas #react.js

star

Mon Jun 05 2023 08:42:17 GMT+0000 (UTC) https://chat.openai.com/

@ainulSarker

star

Mon Jun 05 2023 07:47:04 GMT+0000 (UTC)

@JISSMONJOSE #react.js #css #javascript

star

Mon Jun 05 2023 07:31:34 GMT+0000 (UTC)

@shaam

star

Mon Jun 05 2023 06:58:47 GMT+0000 (UTC) https://www.hivelance.com/crypto-trading-bot-development

@stevejohnson #cryptotrading bot #cryptotrading bot development

star

Mon Jun 05 2023 04:11:42 GMT+0000 (UTC) https://wordpress.stackexchange.com/questions/106973/wp-insert-post-or-similar-for-custom-post-type

@leninzapata #php

star

Sun Jun 04 2023 21:03:12 GMT+0000 (UTC) https://chat.openai.com/

@rezaeir

star

Sun Jun 04 2023 20:01:51 GMT+0000 (UTC)

@royalmusaib05

star

Sun Jun 04 2023 19:23:56 GMT+0000 (UTC)

@saakshi #c++

star

Sun Jun 04 2023 18:20:27 GMT+0000 (UTC)

@manhmd #java

star

Sun Jun 04 2023 15:25:02 GMT+0000 (UTC) https://wordpress.stackexchange.com/questions/106973/wp-insert-post-or-similar-for-custom-post-type

@leninzapata #php

star

Sun Jun 04 2023 15:23:21 GMT+0000 (UTC) https://stackoverflow.com/questions/72266190/difference-between-php-and

@leninzapata #php

star

Sun Jun 04 2023 15:23:16 GMT+0000 (UTC) https://stackoverflow.com/questions/72266190/difference-between-php-and

@leninzapata #php

star

Sun Jun 04 2023 15:22:52 GMT+0000 (UTC) https://stackoverflow.com/questions/1993409/operator-the-elvis-operator-in-php

@leninzapata #php

star

Sun Jun 04 2023 12:29:16 GMT+0000 (UTC)

@saakshi #c++

star

Sun Jun 04 2023 12:27:54 GMT+0000 (UTC)

@saakshi #c++

star

Sun Jun 04 2023 06:37:09 GMT+0000 (UTC) https://www.techonthenet.com/excel/formulas/isempty.php

@minhhuyen172002 #vba

star

Sun Jun 04 2023 06:15:03 GMT+0000 (UTC) https://wordpress.stackexchange.com/questions/106973/wp-insert-post-or-similar-for-custom-post-type

@leninzapata

star

Sun Jun 04 2023 06:14:30 GMT+0000 (UTC) https://stackoverflow.com/questions/64371962/wordpress-wp-insert-post-is-creating-new-taxonomy-term-when-creating-new-custom

@leninzapata #php

star

Sun Jun 04 2023 04:55:11 GMT+0000 (UTC) https://code.visualstudio.com/docs/setup/linux

@GDub662 #

star

Sun Jun 04 2023 04:55:08 GMT+0000 (UTC) https://code.visualstudio.com/docs/setup/linux

@GDub662 #vsc

star

Sun Jun 04 2023 04:47:39 GMT+0000 (UTC)

@gokulz

star

Sun Jun 04 2023 04:28:14 GMT+0000 (UTC)

@gokulz

star

Sun Jun 04 2023 04:07:17 GMT+0000 (UTC)

@gokulz

star

Sun Jun 04 2023 03:42:44 GMT+0000 (UTC)

@gokulz

star

Sun Jun 04 2023 03:40:43 GMT+0000 (UTC)

@gokulz

star

Sun Jun 04 2023 01:35:21 GMT+0000 (UTC)

@akairo0902

star

Sun Jun 04 2023 01:06:58 GMT+0000 (UTC)

@akairo0902

star

Sat Jun 03 2023 20:35:00 GMT+0000 (UTC) https://code.visualstudio.com/docs/editor/settings-sync#_troubleshooting-keychain-issues

@Anzelmo

star

Sat Jun 03 2023 20:34:52 GMT+0000 (UTC) https://code.visualstudio.com/docs/editor/settings-sync#_troubleshooting-keychain-issues

@Anzelmo

star

Sat Jun 03 2023 16:31:42 GMT+0000 (UTC) https://www.google.com/search?q

@GDub662 #whatever

Save snippets that work with our extensions

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