Example of programme that use these type of function

The program of the mini project MUST consists ALL of the following:
i. Function (that INCLUDES: value parameter & reference parameter)
ii. Selection (that INCLUDES: if, if-else, if-else if & switch-case)
iii. Repetition/Loop (that INCLUDES: while, for & do-while)
iv. Array (that INCLUDES: One-Dimensional with the use of loop & TwoDimensional with the use of nested loop)
v. Passing one-Dimensional Array to Function (that INCLUDES types of passing:
individual element & whole array)
vi. Passing two-Dimensional Array to Function (that INCLUDES types of passing:
individual element, whole array & one row)
vii. c-string Functions (that INCLUDES: strcpy/strncpy, strcmp, strcat/strncat)
viii. File (that INCLUDES: Input file & Output file)

How to Restore Database Backup With T-SQL

Let’s learn how to restore a SQL Server database backup for Microsoft SQL Server. Restoring is a method of copying data from a backup and applying logged transactions to the data. Restore is basically taking a database backup and turning it back into a database. There are different procedures of restoring a database backup which include using T-SQL code, SQL Server Management Studio, or third-party applications. This article will not dive into how backups are taken but you should at least be aware that backups are taken purposely to be restored when the database becomes corrupt or crashes, migrating the database, making a copy of the database, and other business requirements. In this crash course, we will be focusing mainly on how to restore using the T-SQL code.

Prerequisites

There is the assumption that the backup for the database is readily available and the file location is known. We also have permission to access the file/directory as long as there are no corruption or disk issues with the backup file. Also, during the restore process of the database, you will need exclusive access to the database, which means no other user connections can connect to the database.

7 Reasons to Learn Python Programming

If you have doubts about which programming language to use for your web development, we’re giving you 7 reasons — although there are many more — to program in Python. 

1. Python Is a Great Multiple

Python is an interpreted programming language, so it works on any system that integrates its interpreter. In addition to this advantage, Python offers us well-known dialects like Jython, which are used to write in Java.

How to Check Code Signing Installation: A Quick Guide

Quick Guide to Check Code Signing Installation in Google Chrome

Why have code signing certificates?

Code signing certificates are digital signatures that are of utmost importance to technology-driven businesses of the 21st century. You might argue, Why do I need it? I hold a good reputation in my space.

Mulesoft and Slack Integration Using OAuth

The Mulesoft Slack Connector enables organizations to connect directly with the Slack API, permitting users access to the Slack functionality with seamless integration.  

The lack of documentation to configure OAuth authentication for Slack connector makes it difficult for developers to use the connector with this security configuration. This article will guide developers to perform seamless integration with OAuth security.

Velo by Wix: Imitating Hover Event on Repeater Container

Motivation

We have a $w.Repeater component with items of users' cards. When we point with the mouse cursor over some item, we want to change the background color of this item to light blue color #CCE4F7, and when the cursor moves off of the item, we want to return the initial white color.

For this, we're going to use two other events that provide repeater API:

Run RSpec on GitHub Actions in the Shortest Time Using Parallel Jobs

GitHub introduced their own CI server solution called GitHub Actions. You will learn how to set up your Ruby on Rails application on GitHub Actions with the YAML config file. To run your RSpec test suite faster, you will configure parallel jobs with matrix strategy on GitHub Actions.

Automate Your Workflow on GitHub Actions

GitHub Actions makes it easy to automate all your software workflows with world-class CI/CD. The building, testing, and deploying your code right from GitHub became available with simple YAML configuration.

Async Programming in Java: Part I

As a backend engineer, we face situations to process the data asynchronously. Today let's see how it's done in java and various way to do it.

Starting from Thread, Runnable, Callable<T>, Future<T> (and its extended ScheduledFuture<T>), CompletableFuture<T>, and of course, ExecutorService and ForkJoinPool. We will see all of them, but one by one.

MySql.Data.dll error

Hi guys im using VisualStudio2017 to make a chat program from a youtube video
i keep getting an error and wondered if one of you might be able to help me out.

Exception thrown: 'System.InvalidOperationException' in MySql.Data.dll

The code:

Imports System.Security.Cryptography
Imports System.IO
Imports MySql.Data.MySqlClient

