Comic for April 05, 2020
https://ift.tt/3dWczaQ
fun
via Dilbert Daily Strip http://dilbert.com
April 5, 2020 at 03:14AM
Just another WordPress site
Comic for April 05, 2020
https://ift.tt/3dWczaQ
fun
via Dilbert Daily Strip http://dilbert.com
April 5, 2020 at 03:14AM
Oral Arguments heard in California Magazine Ban Appeal at Ninth Circuit ~ VIDEO
https://ift.tt/2X6HBXC

U.S.A. –-(Ammoland.com)- On 2 April, 2020, a three-judge panel from the Ninth Circuit heard oral arguments in the Duncan v. Becerra case. The District Court had decided the outright ban of magazines with a capacity of more than 10 rounds violated the Second Amendment. The opinion, by Judge Roger T. Benitez, was brilliant and extremely well written.
The video lasts over an hour, with strong questioning by the judges. Judge Consuelo Callahan presides and does most of the questioning. Judge Kenneth K. Lee asks some pointed questions, and Judge Barbara M. Lynn asks a few questions.
The appealing attorney for the State of California was John Darrow Echeveria.
The plaintiffs’ attorney for Duncan and the Second Amendment was Erin E. Murphy.
The State of California did its best at attempting to reduce the Second Amendment right to the minimum possible under the Heller ruling. The argument made was essentially, if California residents had access to some effective means of self-defense in the home, then Heller was satisfied, and the State could ban and regulate almost anything they wished to do.
When asked if the ban could be extended from a 10 round ban to a 1 round ban, Echeveria thought that might be unconstitutional.
This argument was specifically rejected in Heller as being off the table, but the Ninth Circuit has worked hard to forward it.
The attorney representing Duncan and Second Amendment supporters, generally, simply reiterated the Heller and McDonald decisions. Weapons in common use which are used for lawful purposes are protected by the Second Amendment. In particular, a complete ban is off the table.
When asked if the ban violated the “takings clause” of the Constitution, Murphy said it was primarily an issue of compensation.
The State made the claim that limiting magazine capacity was merely reasonable regulation that did not impact the Second Amendment. It relied on several court cases from other circuits.
The oral arguments are interesting. They probably make little difference. The finding of the three-judge panel will not be final.
The Ninth Circuit has shown, again and again, Second Amendment rulings will go to an En Banc court.
The makeup of the Ninth Circuit has changed considerably under President Trump. Once a bastion of leftist ideology, which was the most reversed Circuit in the United States, it now has nine judges appointed by President Trump. The Circuit has 29 judges. The Circuit now has a three-judge majority appointed by Democrats.
Not all judges appointed by Republicans are originalist and textualists. They tend in that direction. The Ninth Circuit now has some balance, instead of being overwhelmingly leftist.
One of the judges on the three-judge panel, Judge Lee, was appointed by President Trump.
About Dean Weingarten:
Dean Weingarten has been a peace officer, a military officer, was on the University of Wisconsin Pistol Team for four years, and was first certified to teach firearms safety in 1973. He taught the Arizona concealed carry course for fifteen years until the goal of Constitutional Carry was attained. He has degrees in meteorology and mining engineering, and retired from the Department of Defense after a 30 year career in Army Research, Development, Testing, and Evaluation.
The post Oral Arguments heard in California Magazine Ban Appeal at Ninth Circuit ~ VIDEO appeared first on AmmoLand.com.
guns
via AmmoLand.com https://ift.tt/2okaFKE
April 3, 2020 at 02:52PM
Laravel Excel import-export
https://ift.tt/2RbEUAi
Importing data from Excel sheet into our database and export data from the application into an Excel sheet are most often asked feature for a web application. These features enable us to perform batch import/export data by our web application. In Laravel, we can make excel import/export features easily with laravel maatwebsite/excel package. If you are looking for a step by step tutorial on how you can make excel import/export features in your application then it’s for you. In this post, I’ll show you a step by step guide for making excel import/export features in Laravel by using maatwebsite/excel laravel package with validation.
The first step, we need a fresh Laravel Framework instance. If you have already an application installed then skip this step. Let’s do that by composer command.
composer create-project laravel/laravel laravel-import-export
In this step, we’ll set up our database configuration in the .env file.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel-import-export
DB_USERNAME=root
DB_PASSWORD=
Now make a model. Here we’ll make a contact model for our contacts table. Our contacts table contains id, name, phone, email fields.
<?php namespace App;
use Illuminate\Database\Eloquent\Model;
class Contact extends Model {
public $timestamps = false;
protected $fillable = ['name', 'phone', 'email'];
}
Now install the Laravel maatwebsite/excel version 3.1 package via composer command.
composer require maatwebsite/excel
This package has auto-discovery features so you don’t need to add the service provider manually.
Now we have to make an Import class for importing data into our database from Excel sheet via our contact model. The maatwebsite/excel package provides useful command to make the class easily. Let’s do that.
php artisan make:import ContactsImport --model=Contact
with this command, a Contact import class will create in the app/Imports directory.
<?php
namespace App\Imports;
use App\Contact;
use Illuminate\Support\Facades\Hash;
use Maatwebsite\Excel\Concerns\ToModel;
class ContactsImport implements ToModel
{
/**
* @param array $row
*
* @return Contact|null
*/
public function model(array $row)
{
return new Contact([
'name' => $row[0],
'phone' => $row[1],
'email' => $row[2]
]);
}
}
For export data from our database to Excel sheet, we need to make an Export class via command line.
php artisan make:export ContactsExport --model=Contact
By this command, a class file will create in app/Exports directory.
<?php
namespace App\Exports;
use App\Contact;
use Maatwebsite\Excel\Concerns\FromCollection;
class ContactsExport implements FromCollection
{
public function collection()
{
return Contact::all();
}
}
Now the final part where we’ll handle how we’ll export or import data and what will be the logic goes to. Let’s make a controller by artisan make command.
php artisan make:controller ContactController
Handle Excel data import
To import data from excel sheet, make an import method inside the contact controller. In this import method, we’ll validate our request file and code for import the excel sheet data.
<?php
use App\Imports\ContactsImport;
use Maatwebsite\Excel\Facades\Excel;
use App\Http\Controllers\Controller;
class ContactsController extends Controller
{
public function import(Request $request)
{
$this->validate($request, [
'file' => 'required|file|mimes:xls,xlsx'
]);
$file = $request->file('file');
Excel::import(new ContactsImport, $file);
return redirect()->back()->with('success', 'All data successfully imported!');
}
}
Handle Excel data export
With the data export feature, we can export our table data into an excel sheet very easily. For that, make an export method inside the contact controller and do code for model data export into an excel sheet.
<?php
namespace App\Http\Controllers;
use App\Exports\ContactsExport;
use Maatwebsite\Excel\Facades\Excel;
class ContactController extends Controller
{
public function export()
{
return Excel::download(new ContactsExport, 'contacts.xlsx');
}
}
Hopefully, this step by step tutorial post will help you to add excel data import/export features in your laravel application. If this post helpful to you then please share with others so that they get helped.
programming
via Laravel News Links https://ift.tt/2dvygAJ
April 3, 2020 at 08:00AM
Fisher Clutch Space Pen
https://ift.tt/3aINu1e
| Buy
Made from black anodized aluminum, Fisher’s Clutch Space Pen has a bold and substantial look. Its hexagonal barrel provides a confident grip, and won’t roll off your desk. With its pressurized ink cartridge, it has no trouble writing upside-down, or in extreme temperatures, and can even write underwater.

