Java Stack Class

I was recently started to learn Java (3 months back started), It's going well, learned a lot.

I am reffering this website to undersatand about Java Stack Class.

Can someone tell me which method is best to implement stack class?

Happy Coding!

Creating the Perfect Commit in Git

This article is part of our “Advanced Git” series. Be sure to follow Tower on Twitter or sign up for the Tower newsletter to hear about the next articles!

A commit in Git can be one of two things:

  • It can be a jumbled assortment of changes from all sorts of topics: some lines of code for a bugfix, a stab at rewriting an old module, and a couple of new files for a brand new feature.
  • Or, with a little bit of care, it can be something that helps us stay on top of things. It can be a container for related changes that belong to one and only one topic, and thereby make it easier for us to understand what happened.

In this post, we’re talking about what it takes to produce the latter type of commit or, in other words: the “perfect” commit.

Advanced Git series:

  • Part 1: Creating the Perfect Commit in Git
    You are here!
  • Part 2: Branching Strategies in Git
    Coming soon!
  • Part 3: Better Collaboration With Pull Requests
  • Part 4: Merge Conflicts
  • Part 5: Rebase vs. Merge
  • Part 6: Interactive Rebase
  • Part 7: Cherry-Picking Commits in Git
  • Part 8: Using the Reflog to Restore Lost Commits

Why clean and granular commits matter

Is it really necessary to compose commits in a careful, thoughtful way? Can’t we just treat Git as a boring backup system? Let’s revisit our example from above one more time.

If we follow the first path – where we just cram changes into commits whenever they happen – commits lose much of their value. The separation between one commit and the next becomes arbitrary: there seems to be no reason why changes were put into one and not the other commit. Looking at these commits later, e.g. when your colleagues try to make sense of what happened in that revision, is like going through the “everything drawer” that every household has: there’s everything in here that found no place elsewhere, from crayons to thumbtacks and cash slips. It’s terribly hard to find something in these drawers!

Following the second path – where we put only things (read: changes) that belong together into the same commit – requires a bit more planning and discipline. But in the end, you and your team are rewarded with something very valuable: a clean commit history! These commits help you understand what happened. They help explain the complex changes that were made in a digestible manner.

How do we go about creating better commits?

Composing better commits

One concept is central to composing better commits in Git: the Staging Area.

The Staging Area was made exactly for this purpose: to allow developers to select changes – in a very granular way – that should be part of the next commit. And, unlike other version control systems, Git forces you to make use of this Staging Area.

Unfortunately, however, it’s still easy to ignore the tidying effect of the Staging Area: a simple git add . will take all of our current local changes and mark them for the next commit.

It’s true that this can be a very helpful and valid approach sometimes. But many times, we would be better off stopping for a second and deciding if really all of our changes are actually about the same topic. Or if two or three separate commits might be a much better choice. 

In most cases, it makes a lot of sense to keep commits rather smaller than larger. Focused on an individual topic (instead of two, three, or four), they tend to be much more readable.

The Staging Area allows us to carefully pick each change that should go into the next commit: 

$ git add file1.ext file2.ext

This will only mark these two files for the next commit and leave the other changes for a future commit or further edits.

This simple act of pausing and deliberately choosing what should make it into the next commit goes a long way. But we can get even more precise than that. Because sometimes, even the changes in a single file belong to multiple topics.

Let’s look at a real-life example and take a look at the exact changes in our “index.html” file. We can either use the “git diff” command or a Git desktop GUI like Tower:

Now, we can add the -p option to git add:

$ git add -p index.html

We’re instructing Git to go through this file on a “patch” level: Git takes us by the hand and walks us through all of the changes in this file. And it asks us, for each chunk, if we want to add it to the Staging Area or not:

By typing [Y] (for “yes”) for the first chunk and [N] (for “no”) for the second chunk, we can include the first part of our changes in this file in the next commit, but leave the other changes for a later time or more edits.

The result? A more granular, more precise commit that’s focused on a single topic.

Testing your code

Since we’re talking about “the perfect commit” here, we cannot ignore the topic of testing. How exactly you “test” your code can certainly vary, but the notion that tests are important isn’t new. In fact, many teams refuse to consider a piece of code completed if it’s not properly tested.