Module Con_Add
    Public usernamefriend As String
    Public Conn As New MySqlConnection
    Public ConTemp As New MySqlConnection
    Public MsgSubject As String = String.Empty

    Sub ConTempOpen()
        ConTemp.ConnectionString = "server=localhost" & My.Settings.Host & "; user id=root" & My.Settings.User & "; password=" & My.Settings.Pass & "; database=db_chat " & My.Settings.dbName

        Try
            ConTemp.Open()
        Catch ex As Exception
            MsgBox(ex.Message & vbNewLine & "Check you connection", MsgBoxStyle.Critical, "Can not connect to the database")
            Application.Exit()
        End Try
    End Sub

    Sub OpenConnection()
        Conn.ConnectionString = "server=localhost" & My.Settings.Host & "; user id=root" & My.Settings.User & "; password=" & My.Settings.Pass & "; database=db_chat " & My.Settings.dbName
        Try
            ConTemp.Open()
        Catch ex As Exception
            MsgBox(ex.Message & vbNewLine & "Check you connection", MsgBoxStyle.Critical, "Can not connect to the database")
            Application.Exit()
        End Try
    End Sub


    Function MDSEncrypter(ByVal strPass As String) As String

        Dim Hasher As New MD5CryptoServiceProvider
        Dim PasswordBytes As Byte() = New Byte(strPass.Length + 3) {}
        Dim HashBytes As Byte()

        For i As Integer = 0 To strPass.Length - 1
            PasswordBytes(i) = (CByte(Asc(strPass(i))))

        Next
        PasswordBytes(strPass.Length) = CByte(90)
        PasswordBytes(strPass.Length + 1) = CByte(85)
        PasswordBytes(strPass.Length + 2) = CByte(66)
        PasswordBytes(strPass.Length + 3) = CByte(73)

        HashBytes = Hasher.ComputeHash(PasswordBytes)
        Dim NewHashBytes As Byte() = New Byte(HashBytes.length + 3) {}

        For j As Integer = 0 To HashBytes.length - 1
            NewHashBytes(j) = HashBytes(j)

        Next
        NewHashBytes(HashBytes.Length) = CByte(90)
        NewHashBytes(HashBytes.length + 1) = CByte(85)
        NewHashBytes(HashBytes.length + 2) = CByte(66)
        NewHashBytes(HashBytes.length + 3) = CByte(73)

        strPass = Convert.ToBase64String(NewHashBytes)
        Return strPass
    End Function

    Function ImageToBytes(ByVal imgPath As String) As String
        Try
            Dim Image_DP As Image = Image.FromFile(imgPath)
            Dim memories As MemoryStream = New MemoryStream()

            Image_DP.Save(memories, System.Drawing.Imaging.ImageFormat.Png)

            Dim ImageBytes As Byte() = memories.ToArray()
            Dim StringImage As String = Convert.ToBase64String(ImageBytes)

            Return StringImage

        Catch ex As Exception
            MsgBox(ex.Message & vbNewLine & "Failed to convert image to bytes.", MsgBoxStyle.Exclamation, "Error")
        End Try   
    End Function
End Module

Step-by-Step Guide to Use Anypoint MQ: Part 4

This is the last part of the Anypoint MQ Series. You can read previous parts here: Part 1; Part 2; Part 3. In this post, we will learn about message exchanges and how we can use the  to send messages to multiple queues. We will also see how we can bind queues and publish messages to a message exchange. We may need to send the same message to more than one queue (to broadcast the message); in that scenario, message exchanges can be used.

What Is a Message Exchange?

A message exchanges bind one or more queues so that the message sent to exchange appears in all the queues bound to it simultaneously. In other words, with message exchanges, we can send the same message to all the queues which are bound to it.

11 Best Microsoft Teams Integrations to Use in 2021

If you are working in a professional space, especially in the time of the pandemic, then you know how important team collaboration is, especially using tools like Microsoft Teams.

But what if you could spice up your normal Microsoft Teams experience with the best integrations that can help you increase collaboration among the team members and also perform various other functions that can increase the productivity of the team and ultimately bring more value to the company?

WordPress Community Team Proposes Using a Decision Checklist to Restart Local Events

photo credit: Glenn Carstens-Peters

WordPress’ Community Team has been discussing the return to in-person events since early December 2020, and has landed on an idea that would allow local meetup organizers to determine readiness using a COVID-19 risk-assessment checklist. This would enable organizers to restart meetups when it is safe for their communities, instead of applying a blanket global policy.

