How to Have Different Headers and Footers Per Page in Google Docs

By adding a header or footer to your document, you can include information without distracting from the content. But you may not want the same one on each page. Headers and footers are common locations for things like your company name or logo, page numbers, the document author, and the date. But not all documents need these details. You may have a document where you want a header or footer on only the first page, every other page, or one that’s unique on each page.

[mai mult...]

How to Add a Header or Footer in Google Slides

Headers and footers are useful tools for including information like the date, company name, or creator. This allows you to add extra details without distracting from your slideshow’s content.

  • Method 1: Insert a Text Box

One way to add a header or footer in Google Slides is to insert a text box. You can then move the text ox to the top or bottom of the slide and format it as you like.

Open your Google Slides presentation and choose the slide where you want the header or footer. Pop the text box onto the slide using the Text Box button in the toolbar or Insert > Text Box from the menu.

Text Box button the toolbar

Drag to draw the size of the text box you want or simply click to place the box and then enter your text.

Drawing a text box

Move the text box by dragging it to the top of the slide as a header or bottom as a footer.

Move the text box

Many headers and footers use a smaller font size or one that’s lighter in color than the rest of the slide text.

  • To format all the text within the box, select the box.
  • To format only certain text in the box, select just that text.

Then use the tools in the toolbar for font style, size, and color, or other tools as you like.

Formatted text box

You can copy the text box and paste it onto other slides. But if you’d like the same header or footer on every slide, you can edit the master slide instead.

  • Method 2: Edit the Master Slide

To change the master slide, you’ll actually edit the current theme using the Google Slides Theme Builder.

Select Slide > Edit Theme from the menu.

Select Slide, Edit Theme

When the Theme Builder opens, select the slide at the top directly below Theme and above Layouts.

Master slide in Theme Builder

You can then use a text box as described above. Insert the text box with the toolbar button or Insert > Text Box, enter your text, move it up or down for the header or footer, and format it per your preference.

Text box added to the master slide

When you finish, click the X on the top right of the Theme Builder to close it. You’ll return to the editing view of your presentation and see the header or footer you added on each slide.

Header on all slides

If you want to edit the header or footer later, simply return to the master slide and make your changes.

  • Method 3: Use the Slide Number Box

One final tool we’ll discuss is for footers only and is the text box used for slide numbers. If you’ve decided to add slide numbers to your presentation, this gives you a simple text box on the bottom right corner of each slide. You can take advantage of that box to add footer text.

Slide number in Google Slides

  • To add the footer on individual slides, choose a slide and select that text box.
  • To add the same footer on all slides, edit that box on the master slide.

You can start by dragging the left side of the text box to widen it for your additional text. Add your text and adjust the spacing if you want the text further left or centered in relation to the slide number.

Resize the text box

Depending on the theme you’re using, you may notice preformatted text for the slide number. This could be a smaller font size or lighter font color. However, you can still format it as you please. Simply select the text you add, without the slide number, and make your changes using the toolbar buttons.

Format the text box for the footer

Warning: Keep in mind that if you add a footer using this method and end up removing your slide numbers, the footer will be removed as well.

Footer and slide number

[mai mult...]

9 Useful Microsoft Excel Functions for Working With Text

Functions in Excel aren’t just for numbers and calculations. You can use functions when working with text too. Here are several helpful Microsoft Excel text functions. Whether you want to change the letter case, find text within another string, substitute old text with something new, or combine text from multiple cells, there’s a function here for you.

[mai mult...]

How To Validate the Syntax of a Linux Bash Script Before Running It

Bugs and typos in Linux Bash scripts can do dire things when the script is run. Here are some ways to check the syntax of your scripts before you even run them.

  • Those Pesky Bugs

Writing code is hard. Or to be more accurate, writing bug-free non-trivial code is hard. And the more lines of code there are in a program or script, the more likely it becomes that there will be bugs in it. The language you program in has a direct bearing on this. Programming in assembly is much tougher than programming in C, and programming in C is more challenging than programming in Python. The more low-level the language you’re programming in, the more work you have to do yourself. Python might enjoy in-built garbage-collection routines, but C and assembly certainly don’t.

Writing Linux shell scripts poses its own challenges. With a compiled language like C, a program called a compiler reads your source code—the human-readable instructions you type into a text file—and transforms it into a binary executable file. The binary file contains the machine code instructions that the computer can understand and act upon.

The compiler will only generate a binary file if the source code it’s reading and parsing obeys the syntax and other rules of the language. If you spell a reserved word—one of the command words of the language—or a variable name incorrectly, the compiler will throw an error.

For example, some languages insist you declare a variable before you use it, others are not so fussy. If the language you’re working in requires you to declare variables but you forget to do that, the compiler will throw a different error message. As annoying as these compilation-time errors are, they do catch a lot of problems and force you to address them. But even when you’ve got a program that has no syntactical bugs it doesn’t mean there are no bugs in it. Far from it.

Bugs that are due to logical flaws are usually much harder to spot. If you tell your program to add two and three but you really wanted it to add two and two, you won’t get the answer you expected. But the program is doing what it has been written to do. There’s nothing wrong with the composition or syntax of the program. The problem is you. You’ve written a well-formed program that doesn’t do what you wanted.

  • Testing Is Difficult

Thoroughly testing a program, even a simple one, is time-consuming. Running it a few times isn’t enough; you really need to test all execution paths in your code, so that all parts of the code are verified. If the program asks for input, you need to provide a sufficient range of input values to test all conditions—including unacceptable input.