If you’re still on the fence about whether you should test your code or not, let’s debunk a couple of myths about testing:

  • “Tests are overrated”: The fact is that tests help you find bugs more quickly. Most importantly, they help you find them before something goes into production – which is when mistakes hurt the most. And finding bugs early is, without exaggeration, priceless!
  • “Tests cost valuable time”: After some time you will find that well-written tests make you write code faster. You waste less time hunting bugs and find that, more often, a well-structured test primes your thinking for the actual implementation, too.
  • “Testing is complicated”: While this might have been an argument a couple of years ago, this is now untrue. Most professional programming frameworks and languages come with extensive support for setting up, writing, and managing tests.

All in all, adding tests to your development habits is almost guaranteed to make your code base more robust. And, at the same time, they help you become a better programmer.

A valuable commit message

Version control with Git is not a fancy way of backing up your code. And, as we’ve already discussed, commits are not a dump of arbitrary changes. Commits exist to help you and your teammates understand what happened in a project. And a good commit message goes a long way to ensure this.

But what makes a good commit message?

  • A brief and concise subject line that summarizes the changes
  • A descriptive message body that explains the most important facts (and as concisely as possible)

Let’s start with the subject line: the goal is to get a brief summary of what happened. Brevity, of course, is a relative term; but the general rule of thumb is to (ideally) keep the subject under 50 characters. By the way, if you find yourself struggling to come up with something brief, this might be an indicator that the commit tackles too many topics! It could be worthwhile to take another look and see if you have to split it into multiple, separate ones.

If you close the subject with a line break and an additional empty line, Git understands that the following text is the message’s “body.” Here, you have more space to describe what happened. It helps to keep the following questions in mind, which your body text should aim to answer:

  • What changed in your project with this commit?
  • What was the reason for making this change?
  • Is there anything special to watch out for? Anything someone else should know about these changes?

If you keep these questions in mind when writing your commit message body, you are very likely to produce a helpful description of what happened. And this, ultimately, benefits your colleagues (and after some time: you) when trying to understand this commit.

On top of the rules I just described about the content of commit messages, many teams also care about the format: agreeing on character limits, soft or hard line wraps, etc. all help to produce better commits within a team. 

To make it easier to stick by such rules, we recently added some features to Tower, the Git desktop GUI that we make: you can now, for example, configure character counts or automatic line wraps just as you like.

A great codebase consists of great commits

Any developer will admit that they want a great code base. But there’s only one way to achieve this lofty goal: by consistently producing great commits! I hope I was able to demonstrate that (a) it’s absolutely worth pursuing this goal and (b) it’s not that hard to achieve.

If you want to dive deeper into advanced Git tools, feel free to check out my (free!) “Advanced Git Kit”: it’s a collection of short videos about topics like branching strategies, Interactive Rebase, Reflog, Submodules and much more.

Have fun creating awesome commits!

Advanced Git series:

  • Part 1: Creating the Perfect Commit in Git
    You are here!
  • Part 2: Branching Strategies in Git
    Coming soon!
  • Part 3: Better Collaboration With Pull Requests
  • Part 4: Merge Conflicts
  • Part 5: Rebase vs. Merge
  • Part 6: Interactive Rebase
  • Part 7: Cherry-Picking Commits in Git
  • Part 8: Using the Reflog to Restore Lost Commits


The post Creating the Perfect Commit in Git appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Comparing HTML Preprocessor Features

(This is a sponsored post.)

Of the languages that browsers speak, I’d wager that the very first one that developers decided needed some additional processing was HTML. Every single CMS in the world (aside from intentionally headless-only CMSs) is essentially an elaborate HTML processor: they take content and squoosh it together with HTML templates. There are dozens of other dedicated HTML processing languages that exist today.

The main needs of HTML processing being:

  • Compose complete HTML documents from parts
  • Template the HTML by injecting variable data

There are plenty of other features they can have, and we’ll get to that, but I think those are the biggies.

This research is brought to you by support from Frontend Masters, CSS-Tricks’ official learning partner.

Need front-end development training?

Frontend Masters is the best place to get it. They have courses on all the most important front-end technologies, from React to CSS, from Vue to D3, and beyond with Node.js and Full Stack.

Diagram showing partials and {{ data }} turning into a complete HTML document.

