Snippets Collections
<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class UserCreateRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'first_name' => 'required',
            'last_name' => 'required',
            'email' => 'required|email|unique:user',
            'role_id' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'email.unique' => 'Email already exists',
        ];
    }
}
flex-direction: column-reverse !important;
#include <iostream>
using namespace std;

void write_vertical(int n);

int main()
{
    int n;
    
    cout << "Recursion" << endl
        << "Enter a number with one or more digits: ";
    cin >> n;
    cout << "--------------------------------------" << endl;
    write_vertical(n);
    
    return 0;
}

void write_vertical(int n)
{
    if (n < 10)
    {
        cout << n << endl;
    }
    else
    {
        write_vertical(n / 10);
        cout << (n % 10) << endl;
    }
}
/**
 * Enable smooth scrolling on the whole document
 */
html {
	scroll-behavior: smooth;
}


/** Animations can cause issues for users who suffer from motion sickness and other conditions.
 * Disable smooth scrolling when users have prefers-reduced-motion enabled
 */
@media screen and (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
  function higherLower() {
    var randomNumber = Math.floor(Math.random() * 100) + 1;
    var input = document.querySelector('#input').value;

    console.log(randomNumber);

    if (input === randomNumber) {
      alert('Your right!');
    }

    if (input < randomNumber) {
      alert('higher');
    }

    if (input > randomNumber) {
      alert('lower');
    }
  }
-- HIGH_SPEND_ON_CC WEEKLY
select DISTINCT '2022-10-28' AS starting_date  -- DATE_SUB('{{ds}}',34) 
,'2022-11-03' AS ending_date --DATE_SUB('{{ds}}',4) 
,a.identifier identifier
,a.active_days active_days
,a.comment comment
,a.value value
,'high_spend_on_cc' red_flag
,'monthly' date_range
,'AML' `group`
,'FRA' `type`
,'Alerts' type_fra
,'User' issue_type
,'UPI' sub_issue_type
,(case when e.identifier is null then 'New' else 'Repeat' end) as new_or_repeat
,'2022-11-04' run_date from
    (select eventdata_senderuser identifier
    ,count(distinct day) active_days
    ,count(distinct eventdata_transactionid) comment
    ,sum(eventdata_totaltransactionamount)/100 value
    from foxtrot_stream.payment_backend_transact
    where year IN (year('2022-10-28'), year('2022-11-03'))
    and month IN (month('2022-10-28'), month('2022-11-03'))
    AND Date(`time`) BETWEEN '2022-10-28' AND '2022-11-03'
    and eventdata_senderpginvolved = true
    and eventdata_errorcode = 'SUCCESS'
    and eventdata_sendertype = 'INTERNAL_USER'
    and eventdata_senderpginstrument = 'CREDIT_CARD'
    and eventdata_transfermode = 'PEER_TO_MERCHANT'
    AND eventdata_receiversubtype = 'ONLINE_AGGREGATOR'
    group by eventdata_senderuser
    -- having sum(eventdata_totaltransactionamount)/100 >= 2000000
    order by value desc
    limit 10)a
LEFT JOIN
    (select identifier from fraud.aml_freshdesk_month UNION select identifier from fraud.aml_freshdesk)e
on a.identifier = e.identifier
left join
    (select user_ext_id AS identifier, MAX(updated) as BLdate
    from users.users 
    where blacklisted = 1 and blacklist_reason = 'SAM'
    GROUP BY user_ext_id HAVING BLdate < '2022-11-04')f
On a.identifier = f.identifier
where a.identifier is NOT NULL AND f.identifier is NULL
order by a.value desc limit 5
 %jdbc(hive)
set tez.queue.name=default;
set hive.execution.engine=tez;

-- CONVERT TO WEEKLY
select DISTINCT '2022-10-28' starting_date --DATE_SUB('{{ds}}',34)
,'2022-11-03' ending_date --DATE_SUB('{{ds}}',4)
,rcvr.rcvr_active_days as active_days
,'weekly' as date_range
,b.rcvr_usr as identifier
,'Receiver_dec_val_80p' as red_flag
,rcvr.amt value
,b.dec_per comment
,b.txn as txns
,(case when e.identifier is null then 'New' else 'Repeat' end) as new_or_repeat
,'AML' AS `group`
,'FRA' AS `type`
,'Alerts' AS type_fra
,'User' AS issue_type
,'UPI' AS sub_issue_type
,'2022-11-04' as run_date from
    (select a.receiveruser rcvr_usr
    ,count(distinct case when a.amt not like '%.0%' then a.txn end) dec_txn
    ,count(distinct a.txn) txn
    ,count(distinct case when a.amt not like '%.0%' then a.txn end)/count(distinct a.txn) dec_per
    ,sum(case when a.amt not like '%.0%' then a.amt end) dec_val
    ,sum(a.amt) val
    from
        (select receiveruser
        ,cast(totaltransactionamount as string) amt
        ,transaction_id txn
        from fraud.transaction_details_v3
        where receivertype = 'INTERNAL_USER' AND receiveruser IS NOT NULL
        and Date(updated_date) BETWEEN '2022-10-28' AND '2022-11-03'
        and upi_flag = true
        and sendertype <> 'MERCHANT'
        and errorcode = 'SUCCESS')a
    group by a.receiveruser
    having count(distinct case when a.amt not like '%.0%' then a.txn end)/count(distinct a.txn) > 0.8
    and sum(case when a.amt not like '%.0%' then a.amt end) > 100000 --1000000
    order by val, txn desc
    limit 10)b
INNER JOIN
    (select receiveruser
    ,count(distinct updated_date) rcvr_active_days
    ,count(distinct transaction_id) txn
    ,sum(totaltransactionamount) amt
    ,sum(totaltransactionamount)/count(distinct transaction_id) rcvr_avg_txn_val
    ,count(distinct case when hour(transaction_time) >= 22 or hour(transaction_time) <= 6 then transaction_id end) rcvr_off_hour_txn
    ,count(distinct senderuserid) ct_senders
    from fraud.transaction_details_v3
    where Date(updated_date) BETWEEN '2022-10-28' AND '2022-11-03'
    and upi_flag = true
    and errorcode = 'SUCCESS' and pay_transaction_status = 'COMPLETED'
    group by receiveruser 
    HAVING count(distinct transaction_id) > 1)rcvr
on b.rcvr_usr = rcvr.receiveruser
left join 
    (select identifier from fraud.aml_freshdesk_month UNION select identifier from fraud.aml_freshdesk) e
on b.rcvr_usr = e.identifier
left join
    (select user_ext_id AS identifier, MAX(updated) as BLdate
    from users.users 
    where blacklisted = 1 and blacklist_reason = 'SAM'
    GROUP BY user_ext_id HAVING BLdate < '2022-11-04')f
On b.rcvr_usr = f.identifier
where b.rcvr_usr is NOT NULL AND f.identifier is NULL
order by rcvr.amt desc limit 5
$ pacman -Qi <package-name>
/**
 * Media gallery upload image rules: max with, height and size
 */
 
 add_filter('wp_handle_upload_prefilter','mdu_validate_image_size');
function mdu_validate_image_size( $file ) {
 
    // Calculate the image size in KB
    $image_size = $file['size']/1024;
    // File size limit in KB
    $limit = 500;
 
    $image = getimagesize($file['tmp_name']);
    $maximum = array(
        'width' => '2000',
        'height' => '1500'
    );
    $image_width = $image[0];
    $image_height = $image[1];
 
 
    $too_big = "Image file size is too big. It needs to be smaller than  $limit KB. Please save photos as jpg no larger than {$maximum['width']} by {$maximum['height']} pixels.";
 
    $too_large = "Image dimensions are too large. Maximum size is {$maximum['width']} by {$maximum['height']} pixels. Uploaded image is $image_width by $image_height pixels.";
     
 
    // Check if it's an image
    $is_image = strpos($file['type'], 'image');
 
    if ( ( $image_size > $limit ) && ($is_image !== false) ) {
        //add in the field 'error' of the $file array the message
        $file['error'] = $too_big; 
        return $file;
    }
    elseif ( $image_width > $maximum['width'] || $image_height > $maximum['height'] ) {
        //add in the field 'error' of the $file array the message
        $file['error'] = $too_large; 
        return $file;
    }
    else
        return $file;
}
/**
 * Change product images on a single product page for mobile - ussue "properly size images" page speed
 */

add_action(
    'init',
    function() {
        // If not mobile device do nothing.
        if ( ! wp_is_mobile() ) {
            return;
        }

        add_filter(
            'woocommerce_gallery_image_size',
            function ( $size ) {
                // Using the size check we apply the new thumbnail size to the main image only not to gallery thumbnails.
                return 'woocommerce_single' === $size ? 'woocommerce_thumbnail' : $size;
            }
        );
    }
);
set - samo unique elements

array - ne mozes dodavati nove

lists - mora biti mutableList da mozes dodavati

map - Key/Value; dictionary u Swiftu
val mapOfDays = mapOf(1 to "Monday", 2 to "Tuesday", 3 to "Wednesday")

arrayList - read & write
		- ArrayList<E>() -> empty arrayList
		- 
.wp-block-kadence-iconlist {
margin-left: 0!important;
}
<%= product.title %>
(print as it is value)


<% for(let product of prods){ %>
<% }%>
(iterate in between)
                             

                             
                             
                             
<!-- Head -->
<%- includes('includes/head.ejs')%>

<body>
    <!-- navigation of body -->
    <%- includes('includes/navigation.ejs')%>
    <h1>Page Not Found!</h1>
<!-- End Documents -->
<%- includes('includes/end.ejs')%>
  
  
(importing another ejs file)
function isEmpty(obj) {
  for(var prop in obj) {
    if(Object.prototype.hasOwnProperty.call(obj, prop)) {
      return false;
    }
  }

  return JSON.stringify(obj) === JSON.stringify({});
}
// because Object.keys(new Date()).length === 0;
// we have to do some additional check
obj // 👈 null and undefined check
&& Object.keys(obj).length === 0
&& Object.getPrototypeOf(obj) === Object.prototype
function isEmpty(obj) {
    return Object.keys(obj).length === 0;
}
public class ATM{
  // Static variables
  public static int totalMoney = 0;
  public static int numATMs = 0;

  // Instance variables
  public int money;

  public ATM(int inputMoney){
    this.money = inputMoney;
    numATMs += 1;
    totalMoney += inputMoney;
  }

  public void withdrawMoney(int amountToWithdraw){
    if(amountToWithdraw <= this.money){
      this.money -= amountToWithdraw;
      totalMoney -= amountToWithdraw;
    }
  }

  // Write your averageMoney() method here

  public static void averageMoney(){
    System.out.println(totalMoney / numATMs);
    System.out.println(this.money);
  }

  public static void main(String[] args){

    System.out.println("Total number of ATMs: " + ATM.numATMs); 
    ATM firstATM = new ATM(1000);
    ATM secondATM = new ATM(500);
    System.out.println("Total number of ATMs: " + ATM.numATMs); 

    System.out.println("Total amount of money in all ATMs: " + ATM.totalMoney);  
    firstATM.withdrawMoney(500);
    secondATM.withdrawMoney(200);
    System.out.println("Total amount of money in all ATMs: " + ATM.totalMoney);    

    // Call averageMoney() here
    ATM.averageMoney();
  }

}
public class ATM{
  // Static variables
  public static int totalMoney = 0;
  public static int numATMs = 0;

  // Instance variables
  public int money;

  public ATM(int inputMoney){
    this.money = inputMoney;

    // Steps 1 and 2: Edit numATMs and total money here
    numATMs += 1;
    totalMoney += inputMoney;
  }

  public void withdrawMoney(int amountToWithdraw){
    if(amountToWithdraw <= this.money){
      this.money -= amountToWithdraw;
      // Step 3: Edit totalMoney here
      totalMoney -= amountToWithdraw;
    }
  }

  public static void main(String[] args){

    System.out.println("Total number of ATMs: " + ATM.numATMs); 
    ATM firstATM = new ATM(1000);
    ATM secondATM = new ATM(500);
    System.out.println("Total number of ATMs: " + ATM.numATMs); 

    System.out.println("Total amount of money in all ATMs: " + ATM.totalMoney);  
    firstATM.withdrawMoney(500);
    secondATM.withdrawMoney(200);
    System.out.println("Total amount of money in all ATMs: " + ATM.totalMoney);    



  }

}
grade=input ("ENTER THE GRADE: ")
exp=int (input ("ENTER THE EXPERIANCE:"))
month=input ("ENTER THE MONTH NAME: ")
no_days=int (input ("ENTER THE NUMBER OF DAYS: "))

l=["JAN", "MARCH", "MAY", "JULY", "AUG", "OCT", "DEC"]
if grade=='p':
    bs=40300
    da=bs*.35
    hra=bs*0.15
    agp=10000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
        tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax=ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm
    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)