fun
via The Awesomer https://theawesomer.com
April 2, 2020 at 10:31AM
Laravel send e-mail A to Z
https://ift.tt/2w6CjjC
Sending e-mail is an important part of our application. Laravel made it easy with simple e-mail sending API. You can send email from STMP, Gmail, Webmail, Mailgun, Amazon SES, SendGrid, Mailtrap and etc with the same API. If you are looking for sending an email in Laravel framework via SMTP, Gmail, Mailgun, Amazon SES, Webmail, SendGrid or any email service then this post will help you by providing the complete guide on how to send an e-mail via Laravel 6. By following this post you can do exactly the same thing in Laravel 5 or Laravel 6. By completing this post, We’ll learn below.
We have to make an e-mail template for sending the email content to our recipients. For that, Here I’m creating a simple HTML email template in resources/views/emails/template.blade.php with the content below.
<div>
<h3>Hi, </h3>
<p><p>
</div>
Look, In this template, we will pass $name and $msgBody variable data and send it to our recipients. With this simple e-mail template, I’ll show you how to send an e-mail via Mailtrap, SMTP, Gmail, Webmail etc.
Important Note Do not pass any variable name with message. If you do then it’ll conflict and you will get an exception.
We need to define a route in web.php file for sending an e-mail. Let’s do that.
Route::get('/send-mail','HomeController@sendMail');
Now we need to code in sendMail function for sending our email.
// HomeController.php
use Illuminate\Support\Facades\Mail;
public function sendMail()
{
$data = [
'name'=>'Jhon Smith',
'msgBody'=>'Welcome to Laravel Article'
];
Mail::send('emails.template',$data,function($mail){
$mail->from('info@example.com');
$mail->to('jhon@example.com');
$mail->subject('Welcome E-mail');
});
return 'Successfully send';
}
Here first we’ll send e-mails via Test mail sending sandbox service name Mailtrap. Mailtrap is really awesome for testing email before sending with our actual email sending credentials. We are doing this for confirming that our email is sending correctly with the correct content. Sometimes from Webmail, Gmail STMP are not work as we expected for some miss-configuration. If we succeed with MailTrap then we can ensure that our sending process ok we have to focus on other things.

