Snippets Collections
// Webpack 5

const nodeExternals = require('webpack-node-externals');
...
module.exports = {
    ...
    externalsPresets: { node: true }, // in order to ignore built-in modules like path, fs, etc.
    externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
    ...
};
const nodeExternals = require('webpack-node-externals');
...
module.exports = {
    ...
    target: 'node', // in order to ignore built-in modules like path, fs, etc.
    externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
    ...
};
npm install webpack-node-externals --save-dev
config: {
  ...
  installDevTools: {
    extensions: [
      'REACT_DEVELOPER_TOOLS',
      'REDUX_DEVTOOLS'
    ],
    forceDownload: false
  }
}
plugins: [
  "hyper-manager",
  // other plugins...
],
hyper install hyper-manager
module.exports = {
  config: { /*... */ },

  keymaps: {
    'window:devtools': 'cmd+alt+o'
  }

};
useCopilotAction({
   name: "sortHouseListings",
   description: "Sort the displayed house listings",
   parameters: [
     {
       name: "columnId",
       type: "string",
       description: "The ID of the column to sort on",
      },
    ],
    handler: async ({columnId, sortDirection}) => {
      sortColumn(columnId, sortDirection);
    },
  });

            // Stored Procedures
            builder.HasAnnotation("SqlServer:IncludeProcedures", new
            {
                UpdateUserDeletionSettings = @"
                    CREATE PROCEDURE UpdateUserDeletionSettings
                        @DeletionTimeValue INT,
                        @DeletionTimeUnit NVARCHAR(20)
                    AS
                    BEGIN
                        SET NOCOUNT ON;
                        DECLARE @DeletionThreshold DATETIME;
                        SET @DeletionThreshold = CASE
                            WHEN @DeletionTimeUnit = 'Minutes' THEN DATEADD(MINUTE, -@DeletionTimeValue, GETUTCDATE())
                            WHEN @DeletionTimeUnit = 'Hours' THEN DATEADD(HOUR, -@DeletionTimeValue, GETUTCDATE())
                            WHEN @DeletionTimeUnit = 'Days' THEN DATEADD(DAY, -@DeletionTimeValue, GETUTCDATE())
                            WHEN @DeletionTimeUnit = 'Weeks' THEN DATEADD(WEEK, -@DeletionTimeValue, GETUTCDATE())
                            WHEN @DeletionTimeUnit = 'Months' THEN DATEADD(MONTH, -@DeletionTimeValue, GETUTCDATE())
                            WHEN @DeletionTimeUnit = 'Years' THEN DATEADD(YEAR, -@DeletionTimeValue, GETUTCDATE())
                            ELSE GETUTCDATE()
                        END;

                        DELETE FROM dbo.AspNetUsers
                        WHERE User_Status_ID = 2 AND DeactivatedAt < @DeletionThreshold;
                    END",
                UpdateOrderStatuses = @"
                    CREATE PROCEDURE UpdateOrderStatuses
                        @OverdueTimeValue INT,
                        @OverdueTimeUnit NVARCHAR(20)
                    AS
                    BEGIN
                        SET NOCOUNT ON;
                        DECLARE @OverdueThreshold DATETIME;
                        SET @OverdueThreshold = CASE
                            WHEN @OverdueTimeUnit = 'Minutes' THEN DATEADD(MINUTE, -@OverdueTimeValue, GETUTCDATE())
                            WHEN @OverdueTimeUnit = 'Hours' THEN DATEADD(HOUR, -@OverdueTimeValue, GETUTCDATE())
                            WHEN @OverdueTimeUnit = 'Days' THEN DATEADD(DAY, -@OverdueTimeValue, GETUTCDATE())
                            WHEN @OverdueTimeUnit = 'Weeks' THEN DATEADD(WEEK, -@OverdueTimeValue, GETUTCDATE())
                            WHEN @OverdueTimeUnit = 'Months' THEN DATEADD(MONTH, -@OverdueTimeValue, GETUTCDATE())
                            WHEN @OverdueTimeUnit = 'Years' THEN DATEADD(YEAR, -@OverdueTimeValue, GETUTCDATE())
                            ELSE GETUTCDATE()
                        END;

                        UPDATE dbo.Orders
                        SET Order_Status_ID = CASE
                            WHEN Order_Date <= @OverdueThreshold THEN 2
                            ELSE Order_Status_ID
                        END
                        WHERE IsCollected = 0;
                    END",
                GetQualifyingMembers = @"
                    CREATE PROCEDURE GetQualifyingMembers
                        @RewardCriteria NVARCHAR(50)
                    AS
                    BEGIN
                        SET NOCOUNT ON;
                        IF @RewardCriteria = 'Placed a Booking'
                        BEGIN
                            SELECT DISTINCT m.Member_ID
                            FROM Members m
                            INNER JOIN Bookings b ON b.Member_ID = m.Member_ID;
                        END
                        ELSE IF @RewardCriteria = 'Completed 10 Bookings in a Month'
                        BEGIN
                            SELECT m.Member_ID
                            FROM Members m
                            INNER JOIN Bookings b ON b.Member_ID = m.Member_ID
                            INNER JOIN Booking_Time_Slots bts ON b.Booking_ID = bts.Booking_ID
                            INNER JOIN Time_Slots ts ON bts.Time_Slot_ID = ts.Time_Slot_ID
                            WHERE ts.Slot_Date >= DATEADD(MONTH, -1, GETDATE())
                            GROUP BY m.Member_ID
                            HAVING COUNT(DISTINCT b.Booking_ID) >= 10;
                        END
                        ELSE IF @RewardCriteria = 'Made 20 Bookings in Last 3 Months'
                        BEGIN
                            SELECT m.Member_ID
                            FROM Members m
                            INNER JOIN Bookings b ON b.Member_ID = m.Member_ID
                            INNER JOIN Booking_Time_Slots bts ON b.Booking_ID = bts.Booking_ID
                            INNER JOIN Time_Slots ts ON bts.Time_Slot_ID = ts.Time_Slot_ID
                            WHERE ts.Slot_Date >= DATEADD(MONTH, -3, GETDATE())
                            GROUP BY m.Member_ID
                            HAVING COUNT(DISTINCT b.Booking_ID) >= 20;
                        END
                        ELSE IF @RewardCriteria = 'Placed First Order'
                        BEGIN
                            SELECT m.Member_ID
                            FROM Members m
                            WHERE EXISTS (
                                SELECT 1 
                                FROM Orders o 
                                WHERE o.Member_ID = m.Member_ID
                                AND o.Order_Date = (
                                    SELECT MIN(o2.Order_Date)
                                    FROM Orders o2
                                    WHERE o2.Member_ID = m.Member_ID
                                )
                            );
                        END
                        ELSE IF @RewardCriteria = 'Made a Payment'
                        BEGIN
                            SELECT DISTINCT m.Member_ID
                            FROM Members m
                            INNER JOIN Orders o ON o.Member_ID = m.Member_ID
                            INNER JOIN Payments p ON p.Order_ID = o.Order_ID;
                        END
                        ELSE IF @RewardCriteria = 'High-Value Order'
                        BEGIN
                            SELECT DISTINCT m.Member_ID
                            FROM Members m
                            INNER JOIN Orders o ON o.Member_ID = m.Member_ID
                            WHERE o.Total_Price >= 1000;
                        END
                        ELSE IF @RewardCriteria = 'Large Quantity Order'
                        BEGIN
                            SELECT m.Member_ID
                            FROM Members m
                            WHERE (
                                SELECT SUM(ol.Quantity)
                                FROM Order_Lines ol
                                INNER JOIN Orders o ON ol.Order_ID = o.Order_ID
                                WHERE o.Member_ID = m.Member_ID
                            ) >= 10;
                        END
                        ELSE
                        BEGIN
                            SELECT * FROM Members WHERE 1 = 0;
                        END
                    END"
            });