elif grade == 'asp':
    bs=35000
    da=bs*.35
    hra=bs*0.15
    agp=8000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
        tax=ann *0.1
        tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)
elif grade == 'r':
    bs=28000
    da=bs*.35
    hra=bs*0.15
    agp=6000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
       tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and an'''
grade=input ("ENTER THE GRADE: ")
'''

Id= int(input("Enter id : "))
exp=int (input ("ENTER THE EXPERIANCE:"))
month=input ("ENTER THE MONTH NAME: ")
no_days=int (input ("ENTER THE NUMBER OF DAYS: "))

l=["JAN", "MARCH", "MAY", "JULY", "AUG", "OCT", "DEC"]
if Id in range(1,21):
    bs=40300
    da=bs*.35
    hra=bs*0.15
    agp=10000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
        tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax=ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm
    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)

elif Id in range(21,41):
    bs=35000
    da=bs*.35
    hra=bs*0.15
    agp=8000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
        tax=ann *0.1
        tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)
elif Id in range(41,61):
    bs=28000
    da=bs*.35
    hra=bs*0.15
    agp=6000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
       tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)


elif Id in range(61,81):
    bs=25000
    da=bs*.35
    hra=bs*0.15
    agp=5000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
       tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)

elif Id in range(81,101):
    bs=20000
    da=bs*.35
    hra=bs*0.15
    agp=4000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
       tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)

