How to fix a Workstation that keeps breaking by making it Self-Healing
If your workstation keeps running into the same errors (services crashing, high CPU, missing files), you can make it fix itself.
[mai mult...]Soluții pentru problemele tale IT
If your workstation keeps running into the same errors (services crashing, high CPU, missing files), you can make it fix itself.
[mai mult...]Un utilizator primește un e-mail care pare a fi de la bancă, serviciu de curierat sau platformă online, cerându-i să își introducă datele de autentificare sau informații bancare. După accesarea link-ului și completarea datelor, există riscul ca acestea să fie furate.
[mai mult...]Calculatorul rulează Windows și se restartează brusc afișând un ecran albastru cu coduri de eroare precum „IRQL_NOT_LESS_OR_EQUAL”, „PAGE_FAULT_IN_NONPAGED_AREA” sau „CRITICAL_PROCESS_DIED”. Utilizatorul nu poate continua lucrul normal.
[mai mult...]The EOMONTH function in Microsoft Excel returns the last day of a month in the past, the current month, or a month in the future. Whether you need to calculate end-of-month due dates, deadlines, expiration dates, monthly revenues, or forecasts, the EOMONTH function helps speed up this process.
By default, the EOMONTH function returns a date serial number. So, before you use it, be sure to apply a date number format to the relevant cells.
The EOMONTH function requires two arguments:
=EOMONTH(a,b)
where argument a is the start date (any day of any month in any year), and argument b is the number of months before or after the start date. After taking the start date and moving forward or backward the specified number of months, Excel returns the last date of the month it lands on.
Argument a can be a reference to a cell containing the start date, a start date entered using the DATE function, or a start date generated using another function, such as the TODAY function.
Argument a | Description |
---|---|
=EOMONTH(A1, | The start date is the date entered in cell A1. |
=EOMONTH(DATE(2025,05,31), | The start date is May 31, 2025. |
=EOMONTH(TODAY(), | The start date is today’s date. |
For argument b, a positive number represents the number of months after the start date, a negative number represents the number of months before the start date, and zero stays in the same month. You can hard-code this argument manually, or reference a cell containing the number of months you want to jump backward or forward:
Argument b | Description |
---|---|
=EOMONTH(A1,5) | Returns the last day of the month five months after the start date in cell A1. |
=EOMONTH(A1,-5) | Returns the last day of the month five months before the start date in cell A1. |
=EOMONTH(A1,0) | Returns the last day of the month of the start date in cell A1. |
=EOMONTH(A1,A2) | Takes the start date in cell A1, jumps forward the number of months in cell A2, and returns the last day of the resultant month. |
=EOMONTH(A1,-A2) | Takes the start date in cell A1, jumps backward the number of months in cell A2, and returns the last day of the resultant month. |
Calculating future Month-End Dates
The most common use of the EOMONTH function in Excel is to return the last day of a month in the future. Imagine you’re the project manager of a construction company, and you’ve assigned projects to ten employees. Each project takes a certain length of time to complete, and completion deadlines are at the end of the month.
So, to calculate the end dates in column E, you need to use the EOMONTH function.
In cell E2, first type:
=EOMONTH(
Then, select the cell containing the start date and add a comma:
=EOMONTH([@[Start date]],
Finally, select the cell containing the number of months to jump forward, close the parentheses, and press Enter:
=EOMONTH([@[Start date]],[@Months])
If your data is formatted as an Excel table, as in the example screenshots, the formula will use structured references to the column headers, and the column will autocomplete when you enter the formula into the first cell. On the other hand, if your data is a regular range, it will use direct cell references, and you’ll need to use the fill handle to apply the formula to the remaining cells in the column.
There are two benefits to using cell references instead of hard-coding the date and number of months. First, the formula is correct according to the data on each row, and second, if you need to change the time period or start date of a given project, you can simply modify the values in columns B or D without editing the formula.
Calculating Past Month-End Dates
The EOMONTH function can also tell you the month-end date of a month that is a certain number of months before a start date. Confused? Let me show you a real-world example. In this example, you have a table of ten projects, and you want to work out the latest point at which your employees must start them to meet the deadline in column E.
Specifically, if a project takes five months, you want to return the month-end date of the month that is six months before the deadline, leaving some extra room for any problems that arise in the process. To do this, in cell D2, type the following formula and press Enter:
=EOMONTH([@Deadline],-[@Months]-1)
where, for each row, [@Deadline] references the deadline date in column E, -[@Months] jumps back the number of months in the Months column, -1 jumps back an extra month, and the EOMONTH function returns the final date of the resultant month.
So, for the project in row 2, the EOMONTH takes the deadline date of January 27, 2026, jumps back five months to August 2025, and returns the month-end date of the previous month—July 31, 2025. As a result, if Mark, the assignee, starts the project on July 31, 2025, he should complete the five-month project with a few days to spare, provided everything goes to plan.
Calculating Long-Term Past and Future Month-End Dates
The EOMONTH function in Excel is great for jumping a given number of months forward or backward from a start date, before returning the month-end date. However, what if you want to jump forward or backward a given number of years? Well, EOMONTH can take care of this, too.
Take this example, where you want to return the end date for each long-term project based on a start date and a year-based timescale. Specifically, the end date must be the end of a given month since this is when you like to review the progress of your projects.
The principle for jumping forward and backward a certain number of years is much the same as jumping forward and backward a certain number of months. However, the only difference is that you need to multiply the year values by 12, since the EOMONTH function only works with months, not years.
So, in cell E2, type:
=EOMONTH([@[Start date]],[@Years]*12)
Here’s what you get when you press Enter:
So, for Mark’s project in row 2, the EOMONTH formula used above takes the start date of January 4, 2025, jumps two years (24 months) forward to January 4, 2027, and returns the month-end date of January 31, 2027.
To jump back a given number of years, place a minus symbol (-) before the second argument. For example:
=EOMONTH([@[Start date]],-[@Years]*12)
Calculating the Month-End Date of the Current Month
While Excel’s EOMONTH function is mainly used to calculate the end date of a month in the past or future, it can also return the month-end date of the current month.
Suppose you’ve created an Excel workbook, where each month’s budget is on a separate worksheet. As well as using checkboxes and the SUMIF function to work out completed and upcoming expenditures, you want to use the EOMONTH function to calculate the number of days remaining in the month and, thus, the maximum amount you can spend each day.
First, in cell B2, you need to create a formula that subtracts today’s date from the month-end date. This will return the number of days left in the month. To do this, type:
=EOMONTH(TODAY(),0)-TODAY()
where
Since you’re dealing with dates and serial numbers, Excel may convert the result to a date, where, in fact, you want it to return the number of days. If so, select the cell, and choose the “General” number format in the drop-down menu of the Number group in the Home tab on the ribbon.
Now, you can calculate how much you can spend each day in cell B7:
=B6/B1
Generating Sequences of Month-End Dates
Combining functions in Excel can take your spreadsheet to the next level, and a good example of this is nesting the SEQUENCE function in an EOMONTH formula to return a list of month-end dates.
The SEQUENCE function, which acts as the second argument of the EOMONTH function, has four arguments:
=SEQUENCE(a,b,c,d)
where
Despite having four arguments, depending on what you’re looking to achieve, you probably don’t need to use them all. For example, here’s how the SEQUENCE function looks when combined with the EOMONTH function to produce an array of month-end dates for 2025:
=EOMONTH(DATE(2024,12,31),SEQUENCE(12))
The SEQUENCE function tells Excel to return a 12-row sequence, and the EOMONTH function defines the sequence as an array of month-end dates starting the month after December 31, 2024.
The SEQUENCE function returns a dynamic array, meaning the result spills from the cell where you typed the formula to adjacent cells. Dynamic array functions aren’t compatible with Excel tables, so the nested formula you type must be in a regular cell.
Let’s say you want to return the month-end dates for every second month—rather than every month—in 2025, starting January 31. In this case, type:
=EOMONTH(DATE(2024,12,31),SEQUENCE(6,,,2))
where the first argument of the SEQUENCE formula tells Excel to return six rows of results, and the fourth argument represents a two-month increment between each value in the sequence. Finally, if you wanted to return quarterly month-end dates, you would type:
=EOMONTH(DATE(2025,2,28),SEQUENCE(4,,,3))
where the start date in the EOMONTH part of the formula is any date in the month before the end of the first quarter, the first argument of the SEQUENCE part of the formula tells Excel that you want to return four rows of results, and the fourth argument tells Excel that you want to jump three months (one year quarter) between each result.
To fix the dates once you’ve used the EOMONTH-SEQUENCE combination, select all the cells containing the dates, press Ctrl+C to copy them, and press Ctrl+Shift+V to paste the values only. Then, because the values are no longer in a dynamic array, you can format the cells as an Excel table.
As you’ve seen in this guide, EOMONTH jumps forward or backward a given number of months and returns the last day of the resultant month. However, if you want to return the same day of the resultant month, use the EDATE function instead.
[mai mult...]Libraries are collections of shared code. They’re common in Python, where they’re also called “modules,” but they’re also ubiquitous across other programming languages. A library defines functions that any programmer can use in their own programs, similar to how a public library offers anyone access to its materials.
The advantage of using libraries is that you can save time and effort by not having to code your own solutions. Libraries tend to be better tested and debugged than anything you could come up with. They will also let you do more than you could on your own.
There are numerous libraries in Python for tasks such as graphics, game development, and more. My favorite libraries tend to be for data analysis. Python is especially popular for statistics and data science due to the large number of libraries available for these tasks.
There are several ways to install Python libraries on your system. If you’re using a Linux distribution, there will often be Python libraries included in your distro’s package manager. For example, on Debian and Ubuntu systems, the libraries will often start with “python-” or “python3-“. This will install the library system-wide, so you’ll need to have administrative access.
If you don’t have root or administrative access on your system, there are still ways to install Python libraries locally.
You can use the pip tool to install Python libraries listed in the Python Package Index (PyPi).
For example, to install NumPy:
pip instlall numpy
You can install libraries on a per-project basis in virtual environments using the virtualenv utility. You can take the concepts of virtualenv further using Mamba, which happens to be my method of choice. Mamba is a tool popular among data scientists and analysts that allows you to create project-specific environments.
I already have a Mamba environment for statistical computing populated with several libraries that are popular for data analysis. I can activate it at the shell:
mamba activate stats
A lot of Python libraries will come with the language. This is a point of pride for the Python culture. The Python Standard Library has lots of modules for everything from interacting with the operating system to working with times and dates. This is why Python programmers like to say that the language has “batteries included.”
Importing a whole Python Library
To import a whole Python library in a script or in the interactive Python mode, use the import command.
For example, to import the NumPy module, use this command:
import numpy
With the library imported, you can access functions from that module. It’s like if you defined a bunch of functions. The functions are imported under their own namespace. This means that by default, any functions from the library are kept separate from the built-in commands in Python. I’ll show you some ways to change this, but the default behavior is better for most circumstances.
To get at these functions, you can call the module you just imported. It’s effectively an object, if you understand how object-oriented programming works. These functions are methods that are private to the object we just created by importing the library.
For example, to calculate the arithmetic mean or average of an array using NumPy, we’d type this:
numpy.mean(numbers)
This calls the mean function in NumPy.
You might think that typing “numpy” every time you want to access the functions is a lot, and you’re right. You can import libraries with other names as a shortcut. A common example you’ll see with NumPy is shortening the name to “np” in import statements:
import numpy as np
You can now refer to numpy as “np.” Let’s rewrite that earlier mean calculation:
np.mean(numbers)
Importing Part of a Library (Interactive Python Only!)
A lot of times, when you’re working in an interactive Python section, such as in the standard interactive Python interpreter or IPython, you’ll often want to import only one or two functions from a large library, especially if you want to use them repeatedly during a session. This is also easy to do in Python.
To import a single function from NumPy into the main namespace, you can use this construction:
from library import function
For example, to import the mean function from NumPy:
from numpy import mean
You can also import multiple functions by separating them with commas. For example, to import the mean and median functions from NumPy:
from numpy import mean, median
With these functions imported, you won’t have to preface them with “numpy” or “np.” You can just use them as if they were part of the default Python functions.
For example, to calculate the mean of an array of numbers
mean(numbers)
And the median:
median(numbers)
Importing functions by themselves is better-suited to interactive Python sessions because it saves on typing. You can do it in a script, but it’s not recommended. You might end up overwriting the namespace that’s used for a default Python function. This might cause a bug in your script. If you ask for help online in a forum or IRC chat, the other Pythonistas might get stumped. This is why you should avoid these kinds of imports in scripts as much as possible.
Creating and Importing Your Own Python Libraries
It’s also easy to import your own Python libraries. You can do it without having to be an expert in Python. All you need is a text editor and the ability to use a terminal. Python modules are just ultimately collections of functions defined in Python. You can just create a file ending in .py, the same way you were writing a script. If you’ve created your own Python functions, you can stick them in a file and import them, the same as with any other built-in or installed Python module.
To import a module, make sure that it has execute permissions. You can use the chmod command in Unix-like systems, including Linux and the macOS terminal:
chmod +x my_library.py
You can import the library using the methods described earlier. If you’re in the same directory as the module, you can just use import statements. For example, to import the library:
import my_library
If the library is in another directory, there are a couple of ways to change the search path. The first method is to use the PYTHONPATH environment variable. It’s a list of directories that Python will use to look for modules. You can modify this in your system shell either at the command line or in a startup file such as the .bashrc file in Bash. It’s a list of directories separated by a colon (:) character, similar to the PATH environment variable on Linux systems.
At the Linux shell, you can examine it with the echo command:
echo $PYTHONPATH
To change it, it’s best to append it.
export PYTHONPATH=”$PYTHONPATH:/path/to/my/modules”
This will ensure that any existing module search path is preserved before adding your own directory.
You can also modify the search path using the built-in sys module. Just import it in an interactive Python session:
import sys
Then examine it:
To add a directory to the search path, use the append method:
sys.path.append(‘/path/to/my/modules’)
Since there’s no real distinction between a Python script and a module or library, you can easily convert one to the other. It’s good programming style to break operations into smaller functions. You can also call them from another script or interactive section, but what if you have a script? You can just define the script’s operations in a “main” function.
This will check if the Python interpreter is executing the script as a script instead of importing. You can then put everything you want after this section to execute in the script, while leaving the functions to be possibly imported in another script or interactive session.
With the ability to use modules, you can tap into Python’s vast array of available modules. You’ll be able to do more than you thought you ever could by yourself. You’ll save a lot of time and effort over coding from scratch.
[mai mult...]Softaculous App Installer is a powerful tool integrated into cPanel that allows you to quickly and easily install a variety of web applications like WordPress, Joomla, Drupal, Magento, and many others with just a few clicks.
Step 1: Log in to cPanel
Access your cPanel dashboard with your username and password.
Step 2: Open Softaculous
Scroll down to the Software section and click on Softaculous Apps Installer.
Step 3: Choose the Application
Browse or use the search bar to find the application you want to install (for example, WordPress). Click on the app icon to open its information page.
Step 4: Start the Installation
On the application page, click the Install button to open the installation form.
Step 5: Fill in Installation Details
Choose Installation URL: Select the domain for installation. Leave the directory field blank to install in the root folder or specify a subdirectory.
Admin Username and Password: Enter credentials for the application’s admin panel.
Admin Email: Provide a valid email to receive notifications.
Site Name and Description: Optionally customize your site’s name and description.
Optionally configure other settings like language and plugins if available.
Step 6: Install
Click the Install button at the bottom to start the process. Softaculous will automatically create the necessary database and set up the application.
Step 7: Completion
After installation, you will see a success message with login URLs for both your site and the admin panel. You will also receive an email with the details.
Benefits of Softaculous
Simplifies application installation with minimal technical knowledge required
Automates database creation and configuration
Offers many popular web apps ready to install quickly
Provides options for backups, upgrades, and uninstallations within the interface
Using Softaculous in cPanel makes managing web apps easier and faster for both beginners and advanced users.
[mai mult...]