Home Blog Page 12

Trigger in SQL

An automatic execution of a defined block of SQL code known as a trigger occurs in reaction to specific events, such as the addition, modification, or deletion of a record in a table. Among other things, triggers are employed to uphold data integrity or to enforce business standards.

The SQL syntax for building a trigger is as follows:

CREATE TRIGGER trigger_name
AFTER/BEFORE INSERT/UPDATE/DELETE
ON table_name
FOR EACH ROW
BEGIN
-- trigger code goes here
END;

For instance, you could use the following sentence to build a trigger called “update_salary_history” that updates the “salary_history” table anytime an employee’s salary is updated in the “employees” table:

CREATE TRIGGER update_salary_history
AFTER UPDATE OF salary
ON employees
FOR EACH ROW
BEGIN
INSERT INTO salary_history (employee_id, salary, update_date)
VALUES (OLD.employee_id, OLD.salary, CURRENT_TIMESTAMP);
END;

To drop a trigger, you can use the following statement:

DROP TRIGGER trigger_name;

Triggers can be helpful for automating specific processes or maintaining data integrity, but they can also be difficult to build and manage, so they should only be used in limited circumstances. In general, it is a good practice to utilize triggers sparingly and to substitute other methods, including foreign keys and stored procedures, whenever possible.

How to change Classic Theme name in PrestaShop 1.7 ?

PrestaShop is an efficient and innovative e-commerce solution with all the features you need to create an online store and grow your business. Customize your store Choose your colors, your logo and a design from among a selection of professional-looking themes. It’s considered as world’s top open source ecommerce solution that’s gaining it’s popularity in recent years. Read more at PrestaShop Official Site.

If you’re familiar with PrestaShop installation or trying to do so, you may be thinking of changing the theme name provided by default installation package. You shall download latest version of PrestaShop from official link here. To begin with default classic theme name edit, I would like to make you clear that there are two ways of editing theme name that come along with package or the theme that you’ve developed.

  1. Renaming theme before installing PrestaShop theme.
  2. Renaming theme after installing PrestaShop theme.

Let’s get started!
Renaming theme before installing PrestaShop theme.

How to change the folder name of your theme after it’s installed.

STEP 1: After downloading .zip file from internet source, unzip it and then find out the theme folder.
STEP 2: Navigate to he path under the theme folder \config\theme.yml and change the name from classic to your name. (e.g. classic to illionso)
STEP 3: Install the new theme and you’re done.

Renaming theme after installing PrestaShop theme.

STEP 1: Navigate to \themes\classic\config\theme.yml file from your local server or live server where you’ve installed PrestaShop. Find the name: classic  and change it to your name. eg name: illionso

STEP 2: Rename the classic folder from your root directory to the name you’ve mentioned in theme.yml file in step 1. e.g. illionso

STEP 3: Go to PhpMyAdmin and select your database. Find ps_shop table over there and then change theme_name value to your name as in step 1 and step 2.

STEP 4: Clear Smarty Cache(by going to Advanced Parameter–>Performance) and you’re done!!!

Share this article if it really helped you. If you’ve any questions, please let me know and I’ll try to respond as soon as possible. Cheers!

Best Course In the World for Computer Science Beginners: CS50 Introduction

“CS50: Introduction to Computer Science” is a course by Harvard University that introduce the introduction to the intellectual enterprises of Computer Science. It enable students think algorithmically and solve problems efficiently.

This is a free course available online and you’ll have access to all of the materials and grading at no cost. It is considered as best computer science course in the world that is available to anybody who has an Internet connection. At prime, we’ll be facilitating the learning process of enrolled in CS50 in EdX throughout the basic introductory part that last up to 8 weeks.

After the completion of 8 week that covers fundamentals of computing and programming, the course requires your specialization in tracks like Games, Mobile (Android or iOS), or Web. Throughout the course, languages students will be using includes C, Python, and SQL plus students’ choice of: HTML, CSS, and JavaScript (for web development); Java or Swift (for mobile app development); or Lua (for game development).

To get enrolled into CS50, follow this CS50’s Introduction to Computer Science EdX Course Link

You shall follow the official youtube channel here.

Happy Learning!!!

5 best websites to learn JavaScript for free

0