n<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)


elif grade == 'a':
    bs=25000
    da=bs*.35
    hra=bs*0.15
    agp=5000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
       tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)
'''
grade=input ("ENTER THE GRADE: ")
'''

Id= int(input("Enter id : "))
exp=int (input ("ENTER THE EXPERIANCE:"))
month=input ("ENTER THE MONTH NAME: ")
no_days=int (input ("ENTER THE NUMBER OF DAYS: "))

l=["JAN", "MARCH", "MAY", "JULY", "AUG", "OCT", "DEC"]
if Id in range(1,21):
    bs=40300
    da=bs*.35
    hra=bs*0.15
    agp=10000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
        tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax=ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm
    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)

elif Id in range(21,41):
    bs=35000
    da=bs*.35
    hra=bs*0.15
    agp=8000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
        tax=ann *0.1
        tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)
elif Id in range(41,61):
    bs=28000
    da=bs*.35
    hra=bs*0.15
    agp=6000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
       tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)


elif Id in range(61,81):
    bs=25000
    da=bs*.35
    hra=bs*0.15
    agp=5000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
       tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)

elif Id in range(81,101):
    bs=20000
    da=bs*.35
    hra=bs*0.15
    agp=4000
    sal=bs+da+hra+agp
    gs=sal*(1+0.1)**exp
    ann=gs*12
    if ann<500000:
       tax=ann*0.1
    elif ann>=500000 and ann<700000:
        tax-ann*0.15
    elif ann>=700000 and ann<900000:
        tax=ann*0.2
    else:
        tax=ann*0.3
    taxpm=tax/12
    netsal=gs-taxpm

    if month in l:
        exs=no_days* (netsal/31)
        print ("EXACT SALARY OF GRADE PIS:", exs)
    else:
        exs=no_days* (netsal/30)
        print ("EXACT SALAY OF GRADE P IS: ", exs)

