/**
* @param {string} s
* @return {number}
*/
var scoreOfString = function(s) {
// Initialize a variable to store the score
let score = 0;
// Loop through each character in the string, except the last one
for (let i = 0; i < s.length - 1; i++) {
// Get the ASCII value of the current character and the next character
let currentChar = s.charCodeAt(i);
let nextChar = s.charCodeAt(i + 1);
// Calculate the absolute difference between the ASCII valu
public function boot () {
$siteSettings = cache()->remember(
'siteSettings',
3600,
fn() => Setting::all()->keyBy('key');
);
View::share('siteSettings', $siteSettings);
}
$withdrawMonths = collect([]);
$withdrawTotalAmount = collect([]);
Withdraw::where('status', 1)
->select(DB::raw('SUM(withdraw_amount) as total'), DB::raw('MONTHNAME(created_at) month'))
->groupby('month')
->get()
->map(function ($q) use ($withdrawMonths, $withdrawTotalAmount) {
$withdrawMonths->push($q->month);
$withdrawTotalAmount->push($q->total);
});
@push('script')
<script src="{{ asset('asset/admin/js/chart.min.js') }}"></script>
<script>
'use strict'
v
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js"></script>
<script>paceOptions = {ajax: true, document: true, eventLag: false}; Pace.on('done', function () { $('#preloader').delay(0).fadeOut(300); });</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudfl
npm install --g uglify-js
Program: uglifyjs
Arguments: $FileName$ -o $FileNameWithoutExtension$.min.js
Output paths: $FileNameWithoutExtension$.min.js
Working Directory: $FileDir$
npm install -g csso-cli
Program: csso
Arguments: -i $FileName$ -o $FileNameWithoutExtension$.min.css
Output paths: $FileNameWithoutExtension$.min.css
Working Directory: $FileDir$
https://github.com/enlightn/enlightn/
Performance -- https://github.com/beyondcode/laravel-query-detector
https://spatie.be/docs/laravel-activitylog/v4/introduction
websockets -- https://github.com/beyondcode/laravel-websockets
PDF - https://spatie.be/docs/browsershot/v4/introduction
PDF -- https://spatie.be/docs/laravel-pdf/v1/introduction
https://github.com/inFureal/artisan-gui
https://github.com/BenSampo/laravel-enum
https://github.com/spatie/laravel-backup
https://github.com/rappasoft/lara
<?php
namespace App\Http\Controllers\Products\Products;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Barryvdh\DomPDF\Facade\Pdf;
class PDFController extends Controller {
public function generate_invoice_pdf() {
$users = User::get();
$data = [
'title' => 'Welcome to ItSolutionStuff.com',
'date' => date('m/d/Y'),
'users' => $users
];
$pdf = PDF::loadView('pages.invoices.invoicePDF', $data)
@forelse($users as $key => $row)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $row->fullname }}</td>
<td>{{ $row->phone }}</td>
<td>{{ $row->email }}</td>
<td>@if(App\Models\User::where('id', intval($row->reffered_by))->value('username'))<a href="{{ url('admin/users/details/' . $row->reffered_by) }}" class="btn btn-sm btn-link">{{ App\Models\User::where('id', intval($row->reffered_by))->value('username') }}</a>@else-@endif</td>
composer require milon/barcode
***** https://github.com/Bacon/BaconQrCode
https://github.com/milon/barcode
composer require bacon/bacon-qr-code
"require": {
"milon/barcode": "^8.0"
}
'providers' => [
Milon\Barcode\BarcodeServiceProvider::class,
]
'aliases' => [
'DNS1D' => Milon\Barcode\Facades\DNS1DFacade::class,
'DNS2D' => Milon\Barcode\Facades\DNS2DFacade::class,
]
php artisan vendor:publish
Basic Usages
echo DNS1D::getBarcodeSVG('4445645656', 'PHARMA2T');
echo DNS1D::ge
<form method="GET" action="{{ route('admin.user') }}">
<div class="d-flex justify-content-between align-items-center mb-2" style="background-color: #fff; border-bottom-color: #e5e5e5; padding: 15px 20px; border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;">
<div class="table-filter-left d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<label for="per_page">Show Page</label>
<select class="custom-sele
https://github.com/PHPOffice/PHPWord/tree/master/samples
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Session;
use DB;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Storage;
use File;
use Exception;
use PhpOffice\PhpWord\Shared\Converter;
use PhpOffice\PhpWord\Style\TablePosition;
// 1440 twip = 1 inch
SSD -- Solid State Drive
$ ls ---- list
$ ls -a
$ ls -asl
sudo su -- change superuser
# 500 error if folder not permission
$ lshw --- check hardware configuration
cPanel এর ID & password দিয়ে FTP Server এ Login করা যায়।
File Protocol: SFTP
Host Name: 165.22.59.56
Port Number: 22
User Name: root
Password:
advance --> SSH --> Authentication --> Private File Key -->
passphrase for key --> esojai
Root Directory: var/www/html
** How To Install Apache On CentOS 7 **
$ yum update
$ yum -y inst
http://laradock.io
**Command-line installation ===============**
* ssh root@165.22.248.60 Yes Enter
* password: hidden
* change password:
$ ssh-keygen -t rsa -b 4096 -C "server"
C:\Users\Mehedi\.ssh\id_rsa ---id_rsa will be no file or directory
passphrase:
$ cd c:/Users/Mehedi/.ssh
$ adduser nonroot
$ usermod -aG sudo nonroot
rsync --archive --chown=nonroot:nonroot /root/.ssh /home/nonroot
bifumes video dekhte hobe
**INSTALL COMPOSER ===============**
$ php -r "copy('https://getcomposer.or
** Configure Apache =====**
nano /etc/httpd/conf.d/esojai.com.conf -------or ----
nano /etc/nginx/conf.d/esojai.com.conf
<VirtualHost *:80>
ServerAdmin webmaster@surayaoverseas.com
DocumentRoot /var/www/surayaoverseas.com
ServerName surayaoverseas.com
ServerAlias www.surayaoverseas.com
Redirect permanent / http://esojai.com/
DirectoryIndex index.html index.php
<Directory /var/www/surayaoverseas.com>
Options FollowSymLinks
AllowOverride All
Apache 2.4.29 -- Apache 2
MySQL server 5.7.23 -- GPL 2 with modifications
PHP 7.2
Fail2ban 0.10.2 -- GPL 2 with modifications
Postfix 3.3.0 -- IBM Public
Certbot 0.26.1 -- Apache 2
remove all files & folver - rm -rfv /var/www/html/
php --version
php -v
mysql -V
Step 1 — Installing Apache
-----------------------------
sudo apt update
sudo apt install apache2
sudo ufw app list
sudo ufw app info "Apache Full"
sudo ufw allow in "Apache Full"
for public ip:
*ip addr show eth0 | grep inet | awk
https://www.iplocate.io/api/lookup/8.8.8.8
https://stackoverflow.com/questions/12553160/getting-visitors-country-from-their-ip
https://macvendors.com for check MAC
sudo yum update
sudo yum install bind-utils
https://ip.web-hosting.com/
https://ping.eu/
$ tracert 127.0.0.1
$ ipconfig/all
$ ipconfig/flushdns
$ arp -a --- network ip address list
$ ping -t 192.168.0.1
ping -a facebook.com
$ ping 127.0.0.1 -- test this pc connection
$ ping localhost -- test this pc connection
$ ping /? command