Skip to content

Instantly share code, notes, and snippets.

View Abhinay-g's full-sized avatar
🎯
Focusing

Abhinay Abhinay-g

🎯
Focusing
  • ABB
  • India
View GitHub Profile
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):
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()
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() :
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
@Abhinay-g
Abhinay-g / SWIFT
Last active February 5, 2018 07:11
SWIFT
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.
@Abhinay-g
Abhinay-g / MVC Cookies
Last active February 8, 2018 06:27
MVC
*Remember Cookies are for client side, they are stored in browser
*Cookies are just to fill text box ie to redure user effort
*to just display on web page use "QueryString", To display on all pages user "session"
Add below to login page
@Html.CheckBox("RememberMe")Remember Me
Check if True >> then add username and password to cookies
public ActionResult CheckRole(FormCollection frm){
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
*******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
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
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();