For higher-level languages, unit tests and automated testing help to make thorough testing a manageable exercise. So the question is, are there any tools that we can use to help us write bug-free Bash shell scripts?The answer is yes, including the Bash shell itself.

  • Using Bash To Check Script Syntax

The Bash -n (noexec) option tells Bash to read a script and check it for syntactical errors, without running the script. Depending on what your script is intended to do, this can be a lot safer than running it and looking for problems.

Here’s the script we’re going to check. It isn’t complicated, it’s mainly a set of if statements. It prompts for, and accepts, a number representing a month. The script decides which season the month belongs to. Obviously, this won’t work if the user provides no input at all, or if they provide invalid input like a letter instead of a digit.

#! /bin/bash

read -p "Enter a month (1 to 12): " month

# did they enter anything?
if [ -z "$month" ]
then
  echo "You must enter a number representing a month."
  exit 1
fi

# is it a valid month?
if (( "$month" < 1 || "$month" > 12)); then
  echo "The month must be a number between 1 and 12."
  exit 0
fi

# is it a Spring month?
if (( "$month" >= 3 && "$month" < 6)); then
  echo "That's a Spring month."
  exit 0
fi

# is it a Summer month?
if (( "$month" >= 6 && "$month" < 9)); then
  echo "That's a Summer month."
  exit 0
fi

# is it an Autumn month?
if (( "$month" >= 9 && "$month" < 12)); then
  echo "That's an Autumn month."
  exit 0
fi

# it must be a Winter month
echo "That's a Winter month."
exit 0

This section checks whether the user has entered anything at all. It tests whether the $month variable is unset.

if [ -z "$month" ]
then
  echo "You must enter a number representing a month."
  exit 1
fi

This section checks whether they have entered a number between 1 and 12. It also traps invalid input that isn’t a digit, because letters and punctuation symbols don’t translate into numerical values.

# is it a valid month?
if (( "$month" < 1 || "$month" > 12)); then
  echo "The month must be a number between 1 and 12."
  exit 0
fi

All of the other If clauses check whether the value in the $month variable is between two values. If it is, the month belongs to that season. For example, if the month entered by the user is 6, 7, or 8, it is a Summer month.

# is it a Summer month?
if (( "$month" >= 6 && "$month" < 9)); then
  echo "That's a Summer month."
  exit 0
fi

If you want to work through our examples, copy and paste the text of the script into an editor and save it as “seasons.sh.” Then make the script executable by using the chmod command:

chmod +x seasons.sh

Setting the executable permission on a script

We can test the script by

  • Providing no input at all.
  • Providing a non-numeric input.
  • Providing a numerical value that is outside the range of 1 to 12.
  • Providing numerical values within the range of 1 to 12.

In all cases, we start the script with the same command. The only difference is the input the user provides when promoted by the script.

./seasons.sh

Testing a script with a variety of valid and invalid inputs

That seems to work as expected. Let’s have Bash check the syntax of our script. We do this by invoking the -n (noexec) option and passing in the name of our script.

bash -n ./seasons.sh

Using Bash to test the syntax of a script

This is a case of “no news is good news.” Silently returning us to the command prompt is Bash’s way of saying everything seems OK. Let’s sabotage our script and introduce an error.

We’ll remove the then from the first if clause.

# is it a valid month?
if (( "$month" < 1 || "$month" > 12)); # "then" has been removed
  echo "The month must be a number between 1 and 12."
  exit 0
fi

Now let’s run the script, first without and then with input from the user.

./seasons.sh

Testing a script with invalid and valid inputs

The first time the script is run the user doesn’t enter a value and so the script terminates. The section that we’ve sabotaged is never reached. The script ends without an error message from Bash.

The second time the script is run, the user provides an input value, and the first if clause is executed to sanity-check the user’s input. That triggers the error message from Bash. Note that Bash checks the syntax of that clause—and every other line of code—because it doesn’t care about the logic of the script. The user isn’t prompted to enter a number when Bash checks the script, because the script isn’t running.

[mai mult...]

How to Install Fonts on Windows 10

Adding new fonts to Windows 10 is a quick way to customize your PC and your documents, and it is easy to do. Your newly installed fonts will be available in Microsoft Office applications like Microsoft Word as well as other Windows applications, including Adobe Photoshop.

There are thousands of different fonts available on the internet. Google offers a large number of fonts for free, and there are other sites, like fonts.com, that offer both free and premium fonts. Most fonts come packaged as either a RAR file or a ZIP file containing the font files themselves.

[mai mult...]

5 Ways to Underline in Microsoft Word

Underlining seems like a simple enough task in Microsoft Word, but many times there’s more involved. You can underline words, spaces, words with spaces, and words without spaces. We’ll show you several ways to use underline in Word.

Many people reserve underlining for web links while others find it a good way to emphasize text in a document. Along with the options for underlining words and spaces, you can format it as a double, bold, or dotted line and remove an underline you’ve added.

[mai mult...]

How to Manually Update Your Google Pixel by Sideloading OTA

Android logo ADB

Google Pixel phones generally get updates before other Android devices, but that’s not always the case. There are times when you may want to manually install a firmware update before it arrives over the air. We’ll show you how to sideload an OTA update on Pixels.

In order to do this, we’ll be using the Android SDK and running some commands Command Prompt on Windows 10 and 11 and Terminal on Mac. This is not a terribly difficult process, but if not followed correctly, it can permanently damage your device.

Note: This process does not wipe your Android device clean. It installs just like any other update. However, it’s a good idea to back up everything you might not want to lose if something goes wrong.

[mai mult...]