Now, start the server php artisan serve and hit URL http://localhost:8000/send-mail

– Do login into cPanel and create a Webmail.
– Collect mail client configuration for your webmail.
– Update configuration in your project env file.
MAIL_DRIVER=smtp
MAIL_HOST=mail.example.com
MAIL_PORT=465
MAIL_USERNAME=info@example.com
MAIL_PASSWORD=your_webmail_password
MAIL_FROM_ADDRESS=from@example.com
MAIL_FROM_NAME=Example
and finally, do exactly the same as step 1, 2, 3
Now, start the server php artisan serve and hit URL http://localhost:8000/send-mail
Important: Sending e-mail using Gmail, first you need to enable less secure apps settings from your Google Account. If you do not enable this option then you will not able to send email using Gmail from your Laravel application.
– After enabling the less secure apps option, update the env file.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your_gmail_address
MAIL_PASSWORD=your_gmail_password
MAIL_ENCRYPTION=tls
and finally, do exactly the same described in step 1, 2, 3
Now, start the server php artisan serve and hit URL http://localhost:8000/send-mail
Login to your SendGrid account.
Do sender authentication from Settings > Sender Authentication
Goto Settings > API keys and Create an API key by enabling Restricted Access ( Only send email )

Now update the env file with configuration.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=your_api_secret
MAIL_ENCRYPTION=tls
N.B: Keep exactly MAIL_USERNAME=apikey
and finally, do exactly the same described in step 1, 2, 3
Now, start the server php artisan serve and hit URL http://localhost:8000/send-mail
For sending email without view in Laravel, you have to use the raw method of Laravel Mail facade. Just follow the steps below.
– Simply define a route.
Route::get('/send-mail','HomeController@sendMail');
– Setup mail credentials in env file from one of these ( Webmail, Gmail, SendGrid, Mailtrap etc)
– Do code in the sendMail method
// HomeController.php
use Illuminate\Support\Facades\Mail;
public function sendMail()
{
Mail::raw('Hi, welcome to laravelarticle.com!', function ($mail) {
$mail->from('info@example.com');
$mail->to('jhon@example.com');
$mail->subject('Welcome E-mail');
});
return 'Successfully send';
}
Use your credentials in the env file only local development. On the production side, do not put credentials in the env file, keep your credentials in the config/mail.php file.
Hope this post will help you to send email in Laravel framework with confidently. If this post helps you to learn how to send email in Laravel framework then please share this post with others.
programming
via Laravel News Links https://ift.tt/2dvygAJ
April 2, 2020 at 08:18AM
Comic for April 01, 2020
https://ift.tt/2UyWVKO
fun
via Dilbert Daily Strip http://dilbert.com
April 1, 2020 at 03:03AM
VIDEO: High School Wrestling Champ Slams, Pins New Mexico Kidnapper
https://ift.tt/3aLhfy4
A 16-year-old high school wrestler that just won a district title; well, that’s already a big man on campus. When that same teen saves the lives of three little kids, overpowering a grown man to do so? Now he just became legend. Such is the latest podium for Canaan Bower, who took on and pinned a kidnapper in Las Cruces, N.M. recently. The athlete slammed the thug to the ground, then held him until police arrived.

