Watch: The KA-BAR Story

This video tells the tale of Ka-Bar knives, in documentary style complete with actors and professional-quality production.

The story really begins with a name any “knife guy” will recognize: Case.

More than 30 cutlery operations connected to the Cases branch out over the span of a few decades. This dynasty begins with Job Case…

One of Job’s grandsons, Wallace Brown, became a traveling knife salesman, learning the ropes of the business, then started The Union Razor Company, a mail-order cutlery business, in 1894. His brother Emerson joined the company as well, expanding into the warehousing business as well as selling razors made for them by local companies and sold under the company name Brown Brothers Razor. It was a flop.

Some years later, Wallace bought out a struggling knife company in Tidioute, PA. Before long, the company’s name was changed to The Union Razor Company, hearkening back to his earlier effort. Down the road, they began making more knives and changed the name again. In 1909 it was renamed The Union Cutlery Company.

When approached by the Chamber of Commerce of Olean, NY, who offered bribes such as tax breaks, land, and even a building if he would move to Olean from Tidioute, Wallace accepted. The company was successful and their hunting knives became popular. Then one fateful day, an interesting package was received by Wallace Brown.

In the package was the skin of a Kodiak bear and a letter written by an Alaskan hunter who wished to thank the Union Cutlery Company for “their outstanding knives.” This morphed into a legend that the original of the Ka-Bar was based on “kill a bear (or b’ar).”

The current company owners heard this legend when they purchased Ka-Bar, but never knew for sure until they found some old documents…

The truth was never really totally known until recently. Twenty years after we purchased the company we unearthed a document… a manual written by the grandson of one of the original owners of Union Cut[lery]. In there, it specifically references the letter…

This corroborated the story, although the manual excerpt leans more towards “Kodiak” as the source of the “K.”

At any rate, the Ka-Bar name became a registered trademark in 1924.

In the midst of the Great Depression, leadership of the company was left in the hands of 26-year-old Danforth Brown after his father and uncle both died young. Union Cutlery made it through, and was ready and able when World War 2 came around with its many manufacturing jobs.

The most famous combat knife to emerge at this time was the 1219C2, or USMC Fighting Utility Knife, which was designed by USMC Capt. (some sources say Maj.) Howard America, USMC Col. John Davis — and Danforth Brown.

At this time, Danforth made the fateful decision to mark products made for the war with the Ka-Bar name, rather than “Union Cutlery.”

Most 1219C2 knives were made by other companies, but most troops seemed to agree that a Ka-Bar branded 1219C2 was better than the rest. The name gained such popularity that Union eventually changed the company name to Ka-Bar.

When hard times came again, Danforth agreed to the same sort of “relocation bribery,” this time moving the company to Dawsonville, Georgia. It was a huge mistake, and two years later he was back in New York where an established factory and skilled workforce stood ready to make more Ka-Bars.

Danforth passed away in 1970, and the company was bought & sold numerous times, eventually going bankrupt. After being saved a time or two, Ka-Bar was purchased by a large conglomerate who used the brand on cheap imported knives. It was a sad time for anyone who really cared about the Ka-Bar name.

Cutco, then known as Alcas, bought Ka-Bar in the mid-1990s. Alcas had been making the old classic Ka-Bar-branded fighting knife for a couple of decades, so it was a natural fit as far as that goes. With the surge of warfare in the early 2000s, a new generation of soldiers began using Ka-Bar knives. Working with independent knife designers has also been lucrative for them in recent years.

In April 2018, the company celebrated “120 years in the Ka-Bar story.”

The post Watch: The KA-BAR Story appeared first on AllOutdoor.com.

via All Outdoor
Watch: The KA-BAR Story

SQL Merge Statement Tutorial With Example | Merge In SQL

SQL Merge Statement Tutorial With Example | Merge In SQL

