Thursday 12 April 2018

Track your Facebook login attempt


Facebook provides a feature which allows you to see all active sessions from different devices and apps together with the date it was last accessed, from where and which device type. In most cases, that should be enough information to find any suspicious activity.

This also comes in handy if you logged in to your friend's computer or on some public laptop, but forgot to log out.

To know if someone is logged into your Facebook account without your permission:-

Go to your settings page
Under option Security and Login you'll see the link "Where You're Logged In."

You will find all your active Facebook logins from desktop or mobile. It will also provide data on the location, browser and device. If something seems fishy, you also have the ability to "end activity" from individual or all devices. This means that the particular device or app cannot access your account anymore without your password.

Also keep in mind that the logged in location shown in report will not be accurate as some times it will show the gateway location of your internet provider which may be some different location. You can just check the device information from which account is accessed to confirm either it was wrong attempt.

Wednesday 4 April 2018

Convert AM/PM time to 24 hours format C#

C# hh:mm tt (12 Hours to 24 Hours Format) convert


using System.Globalization;

var cultureSource = new CultureInfo("en-US", false);
var cultureDest = new CultureInfo("de-DE", false);
var source = "03:00 PM";

 var dt = DateTime.Parse(source, cultureSource);
  Response.Write(dt.ToString("t", cultureDest));

Thursday 15 March 2018

MVC asp.net Multi Level Menu Bind


Model:


public class M_MenuModel
    {
        #region Variable
        public Int32   MMID { get; set; }
        public string MM_Name { get; set; }
        public string MM_Url { get; set; }
        public Int32 MM_Parent { get; set; }     
        public string MM_Icon { get; set; }       
        #endregion
    }

Controller :

 public ActionResult UserMenuShow()
        {
            ViewBag.Menu = BuildMenu();
            return View();
        }


 private IList<M_MenuModel> BuildMenu()
        {
IList<M_MenuModel> mmList = new List<M_MenuModel>(){
             
                // Parent
                new M_MenuModel(){ MMID = 1, MM_Name = "Home", MM_Parent = 0, MM_Url = "1"} ,
                new M_MenuModel(){ MMID = 2, MM_Name = "Admin", MM_Parent = 0, MM_Url = "1"} ,
                new M_MenuModel(){ MMID = 3, MM_Name = "Accounting", MM_Parent = 0, MM_Url = "1"} ,

                // Children

                new M_MenuModel() { MMID=21, MM_Name = "Create User", MM_Parent = 2, MM_Url="1", MM_Icon="" },
                new M_MenuModel() { MMID=22, MM_Name = "Create Group", MM_Parent = 2, MM_Url="2" },
                new M_MenuModel() { MMID=23, MM_Name = "Create Account", MM_Parent = 2, MM_Url="3"},

                new M_MenuModel() { MMID=31, MM_Name = "Manage Account", MM_Parent = 3, MM_Url="1" },
                new M_MenuModel() { MMID=32, MM_Name = "GL Accounts", MM_Parent = 3, MM_Url="2" },


                new M_MenuModel() { MMID=321, MM_Name = "Salary Accounts", MM_Parent = 32, MM_Url="1" },
                new M_MenuModel() { MMID=322,MM_Name = "Savings Accounts", MM_Parent = 32, MM_Url="2" },

            };

            return mmList;
}


View:



@{
    List<ProjectName.Areas.Admin.Models.M_MenuModel> menuList = ViewBag.Menu;
}


@foreach (var mp in menuList.Where(p => p.MM_Parent == 0))
                {

                    <li>

                        @if (menuList.Count(p => p.MM_Parent == mp.MMID) > 0)
                        {
                            <a href="#@mp.MM_Name" data-toggle="collapse" class="collapsed">@mp.MM_Name <i class="icon-submenu lnr lnr-chevron-left"></i></a>
                            @:<div ID="@mp.MM_Name" class="collapse">
                                @:<ul class="nav">
        }
                        @if (menuList.Count(p => p.MM_Parent == mp.MMID) == 0)
                        {
                            
                            @:<a href="@mp.MM_Url"> @Html.Raw(@mp.MM_Icon) @mp.MM_Name </a>
                        }

                            @RenderMenuItem(menuList, mp)

                        @if(menuList.Count(p => p.MM_Parent == mp.MMID) > 0)
                        {



                    @:</ul>
                        
                    @:</div>
                                            }

                    </li>
                }