RELATED STORY
5 Things to Keep in Mind for Your Coronavirus Home Defense Checklist
It turned out a very good thing the wrestler appeared on the scene. The attacker, 22-year-old Daniel Arroyo Beltran, allegedly assaulted a woman and her three young children. Closed circuit security footage captured the man repeatedly attempt to kidnap the three kids. When a bystander attempted to hold the door, keeping Beltran out of a convenience store where the woman and kids took refuge, Beltran forced his way in and attacked. He punched the man several times, with blood spurting to the floor.
That’s when the champion wrestler, pumping gas outside, saw the commotion and leapt into action. He ran into the store, confronted Beltran, and put his wrestling skills to work.
“So my son – who just won the wrestling district championship weeks ago – just came up behind this guy and body-slammed him and got him in a chokehold and waited for the police to show up,” Troy Bower, Canaan’s father, told lcsun-news.com.
The Dona Ana County Sheriff’s Office thanked Bower for “stepping up to save the lives of two children and potentially many others.”
Even UFC President Dan White took notice of the wrestling champ and his bravery. Noting the current coronavirus and social distancing requirements, White said he’d love to meet Bower, who he called “AWESOME!!!,” in the future.
Hey Canaan Bower u are AWESOME!!! When this Twilight Zone episode is over i would love to meet u https://t.co/voixXpFTxE
— Dana White (@danawhite) March 29, 2020
For a wrestler, at any age, it doesn’t get much better than that.
The post VIDEO: High School Wrestling Champ Slams, Pins New Mexico Kidnapper appeared first on Personal Defense World.
guns
via Personal Defense World https://ift.tt/2Arq2GB
April 1, 2020 at 06:08AM
Introducing Metabase, a Simple and Powerful Analytics Tool
https://ift.tt/2X0JAfP

