Tuesday, February 20, 2018

Angular JS2

Angular JS2

Before knowing about Angular JS2 , you must have some basic ideas about Angular JS. Angular JS is nothing but a web application framework, this framework is based on mainly the open source front end. An individual community and Google mainly maintain it. The framework of Angular JS is on the first step read from the HTML page, This HTML page is embedded into a custom attribute of the tag which is additional.
The Basic Idea of Using Angular JS 2
The Angular JS is used on certain websites such as the NBC, ABC News, Walgreens, Sprint, Intel and Wolfram Alpha. This was mainly built with the idea of connecting components of software and creation of user interfaces when declarative program is on use. Now you will be knowing about the Angular JS2  whose main work is kick starting an application or MVP. Angular JS2  is also known as Angular 2. When more features came to existence the team of angular made a decision of rewriting the old frame work with a new one with more features which is termed as the Angular 2. Between Angular JS and Angular JS2  there is a presence of migration path which is known as the ng-upgrades. For the making of single page application advance features are provided by Angular 2 or Angular JS 2 .
Components of Angular JS2
The elements are offered by angular 2 instead of offering the controllers typical of the MVC architecture. Angular JS2  contains a very less number of directives when compared to Angular JS. It is a modular frame wok. A module encapsulates each piece of functionality and for other parts of application a service is exposed in Angular JS2 .
Different Modules of Angular JS2
There are two types of modules in an Angular JS 2 . With the user’s own application code the use of module is promoted by the Angular JS 2 . There were a lot of old cruft present in angular JS which was replaced and developed in Angular JS2 . It is not easy to upgrade the applications of Angular JS to Angular JS 2 , it is a different framework from that of Angular JS but Angular JS2  is based on the same path of ideas of the Angular JS. In case of the application of Angular JS 2  it consist of the component where each of the component consist of metadata, class and template. So this much introduction is enough to give you a basic idea about the Angular JS 2 .

Monday, February 19, 2018

Cryptography in .NET

Cryptography in .NET

The .NET Framework provides implementations of many standard cryptographic algorithms. These algorithms are easy to use and have the safest possible default properties. In addition, the .NET Framework cryptography model of object inheritance, stream design, and configuration is extremely extensible.
Object Inheritance
The .NET Framework security system implements an extensible pattern of derived class inheritance. The hierarchy is as follows:
•    Algorithm type class, such as SymmetricAlgorithm, AsymmetricAlgorithm or HashAlgorithm. This level is abstract.
•    Algorithm class that inherits from an algorithm type class; for example, Aes, RC2, or ECDiffieHellman. This level is abstract.
•    Implementation of an algorithm class that inherits from an algorithm class; for example, AesManaged, RC2CryptoServiceProvider, or ECDiffieHellmanCng. This level is fully implemented.
Using this pattern of derived classes, it is easy to add a new algorithm or a new implementation of an existing algorithm. For example, to create a new public-key algorithm, you would inherit from the AsymmetricAlgorithm class. To create a new implementation of a specific algorithm, you would create a non-abstract derived class of that algorithm.
How Algorithms Are Implemented in the .NET Framework
As an example of the different implementations available for an algorithm, consider symmetric algorithms. The base for all symmetric algorithms is SymmetricAlgorithm, which is inherited by the following algorithms:
1.    Aes
2.    DES
3.    RC2
4.    Rijndael
5.    TripleDES
You can choose which implementation is best for you. The managed implementations are available on all platforms that support the .NET Framework. The CAPI implementations are available on older operating systems, and are no longer being developed. CNG is the very latest implementation where new development will take place. However, the managed implementations are not certified by the Federal Information Processing Standards (FIPS), and may be slower than the wrapper classes.
Stream Design
The common language runtime uses a stream-oriented design for implementing symmetric algorithms and hash algorithms. The core of this design is the CryptoStream class, which derives from the Stream class. Stream-based cryptographic objects support a single standard interface (CryptoStream) for handling the data transfer portion of the object. Because all the objects are built on a standard interface, you can chain together multiple objects (such as a hash object followed by an encryption object), and you can perform multiple operations on the data without needing any intermediate storage for it. The streaming model also enables you to build objects from smaller objects. For example, a combined encryption and hash algorithm can be viewed as a single stream object, although this object might be built from a set of stream objects.
Cryptographic Configuration
Cryptographic configuration lets you resolve a specific implementation of an algorithm to an algorithm name, allowing extensibility of the .NET Framework cryptography classes. You can add your own hardware or software implementation of an algorithm and map the implementation to the algorithm name of your choice. If an algorithm is not specified in the configuration file, the default settings are used. For more information about cryptographic configuration, see Configuring Cryptography Classes.

