You are reading the article How To Resize And Create Partitions With Gparted updated in December 2023 on the website Cattuongwedding.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 How To Resize And Create Partitions With Gparted
GNOME Partition Editor (GParted) is a powerful, cross-platform application that allows you to create, resize, and remove partitions on your Linux system while preserving the partition contents. The file formats it supports include btrfs, ext2, ext3, ext4, fat16, fat32, hfs+, linux-swap, lvm volumes, ntfs, and xfs. Here we show you how to create and resize partitions with GParted.
A Quick DisclaimerBefore you proceed, please back up all your important documents if you plan to test this on your primary disk. Meddling with partitions is not safe and could potentially destroy all the data on the drive. The safest way to test GParted is to grab a spare USB stick or create extra disks to attach to a Virtual Machine.
Here we demonstrate GParted on a Linux system with an additional 10 GB disk attached to it. This may be the case if you’re installing new storage in your system or if you’re using a live demo of your chosen Linux distro to partition a disk before installation.
Installing GPartedInstalling GParted is very simple. It’s a mainstay tool that should be in the repositories of your chosen distro. You can install it with this command on Ubuntu:
sudo
apt
install
gpartedWith this command on Fedora/CentOS:
sudo
dnf
install
gpartedAnd with this command on Arch:
sudo
pacman-Sy
gparted Using a GParted Live DiskThere’s also an option to just boot to a running GParted application without having to install it on a given distro. This can be great if you’re using the data rescue features, as you can just keep a dedicated GParted USB stick around to save your data in the event of a catastrophe.
Creating Partitions with GPartedTo split a 10 GB GPT disk in half, you can give this partition 5100 MB and leave the other 5139 MB for the second partition.
Now, you can repeat the same process, just taking the remaining drive space for your Linux partition. You can choose whichever file system you’d like. I chose the current standard of ext4.
Resizing Partitions with GPartedNow that you know how to create and resize partitions with GParted, make sure you check out some of our other Linux content, like 8 tools to easily create a custom Linux distro, how to build a new PC for Linux, and what does “chmod 777” mean?
John Perkins
John is a young technical professional with a passion for educating users on the best ways to use their technology. He holds technical certifications covering topics ranging from computer hardware to cybersecurity to Linux system administration.
Subscribe to our newsletter!
Our latest tutorials delivered straight to your inbox
Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.
You're reading How To Resize And Create Partitions With Gparted
How To Create Tabs With Css And Javascript?
In this article, we are going to discuss how to create tabs with CSS and JavaScript.
Tabs are containers whose main purpose is to show and navigate through the diverse content of the website. Tabs are commonly used to manage the space and make the website more user-friendly without reloading too many times. The content in these tabs are usually closely related but mutually exclusive.
There are several types of tabs which can be created and used in various cases −
Horizontal tabs
Horizontal with Secondary Tabs
Frameless Horizontal Tabs
Vertical Tabs
Vertical Tabs with Second Tabs
Steps to Create TabsFollowing are the steps to be followed to create tabs with CSS and JavaScript −
In the body, the tag creates the tab under the div tag which custom data attributes.
Create another div tag to store the content of the tab with the specified id.
Specified data attributes for each content tag to display only one tab of content at a time
Using JavaScript, we can display the content of the tab.
Example.htmlIn the HTML script, we are building the page’s body structure by constructing three div buttons (Tab1, Tab2, and Tab3) and three div paragraphs, as you can see from the code below
Example.cssUsing CSS, Style is being added to the page. Styling the width and height of the page, as well as creating a hover effect and altering the background color of the button when you hover over it.
#tab1, #tab2, #tab3 { text-align: center; float: left; padding: 5px 10px 5px 10px; background: #b00098; color: #ffffff; margin: 0px 5px 0px 5px; cursor: pointer; border-radius: 5px; } #tab1:hover, #tab2:hover, #tab3:hover { background: #ecade4; } #tab1Content, #tab2Content, #tab3Content { width: auto; height: 100px; padding: 20px; border: 1px solid #b00098; border-radius: 10px; } #tab1Content, #tab2Content, #tab3Content { display: none; } Example.js
function selectTab(tabIndex) { document.getElementById(“tab1Content”).style.display = “none”; document.getElementById(“tab2Content”).style.display = “none”; document.getElementById(“tab3Content”).style.display = “none”; document.getElementById(“tab” + tabIndex + “Content”).style.display = “block”; } Complete Example
#tab1, #tab2, #tab3 { text-align: center; float: left; padding: 5px 10px 5px 10px; background: #b00098; color: #ffffff; margin: 0px 5px 0px 5px; cursor: pointer; border-radius: 5px; } #tab1:hover, #tab2:hover, #tab3:hover { background: #ecade4; } #tab1Content, #tab2Content, #tab3Content { width: auto; height: 100px; padding: 20px; border: 1px solid #b00098; border-radius: 10px; } #tab1Content, #tab2Content, #tab3Content { display: none; } function selectTab(tabIndex) { document.getElementById(“tab1Content”).style.display = “none”; document.getElementById(“tab2Content”).style.display = “none”; document.getElementById(“tab3Content”).style.display = “none”; document.getElementById(“tab” + tabIndex + “Content”).style.display = “block”; }
How To Create Quality Mockups With Canva
If you’re looking for a quick, easy, and simple way to create good-looking mockups you’ll be excited to hear that you can create them with Canva.
We’ll cover three different ways to create mockups with Canva in this article, all of which are incredibly easy to do and also free!
There’s also no experience needed with complicated design software like Photoshop, as everything in Canva is beginner-friendly.
Let’s get to it.
Jump to a specific section:
Creating mockups with Canva: Method 1The simplest way to create mockups with Canva is to utilize the ‘frame’ elements in Canva’s library.
Canva also has a good-sized library of existing templates that contain frame elements already. Most of these contain device frames such as smartphones, MacBooks, or laptops.
Here are some examples:
Mockup templates on Canva
From here you can replace the existing image in the frame(s) with a new one, or you can even add a video file to show within the frame:
Mockup template
Customized mockup template
It’s worth noting that you can only add images or video files to the frame elements on Canva.
So, you can create designs on Canva and save them as templates but you will only be able to add them to a frame if you download them and reupload them to your Canva account.
Also, the frame elements on Canva are fairly limited at the moment, so if you’re wanting to create mockups for products such as mugs or apparel you’ll need to use another tool or a different method on Canva (we’ll cover that later on).
Related articles Creating mockups with Canva: Method 2You can create mockup scenes from a blank canvas in Canva fairly easily.
The way we like to do is to start with a blank canvas in our chosen dimensions, and then we add a background color, pattern, or image e.g.:
Creating a mockup from a blank canvas
You can then add various elements to make up your image. You can make it as complex or as simple as required but using the frame elements will make it a lot easier:
Adding frame elements
Then all you need to do is add your designs or images to the frame elements plus you can add text or other elements where required:
Completing the mockup image
You don’t necessarily have to use the frame elements from Canva. They have other elements such as iPhone and MacBook cutout photos that you can layer over an image or element in your design.
It’s not as simple or as clean utilizing the frame elements though:
iPhone cutouts
MacBook cutouts
If you want to create flat lay mockups such as the one in the image below, you can do this with Canva too:
Flat lay mockup
There isn’t a huge amount of elements in Canva’s library that are suitable for flat lay designs though. However, there are some if you do a bit of searching in the Photo tab.
For example, we created a quick mockup scene with a pencil, pen, coffee mug, iPad, iPhone, eraser, paperclips, and notepad – all from Canva’s elements library:
Flat lay mockup created in Canva
If you want plenty of elements to use for flat lay mockup designs you should check out Creative Market or Envato Elements:
Scene Creator packs on Creative Market
Scene creator packs on Envato Elements
You can download flat lay collections from these sites and then upload them to Canva to use in your designs.
If you search for ‘scene creator’ on these sites and you’ll have thousands of options for elements to use for your flat lay mockups.
Creating mockups with Canva: Method 3The last method, and probably the one that gets the best results, is to use the Smart Mockups integration on Canva.
To start the process, create a new design on a blank canvas. You’ll need to make sure the dimensions of the canvas work with the Smart Mockups template that you plan to use.
In our case, we’ll be using a landscape template, and the dimensions 1600x1069px work well for that.
You’ll need to upload a design to your canvas that you want to see on a mockup template. Having a design with a transparent background is probably the best idea:
Design for our mockup
Navigating to the Smartmockups integration
There are mockup templates for smartphones, computers, cards, frames & posters, books, clothing, and mugs (nowhere near as many templates that are available on Smartmockups though):
Smartmockups templates on Canva
Choose a template you like, and it will load onto your canvas with your design or image added to it. You can then resize the mockup to fit your canvas.
Mockup template controls
The only customizations you can do at the moment are to resize and reposition your design on the mockup and change the main item color in the mockup template (e.g. the t-shirt or mug color):
Mockup customization options
And that’s you created a mockup via the Smartmockups integration. You can now download your mockup image.
We created this mockup in a matter of seconds:
Our final mockup
Related articles Alternative optionsPlaceit mockup generator
Whilst Canva is an incredible tool for creating all kinds of designs, we feel there are some better options when it comes to creating mockups online.
Placeit is probably the best mockup generator but there are some other high-quality tools that allow you to create incredible-looking mockups with ease. Here are the top alternative tools for creating mockups:
FAQsHere are the answers to some of the most common questions around creating mockups with Canva:
Do Canva do mockups?
As you can see in this article, Canva do offer users the ability to create mockups. Using the frame elements that Canva offers or the Smartmockups integration, users can quickly and easily create mockups without needing any design software experience.
Plus you can create so much at no cost at all. That being said, we would recommend using Placeit if you’re looking for the best mockup tool online.
How to make mockups in Canva?
Again, you can see how to create mockups in Canva earlier in the article. It depends what you’re wanting to create.
The premade templates with the frame elements are great to use if you’re promoting a digital asset and can utilize the smartphone, tablet, or computer frames.
If you want to use a different kind of product such as t-shirt, mug, or book the best way to create those types of mockups is by using the Smartmockups integration in Canva.
What is the Canva and Smart Mockups integration?
Smartmockups is a fantastic mockup tool, they are one of the top t-shirt mockup generators and book mockup generators.
A small selection of their mockup template library is available to use within Canva. So users can take one of their images or designs and put them on the Smartmockups templates that are available on Canva.
If you have a Smartmockups account you can also connect your Canva account and this will allow you to transfer designs from Canva to your Smartmockups account to use with the full Smartmockups template library.
You can read more about it here.
Can you use Canva mockups for commercial use?
There are some restrictions that you can read about in this article.
How to use Canva mockups?
You can utilize the mockups you create in Canva in several ways.
If you’re looking promote print on demand designs, you can utilize the mockups via the Smartockups integration to create promotional material for your print on demand products.
Again, this could be images for your product listings, social media content, and your website.
Wrapping things upSo, there you have it, that’s how you can quickly, easily, and affordably create high-quality mockups in Canva.
Canva is such an awesome online design tool that literally anyone can use, beginner or expert! So, if you’re looking to create some great-looking mockups and promotional material you should give it a go.
How To Create Constants In Php With Examples?
Introduction to PHP Constants
PHP Constants are variables whose values, once defined, cannot be changed, and these constants are defined without a $ sign in the beginning. PHP Constants are created using define() function. This function takes two parameters first is the name, and the second is the value of the constant defined.
Start Your Free Software Development Course
Web development, programming languages, Software testing & others
The name of the constant starts using letters or underscores and not with a number. It can start with a letter or underscore followed by letters, underscores or numbers. The name is case-sensitive and in uppercase. After a constant is defined, it cannot be undefined or redefined again. It remains the same throughout the script and cannot be changed as the variables do.
Syntax with ExplanationA constant is a name for a particular value. To define a constant, we have to use the define() function and to get the value of the constant; we just need to specify the name.
define(name, value, case-insensitive);where name is the name of the constant,
value is the value of the constant,
case-insensitive is either true or false, by default, it is false.
define('TEXT', 'Hello World!');A constant can also be defined using const construct.
<?php const MSG = "WELCOME"; echo MSG; How to Create Constants in PHP using Various Methods?To create constants, we have to use a simple define function, which takes two parameters, first the name of the constant second the value to be stored. The name is by default in uppercase. It does not start with a $.
Example #1Code:
<?php define("TEXT", "Hello World!"); echo TEXT;Output:
In this example, we will be using a const construct to define a constant named TEXT. We have used const followed by the name of the constant and then the value. It can be assigned a value using an assignment operator =.
Once we have defined the constant, to access the defined constant TEXT, we will echo the name with the constant keyword, as shown below.
Example #2Code:
<?php const TEXT = 'PHP PROGRAMMING!'; echo TEXT; echo constant("TEXT");Output:
Example #3In the below example, we are defining a TEXT constant with a value. Also, in the same program, we have defined a function Demo(). We have declared the TEXT constant outside the function Demo. Here we see that we can access the constant TEXT from within the function. This means once you define the constant, it is globally available in the script.
Code:
<?php define("TEXT", "Hello World!"); echo TEXT; function Demo() { echo TEXT; } Demo(); Rules and Regulations for PHP ConstantsThe following are the rules to define PHP constants.
should not start with a $.
should not start with a number.
should not start with an underscore.
start with a letter and follow by numbers.
start with a letter and follow by an underscore and numbers.
Let us look at the below statements.
<?php define("TEXT","PHP"); //valid define("TEXT1", "PHP"); define("1TEXT", "PHP"); //invalid define("1_TEXT", "PHP"); //invalid define("TEXT_1", "PHP"); define("__TEXT__", "PHP"); // valid but should be avoided Magic ConstantsIt starts with a double underscore
__LINE__
__FILE__
__FUNCTION__
__CLASS__
__METHOD__
1. __LINE__This gives the current line number.
Code:
<?php echo 'I am at Line number '. __LINE__;Output:
2.__FILE__This gives the filename along with the file path of the file. It can be used to include a file in a script.
Code:
<?php echo 'FILE NAME '. __FILE__; 3. __FUNCTION__This gives the name of the function in which it is declared. It is case-sensitive.
Code:
<?php function show() { echo 'In the function '.__FUNCTION__; } show();Output:
4. __METHOD__ , __CLASS__This gives the name of the method and the name of the class in which it is declared. In the below example, we have defined the MainClass and two methods within it, the show method and the test method. Inside the show method, we have printed the __CLASS__, which gives the class name and inside the test method, we have printed the __METHOD__, which gives the method name, test.
Code:
<?php class MainClass { function show() { } function test() { } } $obj = new MainClass;Output:
ConclusionThis article, it is explained about PHP constants and magic constants with examples. These examples help to create their own constants and use them in the script with the help of the given syntax. This article also explains the rules on how to create PHP Constants and then how to use them within the script with different methods.
Recommended ArticlesThis is a guide to PHP Constants. Here we discuss the introduction, syntax, and examples to create constants in PHP along with magic constants. You may also look at the following articles to learn more –
How To Crop & Resize Images Or Elements In Canva
No matter what reason you need it, Canva makes it easy to crop and resize your photos without any complex steps. Whether it be resizing for a new profile photo, a banner for your youtube channel, or a company logo on your website, it’s simple to resize your image to the perfect dimensions.
Today I will show you the difference between cropping an image or graphic and resizing it. I will show you the different tricks you can do to resize text, including how to reformat text within its bounding box. You will also learn how to zoom into your image and crop it simultaneously while finalling cropping your elements into fun shapes!
How To Resize Images, Graphics, Or Text In CanvaYou will find a circle on each corner of the bounding box and a rounded rectangle on the top, bottom, and sides of the bounding box. These shapes are called Handles, and you will need to master them to crop and resize your images and graphics.
– Images and GraphicsWhen resizing images and graphics, you will use the Corner Handles on the bounding box, also known as Crop Handles.
Don’t let the word “Crop” in Crop Handles confuse you. The Crop Handles are the quickest and easiest way to resize your picture.
Shrinking your image like this is the best way to fit multiple pictures on the same canvas.
– Resizing Multiple ImagesIf you have multiple images on your canvas to resize, you can resize all of them at once.
Before After
– Resizing Graphics – Resizing Text In CanvaWhile working on your project, you can add text to your canvas by pressing T. However, the size of the text will be small.
There’s also a trick with using text blocks in Canva that’s important for you to know, and that’s how to reformat your text within the text block. This method only works with multi-worded text, so you must have at least two words in the text block.
To start this process, select your text to reveal the bounding box and the Side Handles you’ll need to reformat your text.
When doing this, drag the Side Handle slowly and pay attention to how your text is reformating. If you go too far, your text will start to squish together and be impossible to read unless you want to create vertical text in Canva.
The best thing to do is take it slow and pay attention to how your text is reformatting.
When you’re satisfied with how your text is formatted within the text block, you can resize it again using Crop Handles.
How To Crop Images & Graphics In CanvaNow that you’ve mastered the Corner Handles on your image’s bounding box, I will now show you the power of the Side, Top, and Bottom Handles.
While cropping your image, if you drag a handle far past its original position, your image will zoom in while it resizes the image.
How To Crop Elements Into Shapes In CanvaA creative addition to your project you can do in Canva is cropping pictures in the shape of anything you can think of.
Once you drag your picture into the frame, Canva will automatically fill the frame with your image, usually using the middle of the picture as its cropping point.
One thing to remember is that you can only move the picture from the left to right or vice versa and not up and down.
What if you found a better picture for your project? Simply drag a new image into the frame. The new photo will replace the older one automatically.
The types of frames that are available through Canva go beyond circles and other simple shapes. There are a host of fun and eye-catching frames for you to experiment with.
– Crop Images Into Letters In CanvaThe letter frames are one of the coolest and most useful frames available in Canva. You can spell out entire sentences using your own personal graphics with letter frames.
Once your phrase is spelled out, drag your image into the first letter of your word.
The goal here is to give the illusion of your words being cut into a single picture. To do this, drag the same image you used in the first letter with the other letters of your design.
Using letter frames is a fun process that can offer some more creative options when it comes to cropping in Canva.
Happy Editing!
100+ million premium stock photos, videos, audio, and graphics
610,000+ premium and free templates with new designs added daily
Up to 100 Brand Kits to establish your brand’s identity online
Remove image backgrounds instantly with Background Remover
Resize designs without quality loss with Magic Resize
Schedule social media content to 8 platforms
1TB of cloud storage
24/7 customer support
Get Your Free Trial
Easily Back Up Your Partitions In Linux With Apart Gtk
If you have full partition backups, you can restore your data or even your operating system when disaster strikes. The main problem is creating the partition backup. Most tools for backing up disks and partitions on Linux feel complicated. Some expect you to use commands in the terminal. Others come with old-school interfaces or use cryptic lingo. Luckily, there is Apart GTK.
Apart GTK is a GUI for partclone that allows you to clone your partitions to compressed image backups. Then, you can quickly and easily recover them from those backups whenever you wish. Let’s see how you can keep your data safe with Apart GTK.
InstallationIf you’re on Ubuntu or a compatible distribution, Apart GTK is available in the default repositories. You can search and install it from the Software Center or with the following command in a terminal:
sudo
apt
install
apart-gtkWhen the process completes, you’ll find Apart GTK among the rest of your apps.
Backup Your PartitionFind and open the Apart app from your Applications menu. It will prompt you to enter your administrative password. Apart GTK needs full access to your disks and partitions to be able to copy every bit of data on them.
On the left of Apart GTK, you’ll see a list of all the partitions on your system. We had many storage devices on our testing PC, so the list is long. For your PC, you may only find one or two entries.
Note: Apart GTK can’t clone the system partition of the active OS. You have to boot up with a live CD to be able to back up the system partition.
Currently, there is a bug with Apart GTK that prevents the process bar from being updated. Apart from an updating Elapsed time indication, the progress bar looked stuck (though it is running in the backend).
You can confirm that it is indeed running by checking the output file. If it is continuously increasing in size, then you know that it is running normally. Once the backup is completed, Apart GTK will update its window to inform you that the cloning process completed successfully.
Restoring your Partition BackupOnce again, it is best not to restore a backup to the active partition. Other than that, restoring your backup with Apart GTK is easy.
When the process completes, you’ll find the contents of your backup in the selected partition. If it was a system partition, like in our case, by rebooting your PC to that OS, it will be back to the point when you initially made your backup.
Apart GTK is probably the friendliest tool for backing up a partition. It works for Windows partitions too, making it one of the best tools for dual-boot environments.
Odysseas Kourafalos
OK’s real life started at around 10, when he got his first computer – a Commodore 128. Since then, he’s been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.
Subscribe to our newsletter!
Our latest tutorials delivered straight to your inbox
Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.
Update the detailed information about How To Resize And Create Partitions With Gparted on the Cattuongwedding.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!