SQL Merge Statement Tutorial With Example is today’s topic. SQL MERGE STATEMENT is the combination of INSERT, UPDATE, and DELETE statement. Merge Statement can perform all these operations in our main target table when the source table is provided. MERGE is very useful when it comes to loading the data warehouse tables, which can be very large and require the specific actions to be taken when the rows are or are not present.

SQL Merge Statement

The syntax is following.

MERGE <target_table> [AS TARGET]
USING <table_source> [AS SOURCE]
ON <search_condition>
[WHEN MATCHED 
THEN <merge_matched> ]
[WHEN NOT MATCHED [BY TARGET]
THEN <merge_not_matched> ]
[WHEN NOT MATCHED BY SOURCE
THEN <merge_matched> ];

#How to use SQL MERGE STATEMENT

  1. Identify the target table which is going to be used in that logic.
  2. Next step is to identify the source table which we can use in the logic.
  3. Next step is to determine the appropriate search conditions in the ON clause to match the rows.
  4. Implement logic when records are matched or not matched between the target and source.
  5. For each of this comparison, conditions write the logic, and When matched, generally an update condition is used and When not matched, then insert or delete statement is used.

Let’s Clear this by seeing an example:

Consider Table Products: (This will be considered as Target Table).

ID NAME PRICE
101 Tea 5.00
201 Chips 10.00
301 Coffee 15.00

Updated_Products: (This will be Considered as SOURCE Table).

ID NAME PRICE
101 Tea 5.00
201 Biscuits 20.00
301 Coffee 25.00

 

#QUERY

MERGE PRODUCTS AS TARGET
USING UPDATED_PRODUCTS AS SOURCE
ON (TARGET.ID=SOURCE.ID)
THEN MATCHED AND TARGET.NAME SOUCE.NAME
OR TARGET.PRICE SOURCE.PRICE THEN
UPDATE SET TARGET.NAME=SOURCE.NAME,
TARGET.PRICE=SOURCE.PRICE
WHEN NOT MATCHED BY TARGET THEN
INSERT (ID, NAME, PRICE)
VALUES (SOURCE.ID, SOURCE.NAME, SOURCE.PRICE)
WHEN NOT MATCHED BY SOURCE THEN
DELETE;

#Output

So, after running the above query Products table will be replaced by the Updated_products table.

You can see the table below.

ID NAME PRICE
101 Tea 5.00
201 Biscuits 20.00
301 Coffee 25.00

 

So, in this way, we can perform all three operations together using MERGE clause.

NOTE:

We can use any name other than source and target we have used these names to give you a better explanation.

#Some basic Key Points

  1. The MERGE SQL statement requires the semicolon (;) as a statement terminator Otherwise Error 10713 will be raised.
  2. At least one of three MATCHED clauses must be specified when we are using the MERGE statement.
  3. The user using the MERGE statement should have SELECT permission on the SOURCE table and INSERT, UPDATE and DELETE permissions on a TARGET table.
  4. While inserting, deleting or updating using merge statement in SQL Server fires any corresponding AFTER triggers defined on that target table, but it does not guarantee which action to fire triggers first or last.

Finally, SQL Merge Tutorial With Example is over.

The post SQL Merge Statement Tutorial With Example | Merge In SQL appeared first on AppDividend.

via Planet MySQL
SQL Merge Statement Tutorial With Example | Merge In SQL

An intelligent alternative version of Laravel Database Migrations

Features
* Using raw SQL queries
– you can use all the capabilities of your database to describe the structure and changes
– easy work with procedures and functions
– easy data migrations (INSERT/UPDATE)
– IDE native syntax support
* Running migrations within a transaction with automatic rollback in case of an error (if your database supports it, PostgreSQL for example)
* Dynamic output running the SQL-queries
* Automatic rollback after switching the branch (for reviewing, testing, demo, building at permanent/staging database)
* Auto-update the migration after editing
* Apply with rollback testing – UD-DOWN-UP
* Rollback or Reload any selected migration
via Laravel News Links
An intelligent alternative version of Laravel Database Migrations

Picard Has a Dog Now