Hi everyone, welcome to my other post where I’ll be highlighting some popular platforms that you can use to learn JavaScript. FYI, JavaScript is one of the most popular programming languages in the world, and for good reason. It’s versatile, powerful, and essential for creating interactive, dynamic websites. If you’re looking to learn JavaScript, there are plenty of resources available online, many of them free. In this blog post, we’ll take a look at the 5 best websites to learn JavaScript for free. Whether you’re a complete beginner or an experienced developer looking to sharpen your skills, these websites have something to offer.

  1. W3 Schools: W3 Schools is a website that offers a wide range of tutorials on web development technologies, including JavaScript. It offers a beginner-friendly introduction to the language, as well as more advanced topics such as DOM manipulation and AJAX.
  2. FreeCodeCamp: FreeCodeCamp is a non-profit organization that offers a comprehensive curriculum of coding lessons, including JavaScript. They have a large community of learners and developers who can help with any queries and also offer certifications for completed modules.
  3. javascript.info: javascript.info is a website that provides in-depth tutorials on JavaScript, covering both the basics and advanced topics. It also offers interactive coding exercises to help users practice and solidify their understanding of the language.
  4. MDN docs: MDN (Mozilla Developer Network) is a website that offers a wide range of resources for web developers, including detailed documentation on JavaScript. It’s a great resource for looking up specific features of the language and how to use them.
  5. Learn-js.org: Learn-js.org is a website that offers interactive coding exercises and quizzes to help users learn JavaScript. It’s a great resource for those who learn better through hands-on practice.

How to enable Together Mode in Microsoft Teams?

Go to your team setting option by clicking your profile image.

You’ll see the following Application Settings there.

Application

To restart, right-click the Teams icon in the taskbar, then select Quit. Then reopen Teams.
  • Auto-start application
  • Open application in background
  • On close, keep the application runningDisable GPU hardware acceleration (requires restarting Teams)
  • Register Teams as the chat app for Office (requires restarting Office applications)
  • Turn on new meeting experience (New meetings and calls will open in separate windows. Requires restarting Teams.)
  • Enable logging for meeting diagnostics (requires restarting Teams)

Make sure you select “Turn on new meeting experience (New meetings and calls will open in separate windows. Requires restarting Teams.)” option as highlighted in the image below.

By enabling this option, a multiwindow popup feature will be enabled that allows you to access many different features of Microsoft Teams like 7 X 7 grid view and Together Mode, etc. Restart your Teams Desktop application to enjoy a new team meeting experience.

To switch your meeting view to together mode, you should go to Meeting Options and click on Together Mode as shown below.

Congratulation!!! You’re done. Enjoy Together Mode.

Thanks.
Visit our Facebook Page here.

Scheduling a meeting only for private channel in Microsoft Teams

In this very article, I’ll be guiding you on creating and scheduling meetings by targeting it to a private channel. By doing so, it would be displayed only on the calendar of members who are in a respective private channel. As private channel in team app only provides Meet Now feature, it’s a simple trick you shall follow to get your meeting requirement addressed. We’ll create an email for private channels and use that email to invite all members of the private channel. Let’s not complicate things and get started.

Step 1: Go to a private channel and click on more option (…) to get the email of the channel as shown in the image below. Click on “Get email address

Step 2: You’ll get an email address to your private channel in Team. Copy that email (only portion inside angular bracket as highlighted below).

Step 3: Go to the general channel or any public channel from where you can access Schedule a meeting feature and click on schedule a meeting. You can use the calendar to start scheduling meetings.

Step 4: As shown above, you should remove any channel from the channel list and enter the email that you’ve copied in step 2 as shown below.

Fill all the meeting details and click on Save option on the top right corner. BANG! YOU’RE DONE!!! The meeting will be created, scheduled, and displayed only to members of the private channel that you’ve copied e-mail of.

If it helped you, please share it.

Stay safe and have a good day!

How to enable a 7×7 gallery view in Microsoft Teams?

Go to your Team’s setting(Desktop Application).

Enable the new meeting experience manually by checking the icon as shown in the image below. By doing so and restarting the application, the multi-windows mode will be enabled as discussed officially here by Microsoft.

7X7 view is supported only in pop-up windows enabled mode as of August 2020 update.

Go to meeting options to switch your view accordingly as shown in the image below. To enable a 7X7 view in a team, you need to select a Large Gallery(Preview) option there just above the “Choose Virtual Background” option shown below.

Your view will be changed.

Things to care about when designing a good database system

There are several things to consider when designing a good database system:

Data modeling: A good database design begins with careful data modeling. This involves identifying the entities (e.g., customers, orders, products) and the relationships between them, and then creating a data model that represents these entities and relationships.

Normalization: Normalization is the process of organizing a database in such a way that it meets certain goals, such as minimizing redundancy and dependency. A properly normalized database is more efficient, flexible, and easier to maintain.

Data integrity: Data integrity refers to the accuracy, completeness, and consistency of the data in a database. It is important to design a database that ensures data integrity through the use of constraints, triggers, and other mechanisms.

Performance: A good database design should take into account the expected workload and optimize the design for good performance. This may involve the use of indexes, partitioning, and other techniques.

Security: A good database design should include measures to protect the data from unauthorized access and tampering. This may involve the use of passwords, access controls, and encryption.

Scalability: A good database design should be able to handle an increasing workload without experiencing performance degradation. This may involve the use of sharding, replication, and other techniques.

Maintainability: A good database design should be easy to maintain over time. This may involve the use of good naming conventions, documentation, and other best practices.

Overall, a good database design should balance the needs of the application with the principles of good database design in order to create a system that is efficient, flexible, and easy to maintain.