Home Blog Page 10

Waterfall vs Prototyping Model – Basic

Waterfall Model is simple and straightforward software process model that guides software stakeholders to develop system is organized way. It is suitable mainly for projects with low budgets. It comprise of variable stages that depend on project. Common stages of basic waterfall model are:

  1. Defining Requirements
  2. Design
  3. Implementation
  4. Validation
  5. Maintenance

Main disadvantage of this model is that requirements must be clear in prior as it can’t be changed once the system development process begins. It’s so called as waterfall as it depicts the phenomenon of water falls where one can’t move directly to previous stage for necessary adjustments. In other words, “Backtracking is not possible” in this model of software development.

Prototype is a quick design or a blueprint that we present to client before actual system development begins. And, prototyping model is refinement/improvisation of waterfall model which focuses on satisfying clients by addressing all their requirements before actual development starts. It shows overall system flow, what pages are included and how it will look like in future. We can easily modify it as per client’s feedback as it’s not actual design. Changes in actual system takes considerable time and cost so it’s better idea to follow prototyping model if client’s requirement is not so clear(or very complicated) in prior to system development.

VB Code to convert Digit to Text in MS Word Document

Copy the code below by creating a new Macro to convert:

To add shortcut for this macro, you shall follow this article that I’ve written in prior.

Sub DigitToText()
    Dim datasagar_Digits As String
    Dim datasagar_NumText As String

    datasagar_NumText = ""

    ' Select Number from Word Document 
    Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdMove
    Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend

    ' Store digits in variable named datasagar_Digits
    datasagar_Digits = Trim(Selection.Text)

    If Val(datasagar_Digits) > 999999 Then
        If Val(datasagar_Digits) <= 999999999 Then
            datasagar_NumText = Trim(Int(Str(Val(datasagar_Digits) / 1000000)))
            ' For selection range, create a field containing the digits and the cardtext format flag
            Selection.Fields.Add Range:=Selection.Range, _
              Type:=wdFieldEmpty, Text:="= " + datasagar_NumText + " \* CardText", _
              PreserveFormatting:=True

            ' Select the previously created field and copy it
            Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
            datasagar_NumText = Selection.Text & " million "
            datasagar_Digits = Right(datasagar_Digits, 6)
        End If
    End If
    If Val(datasagar_Digits) <= 999999 Then
        ' Create a field containing that digits and the cardtext format flag
        Selection.Fields.Add Range:=Selection.Range, _
          Type:=wdFieldEmpty, Text:="= " + datasagar_Digits + " \* CardText", _
          PreserveFormatting:=True

        ' Select the field and copy it
        Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
        datasagar_Digits = datasagar_NumText & Selection.Text

        ' Replace number with words in the selected area of word document
        Selection.TypeText Text:=datasagar_Digits
        Selection.TypeText Text:=" "
    Else
        MsgBox "Number too large", vbOKOnly
    End If
End Sub

Add Shortcut to use the Macro you’ve created in MS Word

After adding Macro in MS Word document, you can follow the steps below to create shortcut for it.

  1. Go to File Menu –> Options or Right Click on Office Ribbon
  2. After that, Goto Customize Ribbon
  3. You’ll see Customize option on the bottom of commands category there, Click on it.

4. Follow Steps as in image below:
Scroll down to find Macro Command and click on it, You’ll see previously created Macros on the right. In my Case it’sDigitToText.

5. Click on it And press any shortcut key combination to run this macro automatically afterward using that shortcut. (Alt + C) in my case.

Click on Assign –> Close and You’re ready to give it a try.

From your word document select number and then press your shortcut key combination to convert it to Text.

Thanks and Happy Learning!

Windows Memory Integrity – How to protect your Core system data in windows

Memory integrity is a security feature in the Windows operating system that helps prevent malicious code from tampering with system memory. This feature is designed to protect critical system processes, kernel-mode drivers, and system memory pages from tampering, which can lead to serious security vulnerabilities.

Memory integrity was first introduced in Windows 10 Creators Update and is now an essential component of the Windows security platform. It operates by restricting access to system memory to only trusted processes, drivers, and memory pages. This is achieved by assigning system memory pages with a special security attribute known as “write-protected.”

