This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import _thread | |
def tryit1(): | |
name = input("Enter your name") | |
print("Hi your name is ", name) | |
def tryit2(): | |
for i in range(1, 1000000): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENCAPSULATION : | |
The data needed by an object stays in the object. It cannot be accessed without the object. | |
This is an Object Oriented principle called as ENCAPSULATION. | |
Create Object and List of object: | |
m1=Monkey() | |
m2=Monkey() | |
m3=Monkey() | |
m4=Monkey() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function : ord('A') give ASCII value of 65 | |
ord('a') give ASCII calue of 97 | |
reverse dunction as ord() is chr() | |
chr(65) = 'A' | |
chr(97) = 'a' | |
---------------------------------------------- | |
function map() : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Compare Database | |
Option Explicit | |
Public Sub Extract_XML_to_Excel(strPath As String) | |
On Error GoTo ErrorHandler | |
Dim XDoc As Object | |
Dim lists As MSXML2.IXMLDOMElement, getFirstChild As Object, toFields As Object, fieldNode As Object | |
Dim xmlNode As MSXML2.IXMLDOMNode | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SWIFT application takes input as a excel file. | |
parameter in Excel file : | |
XXX_BIC8, XXX_BIC_BranchName, Counterparty_BIC8, CounterpartyBankName, MessageType, MessageTypeDetail, TrafficSend, TrafficRecieved. | |
Using this data a allication is created: | |
I takes Country, Counterpart_BIC8 and Counterpartybank name as input and generate report for selected month. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query String : | |
while redirecting from controller we can pass Query string as follows: | |
return Redirect("/Customer/CustomerHome?username=" + username); | |
Now to use Query String on respective page use below code | |
<h4>Welcome @Request.QueryString["username"]</h4> | |
** Now if you want that this Username is displayed over all pages using "Session" is a better Idea | |
Use Session variable in controller as follows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*******Validations*********8 | |
All fields are mandatory | |
Email id should follow valid e-mail id format | |
Gender should be either 'M' or 'F' | |
User password can contain maximum of ten characters | |
Date of birth should be a valid date | |
===================================================== | |
To support this we have data annotations | |
Required - to specify a property as mandatory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git --version : to get git version | |
====================================================================== | |
git global config variable : | |
git config --global user.name= "User name" | |
git config --global user.email= "EmailID" | |
::::so here config was a git <Verb> | |
to get help : | |
git <verb> --help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goto startup class | |
contain configure method | |
to see development or production enviroment we go to see enviromet variable | |
right click on project > properties > debug> | |
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
IHostingEnvironment env : env object will have parameter called EnviromentName== "Development" | |
============================================================== | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddMvc(); |
OlderNewer