public class ATM{

  // Step 2: Create your static variables here
public static int totalMoney = 0;
public static int numATMs = 0;
  // Instance variables
  public int money;

  public ATM(int inputMoney){
    this.money = inputMoney;
  }

  public void withdrawMoney(int amountToWithdraw){
    if(amountToWithdraw <= this.money){
      this.money -= amountToWithdraw;
    }
  }

  public static void main(String[] args){
    // Step 1: Create your two ATMs here
  ATM firstATM = new ATM(1000);
  ATM secondATM = new ATM(500);
    // Step 3: Print your static variable in three different ways here
    System.out.println(ATM.totalMoney);
    System.out.println(firstATM.totalMoney);
    System.out.println(secondATM.totalMoney);
  }

}
l = [dict(zip([1],[x])) for x in range(1,3)]
print(l)


# Output
#[{1: 1}, {1: 2}]
public class Bank{
  private CheckingAccount accountOne;
  private CheckingAccount accountTwo;

  public Bank(){
    this.accountOne = new CheckingAccount("Zeus", 100, "1");
    this.accountTwo = new CheckingAccount("Hades", 200, "2");
  }

  public static void main(String[] args){
    Bank bankOfGods = new Bank();
    bankOfGods.accountOne.getAccountInformation();
    bankOfGods.accountOne.calculateNextMonthInterest();
  }

}

