A graph is a data structure that consists of the following two components:1. A finite set of vertices also called as nodes. 2: A finite set of order pair from (u,v) called as edge. The following two are the most commonly used representations of a graph.1. Adjacency Matrix ( N *N matrix where N is number of …
Author Archives: codeblogforfun
A sample Kafka consumer and producer On windows
https://github.com/Mani0811/KafkaConsumerProducer working code with clear explanation . To install and rum zookeeper and Kafka server , follow following Link Kafka Tutorial
Installing MongoDb and Running on Windows
1: Chcek if Mongo Db is installed Or Not ? C:\Users\mani.shankar>”c:\Program Files\MongoDB\Server\4.0\bin\mongo.exe”MongoDB shell version v4.0.2connecting to: mongodb://127.0.0.1:27017 2: Installing Mongo db follow below Link : https://docs.mongodb.com/v3.2/tutorial/install-mongodb-on-windows/ 3:Go to the locataion C:\Windows\System32\cmd.exe Start mongod.exe C:\Program Files\MongoDB\Server\4.0\bin\mongod.exe 4: connect any MongoDB Tool
Handy Shell Command for Windows
1: Find the process on specfic port netstat –ano |findstr “27000″ Find the process whose status is LISTENING, and the 2700 is the PID of the process. Please note that different environment may have different result. 2:Find the process’s name tasklist |findstr “2700” Here the result is mongod.exe, and this is in my test environment, …
Double Link List
The limitations of singly linked lists The singly linked list (SLL) is a linear data structure comprising of nodes chained together in a single direction. Each node contains a data member holding useful information, and a pointer to the next node. The problem with this structure is that it only allows us to traverse forward, i.e., we cannot iterate back …
word Break
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. Note: The same word in the dictionary may be reused multiple times in the segmentation. You may assume the dictionary does not contain duplicate words. Example 1: Input: s = “leetcode”, wordDict = [“leet”, …
Kafka Tutorial
Start with kafka 1:Kafka Basic Kafka is a high-throughput distributed messaging system. It is designed to allow a single cluster to serve as the central data backbone for a large organization. It can be elastically and transparently expanded without downtime. ZooKeeperZooKeeper is a centralized service for managing distributed processes and is a mandatory component in …
Setting up a GitHub repository
1:Create a git repo on github 2: Initialize git repository with below code. You’ve now got a local git repository. You can use git locally, like that, if you want. But if you want the thing to have a home on github, do the following. Go to github. Log in to your account. Click the new repository button …
Creating parameterised tests in xUnit with [InlineData], [ClassData], and [MemberData]
In this post I provide an introduction to creating parmeterised tests using xUnit’s [Theory] tests, and how you can pass data into your test methods. I’ll cover the common [InlineData] attribute, and also the [ClassData] and [MemberData] attributes. In the next post, I’ll show how to load data in other ways by creating your own [DataAttribute]. If you’re new to testing with xUnit, I …
Getting Started with xUnit .net Core , Visual Studio
Describing the difference between facts and theories, we like to say: Theories are tests which are only true for a particular set of data. Facts are tests which are always true. They test invariant conditions. A good example of this testing numeric algorithms. Let’s say you want to test an algorithm which determines whether a number is …
Continue reading “Getting Started with xUnit .net Core , Visual Studio”