October 22, 2021 in Laravel, Php, Technology, Tips and Tricks
header.blade.php
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@yield('seo')
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
{{-- san San-Francisco Font --}}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/mailtoharshit/San-Francisco-Font-/sanfrancisco.css">
<link rel="stylesheet" href="{{ asset('/index.css') }}">
<!-- <link rel="stylesheet" href="{{ asset('/homejs.js') }}"> -->
<title>Aditya Kumar Singh</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-red navbar-dark p-0">
<!-- <div class="wrapper"> </div> -->
<div class="container-fluid"> <a class="navbar-brand p-0" href="/">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto ml-auto">
<li class="nav-item"> <a class="nav-link mr-4 " aria-current="page" href="/">Home</a> </li>
<!-- <li class="nav-item"> <a class="nav-link mr-4" href="#">Features</a> </li> -->
<li class="nav-item"> <a class="nav-link mr-4" href="/about" call_type="About">About us</a> </li>
<!-- <li class="nav-item"> <a class="nav-link mr-4" href="#">Fees</a> </li> -->
<li class="nav-item"> <a class="nav-link mr-4" href="/contact" call_type="Contact">contact us</a> </li>
<!-- <li class="nav-item"> <a class="nav-link mr-4" href="#"><i class="fa fa-search"></i></a> </li> -->
</ul>
<!-- <div class="d-flex flex-column sim"> <a class="btn btn-light action-button" role="button" href="#">Sign Up <i class="fa fa-arrow-right"></i></a> </div> -->
</div>
</div>
</nav>
@yield('content')
@yield('footer')
index.blade.php
@extends('header')
@section('seo')
<title>Aditya kumar singh</title>
<meta name="description" content="aditya kumar singh">
<meta name=”robots” content="index, follow">
@endsection
@section('content')
<!-- HTML TAG -->
@endsection
@extends('footer')
contact.blade.php
@extends('header')
@section('seo')
<title>Aditya kumar singh</title>
<meta name="description" content="aditya kumar singh">
<meta name=”robots” content="index, follow">
@endsection
@section('content')
<section id="contact" style="background-color:#f5f5f5">
<div class="container py-5">
<div class="row justify-content-center align-items-center">
<div class="col-12 col-sm-12 col-md-10 col-lg-10">
<form action="/add-contact " method="post">
@csrf
<div class="text-center py-4"><h3 class="display-4 bold orange">Contact Us</h3>
</div>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<div class="row" style="margin:0px 0px">
<div class="col-lg-6 col-md-6 col-sm-6" style="padding-bottom: 10px;">
<label for="name" class="mb-2"><b>Name</b></label>
<input class="form-control shadow p-4 mb-4 bg-white rounded @error('name') is-invalid @enderror" name="name" placeholder="Marth Wanjiku" type="text" />
@error('name')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="col-lg-6 col-md-6 col-sm-6" style="padding-bottom: 10px;">
<label for="email" class="mb-2"><b>Email</b></label>
<input class="form-control shadow p-4 mb-4 bg-white rounded @error('email') is-invalid @enderror" name="email" placeholder="what's your email?" type="text" />
@error('email')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12" style="padding-bottom: 10px;">
<label for="msg" class="mb-2"><b>Massage</b></label>
<textarea rows="6" name="message" id="message2" class="form-control shadow p-4 mb-4 bg-white rounded @error('message') is-invalid @enderror" placeholder="How Can Help You?" ></textarea>
@error('message')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="btn-left">
<input type="submit" name="sent" value="SUBMIT" class="btn btn-info btn-block rounded-0 py-2">
</div>
</div>
</form>
</div>
</div>
</div>
</section>
@endsection
@extends('footer')
October 22, 2021 in Tips and Tricks
<script>
var date = new Date();
var showDate;
function listNavigate(ctrl=""){
if(ctrl == "prev"){
date.setDate(date.getDate() - 1);
showDate=date.getFullYear()+"-"+parseInt(date.getMonth()+1).toString().padStart(2, "0")+"-"+date.getDate().toString().padStart(2, "0");
$('#showDate').val(date.getDate().toString().padStart(2, "0")+"-"+parseInt(date.getMonth()+1).toString().padStart(2, "0")+"-"+date.getFullYear());
}else if(ctrl == "next")
{
date.setDate(date.getDate() + 1);
showDate=date.getFullYear()+"-"+parseInt(date.getMonth()+1).toString().padStart(2, "0")+"-"+date.getDate().toString().padStart(2, "0");
$('#showDate').val(date.getDate().toString().padStart(2, "0")+"-"+parseInt(date.getMonth()+1).toString().padStart(2, "0")+"-"+date.getFullYear());
}else{
showDate=date.getFullYear()+"-"+parseInt(date.getMonth()+1).toString().padStart(2, "0")+"-"+date.getDate().toString().padStart(2, "0");
$('#showDate').val(date.getDate().toString().padStart(2, "0")+"-"+parseInt(date.getMonth()+1).toString().padStart(2, "0")+"-"+date.getFullYear());
}
var form = new FormData();
var settings = {
"url": "/api/get-xxxxx-by-date/"+showDate+"/"+localStorage.language,
"method": "GET",
"timeout": 0,
"headers": {
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
//console.log(response);
const obj = JSON.parse(response);
var data=obj['data'];
for(i in data)
{
var sun=data[i]['sun'].split('-');
var moon=data[i]['moon'].split('-');
var Sunrise=sun[0];
var Sunset=sun[1];
var Moonrise=moon[0];
var Moonset=moon[1];
$("#Sunrise").html(Sunrise);
$("#Sunset").html(Sunset);
$("#Moonrise").html(Moonrise);
$("#Moonset").html(Moonset);
$("#Body").html(data[i]['description']);
}
$("#showDate").html(showDate);
});
$(document).ready(function(){
$(document).ajaxSuccess(function(){
});
$(document).ajaxError(function (event, jqxhr, settings) {
if (settings.url == "") {
}
});
});
}
$("#showDate")
.datepicker({
autoclose: true,
todayHighlight: true,
format: 'dd-mm-yyyy',
onSelect: function(dateText) {
console.log("Selected date: " + dateText + "; input's current value: " + this.value);
// $(this).change();
}
}).on("change", function() {
day=this.value.split("-")[0];
month=this.value.split("-")[1];
year=this.value.split("-")[2];
newdate=year+"-"+month+"-"+day;
date = new Date(newdate);
listNavigate();
});
listNavigate();
</script>
October 22, 2021 in Only Happened In India, Technology, Tips and Tricks
Telecom Regulatory Authority of India (TRAI) has decided that set-top boxes will be interoperable from now on so that in case customers wanted to switch their service providers, they wouldn’t need to change their set top boxes every time.
As of now, the STBs that are offered by telecom operators are non-interoperable, which means that if you change your telecom provider, you will need a new set top box for the new one.
TRAI To Make Set Top Boxes Interoperable :-
The discussion of making the set top boxes interoperability has been on the table for a long time now and TRAI has finally made the decision to make it official. TRAI has stated that all the set top boxes in the entire country should support technical interoperability.
Additionally, DTH and Multi-System Operators (MSOs) have been given a time period of six months to adapt to the new changes. As per TRAI, the new standard is DVB CI Plus 2.0 (with USB CAM) as per the ESTI TS 103 605 standards.
The Ministry of Information and Broadcasting (MIB) will probably include a suitable clause to ‘compulsorily facilitate’ the service of interoperability of set top boxes.
However, we should remember that the set top boxes of DTH and cable TV operators will not be interoperable. This means that a DTH subscriber cannot change to cable TV and vice versa. The reason behind this is that there are technical and commercial constraints to the universal STB, and hence, the interoperability will be applicable within the DTH and within the cable segment respectively.
USB Port-based Common Interface :-
TRAI has also advised that there be a mandatory provision of USB port-based Common Interface for all the digital television sets in India. The MIB, TRAI and the Ministry of Electronics and Information Technology (MeitY) will probably request BIS to change the specifications for digital television sets to include USB based Common Interface port as per DVI CI Plus 2.0 standard based on ETS TS 103 605.
All the TV manufacturers must provide all digital television sets with minimum one open interface port that is based on DVB CI Plus 2.0 standards that will allow a simple connection of USB CAM to allow reception of television signals. They will also be required to launch TV sets with built-in tuners to enable the reception of television content through both satellite and cable platforms.
source:techiyogiz
October 22, 2021 in Laravel, Php, Tips and Tricks
php artisan migrate --path=/database/migrations/fileName.php
php artisan migrate --path=/database/migrations/2020_04_10_130703_create_test_table.php
php artisan migrate:refresh --path=/database/migrations/2021_06_23_093317_create_users_table.php
To rollback one step:
php artisan migrate:rollback
To rollback multiple steps:
php artisan migrate:rollback --step=[x]
To drop all tables and reload all migrations:
php artisan migrate:fresh
October 22, 2021 in Technology, Tips and Tricks
Reboot
reboot uses the shutdown command (with the -r switch). The shutdown command used to kill all the running processes, unmount all the file systems and finally tells the kernel to issue the ACPI power command.
Init 6
init 6 tells the init process to shutdown all of the spawned processes/daemons as written in the init files (in the inverse order they started) and lastly invoke the shutdown -r now command to reboot the machine
October 20, 2021 in Technology, Tips and Tricks
SSD Endurance is measured in so called DWPD units. DWPD stands for Drive full Writes Per Day. For Mobile, Client and Enterprise Storage Market segments DWPD requirements are very different. SSD Vendors usually state warranty as, for example, 0.8 DWPD / 3 years or 3.0 DWPD / 5 years. First example means that writing 80% of Drive Capacity every single day will result into 3 years life-time. Technically you can kill your 480GB Drive (let’s say with 1 DWPD / 3 years warranty) within 12 days if to perform non-stop write access at the speed of 500 MB/s.
SSDs show much higher throughput on the one side if to compare with HDDs, but at the same time quite low endurance level. Partially it is due to the media physical structure and mapping. For example, when writing 1GB of user data to the HDD drive – internally physical media will receive around 10% more data (meta data, error protection data, etc.). Ratio between Host Data Amount and Internal Data Amount is called Write Amplification Factor (WAF). In comparison SSD may need to write 4 times more data than received from Host. Pure Random access is the worst scenario, when writing 1GB of Host Data will result into writing 4GB of data to the Internal Flash Media. If to perform only sequential write access WAF for SSDs will be close to 1.0, like for HDDs.
Enabling System swap and its intensive usage (probably due to DRAM shortage) will generate more Random access to the SSD. Endurance will degrade quicker if to compare with disable swap. Unless you are running Enterprise System with non-stop IO traffic to the SSD, I would not expect Swap enablement to affect SSD endurance much. You can always monitor SSD SMART Health parameter called – SSD Life Left. How it is changing in dynamic with/without swap enabled will help to make a decision.
October 20, 2021 in Technology, Tips and Tricks
Although swap is generally recommended for systems utilizing traditional spinning hard drives, using swap with SSDs can cause issues with hardware degradation over time. Due to this consideration, we do not recommend enabling swap on DigitalOcean or any other provider that utilizes SSD storage. Doing so can impact the reliability of the underlying hardware for you and your neighbors.
If you need to improve the performance of your server, we recommend upgrading your Droplet. This will lead to better results in general and will decrease the likelihood of contributing to hardware issues that can affect your service.
October 17, 2021 in Laravel, Php, Tips and Tricks
php artisan migrate
php artisan migrate:fresh
php artisan migrate:install
php artisan migrate:refresh
php artisan migrate:reset
php artisan migrate:rollback
php artisan migrate:status
October 7, 2021 in News, Only Happened In India, Tips and Tricks
How to stop corruption in India | भारत में भ्रष्टाचार को कैसे रोकें
यदि केंद्र सरकार के किसी विभाग/कंपनी/सरकारी बैंक का कोई कर्मचारी/अधिकारी किसी सरकारी कार्य करने या अपने सरकारी कर्तव्य का निर्वहन करने के लिए रिश्वत/घूस मांगे तो सी.बी.आई., भ्रष्टाचार निरोधक शाखा, नयी दिल्ली को फ़ोन नंबर 011-24363460, 011-24367887, 011-24367341 मोबाइल नंबर - 9650394847 पर फ़ोन/एस.एम.एस. करें