//next page
public class CheckingAccount{
  private String name;
  private int balance;
  private String id;
  private double interestRate;

  public CheckingAccount(String inputName, int inputBalance, String inputId){
    this.name = inputName;
    this.balance = inputBalance;
    this.id = inputId;
    this.interestRate = 0.02;
  }

  public void getAccountInformation(){
    System.out.println("Money in account: " + this.getBalance());
    System.out.println("Next Month's Interest: " + this.calculateNextMonthInterest());

  }

  private int getBalance(){
    return this.balance;
  }

  // Write the calculateNextMonthInterest() here
  private double calculateNextMonthInterest(){
    return this.interestRate * this.balance;
  }

}
public class Person{
  public int age;
  public int wisdom;
  public int fitness;

  public Person(int inputAge){
    this.age = inputAge;
    this.wisdom = inputAge * 5;
    this.fitness = 100 - inputAge;
  }

  public void setAge(int newAge){
    this.age = newAge;
  }

  public void setWisdom(int newWisdom){
    this.wisdom = newWisdom;
  }

  public void setFitness(int newFitness){
    this.fitness = newFitness;
  }

  public void hasBirthday(){
    //Complete this method
    this.setAge(this.age + 1);
    this.setWisdom(this.wisdom + 5);
    this.setFitness(this.fitness - 3);
  }

  public static void main(String[] args){
    Person emily = new Person(20);
    emily.hasBirthday();
    System.out.println("New age is: " + emily.age);
    System.out.println("New wisdom is: " + emily.wisdom);
    System.out.println("New fitness is: " + emily.fitness);
  }
}
public class SavingsAccount{

  public String owner;
  public int balanceDollar;
  public double balanceEuro;

  public SavingsAccount(String owner, int balanceDollar){
    // Complete the constructor
    this.owner = owner;
    this.balanceDollar = balanceDollar;
    this.balanceEuro = balanceDollar * 0.85;

  }

  public void addMoney(int balanceDollar){
    // Complete this method
    System.out.println("Adding " + balanceDollar + " dollars to the account.");
    this.balanceDollar += balanceDollar;
    System.out.println("The new balance is " + this.balanceDollar + " dollars.");
  }

  public static void main(String[] args){
    SavingsAccount zeusSavingsAccount = new SavingsAccount("Zeus", 1000);

    // Make a call to addMoney() to test your method
    zeusSavingsAccount.addMoney(2000);

  }

}
public class Bank{
  private CheckingAccount accountOne;
  private CheckingAccount accountTwo;

  public Bank(){
    accountOne = new CheckingAccount("Zeus", 100, "1");
    accountTwo = new CheckingAccount("Hades", 200, "2");
  }

  public static void main(String[] args){
    Bank bankOfGods = new Bank();
    bankOfGods.accountOne.setBalance(5000);
    System.out.println(bankOfGods.accountOne.getBalance());
  }

}

//other file with private classes
public class CheckingAccount{
  private String name;
  private int balance;
  private String id;

  public CheckingAccount(String inputName, int inputBalance, String inputId){
    name = inputName;
    balance = inputBalance;
    id = inputId;
  }

  //Write new methods here:
    public int getBalance() {
    return balance;
  }