Jean-Luc Picard is back, and this time he’s got a cape on.
Photo: CBS

Jean-Luc Picard has been through some shit by the time we re-meet him in Star Trek: Picard. He’s left Starfleet, retired to a life of making wine and mourning his regrets. Whatever is a man to do when he’s going through some stuff? Get a dog, of course.

Patrick Stewart has just dropped a brand new poster for Picard, just ahead of the show—alongside Discovery and the upcoming animated series Lower Decks—heading to San Diego Comic-Con next week. It’s got everything you could want: Vineyards! Casks of Chateau Picard! Patrick Stewart in a rustic space cape! It’s got…a dog!

Yes, Jean-Luc has picked himself up a pup in the years between Nemesis and Star Trek: Picard, and he’s even given it a Starfleet command delta as a tag. Which is very cute! It’s also made cuter by the real-life fact that Stewart himself has long been an advocate for fostering dogs, championing rescue services through his social media accounts, mainly in the form of the best use of social media around: pictures of Patrick Stewart overjoyed by the presence of tiny little puppers:

Adorable. So are the dogs.

Carrying that personal connection over to Jean-Luc—aside from the connotations of Picard getting himself a dog to help deal with the traumas he’s faced—is a lovely touch, and speaks to the deep involvement Stewart himself has had in the return of one of his most beloved roles.

Just please, I know Jean-Luc’s going through things in this show but…don’t John Wick that pup, CBS. Please. I couldn’t bear to watch Picard go through that. We’ll bring you more on Picard as we learn it.


For more, make sure you’re following us on our new Instagram @io9dotcom.

via Gizmodo
Picard Has a Dog Now

The 7 Best Truly Free Antivirus Software for Mac

best-free-antivirus-mac

There’s a constant debate of whether or not Macs can get viruses. If you’re still wondering: “Do I need antivirus for my Mac?” The answer is yes.

Although Macs are less likely to become a victim of a virus, it’s important to stay on the safe side. You don’t have to go overboard with the antivirus tool that you choose. In fact, you have many free options that you should consider. Here are some of the best free antivirus for Mac—don’t worry, they don’t come with any gimmicks!

1. Avast Security

Avast Mac Free Antivirus

Avast’s free antivirus for Mac is considered one of the best options for Mac users. It comes loaded with features that constantly work to block any ransomware, viruses, or malware that compromise your Mac’s security.

When browsing the web, Avast Security will let you know when you come across a potentially dangerous site, and will also keep out any web trackers. Avast even prevents malicious emails and lets you know if there are any security holes in your Wi-Fi connection.

Since Avast Security is completely free on its own, it withholds some extra features for the paid Premium plan. Just be careful when you install the Free plan. Avast will try to throw in some costly extra features during installation that you probably don’t want.

2. Bitdefender Virus Scanner

Bitdefender Free Mac Antivirus

Bitdefender doesn’t come with many bells and whistles, but it’s still a viable option as a free antivirus software for Mac. This antivirus is especially great for scanning specific files or apps. It also allows you to omit files, making for a speedy scanning process. If it does happen to find a threat, Bitdefender will quarantine or remove it.

Bitdefender doesn’t run by itself, so you’ll need to manually prompt Bitdefender to perform scans. Fortunately, virus signatures are automatically updated every hour to ensure that you have the latest protection.

The only downside to Bitdefender is that it lacks the tools to protect your Mac online. For protection against dangerous websites or tricky phishing emails, you’ll have to look into a more well-rounded antivirus software instead.

3. Avira Free Antivirus for Mac

Avira Mac Free Antivirus

Avira doesn’t just think about the security of your Mac, but it considers the security of Windows-users as well—this makes it one of the best free antivirus programs for both Mac and Windows. It detects malware that can damage a Mac or Windows computer. This way, you don’t accidentally pass on any malware to any PC-using friends.