Countries like Australia, New Zealand, The Bahamas, Iceland, and Vietnam, are a few examples of locations that are doing a decent job containing the virus. In contrast, the United States logged more than 4,000 coronavirus deaths in a single day this week, pushing the daily average to over 2,700. While the situation remains bleak for many areas of the world, vaccines are rolling out to vulnerable populations, albeit slowly and with a few snags.

In the previous discussion that happened in early December, WordPress lead developer Dion Hulse shared some feedback from Australian organizers who have been eager to restart their meetups.

“One of the problems faced in Australia (and probably NZ & Taiwan too) has been the blanket worldwide restrictions companies have put in place,” Hulse said. “Australia/NZ have been lucky, the pandemic has been successfully contained – Australia has seen less than 30k cases this year, and NZ 2k cases. To put that in context, the USA has recorded more (detected) cases in 3 hours today than Australia did all year, and more in 30 minutes than NZ.”

Hulse said a few Australian meetup groups were denied the go-ahead for restarting because of the global restrictions, which has “led to the abandonment of meetups once again (as online meetups have simply not worked here, as most people can still go out in person, so there’s been no major push from most Australians to the online platforms like elsewhere).”

The Community Team’s proposal for a checklist takes these more unique situations into consideration and allows organizers to move forward in areas where public health measures have adequately curbed the spread of the virus. A few example checklist items include the following:

  1. Is your country’s (or state’s) average positivity rate over the past 28 days under 4%?
  2. In the past 28 days, has your country or area’s basic reproduction number stayed under 1?
  3. In the past 14 days, have there been under 50 new cases per 100,000 people reported?
  4. Does your local government allow for in-person events?
  5. If there is a cap on the number of people who can meet at a time, will you as an organizer follow this guideline?

Contributor feedback so far includes recommendations for dealing with violations of the guidelines and assessing the need for contact tracing in case meetup attendees are exposed during an event. Cami Kaos recommended that the team share a list of locations that have already been vetted using the checklist and have not met requirements.

“My hope is that this would reduce a lot of duplicated time and effort for areas that we already know aren’t yet, by the standards we’re setting, safe,” Kaos said. “It would save time and disappointment for organizers hoping to meet in person and also contributor time and energy for those deputies who will vet the applications to hold in-person events.”

Since the virus is mutating and countries are adapting in different ways, the situation can change rapidly, so organizers would need to be prepared to roll back to online events if conditions for safe meetups deteriorate. WordCamps are still out of the question for the time being, but the Community Team is seeking feedback on the proposal by January 15, 2021, including additions to the checklist and recommendations for public health resources that could aid in guiding the process.

Why I Prefer Flutter Over React Native for App Development

The two leading cross-platform development frameworks, React Native and Flutter, are also widely known for their rivalry. What makes both these frameworks incredibly popular in the development world is their ability to ease work like development, the reuse code, and building a highly native-looking interface, while also offering robust support. 

In spite of their similar value propositions, both are different from each other in a multitude of ways. While both help developers to build and market an app faster, React Native, as a more matured framework, comes with a bigger community, while Flutter offers more built-in tools and less dependence on third-party tools. 

Beginner’s Guide to JavaScript Static Code Analysis

Do you suffer from poorly written code? Is your codebase riddled with inconsistencies? Do you experience anxiety every time your code is being reviewed? If you answered 'yes' to any of these questions, static code analysis could help.

Static code analysis is the process of analyzing code before it is executed. It provides numerous advantages to developers, and integrating static code analyzers can supercharge your developer workflow.

Creating a Push Notification System With Service Workers

When I started Fjolt I was quickly faced with the conundrum of how to notify users when a new article is published. Most importantly, I wanted to do all of this without depending on a third party service. I thought this would be a great opportunity to use web notifications.

Native browser notifications only really work when a user has the website open. I wanted all users to get a notification from the server when something new happened, whether the website was open or not.

Better Encoding With Monoids in Scala

Monoid has its root in abstract algebra. It is a semigroup with an identity; in other words, it has an associative binary operation and an identity element. In Scala, we can define it as follows:

Scala
 




xxxxxxxxxx
1


 
1
trait Monoid[A] {
2
  def id: A
3
  def op(a1: A, a2: A): A
4
}
5