    public void setBalance(int newBalance) {
    balance = newBalance;
  }



}
add_action( 'wp_footer', function () { ?>
	<script>
		(function($){
			  $(document).on('ready', function(){
				$('.sp-wp-team-pro-wrapper .sp-team-pro-item[data-member="2349"]').attr('onclick', "window.open('https://talentsphere.ca/join-our-team/', '_self')");
			  });
		})(jQuery);
	</script>
<?php }, 99);
    // Does IP Address match?
        // if ($_SERVER['REMOTE_ADDR'] != $_SESSION['ipaddress']) {
        //     session_unset();
        //     session_destroy();
        // }
        // Does user agent match?
        // if ($_SERVER['HTTP_USER_AGENT'] != $_SESSION['useragent']) {
        //     session_unset();
        //     session_destroy();
        // }
        // Is the last access over an hour ago?
        // if (time() > ($_SESSION['lastaccess'] + 3600)) {
        //     session_unset();
        //     session_destroy();
        // } else {
        //     $_SESSION['lastaccess'] = time();
        // }

    // set header
    // header("Expires: 0");
    // header("Access-Control-Allow-Origin: https://innovation.dms.go.th");
    // header("Access-Control-Allow-Methods: POST, GET");
    // header('X-XSS-Protection: 1; mode=block');
    // header('X-Content-Type-Options: nosniff');
    // header('Content-language: en-US');
    // header("Strict-Transport-Security: max-age=31536000; includeSubdomains");
    // header("Access-Control-Allow-Headers: X-Requested-With");
    // header("Access-Control-Allow-Credentials: true");
    // header("Access-Control-Max-Age: 1000");
    // header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding");

    // Allow from any origin
        if (isset($_SERVER["HTTP_ORIGIN"])) {
            //// You can decide if the origin in $_SERVER['HTTP_ORIGIN'] is something you want to allow, or as we do here, just allow all
            // header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
        } else {
            //// No HTTP_ORIGIN set, so we allow any. You can disallow if needed here
            // header("Access-Control-Allow-Origin: *");
        }
import java.util.Scanner;
public class PJJJeden {
    public static void main(String[] args) {
        String s = "abc ";
        switch ( s ){
            case "ac ":
                System.out.println ("A" ) ;
                break ;
            case "abc ":
                System.out.println("C" ) ; // jak sie spelni warunek, patrzy na instrukcje i leci dalej. 
            case "bc ":
                System.out.println("E" ) ;
                break ;						// wypluje C oraz E // przestaje dzialac na break
            default :
                System.out.println("F" ) ; 
        }
    }
}
char a;
c = sc.next().charAt(0);
import java.util.Scanner;
public class PJJJeden {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int k = 1;
        for (int i = 1; i <= a; i++) {
            k = k * i;
        }
      System.out.print(k);
    }
}
(function($){
    $(document).ready(function(e){
      var store_url = "https://neonbeach.com/"; // replaced with your shopify store url
      var product_id = "babe-you-look-so-cool-neon-sign"; // replaced with your product id
      var full_url = store_url + '/products/' + product_id + '.json';
      
      $.ajax({
        url: full_url,
        success: function(data) {
          console.log("product id:" + data.product.id);
          console.log("product title:" + data.product.title);
          // ... to do 
          // all your process with product data logic
        }
      });
      
      });
    })(jQuery);
$ pbcopy < ~/.ssh/id_ed25519.pub
  # Copies the contents of the id_ed25519.pub file to your clipboard
import java.util.Scanner;
public class PJJJeden {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("wpisz wartosc a: "); // NWD - program wyznacający największy wspólny dzielnik dwóch liczb
        int a = sc.nextInt();
        System.out.print("wpisz wartosc b: ");
        int b = sc.nextInt();

