This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The quicksort algorithm picks a pivot element and then divide the array. | |
Puts the smaller elements on the left side of the pivot and the larger ones on the right side. | |
https://www.linkedin.com/in/mohdahshandanish/ | |
*/ | |
function QickSort(array){ | |
let rightArr =[] | |
let leftArr = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
from django.contrib import admin | |
from .models import Question | |
from django.utils.translation import gettext_lazy as _ | |
class CustomListFilter(admin.SimpleListFilter): | |
title = _('pub_date') | |
parameter_name = 'pubdate' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.min = ko.computed(function () { | |
let toDateObj = new Date(this.to_date()); | |
toDateObj.setFullYear(toDateObj.getFullYear() - 1); | |
return ko.observable(ojconverterutils_i18n_1.IntlConverterUtils.dateToLocalIso(toDateObj)); | |
}, this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<oj-input-date autocomplete="off" | |
class="oj-form-control-max-width-sm oj-form-control-width-sm oj-form-control-text-align-start " | |
value="{{from_date}}" label-hint="From" required min="[[min()]]" max="[[form.to_date]]"> | |
</oj-input-date> | |
<oj-input-date autocomplete="off" | |
class="oj-form-control-max-width-sm oj-form-control-width-sm oj-form-control-text-align-start " | |
value="{{to_date}}" label-hint="To" required :id="[['form-to-date-id'+$uniqueId]]" | |
max="[[(new Date()).toISOString()]]"> | |
</oj-input-date> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.custom-list-item { | |
--oj-collection-list-row-height: 25px !important; | |
--oj-collection-list-cell-padding-vertical: 2px; | |
--oj-list-view-item-padding-horizontal: 2px; | |
--oj-core-bg-color-selected: #faa51973; | |
--oj-core-text-color-primary: #004e95; | |
text-transform: capitalize; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<oj-select-single | |
class="oj-form-control-max-width-sm oj-form-control-width-sm oj-form-control-text-align-start __input_txt" | |
value="{{form.accountNumber}}" data="[[accountNumbers]]" label-hint="Account Number" | |
:id="[['selected-account-id'+$uniqueId]]" required placeholder="Select Account " | |
item-text="[[getItemText]]"> | |
<template slot="collectionTemplate" data-oj-as="collection"> | |
<oj-list-view aria-label="select" gridlines.item="visibleExceptLast" selection-mode="single" | |
class="oj-select-results custom-list-item" data="[[collection.data]]" selected="[[collection.selected]]" | |
current-item="{{collection.currentRow.rowKey}}" on-oj-item-action="[[collection.handleRowAction]]"> | |
<template slot="itemTemplate" data-oj-as="item"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=flask service 2001 | |
After=multi-user.target | |
[Service] | |
Restart=always | |
RestartSec=1 | |
WorkingDirectory=/opt/sqlite/gk-backend-sqlite | |
ExecStart=/usr/local/bin/pipenv run gunicorn --bind 0.0.0.0:5000 --log-level=error --error-logfile /var/www/2021/gunicorn-error.log --access-logfile /var/www/2021/gunicorn-access.log wsgi:app | |
StandardInput=tty-force | |
[Install] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(["jquery"], ($) => { | |
'use strict'; | |
class PageModule { | |
constructor() { | |
let lang = oj.Config.getLocale(); | |
$("html").attr("lang", lang); | |
if (lang === "ar") { | |
$("html").attr("dir", "rtl"); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name danishwebs.co.in www.danishwebs.co.in; | |
access_log /var/log/nginx/danishwebs-access.log; | |
error_log /var/log/nginx/danishwebs-error.log; | |
root /var/www/react/html; | |
location ^~ /api { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name danishwebs.co.in www.danishwebs.co.in; | |
access_log /var/log/nginx/danishwebs-access.log; | |
error_log /var/log/nginx/danishwebs-error.log; | |
root /var/www/react/html; | |
location / { | |
try_files $uri /index.html; |
NewerOlder