Recovering an MS SQL Database From Suspect Mode: Step-By-Step Guide

The SQL database is always in one of the modes: online, offline, suspect, storing, recovery pending, and emergency. When the SQL database recovery fails, or the database becomes damaged or corrupted, it moves to suspect mode. When the database is marked as SUSPECT mode, the database is unavailable for user access. You can recover the database from the suspected state using different commands in SSMS. In this article, we’ll cover what causes the database to go to suspect mode and its recovery methods. Also, we’ll outline an advanced MS SQL repair tool to help you quickly restore the database from suspect mode without data loss.

Reasons for SQL Server Marked As” Suspect Mode”

The SQL Server database suspect mode indicates the recovery process has started but failed to finish. The database states may become suspect due to several reasons. Some of them are below:  

How can I better use C++and data structures and algorithms

I am a first-year university student from China. My major is Computer Science and Technology. I have been self-learning C++and data structures and algorithms recently. May I ask how I can learn them well? Is anyone interested in being my teacher or learning with friends? (Machine translation, my English is not very good, I can understand some)

Extracting values from a regex match

I am trying to extract three values from the td tags in an html downloaded file.

<tr align="right"><td>236</td><td>Roy</td><td>Allyson</td>
<tr align="right"><td>237</td><td>Marvin</td><td>Pamela</td>
<tr align="right"><td>238</td><td>Micah</td><td>Kristine</td>
<tr align="right"><td>239</td><td>Collin</td><td>Raquel</td>

I am using the pattern match = re.findall(r'<td.?>([\d+])([.?])*<\/td>', file)

The file is created with a read() statement.

The output should look like

(236, "Roy", "Allyson")
(237, "Marvin", "Pamela")
(238, "Micah", "Kristine")
(239, "Collin", "Raquel")

What I get is

(236, "")
(237, "")
(238, "")
(239, "")

I've tried different variations of the same pattern and get