@helper RenderMenuItem(List<Manav_Ashraya_V1.Areas.Admin.Models.M_MenuModel> menuList, Manav_Ashraya_V1.Areas.Admin.Models.M_MenuModel mi)
{
foreach (var cp in menuList.Where(p => p.MM_Parent == mi.MMID))
{


        @:<li>








    if (menuList.Count(p => p.MM_Parent == cp.MMID) > 0)
    {

            <a href="#@cp.MM_Name.Replace(' ','_')" data-toggle="collapse" class="collapsed">@cp.MM_Name <i class="icon-submenu lnr lnr-chevron-left"></i></a>

            @:<div ID="@cp.MM_Name.Replace(' ','_')" class="collapse">
                @:<ul class="nav">
        }
        if (menuList.Count(p => p.MM_Parent == cp.MMID) == 0)
        {
            @:<a href="@cp.MM_Url">@cp.MM_Name</a>


        }

        @RenderMenuItem(menuList, cp)
    if (menuList.Count(p => p.MM_Parent == cp.MMID) > 0)
    {
     @:   </ul>

    @:</div>
    }
    else
    {


         
        @:</li>
    }
}
}

Friday 9 March 2018

Update a table using JOIN in SQL Server

  1. UPDATE t1  
  2. SET t1.TID = t2.DOID  
  3. FROM dbo.Table1 AS t1  
  4. INNER JOIN dbo.Table2 AS t2  
  5. ON t1.CommonField = t2.[Common Field] 

Saturday 3 March 2018

Populate (Bind) DropDownList using AngularJS AJAX and JSON

Angular JS 

var AnguarModule = angular.module('CMS', []);
AnguarModule.controller('DashBoard', function ($scope, $http, ApiCall) {
  var result = ApiCall.GetApiCall("MasterDetails", "ASYears").success(function (data) {
        $scope.ASYearsDetails = data;
        $scope.ASYearsD = $scope.ASYearsDetails[0];
    });
});

AngularService

AnguarModule.service('ApiCall', ['$http', function ($http) {
    var result;

    // This is used for calling get methods from web api
    this.GetApiCall = function (controllerName, methodName) {
        result = $http.get(controllerName + '/' + methodName).success(function (data, status) {
            result = (data);

        }).error(function () {
            alert("Something went wrong");
        });
        return result;
    }; 
 

} ]);



HTML: 

 <div class="content" ng-app="CMS">

<div class="col-lg-4  col-md-6" ng-controller="DashBoard">

<select ng-model="ASYearsD" ng-options="items.ASYears for items in ASYearsDetails"
                ng-change="ShowUnfiled()" ng-init="ASYearsD = data[1].AsYr" id="ASYearsD">
                <option value="">-- Select --</option>
            </select>
</div>
</div>


JSON :


[{"AsYr":"2017","ASYears":"2016-17","Selected":"1"},{"AsYr":"2016","ASYears":"2015-16","Selected":"0"},{"AsYr":"2015","ASYears":"2014-15","Selected":"0"},{"AsYr":"2014","ASYears":"2013-14","Selected":"0"},{"AsYr":"2013","ASYears":"2012-13","Selected":"0"},{"AsYr":"2012","ASYears":"2011-12","Selected":"0"},{"AsYr":"2011","ASYears":"2010-11","Selected":"0"},{"AsYr":"2010","ASYears":"2009-10","Selected":"0"},{"AsYr":"2009","ASYears":"2008-09","Selected":"0"},{"AsYr":"2008","ASYears":"2007-08","Selected":"0"},{"AsYr":"2007","ASYears":"2006-07","Selected":"0"}]




Wednesday 31 January 2018