add_filter( 'sptp_modal_load_by_rest_api', '__return_false' );
Configure a new remote `try-gitless`
$ gl remote -c try-gitless
https://github.com/gitless-vcs/try-gitless
✔ Remote try-gitless mapping to
https://github.com/gitless-vcs/try-gitless
created successfully
  ➜ to list existing remotes do gl remote
  ➜ to remove try-gitless do gl remote -d try-gitless

Download and apply changes from a branch in
`try-gitless`
$ gl fuse try-gitless/master
...
✔ Fuse succeeded
If you instead want to merge the changes, you
can do `gl merge try-gitless/master`

You can also set an upstream for the current branch
$ gl branch -su try-gitless/master
✔ Current branch master set to track
try-gitless/master
$ gl fuse
! No src branch specified, getting changes from
upstream branch try-gitless/master
...
✔ Fuse succeeded

Send changes to the remote
$ gl publish
! No src branch specified, sending changes to
upstream branch try-gitless/master
✔ Publish succeeded
Only the changes in the current branch are uploaded
$ gl fuse develop
...
✘  There are conflicts you need to resolve
$ gl status
On branch master, repo-directory //

You are in the middle of a fuse; all
conflicts must be resolved before
committing
...
Tracked files with modifications:
...
  foo (with conflicts)