('236', '23', '6')
('Roy', '', 'Roy)
('Allyson', '', 'Alison')
('237', '23', '7')
('Marvin', '', 'Marvin')
('Pamela', '', 'Pamela')
('238', '23', '8')
('Micah', '', 'Micah')
('Kristine', '', 'Kristine')
('239', '23', '9')
('Collin', '', 'Collin')
('Raquel', '', 'Raquel')

I'm relatively new to regular expressions so be gently, but any help would
be appreciated.

PS: I'm using Pythoon

Enhancing Database Efficiency With MySQL Views: A Comprehensive Guide and Examples

MySQL views are a powerful feature that can significantly enhance data management and simplify complex queries. A view is essentially a virtual table represented by a SQL query. It can encapsulate complex SQL statements, making them more manageable and reusable. This blog delves into the practical use of views in MySQL, offering insights and code examples to leverage this feature effectively.

Introduction to MySQL Views

Views in MySQL serve multiple purposes: they can simplify SQL query syntax, restrict access to specific data, and ensure data consistency across multiple queries. Unlike physical tables, views do not store data; they dynamically present data from one or more tables based on the SQL query defined in the view.

Choosing the Right Path Among a Plethora of Mobile App Development Methodologies

In a realm as dynamic as mobile app development, choosing the right methodology can significantly impact efficiency, adaptability, and success – pretty much everything about a project. As a fellow developer, I realize the importance of choosing the right methodology for a mobile app development project. Through this article, I want to share some insights to help developers navigate their options and select the most suitable approach for their projects. 

Waterfall Model 

Known to be one of the earliest and most straightforward methodologies, the waterfall model is a linear and sequential approach where each phase must be completed before the next one begins. This model is divided into distinct stages: requirements, design, implementation, testing, deployment, and maintenance. 

Developing Software Applications Under the Guidance of Data-Driven Decision-Making Principles

This article underscores the vital role of data in the creation of applications that deliver precise outputs aligned with business requirements. To architect and cultivate an application that yields precise outputs in alignment with business requirements, paramount emphasis must be given to the foundational data and the pertinent data scenarios shaping the application. Software application development guided by data-driven decision-making involves identifying the critical data elements and extracting crucial insights to design an efficient and relevant application. Listed below are the key aspects essential for developing a valuable and relevant solution that effectively navigates the complexities inherent in data.

Identification of Critical Data Elements

Through a collaborative effort between business specialists and the technical team, a thorough analysis of requirements is undertaken. The primary objective is to identify the critical data elements essential for the application's success. This initial step involves delineating a list of input elements, processing elements for all processing hops, and result elements. The culmination of this process serves as the foundational basis for all subsequent stages in the data-driven development journey. This collaborative analysis ensures a holistic understanding of the requirements, fostering a seamless connection between business objectives and technical implementation. 

Kubernetes Updates and Maintenance: Minimizing Downtime Challenges

The power and flexibility of managed Kubernetes platforms like EKS, GKE, and AKS can't be understated, but even the best tools require upkeep. Navigating the essential world of Kubernetes updates and maintenance to ensure your cluster enjoys the latest security patches, improved performance, and access to new features, all while minimizing downtime and disruptions. This article delves into the specific considerations and best practices for maintaining a healthy and secure Kubernetes environment within these managed cloud providers, helping you navigate the update process with confidence. As we journey through this guide, we'll explore:

  • Understanding the update landscape: Differentiating between Kubernetes versions, patch releases, and specific offerings within each managed platform.
  • Planning and preparation: Strategizing your update approach, considering the impact on workloads, and leveraging platform-specific tools for seamless transitions.
  • Execution best practices: Rolling updates, blue/green deployments, and leveraging platform automation for a smooth and efficient update experience.
  • Post-update considerations: Verification, monitoring, and rollback strategies to ensure everything runs smoothly after the update.

In this comprehensive article, we'll delve deep into the critical aspects of Kubernetes updates and maintenance, with a particular focus on minimizing downtime – a challenge that every DevOps professional encounters.

From Old to Bold: A Strategic Guide to Legacy System Integration

For many enterprises, an efficient legacy system integration can be a big challenge. And if you’re one of them, this blog is specifically curated for you. We’ve covered everything related to it — from the hurdles you might face to steps you need to take and how we can lend a hand in integrating those legacy systems seamlessly.

So, let’s get started!

How to Add Excerpts to Your Pages in WordPress (Step by Step)

Are you looking for a way to add excerpts to your pages in WordPress?

Excerpts are short extracts from your content that can add a description, summary, or small details about a post or page. By default, excerpts are only available for posts in WordPress.

In this article, we will show you how to easily add excerpts to your pages in WordPress, step-by-step.

Add Excerpts to Your Pages in WordPress

Why Add Excerpts to Pages in WordPress?

WordPress comes with posts and pages as two default content types. Posts are displayed in reverse chronological order (latest to oldest) on your blog or homepage.

Pages, on the other hand, are stand-alone content not published in a time-specific order. They are typically used for one-off content like your about us or contact page.

Sometimes, you may need to display excerpts for your pages. For example, this can be handy if you have built a WordPress website using only pages.

Excerpts can provide a better overall user experience by making it easier for visitors to browse through your content and see a summary of your pages.

Having said that, let’s take a look at how to add excerpts to your pages in WordPress and display them on your website. You can use the quick links below to jump between different methods:

How to Add Excerpts to Pages in WordPress

You can enable page excerpts in WordPress by adding custom code to your theme’s functions.php file.

However, the smallest error while typing the code can break your website, and if you switch to a different theme or update it, then you will have to add the code all over again.

That is where WPCode comes in. It is the best WordPress code snippets plugin on the market that makes it safe and easy to add custom code to your website.

First, you must install and activate the WPCode plugin. For detailed instructions, see our step-by-step guide on how to install a WordPress plugin.

Note: WPCode has a free plan that you can use for this tutorial. However, upgrading to the pro version will give you access to a cloud library of code snippets, smart conditional logic, and the CSS snippet option.

Upon activation, visit the Code Snippets » + Add Snippet page from the WordPress dashboard. Here, click the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

Add new snippet

This will take you to the ‘Create Custom Snippet’ page, where you can start by adding a name for the snippet. This name is only for your identification and won’t be displayed on your website’s front end.

Next, select the ‘PHP Snippet’ option from the dropdown menu on the right.

Choose the PHP Snippet option for the page excerpts code

Now, you must add the following custom code into the ‘Code Preview’ box:

add_post_type_support( 'page', 'excerpt' );

Once you do that, scroll down to the ‘Insertion’ section and choose the ‘Auto Insert’ mode.

The custom code will be automatically executed on your website once you activate the snippet.

Choose insertion method

After that, scroll back to the top of the page and toggle the ‘Inactive’ switch to ‘Active’.

Finally, click the ‘Save Snippet’ button to store your settings.

Click the Save Snippet button for the page excerpts code

Now open the page where you want to add an excerpt in the WordPress block editor.

Once you do that, you will notice an ‘Excerpt’ tab in the block panel on the right side of the screen.

Here, you can easily expand the tab and add an excerpt for your WordPress page.

Add page excerpts in the Excerpts tab in the block panel

Once you do that, don’t forget to click the ‘Update’ or ‘Publish’ button to store your changes.

Now, simply repeat the process for all the WordPress pages where you want to add excerpts.

How to Display Page Excerpts in WordPress

Now that you have added the excerpt functionality to your pages, it is time to actually display these excerpts on your WordPress site.

To do this, you will need to add a shortcode to your widget area or page.

First, you must install and activate the Display Posts plugin. For more details, see our beginner’s guide on how to install a WordPress plugin.

This plugin will enable a shortcode that displays 10 recent pages with their title, excerpt, and a continue reading link.

If you didn’t enter a custom excerpt for a page, then the plugin will automatically generate an excerpt for the page with the default length of 55 words.

Method 1: Display Page Excerpts on a WordPress Page

Upon activation, you must create a new page where you want to display a list of your pages and their excerpts.

Once you are there, click the add block ‘+’ button to open the block menu and add the Shortcode block. Next, paste the following shortcode into the block itself:

[display-posts post_type="page" include_excerpt="true" excerpt_more="Continue Reading" excerpt_more_link="true"]

Add the page excerpt shortcode in the block editor

Finally, click the ‘Update’ or ‘Publish’ button to store your settings.

Now, just visit your WordPress site to view the list of page excerpts.

Preview of page excerpts on a page

Method 2: Display Page Excerpts in the WordPress Sidebar

If you want to display page excerpts in the WordPress sidebar, then you must visit the Appearance » Widgets page from the WordPress dashboard.

Note: If you don’t see the ‘Widgets’ menu tab on your dashboard, then it means you are using a block theme. In that case, you can skip to the next method.

Here, click the add block ‘+’ button to expand the block menu on the left. Then, add the Shortcode block to the sidebar area.

Add page excerpts shortcode in a widget area of your choice like the Sidebar

After that, copy and paste the following shortcode into the block:

[display-posts post_type="page" include_excerpt="true" excerpt_more="Continue Reading" excerpt_more_link="true"]

Finally, click the ‘Update’ button to store your settings.

Now, you can visit your WordPress blog to view the page excerpts.

Preview of page excerpts in the WordPress sidebar

Method 3: Display Page Excerpts in the Full Site Editor

If you are using a block theme, then you must visit the Appearance » Editor page from the WordPress admin sidebar.

This will open the full site editor, where you must choose the page where you want to display a list of page excerpts.

Choose a page to edit in the full site editor

Next, click the add block ‘+’ button on the screen to add the Shortcode block.

Then, copy and paste the following shortcode into it:

[display-posts post_type="page" include_excerpt="true" excerpt_more="Continue Reading" excerpt_more_link="true"]

Add page excerpts shortcode in the full site editor

Finally, click the ‘Save’ button to store your settings.

Now, go ahead and visit your website to view the list of page excerpts.

Page excerpts preview in the WordPress block theme

Bonus: Display Post Excerpts in WordPress

Other than pages, it is also a good idea to show post excerpts on your WordPress blog.

By default, WordPress shows your full-length posts on the homepage, archives page, or blog page. This means a lot of scrolling, which can provide a negative user experience to visitors who want to browse through your website quickly.

As your blog grows, the list of your older posts will also be pushed to other pages and get fewer views. That is why you should consider showing post excerpts on your blog or archives page.

An example of post excerpts in a WordPress theme

If you are using a classic theme, then you can add post excerpts by visiting the Appearance » Customize page from the WordPress admin sidebar.

Once the customizer opens up, expand the ‘Blog’ tab in the left column of the screen. This will open some new settings where you can scroll down to the ‘Post Content’ section and click on the ‘Excerpt’ option.

Adding post excerpts to your WordPress website

However, keep in mind that these settings can differ based on the theme that you are using.

If your theme does not support excerpts, then you can use custom code or page builders like SeedProd to add post excerpts to your blog.

Adding blog excerpts to a WordPress theme

For detailed instructions, see our tutorial on how to display post excerpts in WordPress themes.

We hope this article helped you learn how to add excerpts to your pages in WordPress. You may also want to see our guide on how to choose the best website builder or our expert pick of the best live chat software.

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 Excerpts to Your Pages in WordPress (Step by Step) first appeared on WPBeginner.

The Internet of Things Revolution

The growing network of connected devices known as the Internet of Things (IoT) is sparking digital transformation across many industries. By linking physical objects to the online world through sensors and internet connectivity, IoT enables unprecedented data collection, automated analytics, and process enhancements via remote monitoring and control.

IoT’s core value is its ability to embed intelligence and access into infrastructure like manufacturing equipment, vehicles, appliances, and more that comprise the operational backbone of modern civilization. Web-enabled sensors across locations generate massive datasets reflecting system states in granular detail and real time. Sophisticated AI algorithms tap countless data points to discern efficiency opportunities within complex processes previously opaque to analytical scrutiny. 

Composability in Flow: Unlocking Technical and Business Opportunities

Composability in blockchains refers to a framework that permits the interaction and interconnection of discrete elements, especially smart contracts. This kind of modular ecosystem is important as it helps programmers utilize existing components to build advanced systems very quickly.

In this article, we’ll look at composability — what it means, how it works on blockchain, some of its benefits and opportunities, and how it powers some of the innovations behind the Flow blockchain.

Munit: Parameterized Test Suite

The purpose of this use case is to explain how to define different RAML data types, define the business-related status code for request payload validation, define the single unit test case for multiple field validation with dynamic request payload, and how to use the parameterized test suite. 

With a parameterized test suite, we can write a reusable unit test case. It can help to write and test multiple scenarios based on different inputs with a single test case. This can be more useful when we are writing a test case to validate the request and response payload.

Unleashing the Power of Java Interfaces

Java interfaces, for a very long time, were just that — interfaces, an anemic set of function prototypes. Even then, there were non-standard uses of interfaces (for example, marker interfaces), but that's it.

However, since Java 8, there have been substantial changes in the interfaces. Additions of default and static methods enabled many new possibilities. For example, enabled adding of new functionality to existing interfaces without breaking old code. Or hiding all implementations behind factory methods, enforcing the “code against interface” policy. The addition of sealed interfaces enabled the creation of true sum types and expressions in code design intents. Together, these changes made Java interfaces a powerful, concise, and expressive tool. Let’s take a look at some non-traditional applications of Java interfaces.

Amazon Bedrock: Game-Changing Disruption in 4 Sectors

For business leaders and IT pros, Amazon Bedrock is a game-changer. It uses the capabilities of generative AI to make a big impact. Let’s look at a simple example to understand how powerful it can be.

Picture this: You are a business owner or an IT professional navigating the ever-changing landscape of technology. In your pursuit of innovative solutions that can propel your operations to new heights, you stumble upon a momentous change – Amazon Bedrock. This isn’t just another tool; it’s a revolutionary force poised to transform industries through the lens of generative AI.

Extracting values from capturing groups in regex

I am trying to extract three values from the td tags in an html downloaded file.

<tr align="right"><td>236</td><td>Roy</td><td>Allyson</td>
<tr align="right"><td>237</td><td>Marvin</td><td>Pamela</td>
<tr align="right"><td>238</td><td>Micah</td><td>Kristine</td>
<tr align="right"><td>239</td><td>Collin</td><td>Raquel</td>

I am using the pattern match = re.findall(r'<td.?>([\d+])([.?])*<\/td>', file)

The file is created with a read() statement.

The output should look like

(236, "Roy", "Allyson")
(237, "Marvin", "Pamela")
(238, "Micah", "Kristine")
(239, "Collin", "Raquel")

What I get is

(236, "")
(237, "")
(s38, "")
(239, "")

I've tried different variations of the same pattern and get

('236', '23', '6')
('Roy', '', 'Roy)
('Allyson', '', 'Alison')
('237', '23', '7')
('Marvin', '', 'Marvin')
('Pamela', '', 'Pamela')
('238', '23', '8')
('Micah', '', 'Micah')
('Kristine', '', 'Kristine')
('239', '23', '9')
('Collin', '', 'Collin')
('Raquel', '', 'Raquel')

I'm relatively new to regular expressions so be gently, but any help would
be appreciated.

PS: I'm using Pythoon

Buying Your First Film Camera? Here are 3 Things to Know

Even when everyone has a smartphone with a camera in their pocket, the allure of film cameras remains undiminished. There’s something inherently magical about capturing images on film. If you’re considering stepping into the world of film photography, here are a few tips for picking out your first camera.  Types of Film Cameras Film cameras […]