This feature helps prevent various types of attacks such as buffer overflow attacks, where an attacker attempts to write past the end of a buffer and overwrite critical data in memory. Memory integrity also helps prevent other types of memory-based attacks, such as rogue processes that inject malicious code into the memory space of other processes.

Memory integrity operates by using hardware-based virtualization technology, specifically hardware-enforced memory integrity. This technology creates a virtualized environment for system memory, where the hardware can enforce memory protection policies without the need for software-based solutions.

In order to take advantage of memory integrity, Windows requires compatible hardware, specifically processors that support hardware-based virtualization technology. Most modern processors support this technology, but it is important to check if your device meets the minimum requirements before enabling memory integrity.

To enable memory integrity in Windows, you can use the Windows Security app. To do this, simply open the Windows Security app, go to the “Device Security” section, and turn on “Core isolation details.” From there, you can enable memory integrity, as well as other security features, such as system firmware protection and virtualization-based security.

In conclusion, memory integrity is an essential security feature in Windows that helps protect your system against memory-based attacks. By restricting access to system memory to only trusted processes and drivers, memory integrity helps prevent malicious code from tampering with system memory and compromising the security of your device. Whether you’re a home user or a business, it’s important to take advantage of this feature to ensure the security of your system and data.

SET operations in SQL

Set operations combines the results of two independent SQL queries. There are three set operations in SQL 

1.Union

2. Intersect

3. Except

These set operations operate on relations and are based on the general principles of mathematical set theory that you’ve probably covered in school level math. 

One thing to not forgot is, each of these operations automatically eliminates duplicates in the result. In order to retain all the duplicates, one can use the corresponding multiset versions of basic set operations union all, intersect all and except all.

Suppose a tuple/row occurs m times in a relation named r and n times in relation named s then it occurs

m  + n times in r union all s

min(m,n) times in r intersect all s

max(0, m – n) times in r except all s.

Some example queries are shown in image below:

The relation schemes for all the examples used above are:

Branch(bname, bcity, assets)

Customer(cname, street, ccity)