...









Switch to `bugfix`
$ gl switch bugfix
✔ Switched to branch bugfix
No conflicts here















Switch back to `develop`
$ gl switch develop
✔ Switched to branch develop
$ gl status
On branch master, repo-directory //

You are in the middle of a fuse; all
conflicts must be resolved before
committing
...
Tracked files with modifications:
...
  foo (with conflicts)
...
Say we have uncommitted changes to `foo` that
conflict with the state of `foo` in branch `develop`

Switch to `develop`
$ gl switch develop
✔ Switched to branch develop

$ gl status
...
Tracked files with modifications:
...
  foo
...

Create new branch `develop`
$ gl branch -c develop
✔ Created new branch develop

Switch to `develop`
$ gl switch develop
✔ Switched to branch develop
$ gl status
... no changes to foo here




Switch back to `master`
$ gl switch master
✔ Switched to branch master
$ gl status
...
Tracked files with modifications:
...
  foo
...
If you want the uncommitted changes to follow you
into the new branch you can use the mo/move-over
flag to move over the changes in the current branch
to the destination branch
$ gl status
...
Tracked files with modifications:
...
  foo
...

Stop tracking changes to `foo`
$ gl untrack foo
✔ File foo is now an untracked file
Now `foo` won't be automatically considered for
commit
$ gl status
...
Untracked files:
...
  foo (exists at head)
...

Start tracking changes to `foo` again
$ gl track foo
✔ File foo is now a tracked file
Now `foo` will be automatically considered for commit
$ gl status
...
Tracked files with modifications:
...
  foo
...
Commit all modified tracked files
$ gl commit
The default set of files to be committed are all
modified tracked files

Leave some modified tracked files (`foo`, `bar`)
out of the commit
$ gl commit -e foo bar
e/exclude excludes files from the default set
of files to be committed

Include some untracked files in the commit
$ gl commit -i foo2 bar2
i/include includes files to the default set
of files to be committed

Commit only some of the modified tracked files
$ gl commit foo3 bar3
listing files restricts the set of files to be committed
to only the specified ones

Commit only some of the modified tracked or
untracked files
$ gl commit foo3 bar3 foo4

$ gl tag -c v1.0
✔ Created new tag v1.0
$ gl tag
List of tags:
  ➜ do gl tag <t> to create tag t
  ➜ do gl tag -d <t> to delete tag t

    v1.0 ➜  tags 311bf7c Ready to release
$ gl remote -c try-gitless https://github.com/gitless-vcs/try-gitless
✔ Remote try-gitless mapping to https://github.com/gitless-vcs/try-gitless created
successfully
  ➜ to list existing remotes do gl remote
  ➜ to remove try-gitless do gl remote -d try-gitless
$ gl branch -c develop
✔ Created new branch develop
$ gl switch develop
✔ Switched to branch develop
$ gl branch
List of branches:
  ➜ do gl branch <b> to create branch b
  ➜ do gl branch -d <b> to delete branch b
  ➜ do gl switch <b> to switch to branch b
  ➜ * = current branch

    * master
      develop
$ gl commit -m "foo and bar"
$ gl commit -m "only foo" foo.py
$ gl commit -m "only foo and baz" foo.py baz.py
$ gl commit -m "only foo" -e bar.py
$ gl commit -m "only foo and baz" -e bar.py -i baz.py
$ gl commit -m "foo, bar and baz" -i baz.py
$ ls
bar.py  baz.py  foo.py  foo.pyc .gitignore
$ gl status
On branch master, repo-directory //

Tracked files with modifications:
  ➜ these will be automatically considered for commit
  ➜ use gl untrack <f> if you don't want to track changes to file f
  ➜ if file f was committed before, use gl checkout <f> to discard local changes

    foo.py
    bar.py

Untracked files:
  ➜ these won't be considered for commit)
  ➜ use gl track <f> if you want to track changes to file f

    baz.py
