Saturday, October 30, 2021

How to change the font size, font in Visual studio Text editor. Also we can change background color

 Shortcut key to increase the size of Text

Ctrl+Alt+Mouse scroll OR Ctrl+Mouse scroll 

And

>Goto Tools>Option

>Under environment>Font and colors

>You can change font here

-----------------------------*************---------------------

we can also change background color :-

Goto Tools>Option

>Under environment>Font and colors

>Click on item background


reference:- https://docs.microsoft.com/en-us/visualstudio/ide/reference/how-to-change-fonts-and-colors-in-the-editor?view=vs-2019

What is stateless in web site.

 Website is stateless means that every time a new instance is created when we send the request from client to server.

What is Session, query string and view state

 Session is a state management technique. Session values are stored on server.

Session["name"] = "yash";

lblName.Text = Session["name"].ToString();


--------------------------------------------

Query String is helpful when we want to transfer a value from one page to another

Query string is a state management technique. Query string values are stored on client side. We can pass query string in URL by question mark(?)

example

Response.Redirect("Test1.aspx?ID="+ Guid.NewGuid());


and ID can be used in another aspx Page.

lblID.Text = Request.QueryString["ID"].ToString();

--------------------------------------------------


View state is a state management technique. View state values are stored on client side.

ViewState["name"] = "yash";

and we can use this view state in same page.

lblName.Text = ViewState["name"] ;


references:-

https://www.c-sharpcorner.com/UploadFile/nipuntomar/state-management-in-Asp-Net/

https://www.c-sharpcorner.com/UploadFile/225740/introduction-of-session-in-Asp-Net/


https://www.c-sharpcorner.com/UploadFile/ca2535/query-string-in-Asp-Net/

https://www.c-sharpcorner.com/UploadFile/225740/what-is-view-state-and-how-it-works-in-Asp-Net53/

Database connectivity of Grid with ASP.Net(C#)

 >First add connection string to Web.config file (database name is aggregate)

<configuration>

<connectionStrings>

<add name="connectionString" connectionString="initial catalog=aggregate;user=sa1;password=sa;data source=." />

</connectionStrings>

</configuration>


>Add Grid to aspx page

<asp:GridView ID="GridView1" runat="server">

            </asp:GridView>


>Add below code to aspx.cs

using System;

using System.Collections.Generic;

using System.Configuration;

using System.Data;

using System.Data.SqlClient;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;


public partial class Webforms_Default : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

        String conStr = ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString;


        using (SqlConnection con = new SqlConnection(conStr))

        {

            using (SqlCommand cmd = new SqlCommand("Select * from aggregate._form_info", con))

            {

                using (SqlDataAdapter da = new SqlDataAdapter(cmd))

                {

                    DataTable dt = new DataTable();

                    da.Fill(dt);

                    GridView1.DataSource = dt;

                    GridView1.DataBind();

                }

            }

        }

    }

}


In window 10, how to see the previous days history

We can see history by Window+Tab key 

How to create Google Form

> Go to docs.google.com/forms

>Click on Blank

>Add the Questions

Friday, October 29, 2021

How to see gif image (moving image) if you have Internet or no Internet in Google Chrome

 Type chrome://welcome in URL

Find Ist, 2nd and 3rd highest salary from table in MS SQL

 For example we have table with following entries:-


If we want to find the 1st highest salary:-

SELECT TOP 1 SALARY FROM (SELECT DISTINCT TOP 1 SALARY FROM EMP ORDER BY SALARY DESC) RESULT ORDER BY SALARY 

Result :- 5000

----------------------------------

If we want to find the 2nd highest salary:-

SELECT TOP 1 SALARY FROM (SELECT DISTINCT TOP 2 SALARY FROM EMP ORDER BY SALARY DESC) RESULT ORDER BY SALARY 

Result :- 3000

---------------------------------------

If we want to find the 3rd highest salary:-

SELECT TOP 1 SALARY FROM (SELECT DISTINCT TOP 3 SALARY FROM EMP ORDER BY SALARY DESC) RESULT ORDER BY SALARY 

Result :- 1000

How to download Visual Studio for Free

 In google type "Download Visual Studio community" and open the first link

and Click on download Visual Studio


or Directly download it from below link

https://visualstudio.microsoft.com/vs/community/ 

To open calendar and address book in window 10