Despite the fact that Avira is free, it still has tons of useful features. The real-time scanner is capable of scanning your entire computer or just specific files. If you want a more hands-off approach, you can even schedule the scanner to run at certain times.

The full system scan can take a long time and tends to slow down your computer. You’ll have to perform less-involved quick scans if you want to keep your Mac’s performance up.

4. Sophos Home Free

Sophia Home Free Mac Antivirus

By default, Sophos’ Home Free plan comes with a 30-day trial of Sophos’ Home Premium. You don’t have to buy the Premium version once the trial ends, but you’ll lose a couple of Premium features you might’ve gotten used to. Either way, you can still get by with just the Free plan.

Sophos Home constantly keeps tabs on the status of your Mac. It searches and detects any ransomware, malware, viruses, Trojans, worms, bots, and more that can harm your computer.

Sophos Home also comes outfitted with parental controls that allow you to prevent your children from accessing certain websites. You can have up to three devices (both Mac or Windows) on the Free plan, ensuring that everyone in your family has protection.

5. AVG

AVG Mac Free Antivirus

AVG’s free protection is powerful enough to secure your Mac from malware, and protect you when you’re online. It can also prevent you from acquiring and passing on any PC or Android viruses. AVG automatically updates its virus database, so you’ll always have the most effective security.

That said, you won’t need to open AVG on a daily basis. It runs in the background, and covertly deflects any threats, such as malicious emails, websites, and downloads.

If you’re looking for any parental controls or webcam blockers, the free version of AVG won’t have it. It just offers scanning and detection features, which is just good enough for basic security needs. Unfortunately, the full system scan does cause your computer to perform slowly, and you can expect it to take several minutes (or hours) to complete.

6. Malwarebytes

Malwarebytes Mac Free Antivirus

Malwarebytes promises to scan a typical Mac in just under 30 seconds. If it finds anything suspicious, it’ll provide you with a list of potential threats. You can either choose to have Malwarebytes ignore it, or place the files into quarantine and delete them.

The Free version of Malwarebytes can help you detect malware threats quickly, but it doesn’t offer enough protection to use on its own. You’ll also get a 14-day trial of Malwarebytes Premium, so you’ll have to pay if you want access to all of its features in the future. By itself, the Free plan is just a bare-bones antivirus software—it simply identifies and erases any malicious threats.

7. Comodo Antivirus

Comodo Mac Free Antivirus

Komodo offers an easy-to-use interface and free protection for your Mac. Checking a file or app for viruses is as simple as dragging and dropping it into Comodo. It comes with a quick scan that finishes in minutes, and a total system scan that might take an hour or two to complete. The scheduler lets you pick and choose the times you want to perform scans so your computer won’t get bogged down at the wrong time.

Like some of the other antiviruses on this list, Comodo also stays up-to-date on the latest virus signatures to protect you from all types of viruses. Just remember that Comodo doesn’t automatically protect you online. You’ll have to download the free browser extension Comodo Online Security if you want to block any dangerous websites.

Finding the Best Free Antivirus for Mac

Many Mac users think that their device is resistant to viruses, however, that’s just not the case. Even if your Mac is less likely to contract a virus, it’s still possible for you to pass along malware to Windows and Android users. It doesn’t hurt to install a free antivirus for your Mac to prevent any security breaches.

If you’re looking to protect your Windows PC as well, check out our list of the best antivirus for Windows 10.

Read the full article: The 7 Best Truly Free Antivirus Software for Mac

via MakeUseOf.com
The 7 Best Truly Free Antivirus Software for Mac

Dark Empire (Trailer)

Dark Empire (Trailer)

Link

Animator Ian Wilkins is working on a new Star Wars-inspired series, a fan film project based on Tom Veitch and Cam Kennedy’s beloved Dark Empire comics, in which Palpatine returns from the dead and Luke struggles with his dark side. The awesome music in the trailer comes from composer Daniel Ciurlizza.

via The Awesomer
Dark Empire (Trailer)

A new laravel media manager