$ mkdir try-gitless
$ cd try-gitless/
$ gl init https://github.com/gitless-vcs/try-gitless
✔ Local repo created in /MyFiles/try-gitless
✔ Initialized from remote https://github.com/gitless-vcs/try-gitless
$ mkdir foo
$ cd foo/
$ gl init
✔ Local repo created in /MyFiles/foo
$ git branch --merged --list
fatal: malformed object name --list
$ git branch --list --merged
* develop
  feature/latest
user@host:~/project g branches
  2 days ago    c1632be  master -> origin/master
* 11 days ago   1e8eab0  develop -> origin/develop  (merged)
  5 months ago  d58b929  feature/historical -> ?    (merged)
  5 months ago  3b22622  save -> ?
  2 days ago    c1632be  origin/HEAD
  2 days ago    c1632be  origin/master
  11 days ago   1e8eab0  origin/develop
  11 days ago   1e8eab0  origin/will
  4 weeks ago   f58098a  origin/paul
#Step-5: Calculate Accuracy,  Precision ,Recall, and F1 Score

#Calculate accuracy
accuracy=accuracy_score(y_test, y_pred)
print("Accuracy :",accuracy)

#Calculate precision
precision= precision_score(y_test, y_pred)
print("Precision :",precision)

#Calculate recall
recall= recall_score(y_test, y_pred)
print("Recall :",recall)

#calculate the f1 score
f1= f1_score(y_test, y_pred)
print("F1 Score :",f1)
                      
Fig. 1
From: Investigating the effectiveness of peer code review in distributed software development based on objective and subjective data


Overview of the Code Review Process

Back to article page
#include <bits/stdc++.h>  // Thư viện tiêu chuẩn cho C++ (bao gồm tất cả các thư viện phổ biến)
using namespace std;

void primMST(int V, vector<vector<pair<int, int>>>& adj) {  // Hàm tìm MST với V đỉnh và danh sách kề 'adj'
    vector<int> key(V, INT_MAX), parent(V, -1);  // 'key' lưu trọng số nhỏ nhất để kết nối, 'parent' lưu đỉnh cha
    vector<bool> inMST(V, false);  // Đánh dấu đỉnh nào đã được thêm vào MST
    priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;  // Min-heap lưu (trọng số, đỉnh)

    key[0] = 0;  // Khởi tạo đỉnh đầu tiên với trọng số 0 (bắt đầu từ đỉnh 0)
    pq.push({0, 0});  // Đẩy đỉnh 0 vào hàng đợi ưu tiên với trọng số 0

    while (!pq.empty()) {  // Vòng lặp chính: Chạy cho đến khi hàng đợi rỗng
        int u = pq.top().second;  // Lấy đỉnh 'u' có trọng số nhỏ nhất từ hàng đợi
        pq.pop();  // Loại bỏ đỉnh 'u' khỏi hàng đợi
        inMST[u] = true;  // Đánh dấu 'u' đã được thêm vào MST

        // Duyệt qua tất cả các đỉnh kề 'v' của 'u' với trọng số 'weight'
        for (auto& [v, weight] : adj[u]) {  
            // Nếu 'v' chưa thuộc MST và 'weight' nhỏ hơn trọng số hiện tại 'key[v]'
            if (!inMST[v] && weight < key[v]) {  
                key[v] = weight;  // Cập nhật 'key[v]' với trọng số mới
                pq.push({key[v], v});  // Đẩy (trọng số mới, đỉnh 'v') vào hàng đợi ưu tiên
                parent[v] = u;  // Cập nhật đỉnh cha 'u' của 'v'
            }
        }
    }

    // In ra các cạnh của cây khung nhỏ nhất (MST)
    for (int i = 1; i < V; i++)  // Duyệt qua các đỉnh từ 1 đến V-1
        cout << parent[i] << " - " << i << " (" << key[i] << ")\n";  // In cạnh (parent[i] - i) và trọng số (key[i])
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":star: What's on in Melbourne this week! :star:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n Hey Melbourne, happy Monday! Please see below for what's on this week. "
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Xero Café :coffee:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n :new-thing: *This week we are offering:* \n\n We have Muesli & Apple Yoghurt Cookies, Triple Chocolate Fudge Cookes (GF), and Hedgehog Slice!\n\n *Weekly Café Special*: _Vanilla Chai Latte_"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": " Wednesday, 4th September :calendar-date-4:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n:late-cake: *Afternoon Tea*: From *2pm* in the *L1, L2 and L3* kitchens! \n\n:massage:*Wellbeing - Yoga Flow*: Confirm your spot <https://docs.google.com/spreadsheets/d/1iKMQtSaawEdJluOmhdi_r_dAifeIg0JGCu7ZSPuwRbo/edit?gid=0#gid=0/|*here*>. Please note we have a maximum of 15 participants per class, a minimum notice period of 2 hours is required if you can no longer attend."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Thursday, 5th September :calendar-date-5:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":breakfast: *Breakfast*: Provided by *Kartel Catering* from *8:30am* in the Wominjeka Breakout Space.\n\n"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*Later this month:* We have our Grand Final Eve-Eve BBQ Social on the 26th of September! Make sure to wear your team colours (can be NRL or AFL) and come along for some fun! \n\nStay tuned to this channel for more details, and make sure you're subscribed to the <https://calendar.google.com/calendar/u/0?cid=Y19xczkyMjk5ZGlsODJzMjA4aGt1b3RnM2t1MEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t|*Melbourne Social Calendar*> :party-wx:"
			}
		}
	]
}
<link rel="stylesheet" href="2bit-ui.css" />
https://dharmwsh03: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@github.com/tappect/yt-auto-responder-chrome-ext.git