Depositor(cname, account#)

Account(bname, account#, balance)

Loan(bname, loan#, amount)

Borrower(cname, loan#)

Top 10 code editors for web developers

As web development is a profession that is always changing, having the appropriate tools at your disposal can significantly increase your productivity and efficiency. A code editor is one of the most essential tools for a web developer. Software that aids in writing and editing code is known as a code editor. It offers tools for debugging, code completion, and syntax highlighting. It can be challenging to decide which code editor to use because there are so many choices. We’ll examine the top 10 code editors for web developers in this article.

  1. VS Code: Microsoft created Visual Studio Code, also referred to as VS Code, which is a free and open-source code editor. Due to its sophisticated features, like IntelliSense, which offers intelligent completions based on variable types, function definitions, and imported modules, it is one of the most well-liked code editors among web developers.
  2. Atom: Atom is another another open-source, free code editor that can be easily customized and modified. It is created by GitHub and has a sizable user and contributor community. You may install and manage packages for more functionality using the in-built package management.
  3. Sublime Text: Commercial code editor Sublime Text is renowned for its quick performance and clean aesthetic. You may install and manage packages for more functionality using the in-built package management. It’s among the greatest options for developers who want an easy-to-use interface.
  4. Vim: Vim is a robust text editor with a lot of configuration options that has been around for more than 25 years. Experienced developers love its keyboard-based instructions and effective workflows, which is why it is so well-liked by them.
  5. Emacs: Another extremely customizable text editor that has been around for more than 30 years is called Emacs. It enjoys enormous popularity among seasoned developers who value its extensibility and potent features.
  6. Komodo Edit: Based on the same technology as the for-profit Komodo IDE, Komodo Edit is a free and open-source code editor. Many of the same capabilities found in the IDE are also available here, including code autocompletion, debugging, and support for different languages.
  7. Light Table: Light Table is an open-source, free code editor with a focus on customization and extensibility. You may see the outcomes of your code as you type thanks to its special interface.
  8. Nova: Nova is a for macOS-specific, commercial code editor. It is renowned for its lightning-quick performance, slick user interface, and cutting-edge features including a built-in terminal and multilingual support.
  9. Notepad++: Created for Windows, Notepad++ is a free and open-source code editor. It is renowned for its quickness, spick-and-span UI, and multilingual support.
  10. TextMate for macOS: TextMate is a for macOS-specific, commercial code editor. It is renowned for its lightning-quick performance, slick user interface, and cutting-edge features including a built-in terminal and multilingual support.

Depending on the code editor you select as a web developer, productivity and efficiency could fluctuate significantly. The top 10 code editors for web developers that we’ve covered in this post might help you write and edit code more efficiently. Regardless of whether you are a beginner or an experienced programmer, this list of code editors has one that will suit your needs. Whatever one you choose, make sure to take the time to become familiar with its features and shortcuts in order to get the most out of it. It’s fun to code!

What is Microsoft Open Database Connection(ODBC)

ODBC is the primary native data access API for applications written in C and C++ for SQL Server. This open data connectivity is being used by various applications and data sources. ODBC interface is widely used in data integration scenarios. In other word, ODBC can also be defined as a protocol that you use to connect an Access database to an external data source such as Microsoft SQL Server. There’s an ODBC driver for majority of data sources available. Many Other languages that can use ODBC include Python, PHP, COBOL, and Perl etc.

The ODBC interface is designed for use with the C programming language. Use of the ODBC interface spans three areas:
SQL statements,
ODBC function calls, and
C programming.

Image Source: Tech Target

ODBC consists of four components, working together to enable functions. It allows programs to use SQL requests that access databases without knowing the proprietary interfaces to the databases, handles the SQL request and converts it into a request each database system understands.

Components of ODBC:
Application component Processes and calls the ODBC functions and submits the SQL statements;
Driver manager is component that loads drivers for each application;
Driver component handles ODBC function calls, and then submits each SQL request to a data source; and
Data source itself is data being accessed and its database management system.

Following is the Sample SQL Server ODBC Connection String

DRIVER={Devart ODBC Driver for SQL Server};
Data Source=DBMSSQL;
Initial Catalog=myDatabase;
User ID=sa;
Port=1433

Connecting to SQL Server via ODBC Driver

After installing the driver, create a DSN for SQL Server in the ODBC Data Source Administrator.

  1. Open the ODBC Data Source Administrator.
    • Type ODBC Data Sources in the Windows 10 search box and choose the ODBC Data Sources application that matches the bitness of your application (32-bit or 64-bit). You can also open ODBC Data Sources from Control Panel > Administrative Tools. Note that before Windows 8, the icon was named Data Sources (ODBC).
      Or, Alternatively, you can run C:\Windows\SysWOW64\odbcad32.exe to create a 32-bit DSN or C:\Windows\System32\odbcad32.exe to create a 64-bit DSN.
  2. Select the User DSN or System DSN. Most applications work with any of them, yet some applications require a specific type of DSN.
  3. Click Add. The Create New Data Source dialog appears.
  4. Select Devart ODBC Driver for SQL Server and click Finish. The driver setup dialog opens.
  5. Enter the connection information in the appropriate fields.
  6. To test the connectivity, click Test Connection.
  7. Click OK to save the DSN.

Nepal Data Protection Act (DPA) 2018 – an Introduction

The main piece of law in Nepal that governs the processing of personal data is the 2018 Nepal Data Protection Act (DPA). The Act was passed to ensure the safe and secure use of personal data as well as to safeguard the privacy and personal information of individuals in Nepal.

The Nepal Data Protection Act of 2018 has several important measures, including:

  1. All information that refers to a named or distinguishable natural person is considered personal data under the Act.
  2. To oversee the Act’s implementation and enforcement, the Act created a regulatory organization known as the “Data Protection Authority.”
  3. Individuals must explicitly consent before their personal information is collected, processed, or used for any purpose, according to the Act.
  4. The Act gives data subjects a number of rights, including the ability to see, update, and delete their personal information.
  5. Under the Act, data controllers and processors must implement reasonable safeguards to protect personal data from improper access, use, or disclosure.
  6. It places limitations on the export of personal information from Nepal.

Penalties, such as fines and imprisonment, may apply if provisions of the Nepal Data Protection Act 2018 are broken. Businesses and organizations operating in Nepal must make sure they abide by the Act’s rules while processing personal data, which has important ramifications.