SQL CharIndex Example

  1. DECLARE @PW_MPID NVARCHAR(max)  
  2. set @PW_MPID='1555|2555|35|'  
  3.   
  4. DECLARE @PW_MPIDPostion Varchar(max) = CHARINDEX('|',@PW_MPID)                                                                                      
  5. rint @PW_MPIDPostion                                                       
  6. DECLARE @TempPW_MPID Varchar(max)                                                                                          
  7. WHILE(@PW_MPIDPostion > 0)                                                   
  8.          BEGIN                          
  9.                SET @TempPW_MPID = SUBSTRING(@PW_MPID ,1,@PW_MPIDPostion-1)       
  10.                print @TempPW_MPID  
  11.                  
  12.                 SET @PW_MPID =SUBSTRING(@PW_MPID,@PW_MPIDPostion +1,LEN(@PW_MPID))                                                     
  13.                       print @PW_MPID                                                                     
  14.    SET @PW_MPIDPostion  = CHARINDEX('|',@PW_MPID)     
  15.    print @PW_MPIDPostion                                        
  16.  END   

Tuesday 30 January 2018

ROLES AND RESPONSIBILITIES

Sr .Net Developer Responsibilities and Duties

If you are considering a job as Sr .Net Developer here is a list of the most standard responsibilities and duties for the Sr .Net Developer position.

Design, develop, test, support and deploy desktop, custom web, and mobile applications.

Gather customer software requirements and develop related software applications and programs.

Research and evaluate software related technologies and products.

Design and develop testing and maintenance procedures and activities.

Develop and write high quality coding that meets customer requirements.

Create software documentation and update existing documentation.

Design, develop and implement critical applications in a .Net environment.

Assist and support other team members on multiple projects.

Drive team members to keep up with projects deadlines and within the clients’ budgets.

Implement best practices, standards and procedures including quality and delivery methodologies.

Ensure compliance with the documented software processes and procedures throughout the life cycle of software products.

Senior Developer Responsibilities and Duties

If you are considering a job as Senior Developer here is a list of the most standard responsibilities and duties for the Senior Developer position.

Develop and document design, source base and architecture.

Maintain and manage existing source bases.

Design, develop and implement solutions to users’ needs and requirements.

Review and improvise code.

Run tests and fix bugs.

Coordinate with architects and business analysts to determine functionalities.

Develop technical solutions to complex business problems.

Design and develop technical solutions for enterprise-level projects.

Design and develop data analysis solutions.

Design and develop logical and physical data models that meet application requirements.

Senior Programmer Responsibilities and Duties

If you are considering a job as Senior Programmer here is a list of the most standard responsibilities and duties for the Senior Programmer position.

Architect, develop and implement software programs to meet business requirements.

Develop application code and modules for business and technical requirements.

Tune up design for maintainability, scalability and efficiency.

Develop and implement programs, designs and codes.

Design and develop systems, sub-systems and programs.

Coordinate and support technical staff, operations and vendors.

Interact with clients to determine their requirements and needs.

Resolve and troubleshoot problems and complex issues.

Perform unit tests and fix bugs.

Integrate best qualitative practices in design and development aspects of programs

Senior Software Engineer Roles & Responsibilities…

If you are considering a job as Senior Software Engineer here is a list of the most standard responsibilities and duties for the Senior Software Engineer position.

Design, develop and implement applications that support day-to-day operations.

Provide innovative solutions to complex business problems.

Plan, develop and implement large-scale projects from conception to completion.

Develop and architect lifecycle of projects working on different technologies and platforms.

Interface with clients and gather business requirements and objectives.

Translate clients’ business requirements and objectives into technical applications and solutions.

Understand and evaluate complex data models.

Design, develop and implement new integration.

Execute system development and maintenance activities.

Develop solutions to improvise performance and scalability of systems.

Software Developer Responsibilities and Duties

If you are considering a job as Software Developer here is a list of the most standard responsibilities and duties for the Software Developer position.

Evaluate, assess and recommend software and hardware solutions.

Develop software, architecture, specifications and technical interfaces.

Develop user interfaces and client displays.

Design, initiate and handle technical designs and complex application features.

Develop, deliver and test software prototypes.

Assist software personnel in handling ongoing tasks as required.

Build flexible data models and seamless integration points.

Innovate and develop high-value technology solutions to streamline processes.

Initiate and drive major changes in programs, procedures and methodology.

Coordinate with other developers and software professionals.