For Calendar

 >Press window button

>Type calendar and click on calendar app to use calendar.


For Address Book

>Press window button

>Type People and use People App

> In window 10 Address Book name has been changed to People.

or if it is not showing in search button (window click) right click on taskbar and click on show people on the taskbar

or Go to Control panel and click on (Taskbar and navigation) and click on on button of (Taskbar and navigation)

To change or apply screen saver in Window 10

 >Press window button

>Type change screen saver

>Click on it and select the screen saver and apply.

Group By clause in SQL Server


Example Table:- 


Table name = EMP



SELECT COUNT(CUSID), COUNTRIES FROM EMP GROUP BY COUNTRIES


Result:-



How to change the link of blog eg.(https://kapooryash.blogspot.com/2021/10/mssql-database-connectivity-console.html to https://kapooryash.blogspot.com/2021/10/test.html)

 >Create a new blog

>Click on Permalink

>Click on custom permalink(radio box)

>Enter text in textbox(below is the screenshot)



Creating a Bar chart and grid in asp.net with dummy data and with web service - How to pass dummy data to grid

 First create a class Employee

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;


namespace WebApplication4

{

    public class Employee

    {

        public int empID { get; set; }

        public string empName { get; set; }

        public int empAge { get; set; }


        //int[] i = new int[] { 1,21,6,5,5};

    }

}

How to call a webservice in aspx.cs Page


//In Page_Load function we can call webservice


 Protected void Page_Load(Object sender, Event args)

{

    WebService1 w = new WebService1();

    List<Employee> emp = w.HelloWorld();    // function of web service

}

Thursday, October 28, 2021

Creating hello world program in netbeans(java with ant)

 >Open Netbeans

>Click on File

>Click on New Project

>Click on java with ant

>Click on java application

>After that write below code:-


package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {

        System.out.println("Hello world");

    }

}


mssql database connectivity, Console application or Maven application in java (Netbeans)

>Open netbeans 
>Click on File
 >Click on new project
 >Click java with maven 
>Click on java Application 
>Create new class in src
>main>java>com>mycompany>mavenproject1>NewClass.java >
Also we have to add below code in POM.xml in
<project >tag. 
<dependencies>  
    <dependency> <groupId>com.microsoft.sqlserver</groupId>
    <artifactId>mssql-jdbc</artifactId>
    <version>9.4.0.jre11</version>
    </dependency>
    </dependencies>

 By adding the above code, A mssql-jdbc.jar will automatically created under dependency.
 Code for NewClass.java

package com.mycompany.mavenproject1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;


/**
 *
 * @author 61021
 */
public class NewClass1 {
    public static void main(String[] args)
    {
        String connectionUrl =
                "jdbc:sqlserver://localhost:1433;"
                //+""
                + "database=test;"
                //+"integratedSecurity=true;";
                + "user=sa1;"
                + "password=sa;";               

        ResultSet resultSet = null;

        try (Connection connection = DriverManager.getConnection(connectionUrl);
                Statement statement = connection.createStatement();) {

            // Create and execute a SELECT SQL statement.
            String selectSql = "SELECT top 10 * from employee";
            resultSet = statement.executeQuery(selectSql);

            // Print results from select statement
            while (resultSet.next()) {
                System.out.println(resultSet.getString(2) + " " + resultSet.getString(3));
            }
        }
        catch (SQLException e) {
            e.printStackTrace();
        }
    }
}


Create more than one blog in blogspot.com

>Click on Home menu on left side(below is screenshot)

To change the body layout and footer layout in blogger

>Click on layout >Click on theme designer >Expand layout >After thst you can change the body layout and footer layout.(below screenshot)

Make your blogspot mobile responsive.

 > Click on themes.

>Click on custom menu

>Click on Mobile settings

>Click on "Do you want to show the Desktop or Mobile theme on mobile devices?"

>Click on "mobile radio box" and Click on Save.

> Now your website is mobile responsive.

How to add new pages in blogspot.com

 >Click on pages on left side

>Click on New page on left side

>Enter the title and Click on publish.

Adding a menu under Header on blogspot.com

 



> We can add menu under header on blogspot.com

>Click on layouts

> Click on Add Gadget under cross column section

>Click on pages

>Add new items

-----------------------OR----------------------------

If Page Gadget is already Added:-