Friday, February 16, 2018

Regular Expression : Useful Tools and Resources



A Regular Expression is a term used in Computer science and language. Regular Expression or Regex is a set or sequence of characters that define a search pattern. This method is mostly used in “find” or “search and replace” application. Regex is used in search operations where “find and replace” options are used, especially in word processor.

Features of Regex:

A Regular Expression is a very powerful method which is required at every step when you are using a programming language. It is of utmost importance when you are performing scan and replace option for future actions. If you want to improve your URL or if you want to modify your RSS feed then you must definitely use Regex. If you are a beginner in learning regular expression then you will find some difficulty in understanding its expressions but in a moment of time it will become very easy for you to work on it.
Applications of Regex:
Regular Expression or regex is used in wide variety of issues. The most common is word processing and string processing where regex is commonly and intensively used. In the above two, there is no need of factual expression. Apart from these, regex is also used in Data Wrangling, Data scraping, data validation, and simple parsing, the system of syntax highlighting system and many other tasks. This method is also used in Google search options.
Advantages of Regex:
Regular Expression is very flexible in nature and to run this application you don’t need to change much of your settings. The second advantage of regular expression is that it is fast in nature and does processing in a very fast speed. The regex is language independent. It means that there is no necessity to write a regular expression in a definite code or the code changes with different languages. The most basic advantage of regex is that it is efficient. You don’t need to write much for executing a task and it can be written in one single line of code. It is often more simpler than ‘substrings+ index’ approach.
Disadvantages of Regular Expression:
In the early phase of regex, it is hard to read and understand the code of regex. A simple code like ‘?’ has three meanings in different context. It is also hard to debug it as not much info is provided if the match is not found. The compilation part is only done at the runtime adding it to another disadvantage.
Some Resources and Tools:
  • Expresso: Desktop Regex Tools
  • The Regex Coach
  • RegExr Desktop
  • Regex Widget
Regular Expression as a tool provides various number of advantages for the user. It is often recommended to use Regex.

Thursday, February 15, 2018

Nunit VS Inbuild TDD

Nunit VS Inbuild TDD

Nunit VS Inbuild TDDUnit testing is a sort of testing done at the designer side. It is utilized to test techniques, properties, classes, and congregations. Unit testing is not testing done by the quality affirmation office. Unit testing is utilized to test a little bit of workable code (operational) called unit. This urges designers to adjust code without quick worries about how such changes may influence the working of different units or the program all in all. Unit testing can be tedious and dull, yet ought to be done completely with persistence.

What is NUnit?

NUnit is a developing, open source framework designed for writing and running tests in Microsoft .NET programming languages. NUnit, as JUnit, is a part of test-driven development (TDD), which is a piece of a bigger programming design paradigm known as the Extreme Programming (in XP).
NUnit options have a GUI like that utilized as a part of JUnit. The tests may be run persistently. Results are given quickly. Multiple tests may be run simultaneously. No subjective human judgments or translations of test outcomes are required. The effortlessness of the framework makes it conceivable to effectively adjust bugs as they are found. The present rendition of NUnit is composed in C#, a protest arranged programming (OOP) language that joins the energy of C++ with the effortlessness of Visual Basic. NUnit is one of a group of related testing frameworks known as xUnit.
  • Unit Testing alludes to what you are testing, TDD to when you are testing.
  • The two are orthogonal.
