Watch: Somebody pranked Brian Williams on his show, and he was NOT AMUSED.
https://ift.tt/3aeJypQ
This is pretty stinking great! 🤣
fun
via Not the Bee https://notthebee.com
January 29, 2021 at 08:07AM
Just another WordPress site
Watch: Somebody pranked Brian Williams on his show, and he was NOT AMUSED.
https://ift.tt/3aeJypQ
This is pretty stinking great! 🤣
fun
via Not the Bee https://notthebee.com
January 29, 2021 at 08:07AM
Hoo boy! Watch this mad dad go completely ballistic on his school board and call them “a bunch of cowards hiding behind our children” for refusing to open schools 😮
https://ift.tt/3iRNjW5
A ticked father unleashed a firestorm of angry logic on the Loudoun County School Board in Virginia on Tuesday, telling them to "open the freaking schools" or to "get off the podium."
fun
via Not the Bee https://notthebee.com
January 27, 2021 at 02:35PM
Use Multiple Databases in Laravel
https://ift.tt/3iU8S8v
Laravel is a free, open-source PHP framework, created by Taylor Otwell. It follows a Model-View-Controller (MVC) design pattern. Laravel reuses the existing components of different frameworks which helps to create a perfect and outstanding web application. If you are familiar with PHP, Advance PHP it will make your task easier. Laravel is secure and prevents web attacks using their CSRF (Cross-site Request Forgery) protection.
While developing a web application some times we need to use multiple databases because of project requirement or large scale projects, in this time laravel allows to use multiple database connections. You can easily learn how to use multiple databases with laravel in this blog.
Add Database Connection Detail in .env
DB_HOST_SECOND="DB HOST HERE"
DB_PORT_SECOND="DB PORT HERE"
DB_DATABASE_SECOND="DATABASE NAME HERE"
DB_USERNAME_SECOND="DB USERNAME HERE"
DB_PASSWORD_SECOND="DB PASSWORD HERE"
As you can see, you can go with multiple if you want to use more databases, also you can go with other database engines. Here we use MySQL.
Configure database detail in config/database.php
add detail in the connections array.
<?php
return [
'connections'=>[
'mysql'=>[
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
],
'mysql_second'=>[
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST_SECOND', '127.0.0.1'),
'port' => env('DB_PORT_SECOND', '3306'),
'database' => env('DB_DATABASE_SECOND', 'forge'),
'username' => env('DB_USERNAME_SECOND', 'forge'),
'password' => env('DB_PASSWORD_SECOND', ''),
]
]
];
?>
Note: Add All Detail Of Database Connection Here we add only database detail for learning purposes.
Now We learn How to use this connection with Schema, Query, and Eloquent Model.
With Schema Builder, You can use any connection by simply run the connection()
method:
Schema::connection('mysql_second')->create('table_name', function($table){
// entire code here
});
Similar to Schema Builder, you can define a connection in Query Builder:
$posts = \DB::connection('mysql_second')->select('id','title')->get();
Similar to Query Builder, you can define a connection in the Eloquent Model:
<?php
namespace App\Models;
class Post extends Eloquent {
protected $connection = 'mysql_second';
}
?>
Also, you can use the connection in custom join queries. with this simple example:
\DB::table('posts')->join('mysql_second.types as secondDbType','posts.code','=','secondDbType.code')->first();
If you have any queries or doubts about this topic please feel free to contact us. We will try to reach you.
Thank You.
programming
via Laravel News Links https://ift.tt/2dvygAJ
January 27, 2021 at 02:54PM
Bazar – a Laravel e-commerce package
https://ift.tt/3sXA2A5
Bazar is a powerful “headless” e-commerce system. Built on Laravel and Vue.
Bazar provides a flexible and easily extensible system, respecting the Laravel conventions.
Bazar\Support\Facades\Discount
facade.Bazar\Contracts\Shippable
contract.Bazar\Support\Facades\Tax
facade.Thank you for considering contributing to Bazar! The contribution guide can be found in the documentation.
Bazar is open-sourced software licensed under the MIT.
programming
via Laravel News Links https://ift.tt/2dvygAJ
January 27, 2021 at 03:24PM
Wacom’s pen tablet for students now works with Chromebooks
https://ift.tt/3sQjOIK
For all their strengths as eduction tools, Chromebooks have their limitations. Most don’t come with a stylus, and even if they do, they’re usually not the most accurate. Enter Wacom.
The company’s One by Wacom tablet now works with Chrome OS devices thanks to the fact it recently earned Google’s Works with Chromebook certification. Not to be confused with the $400 Wacom One tablet, the One by Wacom doesn’t feature a display. Instead, it’s exclusively a compatible surface for the stylus that comes inside the box. While by no means the most capable pen Wacom makes, it’s no slouch either. With 2,048 pressure points, it’s comparable to a previous generation Surface Pen.
To make everything work, you simply connect the pen tablet to your Chromebook through a USB-A port. There’s no need to install any separate drivers or software. What’s more, you don’t even need to charge the stylus as it works without a battery, and if own a Chromebook that already comes with a USI-compatible pen, the One by Wacom stylus won’t interfere with it. With the tablet and pen together weighing in at 259g, the entire device is also light and small enough it can easily fit in a backpack, which makes it easy to see why Wacom thinks it’s a great fit for students.
As is the case with most accessories, how useful the One by Wacom tablet ends up being will depend on third-party support. Out of the gate, the tablet is fully supported by Clip Studio Paint (as long as you have Chrome OS 8.7 or later installed on your device), as well as education apps like Kami, Pear Deck, Limnu and Explain Everything. It’s also worth noting you can use the device with Mac and Windows computers, so it’s more than just an accessory for Chromebooks.
The tablet comes in two sizes: small and medium. In the US, it’s only available in the smaller 8.3 by 5.7-inch size, which you can already buy for $59.95.
Tech
via Engadget http://www.engadget.com
January 26, 2021 at 12:09AM
Now this is a damned good shooting and I want to see BLM bitch about it
https://ift.tt/3a0xSXK
You risk a baby’s life? You deserve this ending.
The emotion in the cop’s voice with the kid at the end is palpable. Well done, Office, very frigging well done.
guns
via https://gunfreezone.net
January 25, 2021 at 06:48PM
How to do Payments with Stripe Checkout using Laravel
https://ift.tt/39jRaIt
Payments gateways are very useful components of any e-commerce store. One of the popular payment gateways is Stripe. it’s becoming more popular nowadays.
Stripe’s simple definition is :
We bring together everything that’s required to build websites and apps that accept payments and send payouts globally. Stripe’s products power payments for online and in-person retailers, subscription businesses, software platforms and marketplaces, and everything in between. ~ Stripe
To begin this laravel tutorial, I hope you already have fresh laravel repo.
Run the following command to install stripe :
composer require stripe/stripe-php
if you don’t have a Stripe account, you’ll want to set that up and add your API keys. Add the following to your .env file.
STRIPE_KEY=your-stripe-key
STRIPE_SECRET=your-stripe-secret
php artisan vendor:publish --tag="cashier-migrations"
And Run migrations by hitting the following command
php artisan migrate
Now create a stripe controller by hitting the following command:
php artisan make:controller StripeController
namespace App\Http\Controllers;
use Illuminate\Contracts\View\Factory;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Stripe\Checkout\Session;
use Stripe\Exception\ApiErrorException;
/**
* Class FeaturedCompanySubscriptionController
*/
class StripeControlle extends AppBaseController
{
public function createSession(Request $request)
{
setStripeApiKey();
$session = Session::create([
'payment_method_types' => ['card'],
'customer_email' => $userEmail,
'line_items' => [
[
'price_data' => [
'product_data' => [
'name' => 'Make '.$company->user->first_name.' as featured Company',
],
'unit_amount' => 100 * 100,
'currency' => 'USD',
],
'quantity' => 1,
'description' => '',
],
],
'client_reference_id' => '1234',
'mode' => 'payment',
'success_url' => url('payment-success').'?session_id={CHECKOUT_SESSION_ID}',
'cancel_url' => url('failed-payment?error=payment_cancelled'),
]);
$result = [
'sessionId' => $session['id'],
];
return $this->sendResponse($result, 'Session created successfully.');
}
public function paymentSuccess(Request $request)
{
$sessionId = $request->get('session_id');
//
}
public function handleFailedPayment()
{
//
}
}
Route::post('stripe-charge', 'StripeController@createSession');
Route::get('payment-success', 'StripeController@paymentSuccess');
Route::get('failed-payment', 'StripeController@handleFailedPayment');
Here we are going to create stripe session from backend and redirect to stripe checkout page once we will receive the sessionId from backend.
Assume that makePaymentURL is something like “APP_URL/stripe-charge”.
Now let’s say when you hit the submit form of stripe it will call MakePaymentURL and that URL returns your session ID which we will use to redirect to the stripe checkout page.
$(document).on('click', '#makePayment', function () {
$(this).addClass('disabled');
$.post(makePaymentURL, payloadData).done((result) => {
let sessionId = result.data.sessionId;
stripe.redirectToCheckout({
sessionId: sessionId,
}).then(function (result) {
$(this).html('Make Featured').removeClass('disabled');
manageAjaxErrors(result);
});
}).catch(error => {
$(this).html('Make Featured').removeClass('disabled');
manageAjaxErrors(error);
});
});
That’s it, after entering proper details into stripe you will get a success callback to a related route, where you can perform related actions.
programming
via Laravel News Links https://ift.tt/2dvygAJ
January 25, 2021 at 03:05PM
Top 10 Best Selenium Cheat Sheets.
https://ift.tt/399YVAx
Hey Finxters! I am back to write another top 10 cheat sheets for Python with libraries, open-source and frames that can be used with it.
Today, we are going to discuss Selenium Cheat Sheets used in Python.
To better explain, Selenium is an open-source web-based automation tool that allows you to test your web application in various ways including permit it to tap buttons or enter the content in structures. It is also a powerful tool for controlling web browser through programs and automation. I hope that you find these cheat sheets useful, tape them to your wall and study them as you work on your portfolio projects.
Without further ado, let us dive right into Selenium and the cheat sheets we need to learn it.
This tutorial will get you started in Selenium and Python. It starts off with a table of contents to get you through the basics to more advanced methods, then followed by two tables, Selenium Web Drivers and Selenium Web Elements to help get you started on what you can expect.
Pros: Rated ‘E’ for everyone. Perfect for if you are just starting out.
Cons: None that I can see.
Though this cheat sheet uses examples in Java, it does go through the various commonly used methods in Selenium for web browser manipulations. From loading a webpage to finding an element by XPath. This cheat sheet is great for beginners wanting to understand Selenium and all of the languages it supports.
Pros: Rated ‘E’ for everyone. These commonly used methods are subject to be used on almost every project so be sure to pin this one to the wall.
Cons: None that I can see.
This cheat sheet is specifically designed for common exceptions for Selenium, and how to handle them. It will give you a list of exceptions and their definitions on what each error is, as well as each case they might occur. Honestly, take the time to highlight this cheat sheet before taping it to the wall. This cheat sheet is going to be your best friend when learning exceptions in Selenium.
Pros: Rated ‘E’ for everyone.
Cons: None that I can see.
This cheat sheet will teach you all about Selenium. While it claims to have everything, you need to know about Selenium, I cannot confirm that. What I can confirm is that it is perfect for beginners and intermediate developers to learn Selenium with. From what it is all about to how to install. This cheat sheet will take you through the basics of what you need to learn. The only way to get better is to practice though! Keep it handy nearby as you go through Selenium.
Pros: Rated ‘E’ for everyone.
Cons: None that I can see.
This cheat sheet is a collection of the ‘most exhaustive’ list of web driver locators. Even though it says its for C#, understand that Selenium can be used for many languages including Python, without its commands changing from language to language. It lists default methods and attributes, complete XPath Locators, and complete CSS selectors.
Pros: Rated ‘E’ for everyone. It is a good list to keep handy when working in Selenium.
Cons: None that I can see.
This cheat sheet uses the most frequently used Selenium and Python. It will give you clear instructions for Auto downloading, locating elements, and reading browser details. It has a list of Python Selenium commands for operations on elements including code snippets so you can if you are doing it right. It specifically works in Python for those who are just starting to learn Selenium with Python.
Pros: Rated ‘E’ for everyone.
Cons: None that I can see.
Intellipaat is another on of those website I visit frequently for information and cheat sheets. This cheat sheet is for Selenium, it will show you the commands neatly separated and listed. It lets you know what each command is and what to write when using the method. It does not show you code examples, but it is one you would want to keep handy, taped to the wall.
Pros: Rated ‘E’ for everyone. By far, the easiest one to understand and implement.
Cons: None that I can see, though it does not have code snippets.
This cheat sheet is again for Python and WebDriver commands. These are helpful when learning to automate web application testing. It will teach you to install, maximize and minimize the windows, switching between frames and cookies. This is another great cheat sheet to have handy taped to the wall.
Pros: Rated ‘E’ for everyone. It is very clear on how to run each command.
Cons: None that I can see.
Cheatography is another website I like to visit when I need any cheat sheet that is easily readable, and I can hang up on the wall for accessibility. This is another Selenium cheat sheet I would say is great way for testing yourself. It offers definitions, but not the actual code to write the method.
Pros: Easy to read, great for testing yourself on various definitions on Selenium.
Cons: For the intermediate developer, it offers no code methods.
While not exactly a cheat sheet, it is a perfect beginners guide to Selenium and offers tutorials on Selenium in Java. The nice thing is the commands do not change much from language to language. So, you will be able to convert it to your language of choice. This is the perfect way to get started.
Pros: Rated ‘E’ for everyone. Perfect beginner’s tutorial.
Cons: None that I can see.
Thank you once again for coming along on this journey with me to find the best Selenium cheat sheets on the web. Tape these to your wall or keep them in a handy reference notebook on the desk when you are working. I hope you find these articles informative and useful as you continue your journey in Python!
Related Articles:
The post Top 10 Best Selenium Cheat Sheets. first appeared on Finxter.
Python
via Finxter https://ift.tt/2HRc2LV
January 22, 2021 at 10:17AM
AR 15 Magazine Faceoff: Best of the Best
https://ift.tt/39PazzU
Somewhere in the deepest parts of the dark web, there’s a conspiracy afoot. Sewing division, and tearing families apart, the war of the AR 15 Magazine rages on, and it’s not what we think. This isn’t the fight over what makes a high capacity magazine, but over which one is the best. The factions are fuzzy, sometimes blending between polymer and metal construction, other times relying on reputation and history, but the truth about what makes an excellent AR 15 Magazine has to come out, and it’s not for the faint of heart.
We concern ourselves with features such as construction, capacity, cost, and compatibility. The evaluations, however, focus on reliability over time, in harsh environments, and durability, as well as subjective matters including aesthetic and feel. The features can typically be gleaned from the manufacturer’s website, the evaluation, however, cannot.
Construction: Reinforced Polymer
Capacity: 10/20/30/40 rounds
Colors: Black, Brown, and Irregular Releases
Cost: ~$12-18 depending on the model, and bulk orders.
Compatibility:
The reigning champion of polymer AR15 magazines holds its throne, not only because it has seen war and come home to tell about it, but continues to fit both the needs of the many and the needs of the few. Having improved their initial design to the current standard of 3rd Generation PMAGS, the list includes options for capacity and caliber-specific models. Early to identify the need for a 300 Blackout specific magazine, for both differentiating from mags loaded with .223/5.56 and specifically identifying feed issues specific to the caliber, Magpul continues to fit a niche, even when it has long defined a genre.
The motive behind creating a polymer AR 15 Magazine isn’t as simple and one single choice. Aluminum magazines suffered from bent feed lips for years, and instead of bending, the polymer would simply break, leaving nothing to chance. Polymer could survive and continue in extreme environments where aluminum would shrink and expand depending on the temperature. By manufacturing AR 15 magazines through injection molding, Magpul achieved a disassemblable magazine without the bulk needed with aluminum construction.
Make no mistake, however, PMAGS are made to last as long as possible, but also have a disposable element. An out of spec PMAG should be broken or cracked, relieving the user of having to look for small bends. At the same time, as a testimony to their durability, many remain in use after decades of deployments and competitive abuse.
Website: www.magpul.com
Construction: Carbon Fiber Reinforced Polymer
Capacity: 32 rounds
Colors: Black
Cost: ~$19
Compatibility: 5.56 and 300 Blackout
John Lovell of Warrior Poet Society once nearly broke the internet when he suggested that a 30 round AR 15 magazine should only be loaded to 28 or 29 rounds. This practice originated in the military to make seating a magazine easier and more reliable on a closed bolt under stress, so it’s not surprising that when Daniel Defense came out with their own magazine, they set their capacity at 32. Further, they took inspiration from many other magazine accessories common across military and competitive scenes with aggressive texturing and a looped baseplate.
Unlike PMAGs, Daniel Defense Magazines come in one format, and one format only. Both 300 Blackout and .223/5.56 rounds reliably cycle, which makes them a good candidate to add to an already existing stockpile to consistently differentiate between magazines loaded with the caliber.
Website: www.danieldefense.com
Where to Buy: When In Stock, $19 at Gun Mag Warehouse, $22 at Brownell’s, and $22 from Daniel Defense.
Construction: Polymer Body with Hardened Steel Feed Lips
Capacity: 5, 10, 20, 30 round options.
Colors: Black, Flat Dark Earth, Clear, Smoke, Translucent Red, Translucent Flat Dark Earth, and other special releases.
Cost: ~$16
Compatibility: .223/5.56 with specific options for 300 Blackout
Additional Features: Couplers Available
Lancer Systems took the strengths of both metal and polymer magazines and combined them in order to produce a hybrid that combats the weakness of both. The hardened steel feed lips resist distortion better than aluminum and don’t crack like polymer. The lightweight body can be molded for a better grip. Whether for the tactical ability to check rounds or for the Instagram, or to differentiate between mags loaded with 300 Blackout or 2.23/.556, polymer has quickly become the new normal in magazine construction.
Lancer mags come with a suite of useful features. Other than having a long and constantly changing list of color options, Lancer AR 15 Magazines come in different capacities and have propriety couplers for those so inclined. The texture resembles some chequering seen on pistol grips and provides a secure hold when cold and wet while ridges serve as round count indicators with markers at 30 and 20 rounds. Compared to a PMAG, Lancer Mags are a little thinner and slightly closer in dimension to their aluminum predecessors.
URL: https://lancer-systems.com/
Construction: Glass Reinforced Polymer
Capacity: 32 rounds
Colors: Black
Cost: ~$17
Compatibility: .223/5.56
Similar to Daniel Defense Magazines, the Strike Industries AR 15 Magazine has a capacity of 32 for spring tension. Following their style, it has both aggressive texturing and a slight cyberpunk aesthetic. It’s not all show, as the front and back of the AR 15 Magazine feature the most abrasive surface, leaving the sides slicker to avoid rubbing holes in gear or dragging during a reload.
Strike Industries took extra care in designing their feed ramp, for a secure first-round chambering. Though they are a new player on the AR 15 Magazine field, it is yet to see where they will land, although the pool is large and the demand high. A small but distinguishing feature is the thumb bump on the back spine. Acting as a reference point, it serves as a repeatable spot to index the thumb, especially when drawing from a chest rig or plate carrier. Those familiar with efficiently reloading under Night Vision will immediately relate to this small advantage.
Where to Buy and URL: https://www.strikeindustries.com/si-ar-mag.html
Construction: Aluminum or Steel
Capacity: 5, 10, 20, 30, 40 rounds.
Colors: If you can imagine it, someone probably sells it somewhere.
Cost: ~$12-35
Compatibility: Variations are to be expected. STANAG will want to be individually tested for 300 Blackout.
As it stands, aluminum magazines are a world of their own. Variations between companies require a little investigation to determine what the markings truly mean. Like forged AR-15 Lowers, at some point many were made in the same factory, but that does not mean all aluminum magazines are created equal. Derived from the NATO term Standardization Agreement, STANAG pattern magazines are supposed to be able to fit and operate in any firearm designed to the specifications.
There appears, from the outset, to be two different discussions when it comes to aluminum AR 15 Magazines. First, there are the aluminum-versus-polymer wars, which occasionally resemble the old 9mm versus .45 days of yore. Within the aluminum magazine purists, however, you will find another conflict. Which manufacturers are considered worthy, and which should be avoided?
Aluminum magazines differ from polymer, in that their feed lips will bend when plastic will break. This double-edged sword renders polymer magazines disposable, while aluminum AR 15 Mags require maintenance. With routine inspection and regular tuning, aluminum magazines can last for decades and across multiple conflicts. In contrast, however, a bent feed lip can cause malfunctions and Murphy’s Law doesn’t play fair. Those who have carried a firearm professionally have long attested to the importance of magazine maintenance.
The AR 15 Drum Magazine has seen a renaissance in recent years and directly challenges the higher capacity box style magazines for capacity and reliability.
Construction: Reinforced Polymer
Capacity: 60 rounds
Colors: Black
Cost: ~$125
Compatibility: 2.23/.556 only
For years, capacity has always had its drawbacks and it has long been either reliability or weight. Since much of the weight is derived from the ammunition carried, one can only make a 60 round AR 15 magazine so light. The greater challenge of reliability includes not only adverse environments, but drop tests and feeding consistencies. The Magpul D60 moves away from the box style magazine to bring the increased reliability of a drum, and the cost of size and weight.
Round after round, the Magpul D60 Ar 15 Magazine continues to chew our ammunition stores and in turn, ammo budget. On top of regularly feeding .223 and 5.56 ammunition, the Magpul D60 also boasts something not always common in drum magazines: it’s user servicable. Magpul recommends that the drum be cleaned and lightly oiled every 1000 rounds, which, if we’re tracking that round count, speaks for itself.
There’s no way to escape the weight of a fully loaded 60 round drum. Though difficult to store on a plate carrier or belt, D60’s find their place in both defensive and competitive uses. A round count window on the rear of drum informs the shooter when the drum is full and when 10 rounds remain.
guns
via Recoil https://ift.tt/2ycx5TA
January 21, 2021 at 11:11PM
F**k Mayor Pete
https://ift.tt/2LK6NzX
Mayor Pete Buttigieg is going through his confirmation hearing in the Senate to be Secretary of Transportation.
His qualifications is that he had anonymous sexual encounters in airport men’s rooms got engaged an an airport terminal.
As I mentioned earlier, Biden issued an executive order killing the Keystone XL pipeline and wants to end leases drilling on public land in Alaska.
Gas will hit $5 per gallon, devastating the economy, enriching Arab terrorist states, and making us dependent on foreign oil again.
This idea is such a shit idea that it’s pissed off the Canadian Prime Minister.
This will cost this country billions of dollars and thousands of jobs.
Little Lord Pete was asked about this and said this:
Transportation Secretary nominee Pete Buttigieg defends Biden’s elimination of Keystone pipeline jobs, saying those workers need to get “different ones”pic.twitter.com/T56f7aKp8D
— Tommy Pigott (@TCPigott) January 21, 2021
What the actually fuck!!!
Oil line work is good paying work.
What the fuck are welders, pipefitters, and other guys used to making $30+ per hour plus overtime going to do? Become Walmart greeters?
These are valuable skills and needed jobs. Thar is until the Government comes in and fucks people over.
The fuck is wrong with Pete.
I’ll tell you.
He’s a piece of shit motherfucker that cut his teeth at McKinsey and Co. which is the birthplace of the corporate “fuck the working man, outsource his job so the CEO can get a bonus” business consulting.
Now he’s doing the same fucking thing, not for some assfuck CEO but to benefit the human fucking garbage at the Climate Change Industrial Complex.
This guy built his career fucking over the working man and he’s doing that again.
That’s his qualification. His job isn’t to improve the economy through efficient transportation and good transportation energy policy. His job is to fuck working and middle class people out of their jobs so a handful of people (green energy execs and investors) can get filthy fucking rich.
When you think about it like that, he’s eminently qualified.
guns
via https://gunfreezone.net
January 21, 2021 at 03:25PM