Recently I was looking for some simple way to analyze and create graphs from data stored in MySQL tables. I know Grafana can also plot graphs from MySQL tables, but somehow it felt like overkill and you are not using the traditional SQL syntax there. So I was searching for another solution, and it actually took me a while to find it. I might have used the wrong keywords when searching, or the SEO is not the best for this site/project, but in the end, I found Metabase.
In this blog post, I would like to highlight this open source project because I found it very simple and it does the job perfectly for what I wanted it for.
I would describe Metabase as a tool that can provide you a graphical interface to create business intelligence and analytics graphs in minutes. It does not require any previous SQL knowledge, and it has a nice interface where you can simply make analytics with just a few clicks.
It supports a lot of backend databases:
It is very simple; you can just call the JAR file or run a docker container and it is done. You can run on AWS Elastic Beanstalk, or on Heroku, or even on Kubernetes.
After installation, you only have to add your datasource and you are good to go.
Using a test IMDB database, we simply graph how many movies were created per year. It takes only a few seconds and a few clicks. Of course, we can write a query by ourselves as well, and it is able to plot the result without any problems.
It Has a Lot of Features
Metabase has a lot of features and settings, but here I will just mention a few:
Conclusion
If you are looking for a very simple data visualization or business analytics tool, I would definitely recommend taking a look at Metabase. Please let us know what you think if you are already using it!
technology
via MySQL Performance Blog https://ift.tt/1znEN8i
April 1, 2020 at 03:25PM
Take a Virtual Trip to Disney World
https://ift.tt/2R2qLVL
If, a few weeks ago, you’d told your kids that you were all going to TAKE A TRIP TO DISNEY WORLD and then added the caveat, “from the comfort of our own home,” chances are there would have been a mutiny. But, as we all know, things have changed. Standards have been lowered. Now, riding Splash Mountain from the living room couch might not seem like such a bad idea.
We’ve written before about how you can use YouTube videos to prepare kids for potentially anxiety-producing events—such as riding a rollercoaster. But you can also use those same videos to make your way across Magic Kingdom without ever needing to take a step, complain about the length of a line or manage a meltdown.
As Christina Marfice reminds us on Scary Mommy, there are entire channels on YouTube that provide videos taken by riders on Disney parks attractions:
That means anyone with a device and an internet connection can relive the magic. And it’s even better if you have a virtual reality headset or smartphone mount. Then, the videos become fully immersive experiences, basically like being back at Disneyland before the world almost totally shut down.
Is it the same as actually being on the ride? As someone who has been to Disney World a handful of times, I can categorically state that it is not. But are some of the ride videos surprisingly satisfying? They are—especially now, when the thought of being in such a germy place, among tight crowds of people, seems like such a quaint concept from a more innocent era.
So where to start? You don’t have to plan your day around your FastPass times and you can bounce back and forth across the park in mere seconds. Since I’m the one writing this and Pirates of the Caribbean is my favorite ride, let’s start there.
All those people! Touching all the surfaces! And then touching their faces with abandon! 2019 really was a simpler time. That was fun, but I’ve got Splash Mountain on the brain; let’s go there next.
If your kids like a bit of a thrill (but not too much!), the Barnstormer roller coaster is a good option. I chose this particular video because it’s a gloomy, rainy day at Disney, the park is basically deserted and it just feels … right:
If you prefer more people and more sunshine, try the Slinky Dog Dash roller coaster. Yes, I know, this ride is in an entirely different park (Hollywood Studios). Does it matter? No, it does not—there are no rules here!
Is it time for the Frozen ride, yet? Yes, I thought so. Come on, let’s head to Epcot; it’s right over here:
Okay, I wasn’t even going to click on the video for the Avatar ride (Animal Kingdom) because it’s such an incredible in-person experience that I was sure I would be disappointed. I was not. If I can’t be physically on this ride right now, at least I’ve got this:
If you haven’t had enough, the LMG Vids YouTube Channel has playlists of rides from a variety of theme parks, including all the Disney parks in Orlando and California, Legoland California, Knott’s Berry Farm, and the Tokyo and Hong Kong Disneylands.
Meet the smartest parents on Earth! Join our parenting Facebook group.
geeky,Tech,Database
via Lifehacker https://lifehacker.com
April 1, 2020 at 02:03PM
The Best String Trimmers
https://ift.tt/2p0nDLT

After using 10 string trimmers to level 12,598 square feet of an overgrown field and trimming over 6,000 linear feet along walls and fences, we’re convinced the best string trimmer (also known as a weed wacker or a weed eater) is the Ego ST1502-SF Power+ 15" String Trimmer.
technology
via Wirecutter: Reviews for the Real World https://ift.tt/2gcK1uO
March 31, 2020 at 04:22PM