“UpstreamHttpMethod”: [ “Get” ],
“UpstreamHttpMethod”: [ “Get” ],
“UpstreamHttpMethod”: [ “Get” ],
If you are a programmer working in any technology that required a web server then you must have come across this scenario where you get an error “Port 80 is in use by other process”.
The firs step you do is to find out which process are using port 80 and our good old netstat command comes into picture which is kinda cool but doesn’t always show you which process is responsible
You can save lot of time by executing command “net Stop Http”.
This will stop all Http operations using port 80 as well as show you list of services using port 80 which you can disable if not needed.
Hope this helps
Search for online documentation and whitepapers .
Most technology providers publishes documentation and whitepapers which contain everything related to new/existing features in technology.
Follow relevant people on social media platforms:
Requires a bit of research. Search for blogs and groups on twitter, Facebook, linked in and try to connect/follow people to get first hand new regarding technology.
E-Learning Platforms :
You should invest in yourself. Subscribe to e-leaning platforms where you get first-hand video tutorials to jump-start your learning. There are many e-learning platforms which provide you trial subscriptions and offers from time to time. Some of these are:
Microsoft Virtual Academy
Next Step :
All above can give you good knowledge about subject but most of time they lack in practical scenarios and problems you might face and off-course you need to build up your social media profile to show-case your skills as most companies now a days look for social media presence to judge your skills.
Subscribe to Forums:
I believe in reaching out to problems rather than problems reaching out to me and you can find real world problems on online forums. Based on topic of interest you can subscribe to relevant forums and try reading about problems people are facing, as well as try to provide answers. Initially you might need to google about issues to gain knowledge but with time you will be ready with your own answers.
Create GitHub Account:
With time you will start gaining knowledge and start creating customized solutions to help other people in forums. Compile all your code into a GitHub repository but make sure all code is of high quality as you might be judged by a recruiter or future employer based on quality of code you are sharing on GitHub.
Start a forum:
Learning is sharing. Don’t keep knowledge to yourself. Start a blog and share information with others , build a following and who know you might un-earth an author in yourself and with time create a parallel career in training, consulting or freelancing.
If python command is not working in visual studio code’s terminal window. You can follow below steps to setup PATH variable
Set up Path variable only for this visual studio code session. Run below command in visual studio code terminal where “C:\Program Files\Python36” is python install directory. You can choose a different one based on python version installed .
$env:path=“$env:Path; C:\Program Files\Python36″
From past few years I have been keeping a close watch on ECMA scripts and seems C# is running neck to neck in importing features of ES-6
I have explained about Tuples in older Blog article here
C# 7.1 introduces a small feature enhancement to Tuple de-structuring.
To run below sample you need to install System.ValueTuple Nuget package
default value expression provides a default value for a type and are very handy in generator functions and generic classes/methods.
This is how we can use default keyword till C# 7.0 i.e. as default(T) where T can be value type or reference type
“Main” is a special method while defining assemblies. It’s an entry point of an executable application. Main runs in static context by is called by operating system to load the program into memory. Main does so by defining a startup object or logic.
In my past blog series, I have tried to explain all new features that shipped with C# 7.0. You can read about that here.
With Visual Studio Update 3 and version 15.3, C# 7.1 has been made available as well. This feature is not available by default and there are many ways you can turn this feature on. I will be writing a blog series on new features of C# 7.1 but before that lets understand how to set up support for 7.1 in visual studio.
There are 3 ways this feature can be enabled:
Way 1 – Changing Project Setting to target latest C# language
C# developers have always used throw statement to throw unhandled exceptions to caller. A reactive programming approach involved validating the variable values and if it doesn’t fall within a valid range or is null throw exception as demonstrated in below example
Pattern matching is a feature that allows you to implement method dispatch on properties other than the type of an object. Pattern matching is very useful when we want to create branching logic based on arbitrary types and values of the members of those types.
Object dispatch is a very common feature of object oriented programming wherein we identify objects based on their type and call appropriate method. Based on resolved type the method gets dispatched on appropriate type i.e. child or base. This feature is automatically implemented if we use concept of object oriented programming like Hiding and Overriding.
Problem occurs when there are multiple classes that our code uses and the classes are not related to each other. In that case the branching logic requires below steps to correctly dispatch method call to object:
Example in C# 6.0:
Many a times we would like to return more than one values from a method call. C# provided lot of features to support this functionality. Some of them are:
C# 4.0 introduced a type Tuple<…> using which you can return more than one value from a function without creating a new type. Tuple behaves like a dictionary with each returned item accessible as Item1, Item2 and so on. This is very verbose and require a Tuple object to be created.
Example using C# 4.0
Local functions are another very handy feature to be introduced into language if you are into code refactoring. Many a times developers create a very large method and while code review we see lot of places same logic has been repeated and thus think about refactoring it. Problem is that if the logic is required only at multiple places within same method than it’s not a good idea to make it into a separate named method.
Let’s take an example in C# 6 and then we will try to refactor that using various ways and finally with local functions feature in C# 7.0
Here is a simple code that works on array of numbers and calculates sum and subtraction of each number in array
Expression bodied members were introduced in C# 6.0. You can read more about those here
C# 7.0 introduced more stuff like accessors, finalizer’s and constructors as expression bodied members
Expression Bodied Syntax for constructors
Expression Bodied Syntax for Finalizers
Important points regarding ref in C#
We need to find if a number i.e. 4 exist in an array and if exist we would like to change its value to 111
Example using C# 6.0
Consider below extension method which returns index of a number if it’s found in array
C# 7.0 introduces Number literals as well as Binary Literals
These are completely new features that adds syntactic sugar to C# while dealing with number and binary data.
You can now declare numeric variables as below while adding (Underscore) _ as a separator for readability. This is handy while dealing with large numbers
One important thing to understand about these separator literals is that these are ignored by compiler while evaluating the value and are just meant to provide readability.
out/ref keyword has been used to return more than one values from a function.
ref keywords need to be defined before you can pass them as a parameter to function but on the other hand out variables need not be initialized before they can be passed as a parameter to a function.
In case of ref, the called method is not bound to assign any value to the ref parameter since it has already been initialized by calling method but in case of out, the called method has the responsibility of assigning value of out parameter failing which results in a compile time error.
Problem with the out keyword in past was that we need to declare out Parameter before it can be passed as argument
Before C# 7.0
Usage of out parameter
You can find serial number of your built in hard drive by running below command from command prompt
wmic diskdrive get serialnumber