>Click on edit under cross column section

> And add the menus by clicking on "Add new Items"

In Google chrome, we can change the setting of start up i.e when we open google chrome

> Click on settings on Google chrome. (Settings is in menu)

> Click on start up and we can change the settings.





Adding or deleting profile or guset user to Google chrome

 >On right side of google chrome, we can add guest user or delete user for removing the history of user(Screenshot is below)





> Also in settings we can remove or add user.(Screenshot is below)





Wednesday, October 27, 2021

How to add Gadget in Blogspot.com

 >Open blogspot.com

>Click on layout

>Click on Add a Gadget

>And we can add Text, contact form etc.

How to create menu(pages) in blogspot

 >Go to blogger.com

>Click on layout

>On right side, click on Edit under pages

>Click on Add new pages

>Select the page you want to add and save it.


Important:- Menus are created by Gadget "Pages".

How to see the mobile number and IMEI code in android phone (mobile phone or smart phone)

 >Go to settings

>About phone

>Status

>Sim Status

>Your can see the Phone number and IMEI number.

How to see IP address and MAC address in android phone

> Go to settings

>About Phone

>Status

>IP address and MAC address we can see

To change windows 10 background to black and Size of mouse(cursor)

 Go to Control panel

>Open Taskbar and navigation

>Click on colors

>Click on High Contrast settings(screenshot below)



> Here you can change high contrast settings and also you can change mouse cursor size(screenshot below)



To check TCP/IP default port of MS SQL (SQL server)

> In window 10, Press window button

> Enter SQL Server Configuration Manager(or in C:/windows/system32 you can find SQLServerManager.....msc)

> Expand SQL Native Client 11.0 Configuration

> Click on Client Protocols

> Right click on TCP/IP

> Click on properties

>You will find the port number

(Please see below image)



> If SQL server Configuration manager is missing, please read https://kapooryash.blogspot.com/2022/06/sql-server-configuration-manager.html

Create simple hello world program in Dot Net(C#)

 using System;


namespace ConsoleApp1

{

    class Program

    {

        static void Main(string[] args)

        {

            Console.WriteLine("Hello World!");

        }

    }

}


Some English sentences

 The teacher drew the attention of the boys to the importance of regular practice.

You will not achieve dire success unless you perpetuate your studies.

However fast you speak I shall follow you.

Radha is dancing on the floor

I smell a dead rat.

I am smelling a rose.

My mother was parboiling kheer.

The students of this class are connoisseur.

Ram will be given toco for his misdemeanor.

However fast you speak I shall follow you.

Tuesday, October 26, 2021

Entering URL localhost in IIS, Showing blank screen

 Reinstall IIS again.

In visual studio if "New Web Site" option is not showing - Visual studio installer

 >Click on File

>New Project

>In last, Click on Install more tools and features

>Click on checkbox(Additional project templates previous versions)

>At last click on modify.(screenshot below)


or

>Go to Tools>Click on 'Get tools and features' - It will show same window

To create new user in Windows 10 and giving admin rights to this user

 Go to control panel>Administrative tool>Computer management>Local users & group> Double Click on users>Right Click and create new user



To give admin rights to this user:-

Press Window+R

Enter lusrmgr.msc

>Double click on users

> Click tab member OF

>Click on Add

>Click on Find now

> Click on Administrator and OK and Than click on OK

Connection string for Java connectivity to MS SQL database and for ODK (Open data Kit)

 jdbc:sqlserver://localhost:1433;database=aggregate;user=sa1;password=sa;

In profile.w3schools.com we can create domain name

example:- yashkapoor.w3spaces.com

Convert a PPT file into Video file.

Open PPT file in power point. 1) Click on File. 2) Click on Export. 3) Create a Video and save it to the location you want.

To view blogger and drive in gmail

ODK Aggregate and ODK collect

ODK Aggregate is java application and we can see all the data where it is going into tables and also we can upload XML forms (that we have build in ODK build).

ODK Open data kit --------- ODK build

Open data kit is digital data collection tool. In ODK we have ODK build, ODK Aggregate and ODK collect. In ODK build we can design forms(XML). We can build the form in build.getodk.org

Fiddler and Postman

Fidler is used for tracking network traffic between internet and Computers.

We can see the requests of web API.

Also we can use Postman application for HTTP Request track.