This file contains 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
var name='lanka' |
This file contains 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
const express=require('express'); | |
const app= express(); | |
app.get('/',(req,res)=>{ | |
res.send('<h1>Welcome to Express</h1>')}); | |
const PORT=process.env.PORT||5000; | |
app.listen(PORT,()=>console.log(`server Started on port ${PORT}`)); |
This file contains 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
GET /chat HTTP/1.1 | |
Host: example.com:8000 | |
Origin:client.chat.com | |
Upgrade: websocket | |
Connection: Upgrade | |
Sec-WebSocket-Key: DSFEW%$#^%%*DGHBD | |
Sec-WebSocket-Protocol: | |
Sec-WebSocket-Version: 13 | |
Sec-WebSocket-Extensions:deflate-stream |
This file contains 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
HTTP/1.1 101 Switching Protocols | |
Upgrade: websocket | |
Connection: Upgrade | |
Sec-WebSocket-Accept: DSFEW%$#^%%*DGHBD | |
Sec-WebSocket-Protocol: | |
Sec-WebSocket-Extensions:deflate-stream |
This file contains 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
using System.Collections; | |
var myArrayList = new ArrayList(); |
This file contains 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
// Add elements using .Add() Method | |
var myArrayList = new ArrayList(); | |
myArrayList.Add(123); | |
myArrayList.Add("Freelancingcult.com"); | |
myArrayList.Add(5.963); | |
// adding elements using object initializer syntax method | |
var myAraylist2 = new ArrayList() | |
{ | |
"Culure", 452, " ", true, 4.5, null |
This file contains 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
ArrayList arlist = new ArrayList() | |
{ | |
1, | |
"Bill", | |
300, | |
4.5F | |
}; | |
foreach (var item in arlist) | |
Console.Write(item + ", "); //output: 1, Bill, 300, 4.5, |
This file contains 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
ArrayList arlist1 = new ArrayList() | |
{ | |
100, 200, 600 | |
}; | |
ArrayList arlist2 = new ArrayList() | |
{ | |
300, 400, 500 | |
}; | |
arlist1.InsertRange(2, arlist2); |
This file contains 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
ArrayList arList = new ArrayList() | |
{ | |
1, | |
null, | |
"Bill", | |
300, | |
" ", | |
4.5f, | |
300, | |
}; |
This file contains 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
ArrayList arList = new ArrayList() | |
{ | |
1, | |
"Bill", | |
300, | |
4.5f, | |
300 | |
}; | |
Console.WriteLine(arList.Contains(300)); // true |
OlderNewer