        while (a != b) {
            if ( a > b){
                a = a - b;
            }
            else { // b>a
                b = b - a;
            }
        }
        System.out.println(a);
    }
}
import java.util.Scanner;
public class PJJJeden {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("wpisz wartosc a: ");
        int a = sc.nextInt();
        int dzielnik = 0;
            for(int i = 1; i <= a; i++){
                if(a%i == 0) {
                    dzielnik++;
                }
            }
            if (dzielnik <= 2) {
                System.out.println("liczba pierwsza");
            }
            else{
                System.out.println("liczba nie jest pierwsza");
            }
    }
}
var colors = ['red', 'green', 'blue'];
var refColors = [...colors, 'yellow'];
//colors => ['red', 'green', 'blue']
//refColors => ['red', 'green', 'blue', 'yellow']
echo "# Anzelmo2022" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Ellabusby2006/Anzelmo2022.git
git push -u origin main
import java.util.Scanner;
public class PJJJeden {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("wpisz swoją wartość a:  ");
        int a = sc.nextInt();
        System.out.print("wpisz swoją wartość b:  ");
        int b = sc.nextInt();
        if(a > b) {
            System.out.println("prawda");
        }
        else {
            System.out.println("falsz");
        }
    }
}
int a = 3;
int b = 4;
boolean a = a>b; // false when printed
import java.util.Scanner;
public class PJJJeden {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("ilosc kolumn:  ");
        int a = sc.nextInt();
        System.out.print("ilosc wierszy:  ");
        int b = sc.nextInt();
            for (int i = 1; i<= a; i++ ) {
                for (int j = 1; j<= b; j++) {
                    int c = j * i;
                    if (c < 10){
                        System.out.print(c + "  ");
                    }
                    else {
                    System.out.print(c + " ");}
                }
               System.out.println();
        }
    }
}
class Solution {
public:
    string longestCommonPrefix(vector<string>& strs) {
        int n1=strs.size();
        int ans=strs[0].length();
        for(int i=1;i<n1;i++)
        {
            int j=0;
            while(j<strs[i].size() && strs[i][j]==strs[0][j])
            {
                j++;
                
            }
            ans=min(ans,j);
        }
        return strs[0].substr(0,ans);
    }
};
class Solution {
public:
    int romanToInt(string s) {
        
        map<char,int>mp;
        mp['I']=1;
        mp['V']=5;
        mp['X']=10;
        mp['L']=50;
        mp['C']=100;
        mp['D']=500;
        mp['M']=1000;
       
        int n=s.size(),num,sum=0;
        for(int i=0;i<n;i++)
        {
            if(mp[s[i]]<mp[s[i+1]])
            {
                sum-=mp[s[i]];
            }
            else 
            {
                sum+=mp[s[i]];
            }
        }
        
        return sum;
    }
};
star

Wed Nov 09 2022 14:23:46 GMT+0000 (Coordinated Universal Time)

@jassembenrayana

star

Wed Nov 09 2022 13:51:14 GMT+0000 (Coordinated Universal Time)

@chicovirabrikin

star

Wed Nov 09 2022 13:20:38 GMT+0000 (Coordinated Universal Time)

@Kyle #c++

star

Wed Nov 09 2022 13:13:40 GMT+0000 (Coordinated Universal Time) https://gomakethings.com/how-to-animate-scrolling-to-anchor-links-with-one-line-of-css/

@Kristi #css #html

star

Wed Nov 09 2022 12:34:58 GMT+0000 (Coordinated Universal Time)

@sebastram

star

Wed Nov 09 2022 12:18:11 GMT+0000 (Coordinated Universal Time)

@shubhangi_burle

star

Wed Nov 09 2022 12:17:26 GMT+0000 (Coordinated Universal Time) https://www.linuxfordevices.com/tutorials/linux/pacman-package-manager

@JaeC8806

star

Wed Nov 09 2022 12:17:01 GMT+0000 (Coordinated Universal Time) https://www.linuxfordevices.com/tutorials/linux/pacman-package-manager

@JaeC8806

star

Wed Nov 09 2022 12:16:40 GMT+0000 (Coordinated Universal Time) https://www.linuxfordevices.com/tutorials/linux/pacman-package-manager

@JaeC8806

star

Wed Nov 09 2022 12:15:59 GMT+0000 (Coordinated Universal Time) https://www.linuxfordevices.com/tutorials/linux/pacman-package-manager

@JaeC8806

star

Wed Nov 09 2022 12:14:27 GMT+0000 (Coordinated Universal Time)

@shubhangi_burle

star

Wed Nov 09 2022 12:13:43 GMT+0000 (Coordinated Universal Time) https://www.linuxfordevices.com/tutorials/linux/pacman-package-manager

@JaeC8806

star

Wed Nov 09 2022 12:12:32 GMT+0000 (Coordinated Universal Time) https://www.linuxfordevices.com/tutorials/linux/pacman-package-manager

@JaeC8806

star

Wed Nov 09 2022 11:42:23 GMT+0000 (Coordinated Universal Time) https://www.msys2.org/docs/updating/

@JaeC8806

star

Wed Nov 09 2022 11:37:07 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/74014669/separate-product-images-on-a-single-page-for-mobile

@mastaklance

star

Wed Nov 09 2022 10:26:31 GMT+0000 (Coordinated Universal Time)

@tea_cindric #kotlin

star