Unit Testing implies, well, testing singular units of conduct. An individual unit of conduct is the littlest conceivable unit of conduct that can be independently tried in isolation. (I realize that those two definitions are roundabout, however they appear to work out great practically speaking.)
You can compose unit tests before you compose your code, after you compose your code or while you compose your code.

The Difference Between NUnit Testing

TDD implies (once more, sort of self-evident) giving your tests a chance to drive your development (and your design). You can commit that with the unit tests, functional tests and acknowledgment tests. Generally, you utilize every one of the three.
The most essential piece of TDD happens to be the middle D. You let the tests drive you. The tests guide you, what to do next, when you are finished. They disclose to you what the API will be, what the design is. (This is critical: TDD is not tied in with writing tests first. There are a lot of ventures that compose tests first yet don’t rehearse TDD. Writing tests initially is essentially an essential for having the capacity to give the tests a chance to drive the development.)

Wednesday, February 14, 2018

Dependency Injection- Types and points of interests

Dependency Injection- Types and points of interests

The dependency injection designs the most well-known design paradigms today. It is procedure of evacuating dependency of object which makes the independent business objects. It is exceptionally valuable for Test Driven Development.

Background

This tip shows an overview of the dependency injection design, the distinctive sorts of dependency injection, and the points of interest and drawback of DI with c# source code cases.

   Situation of Object Dependency

Object dependency implies one object needs another object to execute   appropriately, in multi-tier application (Business Logic Tier,       Presentation Tier, and Service Tier), the exceptionally normal situation   is; Presentation Tier reliant on the Business Logic and the Business   Logic requires distinctive services in the premise of end user choice. For example for Insurance domain, distinctive services could resemble Adjudication Service, Claim Service, and Payment Service. If we require some property of the Payment service in that case the Client calls the Business object and the Business logic requires the thing of Service objects with the goal that Business object happens to be dependent on the Service object. The Business object is combined with the Service object.
In the above case class Business Logic Implementation dependent on various service objects. These firmly objects, coupled, are all most impossible for a reuse and actualize unit test as a result of the dependencies.

Meaning of DI

The way toward injecting (changing over) coupled objects to the decoupled objects is termed as the Dependency Injection.

Sorts of Dependency Injection

There are four sorts of DI:

  • Setter Injection
  • Constructor Injection
  • Constructor Injection
  • Interface-based injection
  • Service Locator Injection
Constructor is utilized to interface parameter that uncovered through the parameterized temporary worker. It injects the dependencies through a temporary worker strategy as object creation different classes. The accompanying code test illustrates the idea, demonstrating the Business Logic Implementation and Service classes. Class Business Logic Implementation has a constructor with I Service interface as parameter of constructor.

Interface Injection

Interface Injection is like Getter and Setter DI, the Getter and Setter DI utilizes default getter and setter however Interface Injection utilizes support interface a sort of the explicit getter that sets the interface property. The accompanying code test illustrates the idea, I Set Service is a help interface which has strategy set Service Run Service which set the interface property.

Points of interest of DI

  • Increases code reusability
  • Reduces class coupling
  • Improves application testing
  • Improves code maintainability
  • Centralized configuration

Drawback

The principle drawback of dependency injection is that utilizing many occasions together can turn into an extremely troublesome if there are an excessive number of occurrences and numerous dependencies that should be resolved.

Tuesday, February 13, 2018

Web Spidering – What Are Web Crawlers & How to Control Them

Web Spidering – What Are Web Crawlers & How to Control Them

