Wednesday, 31 July 2024

interview at techsoloutions

 When processing thousands of data items in a .NET API, which method will you choose in terms of balancing performance and resource usage most efficiently ? 

foreach (var item in data) { 

 ProcessItem(item); } Parallel.ForEach(data, item => { ProcessItem(item); }); foreach (var item in data) { await Task.Run(() => ProcessItem(item)); } await Task.WhenAll(data.Select(item => Task.Run(() => ProcessItem(item)



2.reverse a string without reverse


3.state management

fake APIS

 https://fakestoreapi.com/docs

https://docs.opensea.io/

https://cloudconvert.com/


https://leetcode.com/explore/learn

Tuesday, 30 July 2024

flutter

 https://github.com/Nabinji/100-DaysOf-Futter/blob/main/flutter_firebse_project/lib/main.dart

Wednesday, 24 July 2024

Templates Links

 https://lite.codedthemes.com/mash-able/angular/dashboard


https://lite.codedthemes.com/gradient-able/bootstrap/tbl_bootstrap.html


Monday, 22 July 2024

seqnce update after delete

 UPDATE tbl_WorkFlowMembers

SET Approver_Sequence = Approver_Sequence - 1

WHERE WorkFlow_ID='RAILMY00009' AND Approver_Sequence > 1;


i have sequence like this  to make proper imporved using above like this
Approver_Sequence 1 3 4 5 6 7 8

rolebased sql list

 SELECT 

  F.FormID, 

  F.GroupID,

  FG.GroupName AS GroupName, 

  F.FormName, 

  F.UpdatedOn, 

  F.UpdatedBy, 

  F.IsActive, 

  FG.GroupName

FROM [tbl_Forms] F

JOIN [tbl_FormGroups] FG ON F.GroupID = FG.GroupID

JOIN [tbl_Users] U ON F.UpdatedBy = U.UserID

JOIN [tbl_UserRoles] UR ON U.RoleID = UR.RoleID

WHERE F.IsActive = 1

AND UR.RoleName IN ('superadmin', 'divcountryadmin');


Saturday, 20 July 2024

dynamic header ts data load

  menuitems: NavItem[] = [

    {
      MenuName: 'Employees',
      MenuURL: '/employee/employees',
      showSubItems: false,
      SubItems: [],
    },
    {
      MenuName: 'IR35 Documents',
      MenuURL: '/ir35/ir35employees',
      showSubItems: false,
      SubItems: [],
    },
    {
      MenuName: 'Administration',
      MenuURL: '#',
      showSubItems: true,
      SubItems: [
        {
          MenuName: 'Users List',
          MenuURL: '/userslist',
          showSubItems: false,
          SubItems: null,
        },
        {
          MenuName: 'Form Group',
          MenuURL: '/hrdm-form-groups',
          showSubItems: false,
          SubItems: null,
        },
        {
          MenuName: 'Form SubCategory',
          MenuURL: '/hrdm-form-subcategory',
          showSubItems: false,
          SubItems: null,
        },
      ],
    },
    {
      MenuName: 'Scans',
      MenuURL: '#',
      showSubItems: true,
      SubItems: [
        {
          MenuName: 'Scanned Files',
          MenuURL: '/scanned-files',
          showSubItems: false,
          SubItems: [],
        },
        {
          MenuName: 'Completed Scanned Files',
          MenuURL: '/completed-files',
          showSubItems: false,
          SubItems: [],
        },
      ],
    },
  ];

dynamic header or side bar sample code html

 <div class="container-fluid">





<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-primary">
  <a class="navbar-brand" routerLink="/home">HRDM</a>

  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
    aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">
      <li *ngFor="let m of menuitems" [ngClass]="{'nav-item': !m.showSubItems, 'nav-item dropdown': m.showSubItems}">
        <ng-container *ngIf="!m.showSubItems">
          <a class="nav-link" [routerLink]="m.MenuURL">{{m.MenuName}}</a>
        </ng-container>
        <ng-container *ngIf="m.showSubItems">
          <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
            aria-haspopup="true" aria-expanded="false">
            {{m.MenuName}}
          </a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
            <a class="dropdown-item" *ngFor="let s of m.SubItems" [routerLink]="s.MenuURL">{{s.MenuName}}</a>
          </div>
        </ng-container>
      </li>
    </ul>
  </div>
  <select name="Country" [(ngModel)]="this.role" required (change)="onRoleChange()">
    <option *ngFor="let option of this.roleoptions" [value]="option">
      {{ option}}
    </option>
  </select>

  <button mat-button [matMenuTriggerFor]="menu">
    <div class="circles">
      {{ getInitials() }}
    </div>
  </button>
  <mat-menu #menu="matMenu" xPosition="before">
    <table style="padding: 10px">
      <tr>
        <td class="d-flex justify-content-center mt-2" style="font-size: 22px; font-weight: 500">
          {{ this.loginUser.DisplayName }}
        </td>
      </tr>
      <tr>
        <td class="d-flex justify-content-center" style="font-size: 18px">
          {{ this.loginUser.EmailAddress }}
        </td>
      </tr>
      <tr>
        <td class="d-flex justify-content-center mt-2">
          <button mat-raised-button class="btnSave" (click)="logout()">
            Logout
          </button>
        </td>
      </tr>
    </table>
  </mat-menu>
</nav>
</div>

Wednesday, 17 July 2024

get ooutput result for foreach loop save

  public async Task<bool> BulkMovetoCompletedFiles(List<tbl_ScanedFiles> files)

 {

     try

     {

         bool result = false;

         List<bool> responseResult = new List<bool>();


         if (files.Count > 0)

         {

             foreach (var item in files)

             {

                 responseResult.Add(await MovetoCompletedFiles(item.FileName, item.DivisionName, item.CountryName));

             }


             if (responseResult.All(x => x == true))

             {

                 result = true;

             }

         }


         return result;

     }

     catch (Exception ex)

     {

         throw ex;

     }

 }

Wednesday, 10 July 2024

Linq to typescript

 https://www.garethrepton.com/TypeScript-equivalents-for-DotNet-Linq-functions/

flutter grid withimages

 import 'package:flutter/material.dart';



List<String> imagetry =[
  'images/try/image0.jpg',
  'images/try/image1.jpg',
  'images/try/image2.jpg',
  'images/try/image3.jpg',
];
class MenCategory extends StatelessWidget {
  const MenCategory({super.key});

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start, //check by comment
      children: [
        const Padding(
          padding: EdgeInsets.all(30.0),
          child: Text(
            "Men",
            style: TextStyle(
                fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: 1.5),
          ),
        ),
        SizedBox(
          height: MediaQuery.of(context).size.height * 0.68,
          child: GridView.count(
            mainAxisSpacing: 70, //c and check
            crossAxisSpacing: 15, //c and check
            crossAxisCount: 3,
            children: List.generate(4, (index) {
              return Column(
                children: [
                  SizedBox(
                    height: 70,
                    width: 70,
                    child: Image(
                      // image: AssetImage(imagetry[index]),
                      image: AssetImage('images/try/image$index.jpg'),
                    ),
                  ),
                  Text('Shirt')
                ],
              );
            }),
          ),
        )
      ],
    );
  }
}

flutter grid code

 import 'package:flutter/material.dart';


class MenCategory extends StatelessWidget {
  const MenCategory({super.key});

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start, //check by comment
      children: [
        Padding(
          padding: const EdgeInsets.all(30.0),
          child: Text(
            "Men",
            style: TextStyle(
                fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: 1.5),
          ),
        ),
        SizedBox(
          height: MediaQuery.of(context).size.height * 0.68,
          child: GridView.count(
            mainAxisSpacing:70,//c and check
            crossAxisSpacing: 15,//c and check
            crossAxisCount: 3,
            children: List.generate(4, (index) {
              return Container(
                color: Colors.blue,
                height: 70,
                width: 70,
              );
            }),
          ),
        )
      ],
    );
  }
}

HR MBA JOBS

 Senior Manager - HR. In her role, she will lead the Talent Acquisition and HR Business Partner function for the GSC

x has completed her Master’s in Business Administration, specializing in HR, and an Executive Diploma in Human Resource Management from XLRI Jamshedpur.


x is an accomplished HR professional with 15 years of diverse HR experience and worked in the areas of talent management, employee engagement, and, organizational culture. 

kidney stone?

  Foods that increase kidney stone risk include those  high in oxalates (like spinach, nuts, and chocolate), sodium (processed and fast food...