Wed Nov 09 2022 09:31:14 GMT+0000 (Coordinated Universal Time) https://www.facebook.com/Natalie5pin

@Lila

star

Wed Nov 09 2022 08:46:12 GMT+0000 (Coordinated Universal Time)

@DGSH9

star

Wed Nov 09 2022 07:42:17 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object

@adetorodev

star

Wed Nov 09 2022 07:42:14 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object

@adetorodev

star

Wed Nov 09 2022 07:41:59 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object

@adetorodev

star

Wed Nov 09 2022 05:53:02 GMT+0000 (Coordinated Universal Time)

@cruz #javascript

star

Wed Nov 09 2022 05:47:34 GMT+0000 (Coordinated Universal Time)

@cruz #javascript

star

Wed Nov 09 2022 05:42:18 GMT+0000 (Coordinated Universal Time)

@ishraq01

star

Wed Nov 09 2022 05:41:45 GMT+0000 (Coordinated Universal Time)

@ishraq01

star

Wed Nov 09 2022 05:41:04 GMT+0000 (Coordinated Universal Time)

@cruz #javascript

star

Wed Nov 09 2022 05:38:56 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/appending-a-dictionary-to-a-list-in-python/

@hasib404 #python

star

Wed Nov 09 2022 05:00:07 GMT+0000 (Coordinated Universal Time)

@cruz #javascript

star

Wed Nov 09 2022 04:50:25 GMT+0000 (Coordinated Universal Time)

@cruz #javascript

star

Wed Nov 09 2022 04:34:16 GMT+0000 (Coordinated Universal Time)

@cruz #javascript

star

Wed Nov 09 2022 04:33:55 GMT+0000 (Coordinated Universal Time)

@cruz #javascript

star

Wed Nov 09 2022 03:19:03 GMT+0000 (Coordinated Universal Time) https://secure.helpscout.net/mailbox/a66af2abc7090990/4174594

@Pulak

star

Wed Nov 09 2022 02:05:49 GMT+0000 (Coordinated Universal Time)

@apirak_k

star

Tue Nov 08 2022 23:34:55 GMT+0000 (Coordinated Universal Time)

@KutasKozla

star

Tue Nov 08 2022 23:32:08 GMT+0000 (Coordinated Universal Time) https://formulae.brew.sh/formula/watchman#default

@ngvnfgvbmh

star

Tue Nov 08 2022 23:05:15 GMT+0000 (Coordinated Universal Time)

@KutasKozla

star

Tue Nov 08 2022 22:41:10 GMT+0000 (Coordinated Universal Time)

@KutasKozla

star

Tue Nov 08 2022 21:34:22 GMT+0000 (Coordinated Universal Time)

@PIzmAR

star

Tue Nov 08 2022 20:18:40 GMT+0000 (Coordinated Universal Time) https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

@serenechan3

star

Tue Nov 08 2022 20:17:45 GMT+0000 (Coordinated Universal Time)

@KutasKozla

star

Tue Nov 08 2022 20:04:37 GMT+0000 (Coordinated Universal Time)

@KutasKozla

star

Tue Nov 08 2022 19:58:48 GMT+0000 (Coordinated Universal Time) https://studyscienceteacher.com/

@11lmattessich

star

Tue Nov 08 2022 19:42:03 GMT+0000 (Coordinated Universal Time) https://medium.com/@thejasonfile/using-the-spread-operator-in-react-setstate-c8a14fc51be1

@MuhammadAhmad #spreadoperator

star

Tue Nov 08 2022 19:17:19 GMT+0000 (Coordinated Universal Time) https://github.com/Ellabusby2006/Anzelmo2022

@Anzelmo

star

Tue Nov 08 2022 18:56:31 GMT+0000 (Coordinated Universal Time)

@KutasKozla

star

Tue Nov 08 2022 18:53:34 GMT+0000 (Coordinated Universal Time)

@KutasKozla

star

Tue Nov 08 2022 18:49:41 GMT+0000 (Coordinated Universal Time)

@KutasKozla

star

Tue Nov 08 2022 18:19:38 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/longest-common-prefix/

@Ranjan_kumar #c++

star

Tue Nov 08 2022 16:17:11 GMT+0000 (Coordinated Universal Time) https://leetcode.com/problems/roman-to-integer/

@Ranjan_kumar #c++

Save snippets that work with our extensions

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