Web Crawler is an automated script or program that is designed in order to browse World Wide Web in a systematic and methodological way. The whole process executed through Web Crawler is known as web Spidering. Web Spidering, also known as Web indexing is a method to index context of websites by searching browsing World Wide Web. The purpose of web crawling is to provide up to date information in search results. Google and other search engines use web crawling in order to provide updated results.

Getting a Deep Insight of Web Spidering:

The basic job of web crawler is to visit different web pages and gather information. The information is later updated into the index entries of the respective search engines. The web crawlers create a copy of the page they have visited and when they return home, they update the pages into the index entries. This is done in order to give latest search results. Apart from search engines, many websites use it in order to be relevant in the search list. Many of the websites use crawlers in order to provide latest and relevant resources to the searcher.

What are Web Crawlers?

Web Crawlers are the ones who read all the pages of the websites they are destined to visit. Their job is to make a copy of the page visited, download the info and then later update it with the index. They are the sole reason for the survival of giant search engines but they have their side effect as well. Web Crawlers also misuse this method spidering by collecting information like email address, address, contact info and other private information and then they use it to spam and do other mischiefs with it.  They can consume lots of bandwidth pushing your website to slowing down and temporary shutdown.

How to Control Them?

Though the popular crawlers add to your advantage but there are many that are for ugly purpose and you should avoid them completely. They can cause inconvenience for visitors by slowing down the server speed, temporary slowdown, spamming your mail, stealing data and many more. Recaptcha from Google is used in order to avoid robotic crawlers and it helps a lot. You can use images while mentioning your contact details so that crawlers can’t access it. These two methods can ensure major control. Apart from these, there are many other methods used to control crawlers.
Web Spidering has both advantages and disadvantages. It is up to you how you deal with it to your advantage by avoiding maximum cons.

Monday, February 12, 2018

Microsoft Block Editor & Sparing scripts

Microsoft Block Editor & Sparing scripts

The Microsoft Block Editor is an intuitive editor for the BBC microbit that gives a basic prologue to programming. Blocks snap together to manufacture programs and are grouped by the kind of capacity they do. At the point when a group is chosen, the orders in the entire group are featured and can be chosen. It’s an incredible prologue to programming for those with next to zero involvement.
  • Select a block class from the rundown on the left hand side of the page.
  • Select a block from the chose class and drag it to the workspace range on the right
  • Snap the new blocks onto the existing blocks in workspace zone. As new blocks are then dragged into workspace, this editor features the interfacing parts of the each of the blocks when they happen to be in a legitimate position to snap the existing blocks.

Sparing scripts

Scripts are consequently saved money on your PC’s hard drive when you are not signed in. You can get to more established scripts when you press the ‘My Scripts’ catch in the upper left corner of the editor.
In case you need to switch PCs or spare the advance of a present content; click on the ‘my scripts’ catch in the upper left corner of the editor:
When you have clicked on the ‘my scripts’ catch, it will take you to a dashboard with alternatives on what to do with the chose content. Alternatives incorporate sparing your content for altering later, sending out the content to another PC (as a .jsz document), cloning the content (for another person to alter), erasing your content and distributing the content to the BBC micro:bit website.

The most effective method to Delete Blocks utilizing Microsoft Block Editor

You can erase blocks in three ways. You need to choose and feature the blocks you need to erase (the edges change shading to yellow when the blocks are chosen):
  1. Press the DELETE catch on your PC.
  2. Select and drag the chose blocks into the “receptacle” formed symbol in the base right hand corner of the editor.
  3. Select the block and right-click on the chose blocks. A drop-down rundown will show up and select the ‘Erase Block’ choice.

Changing a Program Name

A program name will be arbitrarily doled out when the editor is first stacked. To change this; just click or touch the present name of the program at the highest point of the editor. You ought to get a cursor with a light blue encompass content box. You would now be able to sort in the new name for your program. The editor ought to consequently spare your progressions when you are on the web. On the off chance that you don’t have a web association, press the spare symbol to spare your progressions.