An alternative to spatie’s media library and plank’s mediable package.
This package allows you to upload attach media to your eloquent models via a "many to many" relationship. It also has image manipulation is built in which makes use of intervention/image under the hood.
The perfect engine for CMS applications which require a media manager.
via Laravel News Links
A new laravel media manager

Building a Vue SPA With Laravel Part 6

Building a Vue SPA With Laravel Part 6

We are going to finish the last part of basic CRUD: creating new users. You have all the tools you need from the previous topics we’ve covered thus far, so feel free to try to work on creating users and comparing this article to your efforts.

If you need to catch up, we left off in Part 5 with the ability to delete users and how to redirect users after successful deletion. We also looked at extracting our HTTP client to a dedicated module for reuse across the application.

Here’s the series outline thus far:

Adding the Create Users Component

First up, we’re going to create and configure the frontend component for creating new users. As a reminder, this tutorial isn’t focused on permissions; we are using the built-in Laravel users table to demonstrate working with CRUD within the context of a Vue Router project.

The UsersCreate.vue component is similar to the UsersEdit.vue component we created in Part 4:

<template> <div> <h1>Create a User</h1> <div v-if="message" class="alert"></div> <form @submit.prevent="onSubmit($event)"> <div class="form-group"> <label for="user_name">Name</label> <input id="user_name" v-model="user.name" /> </div> <div class="form-group"> <label for="user_email">Email</label> <input id="user_email" type="email" v-model="user.email" /> </div> <div class="form-group"> <label for="user_password">Password</label> <input id="user_password" type="password" v-model="user.password" /> </div> <div class="form-group"> <button type="submit" :disabled="saving">  </button> </div> </form> </div> </template> <script> import api from '../api/users'; export default { data() { return { saving: false, message: false, user: { name: '', email: '', password: '', } } }, methods: { onSubmit($event) { this.saving = true this.message = false } } } </script> <style lang="scss" scoped> $red: lighten(red, 30%); $darkRed: darken($red, 50%); .form-group { margin-bottom: 1em; label { display: block; } } .alert { background: $red; color: $darkRed; padding: 1rem; margin-bottom: 1rem; width: 50%; border: 1px solid $darkRed; border-radius: 5px; } </style> 

We added the form and inputs and stubbed out an onSubmit method. The rest of the component is identical to the UsersEdit component, except for the addition of the password input. A password is required to create a new user. We skipped having a password field when editing a user because typically, you have a specific password change flow that is separate from editing a user.

Note that we could spend some time extracting the form in both the create and edit views to a dedicated component, but we will leave that for another time (or feel free to work on that independently). The only difference is populating the form with existing user data (including user ID) vs. an empty form for creating users.

Configuring the Route

Next, we need to configure the Vue route and link to the page so we can navigate to the user creation screen. Open the resources/assets/js/app.js file and add the following route (and import):

import UsersCreate from './views/UsersCreate'; // ... const router = new VueRouter({ mode: 'history', routes: [ // ... { path: '/users/create', name: 'users.create', component: UsersCreate, }, { path: '/404', name: '404', component: NotFound }, { path: '*', redirect: '/404' }, ], }); 

Next, let’s add the link to the new component in the assets/js/views/UsersIndex.vue component:

<template> <div class="users"> <!-- ... --> <div> <router-link :to="{ name: 'users.create' }">Add User</router-link> </div> </div> </template> 

You should now be able to recompile your frontend assets with yarn watch and see the following:

Submitting the Form

At this point, we don’t have a backend route, so submitting the form via the API client will return a 405 Method Not Allowed. Let’s wire up the onSubmit() handler in the UsersCreate component without defining the route, which will allow us to see the error state of submitting the form quickly:

methods: { onSubmit($event) { this.saving = true this.message = false api.create(this.user) .then((data) => { console.log(data); }) .catch((e) => { this.message = e.response.data.message || 'There was an issue creating the user.'; }) .then(() => this.saving = false) } } 