git clone https://divsbhalala@github.com/jonesmatr/Agecroft-Capital-Backend.git
git clone https://divsbhalala@github.com/jonesmatr/Agecroft-Capital.git
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
// Footer
.ari-section.footer{
  	@media (max-width: 991px){
    	padding: 0;
  	}
  	.ari-layout.internal &, .ari-layout.contact-pg &{
    	margin-top: 50px;
  	}
}
.footer{
    &-top{
        font-size: _res-m(36);
        text-align: center;
        @include screen-sm-min{
            font-size: _res(16);
            text-align: left;
            padding: _res(88) 0;
            @include _flex($halign: space-between, $valign: flex-start);
            &::before, &::after{ display: none; }
        }
        @include section-padding;
        a{
            color: #fff;
            transition: all .3s ease-in-out;
            &:hover{
                color: $brand-primary;
                text-decoration: none;
            }
        }
        >div{
            @include screen-xs{
                padding: _res-m(130) 0;
                &:not(:last-child){
                    border-bottom: 2px solid #9B9DA0;
                }
            }
            @include screen-sm-min{
                width: auto;
            }
        }
    }
    &-title{
        @include screen-sm-min{}
    }
    &-logo{
        width: _res-m(382);
        margin: 0 auto;
        @include screen-sm-min{
            width: _res(254);
        }
        img{ width: 100%; }
    }
    &-phone{
        @include screen-sm-min{}
    }
    &-address{
        @include screen-sm-min{}
    }
    &-phone, &-address{
        @include screen-sm-min{}
    }
    &-quick-links{
        ul{
            margin: 0;
            padding: 0;
            list-style: none;
            li{
                padding-bottom: _res-m(20);
                @include screen-sm-min{
                    padding-bottom: _res(20);
                }
            }
        }
    }
    &-smedia{
        .social-media{
            .fa-circle{ display: none; }
            .fa-stack{
                width: 1em; height: 1em;
                line-height: 1em;
                font-size: _res-m(50);
                @include screen-sm-min{
                    font-size: _res(30);
                }
            }
            @include screen-sm-min{
                &:hover{}
            }
        }
    }
    &-hours{
        .hours{
            display: inline-block;
            text-align: left;
            >div{
                padding-bottom: _res-m(20);
                @include screen-sm-min{
                    padding-bottom: _res(10);
                }
            }
        }
        .day{
            display: inline-block;
            width: _res-m(300);
            @include screen-sm-min{
                width: _res(90,168);
            }
        }
    }
    &-map{
        iframe{
            width: _res-m(923);
            height: _res-m(609);
            @include screen-sm-min{
                width: _res(180,250);
                height: _res(110,165);
            }
        }
        .map{ display: flex; }
    }
    &-cta{
        display: inline-block;
        .btn-cta{
            font-size: _res-m(36);
            @include screen-sm-min{
                font-size: _res(16);
            }
        }
    }
    &-bottom{
        background: #000;
        border-top: _res-m(5,10) solid $brand-primary;
        padding: _res-m(15,30) 0;
        @include screen-sm-min{
            padding: 15px 0;
            border-top-width: _res(2,5);
            .bottom-row{
                display: flex;
                align-items: center;
                justify-content: space-between;
            }
        }
        @include section-padding;
        a, a:hover{ color: #fff; }
        .footer-nav{
            ul{
                margin: 0;
                padding: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                li{
                    list-style: none;
                    a{
                        font-size: _res-m(10,25);
                        display: inline-block;
                        padding: 0 10px;
                        line-height: 1;
                        border-right: 1px solid #fff;
                        @include screen-sm-min{
                            font-size: _res(11,14);
                        }
                    }
                    &:first-child a{
                        padding-left: 0;
                    }
                    &:last-child a{
                        padding-right: 0;
                        border-right: none;
                    }
                }
            }
        }
        .footer-copyright{
            text-align: center;
            padding: _res-m(8,15) 0;
            font-size: _res-m(10,25);
            @include screen-sm-min{
                padding: 0;
                font-size: _res(11,14);
            }
            small{ font-size: 100%; }
        }
        .footer-ds-logo{
            text-align: center;
            img{
                width: _res-m(174,284);
                @include screen-sm-min{
                  width: _res(150,284);
                }
            }
        }
    }
}
package com.example.objectdemo

import kotlin.js.ExperimentalJsExport

class Employee(var name:String,var position:String="Clerk",var dept:String="Sales",var Experience:Int=1)
{

    fun display(){
        println("Employee Details \nName:$name\nPosition:$position\nDepartment:$dept\nExperience:$Experience")
    }
    fun promote(place:String)
    {
        this.position=place
    }
    fun transfer(place:String)
    {
        this.dept=place
    }
    fun increament(inc:Int)
    {
        this.Experience+=inc
    }
}
fun main(){
    val b1=Employee("Karan","Junior Developer","sales")
    b1.display()
    b1.promote("Senior Developer")
    b1.display()
    val b2=Employee("Raju","Manager",)
    b2.display()
    b2.transfer("Marketing")
    b2.display()
    val b3=Employee("Tani", position = "Marketing", Experience = 2)
    b3.display()
    b3.increament(3)
    b3.display()
    val b4=Employee("Ashok", position = "Manager", dept = "HR")
    b4.display()
    b4.promote("Senior Manager")
    b3.display()
    val b5=Employee("Balu", position = "Analyst", dept = "Finance")
    b3.display()
    b3.transfer("Sales")
    b3.display()
    val b6=Employee("Charan", position = "Developer", Experience = 2)
    b3.display()
    b3.increament(3)
    b3.display()
}
package com.example.objectdemo

import kotlin.js.ExperimentalJsExport

class Employee(var name:String,var position:String="Clerk",var dept:String="Sales",var Experience:Int=1)
{

    fun display(){
        println("Employee Details \nName:$name\nPosition:$position\nDepartment:$dept\nExperience:$Experience")
    }
    fun promote(place:String)
    {
        this.position=place
    }
    fun transfer(place:String)
    {
        this.dept=place
    }
    fun increament(inc:Int)
    {
        this.Experience+=inc
    }
}
fun main(){
    val b1=Employee("Karan","Junior Developer","sales")
    b1.display()
    b1.promote("Senior Developer")
    b1.display()
    val b2=Employee("Raju","Manager",)
    b2.display()
    b2.transfer("Marketing")
    b2.display()
    val b3=Employee("Tani", position = "Marketing", Experience = 2)
    b3.display()
    b3.increament(3)
    b3.display()
    val b4=Employee("Ashok", position = "Manager", dept = "HR")
    b4.display()
    b4.promote("Senior Manager")
    b3.display()
    val b5=Employee("Balu", position = "Analyst", dept = "Finance")
    b3.display()
    b3.transfer("Sales")
    b3.display()
    val b6=Employee("Charan", position = "Developer", Experience = 2)
    b3.display()
    b3.increament(3)
    b3.display()
}
1. Create a 'Book' class with the following specifications:

 Properties:  title,Author,Published_year

Methods:
  displayInfo : to print Book details.

//Program
package com.example.objectoriented

class Book(val title:String, val author:String, val published_year:Int){
    fun display(){
        println("Title: $title\nAuthor: $author\nPublished Year: $published_year")
        println()
    }
}

fun main(){
    val b1 = Book("Computer Networking", "John", 2020)
    val b2 = Book("Algorithms Design And Analysis", "James", 2019)

    println("Book Details")
    println()
    b1.display()
    b2.display()
}



2. Simple class with a Primary Constructor

//Program

package com.example.objectoriented

class Emp(val ename:String, val id:Int, val age:Int){

    init {
        if(age<0){
            println("Age cannot be negative")
        }
        else{
            println("Object is created")
        }
    }
    fun showDetails(){
        println("Name: $ename \nID: $id")
    }
}

fun main(){
    val e1 = Emp("Rahul", 101, 20)
    e1.showDetails()
    println()
    val e2 = Emp("Aarav", 102, -3)
    e2.showDetails()
}


3. Implelemt a Employee Class with default constructor values

    Properties: name,position,department,experience(set it to 1 default)

  Methods: showdetails()

  a. Create a Instance with only Name specified
  b. Create a Instance with Name and Position Specified
  c. Create a Instance with All Properties Specified
  d. Instance with Name and Experience Specified
  
//Program

package com.example.objectoriented

class Employee(val name:String, val position:String = "Clerk", val department:String = "CS", val experience:Int = 1){
    fun display(){
        println("Name: $name")
        println("Poistion: $position")
        println("Department: $department")
        println("Experience: $experience")
        println()
    }
}

fun main(){
    val e1 = Employee("Rahul")
    val e2 = Employee("Aarav", "Data Analyst ", "CS")
    val e3 = Employee("James", "Manager", "IT", 20)
    val e4 = Employee("Adam", experience = 15)

    e1.display()
    e2.display()
    e3.display()
    e4.display()


}
x=0 y=0
mouse=down <y(10)>
wait(0.5)<y(-10)>
 if (window.fetch) {
            document.getElementById("submit").addEventListener("click", (e) => {
                e.preventDefault();
                fetch("https://jsonplaceholder.typicode.com/posts", {
                    method: "POST",
                    body: new FormData(document.getElementById("myForm")),
                })
                    .then((response) => response.json())
                    .then((json) => console.log(json))
                    .catch(error => console.log(error));
            });
        } else {
            document.getElementById("submit").addEventListener("click", (e) => {
                e.preventDefault();
                let xhttp = new XMLHttpRequest();
                xhttp.onreadystatechange = function () {
                    if (this.readyState == 4 && this.status == 200) {
                        let result = JSON.parse(this.responseText);
                        console.log(result);
                    } else if (this.readyState == 4) {
                        console.log("can't fecth data")
                    }
                }

                xhttp.open("POST", "https://jsonplaceholder.typicode.com/posts", true);
                const formData = new FormData(document.getElementById("myForm"));
                xhttp.send(formData);
            });
        }
// Example program
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <unordered_map>
#include <algorithm>
#include <deque>
#include <set>
#include <iostream>
#include <string>
#include <algorithm>
#include <algorithm>
using namespace std;

void BFS(int startnode, const vector<vector<int> >& S){
    vector<int> visited(S.size(), 0);
    visited[startnode] = 1;
    deque<int> dq;
    dq.push_back(startnode);
    
    while(dq.empty() == false){
        int node = dq.front();
        dq.pop_front();
        
        cout << node << " ";
        
         for(int i = 0; i < S[node].size(); i++){
            int neighbor = S[node][i]; // Lấy đỉnh kề
            if(visited[neighbor] == 0){ // Nếu đỉnh kề chưa được thăm
                visited[neighbor] = 1; // Đánh dấu đỉnh kề đã được thăm
                dq.push_back(neighbor); // Thêm đỉnh kề vào deque
            }
         }
    }
}

void DFS(int node, const vector<vector<int> >& S, vector<int>& visited){
    visited[node] = 1;
    cout << node << " ";
    for(int i = 0; i < S[node].size(); i++){
        if(visited[S[node][i]] == 0){
            DFS(S[node][i], S, visited);
            }
    }
}

int main()
{
  int n,m; //số đỉnh, cạnh
  cin >> n >> m;
  vector<vector<int> > S(n);
  vector<int> visited(n,0);
  for(int i = 0; i < m; i++){
      int a,b;
      cin >> a >> b;
      S[a].push_back(b);
      S[b].push_back(a);
}

  DFS(0, S , visited);  
  return 0;  
}
star

Thu Aug 29 2024 13:57:15 GMT+0000 (Coordinated Universal Time) https://github.com/bomanimc/gitrocket

@mikefried

star

Thu Aug 29 2024 13:56:16 GMT+0000 (Coordinated Universal Time) https://www.npmjs.com/package/webpack-node-externals

@mikefried

star

Thu Aug 29 2024 13:56:13 GMT+0000 (Coordinated Universal Time) https://www.npmjs.com/package/webpack-node-externals

@mikefried

star

Thu Aug 29 2024 13:56:11 GMT+0000 (Coordinated Universal Time) https://www.npmjs.com/package/webpack-node-externals

@mikefried

star

Thu Aug 29 2024 13:53:18 GMT+0000 (Coordinated Universal Time) https://www.npmjs.com/package/hyperterm-install-devtools

@mikefried

star

Thu Aug 29 2024 13:51:56 GMT+0000 (Coordinated Universal Time) https://www.npmjs.com/package/hyper-manager

@mikefried

star

Thu Aug 29 2024 13:51:54 GMT+0000 (Coordinated Universal Time) https://www.npmjs.com/package/hyper-manager

@mikefried

star

Thu Aug 29 2024 13:33:44 GMT+0000 (Coordinated Universal Time) https://hyper.is/

@mikefried

star

Thu Aug 29 2024 13:33:30 GMT+0000 (Coordinated Universal Time) https://hyper.is/

@mikefried

star

Thu Aug 29 2024 12:24:32 GMT+0000 (Coordinated Universal Time)

@cseagul #typescript

star

Thu Aug 29 2024 11:50:50 GMT+0000 (Coordinated Universal Time)

@iamkatmakhafola

star

Thu Aug 29 2024 09:55:48 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/nft-lending-platform-development/

@LilianAnderson #nftlending #blockchain #passiveincome #nftplatform #nftmarketplace

star

Thu Aug 29 2024 08:57:35 GMT+0000 (Coordinated Universal Time) https://www.berlinghoff-rast.ch/wp-admin/admin.php?page

@Pulak

star

Thu Aug 29 2024 07:46:04 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:46:00 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:55 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:50 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:43 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:35 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:45:01 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:57 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:52 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:43 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:39 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:33 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:44:17 GMT+0000 (Coordinated Universal Time) undefined

@mikefried

star

Thu Aug 29 2024 07:43:59 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:43:51 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:43:47 GMT+0000 (Coordinated Universal Time) https://gitless.com/

@mikefried

star

Thu Aug 29 2024 07:42:17 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:42:15 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:42:06 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:42:03 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:41:50 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/g

@mikefried

star

Thu Aug 29 2024 07:33:00 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/npm-auto

@mikefried

star

Thu Aug 29 2024 07:32:06 GMT+0000 (Coordinated Universal Time) https://github.com/billiegoose/npm-auto

@mikefried

star

Thu Aug 29 2024 05:45:40 GMT+0000 (Coordinated Universal Time)

@signup

star

Thu Aug 29 2024 04:46:36 GMT+0000 (Coordinated Universal Time) https://www.vishyat.com

@vishyattech

star

Thu Aug 29 2024 04:08:11 GMT+0000 (Coordinated Universal Time) https://jserd.springeropen.com/articles/10.1186/s40411-018-0058-0/figures/1

@WayneChung

star

Thu Aug 29 2024 03:59:30 GMT+0000 (Coordinated Universal Time)

@LizzyTheCatto

star

Thu Aug 29 2024 00:56:21 GMT+0000 (Coordinated Universal Time)

@WXAPAC

star

Wed Aug 28 2024 22:53:10 GMT+0000 (Coordinated Universal Time) https://2bit-ui.wavebeem.com/

@ThisIsKrystina

star

Wed Aug 28 2024 13:43:25 GMT+0000 (Coordinated Universal Time)

@Ajay1212

star

Wed Aug 28 2024 10:23:57 GMT+0000 (Coordinated Universal Time)

@vishalsingh21

star

Wed Aug 28 2024 10:10:06 GMT+0000 (Coordinated Universal Time)

@signup

star

Wed Aug 28 2024 10:10:06 GMT+0000 (Coordinated Universal Time)

@signup

star

Wed Aug 28 2024 10:01:33 GMT+0000 (Coordinated Universal Time)

@chatgpt #kotlin

star

Wed Aug 28 2024 07:16:45 GMT+0000 (Coordinated Universal Time)

@jackisKING79

star

Wed Aug 28 2024 06:15:28 GMT+0000 (Coordinated Universal Time)

@ahmad_raza #undefined

star

Wed Aug 28 2024 02:40:56 GMT+0000 (Coordinated Universal Time)

@LizzyTheCatto

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension