Syed Javed

Syed Javed

11 Articles Published

Articles by Syed Javed

11 articles

How to change font size in HTML?

Syed Javed
Syed Javed
Updated on 31-Aug-2023 134K+ Views

To change the font size in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML tag, with the CSS property font-size. HTML5 do not support the tag, so the CSS style is used to add font size.Just keep in mind, the usage of style attribute overrides any style set globally. It will override any style set in the HTML tag or external style sheet.ExampleYou can try to run the following code to change the font size in an HTML page, Live Demo     ...

Read More

CURL context options in PHP

Syed Javed
Syed Javed
Updated on 13-Nov-2020 475 Views

IntroductionCURL context options are available when the CURL extension was compiled using the --with-curlwrappers configure option. Given below is list of CURL wrapper context optionsMethodDescriptionmethodHTTP method supported by the remote server. Defaults to GET.headerAdditional headers to be sent during requestuser_agentValue to send with User-Agent: header.contentAdditional data to be sent after the headers. This option is not used for GET or HEAD requests.proxyURI specifying address of proxy server.max_redirectsThe max number of redirects to follow. Defaults to 20.curl_verify_ssl_hostVerify the host. Defaults to FALSE. available for both http and ftp protocol wrappers.curl_verify_ssl_peerRequire verification of SSL certificate used. Defaults to FALSE. available for both ...

Read More

:active pseudo class in CSS

Syed Javed
Syed Javed
Updated on 23-Jun-2020 831 Views

Pseudo class is to show different state of an element or a css selector. Active pseudo class is to show that the element is in active state.This pseudo class is mostly being associated with link and button or any other element which can be active.For example if it is associated with link that the link is active.Syntaxa:active { color:green;}Let's check the actual usage of :active pseudo class with different scenarios, as follows −Example Live Demo           a:active { color:green;}        Click here to learn ExplanationWhen you first time see the link ...

Read More

How to find the size of a variable without using sizeof in C#?

Syed Javed
Syed Javed
Updated on 23-Jun-2020 2K+ Views

To get the size of a variable, sizeof is used.int x; x = sizeof(int);To get the size of a variable, without using the sizeof, try the following code −// without using sizeof byte[] dataBytes = BitConverter.GetBytes(x); int d = dataBytes.Length;Here is the complete code.Example Live Demousing System; class Demo {    public static void Main() {       int x;       // using sizeof       x = sizeof(int);       Console.WriteLine(x);       // without using sizeof       byte[] dataBytes = BitConverter.GetBytes(x);       int d = dataBytes.Length;       Console.WriteLine(d);    } }Output4 4

Read More

How can we set PRIMARY KEY on multiple columns of an existing MySQL table?

Syed Javed
Syed Javed
Updated on 19-Jun-2020 10K+ Views

We can set PRIMARY KEY constraint on multiple columns of an existing table by using ADD keyword along with ALTER TABLE statement.ExampleSuppose we have a table ‘Room_allotment’ as follows −mysql> Create table Room_allotment(Id Int, Name Varchar(20), RoomNo Int); Query OK, 0 rows affected (0.20 sec) mysql> Describe Room_allotment; +--------+-------------+------+-----+---------+-------+ | Field  | Type        | Null | Key | Default | Extra | +--------+-------------+------+-----+---------+-------+ | Id     | int(11)     | YES  |     | NULL    |       | | Name   | varchar(20) | YES  |     | NULL ...

Read More

Fibonacci series program in Java without using recursion.

Syed Javed
Syed Javed
Updated on 18-Jun-2020 4K+ Views

Following is the required program.ExampleLive Demopublic class Tester {    public static void main(String args[]) {        int n1 = 0, n2 = 1, n3, i, max = 5;        System.out.print(n1 + " " + n2);        for (i = 2; i < max; ++i) {           n3 = n1 + n2;           System.out.print(" " + n3);           n1 = n2;           n2 = n3;        }     }  }Output0 1 1 2 3

Read More

Local variables in Java

Syed Javed
Syed Javed
Updated on 12-Mar-2020 2K+ Views

Local variables are declared in methods, constructors, or blocks.Local variables are created when the method, constructor or block is entered and the variable will be destroyed once it exits the method, constructor, or block.Access modifiers cannot be used for local variables.Local variables are visible only within the declared method, constructor, or block.Local variables are implemented at stack level internally.There is no default value for local variables, so local variables should be declared and an initial value should be assigned before the first use.ExampleHere, age is a local variable. This is defined inside pupAge()method and its scope is limited to only ...

Read More

How is down-casting possible in Java?

Syed Javed
Syed Javed
Updated on 12-Mar-2020 215 Views

Yes, a variable can be downcast to its lower range substitute by casting. It may lead to data loss although. See the example below −ExampleLive Demopublic class Tester {      public static void main(String[] args) {       int a = 300;         byte b = (byte)a;         System.out.println(b);    }   }OutputIt will print output as −44

Read More

Advantages of naming conventions in Java

Syed Javed
Syed Javed
Updated on 06-Mar-2020 637 Views

Following the the best practices while declaring a variable.  These best practices maintains code readability, understandability as project code size increases.Variables names should be short or long enough as per the scope. For example, loop counter variable, i is fine whereas employee as loop variable.Specific words should not be used like equals, compare, data.Use meaningful names which can explain the purpose of the variable. For example cnt Vs counter.Don't use _ to declare a variable name, Use camel casing. For example, employeeName is better than employee_name.Each organization has its own syntax specific standards. Follow those rules to maintain consistency and ...

Read More

How the Table statement works in ABAP

Syed Javed
Syed Javed
Updated on 30-Jul-2019 420 Views

With table statement, you are able to get a single line of data corresponding to the dictionary structure you specify. The fields of structure can be used as select options and the structure can be passed as variable in the program.

Read More
Showing 1–10 of 11 articles
« Prev 1 2 Next »
Advertisements