Our form logs out the response data at this point, catches errors and then finally toggles saving = false to hide the “saving” state. We attempt to read the message property from the response or provide a default error message.

Next, we need to add the create() method to the API module we import in the component located at resources/assets/js/api/users.js:

export default { // ... create(data) { return client.post('users', data); }, // ... }; 

The form will send a POST request to the UsersController via the client. If you submit the form, you will see an error message with a 405 response error in the console:

Adding the API Endpoint

We are ready to add the API endpoint in Laravel for creating a new user. It will be similar to editing an existing user. However, this response will return a 201 Created status code.

We will start by defining the route for storing a new user via the API:

// routes/api.php Route::namespace('Api')->group(function () { // ... Route::post('/users', 'UsersController@store'); }); 

Next, open up the app/Http/Controllers/UsersController.php file and add store() method:

public function store(Request $request) { $data = $request->validate([ 'name' => 'required', 'email' => 'required|unique:users', 'password' => 'required|min:8', ]); return new UserResource(User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), ])); } 

When a user is valid, the new user response looks similar to the following when you submit the form:

{ "data": { "id":51, "name":"Paul Redmond", "email":"paul@example.com" } } 

If you submit invalid data, you will get something similar the following message:

Handing Success

We already handle what happens with a server error or a validation error; let’s finish up by handling a successful user creation. We’ll clear the form and redirect to the user’s edit page:

onSubmit($event) { this.saving = true this.message = false api.create(this.user) .then((response) => { this.$router.push({ name: 'users.edit', params: { id: response.data.data.id } }); }) .catch((e) => { this.message = e.response.data.message || 'There was an issue creating the user.'; }) .then(() => this.saving = false) } 

Here’s the final UsersCreate.vue component:

<template> <div> <h1>Create a User</h1> <div v-if="message" class="alert"></div> <form @submit.prevent="onSubmit($event)"> <div class="form-group"> <label for="user_name">Name</label> <input id="user_name" v-model="user.name" /> </div> <div class="form-group"> <label for="user_email">Email</label> <input id="user_email" type="email" v-model="user.email" /> </div> <div class="form-group"> <label for="user_password">Password</label> <input id="user_password" type="password" v-model="user.password" /> </div> <div class="form-group"> <button type="submit" :disabled="saving">  </button> </div> </form> </div> </template> <script> import api from '../api/users'; export default { data() { return { saving: false, message: false, user: { name: '', email: '', password: '', } } }, methods: { onSubmit($event) { this.saving = true this.message = false api.create(this.user) .then((response) => { this.$router.push({ name: 'users.edit', params: { id: response.data.data.id } }); }) .catch((e) => { this.message = e.response.data.message || 'There was an issue creating the user.'; }) .then(() => this.saving = false) } } } </script> <style lang="scss" scoped> $red: lighten(red, 30%); $darkRed: darken($red, 50%); .form-group { margin-bottom: 1em; label { display: block; } } .alert { background: $red; color: $darkRed; padding: 1rem; margin-bottom: 1rem; width: 50%; border: 1px solid $darkRed; border-radius: 5px; } </style> 

Conclusion

We have a basic working form to create new users that only have basic validation logic. This tutorial walks you through the basics of doing CRUD in Vue.

As homework, you can define a dedicated user form component for rendering a form for creating a new user and editing existing users if you think it’d be valuable reuse. We are okay with the duplication for now but would be good practice for creating reusable components.

I’d also like to emphasize that I stripped out many nice things we could have done, such as using a CSS framework like Bootstrap, etc. I decided to focus on the core aspects of someone that has never worked with Vue Router or building a single page application before. While to some, the tutorial might feel trivial, to beginners, it focuses on some essential concepts that differ from building traditional server-side applications.


Filed in: News


Enjoy this? Get Laravel News delivered straight to your inbox every Sunday.

No Spam, ever. We’ll never share your email address and you can opt out at any time.

via Laravel News
Building a Vue SPA With Laravel Part 6