Software Programmer Responsibilities and Duties

If you are considering a job as Software Programmer here is a list of the most standard responsibilities and duties for the Software Programmer position.
Design and develop systems integration, related issues and processes.

Perform analysis, design and develop computer programs and applications.

Perform unit testing and maintain software programs and applications.

Perform coding data acquisition routines and access issues.

Develop custom reports for large data sets.

Assist and support in integration of GIS analysis applications.

Develop and deploy unit testing, load testing and tracking system software support.

Configure, maintain and support production databases.

Develop and implement application to application data feeds.

Configure and maintain multi-site data processes and issues including synchronization.

Software Engineer Responsibilities and Duties 

If you are considering a job as Software Engineer here is a list of the most standard responsibilities and duties for the Software Engineer position.

Design, develop and manage software projects for clients.

Analyze and evaluate user needs and develop software solutions.

Write supporting documents for projects developed and tested.

Develop Microsoft .net based web applications.

Develop MS SQL server applications like views, triggers and stored procedures.

Design and develop web user interfaces with back-end databases and other tools.

Recommend technical feasibilities and solutions.

Evaluate new technologies in the light of emerging trends and technologies.

Modify and update existing technologies improvise performances.

Troubleshoot and resolve difficult problems relating to software applications and programs.

Software Analyst Responsibilities and Duties

If you are considering a job as Software Analyst here is a list of the most standard responsibilities and duties for the Software Analyst position.

Perform complex analysis, designing and programming to meet business requirements.

Maintain, manage and modify all software systems and applications.

Define specifications for complex software programming applications.

Interface with end-users and software consultants.

Develop, maintain and manage systems, software tools and applications.

Resolve complex issues relating to business requirements and objectives.

Coordinate and support software professionals in installing and analyzing applications and tools.

Analyze, develop and implement testing procedures, programming and documentation.

Train and develop other software analysts.

Analyze, design and develop modifications and changes to existing systems to enhance performance.

Software Architect Responsibilities and Duties

If you are considering a job as Software Architect here is a list of the most standard responsibilities and duties for the Software Architect position.

Develop, leverage and architect technical solutions to scale business initiatives.

Develop roadmaps for subsystems in accordance with product related technologies.

Execute product related technologies, technology platforms, architects and design principles and advancements.

Design, develop and architect evolution applications across multi-generation product releases.

Generate business requirements, verify, validate and implement.

Architect all software development lifecycle including requirements gathering, designing, implementing, testing, and releasing.

Architect and implement appropriate technologies according to business requirements.

Assess and evaluate technology tradeoffs.

Select technologies to architect product roadmaps.

Develop and implement appropriate technologies to troubleshoot functional issues and risks.

Software Consultant Responsibilities and Duties

If you are considering a job as Software Consultant here is a list of the most standard responsibilities and duties for the Software Consultant position.

Analyze and understand detailed business requirements.

Provide mapping requirements and software solutions.

Provide recommendations for software developments and implementations.

Document business requirements, gatherings and issues and updated business process flows.

Document results of software research tools and applications.

Execute program modifications and changes.

Interface with clients, software professionals and consultants to develop solutions applications.

Review and evaluate technical design and technical quality issues and processes.

Coordinate and collaborate workflow processes and issues in designing, programming and testing.

Develop highly functional qualitative modifications and system changes.

Software Designer Responsibilities and Duties

If you are considering a job as Software Designer here is a list of the most standard responsibilities and duties for the Software Designer position.

Design, develop and execute unit test plans, test designs, test cases and test strategies.

Design, develop and execute subsystem test plans, procedures and processes.

Document all test plans, test cases and strategies procedures and issues.

Design and implement test scripts on test tools and scripting languages.

Coordinate and collaborate with outside test partners.

Design, develop and implement program and process improvements.

Design and develop coding, code reviews, unit testing and release management.

Develop design specifications in accordance with business requirements and issues.

Recommend strategic improvements to optimize performances.

Perform analyses and interpretations of strategies and software applications.

Upload valid file in C#

    protected bool CheckFileExtandLength(HttpPostedFile HtmlDocFile)     {         try         {             Dictionary<string, byte[]>...