Consider PHP. It’s literally a “Hypertext Preprocessor.” On this very website, I make use of PHP in order to piece together bits of templated HTML to build the pages and complete content you’re looking at now.

<h2>
  <?php the_title(); // Templating! ?>
</h2>

<?php include("metadata.php"); // Partials! ?>

In the above code, I’ve squooshed some content into an HTML template, which calls another PHP file that likely contains more templated HTML. PHP covers the two biggies for HTML processing and is available with cost-friendly hosting — I’d guess that’s a big reason why PHP-powered websites power a huge chunk of the entire internet.

But PHP certainly isn’t the only HTML preprocessor around, and it requires a server to work. There are many others, some designed specifically to run during a build process before the website is ever requested by users.

Let’s go language-by-language and look at whether or not it supports certain features and how. When possible the link of the preprocessor name links to relevant docs.

Does it allow for templating?

Can you mix in data into the final HTML output?

ProcessorExample
Pug
- var title = "On Dogs: Man's Best Friend";
- var author = "enlore";
h1= title
p Written with love by #{author}
ERB
<%= title %>
<%= description %>

<%= @logged_in_user.name %>
Markdown
PHP
<?php echo $post.title; ?>
<?php echo get_post_description($post.id) ?>
Also has HEREDOC syntax.
Slim
tr
td.name = item.name
Haml
<h1><%= post.title %></h1>
<div class="subhead"><%= post.subtitle %></div>
Liquid
Hello {{ user.name }}!
Go html/template
{{ .Title }}
{{ $address }}
Handlebars
{{firstname}} {{lastname}}
Mustache
Hello {{ firstname }}!
Twig
{{ foo.bar }}
Nunjucks
<h1>{{ title }}</h1>
Kit
<!-- $myVar = We finish each other's sandwiches. -->
<p> <!-- $myVar --> </p>
Sergey

Does it do partials/includes?

Can you compose HTML from smaller parts?

ProcessorExample
Pug
include includes/head.pug
ERB
<%= render 'includes/head' %>
Markdown
PHP
<?php include 'head.php'; ?>
<?php include_once 'meta.php'; ?>
Slim⚠️
If you have access to the Ruby code, it looks like it can do it, but you have to write custom helpers.
Haml
.content
=render 'meeting_info'
Liquid{% render head.html %}
{% render meta.liquid %}
Go html/template{{ partial "includes/head.html" . }}
Handlebars⚠️
Only through registering a partial ahead of time.
Mustache{{> next_more}}
Twig{{ include('page.html', sandboxed = true) }}
Nunjucks{% include "missing.html" ignore missing %}
{% import "forms.html" as forms %}
{{ forms.label('Username') }}
Kit<!-- @import "someFile.kit" -->
<!-- @import "file.html" -->
Sergey<sergey-import src="header" />

Does it do local variables with includes?

As in, can you pass data to the include/partial for it to use specifically? For example, in Liquid, you can pass a second parameter of variables for the partial to use. But in PHP or Twig, there is no such ability—they can only access global variables.

ProcessorExample
PHP
ERB<%= render(
partial: "card",
locals: {
title: "Title"
}
) %>
Markdown
Pug⚠️
Pug has mixins that you can put in a separate file and call. Not quite the same concept but can be used similarly.
Slim
Haml.content
= render :partial => 'meeting_info', :locals => { :info => @info }
Liquid{% render "name", my_variable: my_variable, my_other_variable: "oranges" %}
Go html/template{{ partial "header/site-header.html" . }}
(The period at the end is “variable scoping.”)
Handlebars{{> myPartial parameter=favoriteNumber }}
Mustache
Twig
{% include 'template.html' with {'foo': 'bar'} only %}
Nunjucks{% macro field(name, value='', type='text') %}
<div class="field">
<input type="{{ type }}" name="{{ name }}" value="{{ value | escape }}" />
</div>
{% endmacro %}
Kit
Sergey

Does it do loops?

Sometimes you just need 100 <div>s, ya know? Or more likely, you need to loop over an array of data and output HTML for each entry. There are lots of different types of loops, but having at least one is nice and you can generally make it work for whatever you need to loop.

ProcessorExample
PHPfor ($i = 1; $i <= 10; $i++) {
echo $i;
}
ERB<% for i in 0..9 do %>
<%= @users[i].name %>
<% end %>
Markdown
Pugfor (var x = 1; x < 16; x++)
div= x
Slim- for i in (1..15)
div #{i}
Haml(1..16).each do |i|
%div #{i}
Liquid{% for i in (1..5) %}
{% endfor %}
Go html/template{{ range $i, $sequence := (seq 5) }}
{{ $i }}: {{ $sequence }
{{ end }}
Handlebars{{#each myArray}}
<div class="row"></div>
{{/each}}
Mustache{{#myArray}}
{{name}}
{{/myArray}}
Twig{% for i in 0..10 %}
{{ i }}
{% endfor %}
Nunjucks{% set points = [0, 1, 2, 3, 4] %}
{% for x in points %}
Point: {{ x }}
{% endfor %}
Kit
Sergey

Does it have logic?

Mustache is famous for philosophically being “logic-less.” So sometimes it’s desirable to have a templating language that doesn’t mix in any other functionality, forcing you to deal with your business logic in another layer. Sometimes, a little logic is just what you need in a template. And actually, even Mustache has some basic logic.

ProcessorExample
Pug#user
if user.description
h2.green Description
else if authorised
h2.blue Description
ERB<% if show %>
<% endif %>
Markdown
PHP<?php if (value > 10) { ?>
<?php } ?>
Slim- unless items.empty?If you turn on logic less mode:
- article
h1 = title
-! article
p Sorry, article not found
Hamlif data == true
%p true
else
%p false
Liquid{% if user %}
Hello {{ user.name }}!
{% endif %}
Go html/template{{ if isset .Params "title" }}
<h4>{{ index .Params "title" }}</h4>
{{ end }}
Handlebars{{#if author}}
{{firstName}} {{lastName}}
{{/if}}
Mustache
It’s kind of ironic that Mustache calls itself “Logic-less templates”, but they do kinda have logic in the form of “inverted sections.”
{{#repo}}
{{name}}
{{/repo}}
{{^repo}}
No repos :(
{{/repo}}
Twig{% if online == false %}
Our website is in maintenance mode.
{% endif %}
Nunjucks{% if hungry %}
I am hungry
{% elif tired %}
I am tired
{% else %}
I am good!
{% endif %}
Kit
It can output a variable if it exists, which it calls “optionals”:
<dd class='<!-- $myVar? -->'> Page 1 </dd>
Sergey

Does it have filters?

What I mean by filter here is a way to output content, but change it on the way out. For example, escape special characters or capitalize text.

ProcessorExample
Pug⚠️
Pug thinks of filters as ways to use other languages within Pug, and doesn’t ship with any out of the box.
ERB
Whatever Ruby has, like:
"hello James!".upcase #=> "HELLO JAMES!"
Markdown
PHP$str = "Mary Had A Little Lamb";
$str = strtoupper($str);
echo $str; // Prints MARY HAD A LITTLE LAMB
Slim⚠️
Private only?
Haml⚠️
Very specific one for whitespace removal. Mostly for embedding other languages?
Liquid
Lots of them, and you can use multiple.
{{ "adam!" | capitalize | prepend: "Hello " }}
Go html/template⚠️
Has a bunch of functions, many of which are filter-like.
Handlebars⚠️
Triple-brackets do HTML escaping, but otherwise, you’d have to register your own block helpers.
Mustache
Twig{% autoescape "html" %}
{{ var }}
{{ var|raw }} {# var won't be escaped #}
{{ var|escape }} {# var won't be doubled-escaped #}
{% endautoescape %}
Nunjucks{% filter replace("force", "forth") %}
may the force be with you
{% endfilter %}
Kit
Sergey

Does it have math?

Sometimes math is baked right into the language. Some of these languages are built on top of other languages, and thus use that other language to do the math. Like Pug is written in JavaScript, so you can write JavaScript in Pug, which can do math.

ProcessorSupport
PHP<?php echo 1 + 1; ?>
ERB<%= 1 + 1 %>
Markdown
Pug- const x = 1 + 1
p= x
Slim- x = 1 + 1
p= x
Haml%p= 1 + 1
Liquid{{ 1 | plus: 1 }}
Go html/template
{{add 1 2}}
Handlebars
Mustache
Twig{{ 1 + 1 }}
Nunjucks{{ 1 + 1 }}
Kit
Sergey

Does it have slots / blocks?

The concept of a slot is a template that has special areas within it that are filled with content should it be available. It’s conceptually similar to partials, but almost in reverse. Like you could think of a template with partials as the template calling those partials to compose a page, and you almost think of slots like a bit of data calling a template to turn itself into a complete page. Vue is famous for having slots, a concept that made its way to web components.

ProcessorExample
PHP
ERB
Markdown
Pug
You can pull it off with “mixins”
Slim
Haml
Liquid
Go html/template
Handlebars
Mustache
Twig{% block footer %}
© Copyright 2011 by you.
{% endblock %}
Nunjucks{% block item %}
The name of the item is: {{ item.name }}
{% endblock %}
Kit
Sergey<sergey-slot />

Does it have a special HTML syntax?

HTML has <angle> <brackets> and while whitespace matters a little (a space is a space, but 80 spaces is also… a space), it’s not really a whitespace dependant language like Pug or Python. Changing these things up is a language choice. If all the language does is add in extra syntax, but otherwise, you write HTML as normal HTML, I’m considering that not a special syntax. If the language changes how you write normal HTML, that’s special syntax.

ProcessorExample
PHP
ERBIn Ruby, if you want that you generally do Haml.
Markdown
This is pretty much the whole point of Markdown.
# Title
Paragraph with [link](#link).

- List
- List

> Quote
Pug
Slim
Haml
Liquid
Go html/template
Handlebars
Mustache
Twig
Nunjucks
Kit⚠️
HTML comment directives.
Sergey⚠️
Some invented HTML tags.

Wait wait — what about stuff like React and Vue?

I’d agree that those technologies are component-based and used to do templating and often craft complete pages. They also can do many/most of the features listed here. Them, and the many other JavaScript-based-frameworks like them, are also generally capable of running on a server or during a build step and producing HTML, even if it sometimes feels like an afterthought (but not always). They also have other features that can be extremely compelling, like scoped/encapsulated styles, which requires cooperation between the HTML and CSS, which is an enticing feature.

I didn’t include them because they are generally intentionally used to essentially craft the DOM. They are focused on things like data retrieval and manipulation, state management, interactivity, and such. They aren’t really focused on just being an HTML processor. If you’re using a JavaScript framework, you probably don’t need a dedicated HTML processor, although it absolutely can be done. For example, mixing Markdown and JSX or mixing Vue templates and Pug.

I didn’t even put native web components on the list here because they are very JavaScript-focused.

Other considerations

  • SpeedHow fast does it process? Do you care?
  • Language — What was in what is it written in? Is it compatible with the machines you need to support?
  • Server or Build — Does it require a web server running to work? Or can it be run once during a build process? Or both?

Superchart

TemplatingIncludesLocal VariablesLoopsLogicFiltersMathSlotsSpecial Syntax
PHP
ERB⚠️
Markdown
Pug⚠️
Slim⚠️⚠️
Haml⚠️
Liquid
Go html/template⚠️
Handlebars⚠️
Mustache
Twig
Nunjucks
Kit⚠️
Sergey⚠️

The post Comparing HTML Preprocessor Features appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

How to Add a CRM on Your WordPress Site and Get More Leads

Do you want to add a CRM to your WordPress site?

Integrating WordPress with a CRM allows you to easily manage customer interactions on your website and follow up with leads.

In this article, we’ll show you how to add a CRM on your WordPress website to boost conversions and sales.

How to easily add a CRM software to your WordPress website

What Is a CRM?

CRM or Customer Relationship Management software allows you to easily manage a customer’s interactions with your business. A CRM helps you track the user journey of each website visitor, keep a record of previous interactions, and successfully convert leads into customers.

There are many CRM solutions available on the market. Most of them allow you to store customer information in the cloud so you can track and manage customer relationships with an easy to use dashboard.

We recommend using HubSpot. It is the best CRM software on the market and can be easily integrated into your WordPress website.

It allows you to capture customer information with forms, chat bots, email service providers, and more. It also integrates with all popular third-party tools that you may already be using to grow your business online.

More importantly, it is extremely easy to use even for beginners who have never used a CRM before.

That being said, let’s take a look at how to easily add a CRM to your WordPress site.

Adding a CRM on Your WordPress Site

First thing you need to do is sign up for a HubSpot CRM account. They have a limited free CRM software plan which allows you to get started and try out the software without a big upfront investment.

HubSpot CRM

Once you have signed up, you need to connect your HubSpot CRM account to your WordPress website.

Simply install and activate the HubSpot plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will add a new HubSpot menu to your WordPress admin sidebar. Clicking it will take you to the setup wizard where you need to click on the ‘Sign in here’ link at the top.

Sign in to your HubSpot account

This will bring up a popup where you need to enter your HubSpot login details. After that, you can select your website and then click on the ‘Continue with this account’ button.

Select your website

The plugin will now connect your WordPress site to your HubSpot CRM account.

Collecting Data in Your CRM on WordPress

HubSpot CRM comes with built-in tools to collect customer data on your WordPress website and add it to your contacts list. This includes forms, live chat, and email.

You can easily create forms by visiting HubSpot » Forms page and clicking on the Create Form button.

HubSpot forms

If you’re already using a form plugin on your website such as WPForms, then HubSpot will automatically detect those form submissions and adds them to your contacts.

WPForms captured lead

Similarly, you can also create a live chat widget by visiting HubSpot » Live Chat page and clicking the ‘Create a chatflow’ button.

HubSpot chat flow

HubSpot also integrates with other top live chat software on the market if you prefer to use a different provider. HubSpot will automatically start populating your contacts list from your live chat conversations.

You can also import your contacts from your existing email marketing service provider. Simply go to HubSpot » Email page and choose your email service provider for detailed instructions.

Send marketing emails

You can also manually add contacts by visiting HubSpot » Contacts page and clicking on the Create Contact button.

Contacts

Using HubSpot CRM to Manage and Nurture Leads

After you start adding leads from your WordPress site to your CRM software, the next step is to manage your business’s interactions with them.

From the Hubspot menu in your WordPress dashboard, you can simply click on a contact name to edit it and see a detailed view of all interactions. You can view the user journey that led them to the form submission.

Contact view

From here, you can assign the contact to a team member, send and track emails, create tasks, schedule meetings and calls, and more.

All these interactions will be automatically tracked and recorded into your CRM software.

You can also set a status for a contact based on how far along they are in your sales funnel. For instance, you can mark the status as lead, potential lead, customer, opportunity, and more.

Contact status

Using Third Party Tools with Your CRM

HubSpot offers a good set of tools to capture leads, track contacts, and manage customer relationships. However, you may want to use other third-party tools for conversion optimization and lead capturing.

The good news is that HubSpot works automatically with many of the popular marketing tools. Following are a few the most popular marketing tools you can use with your HubSpot CRM.

1. WPForms

WPForms

WPForms is the best WordPress form builder plugin that is perfect for creating lead capturing forms for your website.

It has payment addons, user journey tracking, and many advanced features that are missing in the default HubSpot forms. For example, the form abandonment feature allows you to capture leads even with the user doesn’t finish filling out the form.

You can also use WPForms to create surveys and polls, forms with digital signatures, multi-page forms, and most any other type of form you need for your business.

2. OptinMonster

OptinMonster

OptinMonster is the best tool for conversion optimization. It allows you to capture more leads and quickly grow your email list.

With OptinMonster’s drag and drop builder, you can create lightbox popups, spin-a-wheel popups, slide in boxes, header and footer banners, countdown timers, and much more.

3. LiveChat

LiveChat

LiveChat is the best live chat and marketing automation platform on the market. Whether you use it for support or sales, it integrates with your HubSpot CRM and allows you to easily follow up with potential leads.

Unlike Hubspot’s built-in chat feature, it comes with incredibly powerful targeting rules that let you show personalized campaigns at right time to maximize your conversions.

4. SeedProd

SeedProd is the best WordPress page builder tool on the market. It allows you to quickly create professional grade marketing pages, landing pages, sales pages, and other campaigns. This helps you get even more leads without any coding skills.

Apart from these tools, you can also connect your HubSpot CRM to thousands of other apps via Zapier.

We hope this article helped you add a CRM on your WordPress site. You may also want to see our guide on why building an email list is important, or our comparison of the best HR payroll software for small business.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add a CRM on Your WordPress Site and Get More Leads appeared first on WPBeginner.

Generate a receipt

I need help for this a program that will generate the receipt of the merchandise shop The Blue Blood Shop. The items available on their shop are as follows:

Item Description Price (in Php)
Deathnote Notebook 200.00
Bleach S10 Wristwatch 510.00
Pokemon Cards (Pack of 30) 35.00
Cardcaptor Sakura Mousepad 50.00
Zenki Neck Pillow 150.00
Azumanga Daioh Sling Bag 150.00
Tony Tony Chopper Bagpack 325.00
Luffys Hat 228.00
Mojackos Plushy 100.00
Naruto Mug 175.00
Vampire Knight Necklace 110.00
Shingeki no Kyojin Badge 90.00

Output receipt should also include the shops name, address, date of purchase, contact number and customers name. Compute also the VAT amount and VATable Sale by applying 10% VAT rate. Consider all constraints and scenario.

Sample output is this:::

The Blue Blood Shop
649 corner st Mayaman Road,Balaka City Philippines
Contact No: 8893-7111
mm/dd/yyy

Customers Name:

Itm Dscpt Qty. Price

Deathnote Notebook 1 200.00

Zenki Neck Pillow 1 150.00

Mojackos Plushy 1 100.00

Subtotal: 3 450.00
Amt Tendered 500.00
Change 50.00

VATable Sale 405.00
VAT Amount 45.00

Thanks for shopping with us!
Come again to The Blue Blood Shop where we make your fantasies come true

A Time Of Transition (October 2021 Desktop Wallpapers Edition)

Inspiration lies everywhere. In the fall leaves shining in the most beautiful colors these days, in the misty mornings and golden afternoons that October might bring along, or taking a walk on a windy day. Whatever it is that gets you inspired, our monthly wallpapers series is bound to give you a little inspiration boost, too.

For this October edition, artists and designers from across the globe once again challenged their creative skills and designed wallpapers to spark your imagination and make the month a bit more colorful as it already is. Just like every month since we embarked on this creativity mission more than ten years ago.

The wallpapers all come in versions with and without a calendar for October 2021 — so no matter if you want to keep an eye on your deadlines or plan to use your favorite design even after the month has ended, we’ve got you covered. At the end of this post, you’ll also find some oldies but goodies from our wallpapers archives. A huge thank-you to everyone who shared their artworks with us! Happy October!

  • You can click on every image to see a larger preview,
  • We respect and carefully consider the ideas and motivation behind each and every artist’s work. This is why we give all artists the full freedom to explore their creativity and express emotions and experience through their works. This is also why the themes of the wallpapers weren’t anyhow influenced by us but rather designed from scratch by the artists themselves.

Submit a wallpaper!

Did you know that you could get featured in our next wallpapers post, too? We are always looking for creative talent! Join in! →

Autumn Vibes

“Autumn has come, the time of long walks in the rain, weekends spent with loved ones, with hot drinks, and a lot of tenderness. Enjoy.” — Designed by LibraFire from Serbia.

The Night Drive

Designed by Vlad Gerasimov from Russia.

The Return Of The Living Dead

Designed by Ricardo Gimenes from Sweden.

Spooky Season

“The days become shorter… The socks thicker… And the ghosts louder! The spooooooky season is upon us, and we can’t wait to carve into it. ActiveCollab wishes you a bag full of treats this October!” — Designed by ActiveCollab from the USA.

Up And Down San Francisco

“It’s October and we go to San Francisco. We enjoy the sun and we go up and down with the cable car.” — Designed by Veronica Valenzuela from Spain.

Goddess Makosh

“At the end of the kolodar, as everything begins to ripen, the village sets out to harvesting. Together with the farmers goes Makosh, the Goddess of fields and crops, ensuring a prosperous harvest. What she gave her life and health all year round is now mature and rich, thus, as a sign of gratitude, the girls bring her bread and wine. The beautiful game of the goddess makes the hard harvest easier, while the song of the farmer permeates the field.” — Designed by PopArt Studio from Serbia.

Smashing Halloween

Designed by Ricardo Gimenes from Sweden.

Oldies But Goodies

Hidden in our wallpapers archives, we rediscovered some almost-forgotten treasures from past October editions. May we present… (Please note that these designs don’t come with a calendar.)

Hello Autumn

“Did you know that squirrels don’t just eat nuts? They really like to eat fruit, too. Since apples are the seasonal fruit of October, I decided to combine both things into a beautiful image.” — Designed by Erin Troch from Belgium.

Bird Migration Portal

“October is a significant month for me because it is when my favorite type of bird travels south. For that reason I have chosen to write about the swallow. When I was young, I had a bird’s nest not so far from my room window. I watched the birds almost every day; because those swallows always left their nests in October. As a child, I dreamt that they all flew together to a nicer place, where they were not so cold.” — Designed by Eline Claeys from Belgium.

Game Night And Hot Chocolate

“To me, October is all about cozy evenings with hot chocolate, freshly baked cookies, and a game night with friends or family.” — Designed by Lieselot Geirnaert from Belgium.

Magical October

“‘I’m so glad I live in a world where there are Octobers.’ (L. M. Montgomery, Anne of Green Gables)” — Designed by Lívi Lénárt from Hungary.

Haunted House

“Love all the Halloween costumes and decorations!” — Designed by Tazi from Australia.

First Scarf And The Beach

“When I was little, my parents always took me and my sister for a walk at the beach in Nieuwpoort, we didn't really do those beach walks in the summer but always when the sky started to turn grey and the days became colder. My sister and I always took out our warmest scarfs and played in the sand while my parents walked behind us. I really loved those Saturday or Sunday mornings where we were all together. I think October (when it’s not raining) is the perfect month to go to the beach for ‘uitwaaien’ (to blow out), to walk in the wind and take a break and clear your head, relieve the stress or forget one’s problems.” — Designed by Gwen Bogaert from Belgium.

Shades Of Gold

“We are about to experience the magical imagery of nature, with all the yellows, ochers, oranges, and reds coming our way this fall. With all the subtle sunrises and the burning sunsets before us, we feel so joyful that we are going to shout it out to the world from the top of the mountains.” — Designed by PopArt Studio from Serbia.

Flying Home For Halloween

“You can only fully master the sky wearing an aviator hat and goggles. Like this little bat, flying home to celebrate Halloween with his family and friends.” — Designed by Franke Margrete from the Netherlands.

Transitions

“To me, October is a transitional month. We gradually slide from summer to autumn. That’s why I chose to use a lot of gradients. I also wanted to work with simple shapes, because I think of October as the ‘back to nature/back to basics month’.” — Designed by Jelle Denturck from Belgium.

Fallen Woods

Designed by Dan Ioanitescu from Canada.

Dope Code

“October is the month when the weather in Poland starts to get colder, and it gets very rainy, too. You can’t always spend your free time outside, so it’s the perfect opportunity to get some hot coffee and work on your next cool web project!” — Designed by Robert Brodziak from Poland.

Autumn Gate

“The days are colder, but the colors are warmer, and with every step we go further, new earthly architecture reveals itself, making the best of winters’ dawn.” — Designed by Ana Masnikosa from Belgrade, Serbia.

Ghostbusters

Designed by Ricardo Gimenes from Sweden.

Autumn In The Forest

“Autumn is a wonderful time to go for walks in the forest!” — Designed by Hilda Rytteke from Sweden.

Spooky Town

Designed by Xenia Latii from Germany.

Hanlu

“The term ‘Hanlu’ literally translates as ‘Cold Dew.’ The cold dew brings brisk mornings and evenings. Eventually the briskness will turn cold, as winter is coming soon. And chrysanthemum is the iconic flower of Cold Dew.” — Designed by Hong, ZI-Qing from Taiwan.

Discovering The Universe!

“Autumn is the best moment for discovering the universe. I am looking for a new galaxy or maybe… a UFO!” — Designed by Verónica Valenzuela from Spain.

Ghostober

Designed by Ricardo Delgado from Mexico City.

Rain And Acorns

“Waiting at the bus stop when it’s raining in October can be a sad and wet experience. The bus is late, the dry spot is taken by other people and you’re just standing there in the rain with your hands in your pockets with nowhere to go. Acorns must have a hard time like that too! Waiting in the rain for the squirrels to come and pick them up.” — Designed by Casey Dulst from Belgium.

Create More

“The colors of the sun inspired me.” — Designed by Hitesh Puri from India.